@angular/language-service 8.1.0-next.3 → 8.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/language-service.umd.js +715 -648
- package/bundles/language-service.umd.min.js +73 -73
- package/package.json +1 -1
- package/src/diagnostics.d.ts +0 -1
- package/src/diagnostics.js +10 -57
- package/src/language_service.js +49 -93
- package/src/ts_plugin.js +1 -2
- package/src/types.d.ts +9 -0
- package/src/types.js +1 -1
- package/src/typescript_host.d.ts +3 -2
- package/src/typescript_host.js +97 -5
- package/src/version.js +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v8.1.
|
|
2
|
+
* @license Angular v8.1.2
|
|
3
3
|
* (c) 2010-2019 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -39,7 +39,7 @@ var x,E,S=function(){function e(e){var t=this,n=void 0===e?{}:e,r=n.closedByChil
|
|
|
39
39
|
*
|
|
40
40
|
* Use of this source code is governed by an MIT-style license that can be
|
|
41
41
|
* found in the LICENSE file at https://angular.io/license
|
|
42
|
-
*/(this.tags)},t}(Ge)),st=function(e){function t(t,n,r){var i=e.call(this,null,r)||this;return i.bodyStmts=t,i.catchStmts=n,i}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&ge(this.bodyStmts,e.bodyStmts)&&ge(this.catchStmts,e.catchStmts)},t.prototype.visitStatement=function(e,t){return e.visitTryCatchStmt(this,t)},t}(Ge),at=function(e){function t(t,n){var r=e.call(this,null,n)||this;return r.error=t,r}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof st&&this.error.isEquivalent(e.error)},t.prototype.visitStatement=function(e,t){return e.visitThrowStmt(this,t)},t}(Ge),ut=function(){function e(){}return e.prototype.transformExpr=function(e,t){return e},e.prototype.transformStmt=function(e,t){return e},e.prototype.visitReadVarExpr=function(e,t){return this.transformExpr(e,t)},e.prototype.visitWrappedNodeExpr=function(e,t){return this.transformExpr(e,t)},e.prototype.visitTypeofExpr=function(e,t){return this.transformExpr(new Ee(e.expr.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitWriteVarExpr=function(e,t){return this.transformExpr(new Ce(e.name,e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitWriteKeyExpr=function(e,t){return this.transformExpr(new Te(e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitWritePropExpr=function(e,t){return this.transformExpr(new Ne(e.receiver.visitExpression(this,t),e.name,e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitInvokeMethodExpr=function(e,t){var n=e.builtin||e.name;return this.transformExpr(new Ae(e.receiver.visitExpression(this,t),n,this.visitAllExpressions(e.args,t),e.type,e.sourceSpan),t)},e.prototype.visitInvokeFunctionExpr=function(e,t){return this.transformExpr(new Pe(e.fn.visitExpression(this,t),this.visitAllExpressions(e.args,t),e.type,e.sourceSpan),t)},e.prototype.visitInstantiateExpr=function(e,t){return this.transformExpr(new Ie(e.classExpr.visitExpression(this,t),this.visitAllExpressions(e.args,t),e.type,e.sourceSpan),t)},e.prototype.visitLiteralExpr=function(e,t){return this.transformExpr(e,t)},e.prototype.visitExternalExpr=function(e,t){return this.transformExpr(e,t)},e.prototype.visitConditionalExpr=function(e,t){return this.transformExpr(new Re(e.condition.visitExpression(this,t),e.trueCase.visitExpression(this,t),e.falseCase.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitNotExpr=function(e,t){return this.transformExpr(new De(e.condition.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitAssertNotNullExpr=function(e,t){return this.transformExpr(new Le(e.condition.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitCastExpr=function(e,t){return this.transformExpr(new Fe(e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitFunctionExpr=function(e,t){return this.transformExpr(new Ve(e.params,this.visitAllStatements(e.statements,t),e.type,e.sourceSpan),t)},e.prototype.visitBinaryOperatorExpr=function(e,t){return this.transformExpr(new Be(e.operator,e.lhs.visitExpression(this,t),e.rhs.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitReadPropExpr=function(e,t){return this.transformExpr(new He(e.receiver.visitExpression(this,t),e.name,e.type,e.sourceSpan),t)},e.prototype.visitReadKeyExpr=function(e,t){return this.transformExpr(new Ue(e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitLiteralArrayExpr=function(e,t){return this.transformExpr(new qe(this.visitAllExpressions(e.entries,t),e.type,e.sourceSpan),t)},e.prototype.visitLiteralMapExpr=function(e,t){var n=this,r=e.entries.map(function(e){return new Ke(e.key,e.value.visitExpression(n,t),e.quoted)}),i=new pe(e.valueType,null);return this.transformExpr(new ze(r,i,e.sourceSpan),t)},e.prototype.visitCommaExpr=function(e,t){return this.transformExpr(new We(this.visitAllExpressions(e.parts,t),e.sourceSpan),t)},e.prototype.visitAllExpressions=function(e,t){var n=this;return e.map(function(e){return e.visitExpression(n,t)})},e.prototype.visitDeclareVarStmt=function(e,t){var n=e.value&&e.value.visitExpression(this,t);return this.transformStmt(new Xe(e.name,n,e.type,e.modifiers,e.sourceSpan),t)},e.prototype.visitDeclareFunctionStmt=function(e,t){return this.transformStmt(new Ye(e.name,e.params,this.visitAllStatements(e.statements,t),e.type,e.modifiers,e.sourceSpan),t)},e.prototype.visitExpressionStmt=function(e,t){return this.transformStmt(new Ze(e.expr.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitReturnStmt=function(e,t){return this.transformStmt(new Je(e.value.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitDeclareClassStmt=function(e,t){var n=this,r=e.parent.visitExpression(this,t),i=e.getters.map(function(e){return new nt(e.name,n.visitAllStatements(e.body,t),e.type,e.modifiers)}),o=e.constructorMethod&&new tt(e.constructorMethod.name,e.constructorMethod.params,this.visitAllStatements(e.constructorMethod.body,t),e.constructorMethod.type,e.constructorMethod.modifiers),s=e.methods.map(function(e){return new tt(e.name,e.params,n.visitAllStatements(e.body,t),e.type,e.modifiers)});return this.transformStmt(new rt(e.name,r,e.fields,i,o,s,e.modifiers,e.sourceSpan),t)},e.prototype.visitIfStmt=function(e,t){return this.transformStmt(new it(e.condition.visitExpression(this,t),this.visitAllStatements(e.trueCase,t),this.visitAllStatements(e.falseCase,t),e.sourceSpan),t)},e.prototype.visitTryCatchStmt=function(e,t){return this.transformStmt(new st(this.visitAllStatements(e.bodyStmts,t),this.visitAllStatements(e.catchStmts,t),e.sourceSpan),t)},e.prototype.visitThrowStmt=function(e,t){return this.transformStmt(new at(e.error.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitCommentStmt=function(e,t){return this.transformStmt(e,t)},e.prototype.visitJSDocCommentStmt=function(e,t){return this.transformStmt(e,t)},e.prototype.visitAllStatements=function(e,t){var n=this;return e.map(function(e){return e.visitStatement(n,t)})},e}(),lt=function(){function e(){}return e.prototype.visitType=function(e,t){return e},e.prototype.visitExpression=function(e,t){return e.type&&e.type.visitType(this,t),e},e.prototype.visitBuiltinType=function(e,t){return this.visitType(e,t)},e.prototype.visitExpressionType=function(e,t){var n=this;return e.value.visitExpression(this,t),null!==e.typeParams&&e.typeParams.forEach(function(e){return n.visitType(e,t)}),this.visitType(e,t)},e.prototype.visitArrayType=function(e,t){return this.visitType(e,t)},e.prototype.visitMapType=function(e,t){return this.visitType(e,t)},e.prototype.visitWrappedNodeExpr=function(e,t){return e},e.prototype.visitTypeofExpr=function(e,t){return this.visitExpression(e,t)},e.prototype.visitReadVarExpr=function(e,t){return this.visitExpression(e,t)},e.prototype.visitWriteVarExpr=function(e,t){return e.value.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitWriteKeyExpr=function(e,t){return e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.value.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitWritePropExpr=function(e,t){return e.receiver.visitExpression(this,t),e.value.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitInvokeMethodExpr=function(e,t){return e.receiver.visitExpression(this,t),this.visitAllExpressions(e.args,t),this.visitExpression(e,t)},e.prototype.visitInvokeFunctionExpr=function(e,t){return e.fn.visitExpression(this,t),this.visitAllExpressions(e.args,t),this.visitExpression(e,t)},e.prototype.visitInstantiateExpr=function(e,t){return e.classExpr.visitExpression(this,t),this.visitAllExpressions(e.args,t),this.visitExpression(e,t)},e.prototype.visitLiteralExpr=function(e,t){return this.visitExpression(e,t)},e.prototype.visitExternalExpr=function(e,t){var n=this;return e.typeParams&&e.typeParams.forEach(function(e){return e.visitType(n,t)}),this.visitExpression(e,t)},e.prototype.visitConditionalExpr=function(e,t){return e.condition.visitExpression(this,t),e.trueCase.visitExpression(this,t),e.falseCase.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitNotExpr=function(e,t){return e.condition.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitAssertNotNullExpr=function(e,t){return e.condition.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitCastExpr=function(e,t){return e.value.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitFunctionExpr=function(e,t){return this.visitAllStatements(e.statements,t),this.visitExpression(e,t)},e.prototype.visitBinaryOperatorExpr=function(e,t){return e.lhs.visitExpression(this,t),e.rhs.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitReadPropExpr=function(e,t){return e.receiver.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitReadKeyExpr=function(e,t){return e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitLiteralArrayExpr=function(e,t){return this.visitAllExpressions(e.entries,t),this.visitExpression(e,t)},e.prototype.visitLiteralMapExpr=function(e,t){var n=this;return e.entries.forEach(function(e){return e.value.visitExpression(n,t)}),this.visitExpression(e,t)},e.prototype.visitCommaExpr=function(e,t){return this.visitAllExpressions(e.parts,t),this.visitExpression(e,t)},e.prototype.visitAllExpressions=function(e,t){var n=this;e.forEach(function(e){return e.visitExpression(n,t)})},e.prototype.visitDeclareVarStmt=function(e,t){return e.value&&e.value.visitExpression(this,t),e.type&&e.type.visitType(this,t),e},e.prototype.visitDeclareFunctionStmt=function(e,t){return this.visitAllStatements(e.statements,t),e.type&&e.type.visitType(this,t),e},e.prototype.visitExpressionStmt=function(e,t){return e.expr.visitExpression(this,t),e},e.prototype.visitReturnStmt=function(e,t){return e.value.visitExpression(this,t),e},e.prototype.visitDeclareClassStmt=function(e,t){var n=this;return e.parent.visitExpression(this,t),e.getters.forEach(function(e){return n.visitAllStatements(e.body,t)}),e.constructorMethod&&this.visitAllStatements(e.constructorMethod.body,t),e.methods.forEach(function(e){return n.visitAllStatements(e.body,t)}),e},e.prototype.visitIfStmt=function(e,t){return e.condition.visitExpression(this,t),this.visitAllStatements(e.trueCase,t),this.visitAllStatements(e.falseCase,t),e},e.prototype.visitTryCatchStmt=function(e,t){return this.visitAllStatements(e.bodyStmts,t),this.visitAllStatements(e.catchStmts,t),e},e.prototype.visitThrowStmt=function(e,t){return e.error.visitExpression(this,t),e},e.prototype.visitCommentStmt=function(e,t){return e},e.prototype.visitJSDocCommentStmt=function(e,t){return e},e.prototype.visitAllStatements=function(e,t){var n=this;e.forEach(function(e){return e.visitStatement(n,t)})},e}();function ct(e,t,n){return new xe(e,t,n)}function pt(e,t,n){return void 0===t&&(t=null),new Oe(e,null,t,n)}function ht(e,t,n){return void 0===t&&(t=null),void 0===n&&(n=null),new ce(e,t,n)}function ft(e,t,n){return new qe(e,t,n)}function dt(e,t){return void 0===t&&(t=null),new ze(e.map(function(e){return new Ke(e.key,e.value,e.quoted)}),t,null)}function vt(e,t,n,r,i){return new Ve(e,t,n,r,i)}function mt(e,t,n){return new it(e,t,n)}function yt(e,t,n){return new Me(e,t,n)}function gt(e){var t="";if(e.tagName&&(t+=" @"+e.tagName),e.text){if(e.text.match(/\/\*|\*\//))throw new Error('JSDoc text cannot contain "/*" and "*/"');t+=" "+e.text.replace(/@/g,"\\@")}return t}(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.varNames=new Set,t}o(t,e),t.prototype.visitDeclareFunctionStmt=function(e,t){return e},t.prototype.visitDeclareClassStmt=function(e,t){return e},t.prototype.visitReadVarExpr=function(e,t){return e.name&&this.varNames.add(e.name),null}})(lt),function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.externalReferences=[],t}o(t,e),t.prototype.visitExternalExpr=function(t,n){return this.externalReferences.push(t.value),e.prototype.visitExternalExpr.call(this,t,n)}}(lt),function(e){function t(t){var n=e.call(this)||this;return n.sourceSpan=t,n}o(t,e),t.prototype._clone=function(e){var t=Object.create(e.constructor.prototype);for(var n in e)t[n]=e[n];return t},t.prototype.transformExpr=function(e,t){return e.sourceSpan||((e=this._clone(e)).sourceSpan=this.sourceSpan),e},t.prototype.transformStmt=function(e,t){return e.sourceSpan||((e=this._clone(e)).sourceSpan=this.sourceSpan),e}}(ut);var _t=/-+([a-z0-9])/g;function bt(e,t){return wt(e,":",t)}function wt(e,t,n){var r=e.indexOf(t);return-1==r?n:[e.slice(0,r).trim(),e.slice(r+1).trim()]}function xt(e,t,n){return Array.isArray(e)?t.visitArray(e,n):function r(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Mt}(e)?t.visitStringMap(e,n):null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e?t.visitPrimitive(e,n):t.visitOther(e,n)}function Et(e){return null!=e}function St(e){return void 0===e?null:e}var Ct=function(){function e(){}return e.prototype.visitArray=function(e,t){var n=this;return e.map(function(e){return xt(e,n,t)})},e.prototype.visitStringMap=function(e,t){var n=this,r={};return Object.keys(e).forEach(function(i){r[i]=xt(e[i],n,t)}),r},e.prototype.visitPrimitive=function(e,t){return e},e.prototype.visitOther=function(e,t){return e},e}(),Tt=function(e,t){return Lt(e)?e.then(t):t(e)};function Nt(e){throw new Error("Internal Error: "+e)}function kt(e,t){var n=Error(e);return n[At]=!0,t&&(n[Pt]=t),n}var At="ngSyntaxError",Pt="ngParseErrors";function It(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}var Mt=Object.getPrototypeOf({});function Ot(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r>=55296&&r<=56319&&e.length>n+1){var i=e.charCodeAt(n+1);i>=56320&&i<=57343&&(n++,r=(r-55296<<10)+i-56320+65536)}r<=127?t+=String.fromCharCode(r):r<=2047?t+=String.fromCharCode(r>>6&31|192,63&r|128):r<=65535?t+=String.fromCharCode(r>>12|224,r>>6&63|128,63&r|128):r<=2097151&&(t+=String.fromCharCode(r>>18&7|240,r>>12&63|128,r>>6&63|128,63&r|128))}return t}function Rt(e){if("string"==typeof e)return e;if(e instanceof Array)return"["+e.map(Rt).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return""+e.overriddenName;if(e.name)return""+e.name;var t=e.toString();if(null==t)return""+t;var n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function Dt(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")?e():e}function Lt(e){return!!e&&"function"==typeof e.then}var Ft=function Ft(e){this.full=e;var t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")},jt="undefined"!=typeof window&&window,Vt="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Bt="undefined"!=typeof global&&global||jt||Vt,Ht={},Ut=function(e){function t(t){var n=e.call(this,t.type)||this;return n.resolved=t,n.original=t,n}return o(t,e),t.prototype.visitExpression=function(e,t){return t===Ht?this.original.visitExpression(e,t):this.resolved.visitExpression(e,t)},t.prototype.isEquivalent=function(e){return e instanceof t&&this.resolved.isEquivalent(e.resolved)},t.prototype.isConstant=function(){return!0},t.prototype.fixup=function(e){this.resolved=e,this.shared=!0},t}(be),qt=function(){function e(){this.statements=[],this.literals=new Map,this.literalFactories=new Map,this.injectorDefinitions=new Map,this.directiveDefinitions=new Map,this.componentDefinitions=new Map,this.pipeDefinitions=new Map,this.nextNameIndex=0}return e.prototype.getConstLiteral=function(e,t){if(e instanceof Me||e instanceof Ut)return e;var n=this.keyOf(e),r=this.literals.get(n),i=!1;if(r||(r=new Ut(e),this.literals.set(n,r),i=!0),!i&&!r.shared||i&&t){var o=this.freshName();this.statements.push(ct(o).set(e).toDeclStmt(fe,[ke.Final])),r.fixup(ct(o))}return r},e.prototype.getDefinition=function(e,t,n,r){void 0===r&&(r=!1);var i=this.definitionsOf(t),o=i.get(e),s=!1;if(!o){var a=this.propertyNameOf(t);o=new Ut(n.importExpr(e).prop(a)),i.set(e,o),s=!0}if(!s&&!o.shared||s&&r){var u=this.freshName();this.statements.push(ct(u).set(o.resolved).toDeclStmt(fe,[ke.Final])),o.fixup(ct(u))}return o},e.prototype.getLiteralFactory=function(e){if(e instanceof qe){var t=e.entries.map(function(e){return e.isConstant()?e:yt(null)}),n=this.keyOf(ft(t));return this._getLiteralFactory(n,e.entries,function(e){return ft(e)})}var r=dt(e.entries.map(function(e){return{key:e.key,value:e.value.isConstant()?e.value:yt(null),quoted:e.quoted}}));return n=this.keyOf(r),this._getLiteralFactory(n,e.entries.map(function(e){return e.value}),function(t){return dt(t.map(function(t,n){return{key:e.entries[n].key,value:t,quoted:e.entries[n].quoted}}))})},e.prototype._getLiteralFactory=function(e,t,n){var r=this,i=this.literalFactories.get(e),o=t.filter(function(e){return!e.isConstant()});if(!i){var s=t.map(function(e,t){return e.isConstant()?r.getConstLiteral(e,!0):ct("a"+t)}),a=vt(s.filter(Wt).map(function(e){return new je(e.name,he)}),[new Je(n(s))],fe),u=this.freshName();this.statements.push(ct(u).set(a).toDeclStmt(fe,[ke.Final])),i=ct(u),this.literalFactories.set(e,i)}return{literalFactory:i,literalFactoryArguments:o}},e.prototype.uniqueName=function(e){return""+e+this.nextNameIndex++},e.prototype.definitionsOf=function(e){switch(e){case 2:return this.componentDefinitions;case 1:return this.directiveDefinitions;case 0:return this.injectorDefinitions;case 3:return this.pipeDefinitions}return Nt("Unknown definition kind "+e),this.componentDefinitions},e.prototype.propertyNameOf=function(e){switch(e){case 2:return"ngComponentDef";case 1:return"ngDirectiveDef";case 0:return"ngInjectorDef";case 3:return"ngPipeDef"}return Nt("Unknown definition kind "+e),"<unknown>"},e.prototype.freshName=function(){return this.uniqueName("_c")},e.prototype.keyOf=function(e){return e.visitExpression(new Kt,Ht)},e}(),Kt=function(){function e(){this.visitWrappedNodeExpr=zt,this.visitWriteVarExpr=zt,this.visitWriteKeyExpr=zt,this.visitWritePropExpr=zt,this.visitInvokeMethodExpr=zt,this.visitInvokeFunctionExpr=zt,this.visitInstantiateExpr=zt,this.visitConditionalExpr=zt,this.visitNotExpr=zt,this.visitAssertNotNullExpr=zt,this.visitCastExpr=zt,this.visitFunctionExpr=zt,this.visitBinaryOperatorExpr=zt,this.visitReadPropExpr=zt,this.visitReadKeyExpr=zt,this.visitCommaExpr=zt}return e.prototype.visitLiteralExpr=function(e){return""+("string"==typeof e.value?'"'+e.value+'"':e.value)},e.prototype.visitLiteralArrayExpr=function(e,t){var n=this;return"["+e.entries.map(function(e){return e.visitExpression(n,t)}).join(",")+"]"},e.prototype.visitLiteralMapExpr=function(e,t){var n=this;return"{"+e.entries.map(function(e){return function(e){var t=e.quoted?'"':"";return""+t+e.key+t}(e)+":"+e.value.visitExpression(n,t)}).join(",")},e.prototype.visitExternalExpr=function(e){return e.value.moduleName?"EX:"+e.value.moduleName+":"+e.value.name:"EX:"+e.value.runtime.name},e.prototype.visitReadVarExpr=function(e){return"VAR:"+e.name},e.prototype.visitTypeofExpr=function(e,t){return"TYPEOF:"+e.expr.visitExpression(this,t)},e}();function zt(e){throw new Error("Invalid state: Visitor "+this.constructor.name+" doesn't handle "+e.constructor.name)}function Wt(e){return e instanceof xe}
|
|
42
|
+
*/(this.tags)},t}(Ge)),st=function(e){function t(t,n,r){var i=e.call(this,null,r)||this;return i.bodyStmts=t,i.catchStmts=n,i}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&ge(this.bodyStmts,e.bodyStmts)&&ge(this.catchStmts,e.catchStmts)},t.prototype.visitStatement=function(e,t){return e.visitTryCatchStmt(this,t)},t}(Ge),at=function(e){function t(t,n){var r=e.call(this,null,n)||this;return r.error=t,r}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof st&&this.error.isEquivalent(e.error)},t.prototype.visitStatement=function(e,t){return e.visitThrowStmt(this,t)},t}(Ge),ut=function(){function e(){}return e.prototype.transformExpr=function(e,t){return e},e.prototype.transformStmt=function(e,t){return e},e.prototype.visitReadVarExpr=function(e,t){return this.transformExpr(e,t)},e.prototype.visitWrappedNodeExpr=function(e,t){return this.transformExpr(e,t)},e.prototype.visitTypeofExpr=function(e,t){return this.transformExpr(new Ee(e.expr.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitWriteVarExpr=function(e,t){return this.transformExpr(new Ce(e.name,e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitWriteKeyExpr=function(e,t){return this.transformExpr(new Te(e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitWritePropExpr=function(e,t){return this.transformExpr(new Ne(e.receiver.visitExpression(this,t),e.name,e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitInvokeMethodExpr=function(e,t){var n=e.builtin||e.name;return this.transformExpr(new Ae(e.receiver.visitExpression(this,t),n,this.visitAllExpressions(e.args,t),e.type,e.sourceSpan),t)},e.prototype.visitInvokeFunctionExpr=function(e,t){return this.transformExpr(new Pe(e.fn.visitExpression(this,t),this.visitAllExpressions(e.args,t),e.type,e.sourceSpan),t)},e.prototype.visitInstantiateExpr=function(e,t){return this.transformExpr(new Ie(e.classExpr.visitExpression(this,t),this.visitAllExpressions(e.args,t),e.type,e.sourceSpan),t)},e.prototype.visitLiteralExpr=function(e,t){return this.transformExpr(e,t)},e.prototype.visitExternalExpr=function(e,t){return this.transformExpr(e,t)},e.prototype.visitConditionalExpr=function(e,t){return this.transformExpr(new Re(e.condition.visitExpression(this,t),e.trueCase.visitExpression(this,t),e.falseCase.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitNotExpr=function(e,t){return this.transformExpr(new De(e.condition.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitAssertNotNullExpr=function(e,t){return this.transformExpr(new Le(e.condition.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitCastExpr=function(e,t){return this.transformExpr(new Fe(e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitFunctionExpr=function(e,t){return this.transformExpr(new Ve(e.params,this.visitAllStatements(e.statements,t),e.type,e.sourceSpan),t)},e.prototype.visitBinaryOperatorExpr=function(e,t){return this.transformExpr(new Be(e.operator,e.lhs.visitExpression(this,t),e.rhs.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitReadPropExpr=function(e,t){return this.transformExpr(new He(e.receiver.visitExpression(this,t),e.name,e.type,e.sourceSpan),t)},e.prototype.visitReadKeyExpr=function(e,t){return this.transformExpr(new Ue(e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitLiteralArrayExpr=function(e,t){return this.transformExpr(new qe(this.visitAllExpressions(e.entries,t),e.type,e.sourceSpan),t)},e.prototype.visitLiteralMapExpr=function(e,t){var n=this,r=e.entries.map(function(e){return new Ke(e.key,e.value.visitExpression(n,t),e.quoted)}),i=new pe(e.valueType,null);return this.transformExpr(new ze(r,i,e.sourceSpan),t)},e.prototype.visitCommaExpr=function(e,t){return this.transformExpr(new We(this.visitAllExpressions(e.parts,t),e.sourceSpan),t)},e.prototype.visitAllExpressions=function(e,t){var n=this;return e.map(function(e){return e.visitExpression(n,t)})},e.prototype.visitDeclareVarStmt=function(e,t){var n=e.value&&e.value.visitExpression(this,t);return this.transformStmt(new Xe(e.name,n,e.type,e.modifiers,e.sourceSpan),t)},e.prototype.visitDeclareFunctionStmt=function(e,t){return this.transformStmt(new Ye(e.name,e.params,this.visitAllStatements(e.statements,t),e.type,e.modifiers,e.sourceSpan),t)},e.prototype.visitExpressionStmt=function(e,t){return this.transformStmt(new Ze(e.expr.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitReturnStmt=function(e,t){return this.transformStmt(new Je(e.value.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitDeclareClassStmt=function(e,t){var n=this,r=e.parent.visitExpression(this,t),i=e.getters.map(function(e){return new nt(e.name,n.visitAllStatements(e.body,t),e.type,e.modifiers)}),o=e.constructorMethod&&new tt(e.constructorMethod.name,e.constructorMethod.params,this.visitAllStatements(e.constructorMethod.body,t),e.constructorMethod.type,e.constructorMethod.modifiers),s=e.methods.map(function(e){return new tt(e.name,e.params,n.visitAllStatements(e.body,t),e.type,e.modifiers)});return this.transformStmt(new rt(e.name,r,e.fields,i,o,s,e.modifiers,e.sourceSpan),t)},e.prototype.visitIfStmt=function(e,t){return this.transformStmt(new it(e.condition.visitExpression(this,t),this.visitAllStatements(e.trueCase,t),this.visitAllStatements(e.falseCase,t),e.sourceSpan),t)},e.prototype.visitTryCatchStmt=function(e,t){return this.transformStmt(new st(this.visitAllStatements(e.bodyStmts,t),this.visitAllStatements(e.catchStmts,t),e.sourceSpan),t)},e.prototype.visitThrowStmt=function(e,t){return this.transformStmt(new at(e.error.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitCommentStmt=function(e,t){return this.transformStmt(e,t)},e.prototype.visitJSDocCommentStmt=function(e,t){return this.transformStmt(e,t)},e.prototype.visitAllStatements=function(e,t){var n=this;return e.map(function(e){return e.visitStatement(n,t)})},e}(),lt=function(){function e(){}return e.prototype.visitType=function(e,t){return e},e.prototype.visitExpression=function(e,t){return e.type&&e.type.visitType(this,t),e},e.prototype.visitBuiltinType=function(e,t){return this.visitType(e,t)},e.prototype.visitExpressionType=function(e,t){var n=this;return e.value.visitExpression(this,t),null!==e.typeParams&&e.typeParams.forEach(function(e){return n.visitType(e,t)}),this.visitType(e,t)},e.prototype.visitArrayType=function(e,t){return this.visitType(e,t)},e.prototype.visitMapType=function(e,t){return this.visitType(e,t)},e.prototype.visitWrappedNodeExpr=function(e,t){return e},e.prototype.visitTypeofExpr=function(e,t){return this.visitExpression(e,t)},e.prototype.visitReadVarExpr=function(e,t){return this.visitExpression(e,t)},e.prototype.visitWriteVarExpr=function(e,t){return e.value.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitWriteKeyExpr=function(e,t){return e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.value.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitWritePropExpr=function(e,t){return e.receiver.visitExpression(this,t),e.value.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitInvokeMethodExpr=function(e,t){return e.receiver.visitExpression(this,t),this.visitAllExpressions(e.args,t),this.visitExpression(e,t)},e.prototype.visitInvokeFunctionExpr=function(e,t){return e.fn.visitExpression(this,t),this.visitAllExpressions(e.args,t),this.visitExpression(e,t)},e.prototype.visitInstantiateExpr=function(e,t){return e.classExpr.visitExpression(this,t),this.visitAllExpressions(e.args,t),this.visitExpression(e,t)},e.prototype.visitLiteralExpr=function(e,t){return this.visitExpression(e,t)},e.prototype.visitExternalExpr=function(e,t){var n=this;return e.typeParams&&e.typeParams.forEach(function(e){return e.visitType(n,t)}),this.visitExpression(e,t)},e.prototype.visitConditionalExpr=function(e,t){return e.condition.visitExpression(this,t),e.trueCase.visitExpression(this,t),e.falseCase.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitNotExpr=function(e,t){return e.condition.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitAssertNotNullExpr=function(e,t){return e.condition.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitCastExpr=function(e,t){return e.value.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitFunctionExpr=function(e,t){return this.visitAllStatements(e.statements,t),this.visitExpression(e,t)},e.prototype.visitBinaryOperatorExpr=function(e,t){return e.lhs.visitExpression(this,t),e.rhs.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitReadPropExpr=function(e,t){return e.receiver.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitReadKeyExpr=function(e,t){return e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitLiteralArrayExpr=function(e,t){return this.visitAllExpressions(e.entries,t),this.visitExpression(e,t)},e.prototype.visitLiteralMapExpr=function(e,t){var n=this;return e.entries.forEach(function(e){return e.value.visitExpression(n,t)}),this.visitExpression(e,t)},e.prototype.visitCommaExpr=function(e,t){return this.visitAllExpressions(e.parts,t),this.visitExpression(e,t)},e.prototype.visitAllExpressions=function(e,t){var n=this;e.forEach(function(e){return e.visitExpression(n,t)})},e.prototype.visitDeclareVarStmt=function(e,t){return e.value&&e.value.visitExpression(this,t),e.type&&e.type.visitType(this,t),e},e.prototype.visitDeclareFunctionStmt=function(e,t){return this.visitAllStatements(e.statements,t),e.type&&e.type.visitType(this,t),e},e.prototype.visitExpressionStmt=function(e,t){return e.expr.visitExpression(this,t),e},e.prototype.visitReturnStmt=function(e,t){return e.value.visitExpression(this,t),e},e.prototype.visitDeclareClassStmt=function(e,t){var n=this;return e.parent.visitExpression(this,t),e.getters.forEach(function(e){return n.visitAllStatements(e.body,t)}),e.constructorMethod&&this.visitAllStatements(e.constructorMethod.body,t),e.methods.forEach(function(e){return n.visitAllStatements(e.body,t)}),e},e.prototype.visitIfStmt=function(e,t){return e.condition.visitExpression(this,t),this.visitAllStatements(e.trueCase,t),this.visitAllStatements(e.falseCase,t),e},e.prototype.visitTryCatchStmt=function(e,t){return this.visitAllStatements(e.bodyStmts,t),this.visitAllStatements(e.catchStmts,t),e},e.prototype.visitThrowStmt=function(e,t){return e.error.visitExpression(this,t),e},e.prototype.visitCommentStmt=function(e,t){return e},e.prototype.visitJSDocCommentStmt=function(e,t){return e},e.prototype.visitAllStatements=function(e,t){var n=this;e.forEach(function(e){return e.visitStatement(n,t)})},e}();function ct(e,t,n){return new xe(e,t,n)}function pt(e,t,n){return void 0===t&&(t=null),new Oe(e,null,t,n)}function ht(e,t,n){return void 0===t&&(t=null),void 0===n&&(n=null),new ce(e,t,n)}function ft(e,t,n){return new qe(e,t,n)}function dt(e,t){return void 0===t&&(t=null),new ze(e.map(function(e){return new Ke(e.key,e.value,e.quoted)}),t,null)}function vt(e,t,n,r,i){return new Ve(e,t,n,r,i)}function mt(e,t,n){return new it(e,t,n)}function yt(e,t,n){return new Me(e,t,n)}function gt(e){var t="";if(e.tagName&&(t+=" @"+e.tagName),e.text){if(e.text.match(/\/\*|\*\//))throw new Error('JSDoc text cannot contain "/*" and "*/"');t+=" "+e.text.replace(/@/g,"\\@")}return t}(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.varNames=new Set,t}o(t,e),t.prototype.visitDeclareFunctionStmt=function(e,t){return e},t.prototype.visitDeclareClassStmt=function(e,t){return e},t.prototype.visitReadVarExpr=function(e,t){return e.name&&this.varNames.add(e.name),null}})(lt),function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.externalReferences=[],t}o(t,e),t.prototype.visitExternalExpr=function(t,n){return this.externalReferences.push(t.value),e.prototype.visitExternalExpr.call(this,t,n)}}(lt),function(e){function t(t){var n=e.call(this)||this;return n.sourceSpan=t,n}o(t,e),t.prototype._clone=function(e){var t=Object.create(e.constructor.prototype);for(var n in e)t[n]=e[n];return t},t.prototype.transformExpr=function(e,t){return e.sourceSpan||((e=this._clone(e)).sourceSpan=this.sourceSpan),e},t.prototype.transformStmt=function(e,t){return e.sourceSpan||((e=this._clone(e)).sourceSpan=this.sourceSpan),e}}(ut);var _t=/-+([a-z0-9])/g;function bt(e,t){return wt(e,":",t)}function wt(e,t,n){var r=e.indexOf(t);return-1==r?n:[e.slice(0,r).trim(),e.slice(r+1).trim()]}function xt(e,t,n){return Array.isArray(e)?t.visitArray(e,n):function r(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Mt}(e)?t.visitStringMap(e,n):null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e?t.visitPrimitive(e,n):t.visitOther(e,n)}function Et(e){return null!=e}function St(e){return void 0===e?null:e}var Ct=function(){function e(){}return e.prototype.visitArray=function(e,t){var n=this;return e.map(function(e){return xt(e,n,t)})},e.prototype.visitStringMap=function(e,t){var n=this,r={};return Object.keys(e).forEach(function(i){r[i]=xt(e[i],n,t)}),r},e.prototype.visitPrimitive=function(e,t){return e},e.prototype.visitOther=function(e,t){return e},e}(),Tt=function(e,t){return Lt(e)?e.then(t):t(e)};function Nt(e){throw new Error("Internal Error: "+e)}function kt(e,t){var n=Error(e);return n[At]=!0,t&&(n[Pt]=t),n}var At="ngSyntaxError",Pt="ngParseErrors";function It(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}var Mt=Object.getPrototypeOf({});function Ot(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r>=55296&&r<=56319&&e.length>n+1){var i=e.charCodeAt(n+1);i>=56320&&i<=57343&&(n++,r=(r-55296<<10)+i-56320+65536)}r<=127?t+=String.fromCharCode(r):r<=2047?t+=String.fromCharCode(r>>6&31|192,63&r|128):r<=65535?t+=String.fromCharCode(r>>12|224,r>>6&63|128,63&r|128):r<=2097151&&(t+=String.fromCharCode(r>>18&7|240,r>>12&63|128,r>>6&63|128,63&r|128))}return t}function Rt(e){if("string"==typeof e)return e;if(e instanceof Array)return"["+e.map(Rt).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return""+e.overriddenName;if(e.name)return""+e.name;if(!e.toString)return"object";var t=e.toString();if(null==t)return""+t;var n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function Dt(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")?e():e}function Lt(e){return!!e&&"function"==typeof e.then}var Ft=function Ft(e){this.full=e;var t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")},jt="undefined"!=typeof window&&window,Vt="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Bt="undefined"!=typeof global&&global||jt||Vt,Ht={},Ut=function(e){function t(t){var n=e.call(this,t.type)||this;return n.resolved=t,n.original=t,n}return o(t,e),t.prototype.visitExpression=function(e,t){return t===Ht?this.original.visitExpression(e,t):this.resolved.visitExpression(e,t)},t.prototype.isEquivalent=function(e){return e instanceof t&&this.resolved.isEquivalent(e.resolved)},t.prototype.isConstant=function(){return!0},t.prototype.fixup=function(e){this.resolved=e,this.shared=!0},t}(be),qt=function(){function e(){this.statements=[],this.literals=new Map,this.literalFactories=new Map,this.injectorDefinitions=new Map,this.directiveDefinitions=new Map,this.componentDefinitions=new Map,this.pipeDefinitions=new Map,this.nextNameIndex=0}return e.prototype.getConstLiteral=function(e,t){if(e instanceof Me||e instanceof Ut)return e;var n=this.keyOf(e),r=this.literals.get(n),i=!1;if(r||(r=new Ut(e),this.literals.set(n,r),i=!0),!i&&!r.shared||i&&t){var o=this.freshName();this.statements.push(ct(o).set(e).toDeclStmt(fe,[ke.Final])),r.fixup(ct(o))}return r},e.prototype.getDefinition=function(e,t,n,r){void 0===r&&(r=!1);var i=this.definitionsOf(t),o=i.get(e),s=!1;if(!o){var a=this.propertyNameOf(t);o=new Ut(n.importExpr(e).prop(a)),i.set(e,o),s=!0}if(!s&&!o.shared||s&&r){var u=this.freshName();this.statements.push(ct(u).set(o.resolved).toDeclStmt(fe,[ke.Final])),o.fixup(ct(u))}return o},e.prototype.getLiteralFactory=function(e){if(e instanceof qe){var t=e.entries.map(function(e){return e.isConstant()?e:yt(null)}),n=this.keyOf(ft(t));return this._getLiteralFactory(n,e.entries,function(e){return ft(e)})}var r=dt(e.entries.map(function(e){return{key:e.key,value:e.value.isConstant()?e.value:yt(null),quoted:e.quoted}}));return n=this.keyOf(r),this._getLiteralFactory(n,e.entries.map(function(e){return e.value}),function(t){return dt(t.map(function(t,n){return{key:e.entries[n].key,value:t,quoted:e.entries[n].quoted}}))})},e.prototype._getLiteralFactory=function(e,t,n){var r=this,i=this.literalFactories.get(e),o=t.filter(function(e){return!e.isConstant()});if(!i){var s=t.map(function(e,t){return e.isConstant()?r.getConstLiteral(e,!0):ct("a"+t)}),a=vt(s.filter(Wt).map(function(e){return new je(e.name,he)}),[new Je(n(s))],fe),u=this.freshName();this.statements.push(ct(u).set(a).toDeclStmt(fe,[ke.Final])),i=ct(u),this.literalFactories.set(e,i)}return{literalFactory:i,literalFactoryArguments:o}},e.prototype.uniqueName=function(e){return""+e+this.nextNameIndex++},e.prototype.definitionsOf=function(e){switch(e){case 2:return this.componentDefinitions;case 1:return this.directiveDefinitions;case 0:return this.injectorDefinitions;case 3:return this.pipeDefinitions}return Nt("Unknown definition kind "+e),this.componentDefinitions},e.prototype.propertyNameOf=function(e){switch(e){case 2:return"ngComponentDef";case 1:return"ngDirectiveDef";case 0:return"ngInjectorDef";case 3:return"ngPipeDef"}return Nt("Unknown definition kind "+e),"<unknown>"},e.prototype.freshName=function(){return this.uniqueName("_c")},e.prototype.keyOf=function(e){return e.visitExpression(new Kt,Ht)},e}(),Kt=function(){function e(){this.visitWrappedNodeExpr=zt,this.visitWriteVarExpr=zt,this.visitWriteKeyExpr=zt,this.visitWritePropExpr=zt,this.visitInvokeMethodExpr=zt,this.visitInvokeFunctionExpr=zt,this.visitInstantiateExpr=zt,this.visitConditionalExpr=zt,this.visitNotExpr=zt,this.visitAssertNotNullExpr=zt,this.visitCastExpr=zt,this.visitFunctionExpr=zt,this.visitBinaryOperatorExpr=zt,this.visitReadPropExpr=zt,this.visitReadKeyExpr=zt,this.visitCommaExpr=zt}return e.prototype.visitLiteralExpr=function(e){return""+("string"==typeof e.value?'"'+e.value+'"':e.value)},e.prototype.visitLiteralArrayExpr=function(e,t){var n=this;return"["+e.entries.map(function(e){return e.visitExpression(n,t)}).join(",")+"]"},e.prototype.visitLiteralMapExpr=function(e,t){var n=this;return"{"+e.entries.map(function(e){return function(e){var t=e.quoted?'"':"";return""+t+e.key+t}(e)+":"+e.value.visitExpression(n,t)}).join(",")},e.prototype.visitExternalExpr=function(e){return e.value.moduleName?"EX:"+e.value.moduleName+":"+e.value.name:"EX:"+e.value.runtime.name},e.prototype.visitReadVarExpr=function(e){return"VAR:"+e.name},e.prototype.visitTypeofExpr=function(e,t){return"TYPEOF:"+e.expr.visitExpression(this,t)},e}();function zt(e){throw new Error("Invalid state: Visitor "+this.constructor.name+" doesn't handle "+e.constructor.name)}function Wt(e){return e instanceof xe}
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -61,72 +61,72 @@ var x,E,S=function(){function e(e){var t=this,n=void 0===e?{}:e,r=n.closedByChil
|
|
|
61
61
|
* Use of this source code is governed by an MIT-style license that can be
|
|
62
62
|
* found in the LICENSE file at https://angular.io/license
|
|
63
63
|
*/
|
|
64
|
-
var mn="@angular/core",yn=function(){function e(){}return e.NEW_METHOD="factory",e.TRANSFORM_METHOD="transform",e.PATCH_DEPS="patchedDeps",e.namespaceHTML={name:"ɵɵnamespaceHTML",moduleName:mn},e.namespaceMathML={name:"ɵɵnamespaceMathML",moduleName:mn},e.namespaceSVG={name:"ɵɵnamespaceSVG",moduleName:mn},e.element={name:"ɵɵelement",moduleName:mn},e.elementStart={name:"ɵɵelementStart",moduleName:mn},e.elementEnd={name:"ɵɵelementEnd",moduleName:mn},e.select={name:"ɵɵselect",moduleName:mn},e.updateSyntheticHostBinding={name:"ɵɵupdateSyntheticHostBinding",moduleName:mn},e.componentHostSyntheticListener={name:"ɵɵcomponentHostSyntheticListener",moduleName:mn},e.attribute={name:"ɵɵattribute",moduleName:mn},e.attributeInterpolate1={name:"ɵɵattributeInterpolate1",moduleName:mn},e.attributeInterpolate2={name:"ɵɵattributeInterpolate2",moduleName:mn},e.attributeInterpolate3={name:"ɵɵattributeInterpolate3",moduleName:mn},e.attributeInterpolate4={name:"ɵɵattributeInterpolate4",moduleName:mn},e.attributeInterpolate5={name:"ɵɵattributeInterpolate5",moduleName:mn},e.attributeInterpolate6={name:"ɵɵattributeInterpolate6",moduleName:mn},e.attributeInterpolate7={name:"ɵɵattributeInterpolate7",moduleName:mn},e.attributeInterpolate8={name:"ɵɵattributeInterpolate8",moduleName:mn},e.attributeInterpolateV={name:"ɵɵattributeInterpolateV",moduleName:mn},e.classProp={name:"ɵɵclassProp",moduleName:mn},e.elementContainerStart={name:"ɵɵelementContainerStart",moduleName:mn},e.elementContainerEnd={name:"ɵɵelementContainerEnd",moduleName:mn},e.styling={name:"ɵɵstyling",moduleName:mn},e.styleMap={name:"ɵɵstyleMap",moduleName:mn},e.classMap={name:"ɵɵclassMap",moduleName:mn},e.styleProp={name:"ɵɵstyleProp",moduleName:mn},e.stylingApply={name:"ɵɵstylingApply",moduleName:mn},e.styleSanitizer={name:"ɵɵstyleSanitizer",moduleName:mn},e.elementHostAttrs={name:"ɵɵelementHostAttrs",moduleName:mn},e.containerCreate={name:"ɵɵcontainer",moduleName:mn},e.nextContext={name:"ɵɵnextContext",moduleName:mn},e.templateCreate={name:"ɵɵtemplate",moduleName:mn},e.text={name:"ɵɵtext",moduleName:mn},e.textBinding={name:"ɵɵtextBinding",moduleName:mn},e.bind={name:"ɵɵbind",moduleName:mn},e.enableBindings={name:"ɵɵenableBindings",moduleName:mn},e.disableBindings={name:"ɵɵdisableBindings",moduleName:mn},e.allocHostVars={name:"ɵɵallocHostVars",moduleName:mn},e.getCurrentView={name:"ɵɵgetCurrentView",moduleName:mn},e.textInterpolate={name:"ɵɵtextInterpolate",moduleName:mn},e.textInterpolate1={name:"ɵɵtextInterpolate1",moduleName:mn},e.textInterpolate2={name:"ɵɵtextInterpolate2",moduleName:mn},e.textInterpolate3={name:"ɵɵtextInterpolate3",moduleName:mn},e.textInterpolate4={name:"ɵɵtextInterpolate4",moduleName:mn},e.textInterpolate5={name:"ɵɵtextInterpolate5",moduleName:mn},e.textInterpolate6={name:"ɵɵtextInterpolate6",moduleName:mn},e.textInterpolate7={name:"ɵɵtextInterpolate7",moduleName:mn},e.textInterpolate8={name:"ɵɵtextInterpolate8",moduleName:mn},e.textInterpolateV={name:"ɵɵtextInterpolateV",moduleName:mn},e.restoreView={name:"ɵɵrestoreView",moduleName:mn},e.interpolation1={name:"ɵɵinterpolation1",moduleName:mn},e.interpolation2={name:"ɵɵinterpolation2",moduleName:mn},e.interpolation3={name:"ɵɵinterpolation3",moduleName:mn},e.interpolation4={name:"ɵɵinterpolation4",moduleName:mn},e.interpolation5={name:"ɵɵinterpolation5",moduleName:mn},e.interpolation6={name:"ɵɵinterpolation6",moduleName:mn},e.interpolation7={name:"ɵɵinterpolation7",moduleName:mn},e.interpolation8={name:"ɵɵinterpolation8",moduleName:mn},e.interpolationV={name:"ɵɵinterpolationV",moduleName:mn},e.pureFunction0={name:"ɵɵpureFunction0",moduleName:mn},e.pureFunction1={name:"ɵɵpureFunction1",moduleName:mn},e.pureFunction2={name:"ɵɵpureFunction2",moduleName:mn},e.pureFunction3={name:"ɵɵpureFunction3",moduleName:mn},e.pureFunction4={name:"ɵɵpureFunction4",moduleName:mn},e.pureFunction5={name:"ɵɵpureFunction5",moduleName:mn},e.pureFunction6={name:"ɵɵpureFunction6",moduleName:mn},e.pureFunction7={name:"ɵɵpureFunction7",moduleName:mn},e.pureFunction8={name:"ɵɵpureFunction8",moduleName:mn},e.pureFunctionV={name:"ɵɵpureFunctionV",moduleName:mn},e.pipeBind1={name:"ɵɵpipeBind1",moduleName:mn},e.pipeBind2={name:"ɵɵpipeBind2",moduleName:mn},e.pipeBind3={name:"ɵɵpipeBind3",moduleName:mn},e.pipeBind4={name:"ɵɵpipeBind4",moduleName:mn},e.pipeBindV={name:"ɵɵpipeBindV",moduleName:mn},e.property={name:"ɵɵproperty",moduleName:mn},e.propertyInterpolate={name:"ɵɵpropertyInterpolate",moduleName:mn},e.propertyInterpolate1={name:"ɵɵpropertyInterpolate1",moduleName:mn},e.propertyInterpolate2={name:"ɵɵpropertyInterpolate2",moduleName:mn},e.propertyInterpolate3={name:"ɵɵpropertyInterpolate3",moduleName:mn},e.propertyInterpolate4={name:"ɵɵpropertyInterpolate4",moduleName:mn},e.propertyInterpolate5={name:"ɵɵpropertyInterpolate5",moduleName:mn},e.propertyInterpolate6={name:"ɵɵpropertyInterpolate6",moduleName:mn},e.propertyInterpolate7={name:"ɵɵpropertyInterpolate7",moduleName:mn},e.propertyInterpolate8={name:"ɵɵpropertyInterpolate8",moduleName:mn},e.propertyInterpolateV={name:"ɵɵpropertyInterpolateV",moduleName:mn},e.i18n={name:"ɵɵi18n",moduleName:mn},e.i18nAttributes={name:"ɵɵi18nAttributes",moduleName:mn},e.i18nExp={name:"ɵɵi18nExp",moduleName:mn},e.i18nStart={name:"ɵɵi18nStart",moduleName:mn},e.i18nEnd={name:"ɵɵi18nEnd",moduleName:mn},e.i18nApply={name:"ɵɵi18nApply",moduleName:mn},e.i18nPostprocess={name:"ɵɵi18nPostprocess",moduleName:mn},e.i18nLocalize={name:"ɵɵi18nLocalize",moduleName:mn},e.load={name:"ɵɵload",moduleName:mn},e.pipe={name:"ɵɵpipe",moduleName:mn},e.projection={name:"ɵɵprojection",moduleName:mn},e.projectionDef={name:"ɵɵprojectionDef",moduleName:mn},e.reference={name:"ɵɵreference",moduleName:mn},e.inject={name:"ɵɵinject",moduleName:mn},e.injectAttribute={name:"ɵɵinjectAttribute",moduleName:mn},e.directiveInject={name:"ɵɵdirectiveInject",moduleName:mn},e.templateRefExtractor={name:"ɵɵtemplateRefExtractor",moduleName:mn},e.resolveWindow={name:"ɵɵresolveWindow",moduleName:mn},e.resolveDocument={name:"ɵɵresolveDocument",moduleName:mn},e.resolveBody={name:"ɵɵresolveBody",moduleName:mn},e.defineBase={name:"ɵɵdefineBase",moduleName:mn},e.BaseDef={name:"ɵɵBaseDef",moduleName:mn},e.defineComponent={name:"ɵɵdefineComponent",moduleName:mn},e.setComponentScope={name:"ɵɵsetComponentScope",moduleName:mn},e.ComponentDefWithMeta={name:"ɵɵComponentDefWithMeta",moduleName:mn},e.defineDirective={name:"ɵɵdefineDirective",moduleName:mn},e.DirectiveDefWithMeta={name:"ɵɵDirectiveDefWithMeta",moduleName:mn},e.InjectorDef={name:"ɵɵInjectorDef",moduleName:mn},e.defineInjector={name:"ɵɵdefineInjector",moduleName:mn},e.NgModuleDefWithMeta={name:"ɵɵNgModuleDefWithMeta",moduleName:mn},e.defineNgModule={name:"ɵɵdefineNgModule",moduleName:mn},e.setNgModuleScope={name:"ɵɵsetNgModuleScope",moduleName:mn},e.PipeDefWithMeta={name:"ɵɵPipeDefWithMeta",moduleName:mn},e.definePipe={name:"ɵɵdefinePipe",moduleName:mn},e.queryRefresh={name:"ɵɵqueryRefresh",moduleName:mn},e.viewQuery={name:"ɵɵviewQuery",moduleName:mn},e.staticViewQuery={name:"ɵɵstaticViewQuery",moduleName:mn},e.staticContentQuery={name:"ɵɵstaticContentQuery",moduleName:mn},e.loadViewQuery={name:"ɵɵloadViewQuery",moduleName:mn},e.contentQuery={name:"ɵɵcontentQuery",moduleName:mn},e.loadContentQuery={name:"ɵɵloadContentQuery",moduleName:mn},e.NgOnChangesFeature={name:"ɵɵNgOnChangesFeature",moduleName:mn},e.InheritDefinitionFeature={name:"ɵɵInheritDefinitionFeature",moduleName:mn},e.ProvidersFeature={name:"ɵɵProvidersFeature",moduleName:mn},e.listener={name:"ɵɵlistener",moduleName:mn},e.getFactoryOf={name:"ɵɵgetFactoryOf",moduleName:mn},e.getInheritedFactory={name:"ɵɵgetInheritedFactory",moduleName:mn},e.sanitizeHtml={name:"ɵɵsanitizeHtml",moduleName:mn},e.sanitizeStyle={name:"ɵɵsanitizeStyle",moduleName:mn},e.defaultStyleSanitizer={name:"ɵɵdefaultStyleSanitizer",moduleName:mn},e.sanitizeResourceUrl={name:"ɵɵsanitizeResourceUrl",moduleName:mn},e.sanitizeScript={name:"ɵɵsanitizeScript",moduleName:mn},e.sanitizeUrl={name:"ɵɵsanitizeUrl",moduleName:mn},e.sanitizeUrlOrResourceUrl={name:"ɵɵsanitizeUrlOrResourceUrl",moduleName:mn},e}(),gn=function(){function e(e,t){this.value=e,this.sourceSpan=t}return e.prototype.visit=function(e){return e.visitText(this)},e}(),_n=function(){function e(e,t,n){this.value=e,this.sourceSpan=t,this.i18n=n}return e.prototype.visit=function(e){return e.visitBoundText(this)},e}(),bn=function(){function e(e,t,n,r,i){this.name=e,this.value=t,this.sourceSpan=n,this.valueSpan=r,this.i18n=i}return e.prototype.visit=function(e){return e.visitTextAttribute(this)},e}(),wn=function(){function e(e,t,n,r,i,o,s){this.name=e,this.type=t,this.securityContext=n,this.value=r,this.unit=i,this.sourceSpan=o,this.i18n=s}return e.fromBoundElementProperty=function(t,n){return new e(t.name,t.type,t.securityContext,t.value,t.unit,t.sourceSpan,n)},e.prototype.visit=function(e){return e.visitBoundAttribute(this)},e}(),xn=function(){function e(e,t,n,r,i,o,s){this.name=e,this.type=t,this.handler=n,this.target=r,this.phase=i,this.sourceSpan=o,this.handlerSpan=s}return e.fromParsedEvent=function(t){return new e(t.name,t.type,t.handler,0===t.type?t.targetOrPhase:null,1===t.type?t.targetOrPhase:null,t.sourceSpan,t.handlerSpan)},e.prototype.visit=function(e){return e.visitBoundEvent(this)},e}(),En=function(){function e(e,t,n,r,i,o,s,u,l,c){this.name=e,this.attributes=t,this.inputs=n,this.outputs=r,this.children=i,this.references=o,this.sourceSpan=s,this.startSourceSpan=u,this.endSourceSpan=l,this.i18n=c,0===i.length&&u&&l&&(this.sourceSpan=a({},s,{end:l.end}))}return e.prototype.visit=function(e){return e.visitElement(this)},e}(),Sn=function(){function e(e,t,n,r,i,o,s,a,u,l,c,p){this.tagName=e,this.attributes=t,this.inputs=n,this.outputs=r,this.templateAttrs=i,this.children=o,this.references=s,this.variables=a,this.sourceSpan=u,this.startSourceSpan=l,this.endSourceSpan=c,this.i18n=p}return e.prototype.visit=function(e){return e.visitTemplate(this)},e}(),Cn=function(){function e(e,t,n,r){this.selector=e,this.attributes=t,this.sourceSpan=n,this.i18n=r}return e.prototype.visit=function(e){return e.visitContent(this)},e}(),Tn=function(){function e(e,t,n){this.name=e,this.value=t,this.sourceSpan=n}return e.prototype.visit=function(e){return e.visitVariable(this)},e}(),Nn=function(){function e(e,t,n){this.name=e,this.value=t,this.sourceSpan=n}return e.prototype.visit=function(e){return e.visitReference(this)},e}(),kn=function(){function e(e,t,n,r){this.vars=e,this.placeholders=t,this.sourceSpan=n,this.i18n=r}return e.prototype.visit=function(e){return e.visitIcu(this)},e}();function An(e,t){var n,r,i,o,s=[];if(e.visit)try{for(var a=p(t),u=a.next();!u.done;u=a.next())var l=e.visit(f=u.value)||f.visit(e)}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}else try{for(var c=p(t),h=c.next();!h.done;h=c.next()){var f;(l=(f=h.value).visit(e))&&s.push(l)}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}return s}
|
|
64
|
+
var mn="@angular/core",yn=function(){function e(){}return e.NEW_METHOD="factory",e.TRANSFORM_METHOD="transform",e.PATCH_DEPS="patchedDeps",e.namespaceHTML={name:"ɵɵnamespaceHTML",moduleName:mn},e.namespaceMathML={name:"ɵɵnamespaceMathML",moduleName:mn},e.namespaceSVG={name:"ɵɵnamespaceSVG",moduleName:mn},e.element={name:"ɵɵelement",moduleName:mn},e.elementStart={name:"ɵɵelementStart",moduleName:mn},e.elementEnd={name:"ɵɵelementEnd",moduleName:mn},e.select={name:"ɵɵselect",moduleName:mn},e.updateSyntheticHostBinding={name:"ɵɵupdateSyntheticHostBinding",moduleName:mn},e.componentHostSyntheticListener={name:"ɵɵcomponentHostSyntheticListener",moduleName:mn},e.attribute={name:"ɵɵattribute",moduleName:mn},e.attributeInterpolate1={name:"ɵɵattributeInterpolate1",moduleName:mn},e.attributeInterpolate2={name:"ɵɵattributeInterpolate2",moduleName:mn},e.attributeInterpolate3={name:"ɵɵattributeInterpolate3",moduleName:mn},e.attributeInterpolate4={name:"ɵɵattributeInterpolate4",moduleName:mn},e.attributeInterpolate5={name:"ɵɵattributeInterpolate5",moduleName:mn},e.attributeInterpolate6={name:"ɵɵattributeInterpolate6",moduleName:mn},e.attributeInterpolate7={name:"ɵɵattributeInterpolate7",moduleName:mn},e.attributeInterpolate8={name:"ɵɵattributeInterpolate8",moduleName:mn},e.attributeInterpolateV={name:"ɵɵattributeInterpolateV",moduleName:mn},e.classProp={name:"ɵɵclassProp",moduleName:mn},e.elementContainerStart={name:"ɵɵelementContainerStart",moduleName:mn},e.elementContainerEnd={name:"ɵɵelementContainerEnd",moduleName:mn},e.styling={name:"ɵɵstyling",moduleName:mn},e.styleMap={name:"ɵɵstyleMap",moduleName:mn},e.classMap={name:"ɵɵclassMap",moduleName:mn},e.styleProp={name:"ɵɵstyleProp",moduleName:mn},e.stylingApply={name:"ɵɵstylingApply",moduleName:mn},e.styleSanitizer={name:"ɵɵstyleSanitizer",moduleName:mn},e.elementHostAttrs={name:"ɵɵelementHostAttrs",moduleName:mn},e.containerCreate={name:"ɵɵcontainer",moduleName:mn},e.nextContext={name:"ɵɵnextContext",moduleName:mn},e.templateCreate={name:"ɵɵtemplate",moduleName:mn},e.text={name:"ɵɵtext",moduleName:mn},e.textBinding={name:"ɵɵtextBinding",moduleName:mn},e.enableBindings={name:"ɵɵenableBindings",moduleName:mn},e.disableBindings={name:"ɵɵdisableBindings",moduleName:mn},e.allocHostVars={name:"ɵɵallocHostVars",moduleName:mn},e.getCurrentView={name:"ɵɵgetCurrentView",moduleName:mn},e.textInterpolate={name:"ɵɵtextInterpolate",moduleName:mn},e.textInterpolate1={name:"ɵɵtextInterpolate1",moduleName:mn},e.textInterpolate2={name:"ɵɵtextInterpolate2",moduleName:mn},e.textInterpolate3={name:"ɵɵtextInterpolate3",moduleName:mn},e.textInterpolate4={name:"ɵɵtextInterpolate4",moduleName:mn},e.textInterpolate5={name:"ɵɵtextInterpolate5",moduleName:mn},e.textInterpolate6={name:"ɵɵtextInterpolate6",moduleName:mn},e.textInterpolate7={name:"ɵɵtextInterpolate7",moduleName:mn},e.textInterpolate8={name:"ɵɵtextInterpolate8",moduleName:mn},e.textInterpolateV={name:"ɵɵtextInterpolateV",moduleName:mn},e.restoreView={name:"ɵɵrestoreView",moduleName:mn},e.interpolation1={name:"ɵɵinterpolation1",moduleName:mn},e.interpolation2={name:"ɵɵinterpolation2",moduleName:mn},e.interpolation3={name:"ɵɵinterpolation3",moduleName:mn},e.interpolation4={name:"ɵɵinterpolation4",moduleName:mn},e.interpolation5={name:"ɵɵinterpolation5",moduleName:mn},e.interpolation6={name:"ɵɵinterpolation6",moduleName:mn},e.interpolation7={name:"ɵɵinterpolation7",moduleName:mn},e.interpolation8={name:"ɵɵinterpolation8",moduleName:mn},e.interpolationV={name:"ɵɵinterpolationV",moduleName:mn},e.pureFunction0={name:"ɵɵpureFunction0",moduleName:mn},e.pureFunction1={name:"ɵɵpureFunction1",moduleName:mn},e.pureFunction2={name:"ɵɵpureFunction2",moduleName:mn},e.pureFunction3={name:"ɵɵpureFunction3",moduleName:mn},e.pureFunction4={name:"ɵɵpureFunction4",moduleName:mn},e.pureFunction5={name:"ɵɵpureFunction5",moduleName:mn},e.pureFunction6={name:"ɵɵpureFunction6",moduleName:mn},e.pureFunction7={name:"ɵɵpureFunction7",moduleName:mn},e.pureFunction8={name:"ɵɵpureFunction8",moduleName:mn},e.pureFunctionV={name:"ɵɵpureFunctionV",moduleName:mn},e.pipeBind1={name:"ɵɵpipeBind1",moduleName:mn},e.pipeBind2={name:"ɵɵpipeBind2",moduleName:mn},e.pipeBind3={name:"ɵɵpipeBind3",moduleName:mn},e.pipeBind4={name:"ɵɵpipeBind4",moduleName:mn},e.pipeBindV={name:"ɵɵpipeBindV",moduleName:mn},e.property={name:"ɵɵproperty",moduleName:mn},e.propertyInterpolate={name:"ɵɵpropertyInterpolate",moduleName:mn},e.propertyInterpolate1={name:"ɵɵpropertyInterpolate1",moduleName:mn},e.propertyInterpolate2={name:"ɵɵpropertyInterpolate2",moduleName:mn},e.propertyInterpolate3={name:"ɵɵpropertyInterpolate3",moduleName:mn},e.propertyInterpolate4={name:"ɵɵpropertyInterpolate4",moduleName:mn},e.propertyInterpolate5={name:"ɵɵpropertyInterpolate5",moduleName:mn},e.propertyInterpolate6={name:"ɵɵpropertyInterpolate6",moduleName:mn},e.propertyInterpolate7={name:"ɵɵpropertyInterpolate7",moduleName:mn},e.propertyInterpolate8={name:"ɵɵpropertyInterpolate8",moduleName:mn},e.propertyInterpolateV={name:"ɵɵpropertyInterpolateV",moduleName:mn},e.i18n={name:"ɵɵi18n",moduleName:mn},e.i18nAttributes={name:"ɵɵi18nAttributes",moduleName:mn},e.i18nExp={name:"ɵɵi18nExp",moduleName:mn},e.i18nStart={name:"ɵɵi18nStart",moduleName:mn},e.i18nEnd={name:"ɵɵi18nEnd",moduleName:mn},e.i18nApply={name:"ɵɵi18nApply",moduleName:mn},e.i18nPostprocess={name:"ɵɵi18nPostprocess",moduleName:mn},e.i18nLocalize={name:"ɵɵi18nLocalize",moduleName:mn},e.load={name:"ɵɵload",moduleName:mn},e.pipe={name:"ɵɵpipe",moduleName:mn},e.projection={name:"ɵɵprojection",moduleName:mn},e.projectionDef={name:"ɵɵprojectionDef",moduleName:mn},e.reference={name:"ɵɵreference",moduleName:mn},e.inject={name:"ɵɵinject",moduleName:mn},e.injectAttribute={name:"ɵɵinjectAttribute",moduleName:mn},e.directiveInject={name:"ɵɵdirectiveInject",moduleName:mn},e.templateRefExtractor={name:"ɵɵtemplateRefExtractor",moduleName:mn},e.resolveWindow={name:"ɵɵresolveWindow",moduleName:mn},e.resolveDocument={name:"ɵɵresolveDocument",moduleName:mn},e.resolveBody={name:"ɵɵresolveBody",moduleName:mn},e.defineBase={name:"ɵɵdefineBase",moduleName:mn},e.BaseDef={name:"ɵɵBaseDef",moduleName:mn},e.defineComponent={name:"ɵɵdefineComponent",moduleName:mn},e.setComponentScope={name:"ɵɵsetComponentScope",moduleName:mn},e.ComponentDefWithMeta={name:"ɵɵComponentDefWithMeta",moduleName:mn},e.defineDirective={name:"ɵɵdefineDirective",moduleName:mn},e.DirectiveDefWithMeta={name:"ɵɵDirectiveDefWithMeta",moduleName:mn},e.InjectorDef={name:"ɵɵInjectorDef",moduleName:mn},e.defineInjector={name:"ɵɵdefineInjector",moduleName:mn},e.NgModuleDefWithMeta={name:"ɵɵNgModuleDefWithMeta",moduleName:mn},e.defineNgModule={name:"ɵɵdefineNgModule",moduleName:mn},e.setNgModuleScope={name:"ɵɵsetNgModuleScope",moduleName:mn},e.PipeDefWithMeta={name:"ɵɵPipeDefWithMeta",moduleName:mn},e.definePipe={name:"ɵɵdefinePipe",moduleName:mn},e.queryRefresh={name:"ɵɵqueryRefresh",moduleName:mn},e.viewQuery={name:"ɵɵviewQuery",moduleName:mn},e.staticViewQuery={name:"ɵɵstaticViewQuery",moduleName:mn},e.staticContentQuery={name:"ɵɵstaticContentQuery",moduleName:mn},e.loadViewQuery={name:"ɵɵloadViewQuery",moduleName:mn},e.contentQuery={name:"ɵɵcontentQuery",moduleName:mn},e.loadContentQuery={name:"ɵɵloadContentQuery",moduleName:mn},e.NgOnChangesFeature={name:"ɵɵNgOnChangesFeature",moduleName:mn},e.InheritDefinitionFeature={name:"ɵɵInheritDefinitionFeature",moduleName:mn},e.ProvidersFeature={name:"ɵɵProvidersFeature",moduleName:mn},e.listener={name:"ɵɵlistener",moduleName:mn},e.getFactoryOf={name:"ɵɵgetFactoryOf",moduleName:mn},e.getInheritedFactory={name:"ɵɵgetInheritedFactory",moduleName:mn},e.sanitizeHtml={name:"ɵɵsanitizeHtml",moduleName:mn},e.sanitizeStyle={name:"ɵɵsanitizeStyle",moduleName:mn},e.defaultStyleSanitizer={name:"ɵɵdefaultStyleSanitizer",moduleName:mn},e.sanitizeResourceUrl={name:"ɵɵsanitizeResourceUrl",moduleName:mn},e.sanitizeScript={name:"ɵɵsanitizeScript",moduleName:mn},e.sanitizeUrl={name:"ɵɵsanitizeUrl",moduleName:mn},e.sanitizeUrlOrResourceUrl={name:"ɵɵsanitizeUrlOrResourceUrl",moduleName:mn},e}(),gn=0,_n=9,bn=10,wn=11,xn=12,En=13,Sn=32,Cn=34,Tn=36,Nn=39,kn=43,An=45,Pn=47,In=59,Mn=61,On=62,Rn=48,Dn=55,Ln=57,Fn=65,jn=70,Vn=90,Bn=95,Hn=97,Un=102,qn=110,Kn=114,zn=116,Wn=118,Qn=122,$n=160;function Gn(e){return e>=_n&&e<=Sn||e==$n}function Xn(e){return Rn<=e&&e<=Ln}function Yn(e){return e>=Hn&&e<=Qn||e>=Fn&&e<=Vn}function Zn(e){return e===bn||e===En}function Jn(e){return Rn<=e&&e<=Dn}
|
|
65
65
|
/**
|
|
66
66
|
* @license
|
|
67
67
|
* Copyright Google Inc. All Rights Reserved.
|
|
68
68
|
*
|
|
69
69
|
* Use of this source code is governed by an MIT-style license that can be
|
|
70
70
|
* found in the LICENSE file at https://angular.io/license
|
|
71
|
-
*/var
|
|
71
|
+
*/var er,tr=function(){function e(e,t,n,r){this.file=e,this.offset=t,this.line=n,this.col=r}return e.prototype.toString=function(){return null!=this.offset?this.file.url+"@"+this.line+":"+this.col:this.file.url},e.prototype.moveBy=function(t){for(var n=this.file.content,r=n.length,i=this.offset,o=this.line,s=this.col;i>0&&t<0;)if(t++,(u=n.charCodeAt(--i))==bn){o--;var a=n.substr(0,i-1).lastIndexOf(String.fromCharCode(bn));s=a>0?i-a:i}else s--;for(;i<r&&t>0;){var u=n.charCodeAt(i);i++,t--,u==bn?(o++,s=0):s++}return new e(this.file,i,o,s)},e.prototype.getContext=function(e,t){var n=this.file.content,r=this.offset;if(null!=r){r>n.length-1&&(r=n.length-1);for(var i=r,o=0,s=0;o<e&&r>0&&(o++,"\n"!=n[--r]||++s!=t););for(o=0,s=0;o<e&&i<n.length-1&&(o++,"\n"!=n[++i]||++s!=t););return{before:n.substring(r,this.offset),after:n.substring(this.offset,i+1)}}return null},e}(),nr=function nr(e,t){this.content=e,this.url=t},rr=function(){function e(e,t,n){void 0===n&&(n=null),this.start=e,this.end=t,this.details=n}return e.prototype.toString=function(){return this.start.file.content.substring(this.start.offset,this.end.offset)},e}();!function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"}(er||(er={}));var ir=function(){function e(e,t,n){void 0===n&&(n=er.ERROR),this.span=e,this.msg=t,this.level=n}return e.prototype.contextualMessage=function(){var e=this.span.start.getContext(100,3);return e?this.msg+' ("'+e.before+"["+er[this.level]+" ->]"+e.after+'")':this.msg},e.prototype.toString=function(){var e=this.span.details?", "+this.span.details:"";return this.contextualMessage()+": "+this.span.start+e},e}(),or=function(){function e(e,t){this.value=e,this.sourceSpan=t}return e.prototype.visit=function(e){return e.visitText(this)},e}(),sr=function(){function e(e,t,n){this.value=e,this.sourceSpan=t,this.i18n=n}return e.prototype.visit=function(e){return e.visitBoundText(this)},e}(),ar=function(){function e(e,t,n,r,i){this.name=e,this.value=t,this.sourceSpan=n,this.valueSpan=r,this.i18n=i}return e.prototype.visit=function(e){return e.visitTextAttribute(this)},e}(),ur=function(){function e(e,t,n,r,i,o,s){this.name=e,this.type=t,this.securityContext=n,this.value=r,this.unit=i,this.sourceSpan=o,this.i18n=s}return e.fromBoundElementProperty=function(t,n){return new e(t.name,t.type,t.securityContext,t.value,t.unit,t.sourceSpan,n)},e.prototype.visit=function(e){return e.visitBoundAttribute(this)},e}(),lr=function(){function e(e,t,n,r,i,o,s){this.name=e,this.type=t,this.handler=n,this.target=r,this.phase=i,this.sourceSpan=o,this.handlerSpan=s}return e.fromParsedEvent=function(t){return new e(t.name,t.type,t.handler,0===t.type?t.targetOrPhase:null,1===t.type?t.targetOrPhase:null,t.sourceSpan,t.handlerSpan)},e.prototype.visit=function(e){return e.visitBoundEvent(this)},e}(),cr=function(){function e(e,t,n,r,i,o,s,a,u,l){this.name=e,this.attributes=t,this.inputs=n,this.outputs=r,this.children=i,this.references=o,this.sourceSpan=s,this.startSourceSpan=a,this.endSourceSpan=u,this.i18n=l,0===i.length&&a&&u&&(this.sourceSpan=new rr(s.start,u.end))}return e.prototype.visit=function(e){return e.visitElement(this)},e}(),pr=function(){function e(e,t,n,r,i,o,s,a,u,l,c,p){this.tagName=e,this.attributes=t,this.inputs=n,this.outputs=r,this.templateAttrs=i,this.children=o,this.references=s,this.variables=a,this.sourceSpan=u,this.startSourceSpan=l,this.endSourceSpan=c,this.i18n=p}return e.prototype.visit=function(e){return e.visitTemplate(this)},e}(),hr=function(){function e(e,t,n,r){this.selector=e,this.attributes=t,this.sourceSpan=n,this.i18n=r}return e.prototype.visit=function(e){return e.visitContent(this)},e}(),fr=function(){function e(e,t,n){this.name=e,this.value=t,this.sourceSpan=n}return e.prototype.visit=function(e){return e.visitVariable(this)},e}(),dr=function(){function e(e,t,n){this.name=e,this.value=t,this.sourceSpan=n}return e.prototype.visit=function(e){return e.visitReference(this)},e}(),vr=function(){function e(e,t,n,r){this.vars=e,this.placeholders=t,this.sourceSpan=n,this.i18n=r}return e.prototype.visit=function(e){return e.visitIcu(this)},e}();function mr(e,t){var n,r,i,o,s=[];if(e.visit)try{for(var a=p(t),u=a.next();!u.done;u=a.next())var l=e.visit(f=u.value)||f.visit(e)}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}else try{for(var c=p(t),h=c.next();!h.done;h=c.next()){var f;(l=(f=h.value).visit(e))&&s.push(l)}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}return s}
|
|
72
72
|
/**
|
|
73
73
|
* @license
|
|
74
74
|
* Copyright Google Inc. All Rights Reserved.
|
|
75
75
|
*
|
|
76
76
|
* Use of this source code is governed by an MIT-style license that can be
|
|
77
77
|
* found in the LICENSE file at https://angular.io/license
|
|
78
|
-
*/
|
|
79
|
-
function Vn(e){return e.id||function n(e){var t,n,r=Ot(e),i=function o(e,t){for(var n=Array(e.length+3>>>2),r=0;r<n.length;r++)n[r]=er(e,4*r,t);return n}(r,Hn.Big),s=8*r.length,a=new Array(80),u=h([1732584193,4023233417,2562383102,271733878,3285377520],5),l=u[0],c=u[1],p=u[2],f=u[3],d=u[4];i[s>>5]|=128<<24-s%32,i[15+(s+64>>9<<4)]=s;for(var v=0;v<i.length;v+=16){for(var m=h([l,c,p,f,d],5),y=m[0],g=m[1],_=m[2],b=m[3],w=m[4],x=0;x<80;x++){a[x]=x<16?i[v+x]:Zn(a[x-3]^a[x-8]^a[x-14]^a[x-16],1);var E=h(zn(x,c,p,f),2),S=E[0],C=E[1],T=[Zn(l,5),S,d,C,a[x]].reduce(Gn);d=(t=h([f,p,Zn(c,30),l,T],5))[0],f=t[1],p=t[2],c=t[3],l=t[4]}l=(n=h([Gn(l,y),Gn(c,g),Gn(p,_),Gn(f,b),Gn(d,w)],5))[0],c=n[1],p=n[2],f=n[3],d=n[4]}return function N(e){for(var t="",n=0;n<e.length;n++){var r=Jn(e,n);t+=(r>>>4).toString(16)+(15&r).toString(16)}return t.toLowerCase()}(tr([l,c,p,f,d]))}(function t(e){return e.map(function(e){return e.visit(qn,null)})}(e.nodes).join("")+"["+e.meaning+"]")}function Bn(e){if(e.id)return e.id;var t=new Kn;return function n(e,t){var n,r=h(Wn(e),2),i=r[0],o=r[1];if(t){var s=h(Wn(t),2),a=s[0],u=s[1];i=(n=h(function c(e,t){var n=h(e,2),r=n[0],i=n[1],o=h(t,2),s=o[0],a=h(Xn(i,o[1]),2),u=a[0],l=a[1];return[Gn(Gn(r,s),u),l]}(function l(e,t){var n=h(e,2),r=n[0],i=n[1];return[r<<t|i>>>32-t,i<<t|r>>>32-t]}([i,o],1),[a,u]),2))[0],o=n[1]}return function p(e){for(var t="",n="1",r=e.length-1;r>=0;r--)t=nr(t,rr(Jn(e,r),n)),n=rr(256,n);return t.split("").reverse().join("")}(tr([2147483647&i,o]))}(e.nodes.map(function(e){return e.visit(t,null)}).join(""),e.meaning)}var Hn,Un=function(){function e(){}return e.prototype.visitText=function(e,t){return e.value},e.prototype.visitContainer=function(e,t){var n=this;return"["+e.children.map(function(e){return e.visit(n)}).join(", ")+"]"},e.prototype.visitIcu=function(e,t){var n=this,r=Object.keys(e.cases).map(function(t){return t+" {"+e.cases[t].visit(n)+"}"});return"{"+e.expression+", "+e.type+", "+r.join(", ")+"}"},e.prototype.visitTagPlaceholder=function(e,t){var n=this;return e.isVoid?'<ph tag name="'+e.startName+'"/>':'<ph tag name="'+e.startName+'">'+e.children.map(function(e){return e.visit(n)}).join(", ")+'</ph name="'+e.closeName+'">'},e.prototype.visitPlaceholder=function(e,t){return e.value?'<ph name="'+e.name+'">'+e.value+"</ph>":'<ph name="'+e.name+'"/>'},e.prototype.visitIcuPlaceholder=function(e,t){return'<ph icu name="'+e.name+'">'+e.value.visit(this)+"</ph>"},e}(),qn=new Un,Kn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.visitIcu=function(e,t){var n=this,r=Object.keys(e.cases).map(function(t){return t+" {"+e.cases[t].visit(n)+"}"});return"{"+e.type+", "+r.join(", ")+"}"},t}(Un);function zn(e,t,n,r){return e<20?[t&n|~t&r,1518500249]:e<40?[t^n^r,1859775393]:e<60?[t&n|t&r|n&r,2400959708]:[t^n^r,3395469782]}function Wn(e){var t=Ot(e),n=h([Qn(t,0),Qn(t,102072)],2),r=n[0],i=n[1];return 0!=r||0!=i&&1!=i||(r^=319790063,i^=-1801410264),[r,i]}function Qn(e,t){var n,r,i=h([2654435769,2654435769],2),o=i[0],s=i[1],a=e.length;for(r=0;r+12<=a;r+=12)o=(n=h($n([o=Gn(o,er(e,r,Hn.Little)),s=Gn(s,er(e,r+4,Hn.Little)),t=Gn(t,er(e,r+8,Hn.Little))]),3))[0],s=n[1],t=n[2];return o=Gn(o,er(e,r,Hn.Little)),s=Gn(s,er(e,r+4,Hn.Little)),t=Gn(t,a),$n([o,s,t=Gn(t,er(e,r+8,Hn.Little)<<8)])[2]}function $n(e){var t=h(e,3),n=t[0],r=t[1],i=t[2];return n=Yn(n,r),n=Yn(n,i),n^=i>>>13,r=Yn(r,i),r=Yn(r,n),r^=n<<8,i=Yn(i,n),i=Yn(i,r),i^=r>>>13,n=Yn(n,r),n=Yn(n,i),n^=i>>>12,r=Yn(r,i),r=Yn(r,n),r^=n<<16,i=Yn(i,n),i=Yn(i,r),i^=r>>>5,n=Yn(n,r),n=Yn(n,i),n^=i>>>3,r=Yn(r,i),r=Yn(r,n),r^=n<<10,i=Yn(i,n),i=Yn(i,r),[n,r,i^=r>>>15]}function Gn(e,t){return Xn(e,t)[1]}function Xn(e,t){var n=(65535&e)+(65535&t),r=(e>>>16)+(t>>>16)+(n>>>16);return[r>>>16,r<<16|65535&n]}function Yn(e,t){var n=(65535&e)-(65535&t);return(e>>16)-(t>>16)+(n>>16)<<16|65535&n}function Zn(e,t){return e<<t|e>>>32-t}function Jn(e,t){return t>=e.length?0:255&e.charCodeAt(t)}function er(e,t,n){var r=0;if(n===Hn.Big)for(var i=0;i<4;i++)r+=Jn(e,t+i)<<24-8*i;else for(i=0;i<4;i++)r+=Jn(e,t+i)<<8*i;return r}function tr(e){return e.reduce(function(e,t){return e+function n(e){for(var t="",n=0;n<4;n++)t+=String.fromCharCode(e>>>8*(3-n)&255);return t}(t)},"")}function nr(e,t){for(var n="",r=Math.max(e.length,t.length),i=0,o=0;i<r||o;i++){var s=o+ +(e[i]||0)+ +(t[i]||0);s>=10?(o=1,n+=s-10):(o=0,n+=s)}return n}function rr(e,t){for(var n="",r=t;0!==e;e>>>=1)1&e&&(n=nr(n,r)),r=nr(r,r);return n}
|
|
78
|
+
*/var yr=function yr(e,t,n,r,i,o){this.nodes=e,this.placeholders=t,this.placeholderToMessage=n,this.meaning=r,this.description=i,this.id=o,this.sources=e.length?[{filePath:e[0].sourceSpan.start.file.url,startLine:e[0].sourceSpan.start.line+1,startCol:e[0].sourceSpan.start.col+1,endLine:e[e.length-1].sourceSpan.end.line+1,endCol:e[0].sourceSpan.start.col+1}]:[]},gr=function(){function e(e,t){this.value=e,this.sourceSpan=t}return e.prototype.visit=function(e,t){return e.visitText(this,t)},e}(),_r=function(){function e(e,t){this.children=e,this.sourceSpan=t}return e.prototype.visit=function(e,t){return e.visitContainer(this,t)},e}(),br=function(){function e(e,t,n,r){this.expression=e,this.type=t,this.cases=n,this.sourceSpan=r}return e.prototype.visit=function(e,t){return e.visitIcu(this,t)},e}(),wr=function(){function e(e,t,n,r,i,o,s){this.tag=e,this.attrs=t,this.startName=n,this.closeName=r,this.children=i,this.isVoid=o,this.sourceSpan=s}return e.prototype.visit=function(e,t){return e.visitTagPlaceholder(this,t)},e}(),xr=function(){function e(e,t,n){this.value=e,this.name=t,this.sourceSpan=n}return e.prototype.visit=function(e,t){return e.visitPlaceholder(this,t)},e}(),Er=function(){function e(e,t,n){this.value=e,this.name=t,this.sourceSpan=n}return e.prototype.visit=function(e,t){return e.visitIcuPlaceholder(this,t)},e}(),Sr=function(){function e(){}return e.prototype.visitText=function(e,t){return new gr(e.value,e.sourceSpan)},e.prototype.visitContainer=function(e,t){var n=this,r=e.children.map(function(e){return e.visit(n,t)});return new _r(r,e.sourceSpan)},e.prototype.visitIcu=function(e,t){var n=this,r={};Object.keys(e.cases).forEach(function(i){return r[i]=e.cases[i].visit(n,t)});var i=new br(e.expression,e.type,r,e.sourceSpan);return i.expressionPlaceholder=e.expressionPlaceholder,i},e.prototype.visitTagPlaceholder=function(e,t){var n=this,r=e.children.map(function(e){return e.visit(n,t)});return new wr(e.tag,e.attrs,e.startName,e.closeName,r,e.isVoid,e.sourceSpan)},e.prototype.visitPlaceholder=function(e,t){return new xr(e.value,e.name,e.sourceSpan)},e.prototype.visitIcuPlaceholder=function(e,t){return new Er(e.value,e.name,e.sourceSpan)},e}(),Cr=function(){function e(){}return e.prototype.visitText=function(e,t){},e.prototype.visitContainer=function(e,t){var n=this;e.children.forEach(function(e){return e.visit(n)})},e.prototype.visitIcu=function(e,t){var n=this;Object.keys(e.cases).forEach(function(t){e.cases[t].visit(n)})},e.prototype.visitTagPlaceholder=function(e,t){var n=this;e.children.forEach(function(e){return e.visit(n)})},e.prototype.visitPlaceholder=function(e,t){},e.prototype.visitIcuPlaceholder=function(e,t){},e}();
|
|
80
79
|
/**
|
|
81
80
|
* @license
|
|
82
81
|
* Copyright Google Inc. All Rights Reserved.
|
|
83
82
|
*
|
|
84
83
|
* Use of this source code is governed by an MIT-style license that can be
|
|
85
84
|
* found in the LICENSE file at https://angular.io/license
|
|
86
|
-
|
|
85
|
+
*/
|
|
86
|
+
function Tr(e){return e.id||function n(e){var t,n,r=Ot(e),i=function o(e,t){for(var n=Array(e.length+3>>>2),r=0;r<n.length;r++)n[r]=Hr(e,4*r,t);return n}(r,kr.Big),s=8*r.length,a=new Array(80),u=h([1732584193,4023233417,2562383102,271733878,3285377520],5),l=u[0],c=u[1],p=u[2],f=u[3],d=u[4];i[s>>5]|=128<<24-s%32,i[15+(s+64>>9<<4)]=s;for(var v=0;v<i.length;v+=16){for(var m=h([l,c,p,f,d],5),y=m[0],g=m[1],_=m[2],b=m[3],w=m[4],x=0;x<80;x++){a[x]=x<16?i[v+x]:Vr(a[x-3]^a[x-8]^a[x-14]^a[x-16],1);var E=h(Mr(x,c,p,f),2),S=E[0],C=E[1],T=[Vr(l,5),S,d,C,a[x]].reduce(Lr);d=(t=h([f,p,Vr(c,30),l,T],5))[0],f=t[1],p=t[2],c=t[3],l=t[4]}l=(n=h([Lr(l,y),Lr(c,g),Lr(p,_),Lr(f,b),Lr(d,w)],5))[0],c=n[1],p=n[2],f=n[3],d=n[4]}return function N(e){for(var t="",n=0;n<e.length;n++){var r=Br(e,n);t+=(r>>>4).toString(16)+(15&r).toString(16)}return t.toLowerCase()}(Ur([l,c,p,f,d]))}(function t(e){return e.map(function(e){return e.visit(Pr,null)})}(e.nodes).join("")+"["+e.meaning+"]")}function Nr(e){if(e.id)return e.id;var t=new Ir;return function n(e,t){var n,r=h(Or(e),2),i=r[0],o=r[1];if(t){var s=h(Or(t),2),a=s[0],u=s[1];i=(n=h(function c(e,t){var n=h(e,2),r=n[0],i=n[1],o=h(t,2),s=o[0],a=h(Fr(i,o[1]),2),u=a[0],l=a[1];return[Lr(Lr(r,s),u),l]}(function l(e,t){var n=h(e,2),r=n[0],i=n[1];return[r<<t|i>>>32-t,i<<t|r>>>32-t]}([i,o],1),[a,u]),2))[0],o=n[1]}return function p(e){for(var t="",n="1",r=e.length-1;r>=0;r--)t=qr(t,Kr(Br(e,r),n)),n=Kr(256,n);return t.split("").reverse().join("")}(Ur([2147483647&i,o]))}(e.nodes.map(function(e){return e.visit(t,null)}).join(""),e.meaning)}var kr,Ar=function(){function e(){}return e.prototype.visitText=function(e,t){return e.value},e.prototype.visitContainer=function(e,t){var n=this;return"["+e.children.map(function(e){return e.visit(n)}).join(", ")+"]"},e.prototype.visitIcu=function(e,t){var n=this,r=Object.keys(e.cases).map(function(t){return t+" {"+e.cases[t].visit(n)+"}"});return"{"+e.expression+", "+e.type+", "+r.join(", ")+"}"},e.prototype.visitTagPlaceholder=function(e,t){var n=this;return e.isVoid?'<ph tag name="'+e.startName+'"/>':'<ph tag name="'+e.startName+'">'+e.children.map(function(e){return e.visit(n)}).join(", ")+'</ph name="'+e.closeName+'">'},e.prototype.visitPlaceholder=function(e,t){return e.value?'<ph name="'+e.name+'">'+e.value+"</ph>":'<ph name="'+e.name+'"/>'},e.prototype.visitIcuPlaceholder=function(e,t){return'<ph icu name="'+e.name+'">'+e.value.visit(this)+"</ph>"},e}(),Pr=new Ar,Ir=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.visitIcu=function(e,t){var n=this,r=Object.keys(e.cases).map(function(t){return t+" {"+e.cases[t].visit(n)+"}"});return"{"+e.type+", "+r.join(", ")+"}"},t}(Ar);function Mr(e,t,n,r){return e<20?[t&n|~t&r,1518500249]:e<40?[t^n^r,1859775393]:e<60?[t&n|t&r|n&r,2400959708]:[t^n^r,3395469782]}function Or(e){var t=Ot(e),n=h([Rr(t,0),Rr(t,102072)],2),r=n[0],i=n[1];return 0!=r||0!=i&&1!=i||(r^=319790063,i^=-1801410264),[r,i]}function Rr(e,t){var n,r,i=h([2654435769,2654435769],2),o=i[0],s=i[1],a=e.length;for(r=0;r+12<=a;r+=12)o=(n=h(Dr([o=Lr(o,Hr(e,r,kr.Little)),s=Lr(s,Hr(e,r+4,kr.Little)),t=Lr(t,Hr(e,r+8,kr.Little))]),3))[0],s=n[1],t=n[2];return o=Lr(o,Hr(e,r,kr.Little)),s=Lr(s,Hr(e,r+4,kr.Little)),t=Lr(t,a),Dr([o,s,t=Lr(t,Hr(e,r+8,kr.Little)<<8)])[2]}function Dr(e){var t=h(e,3),n=t[0],r=t[1],i=t[2];return n=jr(n,r),n=jr(n,i),n^=i>>>13,r=jr(r,i),r=jr(r,n),r^=n<<8,i=jr(i,n),i=jr(i,r),i^=r>>>13,n=jr(n,r),n=jr(n,i),n^=i>>>12,r=jr(r,i),r=jr(r,n),r^=n<<16,i=jr(i,n),i=jr(i,r),i^=r>>>5,n=jr(n,r),n=jr(n,i),n^=i>>>3,r=jr(r,i),r=jr(r,n),r^=n<<10,i=jr(i,n),i=jr(i,r),[n,r,i^=r>>>15]}function Lr(e,t){return Fr(e,t)[1]}function Fr(e,t){var n=(65535&e)+(65535&t),r=(e>>>16)+(t>>>16)+(n>>>16);return[r>>>16,r<<16|65535&n]}function jr(e,t){var n=(65535&e)-(65535&t);return(e>>16)-(t>>16)+(n>>16)<<16|65535&n}function Vr(e,t){return e<<t|e>>>32-t}function Br(e,t){return t>=e.length?0:255&e.charCodeAt(t)}function Hr(e,t,n){var r=0;if(n===kr.Big)for(var i=0;i<4;i++)r+=Br(e,t+i)<<24-8*i;else for(i=0;i<4;i++)r+=Br(e,t+i)<<8*i;return r}function Ur(e){return e.reduce(function(e,t){return e+function n(e){for(var t="",n=0;n<4;n++)t+=String.fromCharCode(e>>>8*(3-n)&255);return t}(t)},"")}function qr(e,t){for(var n="",r=Math.max(e.length,t.length),i=0,o=0;i<r||o;i++){var s=o+ +(e[i]||0)+ +(t[i]||0);s>=10?(o=1,n+=s-10):(o=0,n+=s)}return n}function Kr(e,t){for(var n="",r=t;0!==e;e>>>=1)1&e&&(n=qr(n,r)),r=qr(r,r);return n}
|
|
87
87
|
/**
|
|
88
88
|
* @license
|
|
89
89
|
* Copyright Google Inc. All Rights Reserved.
|
|
90
90
|
*
|
|
91
91
|
* Use of this source code is governed by an MIT-style license that can be
|
|
92
92
|
* found in the LICENSE file at https://angular.io/license
|
|
93
|
-
|
|
93
|
+
*/!function(e){e[e.Little=0]="Little",e[e.Big=1]="Big"}(kr||(kr={}));var zr=function(){function e(){}return e.prototype.createNameMapper=function(e){return null},e}(),Wr=function(e){function t(t,n){var r=e.call(this)||this;return r.mapName=n,r.internalToPublic={},r.publicToNextId={},r.publicToInternal={},t.nodes.forEach(function(e){return e.visit(r)}),r}return o(t,e),t.prototype.toPublicName=function(e){return this.internalToPublic.hasOwnProperty(e)?this.internalToPublic[e]:null},t.prototype.toInternalName=function(e){return this.publicToInternal.hasOwnProperty(e)?this.publicToInternal[e]:null},t.prototype.visitText=function(e,t){return null},t.prototype.visitTagPlaceholder=function(t,n){this.visitPlaceholderName(t.startName),e.prototype.visitTagPlaceholder.call(this,t,n),this.visitPlaceholderName(t.closeName)},t.prototype.visitPlaceholder=function(e,t){this.visitPlaceholderName(e.name)},t.prototype.visitIcuPlaceholder=function(e,t){this.visitPlaceholderName(e.name)},t.prototype.visitPlaceholderName=function(e){if(e&&!this.internalToPublic.hasOwnProperty(e)){var t=this.mapName(e);if(this.publicToInternal.hasOwnProperty(t)){var n=this.publicToNextId[t];this.publicToNextId[t]=n+1,t=t+"_"+n}else this.publicToNextId[t]=1;this.internalToPublic[e]=t,this.publicToInternal[t]=e}},t}(Cr),Qr=new(function(){function e(){}return e.prototype.visitTag=function(e){var t=this,n=this._serializeAttributes(e.attrs);if(0==e.children.length)return"<"+e.name+n+"/>";var r=e.children.map(function(e){return e.visit(t)});return"<"+e.name+n+">"+r.join("")+"</"+e.name+">"},e.prototype.visitText=function(e){return e.value},e.prototype.visitDeclaration=function(e){return"<?xml"+this._serializeAttributes(e.attrs)+" ?>"},e.prototype._serializeAttributes=function(e){var t=Object.keys(e).map(function(t){return t+'="'+e[t]+'"'}).join(" ");return t.length>0?" "+t:""},e.prototype.visitDoctype=function(e){return"<!DOCTYPE "+e.rootTag+" [\n"+e.dtd+"\n]>"},e}());function $r(e){return e.map(function(e){return e.visit(Qr)}).join("")}var Gr=function(){function e(e){var t=this;this.attrs={},Object.keys(e).forEach(function(n){t.attrs[n]=ti(e[n])})}return e.prototype.visit=function(e){return e.visitDeclaration(this)},e}(),Xr=function(){function e(e,t){this.rootTag=e,this.dtd=t}return e.prototype.visit=function(e){return e.visitDoctype(this)},e}(),Yr=function(){function e(e,t,n){var r=this;void 0===t&&(t={}),void 0===n&&(n=[]),this.name=e,this.children=n,this.attrs={},Object.keys(t).forEach(function(e){r.attrs[e]=ti(t[e])})}return e.prototype.visit=function(e){return e.visitTag(this)},e}(),Zr=function(){function e(e){this.value=ti(e)}return e.prototype.visit=function(e){return e.visitText(this)},e}(),Jr=function(e){function t(t){return void 0===t&&(t=0),e.call(this,"\n"+new Array(t+1).join(" "))||this}return o(t,e),t}(Zr),ei=[[/&/g,"&"],[/"/g,"""],[/'/g,"'"],[/</g,"<"],[/>/g,">"]];function ti(e){return ei.reduce(function(e,t){return e.replace(t[0],t[1])},e)}
|
|
94
94
|
/**
|
|
95
95
|
* @license
|
|
96
96
|
* Copyright Google Inc. All Rights Reserved.
|
|
97
97
|
*
|
|
98
98
|
* Use of this source code is governed by an MIT-style license that can be
|
|
99
99
|
* found in the LICENSE file at https://angular.io/license
|
|
100
|
-
*/function
|
|
100
|
+
*/var ni=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.write=function(e,t){var n=new oi,r=new ri,i=new Yr("messagebundle");return e.forEach(function(e){var t={id:e.id};e.description&&(t.desc=e.description),e.meaning&&(t.meaning=e.meaning);var n=[];e.sources.forEach(function(e){n.push(new Yr("source",{},[new Zr(e.filePath+":"+e.startLine+(e.endLine!==e.startLine?","+e.endLine:""))]))}),i.children.push(new Jr(2),new Yr("msg",t,f(n,r.serialize(e.nodes))))}),i.children.push(new Jr),$r([new Gr({version:"1.0",encoding:"UTF-8"}),new Jr,new Xr("messagebundle",'<!ELEMENT messagebundle (msg)*>\n<!ATTLIST messagebundle class CDATA #IMPLIED>\n\n<!ELEMENT msg (#PCDATA|ph|source)*>\n<!ATTLIST msg id CDATA #IMPLIED>\n<!ATTLIST msg seq CDATA #IMPLIED>\n<!ATTLIST msg name CDATA #IMPLIED>\n<!ATTLIST msg desc CDATA #IMPLIED>\n<!ATTLIST msg meaning CDATA #IMPLIED>\n<!ATTLIST msg obsolete (obsolete) #IMPLIED>\n<!ATTLIST msg xml:space (default|preserve) "default">\n<!ATTLIST msg is_hidden CDATA #IMPLIED>\n\n<!ELEMENT source (#PCDATA)>\n\n<!ELEMENT ph (#PCDATA|ex)*>\n<!ATTLIST ph name CDATA #REQUIRED>\n\n<!ELEMENT ex (#PCDATA)>'),new Jr,n.addDefaultExamples(i),new Jr])},t.prototype.load=function(e,t){throw new Error("Unsupported")},t.prototype.digest=function(e){return ii(e)},t.prototype.createNameMapper=function(e){return new Wr(e,si)},t}(zr),ri=function(){function e(){}return e.prototype.visitText=function(e,t){return[new Zr(e.value)]},e.prototype.visitContainer=function(e,t){var n=this,r=[];return e.children.forEach(function(e){return r.push.apply(r,f(e.visit(n)))}),r},e.prototype.visitIcu=function(e,t){var n=this,r=[new Zr("{"+e.expressionPlaceholder+", "+e.type+", ")];return Object.keys(e.cases).forEach(function(t){r.push.apply(r,f([new Zr(t+" {")],e.cases[t].visit(n),[new Zr("} ")]))}),r.push(new Zr("}")),r},e.prototype.visitTagPlaceholder=function(e,t){var n=new Zr("<"+e.tag+">"),r=new Yr("ex",{},[n]),i=new Yr("ph",{name:e.startName},[r,n]);if(e.isVoid)return[i];var o=new Zr("</"+e.tag+">"),s=new Yr("ex",{},[o]),a=new Yr("ph",{name:e.closeName},[s,o]);return f([i],this.serialize(e.children),[a])},e.prototype.visitPlaceholder=function(e,t){var n=new Zr("{{"+e.value+"}}"),r=new Yr("ex",{},[n]);return[new Yr("ph",{name:e.name},[r,n])]},e.prototype.visitIcuPlaceholder=function(e,t){var n=e.value.expression,r=e.value.type,i=Object.keys(e.value.cases).map(function(e){return e+" {...}"}).join(" "),o=new Zr("{"+n+", "+r+", "+i+"}"),s=new Yr("ex",{},[o]);return[new Yr("ph",{name:e.name},[s,o])]},e.prototype.serialize=function(e){var t=this;return[].concat.apply([],f(e.map(function(e){return e.visit(t)})))},e}();function ii(e){return Nr(e)}var oi=function(){function e(){}return e.prototype.addDefaultExamples=function(e){return e.visit(this),e},e.prototype.visitTag=function(e){var t=this;if("ph"===e.name){if(!e.children||0==e.children.length){var n=new Zr(e.attrs.name||"...");e.children=[new Yr("ex",{},[n])]}}else e.children&&e.children.forEach(function(e){return e.visit(t)})},e.prototype.visitText=function(e){},e.prototype.visitDeclaration=function(e){},e.prototype.visitDoctype=function(e){},e}();function si(e){return e.toUpperCase().replace(/[^A-Z0-9_]/g,"_")}
|
|
101
101
|
/**
|
|
102
102
|
* @license
|
|
103
103
|
* Copyright Google Inc. All Rights Reserved.
|
|
104
104
|
*
|
|
105
105
|
* Use of this source code is governed by an MIT-style license that can be
|
|
106
106
|
* found in the LICENSE file at https://angular.io/license
|
|
107
|
-
*/
|
|
107
|
+
*/function ai(e,t){return void 0===t&&(t=!1),dt(Object.keys(e).map(function(n){return{key:n,quoted:t,value:e[n]}}))}
|
|
108
108
|
/**
|
|
109
109
|
* @license
|
|
110
110
|
* Copyright Google Inc. All Rights Reserved.
|
|
111
111
|
*
|
|
112
112
|
* Use of this source code is governed by an MIT-style license that can be
|
|
113
113
|
* found in the LICENSE file at https://angular.io/license
|
|
114
|
-
*/
|
|
115
|
-
var Br=/-/,Hr="_t",Ur="ctx",qr="rf";function Kr(e,t){var n=null;return function(){return n||(e.push(new Xe(Hr,void 0,he)),n=ct(t)),n}}function zr(e){if(this)throw new Error("Builder "+this.constructor.name+" doesn't support "+e+" yet");throw new Error("Feature "+e+" is not supported yet")}function Wr(e){throw new Error("Invalid state: Visitor "+this.constructor.name+" doesn't handle "+e.constructor.name)}function Qr(e){return Array.isArray(e)?ft(e.map(Qr)):yt(e,fe)}function $r(e,t){return Object.getOwnPropertyNames(e).length>0?function n(e,t){return dt(Object.getOwnPropertyNames(e).map(function(n){var r,i,o,s,a,u=e[n];return Array.isArray(u)?(s=(r=h(u,2))[0],o=r[1]):(o=(i=h(bt(n,[n,u]),2))[0],s=i[1]),{key:a=o,quoted:Br.test(a),value:t&&s!==o?ft([Qr(s),Qr(o)]):Qr(s)}}))}(e,t):null}function Gr(e){for(;(t=e[e.length-1])instanceof Me&&null===t.value;)e.pop();var t;return e}function Xr(e,t){if(Array.isArray(e.predicate)){var n=[];return e.predicate.forEach(function(e){var t=e.split(",").map(function(e){return yt(e.trim())});n.push.apply(n,f(t))}),t.getConstLiteral(ft(n),!0)}return e.predicate}var Yr,Zr,Jr=function(){function e(){this.values=[]}return e.prototype.set=function(e,t){t&&this.values.push({key:e,value:t,quoted:!1})},e.prototype.toLiteralMap=function(){return dt(this.values)},e}();function ei(e){var t=ct("t"),n=[],r=ri(e)?t:new Be(ue.Or,t,e.type),i=null;if(null!==e.deps)"invalid"!==e.deps&&(i=new Ie(r,ti(e.deps,e.injectFn)));else{var o=ct("ɵ"+e.name+"_BaseFactory"),s=pt(yn.getInheritedFactory),a=o.set(s.callFn([e.type])).toDeclStmt(fe,[ke.Exported,ke.Final]);n.push(a),i=o.callFn([r])}var u=i,l=[],c=null;function p(n){var r,i=ct("r");return l.push(i.set(Qe).toDeclStmt()),r=null!==u?i.set(u).toStmt():ni(e.name),l.push(mt(t,[r],[i.set(n).toStmt()])),i}if(ri(e)&&e.delegateType===Yr.Factory){var h=ct("ɵ"+e.name+"_BaseFactory"),f=pt(yn.getFactoryOf);if(e.delegate.isEquivalent(e.type))throw new Error("Illegal state: compiling factory that delegates to itself");var d=h.set(f.callFn([e.delegate])).toDeclStmt(fe,[ke.Exported,ke.Final]);n.push(d),c=p(h.callFn([]))}else if(ri(e)){var v=ti(e.delegateDeps,e.injectFn);c=p(new(e.delegateType===Yr.Class?Ie:Pe)(e.delegate,v))}else c=function m(e){return void 0!==e.expression}
|
|
114
|
+
*/var ui="MSG_",li="goog.getMsg",ci="ngI18nClosureMode",pi="i18n",hi="i18n-",fi="�";function di(e,t,n,r,i){var o=[];o.push(new Xe(e.name,void 0,fe,null,e.sourceSpan));var s=[yt(n)];i&&Object.keys(i).length&&s.push(ai(i,!0));var a=function u(e){var t=[];return e.description&&t.push({tagName:"desc",text:e.description}),e.meaning&&t.push({tagName:"meaning",text:e.meaning}),0==t.length?null:new ot(t)}(r),l=a?[a]:[],c=ct(li).callFn(s);l.push(t.set(c).toConstDecl()),l.push(new Ze(e.set(t)));var p=pt(yn.i18nLocalize).callFn(s),h=[new Ze(e.set(p))];return o.push(mt(ct(ci),l,h)),o}function vi(e){return e===pi||e.startsWith(hi)}function mi(e){return e instanceof yr}function yi(e){return mi(e)&&1===e.nodes.length&&e.nodes[0]instanceof br}function gi(e,t){return void 0===t&&(t=null),{id:"string"==typeof t?t:e.id||"",meaning:e.meaning||"",description:e.description||""}}function _i(e){return e.nodes[0]}function bi(e,t){return void 0===t&&(t=0),""+fi+e+(t>0?":"+t:"")+fi}function wi(e){void 0===e&&(e=0);var t=e;return function(){return t++}}function xi(e){var t={};return e.forEach(function(e,n){t[n]=yt(e.length>1?"["+e.join("|")+"]":e[0])}),t}function Ei(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=e.get(t)||[];i.push.apply(i,f(n)),e.set(t,i)}function Si(e,t,n){void 0===t&&(t=0),void 0===n&&(n=0);var r=t,i=new Map,o=e instanceof yr?e.nodes.find(function(e){return e instanceof _r}):e;return o&&o.children.filter(function(e){return e instanceof xr}).forEach(function(e,t){var o=bi(r+t,n);Ei(i,e.name,o)}),i}function Ci(e){var t,n=si(e).split("_");if(1===n.length)return e.toLowerCase();/^\d+$/.test(n[n.length-1])&&(t=n.pop());var r=n.shift().toLowerCase();return n.length&&(r+=n.map(function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}).join("")),t?r+"_"+t:r}function Ti(e){return(""+ui+e).toUpperCase()}
|
|
116
115
|
/**
|
|
117
116
|
* @license
|
|
118
117
|
* Copyright Google Inc. All Rights Reserved.
|
|
119
118
|
*
|
|
120
119
|
* Use of this source code is governed by an MIT-style license that can be
|
|
121
120
|
* found in the LICENSE file at https://angular.io/license
|
|
122
|
-
*/
|
|
121
|
+
*/
|
|
122
|
+
var Ni=/[-.]/,ki="_t",Ai="ctx",Pi="rf";function Ii(e,t){var n=null;return function(){return n||(e.push(new Xe(ki,void 0,he)),n=ct(t)),n}}function Mi(e){if(this)throw new Error("Builder "+this.constructor.name+" doesn't support "+e+" yet");throw new Error("Feature "+e+" is not supported yet")}function Oi(e){throw new Error("Invalid state: Visitor "+this.constructor.name+" doesn't handle "+e.constructor.name)}function Ri(e){return Array.isArray(e)?ft(e.map(Ri)):yt(e,fe)}function Di(e,t){return Object.getOwnPropertyNames(e).length>0?function n(e,t){return dt(Object.getOwnPropertyNames(e).map(function(n){var r,i,o,s,a,u=e[n];return Array.isArray(u)?(s=(r=h(u,2))[0],o=r[1]):(o=(i=h(bt(n,[n,u]),2))[0],s=i[1]),{key:a=o,quoted:Ni.test(a),value:t&&s!==o?ft([Ri(s),Ri(o)]):Ri(s)}}))}(e,t):null}function Li(e){for(;(t=e[e.length-1])instanceof Me&&null===t.value;)e.pop();var t;return e}function Fi(e,t){if(Array.isArray(e.predicate)){var n=[];return e.predicate.forEach(function(e){var t=e.split(",").map(function(e){return yt(e.trim())});n.push.apply(n,f(t))}),t.getConstLiteral(ft(n),!0)}return e.predicate}var ji,Vi,Bi=function(){function e(){this.values=[]}return e.prototype.set=function(e,t){t&&this.values.push({key:e,value:t,quoted:!1})},e.prototype.toLiteralMap=function(){return dt(this.values)},e}();function Hi(e){var t=ct("t"),n=[],r=Ki(e)?t:new Be(ue.Or,t,e.type),i=null;if(null!==e.deps)"invalid"!==e.deps&&(i=new Ie(r,Ui(e.deps,e.injectFn)));else{var o=ct("ɵ"+e.name+"_BaseFactory"),s=pt(yn.getInheritedFactory),a=o.set(s.callFn([e.type])).toDeclStmt(fe,[ke.Exported,ke.Final]);n.push(a),i=o.callFn([r])}var u=i,l=[],c=null;function p(n){var r,i=ct("r");return l.push(i.set(Qe).toDeclStmt()),r=null!==u?i.set(u).toStmt():qi(e.name),l.push(mt(t,[r],[i.set(n).toStmt()])),i}if(Ki(e)&&e.delegateType===ji.Factory){var h=ct("ɵ"+e.name+"_BaseFactory"),f=pt(yn.getFactoryOf);if(e.delegate.isEquivalent(e.type))throw new Error("Illegal state: compiling factory that delegates to itself");var d=h.set(f.callFn([e.delegate])).toDeclStmt(fe,[ke.Exported,ke.Final]);n.push(d),c=p(h.callFn([]))}else if(Ki(e)){var v=Ui(e.delegateDeps,e.injectFn);c=p(new(e.delegateType===ji.Class?Ie:Pe)(e.delegate,v))}else c=function m(e){return void 0!==e.expression}
|
|
123
123
|
/**
|
|
124
124
|
* @license
|
|
125
125
|
* Copyright Google Inc. All Rights Reserved.
|
|
126
126
|
*
|
|
127
127
|
* Use of this source code is governed by an MIT-style license that can be
|
|
128
128
|
* found in the LICENSE file at https://angular.io/license
|
|
129
|
-
*/
|
|
129
|
+
*/(e)?p(e.expression):i;return l.push(null!==c?new Je(c):qi(e.name)),{factory:vt([new je("t",he)],l,fe,void 0,e.name+"_Factory"),statements:n}}function Ui(e,t){return e.map(function(e){return function n(e,t){switch(e.resolved){case Vi.Token:var n=0|(e.self?2:0)|(e.skipSelf?4:0)|(e.host?1:0)|(e.optional?8:0),r=[e.token];return(0!==n||e.optional)&&r.push(yt(n)),pt(t).callFn(r);case Vi.Attribute:return pt(yn.injectAttribute).callFn([e.token]);default:return Mi("Unknown R3ResolvedDependencyType: "+Vi[e.resolved])}}(e,t)})}function qi(e){return new at(new Ie(new xe("Error"),[yt(e+" has a constructor which is not compatible with Dependency Injection. It should probably not be @Injectable().")]))}function Ki(e){return void 0!==e.delegateType}function zi(e){return dt(Object.keys(e).map(function(t){return{key:t,value:e[t],quoted:!1}}))}function Wi(e,t){var n=null;if(t>0){n=[];for(var r=0;r<t;r++)n.push(he)}return ht(e,null,n)}!function(e){e[e.Class=0]="Class",e[e.Function=1]="Function",e[e.Factory=2]="Factory"}(ji||(ji={})),function(e){e[e.Token=0]="Token",e[e.Attribute=1]="Attribute"}(Vi||(Vi={}));var Qi="@";function $i(e){return""+Qi+e}function Gi(e,t){return"animation_"+e+"_"+t}
|
|
130
130
|
/**
|
|
131
131
|
* @license
|
|
132
132
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -134,49 +134,49 @@ var Br=/-/,Hr="_t",Ur="ctx",qr="rf";function Kr(e,t){var n=null;return function(
|
|
|
134
134
|
* Use of this source code is governed by an MIT-style license that can be
|
|
135
135
|
* found in the LICENSE file at https://angular.io/license
|
|
136
136
|
*/
|
|
137
|
-
function li(e,t){if(null!=t){if(!Array.isArray(t))throw new Error("Expected '"+e+"' to be an array of strings.");for(var n=0;n<t.length;n+=1)if("string"!=typeof t[n])throw new Error("Expected '"+e+"' to be an array of strings.")}}var ci=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function pi(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){var n=t[0],r=t[1];ci.forEach(function(e){if(e.test(n)||e.test(r))throw new Error("['"+n+"', '"+r+"'] contains unusable interpolation symbol.")})}}
|
|
138
137
|
/**
|
|
139
138
|
* @license
|
|
140
139
|
* Copyright Google Inc. All Rights Reserved.
|
|
141
140
|
*
|
|
142
141
|
* Use of this source code is governed by an MIT-style license that can be
|
|
143
142
|
* found in the LICENSE file at https://angular.io/license
|
|
144
|
-
*/
|
|
143
|
+
*/
|
|
144
|
+
function Xi(e,t){if(null!=t){if(!Array.isArray(t))throw new Error("Expected '"+e+"' to be an array of strings.");for(var n=0;n<t.length;n+=1)if("string"!=typeof t[n])throw new Error("Expected '"+e+"' to be an array of strings.")}}var Yi=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function Zi(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){var n=t[0],r=t[1];Yi.forEach(function(e){if(e.test(n)||e.test(r))throw new Error("['"+n+"', '"+r+"'] contains unusable interpolation symbol.")})}}
|
|
145
145
|
/**
|
|
146
146
|
* @license
|
|
147
147
|
* Copyright Google Inc. All Rights Reserved.
|
|
148
148
|
*
|
|
149
149
|
* Use of this source code is governed by an MIT-style license that can be
|
|
150
150
|
* found in the LICENSE file at https://angular.io/license
|
|
151
|
-
*/var
|
|
151
|
+
*/var Ji=function(){function e(e,t){this.start=e,this.end=t}return e.fromArray=function(t){return t?(Zi("interpolation",t),new e(t[0],t[1])):eo},e}(),eo=new Ji("{{","}}"),to=function(){function e(e){void 0===e&&(e=null),this.file=e,this.sourcesContent=new Map,this.lines=[],this.lastCol0=0,this.hasMappings=!1}return e.prototype.addSource=function(e,t){return void 0===t&&(t=null),this.sourcesContent.has(e)||this.sourcesContent.set(e,t),this},e.prototype.addLine=function(){return this.lines.push([]),this.lastCol0=0,this},e.prototype.addMapping=function(e,t,n,r){if(!this.currentLine)throw new Error("A line must be added before mappings can be added");if(null!=t&&!this.sourcesContent.has(t))throw new Error('Unknown source file "'+t+'"');if(null==e)throw new Error("The column in the generated code must be provided");if(e<this.lastCol0)throw new Error("Mapping should be added in output order");if(t&&(null==n||null==r))throw new Error("The source location must be provided when a source url is provided");return this.hasMappings=!0,this.lastCol0=e,this.currentLine.push({col0:e,sourceUrl:t,sourceLine0:n,sourceCol0:r}),this},Object.defineProperty(e.prototype,"currentLine",{get:function(){return this.lines.slice(-1)[0]},enumerable:!0,configurable:!0}),e.prototype.toJSON=function(){var e=this;if(!this.hasMappings)return null;var t=new Map,n=[],r=[];Array.from(this.sourcesContent.keys()).forEach(function(i,o){t.set(i,o),n.push(i),r.push(e.sourcesContent.get(i)||null)});var i="",o=0,s=0,a=0,u=0;return this.lines.forEach(function(e){o=0,i+=e.map(function(e){var n=no(e.col0-o);return o=e.col0,null!=e.sourceUrl&&(n+=no(t.get(e.sourceUrl)-s),s=t.get(e.sourceUrl),n+=no(e.sourceLine0-a),a=e.sourceLine0,n+=no(e.sourceCol0-u),u=e.sourceCol0),n}).join(","),i+=";"}),i=i.slice(0,-1),{file:this.file||"",version:3,sourceRoot:"",sources:n,sourcesContent:r,mappings:i}},e.prototype.toJsComment=function(){return this.hasMappings?"//# sourceMappingURL=data:application/json;base64,"+function e(t){var n="";t=Ot(t);for(var r=0;r<t.length;){var i=t.charCodeAt(r++),o=t.charCodeAt(r++),s=t.charCodeAt(r++);n+=io(i>>2),n+=io((3&i)<<4|(isNaN(o)?0:o>>4)),n+=isNaN(o)?"=":io((15&o)<<2|s>>6),n+=isNaN(o)||isNaN(s)?"=":io(63&s)}return n}(JSON.stringify(this,null,0)):""},e}();function no(e){e=e<0?1+(-e<<1):e<<1;var t="";do{var n=31&e;(e>>=5)>0&&(n|=32),t+=io(n)}while(e>0);return t}var ro="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function io(e){if(e<0||e>=64)throw new Error("Can only encode value in the range [0, 63]");return ro[e]}
|
|
152
152
|
/**
|
|
153
153
|
* @license
|
|
154
154
|
* Copyright Google Inc. All Rights Reserved.
|
|
155
155
|
*
|
|
156
156
|
* Use of this source code is governed by an MIT-style license that can be
|
|
157
157
|
* found in the LICENSE file at https://angular.io/license
|
|
158
|
-
*/var
|
|
158
|
+
*/var oo=/'|\\|\n|\r|\$/g,so=/^[$A-Z_][0-9A-Z_$]*$/i,ao=" ",uo=ct("error",null,null),lo=ct("stack",null,null),co=function co(e){this.indent=e,this.partsLength=0,this.parts=[],this.srcSpans=[]},po=function(){function e(e){this._indent=e,this._classes=[],this._preambleLineCount=0,this._lines=[new co(e)]}return e.createRoot=function(){return new e(0)},Object.defineProperty(e.prototype,"_currentLine",{get:function(){return this._lines[this._lines.length-1]},enumerable:!0,configurable:!0}),e.prototype.println=function(e,t){void 0===t&&(t=""),this.print(e||null,t,!0)},e.prototype.lineIsEmpty=function(){return 0===this._currentLine.parts.length},e.prototype.lineLength=function(){return this._currentLine.indent*ao.length+this._currentLine.partsLength},e.prototype.print=function(e,t,n){void 0===n&&(n=!1),t.length>0&&(this._currentLine.parts.push(t),this._currentLine.partsLength+=t.length,this._currentLine.srcSpans.push(e&&e.sourceSpan||null)),n&&this._lines.push(new co(this._indent))},e.prototype.removeEmptyLastLine=function(){this.lineIsEmpty()&&this._lines.pop()},e.prototype.incIndent=function(){this._indent++,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)},e.prototype.decIndent=function(){this._indent--,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)},e.prototype.pushClass=function(e){this._classes.push(e)},e.prototype.popClass=function(){return this._classes.pop()},Object.defineProperty(e.prototype,"currentClass",{get:function(){return this._classes.length>0?this._classes[this._classes.length-1]:null},enumerable:!0,configurable:!0}),e.prototype.toSource=function(){return this.sourceLines.map(function(e){return e.parts.length>0?vo(e.indent)+e.parts.join(""):""}).join("\n")},e.prototype.toSourceMapGenerator=function(e,t){void 0===t&&(t=0);for(var n=new to(e),r=!1,i=function(){r||(n.addSource(e," ").addMapping(0,e,0,0),r=!0)},o=0;o<t;o++)n.addLine(),i();return this.sourceLines.forEach(function(e,t){n.addLine();for(var o=e.srcSpans,s=e.parts,a=e.indent*ao.length,u=0;u<o.length&&!o[u];)a+=s[u].length,u++;for(u<o.length&&0===t&&0===a?r=!0:i();u<o.length;){var l=o[u],c=l.start.file,p=l.start.line,h=l.start.col;for(n.addSource(c.url,c.content).addMapping(a,c.url,p,h),a+=s[u].length,u++;u<o.length&&(l===o[u]||!o[u]);)a+=s[u].length,u++}}),n},e.prototype.setPreambleLineCount=function(e){return this._preambleLineCount=e},e.prototype.spanOf=function(e,t){var n=this._lines[e-this._preambleLineCount];if(n)for(var r=t-vo(n.indent).length,i=0;i<n.parts.length;i++){var o=n.parts[i];if(o.length>r)return n.srcSpans[i];r-=o.length}return null},Object.defineProperty(e.prototype,"sourceLines",{get:function(){return this._lines.length&&0===this._lines[this._lines.length-1].parts.length?this._lines.slice(0,-1):this._lines},enumerable:!0,configurable:!0}),e}(),ho=function(){function e(e){this._escapeDollarInStrings=e}return e.prototype.visitExpressionStmt=function(e,t){return e.expr.visitExpression(this,t),t.println(e,";"),null},e.prototype.visitReturnStmt=function(e,t){return t.print(e,"return "),e.value.visitExpression(this,t),t.println(e,";"),null},e.prototype.visitIfStmt=function(e,t){t.print(e,"if ("),e.condition.visitExpression(this,t),t.print(e,") {");var n=null!=e.falseCase&&e.falseCase.length>0;return e.trueCase.length<=1&&!n?(t.print(e," "),this.visitAllStatements(e.trueCase,t),t.removeEmptyLastLine(),t.print(e," ")):(t.println(),t.incIndent(),this.visitAllStatements(e.trueCase,t),t.decIndent(),n&&(t.println(e,"} else {"),t.incIndent(),this.visitAllStatements(e.falseCase,t),t.decIndent())),t.println(e,"}"),null},e.prototype.visitThrowStmt=function(e,t){return t.print(e,"throw "),e.error.visitExpression(this,t),t.println(e,";"),null},e.prototype.visitCommentStmt=function(e,t){return e.multiline?t.println(e,"/* "+e.comment+" */"):e.comment.split("\n").forEach(function(n){t.println(e,"// "+n)}),null},e.prototype.visitJSDocCommentStmt=function(e,t){return t.println(e,"/*"+e.toString()+"*/"),null},e.prototype.visitWriteVarExpr=function(e,t){var n=t.lineIsEmpty();return n||t.print(e,"("),t.print(e,e.name+" = "),e.value.visitExpression(this,t),n||t.print(e,")"),null},e.prototype.visitWriteKeyExpr=function(e,t){var n=t.lineIsEmpty();return n||t.print(e,"("),e.receiver.visitExpression(this,t),t.print(e,"["),e.index.visitExpression(this,t),t.print(e,"] = "),e.value.visitExpression(this,t),n||t.print(e,")"),null},e.prototype.visitWritePropExpr=function(e,t){var n=t.lineIsEmpty();return n||t.print(e,"("),e.receiver.visitExpression(this,t),t.print(e,"."+e.name+" = "),e.value.visitExpression(this,t),n||t.print(e,")"),null},e.prototype.visitInvokeMethodExpr=function(e,t){e.receiver.visitExpression(this,t);var n=e.name;return null!=e.builtin&&null==(n=this.getBuiltinMethodName(e.builtin))?null:(t.print(e,"."+n+"("),this.visitAllExpressions(e.args,t,","),t.print(e,")"),null)},e.prototype.visitInvokeFunctionExpr=function(e,t){return e.fn.visitExpression(this,t),t.print(e,"("),this.visitAllExpressions(e.args,t,","),t.print(e,")"),null},e.prototype.visitWrappedNodeExpr=function(e,t){throw new Error("Abstract emitter cannot visit WrappedNodeExpr.")},e.prototype.visitTypeofExpr=function(e,t){t.print(e,"typeof "),e.expr.visitExpression(this,t)},e.prototype.visitReadVarExpr=function(e,t){var n=e.name;if(null!=e.builtin)switch(e.builtin){case _e.Super:n="super";break;case _e.This:n="this";break;case _e.CatchError:n=uo.name;break;case _e.CatchStack:n=lo.name;break;default:throw new Error("Unknown builtin variable "+e.builtin)}return t.print(e,n),null},e.prototype.visitInstantiateExpr=function(e,t){return t.print(e,"new "),e.classExpr.visitExpression(this,t),t.print(e,"("),this.visitAllExpressions(e.args,t,","),t.print(e,")"),null},e.prototype.visitLiteralExpr=function(e,t){var n=e.value;return t.print(e,"string"==typeof n?fo(n,this._escapeDollarInStrings):""+n),null},e.prototype.visitConditionalExpr=function(e,t){return t.print(e,"("),e.condition.visitExpression(this,t),t.print(e,"? "),e.trueCase.visitExpression(this,t),t.print(e,": "),e.falseCase.visitExpression(this,t),t.print(e,")"),null},e.prototype.visitNotExpr=function(e,t){return t.print(e,"!"),e.condition.visitExpression(this,t),null},e.prototype.visitAssertNotNullExpr=function(e,t){return e.condition.visitExpression(this,t),null},e.prototype.visitBinaryOperatorExpr=function(e,t){var n;switch(e.operator){case ue.Equals:n="==";break;case ue.Identical:n="===";break;case ue.NotEquals:n="!=";break;case ue.NotIdentical:n="!==";break;case ue.And:n="&&";break;case ue.BitwiseAnd:n="&";break;case ue.Or:n="||";break;case ue.Plus:n="+";break;case ue.Minus:n="-";break;case ue.Divide:n="/";break;case ue.Multiply:n="*";break;case ue.Modulo:n="%";break;case ue.Lower:n="<";break;case ue.LowerEquals:n="<=";break;case ue.Bigger:n=">";break;case ue.BiggerEquals:n=">=";break;default:throw new Error("Unknown operator "+e.operator)}return e.parens&&t.print(e,"("),e.lhs.visitExpression(this,t),t.print(e," "+n+" "),e.rhs.visitExpression(this,t),e.parens&&t.print(e,")"),null},e.prototype.visitReadPropExpr=function(e,t){return e.receiver.visitExpression(this,t),t.print(e,"."),t.print(e,e.name),null},e.prototype.visitReadKeyExpr=function(e,t){return e.receiver.visitExpression(this,t),t.print(e,"["),e.index.visitExpression(this,t),t.print(e,"]"),null},e.prototype.visitLiteralArrayExpr=function(e,t){return t.print(e,"["),this.visitAllExpressions(e.entries,t,","),t.print(e,"]"),null},e.prototype.visitLiteralMapExpr=function(e,t){var n=this;return t.print(e,"{"),this.visitAllObjects(function(r){t.print(e,fo(r.key,n._escapeDollarInStrings,r.quoted)+":"),r.value.visitExpression(n,t)},e.entries,t,","),t.print(e,"}"),null},e.prototype.visitCommaExpr=function(e,t){return t.print(e,"("),this.visitAllExpressions(e.parts,t,","),t.print(e,")"),null},e.prototype.visitAllExpressions=function(e,t,n){var r=this;this.visitAllObjects(function(e){return e.visitExpression(r,t)},e,t,n)},e.prototype.visitAllObjects=function(e,t,n,r){for(var i=!1,o=0;o<t.length;o++)o>0&&(n.lineLength()>80?(n.print(null,r,!0),i||(n.incIndent(),n.incIndent(),i=!0)):n.print(null,r,!1)),e(t[o]);i&&(n.decIndent(),n.decIndent())},e.prototype.visitAllStatements=function(e,t){var n=this;e.forEach(function(e){return e.visitStatement(n,t)})},e}();function fo(e,t,n){if(void 0===n&&(n=!0),null==e)return null;var r=e.replace(oo,function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return"$"==e[0]?t?"\\$":"$":"\n"==e[0]?"\\n":"\r"==e[0]?"\\r":"\\"+e[0]});return n||!so.test(r)?"'"+r+"'":r}function vo(e){for(var t="",n=0;n<e;n++)t+=ao;return t}
|
|
159
159
|
/**
|
|
160
160
|
* @license
|
|
161
161
|
* Copyright Google Inc. All Rights Reserved.
|
|
162
162
|
*
|
|
163
163
|
* Use of this source code is governed by an MIT-style license that can be
|
|
164
164
|
* found in the LICENSE file at https://angular.io/license
|
|
165
|
-
*/(
|
|
165
|
+
*/var mo=function(e){function t(){return e.call(this,!1)||this}return o(t,e),t.prototype.visitDeclareClassStmt=function(e,t){var n=this;return t.pushClass(e),this._visitClassConstructor(e,t),null!=e.parent&&(t.print(e,e.name+".prototype = Object.create("),e.parent.visitExpression(this,t),t.println(e,".prototype);")),e.getters.forEach(function(r){return n._visitClassGetter(e,r,t)}),e.methods.forEach(function(r){return n._visitClassMethod(e,r,t)}),t.popClass(),null},t.prototype._visitClassConstructor=function(e,t){t.print(e,"function "+e.name+"("),null!=e.constructorMethod&&this._visitParams(e.constructorMethod.params,t),t.println(e,") {"),t.incIndent(),null!=e.constructorMethod&&e.constructorMethod.body.length>0&&(t.println(e,"var self = this;"),this.visitAllStatements(e.constructorMethod.body,t)),t.decIndent(),t.println(e,"}")},t.prototype._visitClassGetter=function(e,t,n){n.println(e,"Object.defineProperty("+e.name+".prototype, '"+t.name+"', { get: function() {"),n.incIndent(),t.body.length>0&&(n.println(e,"var self = this;"),this.visitAllStatements(t.body,n)),n.decIndent(),n.println(e,"}});")},t.prototype._visitClassMethod=function(e,t,n){n.print(e,e.name+".prototype."+t.name+" = function("),this._visitParams(t.params,n),n.println(e,") {"),n.incIndent(),t.body.length>0&&(n.println(e,"var self = this;"),this.visitAllStatements(t.body,n)),n.decIndent(),n.println(e,"};")},t.prototype.visitWrappedNodeExpr=function(e,t){throw new Error("Cannot emit a WrappedNodeExpr in Javascript.")},t.prototype.visitReadVarExpr=function(t,n){if(t.builtin===_e.This)n.print(t,"self");else{if(t.builtin===_e.Super)throw new Error("'super' needs to be handled at a parent ast node, not at the variable level!");e.prototype.visitReadVarExpr.call(this,t,n)}return null},t.prototype.visitDeclareVarStmt=function(e,t){return t.print(e,"var "+e.name),e.value&&(t.print(e," = "),e.value.visitExpression(this,t)),t.println(e,";"),null},t.prototype.visitCastExpr=function(e,t){return e.value.visitExpression(this,t),null},t.prototype.visitInvokeFunctionExpr=function(t,n){var r=t.fn;return r instanceof xe&&r.builtin===_e.Super?(n.currentClass.parent.visitExpression(this,n),n.print(t,".call(this"),t.args.length>0&&(n.print(t,", "),this.visitAllExpressions(t.args,n,",")),n.print(t,")")):e.prototype.visitInvokeFunctionExpr.call(this,t,n),null},t.prototype.visitFunctionExpr=function(e,t){return t.print(e,"function"+(e.name?" "+e.name:"")+"("),this._visitParams(e.params,t),t.println(e,") {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.print(e,"}"),null},t.prototype.visitDeclareFunctionStmt=function(e,t){return t.print(e,"function "+e.name+"("),this._visitParams(e.params,t),t.println(e,") {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.println(e,"}"),null},t.prototype.visitTryCatchStmt=function(e,t){t.println(e,"try {"),t.incIndent(),this.visitAllStatements(e.bodyStmts,t),t.decIndent(),t.println(e,"} catch ("+uo.name+") {"),t.incIndent();var n=[lo.set(uo.prop("stack")).toDeclStmt(null,[ke.Final])].concat(e.catchStmts);return this.visitAllStatements(n,t),t.decIndent(),t.println(e,"}"),null},t.prototype._visitParams=function(e,t){this.visitAllObjects(function(e){return t.print(null,e.name)},e,t,",")},t.prototype.getBuiltinMethodName=function(e){var t;switch(e){case we.ConcatArray:t="concat";break;case we.SubscribeObservable:t="subscribe";break;case we.Bind:t="bind";break;default:throw new Error("Unknown builtin method: "+e)}return t},t}(ho),yo=function(){function e(){}return e.prototype.evaluateStatements=function(e,t,n,r){var i=new go(n),o=po.createRoot();return t.length>0&&!function s(e){return e.isEquivalent(yt("use strict").toStmt())}
|
|
166
166
|
/**
|
|
167
167
|
* @license
|
|
168
168
|
* Copyright Google Inc. All Rights Reserved.
|
|
169
169
|
*
|
|
170
170
|
* Use of this source code is governed by an MIT-style license that can be
|
|
171
171
|
* found in the LICENSE file at https://angular.io/license
|
|
172
|
-
*/function
|
|
172
|
+
*/(t[0])&&(t=f([yt("use strict").toStmt()],t)),i.visitAllStatements(t,o),i.createReturnStmt(o),this.evaluateCode(e,o,i.getArgs(),r)},e.prototype.evaluateCode=function(e,t,n,r){var i='"use strict";'+t.toSource()+"\n//# sourceURL="+e,o=[],s=[];for(var a in n)s.push(n[a]),o.push(a);if(r){var u=(new(Function.bind.apply(Function,f([void 0],o.concat("return null;"))))).toString(),l=u.slice(0,u.indexOf("return null;")).split("\n").length-1;i+="\n"+t.toSourceMapGenerator(e,l).toJsComment()}var c=new(Function.bind.apply(Function,f([void 0],o.concat(i))));return this.executeFunction(c,s)},e.prototype.executeFunction=function(e,t){return e.apply(void 0,f(t))},e}(),go=function(e){function t(t){var n=e.call(this)||this;return n.reflector=t,n._evalArgNames=[],n._evalArgValues=[],n._evalExportedVars=[],n}return o(t,e),t.prototype.createReturnStmt=function(e){new Je(new ze(this._evalExportedVars.map(function(e){return new Ke(e,ct(e),!1)}))).visitStatement(this,e)},t.prototype.getArgs=function(){for(var e={},t=0;t<this._evalArgNames.length;t++)e[this._evalArgNames[t]]=this._evalArgValues[t];return e},t.prototype.visitExternalExpr=function(e,t){return this._emitReferenceToExternal(e,this.reflector.resolveExternalReference(e.value),t),null},t.prototype.visitWrappedNodeExpr=function(e,t){return this._emitReferenceToExternal(e,e.node,t),null},t.prototype.visitDeclareVarStmt=function(t,n){return t.hasModifier(ke.Exported)&&this._evalExportedVars.push(t.name),e.prototype.visitDeclareVarStmt.call(this,t,n)},t.prototype.visitDeclareFunctionStmt=function(t,n){return t.hasModifier(ke.Exported)&&this._evalExportedVars.push(t.name),e.prototype.visitDeclareFunctionStmt.call(this,t,n)},t.prototype.visitDeclareClassStmt=function(t,n){return t.hasModifier(ke.Exported)&&this._evalExportedVars.push(t.name),e.prototype.visitDeclareClassStmt.call(this,t,n)},t.prototype._emitReferenceToExternal=function(e,t,n){var r=this._evalArgValues.indexOf(t);if(-1===r){r=this._evalArgValues.length,this._evalArgValues.push(t);var i=rn({reference:t})||"val";this._evalArgNames.push("jit_"+i+"_"+r)}n.print(e,this._evalArgNames[r])},t}(mo),_o=function(){function e(e){this.context=e}return e.prototype.resolveExternalReference=function(e){if("@angular/core"!==e.moduleName)throw new Error("Cannot resolve external reference to "+e.moduleName+", only references to @angular/core are supported.");if(!this.context.hasOwnProperty(e.name))throw new Error("No value provided for @angular/core symbol '"+e.name+"'.");return this.context[e.name]},e.prototype.parameters=function(e){throw new Error("Not implemented.")},e.prototype.annotations=function(e){throw new Error("Not implemented.")},e.prototype.shallowAnnotations=function(e){throw new Error("Not implemented.")},e.prototype.tryAnnotations=function(e){throw new Error("Not implemented.")},e.prototype.propMetadata=function(e){throw new Error("Not implemented.")},e.prototype.hasLifecycleHook=function(e,t){throw new Error("Not implemented.")},e.prototype.guards=function(e){throw new Error("Not implemented.")},e.prototype.componentModuleUrl=function(e,t){throw new Error("Not implemented.")},e}();
|
|
173
173
|
/**
|
|
174
174
|
* @license
|
|
175
175
|
* Copyright Google Inc. All Rights Reserved.
|
|
176
176
|
*
|
|
177
177
|
* Use of this source code is governed by an MIT-style license that can be
|
|
178
178
|
* found in the LICENSE file at https://angular.io/license
|
|
179
|
-
*/
|
|
179
|
+
*/function bo(e){var t=e.map(function(e){return function t(e){return new Ee(e)}(e.type)});return e.length>0?ht(ft(t)):me}function wo(e,t){var n=ft(e.map(function(e){return e.value}));return t?vt([],[new Je(n)]):n}
|
|
180
180
|
/**
|
|
181
181
|
* @license
|
|
182
182
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -191,7 +191,7 @@ function li(e,t){if(null!=t){if(!Array.isArray(t))throw new Error("Expected '"+e
|
|
|
191
191
|
* Use of this source code is governed by an MIT-style license that can be
|
|
192
192
|
* found in the LICENSE file at https://angular.io/license
|
|
193
193
|
*/
|
|
194
|
-
var xo=function xo(e,t,n,r){this.input=t,this.errLocation=n,this.ctxLocation=r,this.message="Parser Error: "+e+" "+n+" ["+t+"] in "+r},Eo=function Eo(e,t){this.start=e,this.end=t},So=function(){function e(e){this.span=e}return e.prototype.visit=function(e,t){return void 0===t&&(t=null),null},e.prototype.toString=function(){return"AST"},e}(),Co=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.prefix=n,o.uninterpretedExpression=r,o.location=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitQuote(this,t)},t.prototype.toString=function(){return"Quote"},t}(So),To=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.visit=function(e,t){void 0===t&&(t=null)},t}(So),No=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitImplicitReceiver(this,t)},t}(So),ko=function(e){function t(t,n){var r=e.call(this,t)||this;return r.expressions=n,r}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitChain(this,t)},t}(So),Ao=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.condition=n,o.trueExp=r,o.falseExp=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitConditional(this,t)},t}(So),Po=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.receiver=n,i.name=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPropertyRead(this,t)},t}(So),Io=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.receiver=n,o.name=r,o.value=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPropertyWrite(this,t)},t}(So),Mo=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.receiver=n,i.name=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitSafePropertyRead(this,t)},t}(So),Oo=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.obj=n,i.key=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitKeyedRead(this,t)},t}(So),Ro=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.obj=n,o.key=r,o.value=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitKeyedWrite(this,t)},t}(So),Do=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.exp=n,o.name=r,o.args=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPipe(this,t)},t}(So),Lo=function(e){function t(t,n){var r=e.call(this,t)||this;return r.value=n,r}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitLiteralPrimitive(this,t)},t}(So),Fo=function(e){function t(t,n){var r=e.call(this,t)||this;return r.expressions=n,r}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitLiteralArray(this,t)},t}(So),jo=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.keys=n,i.values=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitLiteralMap(this,t)},t}(So),Vo=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.strings=n,i.expressions=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitInterpolation(this,t)},t}(So),Bo=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.operation=n,o.left=r,o.right=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitBinary(this,t)},t}(So),Ho=function(e){function t(t,n){var r=e.call(this,t)||this;return r.expression=n,r}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPrefixNot(this,t)},t}(So),Uo=function(e){function t(t,n){var r=e.call(this,t)||this;return r.expression=n,r}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitNonNullAssert(this,t)},t}(So),qo=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.receiver=n,o.name=r,o.args=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitMethodCall(this,t)},t}(So),Ko=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.receiver=n,o.name=r,o.args=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitSafeMethodCall(this,t)},t}(So),zo=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.target=n,i.args=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitFunctionCall(this,t)},t}(So),Wo=function(e){function t(t,n,r,i){var o=e.call(this,new Eo(0,null==n?0:n.length))||this;return o.ast=t,o.source=n,o.location=r,o.errors=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),this.ast.visit(e,t)},t.prototype.toString=function(){return this.source+" in "+this.location},t}(So),Qo=function Qo(e,t,n,r,i){this.span=e,this.key=t,this.keyIsVar=n,this.name=r,this.expression=i},$o=function(){function e(){}return e.prototype.visitBinary=function(e,t){},e.prototype.visitChain=function(e,t){},e.prototype.visitConditional=function(e,t){},e.prototype.visitFunctionCall=function(e,t){},e.prototype.visitImplicitReceiver=function(e,t){},e.prototype.visitInterpolation=function(e,t){},e.prototype.visitKeyedRead=function(e,t){},e.prototype.visitKeyedWrite=function(e,t){},e.prototype.visitLiteralArray=function(e,t){},e.prototype.visitLiteralMap=function(e,t){},e.prototype.visitLiteralPrimitive=function(e,t){},e.prototype.visitMethodCall=function(e,t){},e.prototype.visitPipe=function(e,t){},e.prototype.visitPrefixNot=function(e,t){},e.prototype.visitNonNullAssert=function(e,t){},e.prototype.visitPropertyRead=function(e,t){},e.prototype.visitPropertyWrite=function(e,t){},e.prototype.visitQuote=function(e,t){},e.prototype.visitSafeMethodCall=function(e,t){},e.prototype.visitSafePropertyRead=function(e,t){},e}(),Go=function(){function e(){}return e.prototype.visitBinary=function(e,t){return e.left.visit(this),e.right.visit(this),null},e.prototype.visitChain=function(e,t){return this.visitAll(e.expressions,t)},e.prototype.visitConditional=function(e,t){return e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this),null},e.prototype.visitPipe=function(e,t){return e.exp.visit(this),this.visitAll(e.args,t),null},e.prototype.visitFunctionCall=function(e,t){return e.target.visit(this),this.visitAll(e.args,t),null},e.prototype.visitImplicitReceiver=function(e,t){return null},e.prototype.visitInterpolation=function(e,t){return this.visitAll(e.expressions,t)},e.prototype.visitKeyedRead=function(e,t){return e.obj.visit(this),e.key.visit(this),null},e.prototype.visitKeyedWrite=function(e,t){return e.obj.visit(this),e.key.visit(this),e.value.visit(this),null},e.prototype.visitLiteralArray=function(e,t){return this.visitAll(e.expressions,t)},e.prototype.visitLiteralMap=function(e,t){return this.visitAll(e.values,t)},e.prototype.visitLiteralPrimitive=function(e,t){return null},e.prototype.visitMethodCall=function(e,t){return e.receiver.visit(this),this.visitAll(e.args,t)},e.prototype.visitPrefixNot=function(e,t){return e.expression.visit(this),null},e.prototype.visitNonNullAssert=function(e,t){return e.expression.visit(this),null},e.prototype.visitPropertyRead=function(e,t){return e.receiver.visit(this),null},e.prototype.visitPropertyWrite=function(e,t){return e.receiver.visit(this),e.value.visit(this),null},e.prototype.visitSafePropertyRead=function(e,t){return e.receiver.visit(this),null},e.prototype.visitSafeMethodCall=function(e,t){return e.receiver.visit(this),this.visitAll(e.args,t)},e.prototype.visitAll=function(e,t){var n=this;return e.forEach(function(e){return e.visit(n,t)}),null},e.prototype.visitQuote=function(e,t){return null},e}(),Xo=function(){function e(){}return e.prototype.visitImplicitReceiver=function(e,t){return e},e.prototype.visitInterpolation=function(e,t){return new Vo(e.span,e.strings,this.visitAll(e.expressions))},e.prototype.visitLiteralPrimitive=function(e,t){return new Lo(e.span,e.value)},e.prototype.visitPropertyRead=function(e,t){return new Po(e.span,e.receiver.visit(this),e.name)},e.prototype.visitPropertyWrite=function(e,t){return new Io(e.span,e.receiver.visit(this),e.name,e.value.visit(this))},e.prototype.visitSafePropertyRead=function(e,t){return new Mo(e.span,e.receiver.visit(this),e.name)},e.prototype.visitMethodCall=function(e,t){return new qo(e.span,e.receiver.visit(this),e.name,this.visitAll(e.args))},e.prototype.visitSafeMethodCall=function(e,t){return new Ko(e.span,e.receiver.visit(this),e.name,this.visitAll(e.args))},e.prototype.visitFunctionCall=function(e,t){return new zo(e.span,e.target.visit(this),this.visitAll(e.args))},e.prototype.visitLiteralArray=function(e,t){return new Fo(e.span,this.visitAll(e.expressions))},e.prototype.visitLiteralMap=function(e,t){return new jo(e.span,e.keys,this.visitAll(e.values))},e.prototype.visitBinary=function(e,t){return new Bo(e.span,e.operation,e.left.visit(this),e.right.visit(this))},e.prototype.visitPrefixNot=function(e,t){return new Ho(e.span,e.expression.visit(this))},e.prototype.visitNonNullAssert=function(e,t){return new Uo(e.span,e.expression.visit(this))},e.prototype.visitConditional=function(e,t){return new Ao(e.span,e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this))},e.prototype.visitPipe=function(e,t){return new Do(e.span,e.exp.visit(this),e.name,this.visitAll(e.args))},e.prototype.visitKeyedRead=function(e,t){return new Oo(e.span,e.obj.visit(this),e.key.visit(this))},e.prototype.visitKeyedWrite=function(e,t){return new Ro(e.span,e.obj.visit(this),e.key.visit(this),e.value.visit(this))},e.prototype.visitAll=function(e){for(var t=new Array(e.length),n=0;n<e.length;++n)t[n]=e[n].visit(this);return t},e.prototype.visitChain=function(e,t){return new ko(e.span,this.visitAll(e.expressions))},e.prototype.visitQuote=function(e,t){return new Co(e.span,e.prefix,e.uninterpretedExpression,e.location)},e}(),Yo=function(){function e(){}return e.prototype.visitImplicitReceiver=function(e,t){return e},e.prototype.visitInterpolation=function(e,t){var n=this.visitAll(e.expressions);return n!==e.expressions?new Vo(e.span,e.strings,n):e},e.prototype.visitLiteralPrimitive=function(e,t){return e},e.prototype.visitPropertyRead=function(e,t){var n=e.receiver.visit(this);return n!==e.receiver?new Po(e.span,n,e.name):e},e.prototype.visitPropertyWrite=function(e,t){var n=e.receiver.visit(this),r=e.value.visit(this);return n!==e.receiver||r!==e.value?new Io(e.span,n,e.name,r):e},e.prototype.visitSafePropertyRead=function(e,t){var n=e.receiver.visit(this);return n!==e.receiver?new Mo(e.span,n,e.name):e},e.prototype.visitMethodCall=function(e,t){var n=e.receiver.visit(this),r=this.visitAll(e.args);return n!==e.receiver||r!==e.args?new qo(e.span,n,e.name,r):e},e.prototype.visitSafeMethodCall=function(e,t){var n=e.receiver.visit(this),r=this.visitAll(e.args);return n!==e.receiver||r!==e.args?new Ko(e.span,n,e.name,r):e},e.prototype.visitFunctionCall=function(e,t){var n=e.target&&e.target.visit(this),r=this.visitAll(e.args);return n!==e.target||r!==e.args?new zo(e.span,n,r):e},e.prototype.visitLiteralArray=function(e,t){var n=this.visitAll(e.expressions);return n!==e.expressions?new Fo(e.span,n):e},e.prototype.visitLiteralMap=function(e,t){var n=this.visitAll(e.values);return n!==e.values?new jo(e.span,e.keys,n):e},e.prototype.visitBinary=function(e,t){var n=e.left.visit(this),r=e.right.visit(this);return n!==e.left||r!==e.right?new Bo(e.span,e.operation,n,r):e},e.prototype.visitPrefixNot=function(e,t){var n=e.expression.visit(this);return n!==e.expression?new Ho(e.span,n):e},e.prototype.visitNonNullAssert=function(e,t){var n=e.expression.visit(this);return n!==e.expression?new Uo(e.span,n):e},e.prototype.visitConditional=function(e,t){var n=e.condition.visit(this),r=e.trueExp.visit(this),i=e.falseExp.visit(this);return n!==e.condition||r!==e.trueExp||i!==e.falseExp?new Ao(e.span,n,r,i):e},e.prototype.visitPipe=function(e,t){var n=e.exp.visit(this),r=this.visitAll(e.args);return n!==e.exp||r!==e.args?new Do(e.span,n,e.name,r):e},e.prototype.visitKeyedRead=function(e,t){var n=e.obj.visit(this),r=e.key.visit(this);return n!==e.obj||r!==e.key?new Oo(e.span,n,r):e},e.prototype.visitKeyedWrite=function(e,t){var n=e.obj.visit(this),r=e.key.visit(this),i=e.value.visit(this);return n!==e.obj||r!==e.key||i!==e.value?new Ro(e.span,n,r,i):e},e.prototype.visitAll=function(e){for(var t=new Array(e.length),n=!1,r=0;r<e.length;++r){var i=e[r],o=i.visit(this);t[r]=o,n=n||o!==i}return n?t:e},e.prototype.visitChain=function(e,t){var n=this.visitAll(e.expressions);return n!==e.expressions?new ko(e.span,n):e},e.prototype.visitQuote=function(e,t){return e},e}();function Zo(e,t,n){function r(e){t.visit&&t.visit(e,n)||e.visit(t,n)}function i(e){e.forEach(r)}e.visit({visitBinary:function(e){r(e.left),r(e.right)},visitChain:function(e){i(e.expressions)},visitConditional:function(e){r(e.condition),r(e.trueExp),r(e.falseExp)},visitFunctionCall:function(e){e.target&&r(e.target),i(e.args)},visitImplicitReceiver:function(e){},visitInterpolation:function(e){i(e.expressions)},visitKeyedRead:function(e){r(e.obj),r(e.key)},visitKeyedWrite:function(e){r(e.obj),r(e.key),r(e.obj)},visitLiteralArray:function(e){i(e.expressions)},visitLiteralMap:function(e){},visitLiteralPrimitive:function(e){},visitMethodCall:function(e){r(e.receiver),i(e.args)},visitPipe:function(e){r(e.exp),i(e.args)},visitPrefixNot:function(e){r(e.expression)},visitNonNullAssert:function(e){r(e.expression)},visitPropertyRead:function(e){r(e.receiver)},visitPropertyWrite:function(e){r(e.receiver),r(e.value)},visitQuote:function(e){},visitSafeMethodCall:function(e){r(e.receiver),i(e.args)},visitSafePropertyRead:function(e){r(e.receiver)}})}var Jo,es=function es(e,t,n,r){this.name=e,this.expression=t,this.type=n,this.sourceSpan=r,this.isLiteral=this.type===Jo.LITERAL_ATTR,this.isAnimation=this.type===Jo.ANIMATION};!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.LITERAL_ATTR=1]="LITERAL_ATTR",e[e.ANIMATION=2]="ANIMATION"}(Jo||(Jo={}));var ts,ns,rs=function rs(e,t,n,r,i,o){this.name=e,this.targetOrPhase=t,this.type=n,this.handler=r,this.sourceSpan=i,this.handlerSpan=o},is=function is(e,t,n){this.name=e,this.value=t,this.sourceSpan=n},os=function os(e,t,n,r,i,o){this.name=e,this.type=t,this.securityContext=n,this.value=r,this.unit=i,this.sourceSpan=o},ss=function(){function e(){}return e.event=ct("$event"),e}(),as=function as(e,t){this.stmts=e,this.allowDefault=t,this.render3Stmts=e.map(function(e){return e instanceof Xe&&e.name==t.name&&e.value instanceof Be?new Je(e.value.lhs.value):e})},us=function us(e,t){this.stmts=e,this.currValExpr=t};function ls(e,t,n,r,i,o){e||(e=new ys);var s=function a(e){return ct("currVal_"+e)}(r),u=new ms(e,t,r,o),l=n.visit(u,ns.Expression),c=cs(u,r);return u.usesImplicitReceiver&&e.notifyImplicitReceiverUse(),0===u.temporaryCount&&i==ts.TrySimple?new us([],l):(c.push(s.set(l).toDeclStmt(he,[ke.Final])),new us(c,s))}function cs(e,t){for(var n=[],r=0;r<e.temporaryCount;r++)n.push(hs(t,r));return n}function ps(e,t){return"tmp_"+e+"_"+t}function hs(e,t){return new Xe(ps(e,t),Qe)}function fs(e,t){if(e!==ns.Expression)throw new Error("Expected an expression, but saw "+t)}function ds(e,t){return e===ns.Statement?t.toStmt():t}!function(e){e[e.General=0]="General",e[e.TrySimple=1]="TrySimple"}(ts||(ts={})),function(e){e[e.Statement=0]="Statement",e[e.Expression=1]="Expression"}(ns||(ns={}));var vs=function(e){function t(t){var n=e.call(this)||this;return n._converterFactory=t,n}return o(t,e),t.prototype.visitPipe=function(e,t){var n=this,r=f([e.exp],e.args).map(function(e){return e.visit(n,t)});return new gs(e.span,r,this._converterFactory.createPipeConverter(e.name,r.length))},t.prototype.visitLiteralArray=function(e,t){var n=this,r=e.expressions.map(function(e){return e.visit(n,t)});return new gs(e.span,r,this._converterFactory.createLiteralArrayConverter(e.expressions.length))},t.prototype.visitLiteralMap=function(e,t){var n=this,r=e.values.map(function(e){return e.visit(n,t)});return new gs(e.span,r,this._converterFactory.createLiteralMapConverter(e.keys))},t}(Xo),ms=function(){function e(e,t,n,r,i){this._localResolver=e,this._implicitReceiver=t,this.bindingId=n,this.interpolationFunction=r,this.baseSourceSpan=i,this._nodeMap=new Map,this._resultMap=new Map,this._currentTemporary=0,this.temporaryCount=0,this.usesImplicitReceiver=!1}return e.prototype.visitBinary=function(e,t){var n;switch(e.operation){case"+":n=ue.Plus;break;case"-":n=ue.Minus;break;case"*":n=ue.Multiply;break;case"/":n=ue.Divide;break;case"%":n=ue.Modulo;break;case"&&":n=ue.And;break;case"||":n=ue.Or;break;case"==":n=ue.Equals;break;case"!=":n=ue.NotEquals;break;case"===":n=ue.Identical;break;case"!==":n=ue.NotIdentical;break;case"<":n=ue.Lower;break;case">":n=ue.Bigger;break;case"<=":n=ue.LowerEquals;break;case">=":n=ue.BiggerEquals;break;default:throw new Error("Unsupported operation "+e.operation)}return ds(t,new Be(n,this._visit(e.left,ns.Expression),this._visit(e.right,ns.Expression),void 0,this.convertSourceSpan(e.span)))},e.prototype.visitChain=function(e,t){return function n(e,t){if(e!==ns.Statement)throw new Error("Expected a statement, but saw "+t)}(t,e),this.visitAll(e.expressions,t)},e.prototype.visitConditional=function(e,t){return ds(t,this._visit(e.condition,ns.Expression).conditional(this._visit(e.trueExp,ns.Expression),this._visit(e.falseExp,ns.Expression),this.convertSourceSpan(e.span)))},e.prototype.visitPipe=function(e,t){throw new Error("Illegal state: Pipes should have been converted into functions. Pipe: "+e.name)},e.prototype.visitFunctionCall=function(e,t){var n=this.visitAll(e.args,ns.Expression);return ds(t,e instanceof gs?e.converter(n):this._visit(e.target,ns.Expression).callFn(n,this.convertSourceSpan(e.span)))},e.prototype.visitImplicitReceiver=function(e,t){return fs(t,e),this.usesImplicitReceiver=!0,this._implicitReceiver},e.prototype.visitInterpolation=function(e,t){fs(t,e);for(var n=[yt(e.expressions.length)],r=0;r<e.strings.length-1;r++)n.push(yt(e.strings[r])),n.push(this._visit(e.expressions[r],ns.Expression));return n.push(yt(e.strings[e.strings.length-1])),this.interpolationFunction?this.interpolationFunction(n):e.expressions.length<=9?pt($t.inlineInterpolate).callFn(n):pt($t.interpolate).callFn([n[0],ft(n.slice(1),void 0,this.convertSourceSpan(e.span))])},e.prototype.visitKeyedRead=function(e,t){var n=this.leftMostSafeNode(e);return n?this.convertSafeAccess(e,n,t):ds(t,this._visit(e.obj,ns.Expression).key(this._visit(e.key,ns.Expression)))},e.prototype.visitKeyedWrite=function(e,t){var n=this._visit(e.obj,ns.Expression),r=this._visit(e.key,ns.Expression),i=this._visit(e.value,ns.Expression);return ds(t,n.key(r).set(i))},e.prototype.visitLiteralArray=function(e,t){throw new Error("Illegal State: literal arrays should have been converted into functions")},e.prototype.visitLiteralMap=function(e,t){throw new Error("Illegal State: literal maps should have been converted into functions")},e.prototype.visitLiteralPrimitive=function(e,t){return ds(t,yt(e.value,null==e.value||!0===e.value||!0===e.value?fe:void 0,this.convertSourceSpan(e.span)))},e.prototype._getLocal=function(e){return this._localResolver.getLocal(e)},e.prototype.visitMethodCall=function(e,t){if(e.receiver instanceof No&&"$any"==e.name){if(1!=(r=this.visitAll(e.args,ns.Expression)).length)throw new Error("Invalid call to $any, expected 1 argument but received "+(r.length||"none"));return r[0].cast(he,this.convertSourceSpan(e.span))}var n=this.leftMostSafeNode(e);if(n)return this.convertSafeAccess(e,n,t);var r=this.visitAll(e.args,ns.Expression),i=this.usesImplicitReceiver,o=null,s=this._visit(e.receiver,ns.Expression);if(s===this._implicitReceiver){var a=this._getLocal(e.name);a&&(this.usesImplicitReceiver=i,o=a.callFn(r))}return null==o&&(o=s.callMethod(e.name,r,this.convertSourceSpan(e.span))),ds(t,o)},e.prototype.visitPrefixNot=function(e,t){return ds(t,function n(e,t){return new De(e,t)}(this._visit(e.expression,ns.Expression)))},e.prototype.visitNonNullAssert=function(e,t){return ds(t,function n(e,t){return new Le(e,t)}(this._visit(e.expression,ns.Expression)))},e.prototype.visitPropertyRead=function(e,t){var n=this.leftMostSafeNode(e);if(n)return this.convertSafeAccess(e,n,t);var r=null,i=this.usesImplicitReceiver,o=this._visit(e.receiver,ns.Expression);return o===this._implicitReceiver&&(r=this._getLocal(e.name))&&(this.usesImplicitReceiver=i),null==r&&(r=o.prop(e.name)),ds(t,r)},e.prototype.visitPropertyWrite=function(e,t){var n=this._visit(e.receiver,ns.Expression),r=this.usesImplicitReceiver,i=null;if(n===this._implicitReceiver){var o=this._getLocal(e.name);if(o){if(!(o instanceof He))throw new Error("Cannot assign to a reference or variable!");i=o,this.usesImplicitReceiver=r}}return null===i&&(i=n.prop(e.name)),ds(t,i.set(this._visit(e.value,ns.Expression)))},e.prototype.visitSafePropertyRead=function(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)},e.prototype.visitSafeMethodCall=function(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)},e.prototype.visitAll=function(e,t){var n=this;return e.map(function(e){return n._visit(e,t)})},e.prototype.visitQuote=function(e,t){throw new Error("Quotes are not supported for evaluation!\n Statement: "+e.uninterpretedExpression+" located at "+e.location)},e.prototype._visit=function(e,t){return this._resultMap.get(e)||(this._nodeMap.get(e)||e).visit(this,t)},e.prototype.convertSafeAccess=function(e,t,n){var r=this._visit(t.receiver,ns.Expression),i=void 0;this.needsTemporary(t.receiver)&&(r=(i=this.allocateTemporary()).set(r),this._resultMap.set(t.receiver,i));var o=r.isBlank();this._nodeMap.set(t,t instanceof Ko?new qo(t.span,t.receiver,t.name,t.args):new Po(t.span,t.receiver,t.name));var s=this._visit(e,ns.Expression);return this._nodeMap.delete(t),i&&this.releaseTemporary(i),ds(n,o.conditional(yt(null),s))},e.prototype.leftMostSafeNode=function(e){var t=this,n=function(e,n){return(t._nodeMap.get(n)||n).visit(e)};return e.visit({visitBinary:function(e){return null},visitChain:function(e){return null},visitConditional:function(e){return null},visitFunctionCall:function(e){return null},visitImplicitReceiver:function(e){return null},visitInterpolation:function(e){return null},visitKeyedRead:function(e){return n(this,e.obj)},visitKeyedWrite:function(e){return null},visitLiteralArray:function(e){return null},visitLiteralMap:function(e){return null},visitLiteralPrimitive:function(e){return null},visitMethodCall:function(e){return n(this,e.receiver)},visitPipe:function(e){return null},visitPrefixNot:function(e){return null},visitNonNullAssert:function(e){return null},visitPropertyRead:function(e){return n(this,e.receiver)},visitPropertyWrite:function(e){return null},visitQuote:function(e){return null},visitSafeMethodCall:function(e){return n(this,e.receiver)||e},visitSafePropertyRead:function(e){return n(this,e.receiver)||e}})},e.prototype.needsTemporary=function(e){var t=this,n=function(e,n){return n&&(t._nodeMap.get(n)||n).visit(e)};return e.visit({visitBinary:function(e){return n(this,e.left)||n(this,e.right)},visitChain:function(e){return!1},visitConditional:function(e){return n(this,e.condition)||n(this,e.trueExp)||n(this,e.falseExp)},visitFunctionCall:function(e){return!0},visitImplicitReceiver:function(e){return!1},visitInterpolation:function(e){return function(e,t){return t.some(function(t){return n(e,t)})}(this,e.expressions)},visitKeyedRead:function(e){return!1},visitKeyedWrite:function(e){return!1},visitLiteralArray:function(e){return!0},visitLiteralMap:function(e){return!0},visitLiteralPrimitive:function(e){return!1},visitMethodCall:function(e){return!0},visitPipe:function(e){return!0},visitPrefixNot:function(e){return n(this,e.expression)},visitNonNullAssert:function(e){return n(this,e.expression)},visitPropertyRead:function(e){return!1},visitPropertyWrite:function(e){return!1},visitQuote:function(e){return!1},visitSafeMethodCall:function(e){return!0},visitSafePropertyRead:function(e){return!1}})},e.prototype.allocateTemporary=function(){var e=this._currentTemporary++;return this.temporaryCount=Math.max(this._currentTemporary,this.temporaryCount),new xe(ps(this.bindingId,e))},e.prototype.releaseTemporary=function(e){if(this._currentTemporary--,e.name!=ps(this.bindingId,this._currentTemporary))throw new Error("Temporary "+e.name+" released out of order")},e.prototype.convertSourceSpan=function(e){if(this.baseSourceSpan){var t=this.baseSourceSpan.start.moveBy(e.start),n=this.baseSourceSpan.start.moveBy(e.end);return new yo(t,n)}return null},e}(),ys=function(){function e(){}return e.prototype.notifyImplicitReceiverUse=function(){},e.prototype.getLocal=function(e){return e===ss.event.name?ss.event:null},e}(),gs=function(e){function t(t,n,r){var i=e.call(this,t,null,n)||this;return i.args=n,i.converter=r,i}return o(t,e),t}(zo),_s=function(){function e(){this.strictStyling=!0}return e.prototype.shimCssText=function(e,t,n){void 0===n&&(n="");var r=function i(e){return e.match(js)||[]}(e);return e=function o(e){return e.replace(Fs,"")}(e),e=this._insertDirectives(e),f([this._scopeCssText(e,t,n)],r).join("\n")},e.prototype._insertDirectives=function(e){return e=this._insertPolyfillDirectivesInCssText(e),this._insertPolyfillRulesInCssText(e)},e.prototype._insertPolyfillDirectivesInCssText=function(e){return e.replace(ws,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[2]+"{"})},e.prototype._insertPolyfillRulesInCssText=function(e){return e.replace(xs,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0].replace(e[1],"").replace(e[2],"");return e[4]+n})},e.prototype._scopeCssText=function(e,t,n){var r=this._extractUnscopedRulesFromCssText(e);return e=this._insertPolyfillHostInCssText(e),e=this._convertColonHost(e),e=this._convertColonHostContext(e),e=this._convertShadowDOMSelectors(e),t&&(e=this._scopeSelectors(e,t,n)),(e=e+"\n"+r).trim()},e.prototype._extractUnscopedRulesFromCssText=function(e){var t,n="";for(Es.lastIndex=0;null!==(t=Es.exec(e));)n+=t[0].replace(t[2],"").replace(t[1],t[4])+"\n\n";return n},e.prototype._convertColonHost=function(e){return this._convertColonRule(e,Ns,this._colonHostPartReplacer)},e.prototype._convertColonHostContext=function(e){return this._convertColonRule(e,ks,this._colonHostContextPartReplacer)},e.prototype._convertColonRule=function(e,t,n){return e.replace(t,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e[2]){for(var r=e[2].split(","),i=[],o=0;o<r.length;o++){var s=r[o].trim();if(!s)break;i.push(n(As,s,e[3]))}return i.join(",")}return As+e[3]})},e.prototype._colonHostContextPartReplacer=function(e,t,n){return t.indexOf(Ss)>-1?this._colonHostPartReplacer(e,t,n):e+t+n+", "+t+" "+e+n},e.prototype._colonHostPartReplacer=function(e,t,n){return e+t.replace(Ss,"")+n},e.prototype._convertShadowDOMSelectors=function(e){return Is.reduce(function(e,t){return e.replace(t," ")},e)},e.prototype._scopeSelectors=function(e,t,n){var r=this;return function i(e,t){var n=function r(e){for(var t=e.split(Bs),n=[],r=[],i=0,o=[],s=0;s<t.length;s++){var a=t[s];a==Us&&i--,i>0?o.push(a):(o.length>0&&(r.push(o.join("")),n.push(qs),o=[]),n.push(a)),a==Hs&&i++}return o.length>0&&(r.push(o.join("")),n.push(qs)),new zs(n.join(""),r)}
|
|
194
|
+
var xo=function xo(e,t,n,r){this.input=t,this.errLocation=n,this.ctxLocation=r,this.message="Parser Error: "+e+" "+n+" ["+t+"] in "+r},Eo=function Eo(e,t){this.start=e,this.end=t},So=function(){function e(e){this.span=e}return e.prototype.visit=function(e,t){return void 0===t&&(t=null),null},e.prototype.toString=function(){return"AST"},e}(),Co=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.prefix=n,o.uninterpretedExpression=r,o.location=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitQuote(this,t)},t.prototype.toString=function(){return"Quote"},t}(So),To=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.visit=function(e,t){void 0===t&&(t=null)},t}(So),No=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitImplicitReceiver(this,t)},t}(So),ko=function(e){function t(t,n){var r=e.call(this,t)||this;return r.expressions=n,r}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitChain(this,t)},t}(So),Ao=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.condition=n,o.trueExp=r,o.falseExp=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitConditional(this,t)},t}(So),Po=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.receiver=n,i.name=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPropertyRead(this,t)},t}(So),Io=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.receiver=n,o.name=r,o.value=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPropertyWrite(this,t)},t}(So),Mo=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.receiver=n,i.name=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitSafePropertyRead(this,t)},t}(So),Oo=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.obj=n,i.key=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitKeyedRead(this,t)},t}(So),Ro=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.obj=n,o.key=r,o.value=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitKeyedWrite(this,t)},t}(So),Do=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.exp=n,o.name=r,o.args=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPipe(this,t)},t}(So),Lo=function(e){function t(t,n){var r=e.call(this,t)||this;return r.value=n,r}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitLiteralPrimitive(this,t)},t}(So),Fo=function(e){function t(t,n){var r=e.call(this,t)||this;return r.expressions=n,r}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitLiteralArray(this,t)},t}(So),jo=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.keys=n,i.values=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitLiteralMap(this,t)},t}(So),Vo=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.strings=n,i.expressions=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitInterpolation(this,t)},t}(So),Bo=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.operation=n,o.left=r,o.right=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitBinary(this,t)},t}(So),Ho=function(e){function t(t,n){var r=e.call(this,t)||this;return r.expression=n,r}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPrefixNot(this,t)},t}(So),Uo=function(e){function t(t,n){var r=e.call(this,t)||this;return r.expression=n,r}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitNonNullAssert(this,t)},t}(So),qo=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.receiver=n,o.name=r,o.args=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitMethodCall(this,t)},t}(So),Ko=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.receiver=n,o.name=r,o.args=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitSafeMethodCall(this,t)},t}(So),zo=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.target=n,i.args=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitFunctionCall(this,t)},t}(So),Wo=function(e){function t(t,n,r,i){var o=e.call(this,new Eo(0,null==n?0:n.length))||this;return o.ast=t,o.source=n,o.location=r,o.errors=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),this.ast.visit(e,t)},t.prototype.toString=function(){return this.source+" in "+this.location},t}(So),Qo=function Qo(e,t,n,r,i){this.span=e,this.key=t,this.keyIsVar=n,this.name=r,this.expression=i},$o=function(){function e(){}return e.prototype.visitBinary=function(e,t){},e.prototype.visitChain=function(e,t){},e.prototype.visitConditional=function(e,t){},e.prototype.visitFunctionCall=function(e,t){},e.prototype.visitImplicitReceiver=function(e,t){},e.prototype.visitInterpolation=function(e,t){},e.prototype.visitKeyedRead=function(e,t){},e.prototype.visitKeyedWrite=function(e,t){},e.prototype.visitLiteralArray=function(e,t){},e.prototype.visitLiteralMap=function(e,t){},e.prototype.visitLiteralPrimitive=function(e,t){},e.prototype.visitMethodCall=function(e,t){},e.prototype.visitPipe=function(e,t){},e.prototype.visitPrefixNot=function(e,t){},e.prototype.visitNonNullAssert=function(e,t){},e.prototype.visitPropertyRead=function(e,t){},e.prototype.visitPropertyWrite=function(e,t){},e.prototype.visitQuote=function(e,t){},e.prototype.visitSafeMethodCall=function(e,t){},e.prototype.visitSafePropertyRead=function(e,t){},e}(),Go=function(){function e(){}return e.prototype.visitBinary=function(e,t){return e.left.visit(this,t),e.right.visit(this,t),null},e.prototype.visitChain=function(e,t){return this.visitAll(e.expressions,t)},e.prototype.visitConditional=function(e,t){return e.condition.visit(this,t),e.trueExp.visit(this,t),e.falseExp.visit(this,t),null},e.prototype.visitPipe=function(e,t){return e.exp.visit(this,t),this.visitAll(e.args,t),null},e.prototype.visitFunctionCall=function(e,t){return e.target.visit(this,t),this.visitAll(e.args,t),null},e.prototype.visitImplicitReceiver=function(e,t){return null},e.prototype.visitInterpolation=function(e,t){return this.visitAll(e.expressions,t)},e.prototype.visitKeyedRead=function(e,t){return e.obj.visit(this,t),e.key.visit(this,t),null},e.prototype.visitKeyedWrite=function(e,t){return e.obj.visit(this,t),e.key.visit(this,t),e.value.visit(this,t),null},e.prototype.visitLiteralArray=function(e,t){return this.visitAll(e.expressions,t)},e.prototype.visitLiteralMap=function(e,t){return this.visitAll(e.values,t)},e.prototype.visitLiteralPrimitive=function(e,t){return null},e.prototype.visitMethodCall=function(e,t){return e.receiver.visit(this,t),this.visitAll(e.args,t)},e.prototype.visitPrefixNot=function(e,t){return e.expression.visit(this,t),null},e.prototype.visitNonNullAssert=function(e,t){return e.expression.visit(this,t),null},e.prototype.visitPropertyRead=function(e,t){return e.receiver.visit(this,t),null},e.prototype.visitPropertyWrite=function(e,t){return e.receiver.visit(this,t),e.value.visit(this,t),null},e.prototype.visitSafePropertyRead=function(e,t){return e.receiver.visit(this,t),null},e.prototype.visitSafeMethodCall=function(e,t){return e.receiver.visit(this,t),this.visitAll(e.args,t)},e.prototype.visitAll=function(e,t){var n=this;return e.forEach(function(e){return e.visit(n,t)}),null},e.prototype.visitQuote=function(e,t){return null},e}(),Xo=function(){function e(){}return e.prototype.visitImplicitReceiver=function(e,t){return e},e.prototype.visitInterpolation=function(e,t){return new Vo(e.span,e.strings,this.visitAll(e.expressions))},e.prototype.visitLiteralPrimitive=function(e,t){return new Lo(e.span,e.value)},e.prototype.visitPropertyRead=function(e,t){return new Po(e.span,e.receiver.visit(this),e.name)},e.prototype.visitPropertyWrite=function(e,t){return new Io(e.span,e.receiver.visit(this),e.name,e.value.visit(this))},e.prototype.visitSafePropertyRead=function(e,t){return new Mo(e.span,e.receiver.visit(this),e.name)},e.prototype.visitMethodCall=function(e,t){return new qo(e.span,e.receiver.visit(this),e.name,this.visitAll(e.args))},e.prototype.visitSafeMethodCall=function(e,t){return new Ko(e.span,e.receiver.visit(this),e.name,this.visitAll(e.args))},e.prototype.visitFunctionCall=function(e,t){return new zo(e.span,e.target.visit(this),this.visitAll(e.args))},e.prototype.visitLiteralArray=function(e,t){return new Fo(e.span,this.visitAll(e.expressions))},e.prototype.visitLiteralMap=function(e,t){return new jo(e.span,e.keys,this.visitAll(e.values))},e.prototype.visitBinary=function(e,t){return new Bo(e.span,e.operation,e.left.visit(this),e.right.visit(this))},e.prototype.visitPrefixNot=function(e,t){return new Ho(e.span,e.expression.visit(this))},e.prototype.visitNonNullAssert=function(e,t){return new Uo(e.span,e.expression.visit(this))},e.prototype.visitConditional=function(e,t){return new Ao(e.span,e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this))},e.prototype.visitPipe=function(e,t){return new Do(e.span,e.exp.visit(this),e.name,this.visitAll(e.args))},e.prototype.visitKeyedRead=function(e,t){return new Oo(e.span,e.obj.visit(this),e.key.visit(this))},e.prototype.visitKeyedWrite=function(e,t){return new Ro(e.span,e.obj.visit(this),e.key.visit(this),e.value.visit(this))},e.prototype.visitAll=function(e){for(var t=new Array(e.length),n=0;n<e.length;++n)t[n]=e[n].visit(this);return t},e.prototype.visitChain=function(e,t){return new ko(e.span,this.visitAll(e.expressions))},e.prototype.visitQuote=function(e,t){return new Co(e.span,e.prefix,e.uninterpretedExpression,e.location)},e}(),Yo=function(){function e(){}return e.prototype.visitImplicitReceiver=function(e,t){return e},e.prototype.visitInterpolation=function(e,t){var n=this.visitAll(e.expressions);return n!==e.expressions?new Vo(e.span,e.strings,n):e},e.prototype.visitLiteralPrimitive=function(e,t){return e},e.prototype.visitPropertyRead=function(e,t){var n=e.receiver.visit(this);return n!==e.receiver?new Po(e.span,n,e.name):e},e.prototype.visitPropertyWrite=function(e,t){var n=e.receiver.visit(this),r=e.value.visit(this);return n!==e.receiver||r!==e.value?new Io(e.span,n,e.name,r):e},e.prototype.visitSafePropertyRead=function(e,t){var n=e.receiver.visit(this);return n!==e.receiver?new Mo(e.span,n,e.name):e},e.prototype.visitMethodCall=function(e,t){var n=e.receiver.visit(this),r=this.visitAll(e.args);return n!==e.receiver||r!==e.args?new qo(e.span,n,e.name,r):e},e.prototype.visitSafeMethodCall=function(e,t){var n=e.receiver.visit(this),r=this.visitAll(e.args);return n!==e.receiver||r!==e.args?new Ko(e.span,n,e.name,r):e},e.prototype.visitFunctionCall=function(e,t){var n=e.target&&e.target.visit(this),r=this.visitAll(e.args);return n!==e.target||r!==e.args?new zo(e.span,n,r):e},e.prototype.visitLiteralArray=function(e,t){var n=this.visitAll(e.expressions);return n!==e.expressions?new Fo(e.span,n):e},e.prototype.visitLiteralMap=function(e,t){var n=this.visitAll(e.values);return n!==e.values?new jo(e.span,e.keys,n):e},e.prototype.visitBinary=function(e,t){var n=e.left.visit(this),r=e.right.visit(this);return n!==e.left||r!==e.right?new Bo(e.span,e.operation,n,r):e},e.prototype.visitPrefixNot=function(e,t){var n=e.expression.visit(this);return n!==e.expression?new Ho(e.span,n):e},e.prototype.visitNonNullAssert=function(e,t){var n=e.expression.visit(this);return n!==e.expression?new Uo(e.span,n):e},e.prototype.visitConditional=function(e,t){var n=e.condition.visit(this),r=e.trueExp.visit(this),i=e.falseExp.visit(this);return n!==e.condition||r!==e.trueExp||i!==e.falseExp?new Ao(e.span,n,r,i):e},e.prototype.visitPipe=function(e,t){var n=e.exp.visit(this),r=this.visitAll(e.args);return n!==e.exp||r!==e.args?new Do(e.span,n,e.name,r):e},e.prototype.visitKeyedRead=function(e,t){var n=e.obj.visit(this),r=e.key.visit(this);return n!==e.obj||r!==e.key?new Oo(e.span,n,r):e},e.prototype.visitKeyedWrite=function(e,t){var n=e.obj.visit(this),r=e.key.visit(this),i=e.value.visit(this);return n!==e.obj||r!==e.key||i!==e.value?new Ro(e.span,n,r,i):e},e.prototype.visitAll=function(e){for(var t=new Array(e.length),n=!1,r=0;r<e.length;++r){var i=e[r],o=i.visit(this);t[r]=o,n=n||o!==i}return n?t:e},e.prototype.visitChain=function(e,t){var n=this.visitAll(e.expressions);return n!==e.expressions?new ko(e.span,n):e},e.prototype.visitQuote=function(e,t){return e},e}();function Zo(e,t,n){function r(e){t.visit&&t.visit(e,n)||e.visit(t,n)}function i(e){e.forEach(r)}e.visit({visitBinary:function(e){r(e.left),r(e.right)},visitChain:function(e){i(e.expressions)},visitConditional:function(e){r(e.condition),r(e.trueExp),r(e.falseExp)},visitFunctionCall:function(e){e.target&&r(e.target),i(e.args)},visitImplicitReceiver:function(e){},visitInterpolation:function(e){i(e.expressions)},visitKeyedRead:function(e){r(e.obj),r(e.key)},visitKeyedWrite:function(e){r(e.obj),r(e.key),r(e.obj)},visitLiteralArray:function(e){i(e.expressions)},visitLiteralMap:function(e){},visitLiteralPrimitive:function(e){},visitMethodCall:function(e){r(e.receiver),i(e.args)},visitPipe:function(e){r(e.exp),i(e.args)},visitPrefixNot:function(e){r(e.expression)},visitNonNullAssert:function(e){r(e.expression)},visitPropertyRead:function(e){r(e.receiver)},visitPropertyWrite:function(e){r(e.receiver),r(e.value)},visitQuote:function(e){},visitSafeMethodCall:function(e){r(e.receiver),i(e.args)},visitSafePropertyRead:function(e){r(e.receiver)}})}var Jo,es=function es(e,t,n,r){this.name=e,this.expression=t,this.type=n,this.sourceSpan=r,this.isLiteral=this.type===Jo.LITERAL_ATTR,this.isAnimation=this.type===Jo.ANIMATION};!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.LITERAL_ATTR=1]="LITERAL_ATTR",e[e.ANIMATION=2]="ANIMATION"}(Jo||(Jo={}));var ts,ns,rs=function rs(e,t,n,r,i,o){this.name=e,this.targetOrPhase=t,this.type=n,this.handler=r,this.sourceSpan=i,this.handlerSpan=o},is=function is(e,t,n){this.name=e,this.value=t,this.sourceSpan=n},os=function os(e,t,n,r,i,o){this.name=e,this.type=t,this.securityContext=n,this.value=r,this.unit=i,this.sourceSpan=o},ss=function(){function e(){}return e.event=ct("$event"),e}(),as=function as(e,t){this.stmts=e,this.allowDefault=t,this.render3Stmts=e.map(function(e){return e instanceof Xe&&e.name==t.name&&e.value instanceof Be?new Je(e.value.lhs.value):e})},us=function us(e,t){this.stmts=e,this.currValExpr=t};function ls(e,t,n,r,i,o){e||(e=new ys);var s=function a(e){return ct("currVal_"+e)}(r),u=new ms(e,t,r,o),l=n.visit(u,ns.Expression),c=cs(u,r);return u.usesImplicitReceiver&&e.notifyImplicitReceiverUse(),0===u.temporaryCount&&i==ts.TrySimple?new us([],l):(c.push(s.set(l).toDeclStmt(he,[ke.Final])),new us(c,s))}function cs(e,t){for(var n=[],r=0;r<e.temporaryCount;r++)n.push(hs(t,r));return n}function ps(e,t){return"tmp_"+e+"_"+t}function hs(e,t){return new Xe(ps(e,t),Qe)}function fs(e,t){if(e!==ns.Expression)throw new Error("Expected an expression, but saw "+t)}function ds(e,t){return e===ns.Statement?t.toStmt():t}!function(e){e[e.General=0]="General",e[e.TrySimple=1]="TrySimple"}(ts||(ts={})),function(e){e[e.Statement=0]="Statement",e[e.Expression=1]="Expression"}(ns||(ns={}));var vs=function(e){function t(t){var n=e.call(this)||this;return n._converterFactory=t,n}return o(t,e),t.prototype.visitPipe=function(e,t){var n=this,r=f([e.exp],e.args).map(function(e){return e.visit(n,t)});return new gs(e.span,r,this._converterFactory.createPipeConverter(e.name,r.length))},t.prototype.visitLiteralArray=function(e,t){var n=this,r=e.expressions.map(function(e){return e.visit(n,t)});return new gs(e.span,r,this._converterFactory.createLiteralArrayConverter(e.expressions.length))},t.prototype.visitLiteralMap=function(e,t){var n=this,r=e.values.map(function(e){return e.visit(n,t)});return new gs(e.span,r,this._converterFactory.createLiteralMapConverter(e.keys))},t}(Xo),ms=function(){function e(e,t,n,r,i){this._localResolver=e,this._implicitReceiver=t,this.bindingId=n,this.interpolationFunction=r,this.baseSourceSpan=i,this._nodeMap=new Map,this._resultMap=new Map,this._currentTemporary=0,this.temporaryCount=0,this.usesImplicitReceiver=!1}return e.prototype.visitBinary=function(e,t){var n;switch(e.operation){case"+":n=ue.Plus;break;case"-":n=ue.Minus;break;case"*":n=ue.Multiply;break;case"/":n=ue.Divide;break;case"%":n=ue.Modulo;break;case"&&":n=ue.And;break;case"||":n=ue.Or;break;case"==":n=ue.Equals;break;case"!=":n=ue.NotEquals;break;case"===":n=ue.Identical;break;case"!==":n=ue.NotIdentical;break;case"<":n=ue.Lower;break;case">":n=ue.Bigger;break;case"<=":n=ue.LowerEquals;break;case">=":n=ue.BiggerEquals;break;default:throw new Error("Unsupported operation "+e.operation)}return ds(t,new Be(n,this._visit(e.left,ns.Expression),this._visit(e.right,ns.Expression),void 0,this.convertSourceSpan(e.span)))},e.prototype.visitChain=function(e,t){return function n(e,t){if(e!==ns.Statement)throw new Error("Expected a statement, but saw "+t)}(t,e),this.visitAll(e.expressions,t)},e.prototype.visitConditional=function(e,t){return ds(t,this._visit(e.condition,ns.Expression).conditional(this._visit(e.trueExp,ns.Expression),this._visit(e.falseExp,ns.Expression),this.convertSourceSpan(e.span)))},e.prototype.visitPipe=function(e,t){throw new Error("Illegal state: Pipes should have been converted into functions. Pipe: "+e.name)},e.prototype.visitFunctionCall=function(e,t){var n=this.visitAll(e.args,ns.Expression);return ds(t,e instanceof gs?e.converter(n):this._visit(e.target,ns.Expression).callFn(n,this.convertSourceSpan(e.span)))},e.prototype.visitImplicitReceiver=function(e,t){return fs(t,e),this.usesImplicitReceiver=!0,this._implicitReceiver},e.prototype.visitInterpolation=function(e,t){fs(t,e);for(var n=[yt(e.expressions.length)],r=0;r<e.strings.length-1;r++)n.push(yt(e.strings[r])),n.push(this._visit(e.expressions[r],ns.Expression));return n.push(yt(e.strings[e.strings.length-1])),this.interpolationFunction?this.interpolationFunction(n):e.expressions.length<=9?pt($t.inlineInterpolate).callFn(n):pt($t.interpolate).callFn([n[0],ft(n.slice(1),void 0,this.convertSourceSpan(e.span))])},e.prototype.visitKeyedRead=function(e,t){var n=this.leftMostSafeNode(e);return n?this.convertSafeAccess(e,n,t):ds(t,this._visit(e.obj,ns.Expression).key(this._visit(e.key,ns.Expression)))},e.prototype.visitKeyedWrite=function(e,t){var n=this._visit(e.obj,ns.Expression),r=this._visit(e.key,ns.Expression),i=this._visit(e.value,ns.Expression);return ds(t,n.key(r).set(i))},e.prototype.visitLiteralArray=function(e,t){throw new Error("Illegal State: literal arrays should have been converted into functions")},e.prototype.visitLiteralMap=function(e,t){throw new Error("Illegal State: literal maps should have been converted into functions")},e.prototype.visitLiteralPrimitive=function(e,t){return ds(t,yt(e.value,null==e.value||!0===e.value||!0===e.value?fe:void 0,this.convertSourceSpan(e.span)))},e.prototype._getLocal=function(e){return this._localResolver.getLocal(e)},e.prototype.visitMethodCall=function(e,t){if(e.receiver instanceof No&&"$any"==e.name){if(1!=(r=this.visitAll(e.args,ns.Expression)).length)throw new Error("Invalid call to $any, expected 1 argument but received "+(r.length||"none"));return r[0].cast(he,this.convertSourceSpan(e.span))}var n=this.leftMostSafeNode(e);if(n)return this.convertSafeAccess(e,n,t);var r=this.visitAll(e.args,ns.Expression),i=this.usesImplicitReceiver,o=null,s=this._visit(e.receiver,ns.Expression);if(s===this._implicitReceiver){var a=this._getLocal(e.name);a&&(this.usesImplicitReceiver=i,o=a.callFn(r))}return null==o&&(o=s.callMethod(e.name,r,this.convertSourceSpan(e.span))),ds(t,o)},e.prototype.visitPrefixNot=function(e,t){return ds(t,function n(e,t){return new De(e,t)}(this._visit(e.expression,ns.Expression)))},e.prototype.visitNonNullAssert=function(e,t){return ds(t,function n(e,t){return new Le(e,t)}(this._visit(e.expression,ns.Expression)))},e.prototype.visitPropertyRead=function(e,t){var n=this.leftMostSafeNode(e);if(n)return this.convertSafeAccess(e,n,t);var r=null,i=this.usesImplicitReceiver,o=this._visit(e.receiver,ns.Expression);return o===this._implicitReceiver&&(r=this._getLocal(e.name))&&(this.usesImplicitReceiver=i),null==r&&(r=o.prop(e.name)),ds(t,r)},e.prototype.visitPropertyWrite=function(e,t){var n=this._visit(e.receiver,ns.Expression),r=this.usesImplicitReceiver,i=null;if(n===this._implicitReceiver){var o=this._getLocal(e.name);if(o){if(!(o instanceof He))throw new Error("Cannot assign to a reference or variable!");i=o,this.usesImplicitReceiver=r}}return null===i&&(i=n.prop(e.name)),ds(t,i.set(this._visit(e.value,ns.Expression)))},e.prototype.visitSafePropertyRead=function(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)},e.prototype.visitSafeMethodCall=function(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)},e.prototype.visitAll=function(e,t){var n=this;return e.map(function(e){return n._visit(e,t)})},e.prototype.visitQuote=function(e,t){throw new Error("Quotes are not supported for evaluation!\n Statement: "+e.uninterpretedExpression+" located at "+e.location)},e.prototype._visit=function(e,t){return this._resultMap.get(e)||(this._nodeMap.get(e)||e).visit(this,t)},e.prototype.convertSafeAccess=function(e,t,n){var r=this._visit(t.receiver,ns.Expression),i=void 0;this.needsTemporary(t.receiver)&&(r=(i=this.allocateTemporary()).set(r),this._resultMap.set(t.receiver,i));var o=r.isBlank();this._nodeMap.set(t,t instanceof Ko?new qo(t.span,t.receiver,t.name,t.args):new Po(t.span,t.receiver,t.name));var s=this._visit(e,ns.Expression);return this._nodeMap.delete(t),i&&this.releaseTemporary(i),ds(n,o.conditional(yt(null),s))},e.prototype.leftMostSafeNode=function(e){var t=this,n=function(e,n){return(t._nodeMap.get(n)||n).visit(e)};return e.visit({visitBinary:function(e){return null},visitChain:function(e){return null},visitConditional:function(e){return null},visitFunctionCall:function(e){return null},visitImplicitReceiver:function(e){return null},visitInterpolation:function(e){return null},visitKeyedRead:function(e){return n(this,e.obj)},visitKeyedWrite:function(e){return null},visitLiteralArray:function(e){return null},visitLiteralMap:function(e){return null},visitLiteralPrimitive:function(e){return null},visitMethodCall:function(e){return n(this,e.receiver)},visitPipe:function(e){return null},visitPrefixNot:function(e){return null},visitNonNullAssert:function(e){return null},visitPropertyRead:function(e){return n(this,e.receiver)},visitPropertyWrite:function(e){return null},visitQuote:function(e){return null},visitSafeMethodCall:function(e){return n(this,e.receiver)||e},visitSafePropertyRead:function(e){return n(this,e.receiver)||e}})},e.prototype.needsTemporary=function(e){var t=this,n=function(e,n){return n&&(t._nodeMap.get(n)||n).visit(e)};return e.visit({visitBinary:function(e){return n(this,e.left)||n(this,e.right)},visitChain:function(e){return!1},visitConditional:function(e){return n(this,e.condition)||n(this,e.trueExp)||n(this,e.falseExp)},visitFunctionCall:function(e){return!0},visitImplicitReceiver:function(e){return!1},visitInterpolation:function(e){return function(e,t){return t.some(function(t){return n(e,t)})}(this,e.expressions)},visitKeyedRead:function(e){return!1},visitKeyedWrite:function(e){return!1},visitLiteralArray:function(e){return!0},visitLiteralMap:function(e){return!0},visitLiteralPrimitive:function(e){return!1},visitMethodCall:function(e){return!0},visitPipe:function(e){return!0},visitPrefixNot:function(e){return n(this,e.expression)},visitNonNullAssert:function(e){return n(this,e.expression)},visitPropertyRead:function(e){return!1},visitPropertyWrite:function(e){return!1},visitQuote:function(e){return!1},visitSafeMethodCall:function(e){return!0},visitSafePropertyRead:function(e){return!1}})},e.prototype.allocateTemporary=function(){var e=this._currentTemporary++;return this.temporaryCount=Math.max(this._currentTemporary,this.temporaryCount),new xe(ps(this.bindingId,e))},e.prototype.releaseTemporary=function(e){if(this._currentTemporary--,e.name!=ps(this.bindingId,this._currentTemporary))throw new Error("Temporary "+e.name+" released out of order")},e.prototype.convertSourceSpan=function(e){if(this.baseSourceSpan){var t=this.baseSourceSpan.start.moveBy(e.start),n=this.baseSourceSpan.start.moveBy(e.end);return new rr(t,n)}return null},e}(),ys=function(){function e(){}return e.prototype.notifyImplicitReceiverUse=function(){},e.prototype.getLocal=function(e){return e===ss.event.name?ss.event:null},e}(),gs=function(e){function t(t,n,r){var i=e.call(this,t,null,n)||this;return i.args=n,i.converter=r,i}return o(t,e),t}(zo),_s=function(){function e(){this.strictStyling=!0}return e.prototype.shimCssText=function(e,t,n){void 0===n&&(n="");var r=function i(e){return e.match(js)||[]}(e);return e=function o(e){return e.replace(Fs,"")}(e),e=this._insertDirectives(e),f([this._scopeCssText(e,t,n)],r).join("\n")},e.prototype._insertDirectives=function(e){return e=this._insertPolyfillDirectivesInCssText(e),this._insertPolyfillRulesInCssText(e)},e.prototype._insertPolyfillDirectivesInCssText=function(e){return e.replace(ws,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[2]+"{"})},e.prototype._insertPolyfillRulesInCssText=function(e){return e.replace(xs,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0].replace(e[1],"").replace(e[2],"");return e[4]+n})},e.prototype._scopeCssText=function(e,t,n){var r=this._extractUnscopedRulesFromCssText(e);return e=this._insertPolyfillHostInCssText(e),e=this._convertColonHost(e),e=this._convertColonHostContext(e),e=this._convertShadowDOMSelectors(e),t&&(e=this._scopeSelectors(e,t,n)),(e=e+"\n"+r).trim()},e.prototype._extractUnscopedRulesFromCssText=function(e){var t,n="";for(Es.lastIndex=0;null!==(t=Es.exec(e));)n+=t[0].replace(t[2],"").replace(t[1],t[4])+"\n\n";return n},e.prototype._convertColonHost=function(e){return this._convertColonRule(e,Ns,this._colonHostPartReplacer)},e.prototype._convertColonHostContext=function(e){return this._convertColonRule(e,ks,this._colonHostContextPartReplacer)},e.prototype._convertColonRule=function(e,t,n){return e.replace(t,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e[2]){for(var r=e[2].split(","),i=[],o=0;o<r.length;o++){var s=r[o].trim();if(!s)break;i.push(n(As,s,e[3]))}return i.join(",")}return As+e[3]})},e.prototype._colonHostContextPartReplacer=function(e,t,n){return t.indexOf(Ss)>-1?this._colonHostPartReplacer(e,t,n):e+t+n+", "+t+" "+e+n},e.prototype._colonHostPartReplacer=function(e,t,n){return e+t.replace(Ss,"")+n},e.prototype._convertShadowDOMSelectors=function(e){return Is.reduce(function(e,t){return e.replace(t," ")},e)},e.prototype._scopeSelectors=function(e,t,n){var r=this;return function i(e,t){var n=function r(e){for(var t=e.split(Bs),n=[],r=[],i=0,o=[],s=0;s<t.length;s++){var a=t[s];a==Us&&i--,i>0?o.push(a):(o.length>0&&(r.push(o.join("")),n.push(qs),o=[]),n.push(a)),a==Hs&&i++}return o.length>0&&(r.push(o.join("")),n.push(qs)),new zs(n.join(""),r)}
|
|
195
195
|
/**
|
|
196
196
|
* @license
|
|
197
197
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -205,7 +205,7 @@ var xo=function xo(e,t,n,r){this.input=t,this.errLocation=n,this.ctxLocation=r,t
|
|
|
205
205
|
*
|
|
206
206
|
* Use of this source code is governed by an MIT-style license that can be
|
|
207
207
|
* found in the LICENSE file at https://angular.io/license
|
|
208
|
-
*/!function(e){e[e.TAG_OPEN_START=0]="TAG_OPEN_START",e[e.TAG_OPEN_END=1]="TAG_OPEN_END",e[e.TAG_OPEN_END_VOID=2]="TAG_OPEN_END_VOID",e[e.TAG_CLOSE=3]="TAG_CLOSE",e[e.TEXT=4]="TEXT",e[e.ESCAPABLE_RAW_TEXT=5]="ESCAPABLE_RAW_TEXT",e[e.RAW_TEXT=6]="RAW_TEXT",e[e.COMMENT_START=7]="COMMENT_START",e[e.COMMENT_END=8]="COMMENT_END",e[e.CDATA_START=9]="CDATA_START",e[e.CDATA_END=10]="CDATA_END",e[e.ATTR_NAME=11]="ATTR_NAME",e[e.ATTR_QUOTE=12]="ATTR_QUOTE",e[e.ATTR_VALUE=13]="ATTR_VALUE",e[e.DOC_TYPE=14]="DOC_TYPE",e[e.EXPANSION_FORM_START=15]="EXPANSION_FORM_START",e[e.EXPANSION_CASE_VALUE=16]="EXPANSION_CASE_VALUE",e[e.EXPANSION_CASE_EXP_START=17]="EXPANSION_CASE_EXP_START",e[e.EXPANSION_CASE_EXP_END=18]="EXPANSION_CASE_EXP_END",e[e.EXPANSION_FORM_END=19]="EXPANSION_FORM_END",e[e.EOF=20]="EOF"}(ea||(ea={}));var ra=function ra(e,t,n){this.type=e,this.parts=t,this.sourceSpan=n},ia=function(e){function t(t,n,r){var i=e.call(this,r,t)||this;return i.tokenType=n,i}return o(t,e),t}(go),oa=function oa(e,t){this.tokens=e,this.errors=t},sa=/\r\n?/g;function aa(e){return'Unexpected character "'+(e===Ii?"EOF":String.fromCharCode(e))+'"'}function ua(e){return'Unknown entity "'+e+'" - use the "&#<decimal>;" or "&#x<hex>;" syntax'}var la=function la(e){this.error=e},ca=function(){function e(e,t,n){this._getTagDefinition=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this._tokenizeIcu=n.tokenizeExpansionForms||!1,this._interpolationConfig=n.interpolationConfig||fi,this._leadingTriviaCodePoints=n.leadingTriviaChars&&n.leadingTriviaChars.map(function(e){return e.codePointAt(0)||0});var r=n.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=n.escapedString?new ya(e,r):new ma(e,r);try{this._cursor.init()}catch(e){this.handleError(e)}}return e.prototype._processCarriageReturns=function(e){return e.replace(sa,"\n")},e.prototype.tokenize=function(){for(;this._cursor.peek()!==Ii;){var e=this._cursor.clone();try{this._attemptCharCode(60)?this._attemptCharCode(33)?this._attemptCharCode(91)?this._consumeCdata(e):this._attemptCharCode(Ui)?this._consumeComment(e):this._consumeDocType(e):this._attemptCharCode(qi)?this._consumeTagClose(e):this._consumeTagOpen(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){this.handleError(e)}}return this._beginToken(ea.EOF),this._endToken([]),new oa(function t(e){for(var t=[],n=void 0,r=0;r<e.length;r++){var i=e[r];n&&n.type==ea.TEXT&&i.type==ea.TEXT?(n.parts[0]+=i.parts[0],n.sourceSpan.end=i.sourceSpan.end):t.push(n=i)}return t}(this.tokens),this.errors)},e.prototype._tokenizeExpansionForm=function(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(function e(t){return t===zi||co(t)||lo(t)}(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(125===this._cursor.peek()){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1},e.prototype._beginToken=function(e,t){void 0===t&&(t=this._cursor.clone()),this._currentTokenStart=t,this._currentTokenType=e},e.prototype._endToken=function(e,t){if(void 0===t&&(t=this._cursor.clone()),null===this._currentTokenStart)throw new ia("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(t));if(null===this._currentTokenType)throw new ia("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));var n=new ra(this._currentTokenType,e,this._cursor.getSpan(this._currentTokenStart,this._leadingTriviaCodePoints));return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n},e.prototype._createError=function(e,t){this._isInExpansionForm()&&(e+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');var n=new ia(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new la(n)},e.prototype.handleError=function(e){if(e instanceof ga&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),!(e instanceof la))throw e;this.errors.push(e.error)},e.prototype._attemptCharCode=function(e){return this._cursor.peek()===e&&(this._cursor.advance(),!0)},e.prototype._attemptCharCodeCaseInsensitive=function(e){return!!function t(e,n){return va(e)==va(n)}(this._cursor.peek(),e)&&(this._cursor.advance(),!0)},e.prototype._requireCharCode=function(e){var t=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(aa(this._cursor.peek()),this._cursor.getSpan(t))},e.prototype._attemptStr=function(e){var t=e.length;if(this._cursor.charsLeft()<t)return!1;for(var n=this._cursor.clone(),r=0;r<t;r++)if(!this._attemptCharCode(e.charCodeAt(r)))return this._cursor=n,!1;return!0},e.prototype._attemptStrCaseInsensitive=function(e){for(var t=0;t<e.length;t++)if(!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t)))return!1;return!0},e.prototype._requireStr=function(e){var t=this._cursor.clone();if(!this._attemptStr(e))throw this._createError(aa(this._cursor.peek()),this._cursor.getSpan(t))},e.prototype._attemptCharCodeUntilFn=function(e){for(;!e(this._cursor.peek());)this._cursor.advance()},e.prototype._requireCharCodeUntilFn=function(e,t){var n=this._cursor.clone();if(this._attemptCharCodeUntilFn(e),this._cursor.clone().diff(n)<t)throw this._createError(aa(this._cursor.peek()),this._cursor.getSpan(n))},e.prototype._attemptUntilChar=function(e){for(;this._cursor.peek()!==e;)this._cursor.advance()},e.prototype._readChar=function(e){if(e&&38===this._cursor.peek())return this._decodeEntity();var t=String.fromCodePoint(this._cursor.peek());return this._cursor.advance(),t},e.prototype._decodeEntity=function(){var e=this._cursor.clone();if(this._cursor.advance(),!this._attemptCharCode(35)){var t=this._cursor.clone();if(this._attemptCharCodeUntilFn(da),this._cursor.peek()!=Ki)return this._cursor=t,"&";var n=this._cursor.getChars(t);this._cursor.advance();var r=b[n];if(!r)throw this._createError(ua(n),this._cursor.getSpan(e));return r}var i=this._attemptCharCode(120)||this._attemptCharCode(88),o=this._cursor.clone();if(this._attemptCharCodeUntilFn(fa),this._cursor.peek()!=Ki)throw this._createError(aa(this._cursor.peek()),this._cursor.getSpan());var s=this._cursor.getChars(o);this._cursor.advance();try{var a=parseInt(s,i?16:10);return String.fromCharCode(a)}catch(t){throw this._createError(ua(this._cursor.getChars(e)),this._cursor.getSpan())}},e.prototype._consumeRawText=function(e,t){this._beginToken(e?ea.ESCAPABLE_RAW_TEXT:ea.RAW_TEXT);for(var n=[];;){var r=this._cursor.clone(),i=t();if(this._cursor=r,i)break;n.push(this._readChar(e))}return this._endToken([this._processCarriageReturns(n.join(""))])},e.prototype._consumeComment=function(e){var t=this;this._beginToken(ea.COMMENT_START,e),this._requireCharCode(Ui),this._endToken([]),this._consumeRawText(!1,function(){return t._attemptStr("--\x3e")}),this._beginToken(ea.COMMENT_END),this._requireStr("--\x3e"),this._endToken([])},e.prototype._consumeCdata=function(e){var t=this;this._beginToken(ea.CDATA_START,e),this._requireStr("CDATA["),this._endToken([]),this._consumeRawText(!1,function(){return t._attemptStr("]]>")}),this._beginToken(ea.CDATA_END),this._requireStr("]]>"),this._endToken([])},e.prototype._consumeDocType=function(e){this._beginToken(ea.DOC_TYPE,e);var t=this._cursor.clone();this._attemptUntilChar(Wi);var n=this._cursor.getChars(t);this._cursor.advance(),this._endToken([n])},e.prototype._consumePrefixAndName=function(){for(var e,t,n=this._cursor.clone(),r="";58!==this._cursor.peek()&&!(((e=this._cursor.peek())<eo||so<e)&&(e<Xi||Zi<e)&&(e<Qi||e>Gi));)this._cursor.advance();return 58===this._cursor.peek()?(r=this._cursor.getChars(n),this._cursor.advance(),t=this._cursor.clone()):t=n,this._requireCharCodeUntilFn(ha,""===r?0:1),[r,this._cursor.getChars(t)]},e.prototype._consumeTagOpen=function(e){var t,n,r,i=this.tokens.length,o=this._cursor.clone();try{if(!co(this._cursor.peek()))throw this._createError(aa(this._cursor.peek()),this._cursor.getSpan(e));for(n=(r=this._consumeTagOpenStart(e)).parts[0],t=r.parts[1],this._attemptCharCodeUntilFn(pa);this._cursor.peek()!==qi&&this._cursor.peek()!==Wi;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(pa),this._attemptCharCode(zi)&&(this._attemptCharCodeUntilFn(pa),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(pa);this._consumeTagOpenEnd()}catch(t){if(t instanceof la)return this._cursor=o,r&&(this.tokens.length=i),this._beginToken(ea.TEXT,e),void this._endToken(["<"]);throw t}var a=this._getTagDefinition(t).contentType;a===s.RAW_TEXT?this._consumeRawTextWithTagClose(n,t,!1):a===s.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,t,!0)},e.prototype._consumeRawTextWithTagClose=function(e,t,n){var r=this;this._consumeRawText(n,function(){return!!r._attemptCharCode(60)&&!!r._attemptCharCode(qi)&&(r._attemptCharCodeUntilFn(pa),!!r._attemptStrCaseInsensitive(t)&&(r._attemptCharCodeUntilFn(pa),r._attemptCharCode(Wi)))}),this._beginToken(ea.TAG_CLOSE),this._requireCharCodeUntilFn(function(e){return e===Wi},3),this._cursor.advance(),this._endToken([e,t])},e.prototype._consumeTagOpenStart=function(e){this._beginToken(ea.TAG_OPEN_START,e);var t=this._consumePrefixAndName();return this._endToken(t)},e.prototype._consumeAttributeName=function(){var e=this._cursor.peek();if(e===Bi||e===ji)throw this._createError(aa(e),this._cursor.getSpan());this._beginToken(ea.ATTR_NAME);var t=this._consumePrefixAndName();this._endToken(t)},e.prototype._consumeAttributeValue=function(){var e;if(this._cursor.peek()===Bi||this._cursor.peek()===ji){this._beginToken(ea.ATTR_QUOTE);var t=this._cursor.peek();this._cursor.advance(),this._endToken([String.fromCodePoint(t)]),this._beginToken(ea.ATTR_VALUE);for(var n=[];this._cursor.peek()!==t;)n.push(this._readChar(!0));e=n.join(""),this._endToken([this._processCarriageReturns(e)]),this._beginToken(ea.ATTR_QUOTE),this._cursor.advance(),this._endToken([String.fromCodePoint(t)])}else{this._beginToken(ea.ATTR_VALUE);var r=this._cursor.clone();this._requireCharCodeUntilFn(ha,1),e=this._cursor.getChars(r),this._endToken([this._processCarriageReturns(e)])}},e.prototype._consumeTagOpenEnd=function(){var e=this._attemptCharCode(qi)?ea.TAG_OPEN_END_VOID:ea.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(Wi),this._endToken([])},e.prototype._consumeTagClose=function(e){this._beginToken(ea.TAG_CLOSE,e),this._attemptCharCodeUntilFn(pa);var t=this._consumePrefixAndName();this._attemptCharCodeUntilFn(pa),this._requireCharCode(Wi),this._endToken(t)},e.prototype._consumeExpansionFormStart=function(){this._beginToken(ea.EXPANSION_FORM_START),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(ea.EXPANSION_FORM_START),this._beginToken(ea.RAW_TEXT);var e=this._readUntil(44);this._endToken([e]),this._requireCharCode(44),this._attemptCharCodeUntilFn(pa),this._beginToken(ea.RAW_TEXT);var t=this._readUntil(44);this._endToken([t]),this._requireCharCode(44),this._attemptCharCodeUntilFn(pa)},e.prototype._consumeExpansionCaseStart=function(){this._beginToken(ea.EXPANSION_CASE_VALUE);var e=this._readUntil(123).trim();this._endToken([e]),this._attemptCharCodeUntilFn(pa),this._beginToken(ea.EXPANSION_CASE_EXP_START),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(pa),this._expansionCaseStack.push(ea.EXPANSION_CASE_EXP_START)},e.prototype._consumeExpansionCaseEnd=function(){this._beginToken(ea.EXPANSION_CASE_EXP_END),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(pa),this._expansionCaseStack.pop()},e.prototype._consumeExpansionFormEnd=function(){this._beginToken(ea.EXPANSION_FORM_END),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()},e.prototype._consumeText=function(){var e=this._cursor.clone();this._beginToken(ea.TEXT,e);var t=[];do{this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(t.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._inInterpolation&&this._attemptStr(this._interpolationConfig.end)?(t.push(this._interpolationConfig.end),this._inInterpolation=!1):t.push(this._readChar(!0))}while(!this._isTextEnd());this._endToken([this._processCarriageReturns(t.join(""))])},e.prototype._isTextEnd=function(){if(60===this._cursor.peek()||this._cursor.peek()===Ii)return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(this.isExpansionFormStart())return!0;if(125===this._cursor.peek()&&this._isInExpansionCase())return!0}return!1},e.prototype._readUntil=function(e){var t=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(t)},e.prototype._isInExpansionCase=function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===ea.EXPANSION_CASE_EXP_START},e.prototype._isInExpansionForm=function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===ea.EXPANSION_FORM_START},e.prototype.isExpansionFormStart=function(){if(123!==this._cursor.peek())return!1;if(this._interpolationConfig){var e=this._cursor.clone(),t=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!t}return!0},e}();function pa(e){return!uo(e)||e===Ii}function ha(e){return uo(e)||e===Wi||e===qi||e===Bi||e===ji||e===zi}function fa(e){return e==Ki||e==Ii||!function t(e){return e>=eo&&e<=to||e>=Xi&&e<=Yi||lo(e)}(e)}function da(e){return e==Ki||e==Ii||!co(e)}function va(e){return e>=eo&&e<=so?e-eo+Xi:e}var ma=function(){function e(t,n){if(t instanceof e)this.file=t.file,this.input=t.input,this.end=t.end,this.state=a({},t.state);else{if(!n)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=t,this.input=t.content,this.end=n.endPos,this.state={peek:-1,offset:n.startPos,line:n.startLine,column:n.startCol}}}return e.prototype.clone=function(){return new e(this)},e.prototype.peek=function(){return this.state.peek},e.prototype.charsLeft=function(){return this.end-this.state.offset},e.prototype.diff=function(e){return this.state.offset-e.state.offset},e.prototype.advance=function(){this.advanceState(this.state)},e.prototype.init=function(){this.updatePeek(this.state)},e.prototype.getSpan=function(e,t){if(e=e||this,t)for(e=e.clone();this.diff(e)>0&&-1!==t.indexOf(e.peek());)e.advance();return new yo(new vo(e.file,e.state.offset,e.state.line,e.state.column),new vo(this.file,this.state.offset,this.state.line,this.state.column))},e.prototype.getChars=function(e){return this.input.substring(e.state.offset,this.state.offset)},e.prototype.charAt=function(e){return this.input.charCodeAt(e)},e.prototype.advanceState=function(e){if(e.offset>=this.end)throw this.state=e,new ga('Unexpected character "EOF"',this);var t=this.charAt(e.offset);t===Oi?(e.line++,e.column=0):po(t)||e.column++,e.offset++,this.updatePeek(e)},e.prototype.updatePeek=function(e){e.peek=e.offset>=this.end?Ii:this.charAt(e.offset)},e}(),ya=function(e){function t(n,r){var i=this;return n instanceof t?(i=e.call(this,n)||this).internalState=a({},n.internalState):(i=e.call(this,n,r)||this).internalState=i.state,i}return o(t,e),t.prototype.advance=function(){this.state=this.internalState,e.prototype.advance.call(this),this.processEscapeSequence()},t.prototype.init=function(){e.prototype.init.call(this),this.processEscapeSequence()},t.prototype.clone=function(){return new t(this)},t.prototype.getChars=function(e){for(var t=e.clone(),n="";t.internalState.offset<this.internalState.offset;)n+=String.fromCodePoint(t.peek()),t.advance();return n},t.prototype.processEscapeSequence=function(){var e=this,t=function(){return e.internalState.peek};if(92===t())if(this.internalState=a({},this.state),this.advanceState(this.internalState),t()===no)this.state.peek=Oi;else if(t()===ro)this.state.peek=Li;else if(t()===oo)this.state.peek=Ri;else if(t()===io)this.state.peek=Mi;else if(98===t())this.state.peek=8;else if(t()===to)this.state.peek=Di;else if(117===t())if(this.advanceState(this.internalState),123===t()){this.advanceState(this.internalState);for(var n=this.clone(),r=0;125!==t();)this.advanceState(this.internalState),r++;this.state.peek=this.decodeHexDigits(n,r)}else n=this.clone(),this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(n,4);else if(120===t())this.advanceState(this.internalState),n=this.clone(),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(n,2);else if(ho(t())){for(var i="",o=0,s=this.clone();ho(t())&&o<3;)s=this.clone(),i+=String.fromCodePoint(t()),this.advanceState(this.internalState),o++;this.state.peek=parseInt(i,8),this.internalState=s.internalState}else po(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek},t.prototype.decodeHexDigits=function(e,t){var n=this.input.substr(e.internalState.offset,t),r=parseInt(n,16);if(isNaN(r))throw e.state=e.internalState,new ga("Invalid hexadecimal escape sequence",e);return r},t}(ma),ga=function ga(e,t){this.msg=e,this.cursor=t},_a=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.elementName=t,i}return o(t,e),t.create=function(e,n,r){return new t(e,n,r)},t}(go),ba=function ba(e,t){this.rootNodes=e,this.errors=t},wa=function(){function e(e){this.getTagDefinition=e}return e.prototype.parse=function(e,t,n){var r=function i(e,t,n,r){return void 0===r&&(r={}),new ca(new mo(e,t),n,r).tokenize()}(e,t,this.getTagDefinition,n),o=new xa(r.tokens,this.getTagDefinition).build();return new ba(o.rootNodes,r.errors.concat(o.errors))},e}(),xa=function(){function e(e,t){this.tokens=e,this.getTagDefinition=t,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}return e.prototype.build=function(){for(;this._peek.type!==ea.EOF;)this._peek.type===ea.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===ea.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===ea.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===ea.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===ea.TEXT||this._peek.type===ea.RAW_TEXT||this._peek.type===ea.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===ea.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._advance();return new ba(this._rootNodes,this._errors)},e.prototype._advance=function(){var e=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],e},e.prototype._advanceIf=function(e){return this._peek.type===e?this._advance():null},e.prototype._consumeCdata=function(e){this._consumeText(this._advance()),this._advanceIf(ea.CDATA_END)},e.prototype._consumeComment=function(e){var t=this._advanceIf(ea.RAW_TEXT);this._advanceIf(ea.COMMENT_END);var n=null!=t?t.parts[0].trim():null;this._addToParent(new Zs(n,e.sourceSpan))},e.prototype._consumeExpansion=function(e){for(var t=this._advance(),n=this._advance(),r=[];this._peek.type===ea.EXPANSION_CASE_VALUE;){var i=this._parseExpansionCase();if(!i)return;r.push(i)}if(this._peek.type===ea.EXPANSION_FORM_END){var o=new yo(e.sourceSpan.start,this._peek.sourceSpan.end);this._addToParent(new $s(t.parts[0],n.parts[0],r,o,t.sourceSpan)),this._advance()}else this._errors.push(_a.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."))},e.prototype._parseExpansionCase=function(){var t=this._advance();if(this._peek.type!==ea.EXPANSION_CASE_EXP_START)return this._errors.push(_a.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;var n=this._advance(),r=this._collectExpansionExpTokens(n);if(!r)return null;var i=this._advance();r.push(new ra(ea.EOF,[],i.sourceSpan));var o=new e(r,this.getTagDefinition).build();if(o.errors.length>0)return this._errors=this._errors.concat(o.errors),null;var s=new yo(t.sourceSpan.start,i.sourceSpan.end),a=new yo(n.sourceSpan.start,i.sourceSpan.end);return new Gs(t.parts[0],o.rootNodes,s,t.sourceSpan,a)},e.prototype._collectExpansionExpTokens=function(e){for(var t=[],n=[ea.EXPANSION_CASE_EXP_START];;){if(this._peek.type!==ea.EXPANSION_FORM_START&&this._peek.type!==ea.EXPANSION_CASE_EXP_START||n.push(this._peek.type),this._peek.type===ea.EXPANSION_CASE_EXP_END){if(!Ea(n,ea.EXPANSION_CASE_EXP_START))return this._errors.push(_a.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(n.pop(),0==n.length)return t}if(this._peek.type===ea.EXPANSION_FORM_END){if(!Ea(n,ea.EXPANSION_FORM_START))return this._errors.push(_a.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;n.pop()}if(this._peek.type===ea.EOF)return this._errors.push(_a.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;t.push(this._advance())}},e.prototype._consumeText=function(e){var t=e.parts[0];if(t.length>0&&"\n"==t[0]){var n=this._getParentElement();null!=n&&0==n.children.length&&this.getTagDefinition(n.name).ignoreFirstLf&&(t=t.substring(1))}t.length>0&&this._addToParent(new Qs(t,e.sourceSpan))},e.prototype._closeVoidElement=function(){var e=this._getParentElement();e&&this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()},e.prototype._consumeStartTag=function(e){for(var t=e.parts[0],n=e.parts[1],r=[];this._peek.type===ea.ATTR_NAME;)r.push(this._consumeAttr(this._advance()));var i=this._getElementFullName(t,n,this._getParentElement()),o=!1;if(this._peek.type===ea.TAG_OPEN_END_VOID){this._advance(),o=!0;var s=this.getTagDefinition(i);s.canSelfClose||null!==g(i)||s.isVoid||this._errors.push(_a.create(i,e.sourceSpan,'Only void and foreign elements can be self closed "'+e.parts[1]+'"'))}else this._peek.type===ea.TAG_OPEN_END&&(this._advance(),o=!1);var a=new yo(e.sourceSpan.start,this._peek.sourceSpan.start),u=new Ys(i,r,[],a,a,void 0);this._pushElement(u),o&&(this._popElement(i),u.endSourceSpan=a)},e.prototype._pushElement=function(e){var t=this._getParentElement();t&&this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop(),this._addToParent(e),this._elementStack.push(e)},e.prototype._consumeEndTag=function(e){var t=this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());this._getParentElement()&&(this._getParentElement().endSourceSpan=e.sourceSpan),this.getTagDefinition(t).isVoid?this._errors.push(_a.create(t,e.sourceSpan,'Void elements do not have end tags "'+e.parts[1]+'"')):this._popElement(t)||this._errors.push(_a.create(t,e.sourceSpan,'Unexpected closing tag "'+t+'". 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'))},e.prototype._popElement=function(e){for(var t=this._elementStack.length-1;t>=0;t--){var n=this._elementStack[t];if(n.name==e)return this._elementStack.splice(t,this._elementStack.length-t),!0;if(!this.getTagDefinition(n.name).closedByParent)return!1}return!1},e.prototype._consumeAttr=function(e){var t=_(e.parts[0],e.parts[1]),n=e.sourceSpan.end,r="",i=void 0;if(this._peek.type===ea.ATTR_QUOTE&&this._advance(),this._peek.type===ea.ATTR_VALUE){var o=this._advance();r=o.parts[0],n=o.sourceSpan.end,i=o.sourceSpan}return this._peek.type===ea.ATTR_QUOTE&&(n=this._advance().sourceSpan.end),new Xs(t,r,new yo(e.sourceSpan.start,n),i)},e.prototype._getParentElement=function(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null},e.prototype._getParentElementSkippingContainers=function(){for(var e=null,t=this._elementStack.length-1;t>=0;t--){if(!v(this._elementStack[t].name))return{parent:this._elementStack[t],container:e};e=this._elementStack[t]}return{parent:null,container:e}},e.prototype._addToParent=function(e){var t=this._getParentElement();null!=t?t.children.push(e):this._rootNodes.push(e)},e.prototype._insertBeforeContainer=function(e,t,n){if(t){if(e){var r=e.children.indexOf(t);e.children[r]=n}else this._rootNodes.push(n);n.children.push(t),this._elementStack.splice(this._elementStack.indexOf(t),0,n)}else this._addToParent(n),this._elementStack.push(n)},e.prototype._getElementFullName=function(e,t,n){return""===e&&""===(e=this.getTagDefinition(t).implicitNamespacePrefix||"")&&null!=n&&(e=g(n.name)),_(e,t)},e}();function Ea(e,t){return e.length>0&&e[e.length-1]===t}
|
|
208
|
+
*/!function(e){e[e.TAG_OPEN_START=0]="TAG_OPEN_START",e[e.TAG_OPEN_END=1]="TAG_OPEN_END",e[e.TAG_OPEN_END_VOID=2]="TAG_OPEN_END_VOID",e[e.TAG_CLOSE=3]="TAG_CLOSE",e[e.TEXT=4]="TEXT",e[e.ESCAPABLE_RAW_TEXT=5]="ESCAPABLE_RAW_TEXT",e[e.RAW_TEXT=6]="RAW_TEXT",e[e.COMMENT_START=7]="COMMENT_START",e[e.COMMENT_END=8]="COMMENT_END",e[e.CDATA_START=9]="CDATA_START",e[e.CDATA_END=10]="CDATA_END",e[e.ATTR_NAME=11]="ATTR_NAME",e[e.ATTR_QUOTE=12]="ATTR_QUOTE",e[e.ATTR_VALUE=13]="ATTR_VALUE",e[e.DOC_TYPE=14]="DOC_TYPE",e[e.EXPANSION_FORM_START=15]="EXPANSION_FORM_START",e[e.EXPANSION_CASE_VALUE=16]="EXPANSION_CASE_VALUE",e[e.EXPANSION_CASE_EXP_START=17]="EXPANSION_CASE_EXP_START",e[e.EXPANSION_CASE_EXP_END=18]="EXPANSION_CASE_EXP_END",e[e.EXPANSION_FORM_END=19]="EXPANSION_FORM_END",e[e.EOF=20]="EOF"}(ea||(ea={}));var ra=function ra(e,t,n){this.type=e,this.parts=t,this.sourceSpan=n},ia=function(e){function t(t,n,r){var i=e.call(this,r,t)||this;return i.tokenType=n,i}return o(t,e),t}(ir),oa=function oa(e,t){this.tokens=e,this.errors=t},sa=/\r\n?/g;function aa(e){return'Unexpected character "'+(e===gn?"EOF":String.fromCharCode(e))+'"'}function ua(e){return'Unknown entity "'+e+'" - use the "&#<decimal>;" or "&#x<hex>;" syntax'}var la=function la(e){this.error=e},ca=function(){function e(e,t,n){this._getTagDefinition=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this._tokenizeIcu=n.tokenizeExpansionForms||!1,this._interpolationConfig=n.interpolationConfig||eo,this._leadingTriviaCodePoints=n.leadingTriviaChars&&n.leadingTriviaChars.map(function(e){return e.codePointAt(0)||0});var r=n.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=n.escapedString?new ya(e,r):new ma(e,r);try{this._cursor.init()}catch(e){this.handleError(e)}}return e.prototype._processCarriageReturns=function(e){return e.replace(sa,"\n")},e.prototype.tokenize=function(){for(;this._cursor.peek()!==gn;){var e=this._cursor.clone();try{this._attemptCharCode(60)?this._attemptCharCode(33)?this._attemptCharCode(91)?this._consumeCdata(e):this._attemptCharCode(An)?this._consumeComment(e):this._consumeDocType(e):this._attemptCharCode(Pn)?this._consumeTagClose(e):this._consumeTagOpen(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){this.handleError(e)}}return this._beginToken(ea.EOF),this._endToken([]),new oa(function t(e){for(var t=[],n=void 0,r=0;r<e.length;r++){var i=e[r];n&&n.type==ea.TEXT&&i.type==ea.TEXT?(n.parts[0]+=i.parts[0],n.sourceSpan.end=i.sourceSpan.end):t.push(n=i)}return t}(this.tokens),this.errors)},e.prototype._tokenizeExpansionForm=function(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(function e(t){return t===Mn||Yn(t)||Xn(t)}(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(125===this._cursor.peek()){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1},e.prototype._beginToken=function(e,t){void 0===t&&(t=this._cursor.clone()),this._currentTokenStart=t,this._currentTokenType=e},e.prototype._endToken=function(e,t){if(void 0===t&&(t=this._cursor.clone()),null===this._currentTokenStart)throw new ia("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(t));if(null===this._currentTokenType)throw new ia("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));var n=new ra(this._currentTokenType,e,this._cursor.getSpan(this._currentTokenStart,this._leadingTriviaCodePoints));return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n},e.prototype._createError=function(e,t){this._isInExpansionForm()&&(e+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');var n=new ia(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new la(n)},e.prototype.handleError=function(e){if(e instanceof ga&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),!(e instanceof la))throw e;this.errors.push(e.error)},e.prototype._attemptCharCode=function(e){return this._cursor.peek()===e&&(this._cursor.advance(),!0)},e.prototype._attemptCharCodeCaseInsensitive=function(e){return!!function t(e,n){return va(e)==va(n)}(this._cursor.peek(),e)&&(this._cursor.advance(),!0)},e.prototype._requireCharCode=function(e){var t=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(aa(this._cursor.peek()),this._cursor.getSpan(t))},e.prototype._attemptStr=function(e){var t=e.length;if(this._cursor.charsLeft()<t)return!1;for(var n=this._cursor.clone(),r=0;r<t;r++)if(!this._attemptCharCode(e.charCodeAt(r)))return this._cursor=n,!1;return!0},e.prototype._attemptStrCaseInsensitive=function(e){for(var t=0;t<e.length;t++)if(!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t)))return!1;return!0},e.prototype._requireStr=function(e){var t=this._cursor.clone();if(!this._attemptStr(e))throw this._createError(aa(this._cursor.peek()),this._cursor.getSpan(t))},e.prototype._attemptCharCodeUntilFn=function(e){for(;!e(this._cursor.peek());)this._cursor.advance()},e.prototype._requireCharCodeUntilFn=function(e,t){var n=this._cursor.clone();if(this._attemptCharCodeUntilFn(e),this._cursor.clone().diff(n)<t)throw this._createError(aa(this._cursor.peek()),this._cursor.getSpan(n))},e.prototype._attemptUntilChar=function(e){for(;this._cursor.peek()!==e;)this._cursor.advance()},e.prototype._readChar=function(e){if(e&&38===this._cursor.peek())return this._decodeEntity();var t=String.fromCodePoint(this._cursor.peek());return this._cursor.advance(),t},e.prototype._decodeEntity=function(){var e=this._cursor.clone();if(this._cursor.advance(),!this._attemptCharCode(35)){var t=this._cursor.clone();if(this._attemptCharCodeUntilFn(da),this._cursor.peek()!=In)return this._cursor=t,"&";var n=this._cursor.getChars(t);this._cursor.advance();var r=b[n];if(!r)throw this._createError(ua(n),this._cursor.getSpan(e));return r}var i=this._attemptCharCode(120)||this._attemptCharCode(88),o=this._cursor.clone();if(this._attemptCharCodeUntilFn(fa),this._cursor.peek()!=In)throw this._createError(aa(this._cursor.peek()),this._cursor.getSpan());var s=this._cursor.getChars(o);this._cursor.advance();try{var a=parseInt(s,i?16:10);return String.fromCharCode(a)}catch(t){throw this._createError(ua(this._cursor.getChars(e)),this._cursor.getSpan())}},e.prototype._consumeRawText=function(e,t){this._beginToken(e?ea.ESCAPABLE_RAW_TEXT:ea.RAW_TEXT);for(var n=[];;){var r=this._cursor.clone(),i=t();if(this._cursor=r,i)break;n.push(this._readChar(e))}return this._endToken([this._processCarriageReturns(n.join(""))])},e.prototype._consumeComment=function(e){var t=this;this._beginToken(ea.COMMENT_START,e),this._requireCharCode(An),this._endToken([]),this._consumeRawText(!1,function(){return t._attemptStr("--\x3e")}),this._beginToken(ea.COMMENT_END),this._requireStr("--\x3e"),this._endToken([])},e.prototype._consumeCdata=function(e){var t=this;this._beginToken(ea.CDATA_START,e),this._requireStr("CDATA["),this._endToken([]),this._consumeRawText(!1,function(){return t._attemptStr("]]>")}),this._beginToken(ea.CDATA_END),this._requireStr("]]>"),this._endToken([])},e.prototype._consumeDocType=function(e){this._beginToken(ea.DOC_TYPE,e);var t=this._cursor.clone();this._attemptUntilChar(On);var n=this._cursor.getChars(t);this._cursor.advance(),this._endToken([n])},e.prototype._consumePrefixAndName=function(){for(var e,t,n=this._cursor.clone(),r="";58!==this._cursor.peek()&&!(((e=this._cursor.peek())<Hn||Qn<e)&&(e<Fn||Vn<e)&&(e<Rn||e>Ln));)this._cursor.advance();return 58===this._cursor.peek()?(r=this._cursor.getChars(n),this._cursor.advance(),t=this._cursor.clone()):t=n,this._requireCharCodeUntilFn(ha,""===r?0:1),[r,this._cursor.getChars(t)]},e.prototype._consumeTagOpen=function(e){var t,n,r,i=this.tokens.length,o=this._cursor.clone();try{if(!Yn(this._cursor.peek()))throw this._createError(aa(this._cursor.peek()),this._cursor.getSpan(e));for(n=(r=this._consumeTagOpenStart(e)).parts[0],t=r.parts[1],this._attemptCharCodeUntilFn(pa);this._cursor.peek()!==Pn&&this._cursor.peek()!==On;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(pa),this._attemptCharCode(Mn)&&(this._attemptCharCodeUntilFn(pa),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(pa);this._consumeTagOpenEnd()}catch(t){if(t instanceof la)return this._cursor=o,r&&(this.tokens.length=i),this._beginToken(ea.TEXT,e),void this._endToken(["<"]);throw t}var a=this._getTagDefinition(t).contentType;a===s.RAW_TEXT?this._consumeRawTextWithTagClose(n,t,!1):a===s.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,t,!0)},e.prototype._consumeRawTextWithTagClose=function(e,t,n){var r=this;this._consumeRawText(n,function(){return!!r._attemptCharCode(60)&&!!r._attemptCharCode(Pn)&&(r._attemptCharCodeUntilFn(pa),!!r._attemptStrCaseInsensitive(t)&&(r._attemptCharCodeUntilFn(pa),r._attemptCharCode(On)))}),this._beginToken(ea.TAG_CLOSE),this._requireCharCodeUntilFn(function(e){return e===On},3),this._cursor.advance(),this._endToken([e,t])},e.prototype._consumeTagOpenStart=function(e){this._beginToken(ea.TAG_OPEN_START,e);var t=this._consumePrefixAndName();return this._endToken(t)},e.prototype._consumeAttributeName=function(){var e=this._cursor.peek();if(e===Nn||e===Cn)throw this._createError(aa(e),this._cursor.getSpan());this._beginToken(ea.ATTR_NAME);var t=this._consumePrefixAndName();this._endToken(t)},e.prototype._consumeAttributeValue=function(){var e;if(this._cursor.peek()===Nn||this._cursor.peek()===Cn){this._beginToken(ea.ATTR_QUOTE);var t=this._cursor.peek();this._cursor.advance(),this._endToken([String.fromCodePoint(t)]),this._beginToken(ea.ATTR_VALUE);for(var n=[];this._cursor.peek()!==t;)n.push(this._readChar(!0));e=n.join(""),this._endToken([this._processCarriageReturns(e)]),this._beginToken(ea.ATTR_QUOTE),this._cursor.advance(),this._endToken([String.fromCodePoint(t)])}else{this._beginToken(ea.ATTR_VALUE);var r=this._cursor.clone();this._requireCharCodeUntilFn(ha,1),e=this._cursor.getChars(r),this._endToken([this._processCarriageReturns(e)])}},e.prototype._consumeTagOpenEnd=function(){var e=this._attemptCharCode(Pn)?ea.TAG_OPEN_END_VOID:ea.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(On),this._endToken([])},e.prototype._consumeTagClose=function(e){this._beginToken(ea.TAG_CLOSE,e),this._attemptCharCodeUntilFn(pa);var t=this._consumePrefixAndName();this._attemptCharCodeUntilFn(pa),this._requireCharCode(On),this._endToken(t)},e.prototype._consumeExpansionFormStart=function(){this._beginToken(ea.EXPANSION_FORM_START),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(ea.EXPANSION_FORM_START),this._beginToken(ea.RAW_TEXT);var e=this._readUntil(44);this._endToken([e]),this._requireCharCode(44),this._attemptCharCodeUntilFn(pa),this._beginToken(ea.RAW_TEXT);var t=this._readUntil(44);this._endToken([t]),this._requireCharCode(44),this._attemptCharCodeUntilFn(pa)},e.prototype._consumeExpansionCaseStart=function(){this._beginToken(ea.EXPANSION_CASE_VALUE);var e=this._readUntil(123).trim();this._endToken([e]),this._attemptCharCodeUntilFn(pa),this._beginToken(ea.EXPANSION_CASE_EXP_START),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(pa),this._expansionCaseStack.push(ea.EXPANSION_CASE_EXP_START)},e.prototype._consumeExpansionCaseEnd=function(){this._beginToken(ea.EXPANSION_CASE_EXP_END),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(pa),this._expansionCaseStack.pop()},e.prototype._consumeExpansionFormEnd=function(){this._beginToken(ea.EXPANSION_FORM_END),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()},e.prototype._consumeText=function(){var e=this._cursor.clone();this._beginToken(ea.TEXT,e);var t=[];do{this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(t.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._inInterpolation&&this._attemptStr(this._interpolationConfig.end)?(t.push(this._interpolationConfig.end),this._inInterpolation=!1):t.push(this._readChar(!0))}while(!this._isTextEnd());this._endToken([this._processCarriageReturns(t.join(""))])},e.prototype._isTextEnd=function(){if(60===this._cursor.peek()||this._cursor.peek()===gn)return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(this.isExpansionFormStart())return!0;if(125===this._cursor.peek()&&this._isInExpansionCase())return!0}return!1},e.prototype._readUntil=function(e){var t=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(t)},e.prototype._isInExpansionCase=function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===ea.EXPANSION_CASE_EXP_START},e.prototype._isInExpansionForm=function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===ea.EXPANSION_FORM_START},e.prototype.isExpansionFormStart=function(){if(123!==this._cursor.peek())return!1;if(this._interpolationConfig){var e=this._cursor.clone(),t=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!t}return!0},e}();function pa(e){return!Gn(e)||e===gn}function ha(e){return Gn(e)||e===On||e===Pn||e===Nn||e===Cn||e===Mn}function fa(e){return e==In||e==gn||!function t(e){return e>=Hn&&e<=Un||e>=Fn&&e<=jn||Xn(e)}(e)}function da(e){return e==In||e==gn||!Yn(e)}function va(e){return e>=Hn&&e<=Qn?e-Hn+Fn:e}var ma=function(){function e(t,n){if(t instanceof e)this.file=t.file,this.input=t.input,this.end=t.end,this.state=a({},t.state);else{if(!n)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=t,this.input=t.content,this.end=n.endPos,this.state={peek:-1,offset:n.startPos,line:n.startLine,column:n.startCol}}}return e.prototype.clone=function(){return new e(this)},e.prototype.peek=function(){return this.state.peek},e.prototype.charsLeft=function(){return this.end-this.state.offset},e.prototype.diff=function(e){return this.state.offset-e.state.offset},e.prototype.advance=function(){this.advanceState(this.state)},e.prototype.init=function(){this.updatePeek(this.state)},e.prototype.getSpan=function(e,t){if(e=e||this,t)for(e=e.clone();this.diff(e)>0&&-1!==t.indexOf(e.peek());)e.advance();return new rr(new tr(e.file,e.state.offset,e.state.line,e.state.column),new tr(this.file,this.state.offset,this.state.line,this.state.column))},e.prototype.getChars=function(e){return this.input.substring(e.state.offset,this.state.offset)},e.prototype.charAt=function(e){return this.input.charCodeAt(e)},e.prototype.advanceState=function(e){if(e.offset>=this.end)throw this.state=e,new ga('Unexpected character "EOF"',this);var t=this.charAt(e.offset);t===bn?(e.line++,e.column=0):Zn(t)||e.column++,e.offset++,this.updatePeek(e)},e.prototype.updatePeek=function(e){e.peek=e.offset>=this.end?gn:this.charAt(e.offset)},e}(),ya=function(e){function t(n,r){var i=this;return n instanceof t?(i=e.call(this,n)||this).internalState=a({},n.internalState):(i=e.call(this,n,r)||this).internalState=i.state,i}return o(t,e),t.prototype.advance=function(){this.state=this.internalState,e.prototype.advance.call(this),this.processEscapeSequence()},t.prototype.init=function(){e.prototype.init.call(this),this.processEscapeSequence()},t.prototype.clone=function(){return new t(this)},t.prototype.getChars=function(e){for(var t=e.clone(),n="";t.internalState.offset<this.internalState.offset;)n+=String.fromCodePoint(t.peek()),t.advance();return n},t.prototype.processEscapeSequence=function(){var e=this,t=function(){return e.internalState.peek};if(92===t())if(this.internalState=a({},this.state),this.advanceState(this.internalState),t()===qn)this.state.peek=bn;else if(t()===Kn)this.state.peek=En;else if(t()===Wn)this.state.peek=wn;else if(t()===zn)this.state.peek=_n;else if(98===t())this.state.peek=8;else if(t()===Un)this.state.peek=xn;else if(117===t())if(this.advanceState(this.internalState),123===t()){this.advanceState(this.internalState);for(var n=this.clone(),r=0;125!==t();)this.advanceState(this.internalState),r++;this.state.peek=this.decodeHexDigits(n,r)}else n=this.clone(),this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(n,4);else if(120===t())this.advanceState(this.internalState),n=this.clone(),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(n,2);else if(Jn(t())){for(var i="",o=0,s=this.clone();Jn(t())&&o<3;)s=this.clone(),i+=String.fromCodePoint(t()),this.advanceState(this.internalState),o++;this.state.peek=parseInt(i,8),this.internalState=s.internalState}else Zn(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek},t.prototype.decodeHexDigits=function(e,t){var n=this.input.substr(e.internalState.offset,t),r=parseInt(n,16);if(isNaN(r))throw e.state=e.internalState,new ga("Invalid hexadecimal escape sequence",e);return r},t}(ma),ga=function ga(e,t){this.msg=e,this.cursor=t},_a=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.elementName=t,i}return o(t,e),t.create=function(e,n,r){return new t(e,n,r)},t}(ir),ba=function ba(e,t){this.rootNodes=e,this.errors=t},wa=function(){function e(e){this.getTagDefinition=e}return e.prototype.parse=function(e,t,n){var r=function i(e,t,n,r){return void 0===r&&(r={}),new ca(new nr(e,t),n,r).tokenize()}(e,t,this.getTagDefinition,n),o=new xa(r.tokens,this.getTagDefinition).build();return new ba(o.rootNodes,r.errors.concat(o.errors))},e}(),xa=function(){function e(e,t){this.tokens=e,this.getTagDefinition=t,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}return e.prototype.build=function(){for(;this._peek.type!==ea.EOF;)this._peek.type===ea.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===ea.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===ea.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===ea.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===ea.TEXT||this._peek.type===ea.RAW_TEXT||this._peek.type===ea.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===ea.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._advance();return new ba(this._rootNodes,this._errors)},e.prototype._advance=function(){var e=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],e},e.prototype._advanceIf=function(e){return this._peek.type===e?this._advance():null},e.prototype._consumeCdata=function(e){this._consumeText(this._advance()),this._advanceIf(ea.CDATA_END)},e.prototype._consumeComment=function(e){var t=this._advanceIf(ea.RAW_TEXT);this._advanceIf(ea.COMMENT_END);var n=null!=t?t.parts[0].trim():null;this._addToParent(new Zs(n,e.sourceSpan))},e.prototype._consumeExpansion=function(e){for(var t=this._advance(),n=this._advance(),r=[];this._peek.type===ea.EXPANSION_CASE_VALUE;){var i=this._parseExpansionCase();if(!i)return;r.push(i)}if(this._peek.type===ea.EXPANSION_FORM_END){var o=new rr(e.sourceSpan.start,this._peek.sourceSpan.end);this._addToParent(new $s(t.parts[0],n.parts[0],r,o,t.sourceSpan)),this._advance()}else this._errors.push(_a.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."))},e.prototype._parseExpansionCase=function(){var t=this._advance();if(this._peek.type!==ea.EXPANSION_CASE_EXP_START)return this._errors.push(_a.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;var n=this._advance(),r=this._collectExpansionExpTokens(n);if(!r)return null;var i=this._advance();r.push(new ra(ea.EOF,[],i.sourceSpan));var o=new e(r,this.getTagDefinition).build();if(o.errors.length>0)return this._errors=this._errors.concat(o.errors),null;var s=new rr(t.sourceSpan.start,i.sourceSpan.end),a=new rr(n.sourceSpan.start,i.sourceSpan.end);return new Gs(t.parts[0],o.rootNodes,s,t.sourceSpan,a)},e.prototype._collectExpansionExpTokens=function(e){for(var t=[],n=[ea.EXPANSION_CASE_EXP_START];;){if(this._peek.type!==ea.EXPANSION_FORM_START&&this._peek.type!==ea.EXPANSION_CASE_EXP_START||n.push(this._peek.type),this._peek.type===ea.EXPANSION_CASE_EXP_END){if(!Ea(n,ea.EXPANSION_CASE_EXP_START))return this._errors.push(_a.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(n.pop(),0==n.length)return t}if(this._peek.type===ea.EXPANSION_FORM_END){if(!Ea(n,ea.EXPANSION_FORM_START))return this._errors.push(_a.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;n.pop()}if(this._peek.type===ea.EOF)return this._errors.push(_a.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;t.push(this._advance())}},e.prototype._consumeText=function(e){var t=e.parts[0];if(t.length>0&&"\n"==t[0]){var n=this._getParentElement();null!=n&&0==n.children.length&&this.getTagDefinition(n.name).ignoreFirstLf&&(t=t.substring(1))}t.length>0&&this._addToParent(new Qs(t,e.sourceSpan))},e.prototype._closeVoidElement=function(){var e=this._getParentElement();e&&this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()},e.prototype._consumeStartTag=function(e){for(var t=e.parts[0],n=e.parts[1],r=[];this._peek.type===ea.ATTR_NAME;)r.push(this._consumeAttr(this._advance()));var i=this._getElementFullName(t,n,this._getParentElement()),o=!1;if(this._peek.type===ea.TAG_OPEN_END_VOID){this._advance(),o=!0;var s=this.getTagDefinition(i);s.canSelfClose||null!==g(i)||s.isVoid||this._errors.push(_a.create(i,e.sourceSpan,'Only void and foreign elements can be self closed "'+e.parts[1]+'"'))}else this._peek.type===ea.TAG_OPEN_END&&(this._advance(),o=!1);var a=new rr(e.sourceSpan.start,this._peek.sourceSpan.start),u=new Ys(i,r,[],a,a,void 0);this._pushElement(u),o&&(this._popElement(i),u.endSourceSpan=a)},e.prototype._pushElement=function(e){var t=this._getParentElement();t&&this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop(),this._addToParent(e),this._elementStack.push(e)},e.prototype._consumeEndTag=function(e){var t=this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());this._getParentElement()&&(this._getParentElement().endSourceSpan=e.sourceSpan),this.getTagDefinition(t).isVoid?this._errors.push(_a.create(t,e.sourceSpan,'Void elements do not have end tags "'+e.parts[1]+'"')):this._popElement(t)||this._errors.push(_a.create(t,e.sourceSpan,'Unexpected closing tag "'+t+'". 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'))},e.prototype._popElement=function(e){for(var t=this._elementStack.length-1;t>=0;t--){var n=this._elementStack[t];if(n.name==e)return this._elementStack.splice(t,this._elementStack.length-t),!0;if(!this.getTagDefinition(n.name).closedByParent)return!1}return!1},e.prototype._consumeAttr=function(e){var t=_(e.parts[0],e.parts[1]),n=e.sourceSpan.end,r="",i=void 0;if(this._peek.type===ea.ATTR_QUOTE&&this._advance(),this._peek.type===ea.ATTR_VALUE){var o=this._advance();r=o.parts[0],n=o.sourceSpan.end,i=o.sourceSpan}return this._peek.type===ea.ATTR_QUOTE&&(n=this._advance().sourceSpan.end),new Xs(t,r,new rr(e.sourceSpan.start,n),i)},e.prototype._getParentElement=function(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null},e.prototype._getParentElementSkippingContainers=function(){for(var e=null,t=this._elementStack.length-1;t>=0;t--){if(!v(this._elementStack[t].name))return{parent:this._elementStack[t],container:e};e=this._elementStack[t]}return{parent:null,container:e}},e.prototype._addToParent=function(e){var t=this._getParentElement();null!=t?t.children.push(e):this._rootNodes.push(e)},e.prototype._insertBeforeContainer=function(e,t,n){if(t){if(e){var r=e.children.indexOf(t);e.children[r]=n}else this._rootNodes.push(n);n.children.push(t),this._elementStack.splice(this._elementStack.indexOf(t),0,n)}else this._addToParent(n),this._elementStack.push(n)},e.prototype._getElementFullName=function(e,t,n){return""===e&&""===(e=this.getTagDefinition(t).implicitNamespacePrefix||"")&&null!=n&&(e=g(n.name)),_(e,t)},e}();function Ea(e,t){return e.length>0&&e[e.length-1]===t}
|
|
209
209
|
/**
|
|
210
210
|
* @license
|
|
211
211
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -219,7 +219,7 @@ var xo=function xo(e,t,n,r){this.input=t,this.errLocation=n,this.ctxLocation=r,t
|
|
|
219
219
|
*
|
|
220
220
|
* Use of this source code is governed by an MIT-style license that can be
|
|
221
221
|
* found in the LICENSE file at https://angular.io/license
|
|
222
|
-
*/function Aa(e){return e.replace(new RegExp(w,"g")," ")}var Pa=function(){function e(){}return e.prototype.visitElement=function(e,t){return Ca.has(e.name)||function n(e){return e.some(function(e){return"ngPreserveWhitespaces"===e.name})}(e.attrs)?new Ys(e.name,Js(this,e.attrs),e.children,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n):new Ys(e.name,e.attrs,Js(this,e.children),e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)},e.prototype.visitAttribute=function(e,t){return"ngPreserveWhitespaces"!==e.name?e:null},e.prototype.visitText=function(e,t){return e.value.match(Na)?new Qs(Aa(e.value).replace(ka," "),e.sourceSpan,e.i18n):null},e.prototype.visitComment=function(e,t){return e},e.prototype.visitExpansion=function(e,t){return e},e.prototype.visitExpansionCase=function(e,t){return e},e}(),Ia=["zero","one","two","few","many","other"];function Ma(e){var t=new Fa;return new Da(Js(t,e),t.isExpanded,t.errors)}var Oa,Ra,Da=function Da(e,t,n){this.nodes=e,this.expanded=t,this.errors=n},La=function(e){function t(t,n){return e.call(this,t,n)||this}return o(t,e),t}(
|
|
222
|
+
*/function Aa(e){return e.replace(new RegExp(w,"g")," ")}var Pa=function(){function e(){}return e.prototype.visitElement=function(e,t){return Ca.has(e.name)||function n(e){return e.some(function(e){return"ngPreserveWhitespaces"===e.name})}(e.attrs)?new Ys(e.name,Js(this,e.attrs),e.children,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n):new Ys(e.name,e.attrs,Js(this,e.children),e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)},e.prototype.visitAttribute=function(e,t){return"ngPreserveWhitespaces"!==e.name?e:null},e.prototype.visitText=function(e,t){return e.value.match(Na)?new Qs(Aa(e.value).replace(ka," "),e.sourceSpan,e.i18n):null},e.prototype.visitComment=function(e,t){return e},e.prototype.visitExpansion=function(e,t){return e},e.prototype.visitExpansionCase=function(e,t){return e},e}(),Ia=["zero","one","two","few","many","other"];function Ma(e){var t=new Fa;return new Da(Js(t,e),t.isExpanded,t.errors)}var Oa,Ra,Da=function Da(e,t,n){this.nodes=e,this.expanded=t,this.errors=n},La=function(e){function t(t,n){return e.call(this,t,n)||this}return o(t,e),t}(ir),Fa=function(){function e(){this.isExpanded=!1,this.errors=[]}return e.prototype.visitElement=function(e,t){return new Ys(e.name,e.attrs,Js(this,e.children),e.sourceSpan,e.startSourceSpan,e.endSourceSpan)},e.prototype.visitAttribute=function(e,t){return e},e.prototype.visitText=function(e,t){return e},e.prototype.visitComment=function(e,t){return e},e.prototype.visitExpansion=function(e,t){return this.isExpanded=!0,"plural"==e.type?function n(e,t){var n=e.cases.map(function(e){-1!=Ia.indexOf(e.value)||e.value.match(/^=\d+$/)||t.push(new La(e.valueSourceSpan,'Plural cases should be "=<number>" or one of '+Ia.join(", ")));var n=Ma(e.expression);return t.push.apply(t,f(n.errors)),new Ys("ng-template",[new Xs("ngPluralCase",""+e.value,e.valueSourceSpan)],n.nodes,e.sourceSpan,e.sourceSpan,e.sourceSpan)}),r=new Xs("[ngPlural]",e.switchValue,e.switchValueSourceSpan);return new Ys("ng-container",[r],n,e.sourceSpan,e.sourceSpan,e.sourceSpan)}(e,this.errors):function r(e,t){var n=e.cases.map(function(e){var n=Ma(e.expression);return t.push.apply(t,f(n.errors)),new Ys("ng-template","other"===e.value?[new Xs("ngSwitchDefault","",e.valueSourceSpan)]:[new Xs("ngSwitchCase",""+e.value,e.valueSourceSpan)],n.nodes,e.sourceSpan,e.sourceSpan,e.sourceSpan)}),r=new Xs("[ngSwitch]",e.switchValue,e.switchValueSourceSpan);return new Ys("ng-container",[r],n,e.sourceSpan,e.sourceSpan,e.sourceSpan)}
|
|
223
223
|
/**
|
|
224
224
|
* @license
|
|
225
225
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -233,14 +233,14 @@ var xo=function xo(e,t,n,r){this.input=t,this.errLocation=n,this.ctxLocation=r,t
|
|
|
233
233
|
*
|
|
234
234
|
* Use of this source code is governed by an MIT-style license that can be
|
|
235
235
|
* found in the LICENSE file at https://angular.io/license
|
|
236
|
-
*/var tu=function(e){function t(t,n){return e.call(this,n,t)||this}return o(t,e),t}(
|
|
236
|
+
*/var tu=function(e){function t(t,n){return e.call(this,n,t)||this}return o(t,e),t}(ir),nu=function nu(e,t){var n=this;this.reflector=e,this.component=t,this.errors=[],this.viewQueries=function r(e){var t=1,n=new Map;return e.viewQueries&&e.viewQueries.forEach(function(e){return ou(n,{meta:e,queryId:t++})}),n}(t),this.viewProviders=new Map,t.viewProviders.forEach(function(e){null==n.viewProviders.get(sn(e.token))&&n.viewProviders.set(sn(e.token),!0)})},ru=function(){function e(e,t,n,r,i,o,s,a,u){var l=this;this.viewContext=e,this._parent=t,this._isViewRoot=n,this._directiveAsts=r,this._sourceSpan=u,this._transformedProviders=new Map,this._seenProviders=new Map,this._queriedTokens=new Map,this.transformedHasViewContainer=!1,this._attrs={},i.forEach(function(e){return l._attrs[e.name]=e.value});var c=r.map(function(e){return e.directive});if(this._allProviders=function p(e,t,n){var r=new Map;return e.forEach(function(e){iu([{token:{identifier:e.type},useClass:e.type}],e.isComponent?Ra.Component:Ra.Directive,!0,t,n,r,!1)}),e.filter(function(e){return e.isComponent}).concat(e.filter(function(e){return!e.isComponent})).forEach(function(e){iu(e.providers,Ra.PublicService,!1,t,n,r,!1),iu(e.viewProviders,Ra.PrivateService,!1,t,n,r,!1)}),r}(c,u,e.errors),this._contentQueries=function h(e,t){var n=e,r=new Map;return t.forEach(function(e,t){e.queries&&e.queries.forEach(function(e){return ou(r,{meta:e,queryId:n++})})}),r}(a,c),Array.from(this._allProviders.values()).forEach(function(e){l._addQueryReadsTo(e.token,e.token,l._queriedTokens)}),s){var f=Xt(this.viewContext.reflector,$t.TemplateRef);this._addQueryReadsTo(f,f,this._queriedTokens)}o.forEach(function(e){var t=e.value||Xt(l.viewContext.reflector,$t.ElementRef);l._addQueryReadsTo({value:e.name},t,l._queriedTokens)}),this._queriedTokens.get(this.viewContext.reflector.resolveExternalReference($t.ViewContainerRef))&&(this.transformedHasViewContainer=!0),Array.from(this._allProviders.values()).forEach(function(e){(e.eager||l._queriedTokens.get(sn(e.token)))&&l._getOrCreateLocalProvider(e.providerType,e.token,!0)})}return e.prototype.afterElement=function(){var e=this;Array.from(this._allProviders.values()).forEach(function(t){e._getOrCreateLocalProvider(t.providerType,t.token,!1)})},Object.defineProperty(e.prototype,"transformProviders",{get:function(){var e=[],t=[];return this._transformedProviders.forEach(function(n){n.eager?t.push(n):e.push(n)}),e.concat(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"transformedDirectiveAsts",{get:function(){var e=this.transformProviders.map(function(e){return e.token.identifier}),t=this._directiveAsts.slice();return t.sort(function(t,n){return e.indexOf(t.directive.type)-e.indexOf(n.directive.type)}),t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"queryMatches",{get:function(){var e=[];return this._queriedTokens.forEach(function(t){e.push.apply(e,f(t))}),e},enumerable:!0,configurable:!0}),e.prototype._addQueryReadsTo=function(e,t,n){this._getQueriesFor(e).forEach(function(e){var r=e.meta.read||t,i=sn(r),o=n.get(i);o||n.set(i,o=[]),o.push({queryId:e.queryId,value:r})})},e.prototype._getQueriesFor=function(e){for(var t,n=[],r=this,i=0;null!==r;)(t=r._contentQueries.get(sn(e)))&&n.push.apply(n,f(t.filter(function(e){return e.meta.descendants||i<=1}))),r._directiveAsts.length>0&&i++,r=r._parent;return(t=this.viewContext.viewQueries.get(sn(e)))&&n.push.apply(n,f(t)),n},e.prototype._getOrCreateLocalProvider=function(e,t,n){var r=this,i=this._allProviders.get(sn(t));if(!i||(e===Ra.Directive||e===Ra.PublicService)&&i.providerType===Ra.PrivateService||(e===Ra.PrivateService||e===Ra.PublicService)&&i.providerType===Ra.Builtin)return null;var o=this._transformedProviders.get(sn(t));if(o)return o;if(null!=this._seenProviders.get(sn(t)))return this.viewContext.errors.push(new tu("Cannot instantiate cyclic dependency! "+on(t),this._sourceSpan)),null;this._seenProviders.set(sn(t),!0);var s=i.providers.map(function(e){var t=e.useValue,o=e.useExisting,s=void 0;if(null!=e.useExisting){var a=r._getDependency(i.providerType,{token:e.useExisting},n);null!=a.token?o=a.token:(o=null,t=a.value)}else e.useFactory?s=(e.deps||e.useFactory.diDeps).map(function(e){return r._getDependency(i.providerType,e,n)}):e.useClass&&(s=(e.deps||e.useClass.diDeps).map(function(e){return r._getDependency(i.providerType,e,n)}));return function u(e,t){return{token:e.token,useClass:e.useClass,useExisting:t.useExisting,useFactory:e.useFactory,useValue:t.useValue,deps:t.deps,multi:e.multi}}(e,{useExisting:o,useValue:t,deps:s})});return o=function a(e,t){return new Xa(e.token,e.multiProvider,e.eager||t.eager,t.providers,e.providerType,e.lifecycleHooks,e.sourceSpan,e.isModule)}(i,{eager:n,providers:s}),this._transformedProviders.set(sn(t),o),o},e.prototype._getLocalDependency=function(e,t,n){if(void 0===n&&(n=!1),t.isAttribute){var r=this._attrs[t.token.value];return{isValue:!0,value:null==r?null:r}}if(null!=t.token){if(e===Ra.Directive||e===Ra.Component){if(sn(t.token)===this.viewContext.reflector.resolveExternalReference($t.Renderer)||sn(t.token)===this.viewContext.reflector.resolveExternalReference($t.ElementRef)||sn(t.token)===this.viewContext.reflector.resolveExternalReference($t.ChangeDetectorRef)||sn(t.token)===this.viewContext.reflector.resolveExternalReference($t.TemplateRef))return t;sn(t.token)===this.viewContext.reflector.resolveExternalReference($t.ViewContainerRef)&&(this.transformedHasViewContainer=!0)}if(sn(t.token)===this.viewContext.reflector.resolveExternalReference($t.Injector))return t;if(null!=this._getOrCreateLocalProvider(e,t.token,n))return t}return null},e.prototype._getDependency=function(e,t,n){void 0===n&&(n=!1);var r=this,i=n,o=null;if(t.isSkipSelf||(o=this._getLocalDependency(e,t,n)),t.isSelf)!o&&t.isOptional&&(o={isValue:!0,value:null});else{for(;!o&&r._parent;)r._isViewRoot&&(i=!1),o=(r=r._parent)._getLocalDependency(Ra.PublicService,t,i);o||(o=!t.isHost||this.viewContext.component.isHost||this.viewContext.component.type.reference===sn(t.token)||null!=this.viewContext.viewProviders.get(sn(t.token))?t:t.isOptional?{isValue:!0,value:null}:null)}return o||this.viewContext.errors.push(new tu("No provider for "+on(t.token),this._sourceSpan)),o},e}();function iu(e,t,n,r,i,o,s){e.forEach(function(e){var a=o.get(sn(e.token));null!=a&&!!a.multiProvider!=!!e.multi&&i.push(new tu("Mixing multi and non multi provider is not possible for token "+on(a.token),r)),a?(e.multi||(a.providers.length=0),a.providers.push(e)):(a=new Xa(e.token,!!e.multi,n||!(e.useClass||e.useExisting||e.useFactory),[e],t,e.token.identifier&&e.token.identifier.lifecycleHooks?e.token.identifier.lifecycleHooks:[],r,s),o.set(sn(e.token),a))})}function ou(e,t){t.meta.selectors.forEach(function(n){var r=e.get(sn(n));r||(r=[],e.set(sn(n),r)),r.push(t)})}
|
|
237
237
|
/**
|
|
238
238
|
* @license
|
|
239
239
|
* Copyright Google Inc. All Rights Reserved.
|
|
240
240
|
*
|
|
241
241
|
* Use of this source code is governed by an MIT-style license that can be
|
|
242
242
|
* found in the LICENSE file at https://angular.io/license
|
|
243
|
-
*/var su=function su(e,t){this.style=e,this.styleUrls=t};function au(e){if(null==e||0===e.length||"/"==e[0])return!1;var t=e.match(cu);return null===t||"package"==t[1]||"asset"==t[1]}var uu=/@import\s+(?:url\()?\s*(?:(?:['"]([^'"]*))|([^;\)\s]*))[^;]*;?/g,lu=/\/\*(?!#\s*(?:sourceURL|sourceMappingURL)=)[\s\S]+?\*\//g,cu=/^([^:\/?#]+):/,pu=function(){function e(e,t,n,r,i){if(this._exprParser=e,this._interpolationConfig=t,this._schemaRegistry=n,this.errors=i,this.pipesByName=null,this._usedPipes=new Map,r){var o=new Map;r.forEach(function(e){return o.set(e.name,e)}),this.pipesByName=o}}return Object.defineProperty(e.prototype,"interpolationConfig",{get:function(){return this._interpolationConfig},enumerable:!0,configurable:!0}),e.prototype.getUsedPipes=function(){return Array.from(this._usedPipes.values())},e.prototype.createBoundHostProperties=function(e,t){var n=this;if(e.hostProperties){var r=[];return Object.keys(e.hostProperties).forEach(function(i){var o=e.hostProperties[i];"string"==typeof o?n.parsePropertyBinding(i,o,!0,t,[],r):n._reportError('Value of the host property binding "'+i+'" needs to be a string representing an expression but got "'+o+'" ('+typeof o+")",t)}),r}return null},e.prototype.createDirectiveHostPropertyAsts=function(e,t,n){var r=this,i=this.createBoundHostProperties(e,n);return i&&i.map(function(e){return r.createBoundElementProperty(t,e)})},e.prototype.createDirectiveHostEventAsts=function(e,t){var n=this;if(e.hostListeners){var r=[];return Object.keys(e.hostListeners).forEach(function(i){var o=e.hostListeners[i];"string"==typeof o?n.parseEvent(i,o,t,t,[],r):n._reportError('Value of the host listener "'+i+'" needs to be a string representing an expression but got "'+o+'" ('+typeof o+")",t)}),r}return null},e.prototype.parseInterpolation=function(e,t){var n=t.start.toString();try{var r=this._exprParser.parseInterpolation(e,n,this._interpolationConfig);return r&&this._reportExpressionParserErrors(r.errors,t),this._checkPipes(r,t),r}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},e.prototype.parseInlineTemplateBinding=function(e,t,n,r,i,o){for(var s=this._parseTemplateBindings(e,t,n),a=0;a<s.length;a++){var u=s[a];u.keyIsVar?o.push(new is(u.key,u.name,n)):u.expression?this._parsePropertyAst(u.key,u.expression,n,r,i):(r.push([u.key,""]),this.parseLiteralAttr(u.key,null,n,r,i))}},e.prototype._parseTemplateBindings=function(e,t,n){var r=this,i=n.start.toString();try{var o=this._exprParser.parseTemplateBindings(e,t,i);return this._reportExpressionParserErrors(o.errors,n),o.templateBindings.forEach(function(e){e.expression&&r._checkPipes(e.expression,n)}),o.warnings.forEach(function(e){r._reportError(e,n,
|
|
243
|
+
*/var su=function su(e,t){this.style=e,this.styleUrls=t};function au(e){if(null==e||0===e.length||"/"==e[0])return!1;var t=e.match(cu);return null===t||"package"==t[1]||"asset"==t[1]}var uu=/@import\s+(?:url\()?\s*(?:(?:['"]([^'"]*))|([^;\)\s]*))[^;]*;?/g,lu=/\/\*(?!#\s*(?:sourceURL|sourceMappingURL)=)[\s\S]+?\*\//g,cu=/^([^:\/?#]+):/,pu=function(){function e(e,t,n,r,i){if(this._exprParser=e,this._interpolationConfig=t,this._schemaRegistry=n,this.errors=i,this.pipesByName=null,this._usedPipes=new Map,r){var o=new Map;r.forEach(function(e){return o.set(e.name,e)}),this.pipesByName=o}}return Object.defineProperty(e.prototype,"interpolationConfig",{get:function(){return this._interpolationConfig},enumerable:!0,configurable:!0}),e.prototype.getUsedPipes=function(){return Array.from(this._usedPipes.values())},e.prototype.createBoundHostProperties=function(e,t){var n=this;if(e.hostProperties){var r=[];return Object.keys(e.hostProperties).forEach(function(i){var o=e.hostProperties[i];"string"==typeof o?n.parsePropertyBinding(i,o,!0,t,[],r):n._reportError('Value of the host property binding "'+i+'" needs to be a string representing an expression but got "'+o+'" ('+typeof o+")",t)}),r}return null},e.prototype.createDirectiveHostPropertyAsts=function(e,t,n){var r=this,i=this.createBoundHostProperties(e,n);return i&&i.map(function(e){return r.createBoundElementProperty(t,e)})},e.prototype.createDirectiveHostEventAsts=function(e,t){var n=this;if(e.hostListeners){var r=[];return Object.keys(e.hostListeners).forEach(function(i){var o=e.hostListeners[i];"string"==typeof o?n.parseEvent(i,o,t,t,[],r):n._reportError('Value of the host listener "'+i+'" needs to be a string representing an expression but got "'+o+'" ('+typeof o+")",t)}),r}return null},e.prototype.parseInterpolation=function(e,t){var n=t.start.toString();try{var r=this._exprParser.parseInterpolation(e,n,this._interpolationConfig);return r&&this._reportExpressionParserErrors(r.errors,t),this._checkPipes(r,t),r}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},e.prototype.parseInlineTemplateBinding=function(e,t,n,r,i,o){for(var s=this._parseTemplateBindings(e,t,n),a=0;a<s.length;a++){var u=s[a];u.keyIsVar?o.push(new is(u.key,u.name,n)):u.expression?this._parsePropertyAst(u.key,u.expression,n,r,i):(r.push([u.key,""]),this.parseLiteralAttr(u.key,null,n,r,i))}},e.prototype._parseTemplateBindings=function(e,t,n){var r=this,i=n.start.toString();try{var o=this._exprParser.parseTemplateBindings(e,t,i);return this._reportExpressionParserErrors(o.errors,n),o.templateBindings.forEach(function(e){e.expression&&r._checkPipes(e.expression,n)}),o.warnings.forEach(function(e){r._reportError(e,n,er.WARNING)}),o.templateBindings}catch(e){return this._reportError(""+e,n),[]}},e.prototype.parseLiteralAttr=function(e,t,n,r,i){fu(e)?(e=e.substring(1),t&&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.',n,er.ERROR),this._parseAnimation(e,t,n,r,i)):i.push(new es(e,this._exprParser.wrapLiteralPrimitive(t,""),Jo.LITERAL_ATTR,n))},e.prototype.parsePropertyBinding=function(e,t,n,r,i,o){var s=!1;e.startsWith("animate-")?(s=!0,e=e.substring("animate-".length)):fu(e)&&(s=!0,e=e.substring(1)),s?this._parseAnimation(e,t,r,i,o):this._parsePropertyAst(e,this._parseBinding(t,n,r),r,i,o)},e.prototype.parsePropertyInterpolation=function(e,t,n,r,i){var o=this.parseInterpolation(t,n);return!!o&&(this._parsePropertyAst(e,o,n,r,i),!0)},e.prototype._parsePropertyAst=function(e,t,n,r,i){r.push([e,t.source]),i.push(new es(e,t,Jo.DEFAULT,n))},e.prototype._parseAnimation=function(e,t,n,r,i){var o=this._parseBinding(t||"undefined",!1,n);r.push([e,o.source]),i.push(new es(e,o,Jo.ANIMATION,n))},e.prototype._parseBinding=function(e,t,n){var r=(n&&n.start||"(unknown)").toString();try{var i=t?this._exprParser.parseSimpleBinding(e,r,this._interpolationConfig):this._exprParser.parseBinding(e,r,this._interpolationConfig);return i&&this._reportExpressionParserErrors(i.errors,n),this._checkPipes(i,n),i}catch(e){return this._reportError(""+e,n),this._exprParser.wrapLiteralPrimitive("ERROR",r)}},e.prototype.createBoundElementProperty=function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),t.isAnimation)return new os(t.name,4,H.NONE,t.expression,null,t.sourceSpan);var i=null,o=void 0,s=null,a=t.name.split("."),u=void 0;if(a.length>1)if("attr"==a[0]){s=a[1],n||this._validatePropertyOrAttributeName(s,t.sourceSpan,!0),u=du(this._schemaRegistry,e,s,!0);var l=s.indexOf(":");if(l>-1){var c=s.substring(0,l),p=s.substring(l+1);s=_(c,p)}o=1}else"class"==a[0]?(s=a[1],o=2,u=[H.NONE]):"style"==a[0]&&(i=a.length>2?a[2]:null,s=a[1],o=3,u=[H.STYLE]);if(null===s){var h=this._schemaRegistry.getMappedPropName(t.name);s=r?h:t.name,u=du(this._schemaRegistry,e,h,!1),o=0,n||this._validatePropertyOrAttributeName(h,t.sourceSpan,!1)}return new os(s,o,u[0],t.expression,i,t.sourceSpan)},e.prototype.parseEvent=function(e,t,n,r,i,o){fu(e)?(e=e.substr(1),this._parseAnimationEvent(e,t,n,r,o)):this._parseRegularEvent(e,t,n,r,i,o)},e.prototype.calcPossibleSecurityContexts=function(e,t,n){var r=this._schemaRegistry.getMappedPropName(t);return du(this._schemaRegistry,e,r,n)},e.prototype._parseAnimationEvent=function(e,t,n,r,i){var o=function s(e,t){return wt(e,".",t)}(e,[e,""]),a=o[0],u=o[1].toLowerCase();if(u)switch(u){case"start":case"done":var l=this._parseAction(t,r);i.push(new rs(a,u,1,l,n,r));break;default:this._reportError('The provided animation output phase value "'+u+'" for "@'+a+'" is not supported (use start or done)',n)}else this._reportError("The animation trigger output event (@"+a+") is missing its phase value name (start or done are currently supported)",n)},e.prototype._parseRegularEvent=function(e,t,n,r,i,o){var s=h(bt(e,[null,e]),2),a=s[0],u=s[1],l=this._parseAction(t,r);i.push([e,l.source]),o.push(new rs(u,a,0,l,n,r))},e.prototype._parseAction=function(e,t){var n=(t&&t.start||"(unknown").toString();try{var r=this._exprParser.parseAction(e,n,this._interpolationConfig);return r&&this._reportExpressionParserErrors(r.errors,t),!r||r.ast instanceof To?(this._reportError("Empty expressions are not allowed",t),this._exprParser.wrapLiteralPrimitive("ERROR",n)):(this._checkPipes(r,t),r)}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},e.prototype._reportError=function(e,t,n){void 0===n&&(n=er.ERROR),this.errors.push(new ir(t,e,n))},e.prototype._reportExpressionParserErrors=function(e,t){var n,r;try{for(var i=p(e),o=i.next();!o.done;o=i.next())this._reportError(o.value.message,t)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype._checkPipes=function(e,t){var n=this;if(e&&this.pipesByName){var r=new hu;e.visit(r),r.pipes.forEach(function(e,r){var i=n.pipesByName.get(r);i?n._usedPipes.set(r,i):n._reportError("The pipe '"+r+"' could not be found",new rr(t.start.moveBy(e.span.start),t.start.moveBy(e.span.end)))})}},e.prototype._validatePropertyOrAttributeName=function(e,t,n){var r=n?this._schemaRegistry.validateAttribute(e):this._schemaRegistry.validateProperty(e);r.error&&this._reportError(r.msg,t,er.ERROR)},e}(),hu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.pipes=new Map,t}return o(t,e),t.prototype.visitPipe=function(e,t){return this.pipes.set(e.name,e),e.exp.visit(this),this.visitAll(e.args,t),null},t}(Go);function fu(e){return"@"==e[0]}function du(e,t,n,r){var i=[];return A.parse(t).forEach(function(t){var o=t.element?[t.element]:e.allKnownElementNames(),s=new Set(t.notSelectors.filter(function(e){return e.isElementSelector()}).map(function(e){return e.element})),a=o.filter(function(e){return!s.has(e)});i.push.apply(i,f(a.map(function(t){return e.securityContext(t,n,r)})))}),0===i.length?[H.NONE]:Array.from(new Set(i)).sort()}
|
|
244
244
|
/**
|
|
245
245
|
* @license
|
|
246
246
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -254,14 +254,14 @@ var xo=function xo(e,t,n,r){this.input=t,this.errLocation=n,this.ctxLocation=r,t
|
|
|
254
254
|
*
|
|
255
255
|
* Use of this source code is governed by an MIT-style license that can be
|
|
256
256
|
* found in the LICENSE file at https://angular.io/license
|
|
257
|
-
*/(t);var a=e.name.toLowerCase(),u=vu.OTHER;return m(a)?u=vu.NG_CONTENT:a==wu?u=vu.STYLE:a==xu?u=vu.SCRIPT:a==yu&&r==bu&&(u=vu.STYLESHEET),new Nu(u,t,n,i,o)}!function(e){e[e.NG_CONTENT=0]="NG_CONTENT",e[e.STYLE=1]="STYLE",e[e.STYLESHEET=2]="STYLESHEET",e[e.SCRIPT=3]="SCRIPT",e[e.OTHER=4]="OTHER"}(vu||(vu={}));var Tu,Nu=function Nu(e,t,n,r,i){this.type=e,this.selectAttr=t,this.hrefAttr=n,this.nonBindable=r,this.projectAs=i},ku=/^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.+))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/,Au="class";function Pu(){return Tu||(Tu=A.parse("*")[0]),Tu}var Iu=function(e){function t(t,n,r){return e.call(this,n,t,r)||this}return o(t,e),t}(
|
|
257
|
+
*/(t);var a=e.name.toLowerCase(),u=vu.OTHER;return m(a)?u=vu.NG_CONTENT:a==wu?u=vu.STYLE:a==xu?u=vu.SCRIPT:a==yu&&r==bu&&(u=vu.STYLESHEET),new Nu(u,t,n,i,o)}!function(e){e[e.NG_CONTENT=0]="NG_CONTENT",e[e.STYLE=1]="STYLE",e[e.STYLESHEET=2]="STYLESHEET",e[e.SCRIPT=3]="SCRIPT",e[e.OTHER=4]="OTHER"}(vu||(vu={}));var Tu,Nu=function Nu(e,t,n,r,i){this.type=e,this.selectAttr=t,this.hrefAttr=n,this.nonBindable=r,this.projectAs=i},ku=/^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.+))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/,Au="class";function Pu(){return Tu||(Tu=A.parse("*")[0]),Tu}var Iu=function(e){function t(t,n,r){return e.call(this,n,t,r)||this}return o(t,e),t}(ir),Mu=function Mu(e,t,n){this.templateAst=e,this.usedPipes=t,this.errors=n},Ou=function(){function e(e,t,n,r,i,o,s){this._config=e,this._reflector=t,this._exprParser=n,this._schemaRegistry=r,this._htmlParser=i,this._console=o,this.transforms=s}return Object.defineProperty(e.prototype,"expressionParser",{get:function(){return this._exprParser},enumerable:!0,configurable:!0}),e.prototype.parse=function(e,t,n,r,i,o,s){var a=this.tryParse(e,t,n,r,i,o,s),u=a.errors.filter(function(e){return e.level===er.WARNING}),l=a.errors.filter(function(e){return e.level===er.ERROR});if(u.length>0&&this._console.warn("Template parse warnings:\n"+u.join("\n")),l.length>0)throw kt("Template parse errors:\n"+l.join("\n"),l);return{template:a.templateAst,pipes:a.usedPipes}},e.prototype.tryParse=function(e,t,n,r,i,o,s){var a="string"==typeof t?this._htmlParser.parse(t,o,{tokenizeExpansionForms:!0,interpolationConfig:this.getInterpolationConfig(e)}):t;return s||(a=function u(e){return new ba(Js(new Pa,e.rootNodes),e.errors)}
|
|
258
258
|
/**
|
|
259
259
|
* @license
|
|
260
260
|
* Copyright Google Inc. All Rights Reserved.
|
|
261
261
|
*
|
|
262
262
|
* Use of this source code is governed by an MIT-style license that can be
|
|
263
263
|
* found in the LICENSE file at https://angular.io/license
|
|
264
|
-
*/(a)),this.tryParseHtml(this.expandHtml(a),e,n,r,i)},e.prototype.tryParseHtml=function(e,t,n,r,i){var o,s=e.errors,a=[];if(e.rootNodes.length>0){var u=Uu(n),l=Uu(r),c=new nu(this._reflector,t),p=void 0;t.template&&t.template.interpolation&&(p={start:t.template.interpolation[0],end:t.template.interpolation[1]});var h=new pu(this._exprParser,p,this._schemaRegistry,l,s),d=new Ru(this._reflector,this._config,c,u,h,this._schemaRegistry,i,s);o=Js(d,e.rootNodes,Vu),s.push.apply(s,f(c.errors)),a.push.apply(a,f(h.getUsedPipes()))}else o=[];return this._assertNoReferenceDuplicationOnTemplate(o,s),s.length>0?new Mu(o,a,s):(this.transforms&&this.transforms.forEach(function(e){o=eu(e,o)}),new Mu(o,a,s))},e.prototype.expandHtml=function(e,t){void 0===t&&(t=!1);var n=e.errors;if(0==n.length||t){var r=Ma(e.rootNodes);n.push.apply(n,f(r.errors)),e=new ba(r.nodes,n)}return e},e.prototype.getInterpolationConfig=function(e){if(e.template)return hi.fromArray(e.template.interpolation)},e.prototype._assertNoReferenceDuplicationOnTemplate=function(e,t){var n=[];e.filter(function(e){return!!e.references}).forEach(function(e){return e.references.forEach(function(e){var r=e.name;if(n.indexOf(r)<0)n.push(r);else{var i=new Iu('Reference "#'+r+'" is defined several times',e.sourceSpan,fo.ERROR);t.push(i)}})})},e}(),Ru=function(){function e(e,t,n,r,i,o,s,a){var u=this;this.reflector=e,this.config=t,this.providerViewContext=n,this._bindingParser=i,this._schemaRegistry=o,this._schemas=s,this._targetErrors=a,this.selectorMatcher=new P,this.directivesIndex=new Map,this.ngContentCount=0,this.contentQueryStartId=n.component.viewQueries.length+1,r.forEach(function(e,t){var n=A.parse(e.selector);u.selectorMatcher.addSelectables(n,e),u.directivesIndex.set(e,t)})}return e.prototype.visitExpansion=function(e,t){return null},e.prototype.visitExpansionCase=function(e,t){return null},e.prototype.visitText=function(e,t){var n=t.findNgContentIndex(Pu()),r=Aa(e.value),i=this._bindingParser.parseInterpolation(r,e.sourceSpan);return i?new Va(i,n,e.sourceSpan):new ja(r,n,e.sourceSpan)},e.prototype.visitAttribute=function(e,t){return new Ba(e.name,e.value,e.sourceSpan)},e.prototype.visitComment=function(e,t){return null},e.prototype.visitElement=function(e,t){var n=this,r=this.contentQueryStartId,i=e.name,o=Cu(e);if(o.type===vu.SCRIPT||o.type===vu.STYLE)return null;if(o.type===vu.STYLESHEET&&au(o.hrefAttr))return null;var s=[],a=[],u=[],l=[],c=[],p=[],h=[],d=[],v=!1,m=[],g=y(e.name);e.attrs.forEach(function(e){var t,r,i=n._parseAttr(g,e,s,a,c,u,l);l.push.apply(l,f([].map(function(e){return za.fromParsedVariable(e)})));var o=n._normalizeAttributeName(e.name);o.startsWith("*")&&(t=e.value,r=o.substring("*".length));var y=null!=t;if(y){v&&n._reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",e.sourceSpan),v=!0;var _=[];n._bindingParser.parseInlineTemplateBinding(r,t,e.sourceSpan,h,p,_),d.push.apply(d,f(_.map(function(e){return za.fromParsedVariable(e)})))}i||y||(m.push(n.visitAttribute(e,null)),s.push([e.name,e.value]))});var _=ju(i,s),b=this._parseDirectives(this.selectorMatcher,_),w=b.directives,x=b.matchElement,E=[],S=new Set,C=this._createDirectiveAsts(g,e.name,w,a,u,e.sourceSpan,E,S),T=this._createElementPropertyAsts(e.name,a,S),N=new ru(this.providerViewContext,t.providerContext,t.isTemplateElement||v,C,m,E,g,r,e.sourceSpan),k=Js(o.nonBindable?Bu:this,e.children,Fu.create(g,C,g?t.providerContext:N));N.afterElement();var P,I=""!=o.projectAs?A.parse(o.projectAs)[0]:_,M=t.findNgContentIndex(I);if(o.type===vu.NG_CONTENT)e.children&&!e.children.every(Hu)&&this._reportError("<ng-content> element cannot have content.",e.sourceSpan),P=new Ya(this.ngContentCount++,v?null:M,e.sourceSpan);else if(g)this._assertAllEventsPublishedByDirectives(C,c),this._assertNoComponentsNorElementBindingsOnTemplate(C,T,e.sourceSpan),P=new Qa(m,c,E,l,N.transformedDirectiveAsts,N.transformProviders,N.transformedHasViewContainer,N.queryMatches,k,v?null:M,e.sourceSpan);else{this._assertElementExists(x,e),this._assertOnlyOneComponent(C,e.sourceSpan);var O=v?null:t.findNgContentIndex(I);P=new Wa(i,m,T,c,E,N.transformedDirectiveAsts,N.transformProviders,N.transformedHasViewContainer,N.queryMatches,k,v?null:O,e.sourceSpan,e.endSourceSpan||null)}if(v){var R=this.contentQueryStartId,D=ju("ng-template",h),L=this._parseDirectives(this.selectorMatcher,D).directives,F=new Set,j=this._createDirectiveAsts(!0,i,L,p,[],e.sourceSpan,[],F),V=this._createElementPropertyAsts(i,p,F);this._assertNoComponentsNorElementBindingsOnTemplate(j,V,e.sourceSpan);var B=new ru(this.providerViewContext,t.providerContext,t.isTemplateElement,j,[],[],!0,R,e.sourceSpan);B.afterElement(),P=new Qa([],[],[],d,B.transformedDirectiveAsts,B.transformProviders,B.transformedHasViewContainer,B.queryMatches,[P],M,e.sourceSpan)}return P},e.prototype._parseAttr=function(e,t,n,r,i,o,s){var a=this._normalizeAttributeName(t.name),u=t.value,l=t.sourceSpan,c=[],p=a.match(ku),h=!1;return null!==p?(h=!0,null!=p[1]?this._bindingParser.parsePropertyBinding(p[7],u,!1,l,n,r):p[2]?e?this._parseVariable(p[7],u,l,s):this._reportError('"let-" is only supported on ng-template elements.',l):p[3]?this._parseReference(p[7],u,l,o):p[4]?this._bindingParser.parseEvent(p[7],u,l,t.valueSpan||l,n,c):p[5]?(this._bindingParser.parsePropertyBinding(p[7],u,!1,l,n,r),this._parseAssignmentEvent(p[7],u,l,t.valueSpan||l,n,c)):p[6]?this._bindingParser.parseLiteralAttr(a,u,l,n,r):p[8]?(this._bindingParser.parsePropertyBinding(p[8],u,!1,l,n,r),this._parseAssignmentEvent(p[8],u,l,t.valueSpan||l,n,c)):p[9]?this._bindingParser.parsePropertyBinding(p[9],u,!1,l,n,r):p[10]&&this._bindingParser.parseEvent(p[10],u,l,t.valueSpan||l,n,c)):h=this._bindingParser.parsePropertyInterpolation(a,u,l,n,r),h||this._bindingParser.parseLiteralAttr(a,u,l,n,r),i.push.apply(i,f(c.map(function(e){return qa.fromParsedEvent(e)}))),h},e.prototype._normalizeAttributeName=function(e){return/^data-/i.test(e)?e.substring(5):e},e.prototype._parseVariable=function(e,t,n,r){e.indexOf("-")>-1&&this._reportError('"-" is not allowed in variable names',n),r.push(new za(e,t,n))},e.prototype._parseReference=function(e,t,n,r){e.indexOf("-")>-1&&this._reportError('"-" is not allowed in reference names',n),r.push(new Lu(e,t,n))},e.prototype._parseAssignmentEvent=function(e,t,n,r,i,o){this._bindingParser.parseEvent(e+"Change",t+"=$event",n,r,i,o)},e.prototype._parseDirectives=function(e,t){var n=this,r=new Array(this.directivesIndex.size),i=!1;return e.match(t,function(e,t){r[n.directivesIndex.get(t)]=t,i=i||e.hasElementSelector()}),{directives:r.filter(function(e){return!!e}),matchElement:i}},e.prototype._createDirectiveAsts=function(e,t,n,r,i,o,s,a){var u=this,l=new Set,c=null,p=n.map(function(e){var n=new yo(o.start,o.end,"Directive "+rn(e.type));e.isComponent&&(c=e);var p=[],h=u._bindingParser.createDirectiveHostPropertyAsts(e,t,n).map(function(e){return Ua.fromBoundProperty(e)});h=u._checkPropertiesInSchema(t,h);var f=u._bindingParser.createDirectiveHostEventAsts(e,n);u._createDirectivePropertyAsts(e.inputs,r,p,a),i.forEach(function(t){(0===t.value.length&&e.isComponent||t.isReferenceToDirective(e))&&(s.push(new Ka(t.name,Gt(e.type.reference),t.value,t.sourceSpan)),l.add(t.name))});var d=f.map(function(e){return qa.fromParsedEvent(e)}),v=u.contentQueryStartId;return u.contentQueryStartId+=e.queries.length,new Ga(e,p,h,d,v,n)});return i.forEach(function(t){if(t.value.length>0)l.has(t.name)||u._reportError('There is no directive with "exportAs" set to "'+t.value+'"',t.sourceSpan);else if(!c){var n=null;e&&(n=Xt(u.reflector,$t.TemplateRef)),s.push(new Ka(t.name,n,t.value,t.sourceSpan))}}),p},e.prototype._createDirectivePropertyAsts=function(e,t,n,r){if(e){var i=new Map;t.forEach(function(e){var t=i.get(e.name);t&&!t.isLiteral||i.set(e.name,e)}),Object.keys(e).forEach(function(t){var o=i.get(e[t]);o&&(r.add(o.name),qu(o.expression)||n.push(new $a(t,o.name,o.expression,o.sourceSpan)))})}},e.prototype._createElementPropertyAsts=function(e,t,n){var r=this,i=[];return t.forEach(function(t){if(!t.isLiteral&&!n.has(t.name)){var o=r._bindingParser.createBoundElementProperty(e,t);i.push(Ua.fromBoundProperty(o))}}),this._checkPropertiesInSchema(e,i)},e.prototype._findComponentDirectives=function(e){return e.filter(function(e){return e.directive.isComponent})},e.prototype._findComponentDirectiveNames=function(e){return this._findComponentDirectives(e).map(function(e){return rn(e.directive.type)})},e.prototype._assertOnlyOneComponent=function(e,t){var n=this._findComponentDirectiveNames(e);n.length>1&&this._reportError("More than one component matched on this element.\nMake sure that only one component's selector can match a given element.\nConflicting components: "+n.join(","),t)},e.prototype._assertElementExists=function(e,t){var n=t.name.replace(/^:xhtml:/,"");if(!e&&!this._schemaRegistry.hasElement(n,this._schemas)){var r="'"+n+"' is not a known element:\n";r+="1. If '"+n+"' is an Angular component, then verify that it is part of this module.\n",n.indexOf("-")>-1?r+="2. If '"+n+"' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.":r+="2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.",this._reportError(r,t.sourceSpan)}},e.prototype._assertNoComponentsNorElementBindingsOnTemplate=function(e,t,n){var r=this,i=this._findComponentDirectiveNames(e);i.length>0&&this._reportError("Components on an embedded template: "+i.join(","),n),t.forEach(function(e){r._reportError("Property binding "+e.name+' not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "@NgModule.declarations".',n)})},e.prototype._assertAllEventsPublishedByDirectives=function(e,t){var n=this,r=new Set;e.forEach(function(e){Object.keys(e.directive.outputs).forEach(function(t){r.add(e.directive.outputs[t])})}),t.forEach(function(e){null==e.target&&r.has(e.name)||n._reportError("Event binding "+e.fullName+' not emitted by any directive on an embedded template. Make sure that the event name is spelled correctly and all directives are listed in the "@NgModule.declarations".',e.sourceSpan)})},e.prototype._checkPropertiesInSchema=function(e,t){var n=this;return t.filter(function(t){if(0===t.type&&!n._schemaRegistry.hasProperty(e,t.name,n._schemas)){var r="Can't bind to '"+t.name+"' since it isn't a known property of '"+e+"'.";e.startsWith("ng-")?r+="\n1. If '"+t.name+"' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component.\n2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.":e.indexOf("-")>-1&&(r+="\n1. If '"+e+"' is an Angular component and it has '"+t.name+"' input, then verify that it is part of this module.\n2. If '"+e+"' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.\n3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component."),n._reportError(r,t.sourceSpan)}return!qu(t.value)})},e.prototype._reportError=function(e,t,n){void 0===n&&(n=fo.ERROR),this._targetErrors.push(new go(t,e,n))},e}(),Du=function(){function e(){}return e.prototype.visitElement=function(e,t){var n=Cu(e);if(n.type===vu.SCRIPT||n.type===vu.STYLE||n.type===vu.STYLESHEET)return null;var r=e.attrs.map(function(e){return[e.name,e.value]}),i=ju(e.name,r),o=t.findNgContentIndex(i),s=Js(this,e.children,Vu);return new Wa(e.name,Js(this,e.attrs),[],[],[],[],[],!1,[],s,o,e.sourceSpan,e.endSourceSpan)},e.prototype.visitComment=function(e,t){return null},e.prototype.visitAttribute=function(e,t){return new Ba(e.name,e.value,e.sourceSpan)},e.prototype.visitText=function(e,t){var n=t.findNgContentIndex(Pu());return new ja(e.value,n,e.sourceSpan)},e.prototype.visitExpansion=function(e,t){return e},e.prototype.visitExpansionCase=function(e,t){return e},e}(),Lu=function(){function e(e,t,n){this.name=e,this.value=t,this.sourceSpan=n}return e.prototype.isReferenceToDirective=function(e){return-1!==function t(e){return e?e.split(",").map(function(e){return e.trim()}):[]}(e.exportAs).indexOf(this.value)},e}(),Fu=function(){function e(e,t,n,r){this.isTemplateElement=e,this._ngContentIndexMatcher=t,this._wildcardNgContentIndex=n,this.providerContext=r}return e.create=function(t,n,r){var i=new P,o=null,s=n.find(function(e){return e.directive.isComponent});if(s)for(var a=s.directive.template.ngContentSelectors,u=0;u<a.length;u++)"*"===a[u]?o=u:i.addSelectables(A.parse(a[u]),u);return new e(t,i,o,r)},e.prototype.findNgContentIndex=function(e){var t=[];return this._ngContentIndexMatcher.match(e,function(e,n){t.push(n)}),t.sort(),null!=this._wildcardNgContentIndex&&t.push(this._wildcardNgContentIndex),t.length>0?t[0]:null},e}();function ju(e,t){var n=new A,r=d(e)[1];n.setElement(r);for(var i=0;i<t.length;i++){var o=t[i][0],s=d(o)[1],a=t[i][1];n.addAttribute(s,a),o.toLowerCase()==Au&&a.trim().split(/\s+/g).forEach(function(e){return n.addClassName(e)})}return n}var Vu=new Fu(!0,new P,null,null),Bu=new Du;function Hu(e){return e instanceof Qs&&0==e.value.trim().length}function Uu(e){var t=new Map;return e.forEach(function(e){t.get(e.type.reference)||t.set(e.type.reference,e)}),Array.from(t.values())}function qu(e){return e instanceof Wo&&(e=e.ast),e instanceof To}
|
|
264
|
+
*/(a)),this.tryParseHtml(this.expandHtml(a),e,n,r,i)},e.prototype.tryParseHtml=function(e,t,n,r,i){var o,s=e.errors,a=[];if(e.rootNodes.length>0){var u=Uu(n),l=Uu(r),c=new nu(this._reflector,t),p=void 0;t.template&&t.template.interpolation&&(p={start:t.template.interpolation[0],end:t.template.interpolation[1]});var h=new pu(this._exprParser,p,this._schemaRegistry,l,s),d=new Ru(this._reflector,this._config,c,u,h,this._schemaRegistry,i,s);o=Js(d,e.rootNodes,Vu),s.push.apply(s,f(c.errors)),a.push.apply(a,f(h.getUsedPipes()))}else o=[];return this._assertNoReferenceDuplicationOnTemplate(o,s),s.length>0?new Mu(o,a,s):(this.transforms&&this.transforms.forEach(function(e){o=eu(e,o)}),new Mu(o,a,s))},e.prototype.expandHtml=function(e,t){void 0===t&&(t=!1);var n=e.errors;if(0==n.length||t){var r=Ma(e.rootNodes);n.push.apply(n,f(r.errors)),e=new ba(r.nodes,n)}return e},e.prototype.getInterpolationConfig=function(e){if(e.template)return Ji.fromArray(e.template.interpolation)},e.prototype._assertNoReferenceDuplicationOnTemplate=function(e,t){var n=[];e.filter(function(e){return!!e.references}).forEach(function(e){return e.references.forEach(function(e){var r=e.name;if(n.indexOf(r)<0)n.push(r);else{var i=new Iu('Reference "#'+r+'" is defined several times',e.sourceSpan,er.ERROR);t.push(i)}})})},e}(),Ru=function(){function e(e,t,n,r,i,o,s,a){var u=this;this.reflector=e,this.config=t,this.providerViewContext=n,this._bindingParser=i,this._schemaRegistry=o,this._schemas=s,this._targetErrors=a,this.selectorMatcher=new P,this.directivesIndex=new Map,this.ngContentCount=0,this.contentQueryStartId=n.component.viewQueries.length+1,r.forEach(function(e,t){var n=A.parse(e.selector);u.selectorMatcher.addSelectables(n,e),u.directivesIndex.set(e,t)})}return e.prototype.visitExpansion=function(e,t){return null},e.prototype.visitExpansionCase=function(e,t){return null},e.prototype.visitText=function(e,t){var n=t.findNgContentIndex(Pu()),r=Aa(e.value),i=this._bindingParser.parseInterpolation(r,e.sourceSpan);return i?new Va(i,n,e.sourceSpan):new ja(r,n,e.sourceSpan)},e.prototype.visitAttribute=function(e,t){return new Ba(e.name,e.value,e.sourceSpan)},e.prototype.visitComment=function(e,t){return null},e.prototype.visitElement=function(e,t){var n=this,r=this.contentQueryStartId,i=e.name,o=Cu(e);if(o.type===vu.SCRIPT||o.type===vu.STYLE)return null;if(o.type===vu.STYLESHEET&&au(o.hrefAttr))return null;var s=[],a=[],u=[],l=[],c=[],p=[],h=[],d=[],v=!1,m=[],g=y(e.name);e.attrs.forEach(function(e){var t,r,i=n._parseAttr(g,e,s,a,c,u,l);l.push.apply(l,f([].map(function(e){return za.fromParsedVariable(e)})));var o=n._normalizeAttributeName(e.name);o.startsWith("*")&&(t=e.value,r=o.substring("*".length));var y=null!=t;if(y){v&&n._reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",e.sourceSpan),v=!0;var _=[];n._bindingParser.parseInlineTemplateBinding(r,t,e.sourceSpan,h,p,_),d.push.apply(d,f(_.map(function(e){return za.fromParsedVariable(e)})))}i||y||(m.push(n.visitAttribute(e,null)),s.push([e.name,e.value]))});var _=ju(i,s),b=this._parseDirectives(this.selectorMatcher,_),w=b.directives,x=b.matchElement,E=[],S=new Set,C=this._createDirectiveAsts(g,e.name,w,a,u,e.sourceSpan,E,S),T=this._createElementPropertyAsts(e.name,a,S),N=new ru(this.providerViewContext,t.providerContext,t.isTemplateElement||v,C,m,E,g,r,e.sourceSpan),k=Js(o.nonBindable?Bu:this,e.children,Fu.create(g,C,g?t.providerContext:N));N.afterElement();var P,I=""!=o.projectAs?A.parse(o.projectAs)[0]:_,M=t.findNgContentIndex(I);if(o.type===vu.NG_CONTENT)e.children&&!e.children.every(Hu)&&this._reportError("<ng-content> element cannot have content.",e.sourceSpan),P=new Ya(this.ngContentCount++,v?null:M,e.sourceSpan);else if(g)this._assertAllEventsPublishedByDirectives(C,c),this._assertNoComponentsNorElementBindingsOnTemplate(C,T,e.sourceSpan),P=new Qa(m,c,E,l,N.transformedDirectiveAsts,N.transformProviders,N.transformedHasViewContainer,N.queryMatches,k,v?null:M,e.sourceSpan);else{this._assertElementExists(x,e),this._assertOnlyOneComponent(C,e.sourceSpan);var O=v?null:t.findNgContentIndex(I);P=new Wa(i,m,T,c,E,N.transformedDirectiveAsts,N.transformProviders,N.transformedHasViewContainer,N.queryMatches,k,v?null:O,e.sourceSpan,e.endSourceSpan||null)}if(v){var R=this.contentQueryStartId,D=ju("ng-template",h),L=this._parseDirectives(this.selectorMatcher,D).directives,F=new Set,j=this._createDirectiveAsts(!0,i,L,p,[],e.sourceSpan,[],F),V=this._createElementPropertyAsts(i,p,F);this._assertNoComponentsNorElementBindingsOnTemplate(j,V,e.sourceSpan);var B=new ru(this.providerViewContext,t.providerContext,t.isTemplateElement,j,[],[],!0,R,e.sourceSpan);B.afterElement(),P=new Qa([],[],[],d,B.transformedDirectiveAsts,B.transformProviders,B.transformedHasViewContainer,B.queryMatches,[P],M,e.sourceSpan)}return P},e.prototype._parseAttr=function(e,t,n,r,i,o,s){var a=this._normalizeAttributeName(t.name),u=t.value,l=t.sourceSpan,c=[],p=a.match(ku),h=!1;return null!==p?(h=!0,null!=p[1]?this._bindingParser.parsePropertyBinding(p[7],u,!1,l,n,r):p[2]?e?this._parseVariable(p[7],u,l,s):this._reportError('"let-" is only supported on ng-template elements.',l):p[3]?this._parseReference(p[7],u,l,o):p[4]?this._bindingParser.parseEvent(p[7],u,l,t.valueSpan||l,n,c):p[5]?(this._bindingParser.parsePropertyBinding(p[7],u,!1,l,n,r),this._parseAssignmentEvent(p[7],u,l,t.valueSpan||l,n,c)):p[6]?this._bindingParser.parseLiteralAttr(a,u,l,n,r):p[8]?(this._bindingParser.parsePropertyBinding(p[8],u,!1,l,n,r),this._parseAssignmentEvent(p[8],u,l,t.valueSpan||l,n,c)):p[9]?this._bindingParser.parsePropertyBinding(p[9],u,!1,l,n,r):p[10]&&this._bindingParser.parseEvent(p[10],u,l,t.valueSpan||l,n,c)):h=this._bindingParser.parsePropertyInterpolation(a,u,l,n,r),h||this._bindingParser.parseLiteralAttr(a,u,l,n,r),i.push.apply(i,f(c.map(function(e){return qa.fromParsedEvent(e)}))),h},e.prototype._normalizeAttributeName=function(e){return/^data-/i.test(e)?e.substring(5):e},e.prototype._parseVariable=function(e,t,n,r){e.indexOf("-")>-1&&this._reportError('"-" is not allowed in variable names',n),r.push(new za(e,t,n))},e.prototype._parseReference=function(e,t,n,r){e.indexOf("-")>-1&&this._reportError('"-" is not allowed in reference names',n),r.push(new Lu(e,t,n))},e.prototype._parseAssignmentEvent=function(e,t,n,r,i,o){this._bindingParser.parseEvent(e+"Change",t+"=$event",n,r,i,o)},e.prototype._parseDirectives=function(e,t){var n=this,r=new Array(this.directivesIndex.size),i=!1;return e.match(t,function(e,t){r[n.directivesIndex.get(t)]=t,i=i||e.hasElementSelector()}),{directives:r.filter(function(e){return!!e}),matchElement:i}},e.prototype._createDirectiveAsts=function(e,t,n,r,i,o,s,a){var u=this,l=new Set,c=null,p=n.map(function(e){var n=new rr(o.start,o.end,"Directive "+rn(e.type));e.isComponent&&(c=e);var p=[],h=u._bindingParser.createDirectiveHostPropertyAsts(e,t,n).map(function(e){return Ua.fromBoundProperty(e)});h=u._checkPropertiesInSchema(t,h);var f=u._bindingParser.createDirectiveHostEventAsts(e,n);u._createDirectivePropertyAsts(e.inputs,r,p,a),i.forEach(function(t){(0===t.value.length&&e.isComponent||t.isReferenceToDirective(e))&&(s.push(new Ka(t.name,Gt(e.type.reference),t.value,t.sourceSpan)),l.add(t.name))});var d=f.map(function(e){return qa.fromParsedEvent(e)}),v=u.contentQueryStartId;return u.contentQueryStartId+=e.queries.length,new Ga(e,p,h,d,v,n)});return i.forEach(function(t){if(t.value.length>0)l.has(t.name)||u._reportError('There is no directive with "exportAs" set to "'+t.value+'"',t.sourceSpan);else if(!c){var n=null;e&&(n=Xt(u.reflector,$t.TemplateRef)),s.push(new Ka(t.name,n,t.value,t.sourceSpan))}}),p},e.prototype._createDirectivePropertyAsts=function(e,t,n,r){if(e){var i=new Map;t.forEach(function(e){var t=i.get(e.name);t&&!t.isLiteral||i.set(e.name,e)}),Object.keys(e).forEach(function(t){var o=i.get(e[t]);o&&(r.add(o.name),qu(o.expression)||n.push(new $a(t,o.name,o.expression,o.sourceSpan)))})}},e.prototype._createElementPropertyAsts=function(e,t,n){var r=this,i=[];return t.forEach(function(t){if(!t.isLiteral&&!n.has(t.name)){var o=r._bindingParser.createBoundElementProperty(e,t);i.push(Ua.fromBoundProperty(o))}}),this._checkPropertiesInSchema(e,i)},e.prototype._findComponentDirectives=function(e){return e.filter(function(e){return e.directive.isComponent})},e.prototype._findComponentDirectiveNames=function(e){return this._findComponentDirectives(e).map(function(e){return rn(e.directive.type)})},e.prototype._assertOnlyOneComponent=function(e,t){var n=this._findComponentDirectiveNames(e);n.length>1&&this._reportError("More than one component matched on this element.\nMake sure that only one component's selector can match a given element.\nConflicting components: "+n.join(","),t)},e.prototype._assertElementExists=function(e,t){var n=t.name.replace(/^:xhtml:/,"");if(!e&&!this._schemaRegistry.hasElement(n,this._schemas)){var r="'"+n+"' is not a known element:\n";r+="1. If '"+n+"' is an Angular component, then verify that it is part of this module.\n",n.indexOf("-")>-1?r+="2. If '"+n+"' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.":r+="2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.",this._reportError(r,t.sourceSpan)}},e.prototype._assertNoComponentsNorElementBindingsOnTemplate=function(e,t,n){var r=this,i=this._findComponentDirectiveNames(e);i.length>0&&this._reportError("Components on an embedded template: "+i.join(","),n),t.forEach(function(e){r._reportError("Property binding "+e.name+' not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "@NgModule.declarations".',n)})},e.prototype._assertAllEventsPublishedByDirectives=function(e,t){var n=this,r=new Set;e.forEach(function(e){Object.keys(e.directive.outputs).forEach(function(t){r.add(e.directive.outputs[t])})}),t.forEach(function(e){null==e.target&&r.has(e.name)||n._reportError("Event binding "+e.fullName+' not emitted by any directive on an embedded template. Make sure that the event name is spelled correctly and all directives are listed in the "@NgModule.declarations".',e.sourceSpan)})},e.prototype._checkPropertiesInSchema=function(e,t){var n=this;return t.filter(function(t){if(0===t.type&&!n._schemaRegistry.hasProperty(e,t.name,n._schemas)){var r="Can't bind to '"+t.name+"' since it isn't a known property of '"+e+"'.";e.startsWith("ng-")?r+="\n1. If '"+t.name+"' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component.\n2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.":e.indexOf("-")>-1&&(r+="\n1. If '"+e+"' is an Angular component and it has '"+t.name+"' input, then verify that it is part of this module.\n2. If '"+e+"' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.\n3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component."),n._reportError(r,t.sourceSpan)}return!qu(t.value)})},e.prototype._reportError=function(e,t,n){void 0===n&&(n=er.ERROR),this._targetErrors.push(new ir(t,e,n))},e}(),Du=function(){function e(){}return e.prototype.visitElement=function(e,t){var n=Cu(e);if(n.type===vu.SCRIPT||n.type===vu.STYLE||n.type===vu.STYLESHEET)return null;var r=e.attrs.map(function(e){return[e.name,e.value]}),i=ju(e.name,r),o=t.findNgContentIndex(i),s=Js(this,e.children,Vu);return new Wa(e.name,Js(this,e.attrs),[],[],[],[],[],!1,[],s,o,e.sourceSpan,e.endSourceSpan)},e.prototype.visitComment=function(e,t){return null},e.prototype.visitAttribute=function(e,t){return new Ba(e.name,e.value,e.sourceSpan)},e.prototype.visitText=function(e,t){var n=t.findNgContentIndex(Pu());return new ja(e.value,n,e.sourceSpan)},e.prototype.visitExpansion=function(e,t){return e},e.prototype.visitExpansionCase=function(e,t){return e},e}(),Lu=function(){function e(e,t,n){this.name=e,this.value=t,this.sourceSpan=n}return e.prototype.isReferenceToDirective=function(e){return-1!==function t(e){return e?e.split(",").map(function(e){return e.trim()}):[]}(e.exportAs).indexOf(this.value)},e}(),Fu=function(){function e(e,t,n,r){this.isTemplateElement=e,this._ngContentIndexMatcher=t,this._wildcardNgContentIndex=n,this.providerContext=r}return e.create=function(t,n,r){var i=new P,o=null,s=n.find(function(e){return e.directive.isComponent});if(s)for(var a=s.directive.template.ngContentSelectors,u=0;u<a.length;u++)"*"===a[u]?o=u:i.addSelectables(A.parse(a[u]),u);return new e(t,i,o,r)},e.prototype.findNgContentIndex=function(e){var t=[];return this._ngContentIndexMatcher.match(e,function(e,n){t.push(n)}),t.sort(),null!=this._wildcardNgContentIndex&&t.push(this._wildcardNgContentIndex),t.length>0?t[0]:null},e}();function ju(e,t){var n=new A,r=d(e)[1];n.setElement(r);for(var i=0;i<t.length;i++){var o=t[i][0],s=d(o)[1],a=t[i][1];n.addAttribute(s,a),o.toLowerCase()==Au&&a.trim().split(/\s+/g).forEach(function(e){return n.addClassName(e)})}return n}var Vu=new Fu(!0,new P,null,null),Bu=new Du;function Hu(e){return e instanceof Qs&&0==e.value.trim().length}function Uu(e){var t=new Map;return e.forEach(function(e){t.get(e.type.reference)||t.set(e.type.reference,e)}),Array.from(t.values())}function qu(e){return e instanceof Wo&&(e=e.ast),e instanceof To}
|
|
265
265
|
/**
|
|
266
266
|
* @license
|
|
267
267
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -282,14 +282,14 @@ var xo=function xo(e,t,n,r){this.input=t,this.errLocation=n,this.ctxLocation=r,t
|
|
|
282
282
|
*
|
|
283
283
|
* Use of this source code is governed by an MIT-style license that can be
|
|
284
284
|
* found in the LICENSE file at https://angular.io/license
|
|
285
|
-
*/!function(e){e[e.Character=0]="Character",e[e.Identifier=1]="Identifier",e[e.Keyword=2]="Keyword",e[e.String=3]="String",e[e.Operator=4]="Operator",e[e.Number=5]="Number",e[e.Error=6]="Error"}($u||($u={}));var tl=["var","let","as","null","undefined","true","false","if","else","this"],nl=function(){function e(){}return e.prototype.tokenize=function(e){for(var t=new al(e),n=[],r=t.scanToken();null!=r;)n.push(r),r=t.scanToken();return n},e}(),rl=function(){function e(e,t,n,r){this.index=e,this.type=t,this.numValue=n,this.strValue=r}return e.prototype.isCharacter=function(e){return this.type==$u.Character&&this.numValue==e},e.prototype.isNumber=function(){return this.type==$u.Number},e.prototype.isString=function(){return this.type==$u.String},e.prototype.isOperator=function(e){return this.type==$u.Operator&&this.strValue==e},e.prototype.isIdentifier=function(){return this.type==$u.Identifier},e.prototype.isKeyword=function(){return this.type==$u.Keyword},e.prototype.isKeywordLet=function(){return this.type==$u.Keyword&&"let"==this.strValue},e.prototype.isKeywordAs=function(){return this.type==$u.Keyword&&"as"==this.strValue},e.prototype.isKeywordNull=function(){return this.type==$u.Keyword&&"null"==this.strValue},e.prototype.isKeywordUndefined=function(){return this.type==$u.Keyword&&"undefined"==this.strValue},e.prototype.isKeywordTrue=function(){return this.type==$u.Keyword&&"true"==this.strValue},e.prototype.isKeywordFalse=function(){return this.type==$u.Keyword&&"false"==this.strValue},e.prototype.isKeywordThis=function(){return this.type==$u.Keyword&&"this"==this.strValue},e.prototype.isError=function(){return this.type==$u.Error},e.prototype.toNumber=function(){return this.type==$u.Number?this.numValue:-1},e.prototype.toString=function(){switch(this.type){case $u.Character:case $u.Identifier:case $u.Keyword:case $u.Operator:case $u.String:case $u.Error:return this.strValue;case $u.Number:return this.numValue.toString();default:return null}},e}();function il(e,t){return new rl(e,$u.Character,t,String.fromCharCode(t))}function ol(e,t){return new rl(e,$u.Operator,0,t)}var sl=new rl(-1,$u.Character,0,""),al=function(){function e(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}return e.prototype.advance=function(){this.peek=++this.index>=this.length?
|
|
285
|
+
*/!function(e){e[e.Character=0]="Character",e[e.Identifier=1]="Identifier",e[e.Keyword=2]="Keyword",e[e.String=3]="String",e[e.Operator=4]="Operator",e[e.Number=5]="Number",e[e.Error=6]="Error"}($u||($u={}));var tl=["var","let","as","null","undefined","true","false","if","else","this"],nl=function(){function e(){}return e.prototype.tokenize=function(e){for(var t=new al(e),n=[],r=t.scanToken();null!=r;)n.push(r),r=t.scanToken();return n},e}(),rl=function(){function e(e,t,n,r){this.index=e,this.type=t,this.numValue=n,this.strValue=r}return e.prototype.isCharacter=function(e){return this.type==$u.Character&&this.numValue==e},e.prototype.isNumber=function(){return this.type==$u.Number},e.prototype.isString=function(){return this.type==$u.String},e.prototype.isOperator=function(e){return this.type==$u.Operator&&this.strValue==e},e.prototype.isIdentifier=function(){return this.type==$u.Identifier},e.prototype.isKeyword=function(){return this.type==$u.Keyword},e.prototype.isKeywordLet=function(){return this.type==$u.Keyword&&"let"==this.strValue},e.prototype.isKeywordAs=function(){return this.type==$u.Keyword&&"as"==this.strValue},e.prototype.isKeywordNull=function(){return this.type==$u.Keyword&&"null"==this.strValue},e.prototype.isKeywordUndefined=function(){return this.type==$u.Keyword&&"undefined"==this.strValue},e.prototype.isKeywordTrue=function(){return this.type==$u.Keyword&&"true"==this.strValue},e.prototype.isKeywordFalse=function(){return this.type==$u.Keyword&&"false"==this.strValue},e.prototype.isKeywordThis=function(){return this.type==$u.Keyword&&"this"==this.strValue},e.prototype.isError=function(){return this.type==$u.Error},e.prototype.toNumber=function(){return this.type==$u.Number?this.numValue:-1},e.prototype.toString=function(){switch(this.type){case $u.Character:case $u.Identifier:case $u.Keyword:case $u.Operator:case $u.String:case $u.Error:return this.strValue;case $u.Number:return this.numValue.toString();default:return null}},e}();function il(e,t){return new rl(e,$u.Character,t,String.fromCharCode(t))}function ol(e,t){return new rl(e,$u.Operator,0,t)}var sl=new rl(-1,$u.Character,0,""),al=function(){function e(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}return e.prototype.advance=function(){this.peek=++this.index>=this.length?gn:this.input.charCodeAt(this.index)},e.prototype.scanToken=function(){for(var e=this.input,t=this.length,n=this.peek,r=this.index;n<=Sn;){if(++r>=t){n=gn;break}n=e.charCodeAt(r)}if(this.peek=n,this.index=r,r>=t)return null;if(ul(n))return this.scanIdentifier();if(Xn(n))return this.scanNumber(r);var i=r;switch(n){case 46:return this.advance(),Xn(this.peek)?this.scanNumber(i):il(i,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case In:return this.scanCharacter(i,n);case Nn:case Cn:return this.scanString();case 35:case kn:case An:case 42:case Pn:case 37:case 94:return this.scanOperator(i,String.fromCharCode(n));case 63:return this.scanComplexOperator(i,"?",46,".");case 60:case On:return this.scanComplexOperator(i,String.fromCharCode(n),Mn,"=");case 33:case Mn:return this.scanComplexOperator(i,String.fromCharCode(n),Mn,"=",Mn,"=");case 38:return this.scanComplexOperator(i,"&",38,"&");case 124:return this.scanComplexOperator(i,"|",124,"|");case $n:for(;Gn(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error("Unexpected character ["+String.fromCharCode(n)+"]",0)},e.prototype.scanCharacter=function(e,t){return this.advance(),il(e,t)},e.prototype.scanOperator=function(e,t){return this.advance(),ol(e,t)},e.prototype.scanComplexOperator=function(e,t,n,r,i,o){this.advance();var s=t;return this.peek==n&&(this.advance(),s+=r),null!=i&&this.peek==i&&(this.advance(),s+=o),ol(e,s)},e.prototype.scanIdentifier=function(){var e=this.index;for(this.advance();ll(this.peek);)this.advance();var t=this.input.substring(e,this.index);return tl.indexOf(t)>-1?function n(e,t){return new rl(e,$u.Keyword,0,t)}(e,t):function r(e,t){return new rl(e,$u.Identifier,0,t)}(e,t)},e.prototype.scanNumber=function(e){var t,n=this.index===e;for(this.advance();;){if(Xn(this.peek));else if(46==this.peek)n=!1;else{if(101!=(t=this.peek)&&69!=t)break;if(this.advance(),cl(this.peek)&&this.advance(),!Xn(this.peek))return this.error("Invalid exponent",-1);n=!1}this.advance()}var r=this.input.substring(e,this.index);return function o(e,t){return new rl(e,$u.Number,t,"")}(e,n?function i(e){var t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}
|
|
286
286
|
/**
|
|
287
287
|
* @license
|
|
288
288
|
* Copyright Google Inc. All Rights Reserved.
|
|
289
289
|
*
|
|
290
290
|
* Use of this source code is governed by an MIT-style license that can be
|
|
291
291
|
* found in the LICENSE file at https://angular.io/license
|
|
292
|
-
*/(r):parseFloat(r))},e.prototype.scanString=function(){var e=this.index,t=this.peek;this.advance();for(var n="",r=this.index,i=this.input;this.peek!=t;)if(92==this.peek){n+=i.substring(r,this.index),this.advance();var o=void 0;if(this.peek=this.peek,117==this.peek){var s=i.substring(this.index+1,this.index+5);if(!/^[0-9a-f]+$/i.test(s))return this.error("Invalid unicode escape [\\u"+s+"]",0);o=parseInt(s,16);for(var a=0;a<5;a++)this.advance()}else o=pl(this.peek),this.advance();n+=String.fromCharCode(o),r=this.index}else{if(this.peek==Ii)return this.error("Unterminated quote",0);this.advance()}var u=i.substring(r,this.index);return this.advance(),function l(e,t){return new rl(e,$u.String,0,t)}(e,n+u)},e.prototype.error=function(e,t){var n=this.index+t;return function r(e,t){return new rl(e,$u.Error,0,t)}(n,"Lexer Error: "+e+" at column "+n+" in expression ["+this.input+"]")},e}();function ul(e){return eo<=e&&e<=so||Xi<=e&&e<=Zi||e==Ji||e==Vi}function ll(e){return co(e)||lo(e)||e==Ji||e==Vi}function cl(e){return e==Ui||e==Hi}function pl(e){switch(e){case no:return Oi;case to:return Di;case ro:return Li;case io:return Mi;case oo:return Ri;default:return e}}var hl=function hl(e,t,n){this.strings=e,this.expressions=t,this.offsets=n},fl=function fl(e,t,n){this.templateBindings=e,this.warnings=t,this.errors=n};function dl(e){var t=It(e.start)+"([\\s\\S]*?)"+It(e.end);return new RegExp(t,"g")}var vl,ml=function(){function e(e){this._lexer=e,this.errors=[]}return e.prototype.parseAction=function(e,t,n){void 0===n&&(n=fi),this._checkNoInterpolation(e,t,n);var r=this._stripComments(e),i=this._lexer.tokenize(this._stripComments(e)),o=new yl(e,t,i,r.length,!0,this.errors,e.length-r.length).parseChain();return new Wo(o,e,t,this.errors)},e.prototype.parseBinding=function(e,t,n){void 0===n&&(n=fi);var r=this._parseBindingAst(e,t,n);return new Wo(r,e,t,this.errors)},e.prototype.parseSimpleBinding=function(e,t,n){void 0===n&&(n=fi);var r=this._parseBindingAst(e,t,n),i=gl.check(r);return i.length>0&&this._reportError("Host binding expression cannot contain "+i.join(" "),e,t),new Wo(r,e,t,this.errors)},e.prototype._reportError=function(e,t,n,r){this.errors.push(new xo(e,t,n,r))},e.prototype._parseBindingAst=function(e,t,n){var r=this._parseQuote(e,t);if(null!=r)return r;this._checkNoInterpolation(e,t,n);var i=this._stripComments(e),o=this._lexer.tokenize(i);return new yl(e,t,o,i.length,!1,this.errors,e.length-i.length).parseChain()},e.prototype._parseQuote=function(e,t){if(null==e)return null;var n=e.indexOf(":");if(-1==n)return null;var r=e.substring(0,n).trim();if(!function i(e){if(0==e.length)return!1;var t=new al(e);if(!ul(t.peek))return!1;for(t.advance();t.peek!==Ii;){if(!ll(t.peek))return!1;t.advance()}return!0}(r))return null;var o=e.substring(n+1);return new Co(new Eo(0,e.length),r,o,t)},e.prototype.parseTemplateBindings=function(e,t,n){var r=this._lexer.tokenize(t);return new yl(t,n,r,t.length,!1,this.errors,0).parseTemplateBindings(e)},e.prototype.parseInterpolation=function(e,t,n){void 0===n&&(n=fi);var r=this.splitInterpolation(e,t,n);if(null==r)return null;for(var i=[],o=0;o<r.expressions.length;++o){var s=r.expressions[o],a=this._stripComments(s),u=this._lexer.tokenize(a),l=new yl(e,t,u,a.length,!1,this.errors,r.offsets[o]+(s.length-a.length)).parseChain();i.push(l)}return new Wo(new Vo(new Eo(0,null==e?0:e.length),r.strings,i),e,t,this.errors)},e.prototype.splitInterpolation=function(e,t,n){void 0===n&&(n=fi);var r=dl(n),i=e.split(r);if(i.length<=1)return null;for(var o=[],s=[],a=[],u=0,l=0;l<i.length;l++){var c=i[l];l%2==0?(o.push(c),u+=c.length):c.trim().length>0?(u+=n.start.length,s.push(c),a.push(u),u+=c.length+n.end.length):(this._reportError("Blank expressions are not allowed in interpolated strings",e,"at column "+this._findInterpolationErrorColumn(i,l,n)+" in",t),s.push("$implict"),a.push(u))}return new hl(o,s,a)},e.prototype.wrapLiteralPrimitive=function(e,t){return new Wo(new Lo(new Eo(0,null==e?0:e.length),e),e,t,this.errors)},e.prototype._stripComments=function(e){var t=this._commentStart(e);return null!=t?e.substring(0,t).trim():e},e.prototype._commentStart=function(e){for(var t,n=null,r=0;r<e.length-1;r++){var i=e.charCodeAt(r),o=e.charCodeAt(r+1);if(i===qi&&o==qi&&null==n)return r;n===i?n=null:null==n&&((t=i)===Bi||t===ji||96===t)&&(n=i)}return null},e.prototype._checkNoInterpolation=function(e,t,n){var r=dl(n),i=e.split(r);i.length>1&&this._reportError("Got interpolation ("+n.start+n.end+") where expression was expected",e,"at column "+this._findInterpolationErrorColumn(i,1,n)+" in",t)},e.prototype._findInterpolationErrorColumn=function(e,t,n){for(var r="",i=0;i<t;i++)r+=i%2==0?e[i]:""+n.start+e[i]+n.end;return r.length},e}(),yl=function(){function e(e,t,n,r,i,o,s){this.input=e,this.location=t,this.tokens=n,this.inputLength=r,this.parseAction=i,this.errors=o,this.offset=s,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.index=0}return e.prototype.peek=function(e){var t=this.index+e;return t<this.tokens.length?this.tokens[t]:sl},Object.defineProperty(e.prototype,"next",{get:function(){return this.peek(0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputIndex",{get:function(){return this.index<this.tokens.length?this.next.index+this.offset:this.inputLength+this.offset},enumerable:!0,configurable:!0}),e.prototype.span=function(e){return new Eo(e,this.inputIndex)},e.prototype.advance=function(){this.index++},e.prototype.optionalCharacter=function(e){return!!this.next.isCharacter(e)&&(this.advance(),!0)},e.prototype.peekKeywordLet=function(){return this.next.isKeywordLet()},e.prototype.peekKeywordAs=function(){return this.next.isKeywordAs()},e.prototype.expectCharacter=function(e){this.optionalCharacter(e)||this.error("Missing expected "+String.fromCharCode(e))},e.prototype.optionalOperator=function(e){return!!this.next.isOperator(e)&&(this.advance(),!0)},e.prototype.expectOperator=function(e){this.optionalOperator(e)||this.error("Missing expected operator "+e)},e.prototype.expectIdentifierOrKeyword=function(){var e=this.next;return e.isIdentifier()||e.isKeyword()?(this.advance(),e.toString()):(this.error("Unexpected token "+e+", expected identifier or keyword"),"")},e.prototype.expectIdentifierOrKeywordOrString=function(){var e=this.next;return e.isIdentifier()||e.isKeyword()||e.isString()?(this.advance(),e.toString()):(this.error("Unexpected token "+e+", expected identifier, keyword, or string"),"")},e.prototype.parseChain=function(){for(var e=[],t=this.inputIndex;this.index<this.tokens.length;){var n=this.parsePipe();if(e.push(n),this.optionalCharacter(Ki))for(this.parseAction||this.error("Binding expression cannot contain chained expression");this.optionalCharacter(Ki););else this.index<this.tokens.length&&this.error("Unexpected token '"+this.next+"'")}return 0==e.length?new To(this.span(t)):1==e.length?e[0]:new ko(this.span(t),e)},e.prototype.parsePipe=function(){var e=this.parseExpression();if(this.optionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{for(var t=this.expectIdentifierOrKeyword(),n=[];this.optionalCharacter(58);)n.push(this.parseExpression());e=new Do(this.span(e.span.start),e,t,n)}while(this.optionalOperator("|"))}return e},e.prototype.parseExpression=function(){return this.parseConditional()},e.prototype.parseConditional=function(){var e=this.inputIndex,t=this.parseLogicalOr();if(this.optionalOperator("?")){var n=this.parsePipe(),r=void 0;if(this.optionalCharacter(58))r=this.parsePipe();else{var i=this.input.substring(e,this.inputIndex);this.error("Conditional expression "+i+" requires all 3 expressions"),r=new To(this.span(e))}return new Ao(this.span(e),t,n,r)}return t},e.prototype.parseLogicalOr=function(){for(var e=this.parseLogicalAnd();this.optionalOperator("||");){var t=this.parseLogicalAnd();e=new Bo(this.span(e.span.start),"||",e,t)}return e},e.prototype.parseLogicalAnd=function(){for(var e=this.parseEquality();this.optionalOperator("&&");){var t=this.parseEquality();e=new Bo(this.span(e.span.start),"&&",e,t)}return e},e.prototype.parseEquality=function(){for(var e=this.parseRelational();this.next.type==$u.Operator;){var t=this.next.strValue;switch(t){case"==":case"===":case"!=":case"!==":this.advance();var n=this.parseRelational();e=new Bo(this.span(e.span.start),t,e,n);continue}break}return e},e.prototype.parseRelational=function(){for(var e=this.parseAdditive();this.next.type==$u.Operator;){var t=this.next.strValue;switch(t){case"<":case">":case"<=":case">=":this.advance();var n=this.parseAdditive();e=new Bo(this.span(e.span.start),t,e,n);continue}break}return e},e.prototype.parseAdditive=function(){for(var e=this.parseMultiplicative();this.next.type==$u.Operator;){var t=this.next.strValue;switch(t){case"+":case"-":this.advance();var n=this.parseMultiplicative();e=new Bo(this.span(e.span.start),t,e,n);continue}break}return e},e.prototype.parseMultiplicative=function(){for(var e=this.parsePrefix();this.next.type==$u.Operator;){var t=this.next.strValue;switch(t){case"*":case"%":case"/":this.advance();var n=this.parsePrefix();e=new Bo(this.span(e.span.start),t,e,n);continue}break}return e},e.prototype.parsePrefix=function(){if(this.next.type==$u.Operator){var e=this.inputIndex,t=this.next.strValue,n=void 0;switch(t){case"+":return this.advance(),n=this.parsePrefix(),new Bo(this.span(e),"-",n,new Lo(new Eo(e,e),0));case"-":return this.advance(),n=this.parsePrefix(),new Bo(this.span(e),t,new Lo(new Eo(e,e),0),n);case"!":return this.advance(),n=this.parsePrefix(),new Ho(this.span(e),n)}}return this.parseCallChain()},e.prototype.parseCallChain=function(){for(var e=this.parsePrimary();;)if(this.optionalCharacter(46))e=this.parseAccessMemberOrMethodCall(e,!1);else if(this.optionalOperator("?."))e=this.parseAccessMemberOrMethodCall(e,!0);else if(this.optionalCharacter(91)){this.rbracketsExpected++;var t=this.parsePipe();if(this.rbracketsExpected--,this.expectCharacter(93),this.optionalOperator("=")){var n=this.parseConditional();e=new Ro(this.span(e.span.start),e,t,n)}else e=new Oo(this.span(e.span.start),e,t)}else if(this.optionalCharacter(40)){this.rparensExpected++;var r=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(41),e=new zo(this.span(e.span.start),e,r)}else{if(!this.optionalOperator("!"))return e;e=new Uo(this.span(e.span.start),e)}},e.prototype.parsePrimary=function(){var e=this.inputIndex;if(this.optionalCharacter(40)){this.rparensExpected++;var t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),t}if(this.next.isKeywordNull())return this.advance(),new Lo(this.span(e),null);if(this.next.isKeywordUndefined())return this.advance(),new Lo(this.span(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new Lo(this.span(e),!0);if(this.next.isKeywordFalse())return this.advance(),new Lo(this.span(e),!1);if(this.next.isKeywordThis())return this.advance(),new No(this.span(e));if(this.optionalCharacter(91)){this.rbracketsExpected++;var n=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new Fo(this.span(e),n)}if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new No(this.span(e)),!1);if(this.next.isNumber()){var r=this.next.toNumber();return this.advance(),new Lo(this.span(e),r)}if(this.next.isString()){var i=this.next.toString();return this.advance(),new Lo(this.span(e),i)}return this.index>=this.tokens.length?(this.error("Unexpected end of expression: "+this.input),new To(this.span(e))):(this.error("Unexpected token "+this.next),new To(this.span(e)))},e.prototype.parseExpressionList=function(e){var t=[];if(!this.next.isCharacter(e))do{t.push(this.parsePipe())}while(this.optionalCharacter(44));return t},e.prototype.parseLiteralMap=function(){var e=[],t=[],n=this.inputIndex;if(this.expectCharacter(123),!this.optionalCharacter(125)){this.rbracesExpected++;do{var r=this.next.isString(),i=this.expectIdentifierOrKeywordOrString();e.push({key:i,quoted:r}),this.expectCharacter(58),t.push(this.parsePipe())}while(this.optionalCharacter(44));this.rbracesExpected--,this.expectCharacter(125)}return new jo(this.span(n),e,t)},e.prototype.parseAccessMemberOrMethodCall=function(e,t){void 0===t&&(t=!1);var n=e.span.start,r=this.expectIdentifierOrKeyword();if(this.optionalCharacter(40)){this.rparensExpected++;var i=this.parseCallArguments();this.expectCharacter(41),this.rparensExpected--;var o=this.span(n);return t?new Ko(o,e,r,i):new qo(o,e,r,i)}if(t)return this.optionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new To(this.span(n))):new Mo(this.span(n),e,r);if(this.optionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new To(this.span(n));var s=this.parseConditional();return new Io(this.span(n),e,r,s)}return new Po(this.span(n),e,r)},e.prototype.parseCallArguments=function(){if(this.next.isCharacter(41))return[];var e=[];do{e.push(this.parsePipe())}while(this.optionalCharacter(44));return e},e.prototype.expectTemplateBindingKey=function(){var e="",t=!1;do{e+=this.expectIdentifierOrKeywordOrString(),(t=this.optionalOperator("-"))&&(e+="-")}while(t);return e.toString()},e.prototype.parseTemplateBindings=function(e){var t=!0,n=[];do{var r=this.inputIndex,i=void 0,o=void 0,s=!1;t?(i=o=e,t=!1):((s=this.peekKeywordLet())&&this.advance(),i=this.expectTemplateBindingKey(),o=s?i:e+i[0].toUpperCase()+i.substring(1),this.optionalCharacter(58));var a=null,u=null;if(s)a=this.optionalOperator("=")?this.expectTemplateBindingKey():"$implicit";else if(this.peekKeywordAs())this.advance(),a=i,o=this.expectTemplateBindingKey(),s=!0;else if(this.next!==sl&&!this.peekKeywordLet()){var l=this.inputIndex,c=this.parsePipe(),p=this.input.substring(l-this.offset,this.inputIndex-this.offset);u=new Wo(c,p,this.location,this.errors)}if(n.push(new Qo(this.span(r),o,s,a,u)),this.peekKeywordAs()&&!s){var h=this.inputIndex;this.advance();var f=this.expectTemplateBindingKey();n.push(new Qo(this.span(h),f,!0,o,null))}this.optionalCharacter(Ki)||this.optionalCharacter(44)}while(this.index<this.tokens.length);return new fl(n,[],this.errors)},e.prototype.error=function(e,t){void 0===t&&(t=null),this.errors.push(new xo(e,this.input,this.locationText(t),this.location)),this.skip()},e.prototype.locationText=function(e){return void 0===e&&(e=null),null==e&&(e=this.index),e<this.tokens.length?"at column "+(this.tokens[e].index+1)+" in":"at the end of the expression"},e.prototype.skip=function(){for(var e=this.next;this.index<this.tokens.length&&!e.isCharacter(Ki)&&(this.rparensExpected<=0||!e.isCharacter(41))&&(this.rbracesExpected<=0||!e.isCharacter(125))&&(this.rbracketsExpected<=0||!e.isCharacter(93));)this.next.isError()&&this.errors.push(new xo(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),e=this.next},e}(),gl=function(){function e(){this.errors=[]}return e.check=function(t){var n=new e;return t.visit(n),n.errors},e.prototype.visitImplicitReceiver=function(e,t){},e.prototype.visitInterpolation=function(e,t){},e.prototype.visitLiteralPrimitive=function(e,t){},e.prototype.visitPropertyRead=function(e,t){},e.prototype.visitPropertyWrite=function(e,t){},e.prototype.visitSafePropertyRead=function(e,t){},e.prototype.visitMethodCall=function(e,t){},e.prototype.visitSafeMethodCall=function(e,t){},e.prototype.visitFunctionCall=function(e,t){},e.prototype.visitLiteralArray=function(e,t){this.visitAll(e.expressions)},e.prototype.visitLiteralMap=function(e,t){this.visitAll(e.values)},e.prototype.visitBinary=function(e,t){},e.prototype.visitPrefixNot=function(e,t){},e.prototype.visitNonNullAssert=function(e,t){},e.prototype.visitConditional=function(e,t){},e.prototype.visitPipe=function(e,t){this.errors.push("pipes")},e.prototype.visitKeyedRead=function(e,t){},e.prototype.visitKeyedWrite=function(e,t){},e.prototype.visitAll=function(e){var t=this;return e.map(function(e){return e.visit(t)})},e.prototype.visitChain=function(e,t){},e.prototype.visitQuote=function(e,t){},e}();function _l(){return vl||(vl={},bl(H.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),bl(H.STYLE,["*|style"]),bl(H.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","img|srcset","input|src","ins|cite","q|cite","source|src","source|srcset","track|src","video|poster","video|src"]),bl(H.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),vl}function bl(e,t){var n,r;try{for(var i=p(t),o=i.next();!o.done;o=i.next())vl[o.value.toLowerCase()]=e}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}
|
|
292
|
+
*/(r):parseFloat(r))},e.prototype.scanString=function(){var e=this.index,t=this.peek;this.advance();for(var n="",r=this.index,i=this.input;this.peek!=t;)if(92==this.peek){n+=i.substring(r,this.index),this.advance();var o=void 0;if(this.peek=this.peek,117==this.peek){var s=i.substring(this.index+1,this.index+5);if(!/^[0-9a-f]+$/i.test(s))return this.error("Invalid unicode escape [\\u"+s+"]",0);o=parseInt(s,16);for(var a=0;a<5;a++)this.advance()}else o=pl(this.peek),this.advance();n+=String.fromCharCode(o),r=this.index}else{if(this.peek==gn)return this.error("Unterminated quote",0);this.advance()}var u=i.substring(r,this.index);return this.advance(),function l(e,t){return new rl(e,$u.String,0,t)}(e,n+u)},e.prototype.error=function(e,t){var n=this.index+t;return function r(e,t){return new rl(e,$u.Error,0,t)}(n,"Lexer Error: "+e+" at column "+n+" in expression ["+this.input+"]")},e}();function ul(e){return Hn<=e&&e<=Qn||Fn<=e&&e<=Vn||e==Bn||e==Tn}function ll(e){return Yn(e)||Xn(e)||e==Bn||e==Tn}function cl(e){return e==An||e==kn}function pl(e){switch(e){case qn:return bn;case Un:return xn;case Kn:return En;case zn:return _n;case Wn:return wn;default:return e}}var hl=function hl(e,t,n){this.strings=e,this.expressions=t,this.offsets=n},fl=function fl(e,t,n){this.templateBindings=e,this.warnings=t,this.errors=n};function dl(e){var t=It(e.start)+"([\\s\\S]*?)"+It(e.end);return new RegExp(t,"g")}var vl,ml=function(){function e(e){this._lexer=e,this.errors=[]}return e.prototype.parseAction=function(e,t,n){void 0===n&&(n=eo),this._checkNoInterpolation(e,t,n);var r=this._stripComments(e),i=this._lexer.tokenize(this._stripComments(e)),o=new yl(e,t,i,r.length,!0,this.errors,e.length-r.length).parseChain();return new Wo(o,e,t,this.errors)},e.prototype.parseBinding=function(e,t,n){void 0===n&&(n=eo);var r=this._parseBindingAst(e,t,n);return new Wo(r,e,t,this.errors)},e.prototype.parseSimpleBinding=function(e,t,n){void 0===n&&(n=eo);var r=this._parseBindingAst(e,t,n),i=gl.check(r);return i.length>0&&this._reportError("Host binding expression cannot contain "+i.join(" "),e,t),new Wo(r,e,t,this.errors)},e.prototype._reportError=function(e,t,n,r){this.errors.push(new xo(e,t,n,r))},e.prototype._parseBindingAst=function(e,t,n){var r=this._parseQuote(e,t);if(null!=r)return r;this._checkNoInterpolation(e,t,n);var i=this._stripComments(e),o=this._lexer.tokenize(i);return new yl(e,t,o,i.length,!1,this.errors,e.length-i.length).parseChain()},e.prototype._parseQuote=function(e,t){if(null==e)return null;var n=e.indexOf(":");if(-1==n)return null;var r=e.substring(0,n).trim();if(!function i(e){if(0==e.length)return!1;var t=new al(e);if(!ul(t.peek))return!1;for(t.advance();t.peek!==gn;){if(!ll(t.peek))return!1;t.advance()}return!0}(r))return null;var o=e.substring(n+1);return new Co(new Eo(0,e.length),r,o,t)},e.prototype.parseTemplateBindings=function(e,t,n){var r=this._lexer.tokenize(t);return new yl(t,n,r,t.length,!1,this.errors,0).parseTemplateBindings(e)},e.prototype.parseInterpolation=function(e,t,n){void 0===n&&(n=eo);var r=this.splitInterpolation(e,t,n);if(null==r)return null;for(var i=[],o=0;o<r.expressions.length;++o){var s=r.expressions[o],a=this._stripComments(s),u=this._lexer.tokenize(a),l=new yl(e,t,u,a.length,!1,this.errors,r.offsets[o]+(s.length-a.length)).parseChain();i.push(l)}return new Wo(new Vo(new Eo(0,null==e?0:e.length),r.strings,i),e,t,this.errors)},e.prototype.splitInterpolation=function(e,t,n){void 0===n&&(n=eo);var r=dl(n),i=e.split(r);if(i.length<=1)return null;for(var o=[],s=[],a=[],u=0,l=0;l<i.length;l++){var c=i[l];l%2==0?(o.push(c),u+=c.length):c.trim().length>0?(u+=n.start.length,s.push(c),a.push(u),u+=c.length+n.end.length):(this._reportError("Blank expressions are not allowed in interpolated strings",e,"at column "+this._findInterpolationErrorColumn(i,l,n)+" in",t),s.push("$implict"),a.push(u))}return new hl(o,s,a)},e.prototype.wrapLiteralPrimitive=function(e,t){return new Wo(new Lo(new Eo(0,null==e?0:e.length),e),e,t,this.errors)},e.prototype._stripComments=function(e){var t=this._commentStart(e);return null!=t?e.substring(0,t).trim():e},e.prototype._commentStart=function(e){for(var t,n=null,r=0;r<e.length-1;r++){var i=e.charCodeAt(r),o=e.charCodeAt(r+1);if(i===Pn&&o==Pn&&null==n)return r;n===i?n=null:null==n&&((t=i)===Nn||t===Cn||96===t)&&(n=i)}return null},e.prototype._checkNoInterpolation=function(e,t,n){var r=dl(n),i=e.split(r);i.length>1&&this._reportError("Got interpolation ("+n.start+n.end+") where expression was expected",e,"at column "+this._findInterpolationErrorColumn(i,1,n)+" in",t)},e.prototype._findInterpolationErrorColumn=function(e,t,n){for(var r="",i=0;i<t;i++)r+=i%2==0?e[i]:""+n.start+e[i]+n.end;return r.length},e}(),yl=function(){function e(e,t,n,r,i,o,s){this.input=e,this.location=t,this.tokens=n,this.inputLength=r,this.parseAction=i,this.errors=o,this.offset=s,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.index=0}return e.prototype.peek=function(e){var t=this.index+e;return t<this.tokens.length?this.tokens[t]:sl},Object.defineProperty(e.prototype,"next",{get:function(){return this.peek(0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputIndex",{get:function(){return this.index<this.tokens.length?this.next.index+this.offset:this.inputLength+this.offset},enumerable:!0,configurable:!0}),e.prototype.span=function(e){return new Eo(e,this.inputIndex)},e.prototype.advance=function(){this.index++},e.prototype.optionalCharacter=function(e){return!!this.next.isCharacter(e)&&(this.advance(),!0)},e.prototype.peekKeywordLet=function(){return this.next.isKeywordLet()},e.prototype.peekKeywordAs=function(){return this.next.isKeywordAs()},e.prototype.expectCharacter=function(e){this.optionalCharacter(e)||this.error("Missing expected "+String.fromCharCode(e))},e.prototype.optionalOperator=function(e){return!!this.next.isOperator(e)&&(this.advance(),!0)},e.prototype.expectOperator=function(e){this.optionalOperator(e)||this.error("Missing expected operator "+e)},e.prototype.expectIdentifierOrKeyword=function(){var e=this.next;return e.isIdentifier()||e.isKeyword()?(this.advance(),e.toString()):(this.error("Unexpected token "+e+", expected identifier or keyword"),"")},e.prototype.expectIdentifierOrKeywordOrString=function(){var e=this.next;return e.isIdentifier()||e.isKeyword()||e.isString()?(this.advance(),e.toString()):(this.error("Unexpected token "+e+", expected identifier, keyword, or string"),"")},e.prototype.parseChain=function(){for(var e=[],t=this.inputIndex;this.index<this.tokens.length;){var n=this.parsePipe();if(e.push(n),this.optionalCharacter(In))for(this.parseAction||this.error("Binding expression cannot contain chained expression");this.optionalCharacter(In););else this.index<this.tokens.length&&this.error("Unexpected token '"+this.next+"'")}return 0==e.length?new To(this.span(t)):1==e.length?e[0]:new ko(this.span(t),e)},e.prototype.parsePipe=function(){var e=this.parseExpression();if(this.optionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{for(var t=this.expectIdentifierOrKeyword(),n=[];this.optionalCharacter(58);)n.push(this.parseExpression());e=new Do(this.span(e.span.start),e,t,n)}while(this.optionalOperator("|"))}return e},e.prototype.parseExpression=function(){return this.parseConditional()},e.prototype.parseConditional=function(){var e=this.inputIndex,t=this.parseLogicalOr();if(this.optionalOperator("?")){var n=this.parsePipe(),r=void 0;if(this.optionalCharacter(58))r=this.parsePipe();else{var i=this.input.substring(e,this.inputIndex);this.error("Conditional expression "+i+" requires all 3 expressions"),r=new To(this.span(e))}return new Ao(this.span(e),t,n,r)}return t},e.prototype.parseLogicalOr=function(){for(var e=this.parseLogicalAnd();this.optionalOperator("||");){var t=this.parseLogicalAnd();e=new Bo(this.span(e.span.start),"||",e,t)}return e},e.prototype.parseLogicalAnd=function(){for(var e=this.parseEquality();this.optionalOperator("&&");){var t=this.parseEquality();e=new Bo(this.span(e.span.start),"&&",e,t)}return e},e.prototype.parseEquality=function(){for(var e=this.parseRelational();this.next.type==$u.Operator;){var t=this.next.strValue;switch(t){case"==":case"===":case"!=":case"!==":this.advance();var n=this.parseRelational();e=new Bo(this.span(e.span.start),t,e,n);continue}break}return e},e.prototype.parseRelational=function(){for(var e=this.parseAdditive();this.next.type==$u.Operator;){var t=this.next.strValue;switch(t){case"<":case">":case"<=":case">=":this.advance();var n=this.parseAdditive();e=new Bo(this.span(e.span.start),t,e,n);continue}break}return e},e.prototype.parseAdditive=function(){for(var e=this.parseMultiplicative();this.next.type==$u.Operator;){var t=this.next.strValue;switch(t){case"+":case"-":this.advance();var n=this.parseMultiplicative();e=new Bo(this.span(e.span.start),t,e,n);continue}break}return e},e.prototype.parseMultiplicative=function(){for(var e=this.parsePrefix();this.next.type==$u.Operator;){var t=this.next.strValue;switch(t){case"*":case"%":case"/":this.advance();var n=this.parsePrefix();e=new Bo(this.span(e.span.start),t,e,n);continue}break}return e},e.prototype.parsePrefix=function(){if(this.next.type==$u.Operator){var e=this.inputIndex,t=this.next.strValue,n=void 0;switch(t){case"+":return this.advance(),n=this.parsePrefix(),new Bo(this.span(e),"-",n,new Lo(new Eo(e,e),0));case"-":return this.advance(),n=this.parsePrefix(),new Bo(this.span(e),t,new Lo(new Eo(e,e),0),n);case"!":return this.advance(),n=this.parsePrefix(),new Ho(this.span(e),n)}}return this.parseCallChain()},e.prototype.parseCallChain=function(){for(var e=this.parsePrimary();;)if(this.optionalCharacter(46))e=this.parseAccessMemberOrMethodCall(e,!1);else if(this.optionalOperator("?."))e=this.parseAccessMemberOrMethodCall(e,!0);else if(this.optionalCharacter(91)){this.rbracketsExpected++;var t=this.parsePipe();if(this.rbracketsExpected--,this.expectCharacter(93),this.optionalOperator("=")){var n=this.parseConditional();e=new Ro(this.span(e.span.start),e,t,n)}else e=new Oo(this.span(e.span.start),e,t)}else if(this.optionalCharacter(40)){this.rparensExpected++;var r=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(41),e=new zo(this.span(e.span.start),e,r)}else{if(!this.optionalOperator("!"))return e;e=new Uo(this.span(e.span.start),e)}},e.prototype.parsePrimary=function(){var e=this.inputIndex;if(this.optionalCharacter(40)){this.rparensExpected++;var t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),t}if(this.next.isKeywordNull())return this.advance(),new Lo(this.span(e),null);if(this.next.isKeywordUndefined())return this.advance(),new Lo(this.span(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new Lo(this.span(e),!0);if(this.next.isKeywordFalse())return this.advance(),new Lo(this.span(e),!1);if(this.next.isKeywordThis())return this.advance(),new No(this.span(e));if(this.optionalCharacter(91)){this.rbracketsExpected++;var n=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new Fo(this.span(e),n)}if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new No(this.span(e)),!1);if(this.next.isNumber()){var r=this.next.toNumber();return this.advance(),new Lo(this.span(e),r)}if(this.next.isString()){var i=this.next.toString();return this.advance(),new Lo(this.span(e),i)}return this.index>=this.tokens.length?(this.error("Unexpected end of expression: "+this.input),new To(this.span(e))):(this.error("Unexpected token "+this.next),new To(this.span(e)))},e.prototype.parseExpressionList=function(e){var t=[];if(!this.next.isCharacter(e))do{t.push(this.parsePipe())}while(this.optionalCharacter(44));return t},e.prototype.parseLiteralMap=function(){var e=[],t=[],n=this.inputIndex;if(this.expectCharacter(123),!this.optionalCharacter(125)){this.rbracesExpected++;do{var r=this.next.isString(),i=this.expectIdentifierOrKeywordOrString();e.push({key:i,quoted:r}),this.expectCharacter(58),t.push(this.parsePipe())}while(this.optionalCharacter(44));this.rbracesExpected--,this.expectCharacter(125)}return new jo(this.span(n),e,t)},e.prototype.parseAccessMemberOrMethodCall=function(e,t){void 0===t&&(t=!1);var n=e.span.start,r=this.expectIdentifierOrKeyword();if(this.optionalCharacter(40)){this.rparensExpected++;var i=this.parseCallArguments();this.expectCharacter(41),this.rparensExpected--;var o=this.span(n);return t?new Ko(o,e,r,i):new qo(o,e,r,i)}if(t)return this.optionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new To(this.span(n))):new Mo(this.span(n),e,r);if(this.optionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new To(this.span(n));var s=this.parseConditional();return new Io(this.span(n),e,r,s)}return new Po(this.span(n),e,r)},e.prototype.parseCallArguments=function(){if(this.next.isCharacter(41))return[];var e=[];do{e.push(this.parsePipe())}while(this.optionalCharacter(44));return e},e.prototype.expectTemplateBindingKey=function(){var e="",t=!1;do{e+=this.expectIdentifierOrKeywordOrString(),(t=this.optionalOperator("-"))&&(e+="-")}while(t);return e.toString()},e.prototype.parseTemplateBindings=function(e){var t=!0,n=[];do{var r=this.inputIndex,i=void 0,o=void 0,s=!1;t?(i=o=e,t=!1):((s=this.peekKeywordLet())&&this.advance(),i=this.expectTemplateBindingKey(),o=s?i:e+i[0].toUpperCase()+i.substring(1),this.optionalCharacter(58));var a=null,u=null;if(s)a=this.optionalOperator("=")?this.expectTemplateBindingKey():"$implicit";else if(this.peekKeywordAs())this.advance(),a=i,o=this.expectTemplateBindingKey(),s=!0;else if(this.next!==sl&&!this.peekKeywordLet()){var l=this.inputIndex,c=this.parsePipe(),p=this.input.substring(l-this.offset,this.inputIndex-this.offset);u=new Wo(c,p,this.location,this.errors)}if(n.push(new Qo(this.span(r),o,s,a,u)),this.peekKeywordAs()&&!s){var h=this.inputIndex;this.advance();var f=this.expectTemplateBindingKey();n.push(new Qo(this.span(h),f,!0,o,null))}this.optionalCharacter(In)||this.optionalCharacter(44)}while(this.index<this.tokens.length);return new fl(n,[],this.errors)},e.prototype.error=function(e,t){void 0===t&&(t=null),this.errors.push(new xo(e,this.input,this.locationText(t),this.location)),this.skip()},e.prototype.locationText=function(e){return void 0===e&&(e=null),null==e&&(e=this.index),e<this.tokens.length?"at column "+(this.tokens[e].index+1)+" in":"at the end of the expression"},e.prototype.skip=function(){for(var e=this.next;this.index<this.tokens.length&&!e.isCharacter(In)&&(this.rparensExpected<=0||!e.isCharacter(41))&&(this.rbracesExpected<=0||!e.isCharacter(125))&&(this.rbracketsExpected<=0||!e.isCharacter(93));)this.next.isError()&&this.errors.push(new xo(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),e=this.next},e}(),gl=function(){function e(){this.errors=[]}return e.check=function(t){var n=new e;return t.visit(n),n.errors},e.prototype.visitImplicitReceiver=function(e,t){},e.prototype.visitInterpolation=function(e,t){},e.prototype.visitLiteralPrimitive=function(e,t){},e.prototype.visitPropertyRead=function(e,t){},e.prototype.visitPropertyWrite=function(e,t){},e.prototype.visitSafePropertyRead=function(e,t){},e.prototype.visitMethodCall=function(e,t){},e.prototype.visitSafeMethodCall=function(e,t){},e.prototype.visitFunctionCall=function(e,t){},e.prototype.visitLiteralArray=function(e,t){this.visitAll(e.expressions)},e.prototype.visitLiteralMap=function(e,t){this.visitAll(e.values)},e.prototype.visitBinary=function(e,t){},e.prototype.visitPrefixNot=function(e,t){},e.prototype.visitNonNullAssert=function(e,t){},e.prototype.visitConditional=function(e,t){},e.prototype.visitPipe=function(e,t){this.errors.push("pipes")},e.prototype.visitKeyedRead=function(e,t){},e.prototype.visitKeyedWrite=function(e,t){},e.prototype.visitAll=function(e){var t=this;return e.map(function(e){return e.visit(t)})},e.prototype.visitChain=function(e,t){},e.prototype.visitQuote=function(e,t){},e}();function _l(){return vl||(vl={},bl(H.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),bl(H.STYLE,["*|style"]),bl(H.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","img|srcset","input|src","ins|cite","q|cite","source|src","source|srcset","track|src","video|poster","video|src"]),bl(H.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),vl}function bl(e,t){var n,r;try{for(var i=p(t),o=i.next();!o.done;o=i.next())vl[o.value.toLowerCase()]=e}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}
|
|
293
293
|
/**
|
|
294
294
|
* @license
|
|
295
295
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -310,21 +310,21 @@ var xo=function xo(e,t,n,r){this.input=t,this.errLocation=n,this.ctxLocation=r,t
|
|
|
310
310
|
*
|
|
311
311
|
* Use of this source code is governed by an MIT-style license that can be
|
|
312
312
|
* found in the LICENSE file at https://angular.io/license
|
|
313
|
-
*/(e);return null!==o&&this.styles.push(o),null}if(i.type===vu.STYLESHEET&&au(i.hrefAttr))return this.styleUrls.push(i.hrefAttr),null;var a=y(e.name),u=[],l=[],c=[],h=[],d=[],v={},m=[],g=[],_=!1;try{for(var b=p(e.attrs),w=b.next();!w.done;w=b.next()){var x=w.value,E=!1,S=Ol(x.name),C=!1;if(x.i18n&&(v[x.name]=x.i18n),S.startsWith("*")){_&&this.reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",x.sourceSpan),C=!0,_=!0;var T=x.value,N=S.substring("*".length),k=[];this.bindingParser.parseInlineTemplateBinding(N,T,x.sourceSpan,[],m,k),g.push.apply(g,f(k.map(function(e){return new
|
|
313
|
+
*/(e);return null!==o&&this.styles.push(o),null}if(i.type===vu.STYLESHEET&&au(i.hrefAttr))return this.styleUrls.push(i.hrefAttr),null;var a=y(e.name),u=[],l=[],c=[],h=[],d=[],v={},m=[],g=[],_=!1;try{for(var b=p(e.attrs),w=b.next();!w.done;w=b.next()){var x=w.value,E=!1,S=Ol(x.name),C=!1;if(x.i18n&&(v[x.name]=x.i18n),S.startsWith("*")){_&&this.reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",x.sourceSpan),C=!0,_=!0;var T=x.value,N=S.substring("*".length),k=[];this.bindingParser.parseInlineTemplateBinding(N,T,x.sourceSpan,[],m,k),g.push.apply(g,f(k.map(function(e){return new fr(e.name,e.value,e.sourceSpan)})))}else E=this.parseAttribute(a,x,[],u,l,c,h);E||C||d.push(this.visitAttribute(x))}}catch(e){t={error:e}}finally{try{w&&!w.done&&(n=b.return)&&n.call(b)}finally{if(t)throw t.error}}var A,P=Js(i.nonBindable?Ml:this,e.children);if(i.type===vu.NG_CONTENT){e.children&&!e.children.every(function(e){return function t(e){return e instanceof Qs&&0==e.value.trim().length}(e)||function n(e){return e instanceof Zs}(e)})&&this.reportError("<ng-content> element cannot have content.",e.sourceSpan);var I=i.selectAttr,M=e.attrs.map(function(e){return r.visitAttribute(e)});A=new hr(I,M,e.sourceSpan,e.i18n)}else a?(M=this.extractAttributes(e.name,u,v),A=new pr(e.name,d,M.bound,l,[],P,h,c,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)):(M=this.extractAttributes(e.name,u,v),A=new cr(e.name,d,M.bound,l,P,h,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n));if(_){M=this.extractAttributes("ng-template",m,v);var O=[];M.literal.forEach(function(e){return O.push(e)}),M.bound.forEach(function(e){return O.push(e)});var R=A instanceof cr?{attributes:A.attributes,inputs:A.inputs,outputs:A.outputs}:{attributes:[],inputs:[],outputs:[]};A=new pr(A.name,R.attributes,R.inputs,R.outputs,O,[A],[],g,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}return A},e.prototype.visitAttribute=function(e){return new ar(e.name,e.value,e.sourceSpan,e.valueSpan,e.i18n)},e.prototype.visitText=function(e){return this._visitTextWithInterpolation(e.value,e.sourceSpan,e.i18n)},e.prototype.visitExpansion=function(e){var t=this,n=e.i18n;if(!n)return null;var r={},i={};return Object.keys(n.placeholders).forEach(function(o){var s=n.placeholders[o];if(o.startsWith("VAR_")){var a=t.bindingParser.interpolationConfig;r[o]=t._visitTextWithInterpolation(""+a.start+s+a.end,e.sourceSpan)}else i[o]=t._visitTextWithInterpolation(s,e.sourceSpan)}),new vr(r,i,e.sourceSpan,n)},e.prototype.visitExpansionCase=function(e){return null},e.prototype.visitComment=function(e){return null},e.prototype.extractAttributes=function(e,t,n){var r=this,i=[],o=[];return t.forEach(function(t){var s=n[t.name];if(t.isLiteral)o.push(new ar(t.name,t.expression.source||"",t.sourceSpan,void 0,s));else{var a=r.bindingParser.createBoundElementProperty(e,t,!0,!1);i.push(ur.fromBoundElementProperty(a,s))}}),{bound:i,literal:o}},e.prototype.parseAttribute=function(e,t,n,r,i,o,s){var a=Ol(t.name),u=t.value,l=t.sourceSpan,c=a.match(Pl),p=!1;if(c){if(p=!0,null!=c[1])this.bindingParser.parsePropertyBinding(c[7],u,!1,l,n,r);else if(c[2])e?this.parseVariable(c[7],u,l,o):this.reportError('"let-" is only supported on ng-template elements.',l);else if(c[3])this.parseReference(c[7],u,l,s);else if(c[4])this.bindingParser.parseEvent(c[7],u,l,t.valueSpan||l,n,h=[]),Rl(h,i);else if(c[5])this.bindingParser.parsePropertyBinding(c[7],u,!1,l,n,r),this.parseAssignmentEvent(c[7],u,l,t.valueSpan,n,i);else if(c[6])this.bindingParser.parseLiteralAttr(a,u,l,n,r);else if(c[8])this.bindingParser.parsePropertyBinding(c[8],u,!1,l,n,r),this.parseAssignmentEvent(c[8],u,l,t.valueSpan,n,i);else if(c[9])this.bindingParser.parsePropertyBinding(c[9],u,!1,l,n,r);else if(c[10]){var h;this.bindingParser.parseEvent(c[10],u,l,t.valueSpan||l,n,h=[]),Rl(h,i)}}else p=this.bindingParser.parsePropertyInterpolation(a,u,l,n,r);return p},e.prototype._visitTextWithInterpolation=function(e,t,n){var r=Aa(e),i=this.bindingParser.parseInterpolation(r,t);return i?new sr(i,t,n):new or(r,t)},e.prototype.parseVariable=function(e,t,n,r){e.indexOf("-")>-1&&this.reportError('"-" is not allowed in variable names',n),r.push(new fr(e,t,n))},e.prototype.parseReference=function(e,t,n,r){e.indexOf("-")>-1&&this.reportError('"-" is not allowed in reference names',n),r.push(new dr(e,t,n))},e.prototype.parseAssignmentEvent=function(e,t,n,r,i,o){var s=[];this.bindingParser.parseEvent(e+"Change",t+"=$event",n,r||n,i,s),Rl(s,o)},e.prototype.reportError=function(e,t,n){void 0===n&&(n=er.ERROR),this.errors.push(new ir(t,e,n))},e}(),Ml=new(function(){function e(){}return e.prototype.visitElement=function(e){var t=Cu(e);if(t.type===vu.SCRIPT||t.type===vu.STYLE||t.type===vu.STYLESHEET)return null;var n=Js(this,e.children,null);return new cr(e.name,Js(this,e.attrs),[],[],n,[],e.sourceSpan,e.startSourceSpan,e.endSourceSpan)},e.prototype.visitComment=function(e){return null},e.prototype.visitAttribute=function(e){return new ar(e.name,e.value,e.sourceSpan,void 0,e.i18n)},e.prototype.visitText=function(e){return new or(e.value,e.sourceSpan)},e.prototype.visitExpansion=function(e){return null},e.prototype.visitExpansionCase=function(e){return null},e}());
|
|
314
314
|
/**
|
|
315
315
|
* @license
|
|
316
316
|
* Copyright Google Inc. All Rights Reserved.
|
|
317
317
|
*
|
|
318
318
|
* Use of this source code is governed by an MIT-style license that can be
|
|
319
319
|
* found in the LICENSE file at https://angular.io/license
|
|
320
|
-
*/function Ol(e){return/^data-/i.test(e)?e.substring(5):e}function Rl(e,t){t.push.apply(t,f(e.map(function(e){return
|
|
320
|
+
*/function Ol(e){return/^data-/i.test(e)?e.substring(5):e}function Rl(e,t){t.push.apply(t,f(e.map(function(e){return lr.fromParsedEvent(e)})))}!function(e){e[e.ELEMENT=0]="ELEMENT",e[e.TEMPLATE=1]="TEMPLATE",e[e.PROJECTION=2]="PROJECTION"}(wl||(wl={}));var Dl=function(){function e(e,t,n,r,i,o){void 0===n&&(n=0),void 0===r&&(r=null),this.index=e,this.ref=t,this.level=n,this.templateIndex=r,this.meta=i,this.registry=o,this.bindings=new Set,this.placeholders=new Map,this.isEmitted=!1,this._unresolvedCtxCount=0,this._registry=o||function s(){return{getUniqueId:wi(),icus:new Map}}(),this.id=this._registry.getUniqueId()}return e.prototype.appendTag=function(e,t,n,r){t.isVoid&&r||Ei(this.placeholders,t.isVoid||!r?t.startName:t.closeName,{type:e,index:n,ctx:this.id,isVoid:t.isVoid,closed:r})},Object.defineProperty(e.prototype,"icus",{get:function(){return this._registry.icus},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isRoot",{get:function(){return 0===this.level},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isResolved",{get:function(){return 0===this._unresolvedCtxCount},enumerable:!0,configurable:!0}),e.prototype.getSerializedPlaceholders=function(){var e=new Map;return this.placeholders.forEach(function(t,n){return e.set(n,t.map(Vl))}),e},e.prototype.appendBinding=function(e){this.bindings.add(e)},e.prototype.appendIcu=function(e,t){Ei(this._registry.icus,e,t)},e.prototype.appendBoundText=function(e){var t=this;Si(e,this.bindings.size,this.id).forEach(function(e,n){return Ei.apply(void 0,f([t.placeholders,n],e))})},e.prototype.appendTemplate=function(e,t){this.appendTag(wl.TEMPLATE,e,t,!1),this.appendTag(wl.TEMPLATE,e,t,!0),this._unresolvedCtxCount++},e.prototype.appendElement=function(e,t,n){this.appendTag(wl.ELEMENT,e,t,n)},e.prototype.appendProjection=function(e,t){this.appendTag(wl.PROJECTION,e,t,!1),this.appendTag(wl.PROJECTION,e,t,!0)},e.prototype.forkChildContext=function(t,n,r){return new e(t,this.ref,this.level+1,n,r,this._registry)},e.prototype.reconcileChildContext=function(e){var t=this;["start","close"].forEach(function(n){var r=(t.placeholders.get(e.meta[n+"Name"])||[]).find(jl(t.id,e.templateIndex));r&&(r.ctx=e.id)}),e.placeholders.forEach(function(n,r){var i=t.placeholders.get(r);if(i){var o=function s(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}(i,jl(e.id,e.templateIndex));if(o>=0){var a=r.startsWith("CLOSE");r.endsWith("NG-TEMPLATE")?i.splice.apply(i,f([o+(a?0:1),0],n)):(n[a?n.length-1:0].tmpl=i[o],i.splice.apply(i,f([o,1],n)))}else i.push.apply(i,f(n));t.placeholders.set(r,i)}else t.placeholders.set(r,n)}),this._unresolvedCtxCount--},e}();function Ll(e,t,n,r){return bi((r?"/":"")+e+t,n)}function Fl(e,t,n){var r=t.index,i=t.ctx;return t.isVoid?Ll(e,r,i)+Ll(e,r,i,!0):Ll(e,r,i,n)}function jl(e,t){return function(n){return"object"==typeof n&&n.type===wl.TEMPLATE&&n.index===t&&n.ctx===e}}function Vl(e){var t=function(e,t){return Fl("#",e,t)},n=function(e,t){return Fl("*",e,t)};switch(e.type){case wl.ELEMENT:return e.closed?t(e,!0)+(e.tmpl?n(e.tmpl,!0):""):e.tmpl?n(e.tmpl)+t(e)+(e.isVoid?n(e.tmpl,!0):""):t(e);case wl.TEMPLATE:return n(e,e.closed);case wl.PROJECTION:return Fl("!",e,e.closed);default:return e}}
|
|
321
321
|
/**
|
|
322
322
|
* @license
|
|
323
323
|
* Copyright Google Inc. All Rights Reserved.
|
|
324
324
|
*
|
|
325
325
|
* Use of this source code is governed by an MIT-style license that can be
|
|
326
326
|
* found in the LICENSE file at https://angular.io/license
|
|
327
|
-
*/var Bl={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"},Hl=function(){function e(){this._placeHolderNameCounts={},this._signatureToName={}}return e.prototype.getStartTagPlaceholderName=function(e,t,n){var r=this._hashTag(e,t,n);if(this._signatureToName[r])return this._signatureToName[r];var i=e.toUpperCase(),o=Bl[i]||"TAG_"+i,s=this._generateUniqueName(n?o:"START_"+o);return this._signatureToName[r]=s,s},e.prototype.getCloseTagPlaceholderName=function(e){var t=this._hashClosingTag(e);if(this._signatureToName[t])return this._signatureToName[t];var n=e.toUpperCase(),r=this._generateUniqueName("CLOSE_"+(Bl[n]||"TAG_"+n));return this._signatureToName[t]=r,r},e.prototype.getPlaceholderName=function(e,t){var n=e.toUpperCase(),r="PH: "+n+"="+t;if(this._signatureToName[r])return this._signatureToName[r];var i=this._generateUniqueName(n);return this._signatureToName[r]=i,i},e.prototype.getUniquePlaceholder=function(e){return this._generateUniqueName(e.toUpperCase())},e.prototype._hashTag=function(e,t,n){return"<"+e+Object.keys(t).sort().map(function(e){return" "+e+"="+t[e]}).join("")+(n?"/>":"></"+e+">")},e.prototype._hashClosingTag=function(e){return this._hashTag("/"+e,{},!1)},e.prototype._generateUniqueName=function(e){if(!this._placeHolderNameCounts.hasOwnProperty(e))return this._placeHolderNameCounts[e]=1,e;var t=this._placeHolderNameCounts[e];return this._placeHolderNameCounts[e]=t+1,e+"_"+t},e}(),Ul=new ml(new nl);function ql(e){var t=new Kl(Ul,e);return function(e,n,r,i,o){return t.toI18nMessage(e,n,r,i,o)}}var Kl=function(){function e(e,t){this._expressionParser=e,this._interpolationConfig=t}return e.prototype.toI18nMessage=function(e,t,n,r,i){this._isIcu=1==e.length&&e[0]instanceof $s,this._icuDepth=0,this._placeholderRegistry=new Hl,this._placeholderToContent={},this._placeholderToMessage={},this._visitNodeFn=i;var o=Js(this,e,{});return new
|
|
327
|
+
*/var Bl={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"},Hl=function(){function e(){this._placeHolderNameCounts={},this._signatureToName={}}return e.prototype.getStartTagPlaceholderName=function(e,t,n){var r=this._hashTag(e,t,n);if(this._signatureToName[r])return this._signatureToName[r];var i=e.toUpperCase(),o=Bl[i]||"TAG_"+i,s=this._generateUniqueName(n?o:"START_"+o);return this._signatureToName[r]=s,s},e.prototype.getCloseTagPlaceholderName=function(e){var t=this._hashClosingTag(e);if(this._signatureToName[t])return this._signatureToName[t];var n=e.toUpperCase(),r=this._generateUniqueName("CLOSE_"+(Bl[n]||"TAG_"+n));return this._signatureToName[t]=r,r},e.prototype.getPlaceholderName=function(e,t){var n=e.toUpperCase(),r="PH: "+n+"="+t;if(this._signatureToName[r])return this._signatureToName[r];var i=this._generateUniqueName(n);return this._signatureToName[r]=i,i},e.prototype.getUniquePlaceholder=function(e){return this._generateUniqueName(e.toUpperCase())},e.prototype._hashTag=function(e,t,n){return"<"+e+Object.keys(t).sort().map(function(e){return" "+e+"="+t[e]}).join("")+(n?"/>":"></"+e+">")},e.prototype._hashClosingTag=function(e){return this._hashTag("/"+e,{},!1)},e.prototype._generateUniqueName=function(e){if(!this._placeHolderNameCounts.hasOwnProperty(e))return this._placeHolderNameCounts[e]=1,e;var t=this._placeHolderNameCounts[e];return this._placeHolderNameCounts[e]=t+1,e+"_"+t},e}(),Ul=new ml(new nl);function ql(e){var t=new Kl(Ul,e);return function(e,n,r,i,o){return t.toI18nMessage(e,n,r,i,o)}}var Kl=function(){function e(e,t){this._expressionParser=e,this._interpolationConfig=t}return e.prototype.toI18nMessage=function(e,t,n,r,i){this._isIcu=1==e.length&&e[0]instanceof $s,this._icuDepth=0,this._placeholderRegistry=new Hl,this._placeholderToContent={},this._placeholderToMessage={},this._visitNodeFn=i;var o=Js(this,e,{});return new yr(o,this._placeholderToContent,this._placeholderToMessage,t,n,r)},e.prototype._visitNode=function(e,t){return this._visitNodeFn&&this._visitNodeFn(e,t),t},e.prototype.visitElement=function(e,t){var n=Js(this,e.children),r={};e.attrs.forEach(function(e){r[e.name]=e.value});var i=C(e.name).isVoid,o=this._placeholderRegistry.getStartTagPlaceholderName(e.name,r,i);this._placeholderToContent[o]=e.sourceSpan.toString();var s="";i||(s=this._placeholderRegistry.getCloseTagPlaceholderName(e.name),this._placeholderToContent[s]="</"+e.name+">");var a=new wr(e.name,r,o,s,n,i,e.sourceSpan);return this._visitNode(e,a)},e.prototype.visitAttribute=function(e,t){var n=this._visitTextWithInterpolation(e.value,e.sourceSpan);return this._visitNode(e,n)},e.prototype.visitText=function(e,t){var n=this._visitTextWithInterpolation(e.value,e.sourceSpan);return this._visitNode(e,n)},e.prototype.visitComment=function(e,t){return null},e.prototype.visitExpansion=function(t,n){var r=this;this._icuDepth++;var i={},o=new br(t.switchValue,t.type,i,t.sourceSpan);if(t.cases.forEach(function(e){i[e.value]=new _r(e.expression.map(function(e){return e.visit(r,{})}),e.expSourceSpan)}),this._icuDepth--,this._isIcu||this._icuDepth>0){var s=this._placeholderRegistry.getUniquePlaceholder("VAR_"+t.type);return o.expressionPlaceholder=s,this._placeholderToContent[s]=t.switchValue,this._visitNode(t,o)}var a=this._placeholderRegistry.getPlaceholderName("ICU",t.sourceSpan.toString()),u=new e(this._expressionParser,this._interpolationConfig);this._placeholderToMessage[a]=u.toI18nMessage([t],"","","");var l=new Er(o,a,t.sourceSpan);return this._visitNode(t,l)},e.prototype.visitExpansionCase=function(e,t){throw new Error("Unreachable code")},e.prototype._visitTextWithInterpolation=function(e,t){var n=this._expressionParser.splitInterpolation(e,t.start.toString(),this._interpolationConfig);if(!n)return new gr(e,t);for(var r=[],i=new _r(r,t),o=this._interpolationConfig,s=o.start,a=o.end,u=0;u<n.strings.length-1;u++){var l=n.expressions[u],c=l.split(zl)[2]||"INTERPOLATION",p=this._placeholderRegistry.getPlaceholderName(c,l);n.strings[u].length&&r.push(new gr(n.strings[u],t)),r.push(new xr(l,p,t)),this._placeholderToContent[p]=s+l+a}var h=n.strings.length-1;return n.strings[h].length&&r.push(new gr(n.strings[h],t)),i},e}(),zl=/\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*("|')([\s\S]*?)\1[\s\S]*\)/g;
|
|
328
328
|
/**
|
|
329
329
|
* @license
|
|
330
330
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -332,35 +332,35 @@ var xo=function xo(e,t,n,r){this.input=t,this.errLocation=n,this.ctxLocation=r,t
|
|
|
332
332
|
* Use of this source code is governed by an MIT-style license that can be
|
|
333
333
|
* found in the LICENSE file at https://angular.io/license
|
|
334
334
|
*/
|
|
335
|
-
function Wl(e,t){e.i18n=t}var Ql=function(){function e(e,t){void 0===e&&(e=
|
|
335
|
+
function Wl(e,t){e.i18n=t}var Ql=function(){function e(e,t){void 0===e&&(e=eo),void 0===t&&(t=!1),this.interpolationConfig=e,this.keepI18nAttrs=t,this._createI18nMessage=ql(e)}return e.prototype._generateI18nMessage=function(e,t,n){void 0===t&&(t="");var r="string"==typeof t?function i(e){var t,n,r,i,o;if(e){var s=e.indexOf("@@"),a=e.indexOf("|"),u=void 0;u=(t=h(s>-1?[e.slice(0,s),e.slice(s+2)]:[e,""],2))[0],r=t[1],i=(n=h(a>-1?[u.slice(0,a),u.slice(a+1)]:["",u],2))[0],o=n[1]}return{id:r,meaning:i,description:o}}(t):gi(t),o=this._createI18nMessage(e,r.meaning||"",r.description||"",r.id||"",n);return o.id||(o.id="string"!=typeof t&&t.id||Nr(o)),o},e.prototype.visitElement=function(e,t){var n,r,i,o;if(function s(e){return e.attrs.some(function(e){return vi(e.name)})}(e)){var a=[],u={};try{for(var l=p(e.attrs),c=l.next();!c.done;c=l.next())if((v=c.value).name===pi){var h=this._generateI18nMessage(e.children,e.i18n||v.value,Wl);h.nodes.length&&(e.i18n=h)}else v.name.startsWith(hi)?u[v.name.slice(hi.length)]=v.value:a.push(v)}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}if(Object.keys(u).length)try{for(var f=p(a),d=f.next();!d.done;d=f.next()){var v,m=u[(v=d.value).name];void 0!==m&&v.value&&(v.i18n=this._generateI18nMessage([v],v.i18n||m))}}catch(e){i={error:e}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}this.keepI18nAttrs||(e.attrs=a)}return Js(this,e.children),e},e.prototype.visitExpansion=function(e,t){var n,r=e.i18n;if(r instanceof Er){var i=r.name;_i(n=this._generateI18nMessage([e],r)).name=i}else n=this._generateI18nMessage([e],r);return e.i18n=n,e},e.prototype.visitText=function(e,t){return e},e.prototype.visitAttribute=function(e,t){return e},e.prototype.visitComment=function(e,t){return e},e.prototype.visitExpansionCase=function(e,t){return e},e}(),$l=function(e){return"{$"+Ci(e)+"}"},Gl=new(function(){function e(){}return e.prototype.visitText=function(e,t){return e.value},e.prototype.visitContainer=function(e,t){var n=this;return e.children.map(function(e){return e.visit(n)}).join("")},e.prototype.visitIcu=function(e,t){var n=this,r=Object.keys(e.cases).map(function(t){return t+" {"+e.cases[t].visit(n)+"}"});return"{"+e.expressionPlaceholder+", "+e.type+", "+r.join(" ")+"}"},e.prototype.visitTagPlaceholder=function(e,t){var n=this;return e.isVoid?$l(e.startName):""+$l(e.startName)+e.children.map(function(e){return e.visit(n)}).join("")+$l(e.closeName)},e.prototype.visitPlaceholder=function(e,t){return $l(e.name)},e.prototype.visitIcuPlaceholder=function(e,t){return $l(e.name)},e}()),Xl=new Map([["window",yn.resolveWindow],["document",yn.resolveDocument],["body",yn.resolveBody]]),Yl=[" ","\n","\r","\t"];
|
|
336
336
|
/**
|
|
337
337
|
* @license
|
|
338
338
|
* Copyright Google Inc. All Rights Reserved.
|
|
339
339
|
*
|
|
340
340
|
* Use of this source code is governed by an MIT-style license that can be
|
|
341
341
|
* found in the LICENSE file at https://angular.io/license
|
|
342
|
-
*/function Zl(e,t){return mt(ct(
|
|
342
|
+
*/function Zl(e,t){return mt(ct(Pi).bitwiseAnd(yt(e),null,!1),t)}function Jl(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null);var r=e.type,i=e.name,o=e.target,s=e.phase,a=e.handler;if(o&&!Xl.has(o))throw new Error("Unexpected global target '"+o+"' defined for '"+i+"' event.\n Supported list of global targets: "+Array.from(Xl.keys())+".");var u=null===n||0===n.bindingLevel?ct(Ai):n.getOrCreateSharedContextVar(0),l=function c(e,t,n,r,i,o){e||(e=new ys);var s=function a(e,t){return function n(e,t){var n=new vs(e);return t.visit(n)}(e,t)}({createLiteralArrayConverter:function(e){return function(e){return ft(e)}},createLiteralMapConverter:function(e){return function(t){return dt(e.map(function(e,n){return{key:e.key,value:t[n],quoted:e.quoted}}))}},createPipeConverter:function(e){throw new Error("Illegal State: Actions are not allowed to contain pipes. Pipe: "+e)}},n),u=new ms(e,t,r,i,o),l=[];!function e(t,n){Array.isArray(t)?t.forEach(function(t){return e(t,n)}):n.push(t)}(s.visit(u,ns.Statement),l),function c(e,t,n){for(var r=e-1;r>=0;r--)n.unshift(hs(t,r))}(u.temporaryCount,r,l),u.usesImplicitReceiver&&e.notifyImplicitReceiverUse();var p=l.length-1,h=null;if(p>=0){var f=function d(e){return e instanceof Ze?e.expr:e instanceof Je?e.value:null}(l[p]);f&&(h=function v(e){return ct("pd_"+e)}(r),l[p]=h.set(f.cast(he).notIdentical(yt(!1))).toDeclStmt(null,[ke.Final]))}return new as(l,h)}(n,u,a,"b",function(){return Nt("Unexpected interpolation")},e.handlerSpan),p=[];n&&(p.push.apply(p,f(n.restoreViewStatement())),p.push.apply(p,f(n.variableDeclarations()))),p.push.apply(p,f(l.render3Stmts));var h=1===r?function d(e,t){return""+Qi+e+"."+t}(i,s):i,v=t&&en(t),m=vt([new je("$event",he)],p,fe,null,v),y=[yt(h),m];return o&&y.push(yt(!1),pt(Xl.get(o))),y}var ec=function(){function e(e,t,n,r,i,o,s,a,u,l,c,p,h,f){var d=this;void 0===n&&(n=0),this.constantPool=e,this.level=n,this.contextName=r,this.i18nContext=i,this.templateIndex=o,this.templateName=s,this.directiveMatcher=a,this.directives=u,this.pipeTypeByName=l,this.pipes=c,this._namespace=p,this.relativeContextFilePath=h,this.i18nUseExternalIds=f,this._dataIndex=0,this._bindingContext=0,this._prefixCode=[],this._creationCodeFns=[],this._updateCodeFns=[],this._lastNodeIndexWithFlush=-1,this._tempVariables=[],this._nestedTemplateFns=[],this._unsupported=Mi,this.i18n=null,this._pureFunctionSlots=0,this._bindingSlots=0,this._ngContentReservedSlots=[],this._ngContentSelectorsOffset=0,this._implicitReceiverExpr=null,this.visitReference=Oi,this.visitVariable=Oi,this.visitTextAttribute=Oi,this.visitBoundAttribute=Oi,this.visitBoundEvent=Oi,this._bindingScope=t.nestedScope(n),this.fileBasedI18nSuffix=h.replace(/[^A-Za-z0-9]/g,"_")+"_",this._valueConverter=new tc(e,function(){return d.allocateDataSlot()},function(e){return d.allocatePureFunctionSlots(e)},function(e,t,n,r){var i=l.get(e);i&&d.pipes.add(i),d._bindingScope.set(d.level,t,r),d.creationInstruction(null,yn.pipe,[yt(n),yt(e)])})}return e.prototype.registerContextVariables=function(e){var t=this._bindingScope.freshReferenceName(),n=this.level,r=ct(e.name+t);this._bindingScope.set(n,e.name,r,1,function(t,i){var o;return o=t.bindingLevel===n?ct(Ai):t.getSharedContextName(n)||oc(i),[r.set(o.prop(e.value||"$implicit")).toConstDecl()]})},e.prototype.buildTemplateFunction=function(e,t,n,r){var i=this;void 0===n&&(n=0),this._ngContentSelectorsOffset=n,this._namespace!==yn.namespaceHTML&&this.creationInstruction(null,this._namespace),t.forEach(function(e){return i.registerContextVariables(e)});var o=this.i18nContext||mi(r)&&!yi(r)&&!(function s(e){return 1===e.length&&e[0]instanceof cr}(e)&&e[0].i18n===r),a=vc(e);if(o&&this.i18nStart(null,r,a),mr(this,e),this._pureFunctionSlots+=this._bindingSlots,this._valueConverter.updatePipeSlotOffsets(this._bindingSlots),this._nestedTemplateFns.forEach(function(e){return e()}),0===this.level&&this._ngContentReservedSlots.length){var u=[];if(this._ngContentReservedSlots.length>1||"*"!==this._ngContentReservedSlots[0]){var l=this._ngContentReservedSlots.map(function(e){return"*"!==e?oe(e):e});u.push(this.constantPool.getConstLiteral(Ri(l),!0))}this.creationInstruction(null,yn.projectionDef,u,!0)}o&&this.i18nEnd(null,a);var c=this._creationCodeFns.map(function(e){return e()}),p=this._updateCodeFns.map(function(e){return e()}),h=this._bindingScope.viewSnapshotStatements(),d=this._bindingScope.variableDeclarations().concat(this._tempVariables),v=c.length>0?[Zl(1,h.concat(c))]:[],m=p.length>0?[Zl(2,d.concat(p))]:[];return vt([new je(Pi,ve),new je(Ai,null)],f(this._prefixCode,v,m),fe,null,this.templateName)},e.prototype.getLocal=function(e){return this._bindingScope.get(e)},e.prototype.notifyImplicitReceiverUse=function(){this._bindingScope.notifyImplicitReceiverUse()},e.prototype.i18nTranslate=function(e,t,n,r){var i;void 0===t&&(t={});var o=n||ct(this.constantPool.uniqueName("I18N_")),s=this.i18nGenerateClosureVar(e.id),a={};t&&Object.keys(t).length&&Object.keys(t).forEach(function(e){return a[Ci(e)]=t[e]});var u=gi(e),l=function p(e,t,n,r,i,o){void 0===i&&(i={});var s=[];return s.push.apply(s,f(di(e,t,n,r,i))),o&&s.push(new Ze(e.set(o(e)))),s}(o,s,function c(e){return e.nodes.map(function(e){return e.visit(Gl,null)}).join("")}
|
|
343
343
|
/**
|
|
344
344
|
* @license
|
|
345
345
|
* Copyright Google Inc. All Rights Reserved.
|
|
346
346
|
*
|
|
347
347
|
* Use of this source code is governed by an MIT-style license that can be
|
|
348
348
|
* found in the LICENSE file at https://angular.io/license
|
|
349
|
-
*/(e),u,a,r);return(i=this.constantPool.statements).push.apply(i,f(l)),o},e.prototype.i18nAppendBindings=function(e){var t=this;e.length>0&&e.forEach(function(e){return t.i18n.appendBinding(e)})},e.prototype.i18nBindProps=function(e){var t=this,n={};return Object.keys(e).forEach(function(r){var i=e[r];if(i instanceof gn)n[r]=yt(i.value);else{var o=i.value.visit(t._valueConverter);if(t.allocateBindingSlots(o),o instanceof Vo){var s=o.expressions,a=t.i18n,u=function l(e,t,n){if(void 0===t&&(t=0),void 0===n&&(n=0),!e.length)return"";for(var r="",i=e.length-1,o=0;o<i;o++)r+=""+e[o]+Or(t+o,n);return r+e[i]}(o.strings,a.bindings.size,a.id);t.i18nAppendBindings(s),n[r]=yt(u)}}}),n},e.prototype.i18nGenerateClosureVar=function(e){var t,n=this.fileBasedI18nSuffix.toUpperCase();if(this.i18nUseExternalIds){var r=Vr("EXTERNAL_"),i=this.constantPool.uniqueName(n);t=""+r+en(e)+"$$"+i}else r=Vr(n),t=this.constantPool.uniqueName(r);return ct(t)},e.prototype.i18nUpdateRef=function(e){var t=e.icus,n=e.meta;if(e.isRoot&&e.isResolved&&!e.isEmitted&&!Pr(n)){e.isEmitted=!0;var r=e.getSerializedPlaceholders(),i={},o=r.size?Dr(r):{};t.size&&t.forEach(function(e,t){if(1===e.length)o[t]=e[0];else{var n=Or("I18N_EXP_"+t);o[t]=yt(n),i[t]=ft(e)}});var s=void 0;(Array.from(r.values()).some(function(e){return e.length>1})||Object.keys(i).length)&&(s=function(e){var t=[e];return Object.keys(i).length&&t.push(br(i,!0)),ic(null,yn.i18nPostprocess,t)}),this.i18nTranslate(n,o,e.ref,s)}},e.prototype.i18nStart=function(e,t,n){void 0===e&&(e=null);var r=this.allocateDataSlot();if(this.i18nContext)this.i18n=this.i18nContext.forkChildContext(r,this.templateIndex,t);else{var i=ct(this.constantPool.uniqueName("I18N_"));this.i18n=new Dl(r,i,0,this.templateIndex,t)}var o=this.i18n,s=o.id,a=o.ref,u=[yt(r),a];s>0&&u.push(yt(s)),this.creationInstruction(e,n?yn.i18n:yn.i18nStart,u)},e.prototype.i18nEnd=function(e,t){var n=this;if(void 0===e&&(e=null),!this.i18n)throw new Error("i18nEnd is executed with no i18n context present");this.i18nContext?(this.i18nContext.reconcileChildContext(this.i18n),this.i18nUpdateRef(this.i18nContext)):this.i18nUpdateRef(this.i18n);var r=this.i18n,i=r.index,o=r.bindings;o.size&&(o.forEach(function(t){n.updateInstruction(i,e,yn.i18nExp,function(){return[n.convertPropertyBinding(t,!0)]})}),this.updateInstruction(i,e,yn.i18nApply,[yt(i)])),t||this.creationInstruction(e,yn.i18nEnd),this.i18n=null},e.prototype.visitContent=function(e){var t=this.allocateDataSlot(),n=this._ngContentSelectorsOffset+this._ngContentReservedSlots.length,r=[yt(t)],i=[];this._ngContentReservedSlots.push(e.selector),e.attributes.forEach(function(e){var t=e.name,n=e.value;"ngProjectAs"===t?i.push.apply(i,f(lc(e))):"select"!==t.toLowerCase()&&i.push(yt(t),yt(n))}),i.length>0?r.push(yt(n),ft(i)):0!==n&&r.push(yt(n)),this.creationInstruction(e.sourceSpan,yn.projection,r),this.i18n&&this.i18n.appendProjection(e.i18n,t)},e.prototype.getNamespaceInstruction=function(e){switch(e){case"math":return yn.namespaceMathML;case"svg":return yn.namespaceSVG;default:return yn.namespaceHTML}},e.prototype.addNamespaceInstruction=function(e,t){this._namespace=e,this.creationInstruction(t.sourceSpan,e)},e.prototype.visitElement=function(e){var t,n,r=this,i=this.allocateDataSlot(),o=new Xu(yt(i),null),s=!1,a=Ar(e.i18n)&&!Pr(e.i18n);if(a&&this.i18n)throw new Error("Could not mark an element as translatable inside of a translatable section");var u=[],l=[],c=h(d(e.name),2),m=c[0],y=c[1],g=v(e.name);try{for(var _=p(e.attributes),b=_.next();!b.done;b=_.next()){var w=b.value,x=w.name,E=w.value;"ngNonBindable"===x?s=!0:"style"===x?o.registerStyleAttr(E):"class"===x?o.registerClassAttr(E):w.i18n?u.push(w):l.push(w)}}catch(e){t={error:e}}finally{try{b&&!b.done&&(n=_.return)&&n.call(_)}finally{if(t)throw t.error}}this.matchDirectives(e.name,e);var S=[yt(i)];g||S.push(yt(y));var C=[],T=[];e.inputs.forEach(function(e){o.registerBoundInput(e)||(0===e.type&&e.i18n?u.push(e):T.push(e))}),l.forEach(function(e){C.push.apply(C,"ngProjectAs"===e.name?f(lc(e)):f(ac(e.name),[yt(e.value)]))}),C.push.apply(C,f(this.prepareNonRenderAttrs(T,e.outputs,o,[],u))),S.push(this.toAttrsParam(C)),S.push(this.prepareRefsParameter(e.references));var N=this._namespace,k=this.getNamespaceInstruction(m);k!==N&&this.addNamespaceInstruction(k,e),this.i18n&&this.i18n.appendElement(e.i18n,i);var A=!o.hasBindings&&!g&&0===e.outputs.length&&0===u.length&&!(!a&&r.i18n?!vc(e.children):e.children.length>0),P=!A&&!o.hasBindings&&vc(e.children);if(A)this.creationInstruction(e.sourceSpan,yn.element,Gr(S));else{if(this.creationInstruction(e.sourceSpan,g?yn.elementContainerStart:yn.elementStart,Gr(S)),s&&this.creationInstruction(e.sourceSpan,yn.disableBindings),u.length){var I=!1,M=[];if(u.forEach(function(t){var n=t.i18n;if(t instanceof bn)M.push(yt(t.name),r.i18nTranslate(n));else{var o=t.value.visit(r._valueConverter);if(r.allocateBindingSlots(o),o instanceof Vo){var s=Dr(Fr(n));M.push(yt(t.name),r.i18nTranslate(n,s)),o.expressions.forEach(function(t){I=!0,r.updateInstruction(i,e.sourceSpan,yn.i18nExp,function(){return[r.convertExpressionBinding(t,!0)]})})}}}),M.length){var O=yt(this.allocateDataSlot()),R=this.constantPool.getConstLiteral(ft(M),!0);this.creationInstruction(e.sourceSpan,yn.i18nAttributes,[O,R]),I&&this.updateInstruction(i,e.sourceSpan,yn.i18nApply,[O])}}this.processStylingInstruction(i,o.buildStylingInstruction(e.sourceSpan,this.constantPool),!0),e.outputs.forEach(function(t){r.creationInstruction(t.sourceSpan,yn.listener,r.prepareListenerParameter(e.name,t,i))}),a&&this.i18nStart(e.sourceSpan,e.i18n,P)}for(var D=o.buildUpdateLevelInstructions(this._valueConverter),L=D.length-1,F=0;F<=L;F++){var j=D[F];this._bindingSlots+=j.allocateBindingSlots,this.processStylingInstruction(i,j,!1)}var V=yt(void 0);if(T.forEach(function(e){var t=e.type;if(4===t){var n=e.value.visit(r._valueConverter),o=!(n instanceof Lo&&!n.value);r.allocateBindingSlots(n);var s=ai(e.name);r.updateInstruction(i,e.sourceSpan,yn.property,function(){return[yt(s),o?r.convertPropertyBinding(n,!0):V]})}else{if(e.i18n)return;var a=e.value.visit(r._valueConverter);if(void 0!==a){var u=[],l=h(d(e.name),2),c=l[0],p=l[1],v=fc(e.securityContext,1===t);if(v&&u.push(v),c){var m=yt(c);v?u.push(m):u.push(yt(null),m)}r.allocateBindingSlots(a),0===t?a instanceof Vo?r.interpolatedUpdateInstruction(function y(e){switch(pc(e)){case 1:return yn.propertyInterpolate;case 3:return yn.propertyInterpolate1;case 5:return yn.propertyInterpolate2;case 7:return yn.propertyInterpolate3;case 9:return yn.propertyInterpolate4;case 11:return yn.propertyInterpolate5;case 13:return yn.propertyInterpolate6;case 15:return yn.propertyInterpolate7;case 17:return yn.propertyInterpolate8;default:return yn.propertyInterpolateV}}(a),i,p,e,a,u):r.boundUpdateInstruction(yn.property,i,p,e,a,u):1===t?a instanceof Vo&&pc(a)>1?r.interpolatedUpdateInstruction(function g(e){switch(pc(e)){case 3:return yn.attributeInterpolate1;case 5:return yn.attributeInterpolate2;case 7:return yn.attributeInterpolate3;case 9:return yn.attributeInterpolate4;case 11:return yn.attributeInterpolate5;case 13:return yn.attributeInterpolate6;case 15:return yn.attributeInterpolate7;case 17:return yn.attributeInterpolate8;default:return yn.attributeInterpolateV}}(a),i,p,e,a,u):r.boundUpdateInstruction(yn.attribute,i,p,e,a instanceof Vo?a.expressions[0]:a,u):r.updateInstruction(i,e.sourceSpan,yn.classProp,function(){return f([yt(i),yt(p),r.convertPropertyBinding(a)],u)})}}}),An(this,e.children),!a&&this.i18n&&this.i18n.appendElement(e.i18n,i,!0),!A){var B=e.endSourceSpan||e.sourceSpan;a&&this.i18nEnd(B,P),s&&this.creationInstruction(B,yn.enableBindings),this.creationInstruction(B,g?yn.elementContainerEnd:yn.elementEnd)}},e.prototype.boundUpdateInstruction=function(e,t,n,r,i,o){var s=this;this.updateInstruction(t,r.sourceSpan,e,function(){return f([yt(n),s.convertPropertyBinding(i,!0)],o)})},e.prototype.interpolatedUpdateInstruction=function(e,t,n,r,i,o){var s=this;this.updateInstruction(t,r.sourceSpan,e,function(){return f([yt(n)],s.getUpdateInstructionArguments(i),o)})},e.prototype.visitTemplate=function(t){var n=this,r=this.allocateDataSlot();this.i18n&&this.i18n.appendTemplate(t.i18n,r);var i=en(t.tagName||""),o=this.contextName+(i?"_"+i:"")+"_"+r,s=o+"_Template",a=[yt(r),ct(s),yt(t.tagName?d(t.tagName)[1]:t.tagName)];this.matchDirectives("ng-template",t);var u=[];t.attributes.forEach(function(e){u.push(Qr(e.name),Qr(e.value))}),u.push.apply(u,f(this.prepareNonRenderAttrs(t.inputs,t.outputs,void 0,t.templateAttrs))),a.push(this.toAttrsParam(u)),t.references&&t.references.length&&(a.push(this.prepareRefsParameter(t.references)),a.push(pt(yn.templateRefExtractor)));var l=new e(this.constantPool,this._bindingScope,this.level+1,o,this.i18n,r,s,this.directiveMatcher,this.directives,this.pipeTypeByName,this.pipes,this._namespace,this.fileBasedI18nSuffix,this.i18nUseExternalIds);this._nestedTemplateFns.push(function(){var e,r=l.buildTemplateFunction(t.children,t.variables,n._ngContentReservedSlots.length+n._ngContentSelectorsOffset,t.i18n);n.constantPool.statements.push(r.toDeclStmt(s,null)),l._ngContentReservedSlots.length&&(e=n._ngContentReservedSlots).push.apply(e,f(l._ngContentReservedSlots))}),this.creationInstruction(t.sourceSpan,yn.templateCreate,function(){return a.splice(2,0,yt(l.getConstCount()),yt(l.getVarCount())),Gr(a)}),this.templatePropertyBindings(t,r,t.templateAttrs),"ng-template"===t.tagName&&(this.templatePropertyBindings(t,r,t.inputs),t.outputs.forEach(function(e){n.creationInstruction(e.sourceSpan,yn.listener,n.prepareListenerParameter("ng_template",e,r))}))},e.prototype.visitBoundText=function(e){var t=this;if(this.i18n){var n=e.value.visit(this._valueConverter);return this.allocateBindingSlots(n),void(n instanceof Vo&&(this.i18n.appendBoundText(e.i18n),this.i18nAppendBindings(n.expressions)))}var r=this.allocateDataSlot();this.creationInstruction(e.sourceSpan,yn.text,[yt(r)]);var i=e.value.visit(this._valueConverter);this.allocateBindingSlots(i),i instanceof Vo?this.updateInstruction(r,e.sourceSpan,function o(e){switch(pc(e)){case 1:return yn.textInterpolate;case 3:return yn.textInterpolate1;case 5:return yn.textInterpolate2;case 7:return yn.textInterpolate3;case 9:return yn.textInterpolate4;case 11:return yn.textInterpolate5;case 13:return yn.textInterpolate6;case 15:return yn.textInterpolate7;case 17:return yn.textInterpolate8;default:return yn.textInterpolateV}}(i),function(){return t.getUpdateInstructionArguments(i)}):this.updateInstruction(r,e.sourceSpan,yn.textBinding,function(){return[t.convertPropertyBinding(i)]})},e.prototype.visitText=function(e){this.i18n||this.creationInstruction(e.sourceSpan,yn.text,[yt(this.allocateDataSlot()),yt(e.value)])},e.prototype.visitIcu=function(e){var t=!1;this.i18n||(t=!0,this.i18nStart(null,e.i18n,!0));var n=this.i18n,r=this.i18nBindProps(e.vars),i=this.i18nBindProps(e.placeholders),o=e.i18n,s=function(e){return ic(null,yn.i18nPostprocess,[e,br(r,!0)])};if(Pr(n.meta))this.i18nTranslate(o,i,n.ref,s);else{var a=this.i18nTranslate(o,i,void 0,s);n.appendIcu(Mr(o).name,a)}return t&&this.i18nEnd(null,!0),null},e.prototype.allocateDataSlot=function(){return this._dataIndex++},e.prototype.getConstCount=function(){return this._dataIndex},e.prototype.getVarCount=function(){return this._pureFunctionSlots},e.prototype.getNgContentSelectors=function(){return this._ngContentReservedSlots.length?this.constantPool.getConstLiteral(Qr(this._ngContentReservedSlots),!0):null},e.prototype.bindingContext=function(){return""+this._bindingContext++},e.prototype.templatePropertyBindings=function(e,t,n){var r=this;n.forEach(function(n){if(n instanceof wn){var i=n.value.visit(r._valueConverter);void 0!==i&&(r.allocateBindingSlots(i),r.updateInstruction(t,e.sourceSpan,yn.property,function(){return[yt(n.name),r.convertPropertyBinding(i,!0)]}))}})},e.prototype.instructionFn=function(e,t,n,r,i){void 0===i&&(i=!1),e[i?"unshift":"push"](function(){var e=Array.isArray(r)?r:r();return ic(t,n,e).toStmt()})},e.prototype.processStylingInstruction=function(e,t,n){var r=this;if(t){var i=function(){return t.buildParams(function(e){return r.convertPropertyBinding(e,!0)})};n?this.creationInstruction(t.sourceSpan,t.reference,i):this.updateInstruction(e,t.sourceSpan,t.reference,i)}},e.prototype.creationInstruction=function(e,t,n,r){this.instructionFn(this._creationCodeFns,e,t,n||[],r)},e.prototype.updateInstruction=function(e,t,n,r){this._lastNodeIndexWithFlush<e&&(e>0&&this.instructionFn(this._updateCodeFns,t,yn.select,[yt(e)]),this._lastNodeIndexWithFlush=e),this.instructionFn(this._updateCodeFns,t,n,r||[])},e.prototype.allocatePureFunctionSlots=function(e){var t=this._pureFunctionSlots;return this._pureFunctionSlots+=e,t},e.prototype.allocateBindingSlots=function(e){this._bindingSlots+=e instanceof Vo?e.expressions.length:1},e.prototype.getImplicitReceiverExpr=function(){return this._implicitReceiverExpr?this._implicitReceiverExpr:this._implicitReceiverExpr=0===this.level?ct(Ur):this._bindingScope.getOrCreateSharedContextVar(0)},e.prototype.convertExpressionBinding=function(e,t){var n=ls(this,this.getImplicitReceiverExpr(),e,this.bindingContext(),ts.TrySimple).currValExpr;return t?n:pt(yn.bind).callFn([n])},e.prototype.convertPropertyBinding=function(e,t){var n,r=e instanceof Vo?cc:function(){return Nt("Unexpected interpolation")},i=ls(this,this.getImplicitReceiverExpr(),e,this.bindingContext(),ts.TrySimple,r),o=i.currValExpr;return(n=this._tempVariables).push.apply(n,f(i.stmts)),e instanceof Vo||t?o:pt(yn.bind).callFn([o])},e.prototype.getUpdateInstructionArguments=function(e){var t,n=function r(e,t,n,i){var o=new ms(e,t,i,void 0),s=n.visit(o,ns.Expression);o.usesImplicitReceiver&&e.notifyImplicitReceiverUse();var a=cs(o,i),u=s.args.slice(1);if(n instanceof Vo){var l=n.strings;3===u.length&&""===l[0]&&""===l[1]?u=[u[1]]:u.length>=19&&(u=[ft(u)])}return{stmts:a,args:u}}(this,this.getImplicitReceiverExpr(),e,this.bindingContext()),i=n.args;return(t=this._tempVariables).push.apply(t,f(n.stmts)),i},e.prototype.matchDirectives=function(e,t){var n=this;if(this.directiveMatcher){var r=function o(e,t){var n=new A;return n.setElement(e),Object.getOwnPropertyNames(t).forEach(function(e){var r=t[e];n.addAttribute(e,r),"class"===e.toLowerCase()&&r.trim().split(/\s+/).forEach(function(e){return n.addClassName(e)})}),n}(e,function i(e){var t={};return e instanceof Sn&&"ng-template"!==e.tagName?e.templateAttrs.forEach(function(e){return t[e.name]=""}):(e.attributes.forEach(function(e){kr(e.name)||(t[e.name]=e.value)}),e.inputs.forEach(function(e){t[e.name]=""}),e.outputs.forEach(function(e){t[e.name]=""})),t}
|
|
349
|
+
*/(e),u,a,r);return(i=this.constantPool.statements).push.apply(i,f(l)),o},e.prototype.i18nAppendBindings=function(e){var t=this;e.length>0&&e.forEach(function(e){return t.i18n.appendBinding(e)})},e.prototype.i18nBindProps=function(e){var t=this,n={};return Object.keys(e).forEach(function(r){var i=e[r];if(i instanceof or)n[r]=yt(i.value);else{var o=i.value.visit(t._valueConverter);if(t.allocateBindingSlots(o),o instanceof Vo){var s=o.expressions,a=t.i18n,u=function l(e,t,n){if(void 0===t&&(t=0),void 0===n&&(n=0),!e.length)return"";for(var r="",i=e.length-1,o=0;o<i;o++)r+=""+e[o]+bi(t+o,n);return r+e[i]}(o.strings,a.bindings.size,a.id);t.i18nAppendBindings(s),n[r]=yt(u)}}}),n},e.prototype.i18nGenerateClosureVar=function(e){var t,n=this.fileBasedI18nSuffix.toUpperCase();if(this.i18nUseExternalIds){var r=Ti("EXTERNAL_"),i=this.constantPool.uniqueName(n);t=""+r+en(e)+"$$"+i}else r=Ti(n),t=this.constantPool.uniqueName(r);return ct(t)},e.prototype.i18nUpdateRef=function(e){var t=e.icus,n=e.meta;if(e.isRoot&&e.isResolved&&!e.isEmitted&&!yi(n)){e.isEmitted=!0;var r=e.getSerializedPlaceholders(),i={},o=r.size?xi(r):{};t.size&&t.forEach(function(e,t){if(1===e.length)o[t]=e[0];else{var n=bi("I18N_EXP_"+t);o[t]=yt(n),i[t]=ft(e)}});var s=void 0;(Array.from(r.values()).some(function(e){return e.length>1})||Object.keys(i).length)&&(s=function(e){var t=[e];return Object.keys(i).length&&t.push(ai(i,!0)),ic(null,yn.i18nPostprocess,t)}),this.i18nTranslate(n,o,e.ref,s)}},e.prototype.i18nStart=function(e,t,n){void 0===e&&(e=null);var r=this.allocateDataSlot();if(this.i18nContext)this.i18n=this.i18nContext.forkChildContext(r,this.templateIndex,t);else{var i=ct(this.constantPool.uniqueName("I18N_"));this.i18n=new Dl(r,i,0,this.templateIndex,t)}var o=this.i18n,s=o.id,a=o.ref,u=[yt(r),a];s>0&&u.push(yt(s)),this.creationInstruction(e,n?yn.i18n:yn.i18nStart,u)},e.prototype.i18nEnd=function(e,t){var n=this;if(void 0===e&&(e=null),!this.i18n)throw new Error("i18nEnd is executed with no i18n context present");this.i18nContext?(this.i18nContext.reconcileChildContext(this.i18n),this.i18nUpdateRef(this.i18nContext)):this.i18nUpdateRef(this.i18n);var r=this.i18n,i=r.index,o=r.bindings;if(o.size){var s=[];o.forEach(function(t){s.push({sourceSpan:e,value:function(){return n.convertPropertyBinding(t)}})}),this.updateInstructionChain(i,yn.i18nExp,s),this.updateInstruction(i,e,yn.i18nApply,[yt(i)])}t||this.creationInstruction(e,yn.i18nEnd),this.i18n=null},e.prototype.visitContent=function(e){var t=this.allocateDataSlot(),n=this._ngContentSelectorsOffset+this._ngContentReservedSlots.length,r=[yt(t)],i=[];this._ngContentReservedSlots.push(e.selector),e.attributes.forEach(function(e){var t=e.name,n=e.value;"ngProjectAs"===t?i.push.apply(i,f(lc(e))):"select"!==t.toLowerCase()&&i.push(yt(t),yt(n))}),i.length>0?r.push(yt(n),ft(i)):0!==n&&r.push(yt(n)),this.creationInstruction(e.sourceSpan,yn.projection,r),this.i18n&&this.i18n.appendProjection(e.i18n,t)},e.prototype.getNamespaceInstruction=function(e){switch(e){case"math":return yn.namespaceMathML;case"svg":return yn.namespaceSVG;default:return yn.namespaceHTML}},e.prototype.addNamespaceInstruction=function(e,t){this._namespace=e,this.creationInstruction(t.sourceSpan,e)},e.prototype.visitElement=function(e){var t,n,r=this,i=this.allocateDataSlot(),o=new Xu(yt(i),null),s=!1,a=mi(e.i18n)&&!yi(e.i18n);if(a&&this.i18n)throw new Error("Could not mark an element as translatable inside of a translatable section");var u=[],l=[],c=h(d(e.name),2),m=c[0],y=c[1],g=v(e.name);try{for(var _=p(e.attributes),b=_.next();!b.done;b=_.next()){var w=b.value,x=w.name,E=w.value;"ngNonBindable"===x?s=!0:"style"===x?o.registerStyleAttr(E):"class"===x?o.registerClassAttr(E):w.i18n?u.push(w):l.push(w)}}catch(e){t={error:e}}finally{try{b&&!b.done&&(n=_.return)&&n.call(_)}finally{if(t)throw t.error}}this.matchDirectives(e.name,e);var S=[yt(i)];g||S.push(yt(y));var C=[],T=[];e.inputs.forEach(function(e){o.registerBoundInput(e)||(0===e.type&&e.i18n?u.push(e):T.push(e))}),l.forEach(function(e){C.push.apply(C,"ngProjectAs"===e.name?f(lc(e)):f(ac(e.name),[yt(e.value)]))}),C.push.apply(C,f(this.prepareNonRenderAttrs(T,e.outputs,o,[],u))),S.push(this.toAttrsParam(C)),S.push(this.prepareRefsParameter(e.references));var N=this._namespace,k=this.getNamespaceInstruction(m);k!==N&&this.addNamespaceInstruction(k,e),this.i18n&&this.i18n.appendElement(e.i18n,i);var A=!o.hasBindings&&!g&&0===e.outputs.length&&0===u.length&&!(!a&&r.i18n?!vc(e.children):e.children.length>0),P=!A&&!o.hasBindings&&vc(e.children);if(A)this.creationInstruction(e.sourceSpan,yn.element,Li(S));else{if(this.creationInstruction(e.sourceSpan,g?yn.elementContainerStart:yn.elementStart,Li(S)),s&&this.creationInstruction(e.sourceSpan,yn.disableBindings),u.length){var I=!1,M=[],O=[];if(u.forEach(function(t){var n=t.i18n;if(t instanceof ar)M.push(yt(t.name),r.i18nTranslate(n));else{var i=t.value.visit(r._valueConverter);if(r.allocateBindingSlots(i),i instanceof Vo){var o=xi(Si(n));M.push(yt(t.name),r.i18nTranslate(n,o)),i.expressions.forEach(function(t){I=!0,O.push({sourceSpan:e.sourceSpan,value:function(){return r.convertExpressionBinding(t)}})})}}}),O.length&&this.updateInstructionChain(i,yn.i18nExp,O),M.length){var R=yt(this.allocateDataSlot()),D=this.constantPool.getConstLiteral(ft(M),!0);this.creationInstruction(e.sourceSpan,yn.i18nAttributes,[R,D]),I&&this.updateInstruction(i,e.sourceSpan,yn.i18nApply,[R])}}this.processStylingInstruction(i,o.buildStylingInstruction(e.sourceSpan,this.constantPool),!0),e.outputs.forEach(function(t){r.creationInstruction(t.sourceSpan,yn.listener,r.prepareListenerParameter(e.name,t,i))}),a&&this.i18nStart(e.sourceSpan,e.i18n,P)}for(var L=o.buildUpdateLevelInstructions(this._valueConverter),F=L.length-1,j=0;j<=F;j++){var V=L[j];this._bindingSlots+=V.allocateBindingSlots,this.processStylingInstruction(i,V,!1)}var B=yt(void 0),H=[],U=[];if(T.forEach(function(e){var t=e.type;if(4===t){var n=e.value.visit(r._valueConverter),o=!(n instanceof Lo&&!n.value);r.allocateBindingSlots(n),H.push({name:$i(e.name),sourceSpan:e.sourceSpan,value:function(){return o?r.convertPropertyBinding(n):B}})}else{if(e.i18n)return;var s=e.value.visit(r._valueConverter);if(void 0!==s){var a=[],u=h(d(e.name),2),l=u[0],c=u[1],p=fc(e.securityContext,1===t);if(p&&a.push(p),l){var v=yt(l);p?a.push(v):a.push(yt(null),v)}if(r.allocateBindingSlots(s),0===t)s instanceof Vo?r.interpolatedUpdateInstruction(function m(e){switch(pc(e)){case 1:return yn.propertyInterpolate;case 3:return yn.propertyInterpolate1;case 5:return yn.propertyInterpolate2;case 7:return yn.propertyInterpolate3;case 9:return yn.propertyInterpolate4;case 11:return yn.propertyInterpolate5;case 13:return yn.propertyInterpolate6;case 15:return yn.propertyInterpolate7;case 17:return yn.propertyInterpolate8;default:return yn.propertyInterpolateV}}(s),i,c,e,s,a):H.push({name:c,sourceSpan:e.sourceSpan,value:function(){return r.convertPropertyBinding(s)},params:a});else if(1===t)if(s instanceof Vo&&pc(s)>1)r.interpolatedUpdateInstruction(function y(e){switch(pc(e)){case 3:return yn.attributeInterpolate1;case 5:return yn.attributeInterpolate2;case 7:return yn.attributeInterpolate3;case 9:return yn.attributeInterpolate4;case 11:return yn.attributeInterpolate5;case 13:return yn.attributeInterpolate6;case 15:return yn.attributeInterpolate7;case 17:return yn.attributeInterpolate8;default:return yn.attributeInterpolateV}}(s),i,c,e,s,a);else{var g=s instanceof Vo?s.expressions[0]:s;U.push({name:c,sourceSpan:e.sourceSpan,value:function(){return r.convertPropertyBinding(g)},params:a})}else r.updateInstruction(i,e.sourceSpan,yn.classProp,function(){return f([yt(i),yt(c),r.convertPropertyBinding(s)],a)})}}}),H.length>0&&this.updateInstructionChain(i,yn.property,H),U.length>0&&this.updateInstructionChain(i,yn.attribute,U),mr(this,e.children),!a&&this.i18n&&this.i18n.appendElement(e.i18n,i,!0),!A){var q=e.endSourceSpan||e.sourceSpan;a&&this.i18nEnd(q,P),s&&this.creationInstruction(q,yn.enableBindings),this.creationInstruction(q,g?yn.elementContainerEnd:yn.elementEnd)}},e.prototype.interpolatedUpdateInstruction=function(e,t,n,r,i,o){var s=this;this.updateInstruction(t,r.sourceSpan,e,function(){return f([yt(n)],s.getUpdateInstructionArguments(i),o)})},e.prototype.visitTemplate=function(t){var n=this,r=this.allocateDataSlot();this.i18n&&this.i18n.appendTemplate(t.i18n,r);var i=en(t.tagName||""),o=this.contextName+(i?"_"+i:"")+"_"+r,s=o+"_Template",a=[yt(r),ct(s),yt(t.tagName?d(t.tagName)[1]:t.tagName)];this.matchDirectives("ng-template",t);var u=[];t.attributes.forEach(function(e){u.push(Ri(e.name),Ri(e.value))}),u.push.apply(u,f(this.prepareNonRenderAttrs(t.inputs,t.outputs,void 0,t.templateAttrs))),a.push(this.toAttrsParam(u)),t.references&&t.references.length&&(a.push(this.prepareRefsParameter(t.references)),a.push(pt(yn.templateRefExtractor)));var l=new e(this.constantPool,this._bindingScope,this.level+1,o,this.i18n,r,s,this.directiveMatcher,this.directives,this.pipeTypeByName,this.pipes,this._namespace,this.fileBasedI18nSuffix,this.i18nUseExternalIds);this._nestedTemplateFns.push(function(){var e,r=l.buildTemplateFunction(t.children,t.variables,n._ngContentReservedSlots.length+n._ngContentSelectorsOffset,t.i18n);n.constantPool.statements.push(r.toDeclStmt(s,null)),l._ngContentReservedSlots.length&&(e=n._ngContentReservedSlots).push.apply(e,f(l._ngContentReservedSlots))}),this.creationInstruction(t.sourceSpan,yn.templateCreate,function(){return a.splice(2,0,yt(l.getConstCount()),yt(l.getVarCount())),Li(a)}),this.templatePropertyBindings(r,t.templateAttrs),"ng-template"===t.tagName&&(this.templatePropertyBindings(r,t.inputs),t.outputs.forEach(function(e){n.creationInstruction(e.sourceSpan,yn.listener,n.prepareListenerParameter("ng_template",e,r))}))},e.prototype.visitBoundText=function(e){var t=this;if(this.i18n){var n=e.value.visit(this._valueConverter);return this.allocateBindingSlots(n),void(n instanceof Vo&&(this.i18n.appendBoundText(e.i18n),this.i18nAppendBindings(n.expressions)))}var r=this.allocateDataSlot();this.creationInstruction(e.sourceSpan,yn.text,[yt(r)]);var i=e.value.visit(this._valueConverter);this.allocateBindingSlots(i),i instanceof Vo?this.updateInstruction(r,e.sourceSpan,function o(e){switch(pc(e)){case 1:return yn.textInterpolate;case 3:return yn.textInterpolate1;case 5:return yn.textInterpolate2;case 7:return yn.textInterpolate3;case 9:return yn.textInterpolate4;case 11:return yn.textInterpolate5;case 13:return yn.textInterpolate6;case 15:return yn.textInterpolate7;case 17:return yn.textInterpolate8;default:return yn.textInterpolateV}}(i),function(){return t.getUpdateInstructionArguments(i)}):this.updateInstruction(r,e.sourceSpan,yn.textBinding,function(){return[t.convertPropertyBinding(i)]})},e.prototype.visitText=function(e){this.i18n||this.creationInstruction(e.sourceSpan,yn.text,[yt(this.allocateDataSlot()),yt(e.value)])},e.prototype.visitIcu=function(e){var t=!1;this.i18n||(t=!0,this.i18nStart(null,e.i18n,!0));var n=this.i18n,r=this.i18nBindProps(e.vars),i=this.i18nBindProps(e.placeholders),o=e.i18n,s=function(e){return ic(null,yn.i18nPostprocess,[e,ai(r,!0)])};if(yi(n.meta))this.i18nTranslate(o,i,n.ref,s);else{var a=this.i18nTranslate(o,i,void 0,s);n.appendIcu(_i(o).name,a)}return t&&this.i18nEnd(null,!0),null},e.prototype.allocateDataSlot=function(){return this._dataIndex++},e.prototype.getConstCount=function(){return this._dataIndex},e.prototype.getVarCount=function(){return this._pureFunctionSlots},e.prototype.getNgContentSelectors=function(){return this._ngContentReservedSlots.length?this.constantPool.getConstLiteral(Ri(this._ngContentReservedSlots),!0):null},e.prototype.bindingContext=function(){return""+this._bindingContext++},e.prototype.templatePropertyBindings=function(e,t){var n=this,r=[];t.forEach(function(e){if(e instanceof ur){var t=e.value.visit(n._valueConverter);void 0!==t&&(n.allocateBindingSlots(t),r.push({name:e.name,sourceSpan:e.sourceSpan,value:function(){return n.convertPropertyBinding(t)}}))}}),r.length>0&&this.updateInstructionChain(e,yn.property,r)},e.prototype.instructionFn=function(e,t,n,r,i){void 0===i&&(i=!1),e[i?"unshift":"push"](function(){var e=Array.isArray(r)?r:r();return ic(t,n,e).toStmt()})},e.prototype.processStylingInstruction=function(e,t,n){var r=this;if(t){var i=function(){return t.buildParams(function(e){return r.convertPropertyBinding(e)})};n?this.creationInstruction(t.sourceSpan,t.reference,i):this.updateInstruction(e,t.sourceSpan,t.reference,i)}},e.prototype.creationInstruction=function(e,t,n,r){this.instructionFn(this._creationCodeFns,e,t,n||[],r)},e.prototype.updateInstruction=function(e,t,n,r){this.addSelectInstructionIfNecessary(e,t),this.instructionFn(this._updateCodeFns,t,n,r||[])},e.prototype.updateInstructionChain=function(e,t,n){var r=n.length?n[0].sourceSpan:null;this.addSelectInstructionIfNecessary(e,r),this._updateCodeFns.push(function(){var e=n.map(function(e){var t=f([e.value()],e.params||[]);return e.name&&t.unshift(yt(e.name)),t});return function i(e,t,n){var r=pt(t,null,e);if(n.length>0)for(var i=0;i<n.length;i++)r=r.callFn(n[i],e);else r=r.callFn([],e);return r}(r,t,e).toStmt()})},e.prototype.addSelectInstructionIfNecessary=function(e,t){this._lastNodeIndexWithFlush<e&&(e>0&&this.instructionFn(this._updateCodeFns,t,yn.select,[yt(e)]),this._lastNodeIndexWithFlush=e)},e.prototype.allocatePureFunctionSlots=function(e){var t=this._pureFunctionSlots;return this._pureFunctionSlots+=e,t},e.prototype.allocateBindingSlots=function(e){this._bindingSlots+=e instanceof Vo?e.expressions.length:1},e.prototype.getImplicitReceiverExpr=function(){return this._implicitReceiverExpr?this._implicitReceiverExpr:this._implicitReceiverExpr=0===this.level?ct(Ai):this._bindingScope.getOrCreateSharedContextVar(0)},e.prototype.convertExpressionBinding=function(e){return ls(this,this.getImplicitReceiverExpr(),e,this.bindingContext(),ts.TrySimple).currValExpr},e.prototype.convertPropertyBinding=function(e){var t,n=e instanceof Vo?cc:function(){return Nt("Unexpected interpolation")},r=ls(this,this.getImplicitReceiverExpr(),e,this.bindingContext(),ts.TrySimple,n),i=r.currValExpr;return(t=this._tempVariables).push.apply(t,f(r.stmts)),i},e.prototype.getUpdateInstructionArguments=function(e){var t,n=function r(e,t,n,i){var o=new ms(e,t,i,void 0),s=n.visit(o,ns.Expression);o.usesImplicitReceiver&&e.notifyImplicitReceiverUse();var a=cs(o,i),u=s.args.slice(1);if(n instanceof Vo){var l=n.strings;3===u.length&&""===l[0]&&""===l[1]?u=[u[1]]:u.length>=19&&(u=[ft(u)])}return{stmts:a,args:u}}(this,this.getImplicitReceiverExpr(),e,this.bindingContext()),i=n.args;return(t=this._tempVariables).push.apply(t,f(n.stmts)),i},e.prototype.matchDirectives=function(e,t){var n=this;if(this.directiveMatcher){var r=function o(e,t){var n=new A;return n.setElement(e),Object.getOwnPropertyNames(t).forEach(function(e){var r=t[e];n.addAttribute(e,r),"class"===e.toLowerCase()&&r.trim().split(/\s+/).forEach(function(e){return n.addClassName(e)})}),n}(e,function i(e){var t={};return e instanceof pr&&"ng-template"!==e.tagName?e.templateAttrs.forEach(function(e){return t[e.name]=""}):(e.attributes.forEach(function(e){vi(e.name)||(t[e.name]=e.value)}),e.inputs.forEach(function(e){t[e.name]=""}),e.outputs.forEach(function(e){t[e.name]=""})),t}
|
|
350
350
|
/**
|
|
351
351
|
* @license
|
|
352
352
|
* Copyright Google Inc. All Rights Reserved.
|
|
353
353
|
*
|
|
354
354
|
* Use of this source code is governed by an MIT-style license that can be
|
|
355
355
|
* found in the LICENSE file at https://angular.io/license
|
|
356
|
-
*/(t));this.directiveMatcher.match(r,function(e,t){n.directives.add(t)})}},e.prototype.prepareNonRenderAttrs=function(e,t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i=[]);var o=new Set,s=[];function a(e,t){"string"==typeof e?o.has(e)||(s.push.apply(s,f(ac(e))),void 0!==t&&s.push(t),o.add(e)):s.push(yt(e))}if(n&&n.populateInitialStylingAttrs(s),e.length||t.length){for(var u=s.length,l=0;l<e.length;l++){var c=e[l];4!==c.type&&a(c.name)}for(l=0;l<t.length;l++){var p=t[l];1!==p.type&&a(p.name)}s.length&&s.splice(u,0,yt(3))}return r.length&&(s.push(yt(4)),r.forEach(function(e){return a(e.name)})),i.length&&(s.push(yt(6)),i.forEach(function(e){return a(e.name)})),s},e.prototype.toAttrsParam=function(e){return e.length>0?this.constantPool.getConstLiteral(ft(e),!0):$e},e.prototype.prepareRefsParameter=function(e){var t=this;if(!e||0===e.length)return $e;var n=vn(e.map(function(e){var n=t.allocateDataSlot(),r=t._bindingScope.freshReferenceName(),i=t.level,o=ct(r);return t._bindingScope.set(i,e.name,o,0,function(e,t){var r=t>0?[oc(t).toStmt()]:[],i=o.set(pt(yn.reference).callFn([yt(n)]));return r.concat(i.toConstDecl())},!0),[e.name,e.value]}));return this.constantPool.getConstLiteral(
|
|
356
|
+
*/(t));this.directiveMatcher.match(r,function(e,t){n.directives.add(t)})}},e.prototype.prepareNonRenderAttrs=function(e,t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i=[]);var o=new Set,s=[];function a(e,t){"string"==typeof e?o.has(e)||(s.push.apply(s,f(ac(e))),void 0!==t&&s.push(t),o.add(e)):s.push(yt(e))}if(n&&n.populateInitialStylingAttrs(s),e.length||t.length){for(var u=s.length,l=0;l<e.length;l++){var c=e[l];4!==c.type&&a(c.name)}for(l=0;l<t.length;l++){var p=t[l];1!==p.type&&a(p.name)}s.length&&s.splice(u,0,yt(3))}return r.length&&(s.push(yt(4)),r.forEach(function(e){return a(e.name)})),i.length&&(s.push(yt(6)),i.forEach(function(e){return a(e.name)})),s},e.prototype.toAttrsParam=function(e){return e.length>0?this.constantPool.getConstLiteral(ft(e),!0):$e},e.prototype.prepareRefsParameter=function(e){var t=this;if(!e||0===e.length)return $e;var n=vn(e.map(function(e){var n=t.allocateDataSlot(),r=t._bindingScope.freshReferenceName(),i=t.level,o=ct(r);return t._bindingScope.set(i,e.name,o,0,function(e,t){var r=t>0?[oc(t).toStmt()]:[],i=o.set(pt(yn.reference).callFn([yt(n)]));return r.concat(i.toConstDecl())},!0),[e.name,e.value]}));return this.constantPool.getConstLiteral(Ri(n),!0)},e.prototype.prepareListenerParameter=function(e,t,n){var r=this;return function(){var i=t.name,o=1===t.type?Gi(i,t.phase):en(i),s=r.templateName+"_"+e+"_"+o+"_"+n+"_listener",a=r._bindingScope.nestedScope(r._bindingScope.bindingLevel);return Jl(t,s,a)}},e}(),tc=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o.constantPool=t,o.allocateSlot=n,o.allocatePureFunctionSlots=r,o.definePipe=i,o._pipeBindExprs=[],o}return o(t,e),t.prototype.visitPipe=function(e,t){var n=this.allocateSlot(),r="PIPE:"+n,i=this.allocatePureFunctionSlots(2+e.args.length),o=new Po(e.span,new No(e.span),r),s=function a(e){var t=nc[e.length];return{identifier:t||yn.pipeBindV,isVarLength:!t}}(e.args),u=s.isVarLength;this.definePipe(e.name,r,n,pt(s.identifier));var l=f([e.exp],e.args),c=this.visitAll(u?[new Fo(e.span,l)]:l),p=new zo(e.span,o,f([new Lo(e.span,n),new Lo(e.span,i)],c));return this._pipeBindExprs.push(p),p},t.prototype.updatePipeSlotOffsets=function(e){this._pipeBindExprs.forEach(function(t){t.args[1].value+=e})},t.prototype.visitLiteralArray=function(e,t){var n=this;return new gs(e.span,this.visitAll(e.expressions),function(e){var t=ft(e);return e.every(function(e){return e.isConstant()})?n.constantPool.getConstLiteral(t,!0):sc(n.constantPool,t,n.allocatePureFunctionSlots)})},t.prototype.visitLiteralMap=function(e,t){var n=this;return new gs(e.span,this.visitAll(e.values),function(t){var r=dt(t.map(function(t,n){return{key:e.keys[n].key,value:t,quoted:e.keys[n].quoted}}));return t.every(function(e){return e.isConstant()})?n.constantPool.getConstLiteral(r,!0):sc(n.constantPool,r,n.allocatePureFunctionSlots)})},t}(Yo),nc=[yn.pipeBind1,yn.pipeBind2,yn.pipeBind3,yn.pipeBind4],rc=[yn.pureFunction0,yn.pureFunction1,yn.pureFunction2,yn.pureFunction3,yn.pureFunction4,yn.pureFunction5,yn.pureFunction6,yn.pureFunction7,yn.pureFunction8];function ic(e,t,n){return pt(t,null,e).callFn(n,e)}function oc(e){return pt(yn.nextContext).callFn(e>1?[yt(e)]:[])}function sc(e,t,n){var r=e.getLiteralFactory(t),i=r.literalFactory,o=r.literalFactoryArguments,s=n(1+o.length);o.length>0||Nt("Expected arguments to a literal factory function");var a=function u(e){var t=rc[e.length];return{identifier:t||yn.pureFunctionV,isVarLength:!t}}(o),l=a.identifier,c=a.isVarLength,p=[yt(s),i];return c?p.push(ft(o)):p.push.apply(p,f(o)),pt(l).callFn(p)}function ac(e){var t=h(d(e),2),n=t[0],r=yt(t[1]);return n?[yt(0),yt(n),r]:[r]}var uc=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=null),this.bindingLevel=e,this.parent=t,this.map=new Map,this.referenceNameIndex=0,this.restoreViewVariable=null}return Object.defineProperty(e,"ROOT_SCOPE",{get:function(){return e._ROOT_SCOPE||(e._ROOT_SCOPE=(new e).set(0,"$event",ct("$event"))),e._ROOT_SCOPE},enumerable:!0,configurable:!0}),e.prototype.get=function(e){for(var t=this;t;){var n=t.map.get(e);if(null!=n)return t!==this&&(this.map.set(e,n={retrievalLevel:n.retrievalLevel,lhs:n.lhs,declareLocalCallback:n.declareLocalCallback,declare:!1,priority:n.priority,localRef:n.localRef}),this.maybeGenerateSharedContextVar(n),this.maybeRestoreView(n.retrievalLevel,n.localRef)),n.declareLocalCallback&&!n.declare&&(n.declare=!0),n.lhs;t=t.parent}return 0===this.bindingLevel?null:this.getComponentProperty(e)},e.prototype.set=function(e,t,n,r,i,o){if(void 0===r&&(r=0),this.map.has(t)){if(o)return this;Nt("The name "+t+" is already defined in scope to be "+this.map.get(t))}return this.map.set(t,{retrievalLevel:e,lhs:n,declare:!1,declareLocalCallback:i,priority:r,localRef:o||!1}),this},e.prototype.getLocal=function(e){return this.get(e)},e.prototype.notifyImplicitReceiverUse=function(){0!==this.bindingLevel&&(this.map.get("$$shared_ctx$$0").declare=!0)},e.prototype.nestedScope=function(t){var n=new e(t,this);return t>0&&n.generateSharedContextVar(0),n},e.prototype.getOrCreateSharedContextVar=function(e){var t="$$shared_ctx$$"+e;return this.map.has(t)||this.generateSharedContextVar(e),this.map.get(t).lhs},e.prototype.getSharedContextName=function(e){var t=this.map.get("$$shared_ctx$$"+e);return t&&t.declare?t.lhs:null},e.prototype.maybeGenerateSharedContextVar=function(e){if(1===e.priority&&e.retrievalLevel<this.bindingLevel){var t=this.map.get("$$shared_ctx$$"+e.retrievalLevel);t?t.declare=!0:this.generateSharedContextVar(e.retrievalLevel)}},e.prototype.generateSharedContextVar=function(e){var t=ct(Ai+this.freshReferenceName());this.map.set("$$shared_ctx$$"+e,{retrievalLevel:e,lhs:t,declareLocalCallback:function(e,n){return[t.set(oc(n)).toConstDecl()]},declare:!1,priority:2,localRef:!1})},e.prototype.getComponentProperty=function(e){var t=this.map.get("$$shared_ctx$$0");return t.declare=!0,this.maybeRestoreView(0,!1),t.lhs.prop(e)},e.prototype.maybeRestoreView=function(e,t){this.isListenerScope()&&(e<this.bindingLevel||t)&&(this.parent.restoreViewVariable||(this.parent.restoreViewVariable=ct(this.parent.freshReferenceName())),this.restoreViewVariable=this.parent.restoreViewVariable)},e.prototype.restoreViewStatement=function(){return this.restoreViewVariable?[ic(null,yn.restoreView,[this.restoreViewVariable]).toStmt()]:[]},e.prototype.viewSnapshotStatements=function(){var e=ic(null,yn.getCurrentView,[]);return this.restoreViewVariable?[this.restoreViewVariable.set(e).toConstDecl()]:[]},e.prototype.isListenerScope=function(){return this.parent&&this.parent.bindingLevel===this.bindingLevel},e.prototype.variableDeclarations=function(){var e=this,t=0;return Array.from(this.map.values()).filter(function(e){return e.declare}).sort(function(e,t){return t.retrievalLevel-e.retrievalLevel||t.priority-e.priority}).reduce(function(n,r){var i=e.bindingLevel-r.retrievalLevel,o=r.declareLocalCallback(e,i-t);return t=i,n.concat(o)},[])},e.prototype.freshReferenceName=function(){for(var e=this;e.parent;)e=e.parent;return"_r"+e.referenceNameIndex++},e}();function lc(e){var t=oe(e.value)[0];return[yt(5),Ri(t)]}function cc(e){switch((e=e.slice(1)).length){case 3:return pt(yn.interpolation1).callFn(e);case 5:return pt(yn.interpolation2).callFn(e);case 7:return pt(yn.interpolation3).callFn(e);case 9:return pt(yn.interpolation4).callFn(e);case 11:return pt(yn.interpolation5).callFn(e);case 13:return pt(yn.interpolation6).callFn(e);case 15:return pt(yn.interpolation7).callFn(e);case 17:return pt(yn.interpolation8).callFn(e)}return e.length>=19&&e.length%2==1||Nt("Invalid interpolation argument length "+e.length),pt(yn.interpolationV).callFn([ft(e)])}function pc(e){var t=e.expressions,n=e.strings;return 1===t.length&&2===n.length&&""===n[0]&&""===n[1]?1:t.length+n.length}function hc(e){return void 0===e&&(e=eo),new pu(new ml(new nl),e,new kl,null,[])}function fc(e,t){switch(e){case H.HTML:return pt(yn.sanitizeHtml);case H.SCRIPT:return pt(yn.sanitizeScript);case H.STYLE:return t?pt(yn.sanitizeStyle):null;case H.URL:return pt(yn.sanitizeUrl);case H.RESOURCE_URL:return pt(yn.sanitizeResourceUrl);default:return null}}function dc(e){return e instanceof or||e instanceof sr||e instanceof vr}function vc(e){return e.every(dc)}
|
|
357
357
|
/**
|
|
358
358
|
* @license
|
|
359
359
|
* Copyright Google Inc. All Rights Reserved.
|
|
360
360
|
*
|
|
361
361
|
* Use of this source code is governed by an MIT-style license that can be
|
|
362
362
|
* found in the LICENSE file at https://angular.io/license
|
|
363
|
-
*/var mc=[],yc=/attr\.([^\]]+)/;function gc(e,t,n){var r=new
|
|
363
|
+
*/var mc=[],yc=/attr\.([^\]]+)/;function gc(e,t,n){var r=new Bi;r.set("type",e.type),r.set("selectors",function i(e){return Ri(oe(e))}(e.selector));var o=Hi({name:e.name,type:e.type,deps:e.deps,injectFn:yn.directiveInject});return r.set("factory",o.factory),e.queries.length>0&&r.set("contentQueries",wc(e.queries,t,e.name)),e.viewQueries.length&&r.set("viewQuery",Cc(e.viewQueries,t,e.name)),r.set("hostBindings",Tc(e.host,e.typeSourceSpan,n,t,e.selector||"",e.name)),r.set("inputs",Di(e.inputs,!0)),r.set("outputs",Di(e.outputs)),null!==e.exportAs&&r.set("exportAs",ft(e.exportAs.map(function(e){return yt(e)}))),{definitionMap:r,statements:o.statements}}function _c(e,t){var n=[],r=t.providers,i=t.viewProviders;if(r||i){var o=[r||new qe([])];i&&o.push(i),n.push(pt(yn.ProvidersFeature).callFn(o))}t.usesInheritance&&n.push(pt(yn.InheritDefinitionFeature)),t.lifecycle.usesOnChanges&&n.push(pt(yn.NgOnChangesFeature).callFn(mc)),n.length&&e.set("features",ft(n))}function bc(e,t){return[Fi(e,t),yt(e.descendants),e.read||yt(null)]}function wc(e,t,n){var r,i,o=[],s=[],a=Ii(s,ki);try{for(var u=p(e),l=u.next();!l.done;l=u.next()){var c=l.value,h=f([ct("dirIndex")],bc(c,t));o.push(pt(c.static?yn.staticContentQuery:yn.contentQuery).callFn(h).toStmt());var d=a(),v=pt(yn.loadContentQuery).callFn([]),m=pt(yn.queryRefresh).callFn([d.set(v)]),y=ct(Ai).prop(c.propertyName).set(c.first?d.prop("first"):d);s.push(m.and(y).toStmt())}}catch(e){r={error:e}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}var g=n?n+"_ContentQueries":null;return vt([new je(Pi,ve),new je(Ai,null),new je("dirIndex",null)],[Zl(1,o),Zl(2,s)],fe,null,g)}function xc(e){return ht(dt(Object.keys(e).map(function(t){return{key:t,value:yt(Array.isArray(e[t])?e[t][0]:e[t]),quoted:!0}})))}function Ec(e){return e.length>0?ht(ft(e.map(function(e){return yt(e)}))):me}function Sc(e,t){var n,r=(e.selector||"").replace(/\n/g,"");return ht(pt(t,[Wi(e.type,e.typeArgumentCount),(n=r,ht(yt(n))),null!==e.exportAs?Ec(e.exportAs):me,xc(e.inputs),xc(e.outputs),Ec(e.queries.map(function(e){return e.propertyName}))]))}function Cc(e,t,n){var r=[],i=[],o=Ii(i,ki);e.forEach(function(e){var n=pt(e.static?yn.staticViewQuery:yn.viewQuery).callFn(bc(e,t));r.push(n.toStmt());var s=o(),a=pt(yn.loadViewQuery).callFn([]),u=pt(yn.queryRefresh).callFn([s.set(a)]),l=ct(Ai).prop(e.propertyName).set(e.first?s.prop("first"):s);i.push(u.and(l).toStmt())});var s=n?n+"_Query":null;return vt([new je(Pi,ve),new je(Ai,null)],[Zl(1,r),Zl(2,i)],fe,null,s)}function Tc(e,t,n,r,i,o){var s=Object.keys(e.properties).filter(function(e){var t=function n(e){return e.substring(0,5)}(e);return"style"!==t&&"class"!==t}).length,a=ct("elIndex"),u=ct(Ai),l=new Xu(a,u),c=e.specialAttributes,h=c.styleAttr,d=c.classAttr;void 0!==h&&l.registerStyleAttr(h),void 0!==d&&l.registerClassAttr(d);var v,m=[],y=[],g=s,_=t,b=Ac(e),w=function(){return v||(v=new tc(r,function(){return Nt("Unexpected node")},function(e){var t=g;return g+=e,t},function(){return Nt("Unexpected pipe")})),v},x=n.createDirectiveHostEventAsts(b,_);if(x&&x.length){var E=function S(e,t){return e.map(function(e){var n=e.name&&en(e.name),r=1===e.type?Gi(n,e.targetOrPhase):n,i=t&&n?t+"_"+r+"_HostBindingHandler":null,o=Jl(lr.fromParsedEvent(e),i);return pt(1==e.type?yn.componentHostSyntheticListener:yn.listener).callFn(o).toStmt()})}(x,o);m.push.apply(m,f(E))}(n.createBoundHostProperties(b,_)||[]).forEach(function(e){if(!l.registerInputBasedOnName(e.name,e.expression,e.sourceSpan)){var t=e.expression.visit(w()),r=Nc(u,t),o=function s(e){var t,n=e.name,r=n.match(yc);return r?(n=r[1],t=yn.attribute):e.isAnimation?(n=$i(n),t=yn.updateSyntheticHostBinding):t=yn.property,{bindingName:n,instruction:t,isAttribute:!!r}}(e),a=o.bindingName,c=o.instruction,p=o.isAttribute,h=n.calcPossibleSecurityContexts(i,a,p).filter(function(e){return e!==H.NONE}),d=null;h.length&&(d=2===h.length&&h.indexOf(H.URL)>-1&&h.indexOf(H.RESOURCE_URL)>-1?pt(yn.sanitizeUrlOrResourceUrl):fc(h[0],p));var v=[yt(a),r.currValExpr];d&&v.push(d),p||(d||v.push(yt(null)),v.push(yt(!0))),y.push.apply(y,f(r.stmts)),y.push(pt(c).callFn(v).toStmt())}});var C=function T(e){var t,n,r=[];try{for(var i=p(Object.getOwnPropertyNames(e)),o=i.next();!o.done;o=i.next()){var s=o.value,a=e[s];r.push(yt(s),a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}(e.attributes),N=l.buildHostAttrsInstruction(null,C,r);if(N&&m.push(kc(N,u,Nc)),l.hasBindings){var k=l.buildStylingInstruction(null,r);k&&m.push(kc(k,u,Nc)),l.buildUpdateLevelInstructions(w()).forEach(function(e){g+=e.allocateBindingSlots,y.push(kc(e,u,Nc))})}if(g&&m.unshift(pt(yn.allocHostVars).callFn([yt(g)]).toStmt()),m.length>0||y.length>0){var A=o?o+"_HostBindings":null,P=[];return m.length>0&&P.push(Zl(1,m)),y.length>0&&P.push(Zl(2,y)),vt([new je(Pi,ve),new je(Ai,null),new je(a.name,ve)],P,fe,null,A)}return null}function Nc(e,t){return ls(null,e,t,"b",ts.TrySimple,function(){return Nt("Unexpected interpolation")})}function kc(e,t,n){var r=e.buildParams(function(e){return n(t,e).currValExpr});return pt(e.reference,null,e.sourceSpan).callFn(r,e.sourceSpan).toStmt()}function Ac(e){return{hostAttributes:{},hostListeners:e.listeners,hostProperties:e.properties}}var Pc=/^(?:\[([^\]]+)\])|(?:\(([^\)]+)\))$/,Ic=function(){function e(){}return e.prototype.get=function(e){return""},e}(),Mc=function(){function e(e){void 0===e&&(e=new yo),this.jitEvaluator=e,this.R3ResolvedDependencyType=Vi,this.ResourceLoader=Ic,this.elementSchemaRegistry=new kl}return e.prototype.compilePipe=function(e,t,n){var r=function i(e){var t=[];t.push({key:"name",value:yt(e.pipeName),quoted:!1}),t.push({key:"type",value:e.type,quoted:!1});var n=Hi({name:e.name,type:e.type,deps:e.deps,injectFn:yn.directiveInject});return t.push({key:"factory",value:n.factory,quoted:!1}),t.push({key:"pure",value:yt(e.pure),quoted:!1}),{expression:pt(yn.definePipe).callFn([dt(t)]),type:new ce(pt(yn.PipeDefWithMeta,[Wi(e.type,e.typeArgumentCount),new ce(new Me(e.pipeName))])),statements:n.statements}}({name:n.name,type:new Se(n.type),typeArgumentCount:n.typeArgumentCount,deps:Uc(n.deps),pipeName:n.pipeName,pure:n.pure});return this.jitExpression(r.expression,e,t,r.statements)},e.prototype.compileInjectable=function(e,t,n){var r,i=function o(e){var t=null,n={name:e.name,type:e.type,deps:e.ctorDeps,injectFn:$t.inject};if(void 0!==e.useClass){var r=e.useClass.isEquivalent(e.type),i=void 0;void 0!==e.userDeps&&(i=e.userDeps),t=Hi(void 0!==i?a({},n,{delegate:e.useClass,delegateDeps:i,delegateType:ji.Class}):r?n:a({},n,{delegate:e.useClass,delegateType:ji.Factory}))}else t=Hi(void 0!==e.useFactory?a({},n,{delegate:e.useFactory,delegateDeps:e.userDeps||[],delegateType:ji.Function}):void 0!==e.useValue?a({},n,{expression:e.useValue}):void 0!==e.useExisting?a({},n,{expression:pt($t.inject).callFn([e.useExisting])}):n);var o=e.type,s=e.providedIn;return{expression:pt($t.ɵɵdefineInjectable).callFn([zi({token:o,factory:t.factory,providedIn:s})]),type:new ce(pt($t.InjectableDef,[Wi(e.type,e.typeArgumentCount)])),statements:t.statements}}({name:n.name,type:new Se(n.type),typeArgumentCount:n.typeArgumentCount,providedIn:(r=n.providedIn,null==r||"string"==typeof r?new Me(r):new Se(r)),useClass:Bc(n,Oc),useFactory:Bc(n,Rc),useValue:Bc(n,Dc),useExisting:Bc(n,Lc),ctorDeps:Uc(n.ctorDeps),userDeps:Uc(n.userDeps)||void 0});return this.jitExpression(i.expression,e,t,i.statements)},e.prototype.compileInjector=function(e,t,n){var r=function i(e){var t=Hi({name:e.name,type:e.type,deps:e.deps,injectFn:yn.inject}),n={factory:t.factory};return null!==e.providers&&(n.providers=e.providers),e.imports.length>0&&(n.imports=ft(e.imports)),{expression:pt(yn.defineInjector).callFn([zi(n)]),type:new ce(pt(yn.InjectorDef,[new ce(e.type)])),statements:t.statements}}({name:n.name,type:new Se(n.type),deps:Uc(n.deps),providers:new Se(n.providers),imports:n.imports.map(function(e){return new Se(e)})});return this.jitExpression(r.expression,e,t,r.statements)},e.prototype.compileNgModule=function(e,t,n){var r=
|
|
364
364
|
/**
|
|
365
365
|
* @license
|
|
366
366
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -368,21 +368,21 @@ function Wl(e,t){e.i18n=t}var Ql=function(){function e(e,t){void 0===e&&(e=fi),v
|
|
|
368
368
|
* Use of this source code is governed by an MIT-style license that can be
|
|
369
369
|
* found in the LICENSE file at https://angular.io/license
|
|
370
370
|
*/
|
|
371
|
-
function i(e){var t=e.type,n=e.bootstrap,r=e.declarations,i=e.imports,o=e.exports,s=e.schemas,a=e.containsForwardDecls,u=e.emitInline,l=e.id,c=[],p={type:t};if(n.length&&(p.bootstrap=wo(n,a)),u)r.length&&(p.declarations=wo(r,a)),i.length&&(p.imports=wo(i,a)),o.length&&(p.exports=wo(o,a));else{var h=function f(e){var t=e.type,n=e.declarations,r=e.imports,i=e.exports,o=e.containsForwardDecls,s={};return n.length&&(s.declarations=wo(n,o)),r.length&&(s.imports=wo(r,o)),i.length&&(s.exports=wo(i,o)),0===Object.keys(s).length?null:new Pe(pt(yn.setNgModuleScope),[t,
|
|
371
|
+
function i(e){var t=e.type,n=e.bootstrap,r=e.declarations,i=e.imports,o=e.exports,s=e.schemas,a=e.containsForwardDecls,u=e.emitInline,l=e.id,c=[],p={type:t};if(n.length&&(p.bootstrap=wo(n,a)),u)r.length&&(p.declarations=wo(r,a)),i.length&&(p.imports=wo(i,a)),o.length&&(p.exports=wo(o,a));else{var h=function f(e){var t=e.type,n=e.declarations,r=e.imports,i=e.exports,o=e.containsForwardDecls,s={};return n.length&&(s.declarations=wo(n,o)),r.length&&(s.imports=wo(r,o)),i.length&&(s.exports=wo(i,o)),0===Object.keys(s).length?null:new Pe(pt(yn.setNgModuleScope),[t,zi(s)],void 0,void 0,!0).toStmt()}(e);null!==h&&c.push(h)}return s&&s.length&&(p.schemas=ft(s.map(function(e){return e.value}))),l&&(p.id=l),{expression:pt(yn.defineNgModule).callFn([zi(p)]),type:new ce(pt(yn.NgModuleDefWithMeta,[new ce(t),bo(r),bo(i),bo(o)])),additionalStatements:c}}({type:new Se(n.type),bootstrap:n.bootstrap.map(Fc),declarations:n.declarations.map(Fc),imports:n.imports.map(Fc),exports:n.exports.map(Fc),emitInline:!0,containsForwardDecls:!1,schemas:n.schemas?n.schemas.map(Fc):null,id:n.id?new Se(n.id):null});return this.jitExpression(r.expression,e,t,[])},e.prototype.compileDirective=function(e,t,n){var r=new qt,i=hc(),o=function s(e,t,n){var r=gc(e,t,n),i=r.definitionMap,o=r.statements;_c(i,e);var s=pt(yn.defineDirective).callFn([i.toLiteralMap()]);if(!e.selector)throw new Error("Directive "+e.name+" has no selector, please add it!");return{expression:s,type:Sc(e,yn.DirectiveDefWithMeta),statements:o}}(Vc(n),r,i),a=f(r.statements,o.statements);return this.jitExpression(o.expression,e,t,a)},e.prototype.compileComponent=function(e,t,n){var r=new qt,i=n.interpolation?Ji.fromArray(n.interpolation):eo,o=function s(e,t,n){void 0===n&&(n={});var r=n.interpolationConfig,i=n.preserveWhitespaces,o=hc(r),s=(new Sa).parse(e,t,a({leadingTriviaChars:Yl},n,{tokenizeExpansionForms:!0}));if(s.errors&&s.errors.length>0)return{errors:s.errors,nodes:[],styleUrls:[],styles:[]};var u=s.rootNodes;u=Js(new Ql(r,!i),u),i||(u=Js(new Pa,u),u=Js(new Ql(r,!1),u));var l=function c(e,t){var n=new Il(t),r=Js(n,e),i=t.errors.concat(n.errors),o=i.filter(function(e){return e.level===er.ERROR});if(o.length>0)throw kt("Template parse errors:\n"+o.join("\n"),o);return{nodes:r,errors:i,styleUrls:n.styleUrls,styles:n.styles}}(u,o),p=l.errors;return p&&p.length>0?{errors:p,nodes:[],styleUrls:[],styles:[]}:{nodes:l.nodes,styleUrls:l.styleUrls,styles:l.styles}}(n.template,t,{preserveWhitespaces:n.preserveWhitespaces,interpolationConfig:i});if(void 0!==o.errors){var u=o.errors.map(function(e){return e.toString()}).join(", ");throw new Error("Errors during JIT compilation of template for "+n.name+": "+u)}var l=function c(e,t,n){var r,i,o=gc(e,t,n),s=o.definitionMap,a=o.statements;_c(s,e);var u=e.selector&&A.parse(e.selector),l=u&&u[0];if(l){var c=l.getAttrs();c.length&&s.set("attrs",t.getConstLiteral(ft(c.map(function(e){return yt(null!=e?e:void 0)})),!0))}var h=null;if(e.directives.length>0){var f=new P;try{for(var d=p(e.directives),v=d.next();!v.done;v=d.next()){var m=v.value,y=m.expression;f.addSelectables(A.parse(m.selector),y)}}catch(e){r={error:e}}finally{try{v&&!v.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}h=f}var g=e.name,_=g?g+"_Template":null,b=new Set,w=new Set,x=e.changeDetection,E=e.template,S=new ec(t,uc.ROOT_SCOPE,0,g,null,null,_,h,b,e.pipes,w,yn.namespaceHTML,e.relativeContextFilePath,e.i18nUseExternalIds),C=S.buildTemplateFunction(E.nodes,[]),k=S.getNgContentSelectors();if(k&&s.set("ngContentSelectors",k),s.set("consts",yt(S.getConstCount())),s.set("vars",yt(S.getVarCount())),s.set("template",C),b.size){var I=ft(Array.from(b));e.wrapDirectivesAndPipesInClosure&&(I=vt([],[new Je(I)])),s.set("directives",I)}if(w.size){var M=ft(Array.from(w));e.wrapDirectivesAndPipesInClosure&&(M=vt([],[new Je(M)])),s.set("pipes",M)}if(null===e.encapsulation&&(e.encapsulation=T.Emulated),e.styles&&e.styles.length){var O=(e.encapsulation==T.Emulated?function R(e,t,n){var r=new _s;return e.map(function(e){return r.shimCssText(e,t,n)})}
|
|
372
372
|
/**
|
|
373
373
|
* @license
|
|
374
374
|
* Copyright Google Inc. All Rights Reserved.
|
|
375
375
|
*
|
|
376
376
|
* Use of this source code is governed by an MIT-style license that can be
|
|
377
377
|
* found in the LICENSE file at https://angular.io/license
|
|
378
|
-
*/(e.styles,"_ngcontent-%COMP%","_nghost-%COMP%"):e.styles).map(function(e){return yt(e)});s.set("styles",ft(O))}else e.encapsulation===T.Emulated&&(e.encapsulation=T.None);return e.encapsulation!==T.Emulated&&s.set("encapsulation",yt(e.encapsulation)),null!==e.animations&&s.set("data",dt([{key:"animation",value:e.animations,quoted:!1}])),null!=x&&x!==N.Default&&s.set("changeDetection",yt(x)),(e.selector||"").replace(/\n/g,""),{expression:pt(yn.defineComponent).callFn([s.toLiteralMap()]),type:Sc(e,yn.ComponentDefWithMeta),statements:a}}(a({},n,Vc(n),{selector:n.selector||this.elementSchemaRegistry.getDefaultComponentElementName(),template:o,wrapDirectivesAndPipesInClosure:!1,styles:n.styles||[],encapsulation:n.encapsulation,interpolation:i,changeDetection:n.changeDetection,animations:null!=n.animations?new Se(n.animations):null,viewProviders:null!=n.viewProviders?new Se(n.viewProviders):null,relativeContextFilePath:"",i18nUseExternalIds:!0}),r,hc(i)),h=f(r.statements,l.statements);return this.jitExpression(l.expression,e,"ng:///"+n.name+".js",h)},e.prototype.compileBase=function(e,t,n){var r=new qt,i=this.createParseSourceSpan("Base",n.name,"ng:///"+n.name+".js"),o=function s(e,t,n){var r=new
|
|
378
|
+
*/(e.styles,"_ngcontent-%COMP%","_nghost-%COMP%"):e.styles).map(function(e){return yt(e)});s.set("styles",ft(O))}else e.encapsulation===T.Emulated&&(e.encapsulation=T.None);return e.encapsulation!==T.Emulated&&s.set("encapsulation",yt(e.encapsulation)),null!==e.animations&&s.set("data",dt([{key:"animation",value:e.animations,quoted:!1}])),null!=x&&x!==N.Default&&s.set("changeDetection",yt(x)),(e.selector||"").replace(/\n/g,""),{expression:pt(yn.defineComponent).callFn([s.toLiteralMap()]),type:Sc(e,yn.ComponentDefWithMeta),statements:a}}(a({},n,Vc(n),{selector:n.selector||this.elementSchemaRegistry.getDefaultComponentElementName(),template:o,wrapDirectivesAndPipesInClosure:!1,styles:n.styles||[],encapsulation:n.encapsulation,interpolation:i,changeDetection:n.changeDetection,animations:null!=n.animations?new Se(n.animations):null,viewProviders:null!=n.viewProviders?new Se(n.viewProviders):null,relativeContextFilePath:"",i18nUseExternalIds:!0}),r,hc(i)),h=f(r.statements,l.statements);return this.jitExpression(l.expression,e,"ng:///"+n.name+".js",h)},e.prototype.compileBase=function(e,t,n){var r=new qt,i=this.createParseSourceSpan("Base",n.name,"ng:///"+n.name+".js"),o=function s(e,t,n){var r=new Bi;if(e.inputs){var i=e.inputs,o=Object.keys(i).map(function(e){var t=i[e];return{key:e,value:Array.isArray(t)?ft(t.map(function(e){return yt(e)})):yt(t),quoted:!1}});r.set("inputs",dt(o))}if(e.outputs){var s=e.outputs,a=Object.keys(s).map(function(e){return{key:e,value:yt(s[e]),quoted:!1}});r.set("outputs",dt(a))}return e.viewQueries&&e.viewQueries.length>0&&r.set("viewQuery",Cc(e.viewQueries,t)),e.queries&&e.queries.length>0&&r.set("contentQueries",wc(e.queries,t)),e.host&&r.set("hostBindings",Tc(e.host,e.typeSourceSpan,n,t,e.name)),{expression:pt(yn.defineBase).callFn([r.toLiteralMap()]),type:new ce(pt(yn.BaseDef))}}(a({},n,{typeSourceSpan:i,viewQueries:n.viewQueries?n.viewQueries.map(jc):n.viewQueries,queries:n.queries?n.queries.map(jc):n.queries,host:qc(n.propMetadata,i)}),r,hc());return this.jitExpression(o.expression,e,t,r.statements)},e.prototype.createParseSourceSpan=function(e,t,n){return function r(e,t,n){var r=new nr("","in "+e+" "+t+" in "+n);return new rr(new tr(r,-1,-1,-1),new tr(r,-1,-1,-1))}
|
|
379
379
|
/**
|
|
380
380
|
* @license
|
|
381
381
|
* Copyright Google Inc. All Rights Reserved.
|
|
382
382
|
*
|
|
383
383
|
* Use of this source code is governed by an MIT-style license that can be
|
|
384
384
|
* found in the LICENSE file at https://angular.io/license
|
|
385
|
-
*/(e,t,n)},e.prototype.jitExpression=function(e,t,n,r){var i=f(r,[new Xe("$def",e,void 0,[ke.Exported])]);return this.jitEvaluator.evaluateStatements(n,i,new _o(t),!0).$def},e}(),Oc=Object.keys({useClass:null})[0],Rc=Object.keys({useFactory:null})[0],Dc=Object.keys({useValue:null})[0],Lc=Object.keys({useExisting:null})[0],Fc=function(e){var t=new Se(e);return{value:t,type:t}};function jc(e){return a({},e,{predicate:Array.isArray(e.predicate)?e.predicate:new Se(e.predicate),read:e.read?new Se(e.read):null,static:e.static})}function Vc(e){var t=Kc(e.inputs||[]),n=Kc(e.outputs||[]),r=e.propMetadata,i={},o={},s=function(e){r.hasOwnProperty(e)&&r[e].forEach(function(t){!function n(e){return"Input"===e.ngMetadataName}(t)?function r(e){return"Output"===e.ngMetadataName}(t)&&(o[e]=t.bindingPropertyName||e):i[e]=t.bindingPropertyName?[t.bindingPropertyName,e]:e})};for(var u in r)s(u);return a({},e,{typeSourceSpan:e.typeSourceSpan,type:new Se(e.type),deps:Uc(e.deps),host:qc(e.propMetadata,e.typeSourceSpan,e.host),inputs:a({},t,i),outputs:a({},n,o),queries:e.queries.map(jc),providers:null!=e.providers?new Se(e.providers):null,viewQueries:e.viewQueries.map(jc)})}function Bc(e,t){return e.hasOwnProperty(t)?new Se(e[t]):void 0}function Hc(e){return{token:null===e.token?new Me(null):e.resolved===
|
|
385
|
+
*/(e,t,n)},e.prototype.jitExpression=function(e,t,n,r){var i=f(r,[new Xe("$def",e,void 0,[ke.Exported])]);return this.jitEvaluator.evaluateStatements(n,i,new _o(t),!0).$def},e}(),Oc=Object.keys({useClass:null})[0],Rc=Object.keys({useFactory:null})[0],Dc=Object.keys({useValue:null})[0],Lc=Object.keys({useExisting:null})[0],Fc=function(e){var t=new Se(e);return{value:t,type:t}};function jc(e){return a({},e,{predicate:Array.isArray(e.predicate)?e.predicate:new Se(e.predicate),read:e.read?new Se(e.read):null,static:e.static})}function Vc(e){var t=Kc(e.inputs||[]),n=Kc(e.outputs||[]),r=e.propMetadata,i={},o={},s=function(e){r.hasOwnProperty(e)&&r[e].forEach(function(t){!function n(e){return"Input"===e.ngMetadataName}(t)?function r(e){return"Output"===e.ngMetadataName}(t)&&(o[e]=t.bindingPropertyName||e):i[e]=t.bindingPropertyName?[t.bindingPropertyName,e]:e})};for(var u in r)s(u);return a({},e,{typeSourceSpan:e.typeSourceSpan,type:new Se(e.type),deps:Uc(e.deps),host:qc(e.propMetadata,e.typeSourceSpan,e.host),inputs:a({},t,i),outputs:a({},n,o),queries:e.queries.map(jc),providers:null!=e.providers?new Se(e.providers):null,viewQueries:e.viewQueries.map(jc)})}function Bc(e,t){return e.hasOwnProperty(t)?new Se(e[t]):void 0}function Hc(e){return{token:null===e.token?new Me(null):e.resolved===Vi.Attribute?new Me(e.token):new Se(e.token),resolved:e.resolved,host:e.host,optional:e.optional,self:e.self,skipSelf:e.skipSelf}}function Uc(e){return null==e?null:e.map(Hc)}function qc(e,t,n){var r=function i(e){var t,n,r={},i={},o={},s={};try{for(var a=p(Object.keys(e)),u=a.next();!u.done;u=a.next()){var l=u.value,c=e[l],h=l.match(Pc);if(null===h)switch(l){case"class":if("string"!=typeof c)throw new Error("Class binding must be string");s.classAttr=c;break;case"style":if("string"!=typeof c)throw new Error("Style binding must be string");s.styleAttr=c;break;default:r[l]="string"==typeof c?yt(c):c}else if(null!=h[1]){if("string"!=typeof c)throw new Error("Property binding must be string");o[h[1]]=c}else if(null!=h[2]){if("string"!=typeof c)throw new Error("Event binding must be string");i[h[2]]=c}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return{attributes:r,listeners:i,properties:o,specialAttributes:s}}(n||{}),o=function s(e,t){var n=Ac(e),r=hc();return r.createDirectiveHostEventAsts(n,t),r.createBoundHostProperties(n,t),r.errors}(r,t);if(o.length)throw new Error(o.map(function(e){return e.msg}).join("\n"));var a=function(t){e.hasOwnProperty(t)&&e[t].forEach(function(e){!function n(e){return"HostBinding"===e.ngMetadataName}(e)?function i(e){return"HostListener"===e.ngMetadataName}(e)&&(r.listeners[e.eventName||t]=t+"("+(e.args||[]).join(",")+")"):r.properties[e.hostPropertyName||t]=t})};for(var u in e)a(u);return r}function Kc(e){return e.reduce(function(e,t){var n=h(t.split(",").map(function(e){return e.trim()}),2),r=n[0];return e[r]=n[1]||r,e},{})}new Ft("8.1.2");
|
|
386
386
|
/**
|
|
387
387
|
* @license
|
|
388
388
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -404,21 +404,21 @@ var zc=function zc(e){var t=void 0===e?{}:e,n=t.defaultEncapsulation,r=t.useJit,
|
|
|
404
404
|
*
|
|
405
405
|
* Use of this source code is governed by an MIT-style license that can be
|
|
406
406
|
* found in the LICENSE file at https://angular.io/license
|
|
407
|
-
*/var Qc=function(){function e(e,t,n,r){this._resourceLoader=e,this._urlResolver=t,this._htmlParser=n,this._config=r,this._resourceLoaderCache=new Map}return e.prototype.clearCache=function(){this._resourceLoaderCache.clear()},e.prototype.clearCacheFor=function(e){var t=this;if(e.isComponent){var n=e.template;this._resourceLoaderCache.delete(n.templateUrl),n.externalStylesheets.forEach(function(e){t._resourceLoaderCache.delete(e.moduleUrl)})}},e.prototype._fetch=function(e){var t=this._resourceLoaderCache.get(e);return t||(t=this._resourceLoader.get(e),this._resourceLoaderCache.set(e,t)),t},e.prototype.normalizeTemplate=function(e){var t=this;if(Et(e.template)){if(Et(e.templateUrl))throw kt("'"+Rt(e.componentType)+"' component cannot define both template and templateUrl");if("string"!=typeof e.template)throw kt("The template specified for component "+Rt(e.componentType)+" is not a string")}else{if(!Et(e.templateUrl))throw kt("No template specified for component "+Rt(e.componentType));if("string"!=typeof e.templateUrl)throw kt("The templateUrl specified for component "+Rt(e.componentType)+" is not a string")}if(Et(e.preserveWhitespaces)&&"boolean"!=typeof e.preserveWhitespaces)throw kt("The preserveWhitespaces option for component "+Rt(e.componentType)+" must be a boolean");return Tt(this._preParseTemplate(e),function(n){return t._normalizeTemplateMetadata(e,n)})},e.prototype._preParseTemplate=function(e){var t,n,r=this;return null!=e.template?(t=e.template,n=e.moduleUrl):(n=this._urlResolver.resolve(e.moduleUrl,e.templateUrl),t=this._fetch(n)),Tt(t,function(t){return r._preparseLoadedTemplate(e,t,n)})},e.prototype._preparseLoadedTemplate=function(e,t,n){var r=!!e.template,i=
|
|
407
|
+
*/var Qc=function(){function e(e,t,n,r){this._resourceLoader=e,this._urlResolver=t,this._htmlParser=n,this._config=r,this._resourceLoaderCache=new Map}return e.prototype.clearCache=function(){this._resourceLoaderCache.clear()},e.prototype.clearCacheFor=function(e){var t=this;if(e.isComponent){var n=e.template;this._resourceLoaderCache.delete(n.templateUrl),n.externalStylesheets.forEach(function(e){t._resourceLoaderCache.delete(e.moduleUrl)})}},e.prototype._fetch=function(e){var t=this._resourceLoaderCache.get(e);return t||(t=this._resourceLoader.get(e),this._resourceLoaderCache.set(e,t)),t},e.prototype.normalizeTemplate=function(e){var t=this;if(Et(e.template)){if(Et(e.templateUrl))throw kt("'"+Rt(e.componentType)+"' component cannot define both template and templateUrl");if("string"!=typeof e.template)throw kt("The template specified for component "+Rt(e.componentType)+" is not a string")}else{if(!Et(e.templateUrl))throw kt("No template specified for component "+Rt(e.componentType));if("string"!=typeof e.templateUrl)throw kt("The templateUrl specified for component "+Rt(e.componentType)+" is not a string")}if(Et(e.preserveWhitespaces)&&"boolean"!=typeof e.preserveWhitespaces)throw kt("The preserveWhitespaces option for component "+Rt(e.componentType)+" must be a boolean");return Tt(this._preParseTemplate(e),function(n){return t._normalizeTemplateMetadata(e,n)})},e.prototype._preParseTemplate=function(e){var t,n,r=this;return null!=e.template?(t=e.template,n=e.moduleUrl):(n=this._urlResolver.resolve(e.moduleUrl,e.templateUrl),t=this._fetch(n)),Tt(t,function(t){return r._preparseLoadedTemplate(e,t,n)})},e.prototype._preparseLoadedTemplate=function(e,t,n){var r=!!e.template,i=Ji.fromArray(e.interpolation),o=function s(e,t,n){var r;return r=n.isInline?t.type.reference instanceof Yt?t.type.reference.filePath+"."+t.type.reference.name+".html":rn(e)+"/"+rn(t.type)+".html":n.templateUrl,t.type.reference instanceof Yt?r:function i(e){return e.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/,"ng:///")}(r)}({reference:e.ngModuleType},{type:{reference:e.componentType}},{isInline:r,templateUrl:n}),a=this._htmlParser.parse(t,o,{tokenizeExpansionForms:!0,interpolationConfig:i});if(a.errors.length>0)throw kt("Template parse errors:\n"+a.errors.join("\n"));var u=this._normalizeStylesheet(new an({styles:e.styles,moduleUrl:e.moduleUrl})),l=new $c;Js(l,a.rootNodes);var c=this._normalizeStylesheet(new an({styles:l.styles,styleUrls:l.styleUrls,moduleUrl:n}));return{template:t,templateUrl:n,isInline:r,htmlAst:a,styles:u.styles.concat(c.styles),inlineStyleUrls:u.styleUrls.concat(c.styleUrls),styleUrls:this._normalizeStylesheet(new an({styleUrls:e.styleUrls,moduleUrl:e.moduleUrl})).styleUrls,ngContentSelectors:l.ngContentSelectors}},e.prototype._normalizeTemplateMetadata=function(e,t){var n=this;return Tt(this._loadMissingExternalStylesheets(t.styleUrls.concat(t.inlineStyleUrls)),function(r){return n._normalizeLoadedTemplateMetadata(e,t,r)})},e.prototype._normalizeLoadedTemplateMetadata=function(e,t,n){var r=this,i=f(t.styles);this._inlineStyles(t.inlineStyleUrls,n,i);var o=t.styleUrls,s=o.map(function(e){var t=n.get(e),i=f(t.styles);return r._inlineStyles(t.styleUrls,n,i),new an({moduleUrl:e,styles:i})}),a=e.encapsulation;return null==a&&(a=this._config.defaultEncapsulation),a===T.Emulated&&0===i.length&&0===o.length&&(a=T.None),new un({encapsulation:a,template:t.template,templateUrl:t.templateUrl,htmlAst:t.htmlAst,styles:i,styleUrls:o,ngContentSelectors:t.ngContentSelectors,animations:e.animations,interpolation:e.interpolation,isInline:t.isInline,externalStylesheets:s,preserveWhitespaces:Wc(e.preserveWhitespaces,this._config.preserveWhitespaces)})},e.prototype._inlineStyles=function(e,t,n){var r=this;e.forEach(function(e){var i=t.get(e);i.styles.forEach(function(e){return n.push(e)}),r._inlineStyles(i.styleUrls,t,n)})},e.prototype._loadMissingExternalStylesheets=function(e,t){var n,r=this;return void 0===t&&(t=new Map),Tt((n=e.filter(function(e){return!t.has(e)}).map(function(e){return Tt(r._fetch(e),function(n){var i=r._normalizeStylesheet(new an({styles:[n],moduleUrl:e}));return t.set(e,i),r._loadMissingExternalStylesheets(i.styleUrls,t)})})).some(Lt)?Promise.all(n):n,function(e){return t})},e.prototype._normalizeStylesheet=function(e){var t=this,n=e.moduleUrl,r=e.styleUrls.filter(au).map(function(e){return t._urlResolver.resolve(n,e)}),i=e.styles.map(function(e){var i=function o(e,t,n){var r=[],i=n.replace(lu,"").replace(uu,function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=n[1]||n[2];return au(o)?(r.push(e.resolve(t,o)),""):n[0]});return new su(i,r)}(t._urlResolver,n,e);return r.push.apply(r,f(i.styleUrls)),i.style});return new an({styles:i,styleUrls:r,moduleUrl:n})},e}(),$c=function(){function e(){this.ngContentSelectors=[],this.styles=[],this.styleUrls=[],this.ngNonBindableStackCount=0}return e.prototype.visitElement=function(e,t){var n=Cu(e);switch(n.type){case vu.NG_CONTENT:0===this.ngNonBindableStackCount&&this.ngContentSelectors.push(n.selectAttr);break;case vu.STYLE:var r="";e.children.forEach(function(e){e instanceof Qs&&(r+=e.value)}),this.styles.push(r);break;case vu.STYLESHEET:this.styleUrls.push(n.hrefAttr)}return n.nonBindable&&this.ngNonBindableStackCount++,Js(this,e.children),n.nonBindable&&this.ngNonBindableStackCount--,null},e.prototype.visitExpansion=function(e,t){Js(this,e.cases)},e.prototype.visitExpansionCase=function(e,t){Js(this,e.expression)},e.prototype.visitComment=function(e,t){return null},e.prototype.visitAttribute=function(e,t){return null},e.prototype.visitText=function(e,t){return null},e}(),Gc=[V,j,F,L],Xc=function(){function e(e){this._reflector=e}return e.prototype.isDirective=function(e){var t=this._reflector.annotations(Dt(e));return t&&t.some(Yc)},e.prototype.resolve=function(e,t){void 0===t&&(t=!0);var n=this._reflector.annotations(Dt(e));if(n){var r=Zc(n,Yc);if(r){var i=this._reflector.propMetadata(e),o=this._reflector.guards(e);return this._mergeWithPropertyMetadata(r,i,o,e)}}if(t)throw new Error("No Directive annotation found on "+Rt(e));return null},e.prototype._mergeWithPropertyMetadata=function(e,t,n,r){var i=[],o=[],s={},a={};return Object.keys(t).forEach(function(e){var n=Zc(t[e],function(e){return W.isTypeOf(e)});n&&i.push(n.bindingPropertyName?e+": "+n.bindingPropertyName:e);var r=Zc(t[e],function(e){return Q.isTypeOf(e)});r&&o.push(r.bindingPropertyName?e+": "+r.bindingPropertyName:e),t[e].filter(function(e){return $.isTypeOf(e)}).forEach(function(t){if(t.hostPropertyName){var n=t.hostPropertyName[0];if("("===n)throw new Error("@HostBinding can not bind to events. Use @HostListener instead.");if("["===n)throw new Error("@HostBinding parameter should be a property name, 'class.<name>', or 'attr.<name>'.");s["["+t.hostPropertyName+"]"]=e}else s["["+e+"]"]=e}),t[e].filter(function(e){return G.isTypeOf(e)}).forEach(function(t){s["("+t.eventName+")"]=e+"("+(t.args||[]).join(",")+")"});var u=Zc(t[e],function(e){return Gc.some(function(t){return t.isTypeOf(e)})});u&&(a[e]=u)}),this._merge(e,i,o,s,a,n,r)},e.prototype._extractPublicName=function(e){return bt(e,[null,e])[1].trim()},e.prototype._dedupeBindings=function(e){for(var t=new Set,n=new Set,r=[],i=e.length-1;i>=0;i--){var o=e[i],s=this._extractPublicName(o);n.add(s),t.has(s)||(t.add(s),r.push(o))}return r.reverse()},e.prototype._merge=function(e,t,n,r,i,o,s){var u=this._dedupeBindings(e.inputs?e.inputs.concat(t):t),l=this._dedupeBindings(e.outputs?e.outputs.concat(n):n),c=e.host?a({},e.host,r):r,p=e.queries?a({},e.queries,i):i;return K.isTypeOf(e)?K({selector:e.selector,inputs:u,outputs:l,host:c,exportAs:e.exportAs,moduleId:e.moduleId,queries:p,changeDetection:e.changeDetection,providers:e.providers,viewProviders:e.viewProviders,entryComponents:e.entryComponents,template:e.template,templateUrl:e.templateUrl,styles:e.styles,styleUrls:e.styleUrls,encapsulation:e.encapsulation,animations:e.animations,interpolation:e.interpolation,preserveWhitespaces:e.preserveWhitespaces}):B({selector:e.selector,inputs:u,outputs:l,host:c,exportAs:e.exportAs,queries:p,providers:e.providers,guards:o})},e}();function Yc(e){return B.isTypeOf(e)||K.isTypeOf(e)}function Zc(e,t){for(var n=e.length-1;n>=0;n--)if(t(e[n]))return e[n];return null}
|
|
408
408
|
/**
|
|
409
409
|
* @license
|
|
410
410
|
* Copyright Google Inc. All Rights Reserved.
|
|
411
411
|
*
|
|
412
412
|
* Use of this source code is governed by an MIT-style license that can be
|
|
413
413
|
* found in the LICENSE file at https://angular.io/license
|
|
414
|
-
*/var Jc,ep=function(e){function t(t,n){return e.call(this,t,n)||this}return o(t,e),t}(
|
|
414
|
+
*/var Jc,ep=function(e){function t(t,n){return e.call(this,t,n)||this}return o(t,e),t}(ir),tp=/^i18n:?/,np="|",rp="@@",ip=!1,op=function op(e,t){this.messages=e,this.errors=t};
|
|
415
415
|
/**
|
|
416
416
|
* @license
|
|
417
417
|
* Copyright Google Inc. All Rights Reserved.
|
|
418
418
|
*
|
|
419
419
|
* Use of this source code is governed by an MIT-style license that can be
|
|
420
420
|
* found in the LICENSE file at https://angular.io/license
|
|
421
|
-
*/!function(e){e[e.Extract=0]="Extract",e[e.Merge=1]="Merge"}(Jc||(Jc={}));var sp=function(){function e(e,t){this._implicitTags=e,this._implicitAttrs=t}return e.prototype.extract=function(e,t){var n=this;return this._init(Jc.Extract,t),e.forEach(function(e){return e.visit(n,null)}),this._inI18nBlock&&this._reportError(e[e.length-1],"Unclosed block"),new op(this._messages,this._errors)},e.prototype.merge=function(e,t,n){this._init(Jc.Merge,n),this._translations=t;var r=new Ys("wrapper",[],e,void 0,void 0,void 0).visit(this,null);return this._inI18nBlock&&this._reportError(e[e.length-1],"Unclosed block"),new ba(r.children,this._errors)},e.prototype.visitExpansionCase=function(e,t){var n=Js(this,e.expression,t);if(this._mode===Jc.Merge)return new Gs(e.value,n,e.sourceSpan,e.valueSourceSpan,e.expSourceSpan)},e.prototype.visitExpansion=function(e,t){this._mayBeAddBlockChildren(e);var n=this._inIcu;this._inIcu||(this._isInTranslatableSection&&this._addMessage([e]),this._inIcu=!0);var r=Js(this,e.cases,t);return this._mode===Jc.Merge&&(e=new $s(e.switchValue,e.type,r,e.sourceSpan,e.switchValueSourceSpan)),this._inIcu=n,e},e.prototype.visitComment=function(e,t){var n=function r(e){return!!(e instanceof Zs&&e.value&&e.value.startsWith("i18n"))}(e);if(n&&this._isInTranslatableSection)this._reportError(e,"Could not start a block inside a translatable section");else{var i=function o(e){return!!(e instanceof Zs&&e.value&&"/i18n"===e.value)}(e);if(!i||this._inI18nBlock){if(!this._inI18nNode&&!this._inIcu)if(this._inI18nBlock){if(i){if(this._depth==this._blockStartDepth){this._closeTranslatableSection(e,this._blockChildren),this._inI18nBlock=!1;var s=this._addMessage(this._blockChildren,this._blockMeaningAndDesc);return Js(this,this._translateMessage(e,s))}return void this._reportError(e,"I18N blocks should not cross element boundaries")}}else n&&(!ip&&console&&console.warn&&(ip=!0,console.warn("I18n comments are deprecated, use an <ng-container> element instead ("+e.sourceSpan.start+(e.sourceSpan.details?", "+e.sourceSpan.details:"")+")")),this._inI18nBlock=!0,this._blockStartDepth=this._depth,this._blockChildren=[],this._blockMeaningAndDesc=e.value.replace(tp,"").trim(),this._openTranslatableSection(e))}else this._reportError(e,"Trying to close an unopened block")}},e.prototype.visitText=function(e,t){return this._isInTranslatableSection&&this._mayBeAddBlockChildren(e),e},e.prototype.visitElement=function(e,t){var n=this;this._mayBeAddBlockChildren(e),this._depth++;var r=this._inI18nNode,i=this._inImplicitNode,o=[],s=void 0,a=function u(e){return e.attrs.find(function(e){return"i18n"===e.name})||null}(e),l=a?a.value:"",c=this._implicitTags.some(function(t){return e.name===t})&&!this._inIcu&&!this._isInTranslatableSection,p=!i&&c;if(this._inImplicitNode=i||c,this._isInTranslatableSection||this._inIcu)(a||p)&&this._reportError(e,"Could not mark an element as translatable inside a translatable section"),this._mode==Jc.Extract&&Js(this,e.children);else{if(a||p){this._inI18nNode=!0;var h=this._addMessage(e.children,l);s=this._translateMessage(e,h)}if(this._mode==Jc.Extract){var f=a||p;f&&this._openTranslatableSection(e),Js(this,e.children),f&&this._closeTranslatableSection(e,e.children)}}if(this._mode===Jc.Merge&&(s||e.children).forEach(function(e){var r=e.visit(n,t);r&&!n._isInTranslatableSection&&(o=o.concat(r))}),this._visitAttributesOf(e),this._depth--,this._inI18nNode=r,this._inImplicitNode=i,this._mode===Jc.Merge){var d=this._translateAttributes(e);return new Ys(e.name,d,o,e.sourceSpan,e.startSourceSpan,e.endSourceSpan)}return null},e.prototype.visitAttribute=function(e,t){throw new Error("unreachable code")},e.prototype._init=function(e,t){this._mode=e,this._inI18nBlock=!1,this._inI18nNode=!1,this._depth=0,this._inIcu=!1,this._msgCountAtSectionStart=void 0,this._errors=[],this._messages=[],this._inImplicitNode=!1,this._createI18nMessage=ql(t)},e.prototype._visitAttributesOf=function(e){var t=this,n={},r=this._implicitAttrs[e.name]||[];e.attrs.filter(function(e){return e.name.startsWith("i18n-")}).forEach(function(e){return n[e.name.slice("i18n-".length)]=e.value}),e.attrs.forEach(function(e){e.name in n?t._addMessage([e],n[e.name]):r.some(function(t){return e.name===t})&&t._addMessage([e])})},e.prototype._addMessage=function(e,t){if(0==e.length||1==e.length&&e[0]instanceof Xs&&!e[0].value)return null;var n=ap(t),r=this._createI18nMessage(e,n.meaning,n.description,n.id);return this._messages.push(r),r},e.prototype._translateMessage=function(e,t){if(t&&this._mode===Jc.Merge){var n=this._translations.get(t);if(n)return n;this._reportError(e,'Translation unavailable for message id="'+this._translations.digest(t)+'"')}return[]},e.prototype._translateAttributes=function(e){var t=this,n=e.attrs,r={};n.forEach(function(e){e.name.startsWith("i18n-")&&(r[e.name.slice("i18n-".length)]=ap(e.value))});var i=[];return n.forEach(function(n){if("i18n"!==n.name&&!n.name.startsWith("i18n-"))if(n.value&&""!=n.value&&r.hasOwnProperty(n.name)){var o=r[n.name],s=o.id,a=t._createI18nMessage([n],o.meaning,o.description,s),u=t._translations.get(a);u?0==u.length?i.push(new Xs(n.name,"",n.sourceSpan)):u[0]instanceof Qs?i.push(new Xs(n.name,u[0].value,n.sourceSpan)):t._reportError(e,'Unexpected translation for attribute "'+n.name+'" (id="'+(s||t._translations.digest(a))+'")'):t._reportError(e,'Translation unavailable for attribute "'+n.name+'" (id="'+(s||t._translations.digest(a))+'")')}else i.push(n)}),i},e.prototype._mayBeAddBlockChildren=function(e){this._inI18nBlock&&!this._inIcu&&this._depth==this._blockStartDepth&&this._blockChildren.push(e)},e.prototype._openTranslatableSection=function(e){this._isInTranslatableSection?this._reportError(e,"Unexpected section start"):this._msgCountAtSectionStart=this._messages.length},Object.defineProperty(e.prototype,"_isInTranslatableSection",{get:function(){return void 0!==this._msgCountAtSectionStart},enumerable:!0,configurable:!0}),e.prototype._closeTranslatableSection=function(e,t){if(this._isInTranslatableSection){var n=this._msgCountAtSectionStart;if(1==t.reduce(function(e,t){return e+(t instanceof Zs?0:1)},0))for(var r=this._messages.length-1;r>=n;r--){var i=this._messages[r].nodes;if(!(1==i.length&&i[0]instanceof
|
|
421
|
+
*/!function(e){e[e.Extract=0]="Extract",e[e.Merge=1]="Merge"}(Jc||(Jc={}));var sp=function(){function e(e,t){this._implicitTags=e,this._implicitAttrs=t}return e.prototype.extract=function(e,t){var n=this;return this._init(Jc.Extract,t),e.forEach(function(e){return e.visit(n,null)}),this._inI18nBlock&&this._reportError(e[e.length-1],"Unclosed block"),new op(this._messages,this._errors)},e.prototype.merge=function(e,t,n){this._init(Jc.Merge,n),this._translations=t;var r=new Ys("wrapper",[],e,void 0,void 0,void 0).visit(this,null);return this._inI18nBlock&&this._reportError(e[e.length-1],"Unclosed block"),new ba(r.children,this._errors)},e.prototype.visitExpansionCase=function(e,t){var n=Js(this,e.expression,t);if(this._mode===Jc.Merge)return new Gs(e.value,n,e.sourceSpan,e.valueSourceSpan,e.expSourceSpan)},e.prototype.visitExpansion=function(e,t){this._mayBeAddBlockChildren(e);var n=this._inIcu;this._inIcu||(this._isInTranslatableSection&&this._addMessage([e]),this._inIcu=!0);var r=Js(this,e.cases,t);return this._mode===Jc.Merge&&(e=new $s(e.switchValue,e.type,r,e.sourceSpan,e.switchValueSourceSpan)),this._inIcu=n,e},e.prototype.visitComment=function(e,t){var n=function r(e){return!!(e instanceof Zs&&e.value&&e.value.startsWith("i18n"))}(e);if(n&&this._isInTranslatableSection)this._reportError(e,"Could not start a block inside a translatable section");else{var i=function o(e){return!!(e instanceof Zs&&e.value&&"/i18n"===e.value)}(e);if(!i||this._inI18nBlock){if(!this._inI18nNode&&!this._inIcu)if(this._inI18nBlock){if(i){if(this._depth==this._blockStartDepth){this._closeTranslatableSection(e,this._blockChildren),this._inI18nBlock=!1;var s=this._addMessage(this._blockChildren,this._blockMeaningAndDesc);return Js(this,this._translateMessage(e,s))}return void this._reportError(e,"I18N blocks should not cross element boundaries")}}else n&&(!ip&&console&&console.warn&&(ip=!0,console.warn("I18n comments are deprecated, use an <ng-container> element instead ("+e.sourceSpan.start+(e.sourceSpan.details?", "+e.sourceSpan.details:"")+")")),this._inI18nBlock=!0,this._blockStartDepth=this._depth,this._blockChildren=[],this._blockMeaningAndDesc=e.value.replace(tp,"").trim(),this._openTranslatableSection(e))}else this._reportError(e,"Trying to close an unopened block")}},e.prototype.visitText=function(e,t){return this._isInTranslatableSection&&this._mayBeAddBlockChildren(e),e},e.prototype.visitElement=function(e,t){var n=this;this._mayBeAddBlockChildren(e),this._depth++;var r=this._inI18nNode,i=this._inImplicitNode,o=[],s=void 0,a=function u(e){return e.attrs.find(function(e){return"i18n"===e.name})||null}(e),l=a?a.value:"",c=this._implicitTags.some(function(t){return e.name===t})&&!this._inIcu&&!this._isInTranslatableSection,p=!i&&c;if(this._inImplicitNode=i||c,this._isInTranslatableSection||this._inIcu)(a||p)&&this._reportError(e,"Could not mark an element as translatable inside a translatable section"),this._mode==Jc.Extract&&Js(this,e.children);else{if(a||p){this._inI18nNode=!0;var h=this._addMessage(e.children,l);s=this._translateMessage(e,h)}if(this._mode==Jc.Extract){var f=a||p;f&&this._openTranslatableSection(e),Js(this,e.children),f&&this._closeTranslatableSection(e,e.children)}}if(this._mode===Jc.Merge&&(s||e.children).forEach(function(e){var r=e.visit(n,t);r&&!n._isInTranslatableSection&&(o=o.concat(r))}),this._visitAttributesOf(e),this._depth--,this._inI18nNode=r,this._inImplicitNode=i,this._mode===Jc.Merge){var d=this._translateAttributes(e);return new Ys(e.name,d,o,e.sourceSpan,e.startSourceSpan,e.endSourceSpan)}return null},e.prototype.visitAttribute=function(e,t){throw new Error("unreachable code")},e.prototype._init=function(e,t){this._mode=e,this._inI18nBlock=!1,this._inI18nNode=!1,this._depth=0,this._inIcu=!1,this._msgCountAtSectionStart=void 0,this._errors=[],this._messages=[],this._inImplicitNode=!1,this._createI18nMessage=ql(t)},e.prototype._visitAttributesOf=function(e){var t=this,n={},r=this._implicitAttrs[e.name]||[];e.attrs.filter(function(e){return e.name.startsWith("i18n-")}).forEach(function(e){return n[e.name.slice("i18n-".length)]=e.value}),e.attrs.forEach(function(e){e.name in n?t._addMessage([e],n[e.name]):r.some(function(t){return e.name===t})&&t._addMessage([e])})},e.prototype._addMessage=function(e,t){if(0==e.length||1==e.length&&e[0]instanceof Xs&&!e[0].value)return null;var n=ap(t),r=this._createI18nMessage(e,n.meaning,n.description,n.id);return this._messages.push(r),r},e.prototype._translateMessage=function(e,t){if(t&&this._mode===Jc.Merge){var n=this._translations.get(t);if(n)return n;this._reportError(e,'Translation unavailable for message id="'+this._translations.digest(t)+'"')}return[]},e.prototype._translateAttributes=function(e){var t=this,n=e.attrs,r={};n.forEach(function(e){e.name.startsWith("i18n-")&&(r[e.name.slice("i18n-".length)]=ap(e.value))});var i=[];return n.forEach(function(n){if("i18n"!==n.name&&!n.name.startsWith("i18n-"))if(n.value&&""!=n.value&&r.hasOwnProperty(n.name)){var o=r[n.name],s=o.id,a=t._createI18nMessage([n],o.meaning,o.description,s),u=t._translations.get(a);u?0==u.length?i.push(new Xs(n.name,"",n.sourceSpan)):u[0]instanceof Qs?i.push(new Xs(n.name,u[0].value,n.sourceSpan)):t._reportError(e,'Unexpected translation for attribute "'+n.name+'" (id="'+(s||t._translations.digest(a))+'")'):t._reportError(e,'Translation unavailable for attribute "'+n.name+'" (id="'+(s||t._translations.digest(a))+'")')}else i.push(n)}),i},e.prototype._mayBeAddBlockChildren=function(e){this._inI18nBlock&&!this._inIcu&&this._depth==this._blockStartDepth&&this._blockChildren.push(e)},e.prototype._openTranslatableSection=function(e){this._isInTranslatableSection?this._reportError(e,"Unexpected section start"):this._msgCountAtSectionStart=this._messages.length},Object.defineProperty(e.prototype,"_isInTranslatableSection",{get:function(){return void 0!==this._msgCountAtSectionStart},enumerable:!0,configurable:!0}),e.prototype._closeTranslatableSection=function(e,t){if(this._isInTranslatableSection){var n=this._msgCountAtSectionStart;if(1==t.reduce(function(e,t){return e+(t instanceof Zs?0:1)},0))for(var r=this._messages.length-1;r>=n;r--){var i=this._messages[r].nodes;if(!(1==i.length&&i[0]instanceof gr)){this._messages.splice(r,1);break}}this._msgCountAtSectionStart=void 0}else this._reportError(e,"Unexpected section end")},e.prototype._reportError=function(e,t){this._errors.push(new ep(e.sourceSpan,t))},e}();function ap(e){if(!e)return{meaning:"",description:"",id:""};var t=e.indexOf(rp),n=e.indexOf(np),r=h(t>-1?[e.slice(0,t),e.slice(t+2)]:[e,""],2),i=r[0],o=r[1],s=h(n>-1?[i.slice(0,n),i.slice(n+1)]:["",i],2);return{meaning:s[0],description:s[1],id:o}}
|
|
422
422
|
/**
|
|
423
423
|
* @license
|
|
424
424
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -432,21 +432,21 @@ var zc=function zc(e){var t=void 0===e?{}:e,n=t.defaultEncapsulation,r=t.useJit,
|
|
|
432
432
|
*
|
|
433
433
|
* Use of this source code is governed by an MIT-style license that can be
|
|
434
434
|
* found in the LICENSE file at https://angular.io/license
|
|
435
|
-
*/var cp=function(e){function t(){return e.call(this,lp)||this}return o(t,e),t.prototype.parse=function(t,n,r){return e.prototype.parse.call(this,t,n,r)},t}(wa),pp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.write=function(e,t){var n=new hp,r=[];e.forEach(function(e){var t,i=[];e.sources.forEach(function(e){var t=new
|
|
435
|
+
*/var cp=function(e){function t(){return e.call(this,lp)||this}return o(t,e),t.prototype.parse=function(t,n,r){return e.prototype.parse.call(this,t,n,r)},t}(wa),pp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.write=function(e,t){var n=new hp,r=[];e.forEach(function(e){var t,i=[];e.sources.forEach(function(e){var t=new Yr("context-group",{purpose:"location"});t.children.push(new Jr(10),new Yr("context",{"context-type":"sourcefile"},[new Zr(e.filePath)]),new Jr(10),new Yr("context",{"context-type":"linenumber"},[new Zr(""+e.startLine)]),new Jr(8)),i.push(new Jr(8),t)});var o=new Yr("trans-unit",{id:e.id,datatype:"html"});(t=o.children).push.apply(t,f([new Jr(8),new Yr("source",{},n.serialize(e.nodes))],i)),e.description&&o.children.push(new Jr(8),new Yr("note",{priority:"1",from:"description"},[new Zr(e.description)])),e.meaning&&o.children.push(new Jr(8),new Yr("note",{priority:"1",from:"meaning"},[new Zr(e.meaning)])),o.children.push(new Jr(6)),r.push(new Jr(6),o)});var i=new Yr("body",{},f(r,[new Jr(4)])),o=new Yr("file",{"source-language":t||"en",datatype:"plaintext",original:"ng2.template"},[new Jr(4),i,new Jr(2)]),s=new Yr("xliff",{version:"1.2",xmlns:"urn:oasis:names:tc:xliff:document:1.2"},[new Jr(2),o,new Jr]);return $r([new Gr({version:"1.0",encoding:"UTF-8"}),new Jr,s,new Jr])},t.prototype.load=function(e,t){var n=(new fp).parse(e,t),r=n.locale,i=n.msgIdToHtml,o=n.errors,s={},a=new dp;if(Object.keys(i).forEach(function(e){var n=a.convert(i[e],t),r=n.i18nNodes;o.push.apply(o,f(n.errors)),s[e]=r}),o.length)throw new Error("xliff parse errors:\n"+o.join("\n"));return{locale:r,i18nNodesByMsgId:s}},t.prototype.digest=function(e){return Tr(e)},t}(zr),hp=function(){function e(){}return e.prototype.visitText=function(e,t){return[new Zr(e.value)]},e.prototype.visitContainer=function(e,t){var n=this,r=[];return e.children.forEach(function(e){return r.push.apply(r,f(e.visit(n)))}),r},e.prototype.visitIcu=function(e,t){var n=this,r=[new Zr("{"+e.expressionPlaceholder+", "+e.type+", ")];return Object.keys(e.cases).forEach(function(t){r.push.apply(r,f([new Zr(t+" {")],e.cases[t].visit(n),[new Zr("} ")]))}),r.push(new Zr("}")),r},e.prototype.visitTagPlaceholder=function(e,t){var n=function r(e){switch(e.toLowerCase()){case"br":return"lb";case"img":return"image";default:return"x-"+e}}
|
|
436
436
|
/**
|
|
437
437
|
* @license
|
|
438
438
|
* Copyright Google Inc. All Rights Reserved.
|
|
439
439
|
*
|
|
440
440
|
* Use of this source code is governed by an MIT-style license that can be
|
|
441
441
|
* found in the LICENSE file at https://angular.io/license
|
|
442
|
-
*/(e.tag);if(e.isVoid)return[new
|
|
442
|
+
*/(e.tag);if(e.isVoid)return[new Yr("x",{id:e.startName,ctype:n,"equiv-text":"<"+e.tag+"/>"})];var i=new Yr("x",{id:e.startName,ctype:n,"equiv-text":"<"+e.tag+">"}),o=new Yr("x",{id:e.closeName,ctype:n,"equiv-text":"</"+e.tag+">"});return f([i],this.serialize(e.children),[o])},e.prototype.visitPlaceholder=function(e,t){return[new Yr("x",{id:e.name,"equiv-text":"{{"+e.value+"}}"})]},e.prototype.visitIcuPlaceholder=function(e,t){var n="{"+e.value.expression+", "+e.value.type+", "+Object.keys(e.value.cases).map(function(e){return e+" {...}"}).join(" ")+"}";return[new Yr("x",{id:e.name,"equiv-text":n})]},e.prototype.serialize=function(e){var t=this;return[].concat.apply([],f(e.map(function(e){return e.visit(t)})))},e}(),fp=function(){function e(){this._locale=null}return e.prototype.parse=function(e,t){this._unitMlString=null,this._msgIdToHtml={};var n=(new cp).parse(e,t);return this._errors=n.errors,Js(this,n.rootNodes,null),{msgIdToHtml:this._msgIdToHtml,errors:this._errors,locale:this._locale}},e.prototype.visitElement=function(e,t){switch(e.name){case"trans-unit":this._unitMlString=null;var n=e.attrs.find(function(e){return"id"===e.name});if(n){var r=n.value;this._msgIdToHtml.hasOwnProperty(r)?this._addError(e,"Duplicated translations for msg "+r):(Js(this,e.children,null),"string"==typeof this._unitMlString?this._msgIdToHtml[r]=this._unitMlString:this._addError(e,"Message "+r+" misses a translation"))}else this._addError(e,'<trans-unit> misses the "id" attribute');break;case"source":case"seg-source":break;case"target":var i=e.startSourceSpan.start.file.content.slice(e.startSourceSpan.end.offset,e.endSourceSpan.start.offset);this._unitMlString=i;break;case"file":var o=e.attrs.find(function(e){return"target-language"===e.name});o&&(this._locale=o.value),Js(this,e.children,null);break;default:Js(this,e.children,null)}},e.prototype.visitAttribute=function(e,t){},e.prototype.visitText=function(e,t){},e.prototype.visitComment=function(e,t){},e.prototype.visitExpansion=function(e,t){},e.prototype.visitExpansionCase=function(e,t){},e.prototype._addError=function(e,t){this._errors.push(new ep(e.sourceSpan,t))},e}(),dp=function(){function e(){}return e.prototype.convert=function(e,t){var n=(new cp).parse(e,t,{tokenizeExpansionForms:!0});return this._errors=n.errors,{i18nNodes:this._errors.length>0||0==n.rootNodes.length?[]:[].concat.apply([],f(Js(this,n.rootNodes))),errors:this._errors}},e.prototype.visitText=function(e,t){return new gr(e.value,e.sourceSpan)},e.prototype.visitElement=function(e,t){if("x"===e.name){var n=e.attrs.find(function(e){return"id"===e.name});return n?new xr("",n.value,e.sourceSpan):(this._addError(e,'<x> misses the "id" attribute'),null)}return"mrk"===e.name?[].concat.apply([],f(Js(this,e.children))):(this._addError(e,"Unexpected tag"),null)},e.prototype.visitExpansion=function(e,t){var n={};return Js(this,e.cases).forEach(function(t){n[t.value]=new _r(t.nodes,e.sourceSpan)}),new br(e.switchValue,e.type,n,e.sourceSpan)},e.prototype.visitExpansionCase=function(e,t){return{value:e.value,nodes:Js(this,e.expression)}},e.prototype.visitComment=function(e,t){},e.prototype.visitAttribute=function(e,t){},e.prototype._addError=function(e,t){this._errors.push(new ep(e.sourceSpan,t))},e}(),vp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.write=function(e,t){var n=new mp,r=[];e.forEach(function(e){var t=new Yr("unit",{id:e.id}),i=new Yr("notes");(e.description||e.meaning)&&(e.description&&i.children.push(new Jr(8),new Yr("note",{category:"description"},[new Zr(e.description)])),e.meaning&&i.children.push(new Jr(8),new Yr("note",{category:"meaning"},[new Zr(e.meaning)]))),e.sources.forEach(function(e){i.children.push(new Jr(8),new Yr("note",{category:"location"},[new Zr(e.filePath+":"+e.startLine+(e.endLine!==e.startLine?","+e.endLine:""))]))}),i.children.push(new Jr(6)),t.children.push(new Jr(6),i);var o=new Yr("segment");o.children.push(new Jr(8),new Yr("source",{},n.serialize(e.nodes)),new Jr(6)),t.children.push(new Jr(6),o,new Jr(4)),r.push(new Jr(4),t)});var i=new Yr("file",{original:"ng.template",id:"ngi18n"},f(r,[new Jr(2)])),o=new Yr("xliff",{version:"2.0",xmlns:"urn:oasis:names:tc:xliff:document:2.0",srcLang:t||"en"},[new Jr(2),i,new Jr]);return $r([new Gr({version:"1.0",encoding:"UTF-8"}),new Jr,o,new Jr])},t.prototype.load=function(e,t){var n=(new yp).parse(e,t),r=n.locale,i=n.msgIdToHtml,o=n.errors,s={},a=new gp;if(Object.keys(i).forEach(function(e){var n=a.convert(i[e],t),r=n.i18nNodes;o.push.apply(o,f(n.errors)),s[e]=r}),o.length)throw new Error("xliff2 parse errors:\n"+o.join("\n"));return{locale:r,i18nNodesByMsgId:s}},t.prototype.digest=function(e){return Nr(e)},t}(zr),mp=function(){function e(){}return e.prototype.visitText=function(e,t){return[new Zr(e.value)]},e.prototype.visitContainer=function(e,t){var n=this,r=[];return e.children.forEach(function(e){return r.push.apply(r,f(e.visit(n)))}),r},e.prototype.visitIcu=function(e,t){var n=this,r=[new Zr("{"+e.expressionPlaceholder+", "+e.type+", ")];return Object.keys(e.cases).forEach(function(t){r.push.apply(r,f([new Zr(t+" {")],e.cases[t].visit(n),[new Zr("} ")]))}),r.push(new Zr("}")),r},e.prototype.visitTagPlaceholder=function(e,t){var n=this,r=function i(e){switch(e.toLowerCase()){case"br":case"b":case"i":case"u":return"fmt";case"img":return"image";case"a":return"link";default:return"other"}}
|
|
443
443
|
/**
|
|
444
444
|
* @license
|
|
445
445
|
* Copyright Google Inc. All Rights Reserved.
|
|
446
446
|
*
|
|
447
447
|
* Use of this source code is governed by an MIT-style license that can be
|
|
448
448
|
* found in the LICENSE file at https://angular.io/license
|
|
449
|
-
*/(e.tag);if(e.isVoid)return[new cr("ph",{id:(this._nextPlaceholderId++).toString(),equiv:e.startName,type:r,disp:"<"+e.tag+"/>"})];var o=new cr("pc",{id:(this._nextPlaceholderId++).toString(),equivStart:e.startName,equivEnd:e.closeName,type:r,dispStart:"<"+e.tag+">",dispEnd:"</"+e.tag+">"}),s=[].concat.apply([],f(e.children.map(function(e){return e.visit(n)})));return s.length?s.forEach(function(e){return o.children.push(e)}):o.children.push(new pr("")),[o]},e.prototype.visitPlaceholder=function(e,t){var n=(this._nextPlaceholderId++).toString();return[new cr("ph",{id:n,equiv:e.name,disp:"{{"+e.value+"}}"})]},e.prototype.visitIcuPlaceholder=function(e,t){var n=Object.keys(e.value.cases).map(function(e){return e+" {...}"}).join(" "),r=(this._nextPlaceholderId++).toString();return[new cr("ph",{id:r,equiv:e.name,disp:"{"+e.value.expression+", "+e.value.type+", "+n+"}"})]},e.prototype.serialize=function(e){var t=this;return this._nextPlaceholderId=0,[].concat.apply([],f(e.map(function(e){return e.visit(t)})))},e}(),yp=function(){function e(){this._locale=null}return e.prototype.parse=function(e,t){this._unitMlString=null,this._msgIdToHtml={};var n=(new cp).parse(e,t);return this._errors=n.errors,Js(this,n.rootNodes,null),{msgIdToHtml:this._msgIdToHtml,errors:this._errors,locale:this._locale}},e.prototype.visitElement=function(e,t){switch(e.name){case"unit":this._unitMlString=null;var n=e.attrs.find(function(e){return"id"===e.name});if(n){var r=n.value;this._msgIdToHtml.hasOwnProperty(r)?this._addError(e,"Duplicated translations for msg "+r):(Js(this,e.children,null),"string"==typeof this._unitMlString?this._msgIdToHtml[r]=this._unitMlString:this._addError(e,"Message "+r+" misses a translation"))}else this._addError(e,'<unit> misses the "id" attribute');break;case"source":break;case"target":var i=e.startSourceSpan.start.file.content.slice(e.startSourceSpan.end.offset,e.endSourceSpan.start.offset);this._unitMlString=i;break;case"xliff":var o=e.attrs.find(function(e){return"trgLang"===e.name});o&&(this._locale=o.value);var s=e.attrs.find(function(e){return"version"===e.name});if(s){var a=s.value;"2.0"!==a?this._addError(e,"The XLIFF file version "+a+" is not compatible with XLIFF 2.0 serializer"):Js(this,e.children,null)}break;default:Js(this,e.children,null)}},e.prototype.visitAttribute=function(e,t){},e.prototype.visitText=function(e,t){},e.prototype.visitComment=function(e,t){},e.prototype.visitExpansion=function(e,t){},e.prototype.visitExpansionCase=function(e,t){},e.prototype._addError=function(e,t){this._errors.push(new ep(e.sourceSpan,t))},e}(),gp=function(){function e(){}return e.prototype.convert=function(e,t){var n=(new cp).parse(e,t,{tokenizeExpansionForms:!0});return this._errors=n.errors,{i18nNodes:this._errors.length>0||0==n.rootNodes.length?[]:[].concat.apply([],f(Js(this,n.rootNodes))),errors:this._errors}},e.prototype.visitText=function(e,t){return new In(e.value,e.sourceSpan)},e.prototype.visitElement=function(e,t){var n=this;switch(e.name){case"ph":var r=e.attrs.find(function(e){return"equiv"===e.name});if(r)return[new Dn("",r.value,e.sourceSpan)];this._addError(e,'<ph> misses the "equiv" attribute');break;case"pc":var i=e.attrs.find(function(e){return"equivStart"===e.name}),o=e.attrs.find(function(e){return"equivEnd"===e.name});if(i){if(o){var s=o.value,a=[];return a.concat.apply(a,f([new Dn("",i.value,e.sourceSpan)],e.children.map(function(e){return e.visit(n,null)}),[new Dn("",s,e.sourceSpan)]))}this._addError(e,'<ph> misses the "equivEnd" attribute')}else this._addError(e,'<ph> misses the "equivStart" attribute');break;case"mrk":return[].concat.apply([],f(Js(this,e.children)));default:this._addError(e,"Unexpected tag")}return null},e.prototype.visitExpansion=function(e,t){var n={};return Js(this,e.cases).forEach(function(t){n[t.value]=new Mn(t.nodes,e.sourceSpan)}),new On(e.switchValue,e.type,n,e.sourceSpan)},e.prototype.visitExpansionCase=function(e,t){return{value:e.value,nodes:[].concat.apply([],f(Js(this,e.expression)))}},e.prototype.visitComment=function(e,t){},e.prototype.visitAttribute=function(e,t){},e.prototype._addError=function(e,t){this._errors.push(new ep(e.sourceSpan,t))},e}(),_p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.write=function(e,t){throw new Error("Unsupported")},t.prototype.load=function(e,t){var n=(new bp).parse(e,t),r=n.locale,i=n.msgIdToHtml,o=n.errors,s={},a=new wp;if(Object.keys(i).forEach(function(e){!function n(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var n=r();return Object.defineProperty(e,t,{enumerable:!0,value:n}),n},set:function(e){throw new Error("Could not overwrite an XTB translation")}})}(s,e,function(){var n=a.convert(i[e],t),r=n.i18nNodes,o=n.errors;if(o.length)throw new Error("xtb parse errors:\n"+o.join("\n"));return r})}),o.length)throw new Error("xtb parse errors:\n"+o.join("\n"));return{locale:r,i18nNodesByMsgId:s}},t.prototype.digest=function(e){return yr(e)},t.prototype.createNameMapper=function(e){return new or(e,_r)},t}(ir),bp=function(){function e(){this._locale=null}return e.prototype.parse=function(e,t){this._bundleDepth=0,this._msgIdToHtml={};var n=(new cp).parse(e,t);return this._errors=n.errors,Js(this,n.rootNodes),{msgIdToHtml:this._msgIdToHtml,errors:this._errors,locale:this._locale}},e.prototype.visitElement=function(e,t){switch(e.name){case"translationbundle":this._bundleDepth++,this._bundleDepth>1&&this._addError(e,"<translationbundle> elements can not be nested");var n=e.attrs.find(function(e){return"lang"===e.name});n&&(this._locale=n.value),Js(this,e.children,null),this._bundleDepth--;break;case"translation":var r=e.attrs.find(function(e){return"id"===e.name});if(r){var i=r.value;if(this._msgIdToHtml.hasOwnProperty(i))this._addError(e,"Duplicated translations for msg "+i);else{var o=e.startSourceSpan.start.file.content.slice(e.startSourceSpan.end.offset,e.endSourceSpan.start.offset);this._msgIdToHtml[i]=o}}else this._addError(e,'<translation> misses the "id" attribute');break;default:this._addError(e,"Unexpected tag")}},e.prototype.visitAttribute=function(e,t){},e.prototype.visitText=function(e,t){},e.prototype.visitComment=function(e,t){},e.prototype.visitExpansion=function(e,t){},e.prototype.visitExpansionCase=function(e,t){},e.prototype._addError=function(e,t){this._errors.push(new ep(e.sourceSpan,t))},e}(),wp=function(){function e(){}return e.prototype.convert=function(e,t){var n=(new cp).parse(e,t,{tokenizeExpansionForms:!0});return this._errors=n.errors,{i18nNodes:this._errors.length>0||0==n.rootNodes.length?[]:Js(this,n.rootNodes),errors:this._errors}},e.prototype.visitText=function(e,t){return new In(e.value,e.sourceSpan)},e.prototype.visitExpansion=function(e,t){var n={};return Js(this,e.cases).forEach(function(t){n[t.value]=new Mn(t.nodes,e.sourceSpan)}),new On(e.switchValue,e.type,n,e.sourceSpan)},e.prototype.visitExpansionCase=function(e,t){return{value:e.value,nodes:Js(this,e.expression)}},e.prototype.visitElement=function(e,t){if("ph"===e.name){var n=e.attrs.find(function(e){return"name"===e.name});if(n)return new Dn("",n.value,e.sourceSpan);this._addError(e,'<ph> misses the "name" attribute')}else this._addError(e,"Unexpected tag");return null},e.prototype.visitComment=function(e,t){},e.prototype.visitAttribute=function(e,t){},e.prototype._addError=function(e,t){this._errors.push(new ep(e.sourceSpan,t))},e}(),xp=function(){function e(e,t,n,r,i,o){void 0===e&&(e={}),void 0===i&&(i=U.Warning),this._i18nNodesByMsgId=e,this.digest=n,this.mapperFactory=r,this._i18nToHtml=new Ep(e,t,n,r,i,o)}return e.load=function(t,n,r,i,o){var s=r.load(t,n);return new e(s.i18nNodesByMsgId,s.locale,function(e){return r.digest(e)},function(e){return r.createNameMapper(e)},i,o)},e.prototype.get=function(e){var t=this._i18nToHtml.convert(e);if(t.errors.length)throw new Error(t.errors.join("\n"));return t.nodes},e.prototype.has=function(e){return this.digest(e)in this._i18nNodesByMsgId},e}(),Ep=function(){function e(e,t,n,r,i,o){void 0===e&&(e={}),this._i18nNodesByMsgId=e,this._locale=t,this._digest=n,this._mapperFactory=r,this._missingTranslationStrategy=i,this._console=o,this._contextStack=[],this._errors=[]}return e.prototype.convert=function(e){this._contextStack.length=0,this._errors.length=0;var t=this._convertToText(e),n=e.nodes[0].sourceSpan.start.file.url,r=(new Sa).parse(t,n,{tokenizeExpansionForms:!0});return{nodes:r.rootNodes,errors:f(this._errors,r.errors)}},e.prototype.visitText=function(e,t){return dr(e.value)},e.prototype.visitContainer=function(e,t){var n=this;return e.children.map(function(e){return e.visit(n)}).join("")},e.prototype.visitIcu=function(e,t){var n=this,r=Object.keys(e.cases).map(function(t){return t+" {"+e.cases[t].visit(n)+"}"});return"{"+(this._srcMsg.placeholders.hasOwnProperty(e.expression)?this._srcMsg.placeholders[e.expression]:e.expression)+", "+e.type+", "+r.join(" ")+"}"},e.prototype.visitPlaceholder=function(e,t){var n=this._mapper(e.name);return this._srcMsg.placeholders.hasOwnProperty(n)?this._srcMsg.placeholders[n]:this._srcMsg.placeholderToMessage.hasOwnProperty(n)?this._convertToText(this._srcMsg.placeholderToMessage[n]):(this._addError(e,'Unknown placeholder "'+e.name+'"'),"")},e.prototype.visitTagPlaceholder=function(e,t){var n=this,r=""+e.tag,i=Object.keys(e.attrs).map(function(t){return t+'="'+e.attrs[t]+'"'}).join(" ");return e.isVoid?"<"+r+" "+i+"/>":"<"+r+" "+i+">"+e.children.map(function(e){return e.visit(n)}).join("")+"</"+r+">"},e.prototype.visitIcuPlaceholder=function(e,t){return this._convertToText(this._srcMsg.placeholderToMessage[e.name])},e.prototype._convertToText=function(e){var t,n=this,r=this._digest(e),i=this._mapperFactory?this._mapperFactory(e):null;this._contextStack.push({msg:this._srcMsg,mapper:this._mapper}),this._srcMsg=e,this._i18nNodesByMsgId.hasOwnProperty(r)?(t=this._i18nNodesByMsgId[r],this._mapper=function(e){return i?i.toInternalName(e):e}):(this._missingTranslationStrategy===U.Error?this._addError(e.nodes[0],'Missing translation for message "'+r+'"'+(this._locale?' for locale "'+this._locale+'"':"")):this._console&&this._missingTranslationStrategy===U.Warning&&this._console.warn('Missing translation for message "'+r+'"'+(this._locale?' for locale "'+this._locale+'"':"")),t=e.nodes,this._mapper=function(e){return e});var o=t.map(function(e){return e.visit(n)}).join(""),s=this._contextStack.pop();return this._srcMsg=s.msg,this._mapper=s.mapper,o},e.prototype._addError=function(e,t){this._errors.push(new ep(e.sourceSpan,t))},e}(),Sp=function(){function e(e,t,n,r,i){if(void 0===r&&(r=U.Warning),this._htmlParser=e,t){var o=function s(e){switch(e=(e||"xlf").toLowerCase()){case"xmb":return new vr;case"xtb":return new _p;case"xliff2":case"xlf2":return new vp;case"xliff":case"xlf":default:return new pp}}
|
|
449
|
+
*/(e.tag);if(e.isVoid)return[new Yr("ph",{id:(this._nextPlaceholderId++).toString(),equiv:e.startName,type:r,disp:"<"+e.tag+"/>"})];var o=new Yr("pc",{id:(this._nextPlaceholderId++).toString(),equivStart:e.startName,equivEnd:e.closeName,type:r,dispStart:"<"+e.tag+">",dispEnd:"</"+e.tag+">"}),s=[].concat.apply([],f(e.children.map(function(e){return e.visit(n)})));return s.length?s.forEach(function(e){return o.children.push(e)}):o.children.push(new Zr("")),[o]},e.prototype.visitPlaceholder=function(e,t){var n=(this._nextPlaceholderId++).toString();return[new Yr("ph",{id:n,equiv:e.name,disp:"{{"+e.value+"}}"})]},e.prototype.visitIcuPlaceholder=function(e,t){var n=Object.keys(e.value.cases).map(function(e){return e+" {...}"}).join(" "),r=(this._nextPlaceholderId++).toString();return[new Yr("ph",{id:r,equiv:e.name,disp:"{"+e.value.expression+", "+e.value.type+", "+n+"}"})]},e.prototype.serialize=function(e){var t=this;return this._nextPlaceholderId=0,[].concat.apply([],f(e.map(function(e){return e.visit(t)})))},e}(),yp=function(){function e(){this._locale=null}return e.prototype.parse=function(e,t){this._unitMlString=null,this._msgIdToHtml={};var n=(new cp).parse(e,t);return this._errors=n.errors,Js(this,n.rootNodes,null),{msgIdToHtml:this._msgIdToHtml,errors:this._errors,locale:this._locale}},e.prototype.visitElement=function(e,t){switch(e.name){case"unit":this._unitMlString=null;var n=e.attrs.find(function(e){return"id"===e.name});if(n){var r=n.value;this._msgIdToHtml.hasOwnProperty(r)?this._addError(e,"Duplicated translations for msg "+r):(Js(this,e.children,null),"string"==typeof this._unitMlString?this._msgIdToHtml[r]=this._unitMlString:this._addError(e,"Message "+r+" misses a translation"))}else this._addError(e,'<unit> misses the "id" attribute');break;case"source":break;case"target":var i=e.startSourceSpan.start.file.content.slice(e.startSourceSpan.end.offset,e.endSourceSpan.start.offset);this._unitMlString=i;break;case"xliff":var o=e.attrs.find(function(e){return"trgLang"===e.name});o&&(this._locale=o.value);var s=e.attrs.find(function(e){return"version"===e.name});if(s){var a=s.value;"2.0"!==a?this._addError(e,"The XLIFF file version "+a+" is not compatible with XLIFF 2.0 serializer"):Js(this,e.children,null)}break;default:Js(this,e.children,null)}},e.prototype.visitAttribute=function(e,t){},e.prototype.visitText=function(e,t){},e.prototype.visitComment=function(e,t){},e.prototype.visitExpansion=function(e,t){},e.prototype.visitExpansionCase=function(e,t){},e.prototype._addError=function(e,t){this._errors.push(new ep(e.sourceSpan,t))},e}(),gp=function(){function e(){}return e.prototype.convert=function(e,t){var n=(new cp).parse(e,t,{tokenizeExpansionForms:!0});return this._errors=n.errors,{i18nNodes:this._errors.length>0||0==n.rootNodes.length?[]:[].concat.apply([],f(Js(this,n.rootNodes))),errors:this._errors}},e.prototype.visitText=function(e,t){return new gr(e.value,e.sourceSpan)},e.prototype.visitElement=function(e,t){var n=this;switch(e.name){case"ph":var r=e.attrs.find(function(e){return"equiv"===e.name});if(r)return[new xr("",r.value,e.sourceSpan)];this._addError(e,'<ph> misses the "equiv" attribute');break;case"pc":var i=e.attrs.find(function(e){return"equivStart"===e.name}),o=e.attrs.find(function(e){return"equivEnd"===e.name});if(i){if(o){var s=o.value,a=[];return a.concat.apply(a,f([new xr("",i.value,e.sourceSpan)],e.children.map(function(e){return e.visit(n,null)}),[new xr("",s,e.sourceSpan)]))}this._addError(e,'<ph> misses the "equivEnd" attribute')}else this._addError(e,'<ph> misses the "equivStart" attribute');break;case"mrk":return[].concat.apply([],f(Js(this,e.children)));default:this._addError(e,"Unexpected tag")}return null},e.prototype.visitExpansion=function(e,t){var n={};return Js(this,e.cases).forEach(function(t){n[t.value]=new _r(t.nodes,e.sourceSpan)}),new br(e.switchValue,e.type,n,e.sourceSpan)},e.prototype.visitExpansionCase=function(e,t){return{value:e.value,nodes:[].concat.apply([],f(Js(this,e.expression)))}},e.prototype.visitComment=function(e,t){},e.prototype.visitAttribute=function(e,t){},e.prototype._addError=function(e,t){this._errors.push(new ep(e.sourceSpan,t))},e}(),_p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.write=function(e,t){throw new Error("Unsupported")},t.prototype.load=function(e,t){var n=(new bp).parse(e,t),r=n.locale,i=n.msgIdToHtml,o=n.errors,s={},a=new wp;if(Object.keys(i).forEach(function(e){!function n(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var n=r();return Object.defineProperty(e,t,{enumerable:!0,value:n}),n},set:function(e){throw new Error("Could not overwrite an XTB translation")}})}(s,e,function(){var n=a.convert(i[e],t),r=n.i18nNodes,o=n.errors;if(o.length)throw new Error("xtb parse errors:\n"+o.join("\n"));return r})}),o.length)throw new Error("xtb parse errors:\n"+o.join("\n"));return{locale:r,i18nNodesByMsgId:s}},t.prototype.digest=function(e){return ii(e)},t.prototype.createNameMapper=function(e){return new Wr(e,si)},t}(zr),bp=function(){function e(){this._locale=null}return e.prototype.parse=function(e,t){this._bundleDepth=0,this._msgIdToHtml={};var n=(new cp).parse(e,t);return this._errors=n.errors,Js(this,n.rootNodes),{msgIdToHtml:this._msgIdToHtml,errors:this._errors,locale:this._locale}},e.prototype.visitElement=function(e,t){switch(e.name){case"translationbundle":this._bundleDepth++,this._bundleDepth>1&&this._addError(e,"<translationbundle> elements can not be nested");var n=e.attrs.find(function(e){return"lang"===e.name});n&&(this._locale=n.value),Js(this,e.children,null),this._bundleDepth--;break;case"translation":var r=e.attrs.find(function(e){return"id"===e.name});if(r){var i=r.value;if(this._msgIdToHtml.hasOwnProperty(i))this._addError(e,"Duplicated translations for msg "+i);else{var o=e.startSourceSpan.start.file.content.slice(e.startSourceSpan.end.offset,e.endSourceSpan.start.offset);this._msgIdToHtml[i]=o}}else this._addError(e,'<translation> misses the "id" attribute');break;default:this._addError(e,"Unexpected tag")}},e.prototype.visitAttribute=function(e,t){},e.prototype.visitText=function(e,t){},e.prototype.visitComment=function(e,t){},e.prototype.visitExpansion=function(e,t){},e.prototype.visitExpansionCase=function(e,t){},e.prototype._addError=function(e,t){this._errors.push(new ep(e.sourceSpan,t))},e}(),wp=function(){function e(){}return e.prototype.convert=function(e,t){var n=(new cp).parse(e,t,{tokenizeExpansionForms:!0});return this._errors=n.errors,{i18nNodes:this._errors.length>0||0==n.rootNodes.length?[]:Js(this,n.rootNodes),errors:this._errors}},e.prototype.visitText=function(e,t){return new gr(e.value,e.sourceSpan)},e.prototype.visitExpansion=function(e,t){var n={};return Js(this,e.cases).forEach(function(t){n[t.value]=new _r(t.nodes,e.sourceSpan)}),new br(e.switchValue,e.type,n,e.sourceSpan)},e.prototype.visitExpansionCase=function(e,t){return{value:e.value,nodes:Js(this,e.expression)}},e.prototype.visitElement=function(e,t){if("ph"===e.name){var n=e.attrs.find(function(e){return"name"===e.name});if(n)return new xr("",n.value,e.sourceSpan);this._addError(e,'<ph> misses the "name" attribute')}else this._addError(e,"Unexpected tag");return null},e.prototype.visitComment=function(e,t){},e.prototype.visitAttribute=function(e,t){},e.prototype._addError=function(e,t){this._errors.push(new ep(e.sourceSpan,t))},e}(),xp=function(){function e(e,t,n,r,i,o){void 0===e&&(e={}),void 0===i&&(i=U.Warning),this._i18nNodesByMsgId=e,this.digest=n,this.mapperFactory=r,this._i18nToHtml=new Ep(e,t,n,r,i,o)}return e.load=function(t,n,r,i,o){var s=r.load(t,n);return new e(s.i18nNodesByMsgId,s.locale,function(e){return r.digest(e)},function(e){return r.createNameMapper(e)},i,o)},e.prototype.get=function(e){var t=this._i18nToHtml.convert(e);if(t.errors.length)throw new Error(t.errors.join("\n"));return t.nodes},e.prototype.has=function(e){return this.digest(e)in this._i18nNodesByMsgId},e}(),Ep=function(){function e(e,t,n,r,i,o){void 0===e&&(e={}),this._i18nNodesByMsgId=e,this._locale=t,this._digest=n,this._mapperFactory=r,this._missingTranslationStrategy=i,this._console=o,this._contextStack=[],this._errors=[]}return e.prototype.convert=function(e){this._contextStack.length=0,this._errors.length=0;var t=this._convertToText(e),n=e.nodes[0].sourceSpan.start.file.url,r=(new Sa).parse(t,n,{tokenizeExpansionForms:!0});return{nodes:r.rootNodes,errors:f(this._errors,r.errors)}},e.prototype.visitText=function(e,t){return ti(e.value)},e.prototype.visitContainer=function(e,t){var n=this;return e.children.map(function(e){return e.visit(n)}).join("")},e.prototype.visitIcu=function(e,t){var n=this,r=Object.keys(e.cases).map(function(t){return t+" {"+e.cases[t].visit(n)+"}"});return"{"+(this._srcMsg.placeholders.hasOwnProperty(e.expression)?this._srcMsg.placeholders[e.expression]:e.expression)+", "+e.type+", "+r.join(" ")+"}"},e.prototype.visitPlaceholder=function(e,t){var n=this._mapper(e.name);return this._srcMsg.placeholders.hasOwnProperty(n)?this._srcMsg.placeholders[n]:this._srcMsg.placeholderToMessage.hasOwnProperty(n)?this._convertToText(this._srcMsg.placeholderToMessage[n]):(this._addError(e,'Unknown placeholder "'+e.name+'"'),"")},e.prototype.visitTagPlaceholder=function(e,t){var n=this,r=""+e.tag,i=Object.keys(e.attrs).map(function(t){return t+'="'+e.attrs[t]+'"'}).join(" ");return e.isVoid?"<"+r+" "+i+"/>":"<"+r+" "+i+">"+e.children.map(function(e){return e.visit(n)}).join("")+"</"+r+">"},e.prototype.visitIcuPlaceholder=function(e,t){return this._convertToText(this._srcMsg.placeholderToMessage[e.name])},e.prototype._convertToText=function(e){var t,n=this,r=this._digest(e),i=this._mapperFactory?this._mapperFactory(e):null;this._contextStack.push({msg:this._srcMsg,mapper:this._mapper}),this._srcMsg=e,this._i18nNodesByMsgId.hasOwnProperty(r)?(t=this._i18nNodesByMsgId[r],this._mapper=function(e){return i?i.toInternalName(e):e}):(this._missingTranslationStrategy===U.Error?this._addError(e.nodes[0],'Missing translation for message "'+r+'"'+(this._locale?' for locale "'+this._locale+'"':"")):this._console&&this._missingTranslationStrategy===U.Warning&&this._console.warn('Missing translation for message "'+r+'"'+(this._locale?' for locale "'+this._locale+'"':"")),t=e.nodes,this._mapper=function(e){return e});var o=t.map(function(e){return e.visit(n)}).join(""),s=this._contextStack.pop();return this._srcMsg=s.msg,this._mapper=s.mapper,o},e.prototype._addError=function(e,t){this._errors.push(new ep(e.sourceSpan,t))},e}(),Sp=function(){function e(e,t,n,r,i){if(void 0===r&&(r=U.Warning),this._htmlParser=e,t){var o=function s(e){switch(e=(e||"xlf").toLowerCase()){case"xmb":return new ni;case"xtb":return new _p;case"xliff2":case"xlf2":return new vp;case"xliff":case"xlf":default:return new pp}}
|
|
450
450
|
/**
|
|
451
451
|
* @license
|
|
452
452
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -467,7 +467,7 @@ var zc=function zc(e){var t=void 0===e?{}:e,n=t.defaultEncapsulation,r=t.useJit,
|
|
|
467
467
|
*
|
|
468
468
|
* Use of this source code is governed by an MIT-style license that can be
|
|
469
469
|
* found in the LICENSE file at https://angular.io/license
|
|
470
|
-
*/(n);this._translationBundle=xp.load(t,"i18n",o,r,i)}else this._translationBundle=new xp({},null,
|
|
470
|
+
*/(n);this._translationBundle=xp.load(t,"i18n",o,r,i)}else this._translationBundle=new xp({},null,Tr,void 0,r,i)}return e.prototype.parse=function(e,t,n){void 0===n&&(n={});var r=n.interpolationConfig||eo,i=this._htmlParser.parse(e,t,a({interpolationConfig:r},n));return i.errors.length?new ba(i.rootNodes,i.errors):function o(e,t,n,r,i){return new sp(r,i).merge(e,t,n)}(i.rootNodes,this._translationBundle,r,[],{})},e}(),Cp=/(\.ts|\.d\.ts|\.js|\.jsx|\.tsx)$/,Tp=/\.ngfactory\.|\.ngsummary\./,Np=/\.ngsummary\./,kp=/NgSummary$/;
|
|
471
471
|
/**
|
|
472
472
|
* @license
|
|
473
473
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -488,14 +488,14 @@ var zc=function zc(e){var t=void 0===e?{}:e,n=t.defaultEncapsulation,r=t.useJit,
|
|
|
488
488
|
*
|
|
489
489
|
* Use of this source code is governed by an MIT-style license that can be
|
|
490
490
|
* found in the LICENSE file at https://angular.io/license
|
|
491
|
-
*/(t),t),null):Tt(u,s)}return s(null),null},e.prototype.getNonNormalizedDirectiveMetadata=function(e){var t=this;if(!(e=Dt(e)))return null;var n=this._nonNormalizedDirectiveCache.get(e);if(n)return n;var r=this._directiveResolver.resolve(e,!1);if(!r)return null;var i=void 0;if(K.isTypeOf(r)){
|
|
491
|
+
*/(t),t),null):Tt(u,s)}return s(null),null},e.prototype.getNonNormalizedDirectiveMetadata=function(e){var t=this;if(!(e=Dt(e)))return null;var n=this._nonNormalizedDirectiveCache.get(e);if(n)return n;var r=this._directiveResolver.resolve(e,!1);if(!r)return null;var i=void 0;if(K.isTypeOf(r)){Xi("styles",(s=r).styles),Xi("styleUrls",s.styleUrls),Zi("interpolation",s.interpolation);var o=s.animations;i=new un({encapsulation:St(s.encapsulation),template:St(s.template),templateUrl:St(s.templateUrl),htmlAst:null,styles:s.styles||[],styleUrls:s.styleUrls||[],animations:o||[],interpolation:St(s.interpolation),isInline:!!s.template,externalStylesheets:[],ngContentSelectors:[],preserveWhitespaces:St(r.preserveWhitespaces)})}var s,a=null,u=[],l=[],c=r.selector;K.isTypeOf(r)?(a=(s=r).changeDetection,s.viewProviders&&(u=this._getProvidersMetadata(s.viewProviders,l,'viewProviders for "'+Vp(e)+'"',[],e)),s.entryComponents&&(l=Lp(s.entryComponents).map(function(e){return t._getEntryComponentMetadata(e)}).concat(l)),c||(c=this._schemaRegistry.getDefaultComponentElementName())):c||(this._reportError(kt("Directive "+Vp(e)+" has no selector, please add it!"),e),c="error");var p=[];null!=r.providers&&(p=this._getProvidersMetadata(r.providers,l,'providers for "'+Vp(e)+'"',[],e));var h=[],f=[];null!=r.queries&&(h=this._getQueriesMetadata(r.queries,!1,e),f=this._getQueriesMetadata(r.queries,!0,e));var d=ln.create({isHost:!1,selector:c,exportAs:St(r.exportAs),isComponent:!!i,type:this._getTypeMetadata(e),template:i,changeDetection:a,inputs:r.inputs||[],outputs:r.outputs||[],host:r.host||{},providers:p||[],viewProviders:u||[],queries:h||[],guards:r.guards||{},viewQueries:f||[],entryComponents:l,componentViewType:i?this.getComponentViewClass(e):null,rendererType:i?this.getRendererType(e):null,componentFactory:null});return i&&(d.componentFactory=this.getComponentFactory(c,e,d.inputs,d.outputs)),this._nonNormalizedDirectiveCache.set(e,n={metadata:d,annotation:r}),n},e.prototype.getDirectiveMetadata=function(e){var t=this._directiveCache.get(e);return t||this._reportError(kt("Illegal state: getDirectiveMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Directive "+Vp(e)+"."),e),t},e.prototype.getDirectiveSummary=function(e){var t=this._loadSummary(e,tn.Directive);return t||this._reportError(kt("Illegal state: Could not load the summary for directive "+Vp(e)+"."),e),t},e.prototype.isDirective=function(e){return!!this._loadSummary(e,tn.Directive)||this._directiveResolver.isDirective(e)},e.prototype.isPipe=function(e){return!!this._loadSummary(e,tn.Pipe)||this._pipeResolver.isPipe(e)},e.prototype.isNgModule=function(e){return!!this._loadSummary(e,tn.NgModule)||this._ngModuleResolver.isNgModule(e)},e.prototype.getNgModuleSummary=function(e,t){void 0===t&&(t=null);var n=this._loadSummary(e,tn.NgModule);if(!n){var r=this.getNgModuleMetadata(e,!1,t);(n=r?r.toSummary():null)&&this._summaryCache.set(e,n)}return n},e.prototype.loadNgModuleDirectiveAndPipeMetadata=function(e,t,n){var r=this;void 0===n&&(n=!0);var i=this.getNgModuleMetadata(e,n),o=[];return i&&(i.declaredDirectives.forEach(function(n){var i=r.loadDirectiveMetadata(e,n.reference,t);i&&o.push(i)}),i.declaredPipes.forEach(function(e){return r._loadPipeMetadata(e.reference)})),Promise.all(o)},e.prototype.getShallowModuleMetadata=function(e){var t=this._shallowModuleCache.get(e);if(t)return t;var n=Zc(this._reflector.shallowAnnotations(e),X.isTypeOf);return t={type:this._getTypeMetadata(e),rawExports:n.exports,rawImports:n.imports,rawProviders:n.providers},this._shallowModuleCache.set(e,t),t},e.prototype.getNgModuleMetadata=function(e,t,n){var r=this;void 0===t&&(t=!0),void 0===n&&(n=null),e=Dt(e);var i=this._ngModuleCache.get(e);if(i)return i;var o=this._ngModuleResolver.resolve(e,t);if(!o)return null;var s=[],a=[],u=[],l=[],c=[],p=[],h=[],d=[],v=[];o.imports&&Lp(o.imports).forEach(function(t){var i=void 0;if(Fp(t)?i=t:t&&t.ngModule&&(i=t.ngModule,t.providers&&p.push.apply(p,f(r._getProvidersMetadata(t.providers,h,"provider for the NgModule '"+Vp(i)+"'",[],t)))),i){if(!r._checkSelfImport(e,i))if(n||(n=new Set),n.has(i))r._reportError(kt(r._getTypeDescriptor(i)+" '"+Vp(t)+"' is imported recursively by the module '"+Vp(e)+"'."),e);else{n.add(i);var o=r.getNgModuleSummary(i,n);n.delete(i),o?l.push(o):r._reportError(kt("Unexpected "+r._getTypeDescriptor(t)+" '"+Vp(t)+"' imported by the module '"+Vp(e)+"'. Please add a @NgModule annotation."),e)}}else r._reportError(kt("Unexpected value '"+Vp(t)+"' imported by the module '"+Vp(e)+"'"),e)}),o.exports&&Lp(o.exports).forEach(function(t){if(Fp(t))if(n||(n=new Set),n.has(t))r._reportError(kt(r._getTypeDescriptor(t)+" '"+Rt(t)+"' is exported recursively by the module '"+Vp(e)+"'"),e);else{n.add(t);var i=r.getNgModuleSummary(t,n);n.delete(t),i?c.push(i):a.push(r._getIdentifierMetadata(t))}else r._reportError(kt("Unexpected value '"+Vp(t)+"' exported by the module '"+Vp(e)+"'"),e)});var m=this._getTransitiveNgModuleMetadata(l,c);o.declarations&&Lp(o.declarations).forEach(function(t){if(Fp(t)){var n=r._getIdentifierMetadata(t);if(r.isDirective(t))m.addDirective(n),s.push(n),r._addTypeToModule(t,e);else{if(!r.isPipe(t))return void r._reportError(kt("Unexpected "+r._getTypeDescriptor(t)+" '"+Vp(t)+"' declared by the module '"+Vp(e)+"'. Please add a @Pipe/@Directive/@Component annotation."),e);m.addPipe(n),m.pipes.push(n),u.push(n),r._addTypeToModule(t,e)}}else r._reportError(kt("Unexpected value '"+Vp(t)+"' declared by the module '"+Vp(e)+"'"),e)});var y=[],g=[];return a.forEach(function(t){if(m.directivesSet.has(t.reference))y.push(t),m.addExportedDirective(t);else{if(!m.pipesSet.has(t.reference))return void r._reportError(kt("Can't export "+r._getTypeDescriptor(t.reference)+" "+Vp(t.reference)+" from "+Vp(e)+" as it was neither declared nor imported!"),e);g.push(t),m.addExportedPipe(t)}}),o.providers&&p.push.apply(p,f(this._getProvidersMetadata(o.providers,h,"provider for the NgModule '"+Vp(e)+"'",[],e))),o.entryComponents&&h.push.apply(h,f(Lp(o.entryComponents).map(function(e){return r._getEntryComponentMetadata(e)}))),o.bootstrap&&Lp(o.bootstrap).forEach(function(t){Fp(t)?d.push(r._getIdentifierMetadata(t)):r._reportError(kt("Unexpected value '"+Vp(t)+"' used in the bootstrap property of module '"+Vp(e)+"'"),e)}),h.push.apply(h,f(d.map(function(e){return r._getEntryComponentMetadata(e.reference)}))),o.schemas&&v.push.apply(v,f(Lp(o.schemas))),i=new pn({type:this._getTypeMetadata(e),providers:p,entryComponents:h,bootstrapComponents:d,schemas:v,declaredDirectives:s,exportedDirectives:y,declaredPipes:u,exportedPipes:g,importedModules:l,exportedModules:c,transitiveModule:m,id:o.id||null}),h.forEach(function(e){return m.addEntryComponent(e)}),p.forEach(function(e){return m.addProvider(e,i.type)}),m.addModule(i.type),this._ngModuleCache.set(e,i),i},e.prototype._checkSelfImport=function(e,t){return e===t&&(this._reportError(kt("'"+Vp(e)+"' module can't import itself"),e),!0)},e.prototype._getTypeDescriptor=function(e){if(Fp(e)){if(this.isDirective(e))return"directive";if(this.isPipe(e))return"pipe";if(this.isNgModule(e))return"module"}return e.provide?"provider":"value"},e.prototype._addTypeToModule=function(e,t){var n=this._ngModuleOfTypes.get(e);n&&n!==t?this._reportError(kt("Type "+Vp(e)+" is part of the declarations of 2 modules: "+Vp(n)+" and "+Vp(t)+"! Please consider moving "+Vp(e)+" to a higher module that imports "+Vp(n)+" and "+Vp(t)+". You can also create a new NgModule that exports and includes "+Vp(e)+" then import that NgModule in "+Vp(n)+" and "+Vp(t)+"."),t):this._ngModuleOfTypes.set(e,t)},e.prototype._getTransitiveNgModuleMetadata=function(e,t){var n=new hn,r=new Map;return e.concat(t).forEach(function(e){e.modules.forEach(function(e){return n.addModule(e)}),e.entryComponents.forEach(function(e){return n.addEntryComponent(e)});var t=new Set;e.providers.forEach(function(e){var i=sn(e.provider.token),o=r.get(i);o||(o=new Set,r.set(i,o));var s=e.module.reference;!t.has(i)&&o.has(s)||(o.add(s),t.add(i),n.addProvider(e.provider,e.module))})}),t.forEach(function(e){e.exportedDirectives.forEach(function(e){return n.addExportedDirective(e)}),e.exportedPipes.forEach(function(e){return n.addExportedPipe(e)})}),e.forEach(function(e){e.exportedDirectives.forEach(function(e){return n.addDirective(e)}),e.exportedPipes.forEach(function(e){return n.addPipe(e)})}),n},e.prototype._getIdentifierMetadata=function(e){return{reference:e=Dt(e)}},e.prototype.isInjectable=function(e){return this._reflector.tryAnnotations(e).some(function(e){return Y.isTypeOf(e)})},e.prototype.getInjectableSummary=function(e){return{summaryKind:tn.Injectable,type:this._getTypeMetadata(e,null,!1)}},e.prototype.getInjectableMetadata=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!0);var r=this._loadSummary(e,tn.Injectable),i=r?r.type:this._getTypeMetadata(e,t,n),o=this._reflector.annotations(e).filter(function(e){return Y.isTypeOf(e)});if(0===o.length)return null;var s=o[o.length-1];return{symbol:e,type:i,providedIn:s.providedIn,useValue:s.useValue,useClass:s.useClass,useExisting:s.useExisting,useFactory:s.useFactory,deps:s.deps}},e.prototype._getTypeMetadata=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!0);var r,i,o=this._getIdentifierMetadata(e);return{reference:o.reference,diDeps:this._getDependenciesMetadata(o.reference,t,n),lifecycleHooks:(r=this._reflector,i=o.reference,Rp.filter(function(e){return function t(e,n,r){return e.hasLifecycleHook(r,function i(e){switch(e){case Mp.OnInit:return"ngOnInit";case Mp.OnDestroy:return"ngOnDestroy";case Mp.DoCheck:return"ngDoCheck";case Mp.OnChanges:return"ngOnChanges";case Mp.AfterContentInit:return"ngAfterContentInit";case Mp.AfterContentChecked:return"ngAfterContentChecked";case Mp.AfterViewInit:return"ngAfterViewInit";case Mp.AfterViewChecked:return"ngAfterViewChecked";default:throw new Error("unexpected "+e)}}
|
|
492
492
|
/**
|
|
493
493
|
* @license
|
|
494
494
|
* Copyright Google Inc. All Rights Reserved.
|
|
495
495
|
*
|
|
496
496
|
* Use of this source code is governed by an MIT-style license that can be
|
|
497
497
|
* found in the LICENSE file at https://angular.io/license
|
|
498
|
-
*/(n))}(r,e,i)}))}},e.prototype._getFactoryMetadata=function(e,t){return void 0===t&&(t=null),{reference:e=Dt(e),diDeps:this._getDependenciesMetadata(e,t)}},e.prototype.getPipeMetadata=function(e){var t=this._pipeCache.get(e);return t||this._reportError(kt("Illegal state: getPipeMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Pipe "+Vp(e)+"."),e),t||null},e.prototype.getPipeSummary=function(e){var t=this._loadSummary(e,tn.Pipe);return t||this._reportError(kt("Illegal state: Could not load the summary for pipe "+Vp(e)+"."),e),t},e.prototype.getOrLoadPipeMetadata=function(e){var t=this._pipeCache.get(e);return t||(t=this._loadPipeMetadata(e)),t},e.prototype._loadPipeMetadata=function(e){e=Dt(e);var t=this._pipeResolver.resolve(e),n=new cn({type:this._getTypeMetadata(e),name:t.name,pure:!!t.pure});return this._pipeCache.set(e,n),this._summaryCache.set(e,n.toSummary()),n},e.prototype._getDependenciesMetadata=function(e,t,n){var r=this;void 0===n&&(n=!0);var i=!1,o=(t||this._reflector.parameters(e)||[]).map(function(e){var t=!1,n=!1,o=!1,s=!1,a=!1,u=null;return Array.isArray(e)?e.forEach(function(e){te.isTypeOf(e)?n=!0:J.isTypeOf(e)?o=!0:ee.isTypeOf(e)?s=!0:Z.isTypeOf(e)?a=!0:D.isTypeOf(e)?(t=!0,u=e.attributeName):O.isTypeOf(e)?u=e.token:R.isTypeOf(e)||e instanceof Yt?u=e:Fp(e)&&null==u&&(u=e)}):u=e,null==u?(i=!0,{}):{isAttribute:t,isHost:n,isSelf:o,isSkipSelf:s,isOptional:a,token:r._getTokenMetadata(u)}});if(i){var s=o.map(function(e){return e.token?Vp(e.token):"?"}).join(", "),a="Can't resolve all parameters for "+Vp(e)+": ("+s+").";n||this._config.strictInjectionParameters?this._reportError(kt(a),e):this._console.warn("Warning: "+a+" This will become an error in Angular v6.x")}return o},e.prototype._getTokenMetadata=function(e){return"string"==typeof(e=Dt(e))?{value:e}:{identifier:{reference:e}}},e.prototype._getProvidersMetadata=function(e,t,n,r,i){var o=this;return void 0===r&&(r=[]),e.forEach(function(s,a){if(Array.isArray(s))o._getProvidersMetadata(s,t,n,r);else{var u=void 0;if((s=Dt(s))&&"object"==typeof s&&s.hasOwnProperty("provide"))o._validateProvider(s),u=new dn(s.provide,s);else{if(!Fp(s)){if(void 0===s)return void o._reportError(kt("Encountered undefined provider! Usually this means you have a circular dependencies. This might be caused by using 'barrel' index.ts files."));var l=e.reduce(function(e,t,n){return n<a?e.push(""+Vp(t)):n==a?e.push("?"+Vp(t)+"?"):n==a+1&&e.push("..."),e},[]).join(", ");return void o._reportError(kt("Invalid "+(n||"provider")+" - only instances of Provider and Type are allowed, got: ["+l+"]"),i)}u=new dn(s,{useClass:s})}u.token===o._reflector.resolveExternalReference($t.ANALYZE_FOR_ENTRY_COMPONENTS)?t.push.apply(t,f(o._getEntryComponentsFromProvider(u,i))):r.push(o.getProviderMetadata(u))}}),r},e.prototype._validateProvider=function(e){e.hasOwnProperty("useClass")&&null==e.useClass&&this._reportError(kt("Invalid provider for "+Vp(e.provide)+". useClass cannot be "+e.useClass+".\n Usually it happens when:\n 1. There's a circular dependency (might be caused by using index.ts (barrel) files).\n 2. Class was used before it was declared. Use forwardRef in this case."))},e.prototype._getEntryComponentsFromProvider=function(e,t){var n=this,r=[],i=[];return e.useFactory||e.useExisting||e.useClass?(this._reportError(kt("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports useValue!"),t),[]):e.multi?(function o(e,t){xt(e,new jp,t)}(e.useValue,i),i.forEach(function(e){var t=n._getEntryComponentMetadata(e.reference,!1);t&&r.push(t)}),r):(this._reportError(kt("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports 'multi = true'!"),t),[])},e.prototype._getEntryComponentMetadata=function(e,t){void 0===t&&(t=!0);var n=this.getNonNormalizedDirectiveMetadata(e);if(n&&n.metadata.isComponent)return{componentType:e,componentFactory:n.metadata.componentFactory};var r=this._loadSummary(e,tn.Directive);if(r&&r.isComponent)return{componentType:e,componentFactory:r.componentFactory};if(t)throw kt(e.name+" cannot be used as an entry component.");return null},e.prototype._getInjectableTypeMetadata=function(e,t){void 0===t&&(t=null);var n=this._loadSummary(e,tn.Injectable);return n?n.type:this._getTypeMetadata(e,t)},e.prototype.getProviderMetadata=function(e){var t=void 0,n=null,r=null,i=this._getTokenMetadata(e.token);return e.useClass?(t=(n=this._getInjectableTypeMetadata(e.useClass,e.dependencies)).diDeps,e.token===e.useClass&&(i={identifier:n})):e.useFactory&&(t=(r=this._getFactoryMetadata(e.useFactory,e.dependencies)).diDeps),{token:i,useClass:n,useValue:e.useValue,useFactory:r,useExisting:e.useExisting?this._getTokenMetadata(e.useExisting):void 0,deps:t,multi:e.multi}},e.prototype._getQueriesMetadata=function(e,t,n){var r=this,i=[];return Object.keys(e).forEach(function(o){var s=e[o];s.isViewQuery===t&&i.push(r._getQueryMetadata(s,o,n))}),i},e.prototype._queryVarBindings=function(e){return e.split(/\s*,\s*/)},e.prototype._getQueryMetadata=function(e,t,n){var r,i=this;return"string"==typeof e.selector?r=this._queryVarBindings(e.selector).map(function(e){return i._getTokenMetadata(e)}):e.selector?r=[this._getTokenMetadata(e.selector)]:(this._reportError(kt("Can't construct a query for the property \""+t+'" of "'+Vp(n)+"\" since the query selector wasn't defined."),n),r=[]),{selectors:r,first:e.first,descendants:e.descendants,propertyName:t,read:e.read?this._getTokenMetadata(e.read):null,static:e.static}},e.prototype._reportError=function(e,t,n){if(!this._errorCollector)throw e;this._errorCollector(e,t),n&&this._errorCollector(e,n)},e}();function Lp(e){return function t(e){return e?Array.from(new Set(e)):[]}(function e(t,n){if(void 0===n&&(n=[]),t)for(var r=0;r<t.length;r++){var i=Dt(t[r]);Array.isArray(i)?e(i,n):n.push(i)}return n}(e))}function Fp(e){return e instanceof Yt||e instanceof ne}var jp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.visitOther=function(e,t){t.push({reference:e})},t}(Ct);function Vp(e){return e instanceof Yt?e.name+" in "+e.filePath:Rt(e)}ct("_l");var Bp=function(){function e(e){this._reflector=e}return e.prototype.isNgModule=function(e){return this._reflector.annotations(e).some(X.isTypeOf)},e.prototype.resolve=function(e,t){void 0===t&&(t=!0);var n=Zc(this._reflector.annotations(e),X.isTypeOf);if(n)return n;if(t)throw new Error("No NgModule metadata found for '"+Rt(e)+"'.");return null},e}(),Hp=(function(e){function t(t,n){var r=e.call(this,!1)||this;return r.referenceFilter=t,r.importFilter=n,r.typeExpression=0,r.importsWithPrefixes=new Map,r.reexports=new Map,r}o(t,e),t.prototype.visitType=function(e,t,n){void 0===n&&(n="any"),e?(this.typeExpression++,e.visitType(this,t),this.typeExpression--):t.print(null,n)},t.prototype.visitLiteralExpr=function(t,n){var r=t.value;return null==r&&t.type!=fe?(n.print(t,"("+r+" as any)"),null):e.prototype.visitLiteralExpr.call(this,t,n)},t.prototype.visitLiteralArrayExpr=function(t,n){0===t.entries.length&&n.print(t,"(");var r=e.prototype.visitLiteralArrayExpr.call(this,t,n);return 0===t.entries.length&&n.print(t," as any[])"),r},t.prototype.visitExternalExpr=function(e,t){return this._visitIdentifier(e.value,e.typeParams,t),null},t.prototype.visitAssertNotNullExpr=function(t,n){var r=e.prototype.visitAssertNotNullExpr.call(this,t,n);return n.print(t,"!"),r},t.prototype.visitDeclareVarStmt=function(e,t){if(e.hasModifier(ke.Exported)&&e.value instanceof Oe&&!e.type){var n=e.value.value,r=n.name,i=n.moduleName;if(i){var o=this.reexports.get(i);return o||this.reexports.set(i,o=[]),o.push({name:r,as:e.name}),null}}return e.hasModifier(ke.Exported)&&t.print(e,"export "),e.hasModifier(ke.Final)?t.print(e,"const"):t.print(e,"var"),t.print(e," "+e.name),this._printColonType(e.type,t),e.value&&(t.print(e," = "),e.value.visitExpression(this,t)),t.println(e,";"),null},t.prototype.visitWrappedNodeExpr=function(e,t){throw new Error("Cannot visit a WrappedNodeExpr when outputting Typescript.")},t.prototype.visitCastExpr=function(e,t){return t.print(e,"(<"),e.type.visitType(this,t),t.print(e,">"),e.value.visitExpression(this,t),t.print(e,")"),null},t.prototype.visitInstantiateExpr=function(e,t){return t.print(e,"new "),this.typeExpression++,e.classExpr.visitExpression(this,t),this.typeExpression--,t.print(e,"("),this.visitAllExpressions(e.args,t,","),t.print(e,")"),null},t.prototype.visitDeclareClassStmt=function(e,t){var n=this;return t.pushClass(e),e.hasModifier(ke.Exported)&&t.print(e,"export "),t.print(e,"class "+e.name),null!=e.parent&&(t.print(e," extends "),this.typeExpression++,e.parent.visitExpression(this,t),this.typeExpression--),t.println(e," {"),t.incIndent(),e.fields.forEach(function(e){return n._visitClassField(e,t)}),null!=e.constructorMethod&&this._visitClassConstructor(e,t),e.getters.forEach(function(e){return n._visitClassGetter(e,t)}),e.methods.forEach(function(e){return n._visitClassMethod(e,t)}),t.decIndent(),t.println(e,"}"),t.popClass(),null},t.prototype._visitClassField=function(e,t){e.hasModifier(ke.Private)&&t.print(null,"/*private*/ "),e.hasModifier(ke.Static)&&t.print(null,"static "),t.print(null,e.name),this._printColonType(e.type,t),e.initializer&&(t.print(null," = "),e.initializer.visitExpression(this,t)),t.println(null,";")},t.prototype._visitClassGetter=function(e,t){e.hasModifier(ke.Private)&&t.print(null,"private "),t.print(null,"get "+e.name+"()"),this._printColonType(e.type,t),t.println(null," {"),t.incIndent(),this.visitAllStatements(e.body,t),t.decIndent(),t.println(null,"}")},t.prototype._visitClassConstructor=function(e,t){t.print(e,"constructor("),this._visitParams(e.constructorMethod.params,t),t.println(e,") {"),t.incIndent(),this.visitAllStatements(e.constructorMethod.body,t),t.decIndent(),t.println(e,"}")},t.prototype._visitClassMethod=function(e,t){e.hasModifier(ke.Private)&&t.print(null,"private "),t.print(null,e.name+"("),this._visitParams(e.params,t),t.print(null,")"),this._printColonType(e.type,t,"void"),t.println(null," {"),t.incIndent(),this.visitAllStatements(e.body,t),t.decIndent(),t.println(null,"}")},t.prototype.visitFunctionExpr=function(e,t){return e.name&&(t.print(e,"function "),t.print(e,e.name)),t.print(e,"("),this._visitParams(e.params,t),t.print(e,")"),this._printColonType(e.type,t,"void"),e.name||t.print(e," => "),t.println(e,"{"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.print(e,"}"),null},t.prototype.visitDeclareFunctionStmt=function(e,t){return e.hasModifier(ke.Exported)&&t.print(e,"export "),t.print(e,"function "+e.name+"("),this._visitParams(e.params,t),t.print(e,")"),this._printColonType(e.type,t,"void"),t.println(e," {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.println(e,"}"),null},t.prototype.visitTryCatchStmt=function(e,t){t.println(e,"try {"),t.incIndent(),this.visitAllStatements(e.bodyStmts,t),t.decIndent(),t.println(e,"} catch ("+wi.name+") {"),t.incIndent();var n=[xi.set(wi.prop("stack",null)).toDeclStmt(null,[ke.Final])].concat(e.catchStmts);return this.visitAllStatements(n,t),t.decIndent(),t.println(e,"}"),null},t.prototype.visitBuiltinType=function(e,t){var n;switch(e.name){case se.Bool:n="boolean";break;case se.Dynamic:n="any";break;case se.Function:n="Function";break;case se.Number:case se.Int:n="number";break;case se.String:n="string";break;case se.None:n="never";break;default:throw new Error("Unsupported builtin type "+e.name)}return t.print(null,n),null},t.prototype.visitExpressionType=function(e,t){var n=this;return e.value.visitExpression(this,t),null!==e.typeParams&&(t.print(null,"<"),this.visitAllObjects(function(e){return n.visitType(e,t)},e.typeParams,t,","),t.print(null,">")),null},t.prototype.visitArrayType=function(e,t){return this.visitType(e.of,t),t.print(null,"[]"),null},t.prototype.visitMapType=function(e,t){return t.print(null,"{[key: string]:"),this.visitType(e.valueType,t),t.print(null,"}"),null},t.prototype.getBuiltinMethodName=function(e){var t;switch(e){case we.ConcatArray:t="concat";break;case we.SubscribeObservable:t="subscribe";break;case we.Bind:t="bind";break;default:throw new Error("Unknown builtin method: "+e)}return t},t.prototype._visitParams=function(e,t){var n=this;this.visitAllObjects(function(e){t.print(null,e.name),n._printColonType(e.type,t)},e,t,",")},t.prototype._visitIdentifier=function(e,t,n){var r=this,i=e.name,o=e.moduleName;if(this.referenceFilter&&this.referenceFilter(e))n.print(null,"(null as any)");else{if(o&&(!this.importFilter||!this.importFilter(e))){var s=this.importsWithPrefixes.get(o);null==s&&this.importsWithPrefixes.set(o,s="i"+this.importsWithPrefixes.size),n.print(null,s+".")}n.print(null,i),this.typeExpression>0&&(t||[]).length>0&&(n.print(null,"<"),this.visitAllObjects(function(e){return e.visitType(r,n)},t,n,","),n.print(null,">"))}},t.prototype._printColonType=function(e,t,n){e!==fe&&(t.print(null,":"),this.visitType(e,t,n))}}(Ci),function(){function e(e){this._reflector=e}return e.prototype.isPipe=function(e){var t=this._reflector.annotations(Dt(e));return t&&t.some(z.isTypeOf)},e.prototype.resolve=function(e,t){void 0===t&&(t=!0);var n=this._reflector.annotations(Dt(e));if(n){var r=Zc(n,z.isTypeOf);if(r)return r}if(t)throw new Error("No Pipe decorator found on "+Rt(e));return null},e}()),Up=(ct("_l"),ct("_v"),ct("_ck"),ct("_co"),ct("en"),ct("ad"),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}o(t,e),t.prototype.convert=function(e,t){var n=this;return t?e.map(function(e){return e.visit(n,t)}):e},t.prototype.visitTagPlaceholder=function(e,t){var n=this,r=t.toPublicName(e.startName),i=e.closeName?t.toPublicName(e.closeName):e.closeName,o=e.children.map(function(e){return e.visit(n,t)});return new Rn(e.tag,e.attrs,r,i,o,e.isVoid,e.sourceSpan)},t.prototype.visitPlaceholder=function(e,t){return new Dn(e.value,t.toPublicName(e.name),e.sourceSpan)},t.prototype.visitIcuPlaceholder=function(e,t){return new Ln(e.value,t.toPublicName(e.name),e.sourceSpan)}}(Fn),/^(?!.*\.d\.ts$).*\.ts$/),qp=function qp(e,t){this.symbol=e,this.metadata=t},Kp=function(){function e(e,t,n,r){this.host=e,this.staticSymbolCache=t,this.summaryResolver=n,this.errorRecorder=r,this.metadataCache=new Map,this.resolvedSymbols=new Map,this.resolvedFilePaths=new Set,this.importAs=new Map,this.symbolResourcePaths=new Map,this.symbolFromFile=new Map,this.knownFileNameToModuleNames=new Map}return e.prototype.resolveSymbol=function(e){return e.members.length>0?this._resolveSymbolMembers(e):this._resolveSymbolFromSummary(e)||this.resolvedSymbols.get(e)||(this._createSymbolsOf(e.filePath),this.resolvedSymbols.get(e))},e.prototype.getImportAs=function(e,t){if(void 0===t&&(t=!0),e.members.length){var n=this.getStaticSymbol(e.filePath,e.name);return(o=this.getImportAs(n,t))?this.getStaticSymbol(o.filePath,o.name,e.members):null}var r=function i(e){return e.replace(Np,".")}(e.filePath);if(r!==e.filePath){var o,s=function a(e){return e.replace(kp,"")}(e.name);return n=this.getStaticSymbol(r,s,e.members),(o=this.getImportAs(n,t))?this.getStaticSymbol(function u(e,t){void 0===t&&(t=!1);var n=Ip(Pp(e),t);return n[0]+".ngsummary"+n[1]}(o.filePath),function l(e){return e+"NgSummary"}(o.name),n.members):null}var c=t&&this.summaryResolver.getImportAs(e)||null;return c||(c=this.importAs.get(e)),c},e.prototype.getResourcePath=function(e){return this.symbolResourcePaths.get(e)||e.filePath},e.prototype.getTypeArity=function(e){if(function t(e){return Tp.test(e)}(e.filePath))return null;for(var n=Wp(this.resolveSymbol(e));n&&n.metadata instanceof Yt;)n=Wp(this.resolveSymbol(n.metadata));return n&&n.metadata&&n.metadata.arity||null},e.prototype.getKnownModuleName=function(e){return this.knownFileNameToModuleNames.get(e)||null},e.prototype.recordImportAs=function(e,t){e.assertNoMembers(),t.assertNoMembers(),this.importAs.set(e,t)},e.prototype.recordModuleNameForFileName=function(e,t){this.knownFileNameToModuleNames.set(e,t)},e.prototype.invalidateFile=function(e){var t,n;this.metadataCache.delete(e),this.resolvedFilePaths.delete(e);var r=this.symbolFromFile.get(e);if(r){this.symbolFromFile.delete(e);try{for(var i=p(r),o=i.next();!o.done;o=i.next()){var s=o.value;this.resolvedSymbols.delete(s),this.importAs.delete(s),this.symbolResourcePaths.delete(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}},e.prototype.ignoreErrorsFor=function(e){var t=this.errorRecorder;this.errorRecorder=function(){};try{return e()}finally{this.errorRecorder=t}},e.prototype._resolveSymbolMembers=function(e){var t=e.members,n=this.resolveSymbol(this.getStaticSymbol(e.filePath,e.name));if(!n)return null;var r=Wp(n.metadata);if(r instanceof Yt)return new qp(e,this.getStaticSymbol(r.filePath,r.name,t));if(!r||"class"!==r.__symbolic){for(var i=r,o=0;o<t.length&&i;o++)i=i[t[o]];return new qp(e,i)}return r.statics&&1===t.length?new qp(e,r.statics[t[0]]):null},e.prototype._resolveSymbolFromSummary=function(e){var t=this.summaryResolver.resolveSummary(e);return t?new qp(e,t.metadata):null},e.prototype.getStaticSymbol=function(e,t,n){return this.staticSymbolCache.get(e,t,n)},e.prototype.hasDecorators=function(e){var t=this.getModuleMetadata(e);return!!t.metadata&&Object.keys(t.metadata).some(function(e){var n=t.metadata[e];return n&&"class"===n.__symbolic&&n.decorators})},e.prototype.getSymbolsOf=function(e){var t=this.summaryResolver.getSymbolsOf(e);if(t)return t;this._createSymbolsOf(e);var n=[];return this.resolvedSymbols.forEach(function(t){t.symbol.filePath===e&&n.push(t.symbol)}),n},e.prototype._createSymbolsOf=function(e){var t,n,r=this;if(!this.resolvedFilePaths.has(e)){this.resolvedFilePaths.add(e);var i=[],o=this.getModuleMetadata(e);if(o.importAs&&this.knownFileNameToModuleNames.set(e,o.importAs),o.exports){var s=function(t){if(t.export)t.export.forEach(function(n){var o,s=o=zp(o="string"==typeof n?n:n.as);"string"!=typeof n&&(s=zp(n.name));var a=r.resolveModule(t.from,e);if(a){var u=r.getStaticSymbol(a,s),l=r.getStaticSymbol(e,o);i.push(r.createExport(l,u))}});else{var n=a.resolveModule(t.from,e);n&&a.getSymbolsOf(n).forEach(function(t){var n=r.getStaticSymbol(e,t.name);i.push(r.createExport(n,t))})}},a=this;try{for(var u=p(o.exports),l=u.next();!l.done;l=u.next())s(l.value)}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}}if(o.metadata){var c=new Set(Object.keys(o.metadata).map(zp)),h=o.origins||{};Object.keys(o.metadata).forEach(function(t){var n=o.metadata[t],s=zp(t),a=r.getStaticSymbol(e,s),u=h.hasOwnProperty(t)&&h[t];if(u){var l=r.resolveModule(u,e);l?r.symbolResourcePaths.set(a,l):r.reportError(new Error("Couldn't resolve original symbol for "+u+" from "+r.host.getOutputName(e)))}i.push(r.createResolvedSymbol(a,e,c,n))})}i.forEach(function(e){return r.resolvedSymbols.set(e.symbol,e)}),this.symbolFromFile.set(e,i.map(function(e){return e.symbol}))}},e.prototype.createResolvedSymbol=function(e,t,n,r){var i,s=this,u=Up.test(e.filePath);if(this.summaryResolver.isLibraryFile(e.filePath)&&!u&&r&&"class"===r.__symbolic)return new qp(e,{__symbolic:"class",arity:r.arity});var l=function(){return i||(i=s.host.getOutputName(t.replace(/((\.ts)|(\.d\.ts)|)$/,".ts").replace(/^.*node_modules[\/\\]/,""))),i},c=this,p=xt(r,new(function(r){function i(){return null!==r&&r.apply(this,arguments)||this}return o(i,r),i.prototype.visitStringMap=function(i,o){var s=i.__symbolic;if("function"===s){var u=o.length;o.push.apply(o,f(i.parameters||[]));var p=r.prototype.visitStringMap.call(this,i,o);return o.length=u,p}if("reference"!==s)return"error"===s?a({},i,{fileName:l()}):r.prototype.visitStringMap.call(this,i,o);var h=i.module,d=i.name?zp(i.name):i.name;if(!d)return null;var v=void 0;return h?(v=c.resolveModule(h,e.filePath))?{__symbolic:"resolved",symbol:c.getStaticSymbol(v,d),line:i.line,character:i.character,fileName:l()}:{__symbolic:"error",message:"Could not resolve "+h+" relative to "+c.host.getMetadataFor(e.filePath)+".",line:i.line,character:i.character,fileName:l()}:o.indexOf(d)>=0?{__symbolic:"reference",name:d}:n.has(d)?c.getStaticSymbol(t,d):void 0},i}(Ct)),[]),h=Wp(p);return h instanceof Yt?this.createExport(e,h):new qp(e,p)},e.prototype.createExport=function(e,t){return e.assertNoMembers(),t.assertNoMembers(),this.summaryResolver.isLibraryFile(e.filePath)&&this.summaryResolver.isLibraryFile(t.filePath)&&this.importAs.set(t,this.getImportAs(e)||e),new qp(e,t)},e.prototype.reportError=function(e,t,n){if(!this.errorRecorder)throw e;this.errorRecorder(e,t&&t.filePath||n)},e.prototype.getModuleMetadata=function(e){var t=this.metadataCache.get(e);if(!t){var n=this.host.getMetadataFor(e);if(n){var r=-1;n.forEach(function(e){e&&e.version>r&&(r=e.version,t=e)})}if(t||(t={__symbolic:"module",version:4,module:e,metadata:{}}),4!=t.version){var i=2==t.version?"Unsupported metadata version "+t.version+" for module "+e+". This module should be compiled with a newer version of ngc":"Metadata version mismatch for module "+this.host.getOutputName(e)+", found version "+t.version+", expected 4";this.reportError(new Error(i))}this.metadataCache.set(e,t)}return t},e.prototype.getSymbolByModule=function(e,t,n){var r=this.resolveModule(e,n);return r?this.getStaticSymbol(r,t):(this.reportError(new Error("Could not resolve module "+e+(n?" relative to "+this.host.getOutputName(n):""))),this.getStaticSymbol("ERROR:"+e,t))},e.prototype.resolveModule=function(e,t){try{return this.host.moduleNameToFileName(e,t)}catch(n){console.error("Could not resolve module '"+e+"' relative to file "+t),this.reportError(n,void 0,t)}return null},e}();
|
|
498
|
+
*/(n))}(r,e,i)}))}},e.prototype._getFactoryMetadata=function(e,t){return void 0===t&&(t=null),{reference:e=Dt(e),diDeps:this._getDependenciesMetadata(e,t)}},e.prototype.getPipeMetadata=function(e){var t=this._pipeCache.get(e);return t||this._reportError(kt("Illegal state: getPipeMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Pipe "+Vp(e)+"."),e),t||null},e.prototype.getPipeSummary=function(e){var t=this._loadSummary(e,tn.Pipe);return t||this._reportError(kt("Illegal state: Could not load the summary for pipe "+Vp(e)+"."),e),t},e.prototype.getOrLoadPipeMetadata=function(e){var t=this._pipeCache.get(e);return t||(t=this._loadPipeMetadata(e)),t},e.prototype._loadPipeMetadata=function(e){e=Dt(e);var t=this._pipeResolver.resolve(e),n=new cn({type:this._getTypeMetadata(e),name:t.name,pure:!!t.pure});return this._pipeCache.set(e,n),this._summaryCache.set(e,n.toSummary()),n},e.prototype._getDependenciesMetadata=function(e,t,n){var r=this;void 0===n&&(n=!0);var i=!1,o=(t||this._reflector.parameters(e)||[]).map(function(e){var t=!1,n=!1,o=!1,s=!1,a=!1,u=null;return Array.isArray(e)?e.forEach(function(e){te.isTypeOf(e)?n=!0:J.isTypeOf(e)?o=!0:ee.isTypeOf(e)?s=!0:Z.isTypeOf(e)?a=!0:D.isTypeOf(e)?(t=!0,u=e.attributeName):O.isTypeOf(e)?u=e.token:R.isTypeOf(e)||e instanceof Yt?u=e:Fp(e)&&null==u&&(u=e)}):u=e,null==u?(i=!0,{}):{isAttribute:t,isHost:n,isSelf:o,isSkipSelf:s,isOptional:a,token:r._getTokenMetadata(u)}});if(i){var s=o.map(function(e){return e.token?Vp(e.token):"?"}).join(", "),a="Can't resolve all parameters for "+Vp(e)+": ("+s+").";n||this._config.strictInjectionParameters?this._reportError(kt(a),e):this._console.warn("Warning: "+a+" This will become an error in Angular v6.x")}return o},e.prototype._getTokenMetadata=function(e){return"string"==typeof(e=Dt(e))?{value:e}:{identifier:{reference:e}}},e.prototype._getProvidersMetadata=function(e,t,n,r,i){var o=this;return void 0===r&&(r=[]),e.forEach(function(s,a){if(Array.isArray(s))o._getProvidersMetadata(s,t,n,r);else{var u=void 0;if((s=Dt(s))&&"object"==typeof s&&s.hasOwnProperty("provide"))o._validateProvider(s),u=new dn(s.provide,s);else{if(!Fp(s)){if(void 0===s)return void o._reportError(kt("Encountered undefined provider! Usually this means you have a circular dependencies. This might be caused by using 'barrel' index.ts files."));var l=e.reduce(function(e,t,n){return n<a?e.push(""+Vp(t)):n==a?e.push("?"+Vp(t)+"?"):n==a+1&&e.push("..."),e},[]).join(", ");return void o._reportError(kt("Invalid "+(n||"provider")+" - only instances of Provider and Type are allowed, got: ["+l+"]"),i)}u=new dn(s,{useClass:s})}u.token===o._reflector.resolveExternalReference($t.ANALYZE_FOR_ENTRY_COMPONENTS)?t.push.apply(t,f(o._getEntryComponentsFromProvider(u,i))):r.push(o.getProviderMetadata(u))}}),r},e.prototype._validateProvider=function(e){e.hasOwnProperty("useClass")&&null==e.useClass&&this._reportError(kt("Invalid provider for "+Vp(e.provide)+". useClass cannot be "+e.useClass+".\n Usually it happens when:\n 1. There's a circular dependency (might be caused by using index.ts (barrel) files).\n 2. Class was used before it was declared. Use forwardRef in this case."))},e.prototype._getEntryComponentsFromProvider=function(e,t){var n=this,r=[],i=[];return e.useFactory||e.useExisting||e.useClass?(this._reportError(kt("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports useValue!"),t),[]):e.multi?(function o(e,t){xt(e,new jp,t)}(e.useValue,i),i.forEach(function(e){var t=n._getEntryComponentMetadata(e.reference,!1);t&&r.push(t)}),r):(this._reportError(kt("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports 'multi = true'!"),t),[])},e.prototype._getEntryComponentMetadata=function(e,t){void 0===t&&(t=!0);var n=this.getNonNormalizedDirectiveMetadata(e);if(n&&n.metadata.isComponent)return{componentType:e,componentFactory:n.metadata.componentFactory};var r=this._loadSummary(e,tn.Directive);if(r&&r.isComponent)return{componentType:e,componentFactory:r.componentFactory};if(t)throw kt(e.name+" cannot be used as an entry component.");return null},e.prototype._getInjectableTypeMetadata=function(e,t){void 0===t&&(t=null);var n=this._loadSummary(e,tn.Injectable);return n?n.type:this._getTypeMetadata(e,t)},e.prototype.getProviderMetadata=function(e){var t=void 0,n=null,r=null,i=this._getTokenMetadata(e.token);return e.useClass?(t=(n=this._getInjectableTypeMetadata(e.useClass,e.dependencies)).diDeps,e.token===e.useClass&&(i={identifier:n})):e.useFactory&&(t=(r=this._getFactoryMetadata(e.useFactory,e.dependencies)).diDeps),{token:i,useClass:n,useValue:e.useValue,useFactory:r,useExisting:e.useExisting?this._getTokenMetadata(e.useExisting):void 0,deps:t,multi:e.multi}},e.prototype._getQueriesMetadata=function(e,t,n){var r=this,i=[];return Object.keys(e).forEach(function(o){var s=e[o];s.isViewQuery===t&&i.push(r._getQueryMetadata(s,o,n))}),i},e.prototype._queryVarBindings=function(e){return e.split(/\s*,\s*/)},e.prototype._getQueryMetadata=function(e,t,n){var r,i=this;return"string"==typeof e.selector?r=this._queryVarBindings(e.selector).map(function(e){return i._getTokenMetadata(e)}):e.selector?r=[this._getTokenMetadata(e.selector)]:(this._reportError(kt("Can't construct a query for the property \""+t+'" of "'+Vp(n)+"\" since the query selector wasn't defined."),n),r=[]),{selectors:r,first:e.first,descendants:e.descendants,propertyName:t,read:e.read?this._getTokenMetadata(e.read):null,static:e.static}},e.prototype._reportError=function(e,t,n){if(!this._errorCollector)throw e;this._errorCollector(e,t),n&&this._errorCollector(e,n)},e}();function Lp(e){return function t(e){return e?Array.from(new Set(e)):[]}(function e(t,n){if(void 0===n&&(n=[]),t)for(var r=0;r<t.length;r++){var i=Dt(t[r]);Array.isArray(i)?e(i,n):n.push(i)}return n}(e))}function Fp(e){return e instanceof Yt||e instanceof ne}var jp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.visitOther=function(e,t){t.push({reference:e})},t}(Ct);function Vp(e){return e instanceof Yt?e.name+" in "+e.filePath:Rt(e)}ct("_l");var Bp=function(){function e(e){this._reflector=e}return e.prototype.isNgModule=function(e){return this._reflector.annotations(e).some(X.isTypeOf)},e.prototype.resolve=function(e,t){void 0===t&&(t=!0);var n=Zc(this._reflector.annotations(e),X.isTypeOf);if(n)return n;if(t)throw new Error("No NgModule metadata found for '"+Rt(e)+"'.");return null},e}(),Hp=(function(e){function t(t,n){var r=e.call(this,!1)||this;return r.referenceFilter=t,r.importFilter=n,r.typeExpression=0,r.importsWithPrefixes=new Map,r.reexports=new Map,r}o(t,e),t.prototype.visitType=function(e,t,n){void 0===n&&(n="any"),e?(this.typeExpression++,e.visitType(this,t),this.typeExpression--):t.print(null,n)},t.prototype.visitLiteralExpr=function(t,n){var r=t.value;return null==r&&t.type!=fe?(n.print(t,"("+r+" as any)"),null):e.prototype.visitLiteralExpr.call(this,t,n)},t.prototype.visitLiteralArrayExpr=function(t,n){0===t.entries.length&&n.print(t,"(");var r=e.prototype.visitLiteralArrayExpr.call(this,t,n);return 0===t.entries.length&&n.print(t," as any[])"),r},t.prototype.visitExternalExpr=function(e,t){return this._visitIdentifier(e.value,e.typeParams,t),null},t.prototype.visitAssertNotNullExpr=function(t,n){var r=e.prototype.visitAssertNotNullExpr.call(this,t,n);return n.print(t,"!"),r},t.prototype.visitDeclareVarStmt=function(e,t){if(e.hasModifier(ke.Exported)&&e.value instanceof Oe&&!e.type){var n=e.value.value,r=n.name,i=n.moduleName;if(i){var o=this.reexports.get(i);return o||this.reexports.set(i,o=[]),o.push({name:r,as:e.name}),null}}return e.hasModifier(ke.Exported)&&t.print(e,"export "),e.hasModifier(ke.Final)?t.print(e,"const"):t.print(e,"var"),t.print(e," "+e.name),this._printColonType(e.type,t),e.value&&(t.print(e," = "),e.value.visitExpression(this,t)),t.println(e,";"),null},t.prototype.visitWrappedNodeExpr=function(e,t){throw new Error("Cannot visit a WrappedNodeExpr when outputting Typescript.")},t.prototype.visitCastExpr=function(e,t){return t.print(e,"(<"),e.type.visitType(this,t),t.print(e,">"),e.value.visitExpression(this,t),t.print(e,")"),null},t.prototype.visitInstantiateExpr=function(e,t){return t.print(e,"new "),this.typeExpression++,e.classExpr.visitExpression(this,t),this.typeExpression--,t.print(e,"("),this.visitAllExpressions(e.args,t,","),t.print(e,")"),null},t.prototype.visitDeclareClassStmt=function(e,t){var n=this;return t.pushClass(e),e.hasModifier(ke.Exported)&&t.print(e,"export "),t.print(e,"class "+e.name),null!=e.parent&&(t.print(e," extends "),this.typeExpression++,e.parent.visitExpression(this,t),this.typeExpression--),t.println(e," {"),t.incIndent(),e.fields.forEach(function(e){return n._visitClassField(e,t)}),null!=e.constructorMethod&&this._visitClassConstructor(e,t),e.getters.forEach(function(e){return n._visitClassGetter(e,t)}),e.methods.forEach(function(e){return n._visitClassMethod(e,t)}),t.decIndent(),t.println(e,"}"),t.popClass(),null},t.prototype._visitClassField=function(e,t){e.hasModifier(ke.Private)&&t.print(null,"/*private*/ "),e.hasModifier(ke.Static)&&t.print(null,"static "),t.print(null,e.name),this._printColonType(e.type,t),e.initializer&&(t.print(null," = "),e.initializer.visitExpression(this,t)),t.println(null,";")},t.prototype._visitClassGetter=function(e,t){e.hasModifier(ke.Private)&&t.print(null,"private "),t.print(null,"get "+e.name+"()"),this._printColonType(e.type,t),t.println(null," {"),t.incIndent(),this.visitAllStatements(e.body,t),t.decIndent(),t.println(null,"}")},t.prototype._visitClassConstructor=function(e,t){t.print(e,"constructor("),this._visitParams(e.constructorMethod.params,t),t.println(e,") {"),t.incIndent(),this.visitAllStatements(e.constructorMethod.body,t),t.decIndent(),t.println(e,"}")},t.prototype._visitClassMethod=function(e,t){e.hasModifier(ke.Private)&&t.print(null,"private "),t.print(null,e.name+"("),this._visitParams(e.params,t),t.print(null,")"),this._printColonType(e.type,t,"void"),t.println(null," {"),t.incIndent(),this.visitAllStatements(e.body,t),t.decIndent(),t.println(null,"}")},t.prototype.visitFunctionExpr=function(e,t){return e.name&&(t.print(e,"function "),t.print(e,e.name)),t.print(e,"("),this._visitParams(e.params,t),t.print(e,")"),this._printColonType(e.type,t,"void"),e.name||t.print(e," => "),t.println(e,"{"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.print(e,"}"),null},t.prototype.visitDeclareFunctionStmt=function(e,t){return e.hasModifier(ke.Exported)&&t.print(e,"export "),t.print(e,"function "+e.name+"("),this._visitParams(e.params,t),t.print(e,")"),this._printColonType(e.type,t,"void"),t.println(e," {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.println(e,"}"),null},t.prototype.visitTryCatchStmt=function(e,t){t.println(e,"try {"),t.incIndent(),this.visitAllStatements(e.bodyStmts,t),t.decIndent(),t.println(e,"} catch ("+uo.name+") {"),t.incIndent();var n=[lo.set(uo.prop("stack",null)).toDeclStmt(null,[ke.Final])].concat(e.catchStmts);return this.visitAllStatements(n,t),t.decIndent(),t.println(e,"}"),null},t.prototype.visitBuiltinType=function(e,t){var n;switch(e.name){case se.Bool:n="boolean";break;case se.Dynamic:n="any";break;case se.Function:n="Function";break;case se.Number:case se.Int:n="number";break;case se.String:n="string";break;case se.None:n="never";break;default:throw new Error("Unsupported builtin type "+e.name)}return t.print(null,n),null},t.prototype.visitExpressionType=function(e,t){var n=this;return e.value.visitExpression(this,t),null!==e.typeParams&&(t.print(null,"<"),this.visitAllObjects(function(e){return n.visitType(e,t)},e.typeParams,t,","),t.print(null,">")),null},t.prototype.visitArrayType=function(e,t){return this.visitType(e.of,t),t.print(null,"[]"),null},t.prototype.visitMapType=function(e,t){return t.print(null,"{[key: string]:"),this.visitType(e.valueType,t),t.print(null,"}"),null},t.prototype.getBuiltinMethodName=function(e){var t;switch(e){case we.ConcatArray:t="concat";break;case we.SubscribeObservable:t="subscribe";break;case we.Bind:t="bind";break;default:throw new Error("Unknown builtin method: "+e)}return t},t.prototype._visitParams=function(e,t){var n=this;this.visitAllObjects(function(e){t.print(null,e.name),n._printColonType(e.type,t)},e,t,",")},t.prototype._visitIdentifier=function(e,t,n){var r=this,i=e.name,o=e.moduleName;if(this.referenceFilter&&this.referenceFilter(e))n.print(null,"(null as any)");else{if(o&&(!this.importFilter||!this.importFilter(e))){var s=this.importsWithPrefixes.get(o);null==s&&this.importsWithPrefixes.set(o,s="i"+this.importsWithPrefixes.size),n.print(null,s+".")}n.print(null,i),this.typeExpression>0&&(t||[]).length>0&&(n.print(null,"<"),this.visitAllObjects(function(e){return e.visitType(r,n)},t,n,","),n.print(null,">"))}},t.prototype._printColonType=function(e,t,n){e!==fe&&(t.print(null,":"),this.visitType(e,t,n))}}(ho),function(){function e(e){this._reflector=e}return e.prototype.isPipe=function(e){var t=this._reflector.annotations(Dt(e));return t&&t.some(z.isTypeOf)},e.prototype.resolve=function(e,t){void 0===t&&(t=!0);var n=this._reflector.annotations(Dt(e));if(n){var r=Zc(n,z.isTypeOf);if(r)return r}if(t)throw new Error("No Pipe decorator found on "+Rt(e));return null},e}()),Up=(ct("_l"),ct("_v"),ct("_ck"),ct("_co"),ct("en"),ct("ad"),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}o(t,e),t.prototype.convert=function(e,t){var n=this;return t?e.map(function(e){return e.visit(n,t)}):e},t.prototype.visitTagPlaceholder=function(e,t){var n=this,r=t.toPublicName(e.startName),i=e.closeName?t.toPublicName(e.closeName):e.closeName,o=e.children.map(function(e){return e.visit(n,t)});return new wr(e.tag,e.attrs,r,i,o,e.isVoid,e.sourceSpan)},t.prototype.visitPlaceholder=function(e,t){return new xr(e.value,t.toPublicName(e.name),e.sourceSpan)},t.prototype.visitIcuPlaceholder=function(e,t){return new Er(e.value,t.toPublicName(e.name),e.sourceSpan)}}(Sr),/^(?!.*\.d\.ts$).*\.ts$/),qp=function qp(e,t){this.symbol=e,this.metadata=t},Kp=function(){function e(e,t,n,r){this.host=e,this.staticSymbolCache=t,this.summaryResolver=n,this.errorRecorder=r,this.metadataCache=new Map,this.resolvedSymbols=new Map,this.resolvedFilePaths=new Set,this.importAs=new Map,this.symbolResourcePaths=new Map,this.symbolFromFile=new Map,this.knownFileNameToModuleNames=new Map}return e.prototype.resolveSymbol=function(e){return e.members.length>0?this._resolveSymbolMembers(e):this._resolveSymbolFromSummary(e)||this.resolvedSymbols.get(e)||(this._createSymbolsOf(e.filePath),this.resolvedSymbols.get(e))},e.prototype.getImportAs=function(e,t){if(void 0===t&&(t=!0),e.members.length){var n=this.getStaticSymbol(e.filePath,e.name);return(o=this.getImportAs(n,t))?this.getStaticSymbol(o.filePath,o.name,e.members):null}var r=function i(e){return e.replace(Np,".")}(e.filePath);if(r!==e.filePath){var o,s=function a(e){return e.replace(kp,"")}(e.name);return n=this.getStaticSymbol(r,s,e.members),(o=this.getImportAs(n,t))?this.getStaticSymbol(function u(e,t){void 0===t&&(t=!1);var n=Ip(Pp(e),t);return n[0]+".ngsummary"+n[1]}(o.filePath),function l(e){return e+"NgSummary"}(o.name),n.members):null}var c=t&&this.summaryResolver.getImportAs(e)||null;return c||(c=this.importAs.get(e)),c},e.prototype.getResourcePath=function(e){return this.symbolResourcePaths.get(e)||e.filePath},e.prototype.getTypeArity=function(e){if(function t(e){return Tp.test(e)}(e.filePath))return null;for(var n=Wp(this.resolveSymbol(e));n&&n.metadata instanceof Yt;)n=Wp(this.resolveSymbol(n.metadata));return n&&n.metadata&&n.metadata.arity||null},e.prototype.getKnownModuleName=function(e){return this.knownFileNameToModuleNames.get(e)||null},e.prototype.recordImportAs=function(e,t){e.assertNoMembers(),t.assertNoMembers(),this.importAs.set(e,t)},e.prototype.recordModuleNameForFileName=function(e,t){this.knownFileNameToModuleNames.set(e,t)},e.prototype.invalidateFile=function(e){var t,n;this.metadataCache.delete(e),this.resolvedFilePaths.delete(e);var r=this.symbolFromFile.get(e);if(r){this.symbolFromFile.delete(e);try{for(var i=p(r),o=i.next();!o.done;o=i.next()){var s=o.value;this.resolvedSymbols.delete(s),this.importAs.delete(s),this.symbolResourcePaths.delete(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}},e.prototype.ignoreErrorsFor=function(e){var t=this.errorRecorder;this.errorRecorder=function(){};try{return e()}finally{this.errorRecorder=t}},e.prototype._resolveSymbolMembers=function(e){var t=e.members,n=this.resolveSymbol(this.getStaticSymbol(e.filePath,e.name));if(!n)return null;var r=Wp(n.metadata);if(r instanceof Yt)return new qp(e,this.getStaticSymbol(r.filePath,r.name,t));if(!r||"class"!==r.__symbolic){for(var i=r,o=0;o<t.length&&i;o++)i=i[t[o]];return new qp(e,i)}return r.statics&&1===t.length?new qp(e,r.statics[t[0]]):null},e.prototype._resolveSymbolFromSummary=function(e){var t=this.summaryResolver.resolveSummary(e);return t?new qp(e,t.metadata):null},e.prototype.getStaticSymbol=function(e,t,n){return this.staticSymbolCache.get(e,t,n)},e.prototype.hasDecorators=function(e){var t=this.getModuleMetadata(e);return!!t.metadata&&Object.keys(t.metadata).some(function(e){var n=t.metadata[e];return n&&"class"===n.__symbolic&&n.decorators})},e.prototype.getSymbolsOf=function(e){var t=this.summaryResolver.getSymbolsOf(e);if(t)return t;this._createSymbolsOf(e);var n=[];return this.resolvedSymbols.forEach(function(t){t.symbol.filePath===e&&n.push(t.symbol)}),n},e.prototype._createSymbolsOf=function(e){var t,n,r=this;if(!this.resolvedFilePaths.has(e)){this.resolvedFilePaths.add(e);var i=[],o=this.getModuleMetadata(e);if(o.importAs&&this.knownFileNameToModuleNames.set(e,o.importAs),o.exports){var s=function(t){if(t.export)t.export.forEach(function(n){var o,s=o=zp(o="string"==typeof n?n:n.as);"string"!=typeof n&&(s=zp(n.name));var a=r.resolveModule(t.from,e);if(a){var u=r.getStaticSymbol(a,s),l=r.getStaticSymbol(e,o);i.push(r.createExport(l,u))}});else{var n=a.resolveModule(t.from,e);n&&a.getSymbolsOf(n).forEach(function(t){var n=r.getStaticSymbol(e,t.name);i.push(r.createExport(n,t))})}},a=this;try{for(var u=p(o.exports),l=u.next();!l.done;l=u.next())s(l.value)}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}}if(o.metadata){var c=new Set(Object.keys(o.metadata).map(zp)),h=o.origins||{};Object.keys(o.metadata).forEach(function(t){var n=o.metadata[t],s=zp(t),a=r.getStaticSymbol(e,s),u=h.hasOwnProperty(t)&&h[t];if(u){var l=r.resolveModule(u,e);l?r.symbolResourcePaths.set(a,l):r.reportError(new Error("Couldn't resolve original symbol for "+u+" from "+r.host.getOutputName(e)))}i.push(r.createResolvedSymbol(a,e,c,n))})}i.forEach(function(e){return r.resolvedSymbols.set(e.symbol,e)}),this.symbolFromFile.set(e,i.map(function(e){return e.symbol}))}},e.prototype.createResolvedSymbol=function(e,t,n,r){var i,s=this,u=Up.test(e.filePath);if(this.summaryResolver.isLibraryFile(e.filePath)&&!u&&r&&"class"===r.__symbolic)return new qp(e,{__symbolic:"class",arity:r.arity});var l=function(){return i||(i=s.host.getOutputName(t.replace(/((\.ts)|(\.d\.ts)|)$/,".ts").replace(/^.*node_modules[\/\\]/,""))),i},c=this,p=xt(r,new(function(r){function i(){return null!==r&&r.apply(this,arguments)||this}return o(i,r),i.prototype.visitStringMap=function(i,o){var s=i.__symbolic;if("function"===s){var u=o.length;o.push.apply(o,f(i.parameters||[]));var p=r.prototype.visitStringMap.call(this,i,o);return o.length=u,p}if("reference"!==s)return"error"===s?a({},i,{fileName:l()}):r.prototype.visitStringMap.call(this,i,o);var h=i.module,d=i.name?zp(i.name):i.name;if(!d)return null;var v=void 0;return h?(v=c.resolveModule(h,e.filePath))?{__symbolic:"resolved",symbol:c.getStaticSymbol(v,d),line:i.line,character:i.character,fileName:l()}:{__symbolic:"error",message:"Could not resolve "+h+" relative to "+c.host.getMetadataFor(e.filePath)+".",line:i.line,character:i.character,fileName:l()}:o.indexOf(d)>=0?{__symbolic:"reference",name:d}:n.has(d)?c.getStaticSymbol(t,d):void 0},i}(Ct)),[]),h=Wp(p);return h instanceof Yt?this.createExport(e,h):new qp(e,p)},e.prototype.createExport=function(e,t){return e.assertNoMembers(),t.assertNoMembers(),this.summaryResolver.isLibraryFile(e.filePath)&&this.summaryResolver.isLibraryFile(t.filePath)&&this.importAs.set(t,this.getImportAs(e)||e),new qp(e,t)},e.prototype.reportError=function(e,t,n){if(!this.errorRecorder)throw e;this.errorRecorder(e,t&&t.filePath||n)},e.prototype.getModuleMetadata=function(e){var t=this.metadataCache.get(e);if(!t){var n=this.host.getMetadataFor(e);if(n){var r=-1;n.forEach(function(e){e&&e.version>r&&(r=e.version,t=e)})}if(t||(t={__symbolic:"module",version:4,module:e,metadata:{}}),4!=t.version){var i=2==t.version?"Unsupported metadata version "+t.version+" for module "+e+". This module should be compiled with a newer version of ngc":"Metadata version mismatch for module "+this.host.getOutputName(e)+", found version "+t.version+", expected 4";this.reportError(new Error(i))}this.metadataCache.set(e,t)}return t},e.prototype.getSymbolByModule=function(e,t,n){var r=this.resolveModule(e,n);return r?this.getStaticSymbol(r,t):(this.reportError(new Error("Could not resolve module "+e+(n?" relative to "+this.host.getOutputName(n):""))),this.getStaticSymbol("ERROR:"+e,t))},e.prototype.resolveModule=function(e,t){try{return this.host.moduleNameToFileName(e,t)}catch(n){console.error("Could not resolve module '"+e+"' relative to file "+t),this.reportError(n,void 0,t)}return null},e}();
|
|
499
499
|
/**
|
|
500
500
|
* @license
|
|
501
501
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -588,7 +588,7 @@ function gh(){return new xh(".")}var _h,bh,wh,xh=function(){function e(e){void 0
|
|
|
588
588
|
*
|
|
589
589
|
* Use of this source code is governed by an MIT-style license that can be
|
|
590
590
|
* found in the LICENSE file at https://angular.io/license
|
|
591
|
-
*/(e,n));var i=Sh(n),o=this._packagePrefix;if(null!=o&&null!=i&&"package"==i[_h.Scheme]){var s=i[_h.Path];return(o=o.replace(/\/+$/,""))+"/"+s.replace(/^\/+/,"")}return n},e}(),Eh=new RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\w\\d\\-\\u0100-\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function Sh(e){return e.match(Eh)}function Ch(e){var t=e[_h.Path];return t=null==t?"":function n(e){if("/"==e)return"/";for(var t="/"==e[0]?"/":"",n="/"===e[e.length-1]?"/":"",r=e.split("/"),i=[],o=0,s=0;s<r.length;s++){var a=r[s];switch(a){case"":case".":break;case"..":i.length>0?i.pop():o++;break;default:i.push(a)}}if(""==t){for(;o-- >0;)i.unshift("..");0===i.length&&i.push(".")}return t+i.join("/")+n}(t),e[_h.Path]=t,function r(e,t,n,i,o,s,a){var u=[];return null!=e&&u.push(e+":"),null!=n&&(u.push("//"),null!=t&&u.push(t+"@"),u.push(n),null!=i&&u.push(":"+i)),null!=o&&u.push(o),null!=s&&u.push("?"+s),null!=a&&u.push("#"+a),u.join("")}(e[_h.Scheme],e[_h.UserInfo],e[_h.Domain],e[_h.Port],t,e[_h.QueryData],e[_h.Fragment])}!function(e){e[e.Scheme=1]="Scheme",e[e.UserInfo=2]="UserInfo",e[e.Domain=3]="Domain",e[e.Port=4]="Port",e[e.Path=5]="Path",e[e.QueryData=6]="QueryData",e[e.Fragment=7]="Fragment"}(_h||(_h={})),function(e){function t(t,n,r,i,o,s,a){var u=e.call(this)||this;return u.bindings=t,u.symbols=n,u.usedPipes=r,u.nestingLevel=i,u.scope=o,u.template=s,u.level=a,u.pipesUsed=[],u.visitNode=function(e){return e.visit(u)},u}o(t,e),t.apply=function(e,n){var r=new Map,i=new Map,o=new Map,s=new Set;return new t(r,i,s,o,n,e instanceof
|
|
591
|
+
*/(e,n));var i=Sh(n),o=this._packagePrefix;if(null!=o&&null!=i&&"package"==i[_h.Scheme]){var s=i[_h.Path];return(o=o.replace(/\/+$/,""))+"/"+s.replace(/^\/+/,"")}return n},e}(),Eh=new RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\w\\d\\-\\u0100-\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function Sh(e){return e.match(Eh)}function Ch(e){var t=e[_h.Path];return t=null==t?"":function n(e){if("/"==e)return"/";for(var t="/"==e[0]?"/":"",n="/"===e[e.length-1]?"/":"",r=e.split("/"),i=[],o=0,s=0;s<r.length;s++){var a=r[s];switch(a){case"":case".":break;case"..":i.length>0?i.pop():o++;break;default:i.push(a)}}if(""==t){for(;o-- >0;)i.unshift("..");0===i.length&&i.push(".")}return t+i.join("/")+n}(t),e[_h.Path]=t,function r(e,t,n,i,o,s,a){var u=[];return null!=e&&u.push(e+":"),null!=n&&(u.push("//"),null!=t&&u.push(t+"@"),u.push(n),null!=i&&u.push(":"+i)),null!=o&&u.push(o),null!=s&&u.push("?"+s),null!=a&&u.push("#"+a),u.join("")}(e[_h.Scheme],e[_h.UserInfo],e[_h.Domain],e[_h.Port],t,e[_h.QueryData],e[_h.Fragment])}!function(e){e[e.Scheme=1]="Scheme",e[e.UserInfo=2]="UserInfo",e[e.Domain=3]="Domain",e[e.Port=4]="Port",e[e.Path=5]="Path",e[e.QueryData=6]="QueryData",e[e.Fragment=7]="Fragment"}(_h||(_h={})),function(e){function t(t,n,r,i,o,s,a){var u=e.call(this)||this;return u.bindings=t,u.symbols=n,u.usedPipes=r,u.nestingLevel=i,u.scope=o,u.template=s,u.level=a,u.pipesUsed=[],u.visitNode=function(e){return e.visit(u)},u}o(t,e),t.apply=function(e,n){var r=new Map,i=new Map,o=new Map,s=new Set;return new t(r,i,s,o,n,e instanceof pr?e:null,0).ingest(e),{expressions:r,symbols:i,nestingLevel:o,usedPipes:s}},t.prototype.ingest=function(e){e instanceof pr?(e.variables.forEach(this.visitNode),e.children.forEach(this.visitNode),this.nestingLevel.set(e,this.level)):e.forEach(this.visitNode)},t.prototype.visitElement=function(e){e.inputs.forEach(this.visitNode),e.outputs.forEach(this.visitNode),e.children.forEach(this.visitNode)},t.prototype.visitTemplate=function(e){e.inputs.forEach(this.visitNode),e.outputs.forEach(this.visitNode),e.templateAttrs.forEach(this.visitNode),e.references.forEach(this.visitNode);var n=this.scope.getChildScope(e);new t(this.bindings,this.symbols,this.usedPipes,this.nestingLevel,n,e,this.level+1).ingest(e)},t.prototype.visitVariable=function(e){null!==this.template&&this.symbols.set(e,this.template)},t.prototype.visitReference=function(e){null!==this.template&&this.symbols.set(e,this.template)},t.prototype.visitText=function(e){},t.prototype.visitContent=function(e){},t.prototype.visitTextAttribute=function(e){},t.prototype.visitIcu=function(e){},t.prototype.visitBoundAttribute=function(e){e.value.visit(this)},t.prototype.visitBoundEvent=function(e){e.handler.visit(this)},t.prototype.visitBoundText=function(e){e.value.visit(this)},t.prototype.visitPipe=function(t,n){return this.usedPipes.add(t.name),e.prototype.visitPipe.call(this,t,n)},t.prototype.visitPropertyRead=function(t,n){return this.maybeMap(n,t,t.name),e.prototype.visitPropertyRead.call(this,t,n)},t.prototype.visitSafePropertyRead=function(t,n){return this.maybeMap(n,t,t.name),e.prototype.visitSafePropertyRead.call(this,t,n)},t.prototype.visitPropertyWrite=function(t,n){return this.maybeMap(n,t,t.name),e.prototype.visitPropertyWrite.call(this,t,n)},t.prototype.visitMethodCall=function(t,n){return this.maybeMap(n,t,t.name),e.prototype.visitMethodCall.call(this,t,n)},t.prototype.visitSafeMethodCall=function(t,n){return this.maybeMap(n,t,t.name),e.prototype.visitSafeMethodCall.call(this,t,n)},t.prototype.maybeMap=function(e,t,n){if(t.receiver instanceof No){var r=this.scope.lookup(n);null!==r&&this.bindings.set(t,r)}}}(Go),
|
|
592
592
|
/**
|
|
593
593
|
* @license
|
|
594
594
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -746,7 +746,7 @@ return function t(e){return e&&!!e.start}(e)?{start:e.start.offset,end:e.end.off
|
|
|
746
746
|
*
|
|
747
747
|
* Use of this source code is governed by an MIT-style license that can be
|
|
748
748
|
* found in the LICENSE file at https://angular.io/license
|
|
749
|
-
*/function yd(e){return new gd(e)}var gd=function(){function e(e){this.host=e}return Object.defineProperty(e.prototype,"metadataResolver",{get:function(){return this.host.resolver},enumerable:!0,configurable:!0}),e.prototype.getTemplateReferences=function(){return this.host.getTemplateReferences()},e.prototype.getDiagnostics=function(e){var t=[],n=this.host.getTemplates(e);n&&n.length&&t.push.apply(t,f(
|
|
749
|
+
*/function yd(e){return new gd(e)}var gd=function(){function e(e){this.host=e}return Object.defineProperty(e.prototype,"metadataResolver",{get:function(){return this.host.resolver},enumerable:!0,configurable:!0}),e.prototype.getTemplateReferences=function(){return this.host.getTemplateReferences()},e.prototype.getDiagnostics=function(e){var t=[],n=this.host.getTemplates(e);n&&n.length&&t.push.apply(t,f(this.getTemplateDiagnostics(e,n)));var r=this.host.getDeclarations(e);if(r&&r.length){var i=this.host.getAnalyzedModules();t.push.apply(t,f(
|
|
750
750
|
/**
|
|
751
751
|
* @license
|
|
752
752
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -754,29 +754,29 @@ return function t(e){return e&&!!e.start}(e)?{start:e.start.offset,end:e.end.off
|
|
|
754
754
|
* Use of this source code is governed by an MIT-style license that can be
|
|
755
755
|
* found in the LICENSE file at https://angular.io/license
|
|
756
756
|
*/
|
|
757
|
-
function
|
|
757
|
+
function o(e,t){var n,r,i=[],o=void 0,s=function(e){var n,r,s=function(t,n){i.push({kind:Mf.Error,span:n||e.declarationSpan,message:t})};try{for(var a=p(e.errors),u=a.next();!u.done;u=a.next()){var l=u.value;s(l.message,l.span)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}if(e.metadata)if(e.metadata.isComponent){t.ngModuleByPipeOrDirective.has(e.type)||s("Component '"+e.type.name+"' is not included in a module and will not be available inside a template. Consider adding it to a NgModule declaration");var c=e.metadata.template,h=c.template,f=c.templateUrl;null!==h||f?h&&f&&s("Component '"+e.type.name+"' must not have both template and templateUrl"):s("Component '"+e.type.name+"' must have a template or templateUrl")}else o||(o=new Set,t.ngModules.forEach(function(e){e.declaredDirectives.forEach(function(e){o.add(e.reference)})})),o.has(e.type)||s("Directive '"+e.type.name+"' is not included in a module and will not be available inside a template. Consider adding it to a NgModule declaration")};try{for(var a=p(e),u=a.next();!u.done;u=a.next())s(u.value)}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i}
|
|
758
758
|
/**
|
|
759
759
|
* @license
|
|
760
760
|
* Copyright Google Inc. All Rights Reserved.
|
|
761
761
|
*
|
|
762
762
|
* Use of this source code is governed by an MIT-style license that can be
|
|
763
763
|
* found in the LICENSE file at https://angular.io/license
|
|
764
|
-
*/
|
|
765
|
-
function s(e){var t=new Mh(e,function(t,n){return Ih(e,t,n)});return eu(t,e.templateAst),t.diagnostics}({templateAst:r.templateAst,htmlAst:r.htmlAst,offset:n.span.start,query:n.query,members:n.members});o.push.apply(o,f(i))}r.errors&&o.push.apply(o,f(r.errors.map(function(e){return{kind:e.kind,span:e.span||n.span,message:e.message}})))}};try{for(var a=p(n),u=a.next();!u.done;u=a.next())s(u.value)}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}(e,this,n)));var i=this.host.getDeclarations(e);if(i&&i.length){var o=this.host.getAnalyzedModules();t.push.apply(t,f(function s(e,t){var n,r,i=[],o=void 0,s=function(e){var n,r,s=function(t,n){i.push({kind:Mf.Error,span:n||e.declarationSpan,message:t})};try{for(var a=p(e.errors),u=a.next();!u.done;u=a.next()){var l=u.value;s(l.message,l.span)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}if(e.metadata)if(e.metadata.isComponent){t.ngModuleByPipeOrDirective.has(e.type)||s("Component '"+e.type.name+"' is not included in a module and will not be available inside a template. Consider adding it to a NgModule declaration");var c=e.metadata.template,h=c.template,f=c.templateUrl;null!==h||f?h&&f&&s("Component '"+e.type.name+"' must not have both template and templateUrl"):s("Component '"+e.type.name+"' must have a template or templateUrl")}else o||(o=new Set,t.ngModules.forEach(function(e){e.declaredDirectives.forEach(function(e){o.add(e.reference)})})),o.has(e.type)||s("Directive '"+e.type.name+"' is not included in a module and will not be available inside a template. Consider adding it to a NgModule declaration")};try{for(var a=p(e),u=a.next();!u.done;u=a.next())s(u.value)}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i}
|
|
764
|
+
*/(r,i)))}return function s(e){var t,n;if(e){var r=[],i=new Map;try{for(var o=p(e),s=o.next();!s.done;s=o.next()){var a=s.value,u=a.span,l=i.get(u.start);l||(l=new Set,i.set(u.start,l)),l.has(u.end)||(l.add(u.end),r.push(a))}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}}
|
|
766
765
|
/**
|
|
767
766
|
* @license
|
|
768
767
|
* Copyright Google Inc. All Rights Reserved.
|
|
769
768
|
*
|
|
770
769
|
* Use of this source code is governed by an MIT-style license that can be
|
|
771
770
|
* found in the LICENSE file at https://angular.io/license
|
|
772
|
-
*/(
|
|
771
|
+
*/(t)},e.prototype.getPipesAt=function(e,t){var n=this.host.getTemplateAstAtPosition(e,t);return n?n.pipes:[]},e.prototype.getCompletionsAt=function(e,t){var n=this.host.getTemplateAstAtPosition(e,t);if(n)return function r(e){var t=void 0,n=e.template;if(null!=e.position){var r=e.position-n.span.start,i=na(e.htmlAst,r),o=i.tail;if(i.empty||!o)t=ad(e);else{var a=r-o.sourceSpan.start.offset;o.visit({visitElement:function(n){var o=Df(n.sourceSpan);r<=o.start+n.name.length+1?t=ad(e):r<o.end&&(t=od(e,i))},visitAttribute:function(n){n.valueSpan&&Lf(r,Df(n.valueSpan))?n.valueSpan&&Lf(r,Df(n.valueSpan))&&(t=function o(e,t,n){var r=qf(e.templateAst,t),i=r.tail,o=Uf(e);if(i){var s=new ld(e,t,n,function(){return Ih(o,r,!1)});if(i.visit(s,null),!s.result||!s.result.length){var a=qf(e.templateAst,t,!0);if(a.tail){var u=new ld(e,t,n,function(){return Ih(o,a,!1)});return a.tail.visit(u,null),u.result}}return s.result}}(e,r,n)):t=od(e,i)},visitText:function(o){if(t=function l(e,t){for(var n,r=/&[A-Za-z]*;?(?!\d)/g,i=void 0;n=r.exec(e);)if(t>=n.index&&t<n.index+n[0].length){i=Object.keys(b).map(function(e){return{kind:"entity",name:"&"+e+";",sort:e}});break}return i}(function u(e,t){return e.source.substring(t.start,t.end)}(n,Df(o)),a))return t;if(t=function c(e,t){var n=qf(e.templateAst,t),r=n.tail;if(r){var i=new ld(e,t,void 0,function(){return Ih(Uf(e),n,!1)});return r.visit(i,null),Hf(i.result)}}(e,r))return t;var p=i.first(Ys);p?C(p.name).contentType===s.PARSABLE_DATA&&((t=ud(e,i))||(t=ad(e))):(t=ud(e,i))||(t=ad(e))},visitComment:function(e){},visitExpansion:function(e){},visitExpansionCase:function(e){}},null)}}return t}(n)},e.prototype.getDefinitionAt=function(e,t){var n=this.host.getTemplateAstAtPosition(e,t);if(n)return function r(e){var t=fd(e);return t&&t.symbol.definition}(n)},e.prototype.getHoverAt=function(e,t){var n=this.host.getTemplateAstAtPosition(e,t);if(n)return function r(e){var t=fd(e);if(t)return{text:md(t.symbol),span:t.span}}(n)},e.prototype.getTemplateDiagnostics=function(e,t){var n,r,i=[],o=function(t){var n=s.host.getTemplateAst(t,e);if(n){if(n.parseErrors&&n.parseErrors.length)i.push.apply(i,f(n.parseErrors.map(function(e){return{kind:Mf.Error,span:Ff(Df(e.span),t.span.start),message:e.msg}})));else if(n.templateAst&&n.htmlAst){var r=
|
|
773
772
|
/**
|
|
774
773
|
* @license
|
|
775
774
|
* Copyright Google Inc. All Rights Reserved.
|
|
776
775
|
*
|
|
777
776
|
* Use of this source code is governed by an MIT-style license that can be
|
|
778
777
|
* found in the LICENSE file at https://angular.io/license
|
|
779
|
-
*/
|
|
778
|
+
*/
|
|
779
|
+
function o(e){var t=new Mh(e,function(t,n){return Ih(e,t,n)});return eu(t,e.templateAst),t.diagnostics}({templateAst:n.templateAst,htmlAst:n.htmlAst,offset:t.span.start,query:t.query,members:t.members});i.push.apply(i,f(r))}n.errors&&i.push.apply(i,f(n.errors.map(function(e){return{kind:e.kind,span:e.span||t.span,message:e.message}})))}},s=this;try{for(var a=p(t),u=a.next();!u.done;u=a.next())o(u.value)}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},e}(),_d="__annotations__",bd="__parameters__",wd="__prop__metadata__";function xd(e,t,n,r,i){var o=Ed(t);function s(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(this instanceof s)return o.call.apply(o,f([this],t)),this;var a=new((e=s).bind.apply(e,f([void 0],t)));return function e(n){return i&&i.apply(void 0,f([n],t)),(n.hasOwnProperty(_d)?n[_d]:Object.defineProperty(n,_d,{value:[]})[_d]).push(a),r&&r(n),n}}return n&&(s.prototype=Object.create(n.prototype)),s.prototype.ngMetadataName=e,s.annotationCls=s,s}function Ed(e){return function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(e){var i=e.apply(void 0,f(n));for(var o in i)this[o]=i[o]}}}function Sd(e,t,n){var r=Ed(t);function i(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(this instanceof i)return r.apply(this,t),this;var o=new((e=i).bind.apply(e,f([void 0],t)));return s.annotation=o,s;function s(e,t,n){for(var r=e.hasOwnProperty(bd)?e[bd]:Object.defineProperty(e,bd,{value:[]})[bd];r.length<=n;)r.push(null);return(r[n]=r[n]||[]).push(o),e}}return n&&(i.prototype=Object.create(n.prototype)),i.prototype.ngMetadataName=e,i.annotationCls=i,i}function Cd(e,t,n,r){var i=Ed(t);function o(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(this instanceof o)return i.apply(this,t),this;var s=new((e=o).bind.apply(e,f([void 0],t)));return function a(e,n){var i=e.constructor,o=i.hasOwnProperty(wd)?i[wd]:Object.defineProperty(i,wd,{value:{}})[wd];o[n]=o.hasOwnProperty(n)&&o[n]||[],o[n].unshift(s),r&&r.apply(void 0,f([e,n],t))}}return n&&(o.prototype=Object.create(n.prototype)),o.prototype.ngMetadataName=e,o.annotationCls=o,o}
|
|
780
780
|
/**
|
|
781
781
|
* @license
|
|
782
782
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -863,7 +863,7 @@ var Qd,$d=function(){function e(e,t){this._desc=e,this.ngMetadataName="Injection
|
|
|
863
863
|
*
|
|
864
864
|
* Use of this source code is governed by an MIT-style license that can be
|
|
865
865
|
* found in the LICENSE file at https://angular.io/license
|
|
866
|
-
*/var dv=/^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*arguments\)/,vv=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/,mv=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/,yv=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(\)\s*{\s+super\(\.\.\.arguments\)/,gv=function(){function e(e){this._reflect=e||Wd.Reflect}return e.prototype.isReflectionEnabled=function(){return!0},e.prototype.factory=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new(e.bind.apply(e,f([void 0],t)))}},e.prototype._zipTypesAndAnnotations=function(e,t){var n;n=void 0===e?new Array(t.length):new Array(e.length);for(var r=0;r<n.length;r++)n[r]=void 0===e?[]:e[r]!=Object?[e[r]]:[],t&&null!=t[r]&&(n[r]=n[r].concat(t[r]));return n},e.prototype._ownParameters=function(e,t){if(function n(e){return dv.test(e)||yv.test(e)||vv.test(e)&&!mv.test(e)}(e.toString()))return null;if(e.parameters&&e.parameters!==t.parameters)return e.parameters;var r=e.ctorParameters;if(r&&r!==t.ctorParameters){var i="function"==typeof r?r():r,o=i.map(function(e){return e&&e.type}),s=i.map(function(e){return e&&_v(e.decorators)});return this._zipTypesAndAnnotations(o,s)}var a=e.hasOwnProperty(bd)&&e[bd],u=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",e);return u||a?this._zipTypesAndAnnotations(u,a):new Array(e.length).fill(void 0)},e.prototype.parameters=function(e){if(!fv(e))return[];var t=bv(e),n=this._ownParameters(e,t);return n||t===Object||(n=this.parameters(t)),n||[]},e.prototype._ownAnnotations=function(e,t){if(e.annotations&&e.annotations!==t.annotations){var n=e.annotations;return"function"==typeof n&&n.annotations&&(n=n.annotations),n}return e.decorators&&e.decorators!==t.decorators?_v(e.decorators):e.hasOwnProperty(_d)?e[_d]:null},e.prototype.annotations=function(e){if(!fv(e))return[];var t=bv(e),n=this._ownAnnotations(e,t)||[];return(t!==Object?this.annotations(t):[]).concat(n)},e.prototype._ownPropMetadata=function(e,t){if(e.propMetadata&&e.propMetadata!==t.propMetadata){var n=e.propMetadata;return"function"==typeof n&&n.propMetadata&&(n=n.propMetadata),n}if(e.propDecorators&&e.propDecorators!==t.propDecorators){var r=e.propDecorators,i={};return Object.keys(r).forEach(function(e){i[e]=_v(r[e])}),i}return e.hasOwnProperty(wd)?e[wd]:null},e.prototype.propMetadata=function(e){if(!fv(e))return{};var t=bv(e),n={};if(t!==Object){var r=this.propMetadata(t);Object.keys(r).forEach(function(e){n[e]=r[e]})}var i=this._ownPropMetadata(e,t);return i&&Object.keys(i).forEach(function(e){var t=[];n.hasOwnProperty(e)&&t.push.apply(t,f(n[e])),t.push.apply(t,f(i[e])),n[e]=t}),n},e.prototype.ownPropMetadata=function(e){return fv(e)&&this._ownPropMetadata(e,bv(e))||{}},e.prototype.hasLifecycleHook=function(e,t){return e instanceof hv&&t in e.prototype},e.prototype.guards=function(e){return{}},e.prototype.getter=function(e){return new Function("o","return o."+e+";")},e.prototype.setter=function(e){return new Function("o","v","return o."+e+" = v;")},e.prototype.method=function(e){return new Function("o","args","if (!o."+e+") throw new Error('\""+e+"\" is undefined');\n return o."+e+".apply(o, args);")},e.prototype.importUri=function(e){return"object"==typeof e&&e.filePath?e.filePath:"./"+Fd(e)},e.prototype.resourceUri=function(e){return"./"+Fd(e)},e.prototype.resolveIdentifier=function(e,t,n,r){return r},e.prototype.resolveEnum=function(e,t){return e[t]},e}();function _v(e){return e?e.map(function(e){var t=e.type.annotationCls;return new(t.bind.apply(t,f([void 0],e.args?e.args:[])))}):[]}function bv(e){var t=e.prototype?Object.getPrototypeOf(e.prototype):null;return(t?t.constructor:null)||Object}
|
|
866
|
+
*/var dv=/^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*arguments\)/,vv=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/,mv=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/,yv=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(\)\s*{\s+super\(\.\.\.arguments\)/,gv=function(){function e(e){this._reflect=e||Wd.Reflect}return e.prototype.isReflectionEnabled=function(){return!0},e.prototype.factory=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new(e.bind.apply(e,f([void 0],t)))}},e.prototype._zipTypesAndAnnotations=function(e,t){var n;n=void 0===e?new Array(t.length):new Array(e.length);for(var r=0;r<n.length;r++)n[r]=void 0===e?[]:e[r]&&e[r]!=Object?[e[r]]:[],t&&null!=t[r]&&(n[r]=n[r].concat(t[r]));return n},e.prototype._ownParameters=function(e,t){if(function n(e){return dv.test(e)||yv.test(e)||vv.test(e)&&!mv.test(e)}(e.toString()))return null;if(e.parameters&&e.parameters!==t.parameters)return e.parameters;var r=e.ctorParameters;if(r&&r!==t.ctorParameters){var i="function"==typeof r?r():r,o=i.map(function(e){return e&&e.type}),s=i.map(function(e){return e&&_v(e.decorators)});return this._zipTypesAndAnnotations(o,s)}var a=e.hasOwnProperty(bd)&&e[bd],u=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",e);return u||a?this._zipTypesAndAnnotations(u,a):new Array(e.length).fill(void 0)},e.prototype.parameters=function(e){if(!fv(e))return[];var t=bv(e),n=this._ownParameters(e,t);return n||t===Object||(n=this.parameters(t)),n||[]},e.prototype._ownAnnotations=function(e,t){if(e.annotations&&e.annotations!==t.annotations){var n=e.annotations;return"function"==typeof n&&n.annotations&&(n=n.annotations),n}return e.decorators&&e.decorators!==t.decorators?_v(e.decorators):e.hasOwnProperty(_d)?e[_d]:null},e.prototype.annotations=function(e){if(!fv(e))return[];var t=bv(e),n=this._ownAnnotations(e,t)||[];return(t!==Object?this.annotations(t):[]).concat(n)},e.prototype._ownPropMetadata=function(e,t){if(e.propMetadata&&e.propMetadata!==t.propMetadata){var n=e.propMetadata;return"function"==typeof n&&n.propMetadata&&(n=n.propMetadata),n}if(e.propDecorators&&e.propDecorators!==t.propDecorators){var r=e.propDecorators,i={};return Object.keys(r).forEach(function(e){i[e]=_v(r[e])}),i}return e.hasOwnProperty(wd)?e[wd]:null},e.prototype.propMetadata=function(e){if(!fv(e))return{};var t=bv(e),n={};if(t!==Object){var r=this.propMetadata(t);Object.keys(r).forEach(function(e){n[e]=r[e]})}var i=this._ownPropMetadata(e,t);return i&&Object.keys(i).forEach(function(e){var t=[];n.hasOwnProperty(e)&&t.push.apply(t,f(n[e])),t.push.apply(t,f(i[e])),n[e]=t}),n},e.prototype.ownPropMetadata=function(e){return fv(e)&&this._ownPropMetadata(e,bv(e))||{}},e.prototype.hasLifecycleHook=function(e,t){return e instanceof hv&&t in e.prototype},e.prototype.guards=function(e){return{}},e.prototype.getter=function(e){return new Function("o","return o."+e+";")},e.prototype.setter=function(e){return new Function("o","v","return o."+e+" = v;")},e.prototype.method=function(e){return new Function("o","args","if (!o."+e+") throw new Error('\""+e+"\" is undefined');\n return o."+e+".apply(o, args);")},e.prototype.importUri=function(e){return"object"==typeof e&&e.filePath?e.filePath:"./"+Fd(e)},e.prototype.resourceUri=function(e){return"./"+Fd(e)},e.prototype.resolveIdentifier=function(e,t,n,r){return r},e.prototype.resolveEnum=function(e,t){return e[t]},e}();function _v(e){return e?e.map(function(e){var t=e.type.annotationCls;return new(t.bind.apply(t,f([void 0],e.args?e.args:[])))}):[]}function bv(e){var t=e.prototype?Object.getPrototypeOf(e.prototype):null;return(t?t.constructor:null)||Object}
|
|
867
867
|
/**
|
|
868
868
|
* @license
|
|
869
869
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -996,7 +996,7 @@ var Om=0,Rm=1,Dm=2,Lm=3,Fm=4,jm=5,Vm=6,Bm=7,Hm=8,Um=9,qm=10,Km=11,zm=12,Wm=13,Qm
|
|
|
996
996
|
* Use of this source code is governed by an MIT-style license that can be
|
|
997
997
|
* found in the LICENSE file at https://angular.io/license
|
|
998
998
|
*/
|
|
999
|
-
var Ym,Zm,Jm,ey=1,ty=2,ny=7,ry=
|
|
999
|
+
var Ym,Zm,Jm,ey=1,ty=2,ny=7,ry=9,iy="__ngContext__";
|
|
1000
1000
|
/**
|
|
1001
1001
|
* @license
|
|
1002
1002
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1018,7 +1018,7 @@ function oy(e){for(;Array.isArray(e);)e=e[Om];return e}function sy(e){return Arr
|
|
|
1018
1018
|
*
|
|
1019
1019
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1020
1020
|
* found in the LICENSE file at https://angular.io/license
|
|
1021
|
-
*/function by(){return Jm}function wy(){return Ym}function xy(e,t){Ym=e,Zm=t}function Ey(e,t){Ym=e,Jm=t}function Sy(){return Zm}function Cy(e){return void 0===e&&(e=Jm),4==(4&e[Dm])}var Ty=!1;function Ny(){return Ty}function ky(e){Ty=e}function Ay(e,t){var n=Jm;return Ym=t,Zm=!0,Jm=e,n}function Py(e){var
|
|
1021
|
+
*/function by(){return Jm}function wy(){return Ym}function xy(e,t){Ym=e,Zm=t}function Ey(e,t){Ym=e,Jm=t}function Sy(){return Zm}function Cy(e){return void 0===e&&(e=Jm),4==(4&e[Dm])}var Ty=!1;function Ny(){return Ty}function ky(e){Ty=e}function Ay(e,t){var n=Jm;return Ym=t,Zm=!0,Jm=e,n}function Py(e,t){var n=Jm[Rm];if(Cy(Jm))Jm[Dm]&=-5;else try{my(Jm),t&&gy(Jm,n.viewHooks,n.viewCheckHooks,Ty,2,void 0)}finally{Jm[Dm]&=-73,Jm[Bm]=n.bindingStartIndex}Ay(e,null)}var Iy=null,My=!0;function Oy(){return My}
|
|
1022
1022
|
/**
|
|
1023
1023
|
* @license
|
|
1024
1024
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1175,7 +1175,7 @@ var ug=!0;function lg(e){var t=ug;return ug=e,t}var cg=255,pg=0;function hg(e,t)
|
|
|
1175
1175
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1176
1176
|
* found in the LICENSE file at https://angular.io/license
|
|
1177
1177
|
*/
|
|
1178
|
-
function n(e){return e[0]}(t))>0}(this.context)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"entries",{get:function(){for(var e=this.context,t={},n=2;n<e.length;){var r=qg(e,n);if(r){for(var i=jg(e,n),o=Hg(e,n),s=zg(e,n),a=Bg(e,n),u=n+3,l=[],c=0;c<r;c++)l.push(e[u+c]);t[i]={prop:i,guardMask:o,sanitizationRequired:a,valuesCount:r,defaultValue:s,sources:l}}n+=3+r}return t},enumerable:!0,configurable:!0})}(),function(){function e(e,t,n){this.context=e,this._data=t,this._isClassBased=n,this._sanitizer=null}e.prototype.overrideSanitizer=function(e){this._sanitizer=e},Object.defineProperty(e.prototype,"summary",{get:function(){var e={};return this._mapValues(function(t,n,r){e[t]={prop:t,value:n,bindingIndex:r}}),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"values",{get:function(){var e={};return this._mapValues(function(t,n){e[t]=n}),e},enumerable:!0,configurable:!0}),e.prototype._mapValues=function(e){qg(this.context,2)>0&&function t(){!function e(t){n_=t}(r_)}();var n=this._isClassBased?null:this._sanitizer||function r(e){var t=Fg()||e[Wm];return t&&"function"!=typeof t?(function n(e){Rg=e}(t),$g):t}(this._data);!function i(e,t,n,r,o,s,a){Zg.length&&function u(){for(var e=0;e<Zg.length;)Jg(Zg[e++],Zg[e++],Zg[e++],Zg[e++],Zg[e++]);Zg.length=0}();for(var l=function c(e){return!0===e?-1:!1===e?0:e}(o),p=function h(){return n_}(),f=(l&Hg(e,2))>0?1:0,d=Wg(e);d<e.length;){var v=qg(e,d);if(l&Hg(e,d)){for(var m=!1,y=jg(e,d),g=v-1,_=Kg(e,d,g),b=0;b<g;b++){var w=Kg(e,d,b),x=r[w];if(Qg(x)){s(t,n,y,a&&Bg(e,d)?a(y,x,2):x,w),m=!0;break}}if(p){var E=p(e,t,n,r,s,a,f|(m?4:2),y,_);m=m||E}m||s(t,n,y,_)}d+=3+v}p&&p(e,t,n,r,s,a,f)}(this.context,null,{},this._data,!0,function(t,n,r,i,o){e(r,i,o||null)},n)}}(),function(){function e(e){this._raw_lView=e}Object.defineProperty(e.prototype,"flags",{get:function(){var e=this._raw_lView[Dm];return{__raw__flags__:e,initPhaseState:3&e,creationMode:!!(4&e),firstViewPass:!!(8&e),checkAlways:!!(16&e),dirty:!!(64&e),attached:!!(128&e),destroyed:!!(256&e),isRoot:!!(512&e),indexWithinInitPhase:e>>10}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return u_(this._raw_lView[Lm])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"host",{get:function(){return l_(this._raw_lView[Om],!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._raw_lView[Um]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nodes",{get:function(){var e=this._raw_lView;return function e(t,n){if(t){for(var r=[],i=t;i;){var o=n[t.index],s=oy(o),a=uy(o)?null:u_(c_(o));r.push({html:l_(s),native:s,styles:null,classes:null,nodes:e(t.child,n),component:a}),i=i.next}return r}return null}(e[Rm].firstChild,e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"__other__",{get:function(){return{tView:this._raw_lView[Rm],cleanup:this._raw_lView[Hm],injector:this._raw_lView[qm],rendererFactory:this._raw_lView[Km],renderer:this._raw_lView[zm],sanitizer:this._raw_lView[Wm],childHead:u_(this._raw_lView[Qm]),next:u_(this._raw_lView[Fm]),childTail:u_(this._raw_lView[15]),declarationView:u_(this._raw_lView[$m]),contentQueries:this._raw_lView[16],queries:this._raw_lView[jm],tHost:this._raw_lView[Vm],bindingIndex:this._raw_lView[Bm]}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"childViews",{get:function(){for(var e=[],t=this.__other__.childHead;t;)e.push(t),t=t.__other__.next;return e},enumerable:!0,configurable:!0})}(),function(){function e(e){this._raw_lContainer=e}Object.defineProperty(e.prototype,"activeIndex",{get:function(){return this._raw_lContainer[ty]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"views",{get:function(){return this._raw_lContainer.slice(ry).map(u_)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return u_(this._raw_lContainer[Lm])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"queries",{get:function(){return this._raw_lContainer[jm]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"host",{get:function(){return this._raw_lContainer[Om]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"native",{get:function(){return this._raw_lContainer[ny]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"__other__",{get:function(){return{next:u_(this._raw_lContainer[Fm])}},enumerable:!0,configurable:!0})}();var p_=function(){function e(e,t,n,r){this.__raw_opCode=e,this._lView=t,this.nodeIndex=n,this.type=r}return Object.defineProperty(e.prototype,"tNode",{get:function(){return cy(this.nodeIndex,this._lView)},enumerable:!0,configurable:!0}),e}();function h_(e){var t=e[Rm],n=Cy(e);if(t.firstTemplatePass=!1,e[Bm]=t.bindingStartIndex,!n){var r=Ny();yy(e,t,r,void 0),function i(e){for(var t=e[Qm];null!==t;t=t[Fm])if(-1===t[ty]&&ay(t))for(var n=ry;n<t.length;n++){var r=t[n];v_(r,r[Rm],r[Um])}}(e),f_(t,e),my(e),gy(e,t.contentHooks,t.contentCheckHooks,r,1,void 0),function o(e,t){try{if(e.expandoInstructions)for(var n=t[Bm]=e.expandoStartIndex,r=-1,i=-1,o=0;o<e.expandoInstructions.length;o++){var s=e.expandoInstructions[o];if("number"==typeof s)if(s<=0){i=-s;var a=e.expandoInstructions[++o];r=n+=Qy+a}else n+=s;else null!==s&&(t[Bm]=n,s(2,oy(t[r]),i)),r++}}finally{}}(t,e)}n&&t.staticContentQueries&&f_(t,e),function s(e){if(null!=e)for(var t=0;t<e.length;t++)void 0,void 0,(function n(e){return 128==(128&e[Dm])}(o=py(e[t],i=by()))||Cy(i))&&80&o[Dm]&&(function r(e){for(var t=e[Rm],n=e.length;n<t.blueprint.length;n++)e[n]=t.blueprint[n]}(o),S_(o,o[Um]));var i,o}(t.components)}function f_(e,t){if(null!=e.contentQueries)for(var n=0;n<e.contentQueries.length;n++){var r=e.contentQueries[n];e.data[r].contentQueries(2,t[r],r)}}function d_(e,t,n,r,i,o,s,a,u,l){var c=t.blueprint.slice();return c[Om]=i,c[Dm]=140|r,my(c),c[Lm]=c[$m]=e,c[Um]=n,c[Km]=s||e&&e[Km],c[zm]=a||e&&e[zm],c[Wm]=u||e&&e[Wm]||null,c[qm]=l||e&&e[qm]||null,c[Vm]=o,c}function v_(e,t,n){var r,i=Sy(),o=wy();if(512&e[Dm])w_(function s(e){return function t(e){for(var t=sy(e)?e:vy(e);t&&!(512&t[Dm]);)t=sg(t);return t}(e)[Um]}(e));else try{xy(null,!0),r=Ay(e,e[Vm]),my(e),y_(e,t.template,g_(e),n),e[Rm].firstTemplatePass=!1,h_(e)}finally{Py(r),xy(o,i)}}function m_(e,t,n){var r=e[Km],i=Ay(e,e[Vm]),o=!Ny(),s=Cy(e);try{o&&!s&&r.begin&&r.begin(),s&&(n&&y_(e,n,1,t),h_(e),e[Dm]&=-5),my(e),n&&y_(e,n,2,t),h_(e)}finally{o&&!s&&r.end&&r.end(),Py(i)}}function y_(e,t,n,r){!function i(){Iy=null}();try{2&n&&
|
|
1178
|
+
function n(e){return e[0]}(t))>0}(this.context)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"entries",{get:function(){for(var e=this.context,t={},n=2;n<e.length;){var r=qg(e,n);if(r){for(var i=jg(e,n),o=Hg(e,n),s=zg(e,n),a=Bg(e,n),u=n+3,l=[],c=0;c<r;c++)l.push(e[u+c]);t[i]={prop:i,guardMask:o,sanitizationRequired:a,valuesCount:r,defaultValue:s,sources:l}}n+=3+r}return t},enumerable:!0,configurable:!0})}(),function(){function e(e,t,n){this.context=e,this._data=t,this._isClassBased=n,this._sanitizer=null}e.prototype.overrideSanitizer=function(e){this._sanitizer=e},Object.defineProperty(e.prototype,"summary",{get:function(){var e={};return this._mapValues(function(t,n,r){e[t]={prop:t,value:n,bindingIndex:r}}),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"values",{get:function(){var e={};return this._mapValues(function(t,n){e[t]=n}),e},enumerable:!0,configurable:!0}),e.prototype._mapValues=function(e){qg(this.context,2)>0&&function t(){!function e(t){n_=t}(r_)}();var n=this._isClassBased?null:this._sanitizer||function r(e){var t=Fg()||e[Wm];return t&&"function"!=typeof t?(function n(e){Rg=e}(t),$g):t}(this._data);!function i(e,t,n,r,o,s,a){Zg.length&&function u(){for(var e=0;e<Zg.length;)Jg(Zg[e++],Zg[e++],Zg[e++],Zg[e++],Zg[e++]);Zg.length=0}();for(var l=function c(e){return!0===e?-1:!1===e?0:e}(o),p=function h(){return n_}(),f=(l&Hg(e,2))>0?1:0,d=Wg(e);d<e.length;){var v=qg(e,d);if(l&Hg(e,d)){for(var m=!1,y=jg(e,d),g=v-1,_=Kg(e,d,g),b=0;b<g;b++){var w=Kg(e,d,b),x=r[w];if(Qg(x)){s(t,n,y,a&&Bg(e,d)?a(y,x,2):x,w),m=!0;break}}if(p){var E=p(e,t,n,r,s,a,f|(m?4:2),y,_);m=m||E}m||s(t,n,y,_)}d+=3+v}p&&p(e,t,n,r,s,a,f)}(this.context,null,{},this._data,!0,function(t,n,r,i,o){e(r,i,o||null)},n)}}(),function(){function e(e){this._raw_lView=e}Object.defineProperty(e.prototype,"flags",{get:function(){var e=this._raw_lView[Dm];return{__raw__flags__:e,initPhaseState:3&e,creationMode:!!(4&e),firstViewPass:!!(8&e),checkAlways:!!(16&e),dirty:!!(64&e),attached:!!(128&e),destroyed:!!(256&e),isRoot:!!(512&e),indexWithinInitPhase:e>>10}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return u_(this._raw_lView[Lm])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"host",{get:function(){return l_(this._raw_lView[Om],!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._raw_lView[Um]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nodes",{get:function(){var e=this._raw_lView;return function e(t,n){if(t){for(var r=[],i=t;i;){var o=n[t.index],s=oy(o),a=uy(o)?null:u_(c_(o));r.push({html:l_(s),native:s,styles:null,classes:null,nodes:e(t.child,n),component:a}),i=i.next}return r}return null}(e[Rm].firstChild,e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"__other__",{get:function(){return{tView:this._raw_lView[Rm],cleanup:this._raw_lView[Hm],injector:this._raw_lView[qm],rendererFactory:this._raw_lView[Km],renderer:this._raw_lView[zm],sanitizer:this._raw_lView[Wm],childHead:u_(this._raw_lView[Qm]),next:u_(this._raw_lView[Fm]),childTail:u_(this._raw_lView[15]),declarationView:u_(this._raw_lView[$m]),contentQueries:this._raw_lView[16],queries:this._raw_lView[jm],tHost:this._raw_lView[Vm],bindingIndex:this._raw_lView[Bm]}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"childViews",{get:function(){for(var e=[],t=this.__other__.childHead;t;)e.push(t),t=t.__other__.next;return e},enumerable:!0,configurable:!0})}(),function(){function e(e){this._raw_lContainer=e}Object.defineProperty(e.prototype,"activeIndex",{get:function(){return this._raw_lContainer[ty]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"views",{get:function(){return this._raw_lContainer.slice(ry).map(u_)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return u_(this._raw_lContainer[Lm])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"queries",{get:function(){return this._raw_lContainer[jm]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"host",{get:function(){return this._raw_lContainer[Om]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"native",{get:function(){return this._raw_lContainer[ny]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"__other__",{get:function(){return{next:u_(this._raw_lContainer[Fm])}},enumerable:!0,configurable:!0})}();var p_=function(){function e(e,t,n,r){this.__raw_opCode=e,this._lView=t,this.nodeIndex=n,this.type=r}return Object.defineProperty(e.prototype,"tNode",{get:function(){return cy(this.nodeIndex,this._lView)},enumerable:!0,configurable:!0}),e}();function h_(e){var t=e[Rm],n=Cy(e);if(t.firstTemplatePass=!1,e[Bm]=t.bindingStartIndex,!n){var r=Ny();yy(e,t,r,void 0),function i(e){for(var t=e[Qm];null!==t;t=t[Fm])if(-1===t[ty]&&ay(t))for(var n=ry;n<t.length;n++){var r=t[n];v_(r,r[Rm],r[Um])}}(e),f_(t,e),my(e),gy(e,t.contentHooks,t.contentCheckHooks,r,1,void 0),function o(e,t){try{if(e.expandoInstructions)for(var n=t[Bm]=e.expandoStartIndex,r=-1,i=-1,o=0;o<e.expandoInstructions.length;o++){var s=e.expandoInstructions[o];if("number"==typeof s)if(s<=0){i=-s;var a=e.expandoInstructions[++o];r=n+=Qy+a}else n+=s;else null!==s&&(t[Bm]=n,s(2,oy(t[r]),i)),r++}}finally{}}(t,e)}n&&t.staticContentQueries&&f_(t,e),function s(e){if(null!=e)for(var t=0;t<e.length;t++)void 0,void 0,(function n(e){return 128==(128&e[Dm])}(o=py(e[t],i=by()))||Cy(i))&&80&o[Dm]&&(function r(e){for(var t=e[Rm],n=e.length;n<t.blueprint.length;n++)e[n]=t.blueprint[n]}(o),S_(o,o[Um]));var i,o}(t.components)}function f_(e,t){if(null!=e.contentQueries)for(var n=0;n<e.contentQueries.length;n++){var r=e.contentQueries[n];e.data[r].contentQueries(2,t[r],r)}}function d_(e,t,n,r,i,o,s,a,u,l){var c=t.blueprint.slice();return c[Om]=i,c[Dm]=140|r,my(c),c[Lm]=c[$m]=e,c[Um]=n,c[Km]=s||e&&e[Km],c[zm]=a||e&&e[zm],c[Wm]=u||e&&e[Wm]||null,c[qm]=l||e&&e[qm]||null,c[Vm]=o,c}function v_(e,t,n){var r,i=Sy(),o=wy();if(512&e[Dm])w_(function s(e){return function t(e){for(var t=sy(e)?e:vy(e);t&&!(512&t[Dm]);)t=sg(t);return t}(e)[Um]}(e));else{var a=!1;try{xy(null,!0),r=Ay(e,e[Vm]),my(e),y_(e,t.template,g_(e),n),e[Rm].firstTemplatePass=!1,h_(e),a=!0}finally{Py(r,a),xy(o,i)}}}function m_(e,t,n){var r=e[Km],i=Ay(e,e[Vm]),o=!Ny(),s=Cy(e),a=!1;try{o&&!s&&r.begin&&r.begin(),s&&(n&&y_(e,n,1,t),h_(e),e[Dm]&=-5),my(e),n&&y_(e,n,2,t),h_(e),a=!0}finally{o&&!s&&r.end&&r.end(),Py(i,a)}}function y_(e,t,n,r){!function i(){Iy=null}();try{2&n&&
|
|
1179
1179
|
/**
|
|
1180
1180
|
* @license
|
|
1181
1181
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1190,7 +1190,7 @@ function o(e,t){yy(e,e[Rm],Ny(),t)}(e,0),t(n,r)}finally{}}function g_(e){return
|
|
|
1190
1190
|
*
|
|
1191
1191
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1192
1192
|
* found in the LICENSE file at https://angular.io/license
|
|
1193
|
-
*/(e,t),t}finally{n.end&&n.end()}}function E_(e){w_(e[Um])}function S_(e,t){var n=e[Rm],r=Ay(e,e[Vm]),i=n.template,o=Cy(e);try{my(e),o&&C_(1,n,t),y_(e,i,g_(e),t),h_(e),o&&!n.staticViewQueries||C_(2,n,t)}finally{Py(r)}}function C_(e,t,n){var r=t.viewQuery;r&&r(e,n)}Object.defineProperty(function T_(e,t){this.__raw_opCodes=e,this.__lView=t}.prototype,"operations",{get:function(){for(var e=this.__lView,t=this.__raw_opCodes,n=[],r=0;r<t.length;r++){var i=t[r],o=void 0;if("string"==typeof i&&(o={__raw_opCode:i,type:"Create Text Node",nodeIndex:t[++r],text:i}),"number"==typeof i)switch(7&i){case 1:o=new p_(i,e,i>>>17,"AppendChild");break;case 0:o=new p_(i,e,i>>>3,"Select");break;case 5:var s=i>>>3;o=new p_(i,e,s,"ElementEnd");break;case 4:(o=new p_(i,e,s=i>>>3,"Attr")).attrName=t[++r],o.attrValue=t[++r]}if(!o)switch(i){case Lg:o={__raw_opCode:i,type:"COMMENT_MARKER",commentValue:t[++r],nodeIndex:t[++r]};break;case Dg:o={__raw_opCode:i,type:"ELEMENT_MARKER"}}o||(o={__raw_opCode:i,type:"Unknown Op Code",code:i}),n.push(o)}return n},enumerable:!0,configurable:!0}),Object.defineProperty(function N_(e,t,n){this.__raw_opCodes=e,this.icus=t,this.__lView=n}.prototype,"operations",{get:function(){for(var e=this.__lView,t=this.__raw_opCodes,n=this.icus,r=[],i=0;i<t.length;i++){for(var o=t[i],s=t[++i],a="",u=i+1;u<=i+s;u++){var l=t[u];if("string"==typeof l)a+=l;else if("number"==typeof l)if(l<0)a+="�"+(-l-1)+"�";else{var c=l>>>2,p=void 0,h=void 0;switch(3&l){case 1:var f=t[++u],d=t[++u];r.push({__raw_opCode:l,checkBit:o,type:"Attr",attrValue:a,attrName:f,sanitizeFn:d});break;case 0:r.push({__raw_opCode:l,checkBit:o,type:"Text",nodeIndex:c,text:a});break;case 2:h=n[p=t[++u]];var v=new p_(l,e,c,"IcuSwitch");v.tIcuIndex=p,v.checkBit=o,v.mainBinding=a,v.tIcu=h,r.push(v);break;case 3:h=n[p=t[++u]],(v=new p_(l,e,c,"IcuUpdate")).tIcuIndex=p,v.checkBit=o,v.tIcu=h,r.push(v)}}}i+=s}return r},enumerable:!0,configurable:!0});var k_=Promise.resolve(null),A_=null;function P_(){if(!A_){var e=Wd.Symbol;if(e&&e.iterator)A_=e.iterator;else for(var t=Object.getOwnPropertyNames(Map.prototype),n=0;n<t.length;++n){var r=t[n];"entries"!==r&&"size"!==r&&Map.prototype[r]===Map.prototype.entries&&(A_=r)}}return A_}
|
|
1193
|
+
*/(e,t),t}finally{n.end&&n.end()}}function E_(e){w_(e[Um])}function S_(e,t){var n=e[Rm],r=Ay(e,e[Vm]),i=n.template,o=Cy(e),s=!1;try{my(e),o&&C_(1,n,t),y_(e,i,g_(e),t),h_(e),o&&!n.staticViewQueries||C_(2,n,t),s=!0}finally{Py(r,s)}}function C_(e,t,n){var r=t.viewQuery;r&&r(e,n)}Object.defineProperty(function T_(e,t){this.__raw_opCodes=e,this.__lView=t}.prototype,"operations",{get:function(){for(var e=this.__lView,t=this.__raw_opCodes,n=[],r=0;r<t.length;r++){var i=t[r],o=void 0;if("string"==typeof i&&(o={__raw_opCode:i,type:"Create Text Node",nodeIndex:t[++r],text:i}),"number"==typeof i)switch(7&i){case 1:o=new p_(i,e,i>>>17,"AppendChild");break;case 0:o=new p_(i,e,i>>>3,"Select");break;case 5:var s=i>>>3;o=new p_(i,e,s,"ElementEnd");break;case 4:(o=new p_(i,e,s=i>>>3,"Attr")).attrName=t[++r],o.attrValue=t[++r]}if(!o)switch(i){case Lg:o={__raw_opCode:i,type:"COMMENT_MARKER",commentValue:t[++r],nodeIndex:t[++r]};break;case Dg:o={__raw_opCode:i,type:"ELEMENT_MARKER"}}o||(o={__raw_opCode:i,type:"Unknown Op Code",code:i}),n.push(o)}return n},enumerable:!0,configurable:!0}),Object.defineProperty(function N_(e,t,n){this.__raw_opCodes=e,this.icus=t,this.__lView=n}.prototype,"operations",{get:function(){for(var e=this.__lView,t=this.__raw_opCodes,n=this.icus,r=[],i=0;i<t.length;i++){for(var o=t[i],s=t[++i],a="",u=i+1;u<=i+s;u++){var l=t[u];if("string"==typeof l)a+=l;else if("number"==typeof l)if(l<0)a+="�"+(-l-1)+"�";else{var c=l>>>2,p=void 0,h=void 0;switch(3&l){case 1:var f=t[++u],d=t[++u];r.push({__raw_opCode:l,checkBit:o,type:"Attr",attrValue:a,attrName:f,sanitizeFn:d});break;case 0:r.push({__raw_opCode:l,checkBit:o,type:"Text",nodeIndex:c,text:a});break;case 2:h=n[p=t[++u]];var v=new p_(l,e,c,"IcuSwitch");v.tIcuIndex=p,v.checkBit=o,v.mainBinding=a,v.tIcu=h,r.push(v);break;case 3:h=n[p=t[++u]],(v=new p_(l,e,c,"IcuUpdate")).tIcuIndex=p,v.checkBit=o,v.tIcu=h,r.push(v)}}}i+=s}return r},enumerable:!0,configurable:!0});var k_=Promise.resolve(null),A_=null;function P_(){if(!A_){var e=Wd.Symbol;if(e&&e.iterator)A_=e.iterator;else for(var t=Object.getOwnPropertyNames(Map.prototype),n=0;n<t.length;++n){var r=t[n];"entries"!==r&&"size"!==r&&Map.prototype[r]===Map.prototype.entries&&(A_=r)}}return A_}
|
|
1194
1194
|
/**
|
|
1195
1195
|
* @license
|
|
1196
1196
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1246,7 +1246,7 @@ function o(e,t){yy(e,e[Rm],Ny(),t)}(e,0),t(n,r)}finally{}}function g_(e){return
|
|
|
1246
1246
|
*
|
|
1247
1247
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1248
1248
|
* found in the LICENSE file at https://angular.io/license
|
|
1249
|
-
*/
|
|
1249
|
+
*/function L_(e,t,n,r,i){var o,s=!1;ay(r)?o=r:sy(r)&&(s=!0,r=r[Om]);var a=oy(r);0===e?function u(e,t,n,r){Xy(e)?e.insertBefore(t,n,r):t.insertBefore(n,r,!0)}(t,n,a,i||null):1===e?function l(e,t,n){var r=function i(e,t){return Xy(e)?e.parentNode(t):t.parentNode}(e,t);r&&function o(e,t,n,r){Xy(e)?e.removeChild(t,n,r):t.removeChild(n)}(e,r,t,n)}(t,a,s):2===e&&t.destroyNode(a),null!=o&&function c(e,t,n,r,i){var o=n[ny];o!==oy(n)&&L_(t,e,r,o,i);for(var s=ry;s<n.length;s++)V_(e,t,n[s],r,o)}(t,e,o,n,i)}function F_(e,t){var n;return sy(e)&&(n=e[Vm])&&2===n.type?function r(e,t){var n=t[Lm];return-1===e.index?ay(n)?n:null:n}(n,e):e[Lm]===t?null:e[Lm]}function j_(e){if(sy(e)&&!(256&e[Dm])){e[Dm]&=-129,e[Dm]|=256,function t(e){var t,n=e[Rm];if(null!=n&&null!=(t=n.destroyHooks))for(var r=0;r<t.length;r+=2){var i=e[t[r]];i instanceof Gy||t[r+1].call(i)}}(e),function n(e){var t=e[Rm].cleanup;if(null!==t){for(var n=e[Hm],r=0;r<t.length-1;r+=2)if("string"==typeof t[r]){var i=t[r+1],o="function"==typeof i?i(e):oy(e[i]),s=t[r+3];"boolean"==typeof s?o.removeEventListener(t[r],n[t[r+2]],s):s>=0?n[s]():n[-s].unsubscribe(),r+=2}else t[r].call(n[t[r+1]]);e[Hm]=null}}(e);var r=e[Vm];r&&3===r.type&&Xy(e[zm])&&e[zm].destroy(),function i(e){return ay(e[Lm])}(e)&&e[jm]&&e[jm].removeView()}}function V_(e,t,n,r,i){for(var o=n[Rm].node.child;null!==o;)B_(e,t,n,o,r,i),o=o.next}function B_(e,t,n,r,i,o){var s=r.type;4===s?function a(e,t,n,r,i,o){L_(t,e,i,n[r.index],o);for(var s=r.child;s;)B_(e,t,n,s,i,o),s=s.next}(e,t,n,r,i,o):1===s?function u(e,t,n,r,i,o){var s=ag(n),a=s[Vm].projection[r.projection];if(Array.isArray(a))for(var u=0;u<a.length;u++)L_(t,e,i,a[u],o);else for(var l=a,c=s[Lm];null!==l;)B_(e,t,c,l,i,o),l=l.projectionNext}(e,t,n,r,i,o):L_(t,e,i,n[r.index],o)}
|
|
1250
1250
|
/**
|
|
1251
1251
|
* @license
|
|
1252
1252
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1295,7 +1295,7 @@ function o(e,t){yy(e,e[Rm],Ny(),t)}(e,0),t(n,r)}finally{}}function g_(e){return
|
|
|
1295
1295
|
*
|
|
1296
1296
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1297
1297
|
* found in the LICENSE file at https://angular.io/license
|
|
1298
|
-
*/
|
|
1298
|
+
*/function H_(e){return!!e&&"function"==typeof e.then}function U_(e,t){void 0===t&&(t=!0);var n=
|
|
1299
1299
|
/**
|
|
1300
1300
|
* @license
|
|
1301
1301
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1333,7 +1333,7 @@ throw function t(e){var t=Error("No component factory found for "+Fd(e)+". Did y
|
|
|
1333
1333
|
*
|
|
1334
1334
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1335
1335
|
* found in the LICENSE file at https://angular.io/license
|
|
1336
|
-
*/(this._lView,this._lView[Vm],[]):[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._context?this._context:this._lookUpContext()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"destroyed",{get:function(){return 256==(256&this._lView[Dm])},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){if(this._appRef)this._appRef.detachView(this);else if(this._viewContainerRef){var e=this._viewContainerRef.indexOf(this);e>-1&&this._viewContainerRef.detach(e),this._viewContainerRef=null}!function t(e){if(!(256&e[Dm])){var t=e[zm];Xy(t)&&t.destroyNode&&
|
|
1336
|
+
*/(this._lView,this._lView[Vm],[]):[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._context?this._context:this._lookUpContext()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"destroyed",{get:function(){return 256==(256&this._lView[Dm])},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){if(this._appRef)this._appRef.detachView(this);else if(this._viewContainerRef){var e=this._viewContainerRef.indexOf(this);e>-1&&this._viewContainerRef.detach(e),this._viewContainerRef=null}!function t(e){if(!(256&e[Dm])){var t=e[zm];Xy(t)&&t.destroyNode&&V_(t,2,e,null,null),function n(e){var t=e[Qm];if(!t)return j_(e);for(;t;){var n=null;if(sy(t))n=t[Qm];else{var r=t[ry];r&&(n=r)}if(!n){for(;t&&!t[Fm]&&t!==e;)j_(t),t=F_(t,e);j_(t||e),n=t&&t[Fm]}t=n}}(e)}}(this._lView)},e.prototype.onDestroy=function(e){!function t(e,n){(function r(e){return e[Hm]||(e[Hm]=[])})(e).push(n),e[Rm].firstTemplatePass&&function i(e){return e[Rm].cleanup||(e[Rm].cleanup=[])}(e).push(e[Hm].length-1,null)}(this._lView,e)},e.prototype.markForCheck=function(){!function e(t){for(;t;){t[Dm]|=64;var n=sg(t);if(0!=(512&t[Dm])&&!n)return t;t=n}}(this._lView)},e.prototype.detach=function(){this._lView[Dm]&=-129},e.prototype.reattach=function(){this._lView[Dm]|=128},e.prototype.detectChanges=function(){x_(this._lView,this.context)},e.prototype.checkNoChanges=function(){!function e(t,n){ky(!0);try{x_(t,n)}finally{ky(!1)}}(this._lView,this.context)},e.prototype.attachToViewContainerRef=function(e){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=e},e.prototype.detachFromAppRef=function(){this._appRef=null,function e(t){V_(t[zm],1,t,null,null)}(this._lView)},e.prototype.attachToAppRef=function(e){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e},e.prototype._lookUpContext=function(){return this._context=sg(this._lView)[this._componentIndex]},e}());
|
|
1337
1337
|
/**
|
|
1338
1338
|
* @license
|
|
1339
1339
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1376,7 +1376,7 @@ function ib(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}
|
|
|
1376
1376
|
*
|
|
1377
1377
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1378
1378
|
* found in the LICENSE file at https://angular.io/license
|
|
1379
|
-
*/var ob,sb=function(){function e(e){this.nativeElement=e}return e.__NG_ELEMENT_ID__=function(){return ab(e)},e}(),ab=ib,ub=function ub(){},lb=(new $d("Renderer2Interceptor"),function lb(){});!function(e){e[e.Important=1]="Important",e[e.DashCase=2]="DashCase"}(ob||(ob={}));var cb=function(){function e(){}return e.__NG_ELEMENT_ID__=function(){return pb()},e}(),pb=ib,hb=function Ft(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")},fb=new hb("8.1.
|
|
1379
|
+
*/var ob,sb=function(){function e(e){this.nativeElement=e}return e.__NG_ELEMENT_ID__=function(){return ab(e)},e}(),ab=ib,ub=function ub(){},lb=(new $d("Renderer2Interceptor"),function lb(){});!function(e){e[e.Important=1]="Important",e[e.DashCase=2]="DashCase"}(ob||(ob={}));var cb=function(){function e(){}return e.__NG_ELEMENT_ID__=function(){return pb()},e}(),pb=ib,hb=function Ft(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")},fb=new hb("8.1.2"),db=function(){function e(){}return e.prototype.supports=function(e){return R_(e)},e.prototype.create=function(e){return new mb(e)},e}(),vb=function(e,t){return t},mb=function(){function e(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||vb}return e.prototype.forEachItem=function(e){var t;for(t=this._itHead;null!==t;t=t._next)e(t)},e.prototype.forEachOperation=function(e){for(var t=this._itHead,n=this._removalsHead,r=0,i=null;t||n;){var o=!n||t&&t.currentIndex<bb(n,r,i)?t:n,s=bb(o,r,i),a=o.currentIndex;if(o===n)r--,n=n._nextRemoved;else if(t=t._next,null==o.previousIndex)r++;else{i||(i=[]);var u=s-r,l=a-r;if(u!=l){for(var c=0;c<u;c++){var p=c<i.length?i[c]:i[c]=0,h=p+c;l<=h&&h<u&&(i[c]=p+1)}i[o.previousIndex]=l-u}}s!==a&&e(o,s,a)}},e.prototype.forEachPreviousItem=function(e){var t;for(t=this._previousItHead;null!==t;t=t._nextPrevious)e(t)},e.prototype.forEachAddedItem=function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)},e.prototype.forEachMovedItem=function(e){var t;for(t=this._movesHead;null!==t;t=t._nextMoved)e(t)},e.prototype.forEachRemovedItem=function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)},e.prototype.forEachIdentityChange=function(e){var t;for(t=this._identityChangesHead;null!==t;t=t._nextIdentityChange)e(t)},e.prototype.diff=function(e){if(null==e&&(e=[]),!R_(e))throw new Error("Error trying to diff '"+Fd(e)+"'. Only arrays and iterables are allowed");return this.check(e)?this:null},e.prototype.onDestroy=function(){},e.prototype.check=function(e){var t=this;this._reset();var n,r,i,o=this._itHead,s=!1;if(Array.isArray(e)){this.length=e.length;for(var a=0;a<this.length;a++)i=this._trackByFn(a,r=e[a]),null!==o&&I_(o.trackById,i)?(s&&(o=this._verifyReinsertion(o,r,i,a)),I_(o.item,r)||this._addIdentityChange(o,r)):(o=this._mismatch(o,r,i,a),s=!0),o=o._next}else n=0,function u(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)t(e[n]);else for(var r=e[P_()](),i=void 0;!(i=r.next()).done;)t(i.value)}(e,function(e){i=t._trackByFn(n,e),null!==o&&I_(o.trackById,i)?(s&&(o=t._verifyReinsertion(o,e,i,n)),I_(o.item,e)||t._addIdentityChange(o,e)):(o=t._mismatch(o,e,i,n),s=!0),o=o._next,n++}),this.length=n;return this._truncate(o),this.collection=e,this.isDirty},Object.defineProperty(e.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead},enumerable:!0,configurable:!0}),e.prototype._reset=function(){if(this.isDirty){var e=void 0,t=void 0;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=t)e.previousIndex=e.currentIndex,t=e._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}},e.prototype._mismatch=function(e,t,n,r){var i;return null===e?i=this._itTail:(i=e._prev,this._remove(e)),null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(n,r))?(I_(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,i,r)):null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(I_(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,i,r)):e=this._addAfter(new yb(t,n),i,r),e},e.prototype._verifyReinsertion=function(e,t,n,r){var i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==i?e=this._reinsertAfter(i,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e},e.prototype._truncate=function(e){for(;null!==e;){var t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)},e.prototype._reinsertAfter=function(e,t,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);var r=e._prevRemoved,i=e._nextRemoved;return null===r?this._removalsHead=i:r._nextRemoved=i,null===i?this._removalsTail=r:i._prevRemoved=r,this._insertAfter(e,t,n),this._addToMoves(e,n),e},e.prototype._moveAfter=function(e,t,n){return this._unlink(e),this._insertAfter(e,t,n),this._addToMoves(e,n),e},e.prototype._addAfter=function(e,t,n){return this._insertAfter(e,t,n),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e},e.prototype._insertAfter=function(e,t,n){var r=null===t?this._itHead:t._next;return e._next=r,e._prev=t,null===r?this._itTail=e:r._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new _b),this._linkedRecords.put(e),e.currentIndex=n,e},e.prototype._remove=function(e){return this._addToRemovals(this._unlink(e))},e.prototype._unlink=function(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);var t=e._prev,n=e._next;return null===t?this._itHead=n:t._next=n,null===n?this._itTail=t:n._prev=t,e},e.prototype._addToMoves=function(e,t){return e.previousIndex===t?e:(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e,e)},e.prototype._addToRemovals=function(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new _b),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e},e.prototype._addIdentityChange=function(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e},e}(),yb=function yb(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null},gb=function(){function e(){this._head=null,this._tail=null}return e.prototype.add=function(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)},e.prototype.get=function(e,t){var n;for(n=this._head;null!==n;n=n._nextDup)if((null===t||t<=n.currentIndex)&&I_(n.trackById,e))return n;return null},e.prototype.remove=function(e){var t=e._prevDup,n=e._nextDup;return null===t?this._head=n:t._nextDup=n,null===n?this._tail=t:n._prevDup=t,null===this._head},e}(),_b=function(){function e(){this.map=new Map}return e.prototype.put=function(e){var t=e.trackById,n=this.map.get(t);n||(n=new gb,this.map.set(t,n)),n.add(e)},e.prototype.get=function(e,t){var n=this.map.get(e);return n?n.get(e,t):null},e.prototype.remove=function(e){var t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e},Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0===this.map.size},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this.map.clear()},e}();function bb(e,t,n){var r=e.previousIndex;if(null===r)return r;var i=0;return n&&r<n.length&&(i=n[r]),r+t+i}
|
|
1380
1380
|
/**
|
|
1381
1381
|
* @license
|
|
1382
1382
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1470,7 +1470,7 @@ function n(e){return e[Em]||null}(e);return new dx(t,this.ngModule)},t}(J_);func
|
|
|
1470
1470
|
*
|
|
1471
1471
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1472
1472
|
* found in the LICENSE file at https://angular.io/license
|
|
1473
|
-
*/();return Xy(n)?n.createElement(e,r):null===r?n.createElement(e):n.createElementNS(r,e)}(this.selector,u.createRenderer(null,this.componentDef)):function h(e,t){var n=e.createRenderer(null,null);return"string"==typeof t?Xy(n)?n.selectRootElement(t):n.querySelector(t):t}(u,n),f=this.componentDef.onPush?576:528,d="string"==typeof n&&/^#root-ng-internal-isolated-\d+/.test(n),v=i||d?W_():s.get(hx),m=u.createRenderer(c,this.componentDef);n&&c&&(Xy(m)?m.setAttribute(c,"ng-version",fb.full):c.setAttribute("ng-version",fb.full));var y,g,_=d_(null,__(-1,null,1,0,null,null,null,null),v,f,null,null,u,m,l,s),b=Ay(_,null);try{var
|
|
1473
|
+
*/();return Xy(n)?n.createElement(e,r):null===r?n.createElement(e):n.createElementNS(r,e)}(this.selector,u.createRenderer(null,this.componentDef)):function h(e,t){var n=e.createRenderer(null,null);return"string"==typeof t?Xy(n)?n.selectRootElement(t):n.querySelector(t):t}(u,n),f=this.componentDef.onPush?576:528,d="string"==typeof n&&/^#root-ng-internal-isolated-\d+/.test(n),v=i||d?W_():s.get(hx),m=u.createRenderer(c,this.componentDef);n&&c&&(Xy(m)?m.setAttribute(c,"ng-version",fb.full):c.setAttribute("ng-version",fb.full));var y,g,_=d_(null,__(-1,null,1,0,null,null,null,null),v,f,null,null,u,m,l,s),b=Ay(_,null),w=!1;try{var x=
|
|
1474
1474
|
/**
|
|
1475
1475
|
* @license
|
|
1476
1476
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1492,7 +1492,7 @@ function n(e){return e[Em]||null}(e);return new dx(t,this.ngModule)},t}(J_);func
|
|
|
1492
1492
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1493
1493
|
* found in the LICENSE file at https://angular.io/license
|
|
1494
1494
|
*/
|
|
1495
|
-
function
|
|
1495
|
+
function E(e,t,n,r,i,o){!function s(){Zm=!1,Ym=null}();var a=n[Rm];n[0+Xm]=e;var u=function l(e,t,n,r,i,o){var s=n+Xm,a=e.data[s]||function u(e,t,n,r,i,o,s){var a=wy(),u=Sy(),l=u?a:a&&a.parent,c=e.data[n]=b_(l&&l!==t?l:null,r,n,i,o);return 0!==s&&e.firstChild||(e.firstChild=c),a&&(!u||null!=a.child||null===c.parent&&2!==a.type?u||(a.next=c):a.child=c),c}(e,t,s,r,i,o,n);return xy(a,!0),a}(a,null,0,3,null,null),c=d_(n,function p(e){return e.tView||(e.tView=__(-1,e.template,e.consts,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas))}(t),null,t.onPush?64:16,n[Xm],u,r,i,o);return a.firstTemplatePass&&(function f(e,t,n){!function r(e,t,n){var r="string"!=typeof n?n[Tm]:n.charCodeAt(0)||0;null==r&&(r=n[Tm]=pg++);var i=r&cg,o=1<<i,s=64&i,a=32&i,u=t.data;128&i?s?a?u[e+7]|=o:u[e+6]|=o:a?u[e+5]|=o:u[e+4]|=o:s?a?u[e+3]|=o:u[e+2]|=o:a?u[e+1]|=o:u[e]|=o}(e,t[Rm],n)}(function h(e,t){var n=fg(e,t);if(-1!==n)return n;var r=t[Rm];r.firstTemplatePass&&(e.injectorIndex=t.length,hg(r.data,e),hg(t,null),hg(r.blueprint,null));var i=dg(e,t),o=ig(i),s=og(i,t),a=e.injectorIndex;if(function u(e){return e!==$y}(i))for(var l=s[Rm].data,c=0;c<8;c++)t[a+c]=s[o+c]|l[o+c];return t[a+Wy]=i,a}(u,n),n,t.type),u.flags=1,function d(e,t,n){e.flags=1&e.flags,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}(u,n.length,1),function v(e){var t=by()[Rm];(t.components||(t.components=[])).push(e.index)}(u)),n[Xm]=c}(c,this.componentDef,_,u,m);g=cy(0,_),t&&(g.projection=t.map(function(e){return Array.from(e)})),y=function S(e,t,n,r,i){var o=n[Rm],s=function a(e,t,n){var r=wy();e.firstTemplatePass&&(n.providersResolver&&n.providersResolver(n),function i(e,t,n){var r=-(t.index-Xm),i=e.data.length-(65535&t.providerIndexes);(e.expandoInstructions||(e.expandoInstructions=[])).push(r,i,n)}(e,r,1),function o(e,t,n,r){e.data.push(n);var i=new Gy(r,fy(n),null);e.blueprint.push(i),t.push(i)}(e,t,n,n.factory));var s=gg(e.data,t,t.length-1,r);return function a(e,t,n){var r=ly(t,e);Jy(n,e),r&&Jy(r,e)}(t,r,s),s}(o,n,t);r.components.push(s),e[Um]=s,i&&i.forEach(function(e){return e(s,t)}),t.contentQueries&&t.contentQueries(1,s,n.length-1);var u=wy();if(o.firstTemplatePass&&t.hostBindings&&(function l(e,t,n,r,i){var o=t.length;e.hostBindings(1,n,r.index-Xm),o===t.length&&i&&t.push(e.hostBindings)}(t,o.expandoInstructions,s,u,o.firstTemplatePass),u.onElementCreationFns&&function c(e){var t;if(t=e.onElementCreationFns){for(var n=0;n<t.length;n++)t[n]();e.onElementCreationFns=null}}
|
|
1496
1496
|
/**
|
|
1497
1497
|
* @license
|
|
1498
1498
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1506,7 +1506,7 @@ function x(e,t,n,r,i,o){!function s(){Zm=!1,Ym=null}();var a=n[Rm];n[0+Xm]=e;var
|
|
|
1506
1506
|
*
|
|
1507
1507
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1508
1508
|
* found in the LICENSE file at https://angular.io/license
|
|
1509
|
-
*/(u)),u.stylingTemplate){var p=e[Om];!function h(e,t,n,r){for(var i=t[4],o=r||2;o<i.length;)i[o+1]&&Pg(e,i[o+0],!0,n,null),o+=3}(p,u.stylingTemplate,e[zm]),function f(e,t,n,r){for(var i=t[3],o=r||2;o<i.length;){var s=i[o+1];s&&Ag(e,i[o+0],s,n,null),o+=3}}(p,u.stylingTemplate,e[zm])}return s}(
|
|
1509
|
+
*/(u)),u.stylingTemplate){var p=e[Om];!function h(e,t,n,r){for(var i=t[4],o=r||2;o<i.length;)i[o+1]&&Pg(e,i[o+0],!0,n,null),o+=3}(p,u.stylingTemplate,e[zm]),function f(e,t,n,r){for(var i=t[3],o=r||2;o<i.length;){var s=i[o+1];s&&Ag(e,i[o+0],s,n,null),o+=3}}(p,u.stylingTemplate,e[zm])}return s}(x,this.componentDef,_,v,[Q_]),function C(e,t){e[Qm]?e[15][Fm]=t:e[Qm]=t,e[15]=t}(_,x),h_(_),w=!0}finally{Py(b,w)}var T=new vx(this.componentType,y,function N(e,t,n){return $_||($_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(e)),new $_(ly(t,n))}(sb,g,_),_,g);return i&&(T.hostView._tViewNode.child=g),T},t}(Y_),vx=(new lx,function(e){function t(t,n,r,i,o){var s=e.call(this)||this;return s.location=r,s._rootLView=i,s._tNode=o,s.destroyCbs=[],s.instance=n,s.hostView=s.changeDetectorRef=new rb(i),s.hostView._tViewNode=function a(e,t,n,r){var i=e.node;return null==i&&(e.node=i=b_(t,2,n,null,null)),r[Vm]=i}(i[Rm],null,-1,i),s.componentType=t,s}return o(t,e),Object.defineProperty(t.prototype,"injector",{get:function(){return new wg(this._tNode,this._rootLView)},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this.destroyCbs&&(this.destroyCbs.forEach(function(e){return e()}),this.destroyCbs=null,!this.hostView.destroyed&&this.hostView.destroy())},t.prototype.onDestroy=function(e){this.destroyCbs&&this.destroyCbs.push(e)},t}(X_));function mx(e){e.toLowerCase().replace(/_/g,"-")}
|
|
1510
1510
|
/**
|
|
1511
1511
|
* @license
|
|
1512
1512
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1889,7 +1889,7 @@ var d}function JC(e,t,n,r){yC.apply(void 0,f([e,t,n],r))}function eT(e,t){for(va
|
|
|
1889
1889
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1890
1890
|
* found in the LICENSE file at https://angular.io/license
|
|
1891
1891
|
*/
|
|
1892
|
-
function r(e){var t=Array.from(e.providers),n=Array.from(e.modules),r={};for(var i in e.providersByKey)r[i]=e.providersByKey[i];return{factory:e.factory,isRoot:e.isRoot,providers:t,modules:n,providersByKey:r}}(lw(this._ngModuleDefFactory));return zb.createNgModuleRef(this.moduleType,e||Uv.NULL,this._bootstrapComponents,n)}}(nb);var uT=function(){function e(e,t){var n=this;this.host=e,this.getProgram=t,this.metadataCollector=new Pf({verboseInvalidExpression:!0}),e.directoryExists&&(this.directoryExists=function(e){return n.host.directoryExists(e)})}return e.prototype.fileExists=function(e){return!!this.host.getScriptSnapshot(e)},e.prototype.readFile=function(e){var t=this.host.getScriptSnapshot(e);if(t)return t.getText(0,t.getLength())},e.prototype.getSourceFileMetadata=function(e){var t=this.getProgram().getSourceFile(e);return t?this.metadataCollector.getMetadata(t):void 0},e.prototype.cacheMetadata=function(e){return e.endsWith(".d.ts")},e}(),lT=function(){function e(e,t,n){this.options=n,this.metadataReaderCache=function r(){return{data:new Map}}(),this.hostAdapter=new uT(t,e)}return e.prototype.getMetadataFor=function(e){return function t(e,n,r){var i=r&&r.data.get(e);if(i)return i;if(n.fileExists(e))if(Of.test(e))(i=function o(e,t){var n=t.replace(Of,".metadata.json");if(e.fileExists(n))try{var r=JSON.parse(e.readFile(n)),i=r?Array.isArray(r)?r:[r]:[];if(i.length){var o=i.reduce(function(e,t){return e.version>t.version?e:t});o.version<uf&&i.push(Rf(e,o,t))}return i}catch(e){throw console.error("Failed to read JSON file "+n),e}}(n,e))||(i=[Rf(n,{__symbolic:"module",version:1,metadata:{}},e)]);else{var s=n.getSourceFileMetadata(e);i=s?[s]:[]}return!r||n.cacheMetadata&&!n.cacheMetadata(e)||r.data.set(e,i),i}(e,this.hostAdapter,this.metadataReaderCache)},e.prototype.moduleNameToFileName=function(e,r){if(!r){if(0===e.indexOf("."))throw new Error("Resolution of relative paths requires a containing file.");r=t.join(this.options.basePath,"index.ts").replace(/\\/g,"/")}var i=n.resolveModuleName(e,r,this.options,this.hostAdapter).resolvedModule;return i?i.resolvedFileName:null},e.prototype.getOutputName=function(e){return e},e}(),cT=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.parse=function(){return new ba([],[])},t}(Sa),pT=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.get=function(e){return Promise.resolve("")},t}(Ic),hT=function(){function e(e,t){this.host=e,this.tsService=t,this._staticSymbolCache=new Zt,this._typeCache=[],this.modulesOutOfDate=!0,this.fileVersions=new Map}return e.prototype.setSite=function(e){this.service=e},Object.defineProperty(e.prototype,"resolver",{get:function(){var e=this;this.validate();var t=this._resolver;if(!t){var n=new Bp(this.reflector),r=new Xc(this.reflector),i=new Hp(this.reflector),o=new kl,s=new pT,a=gh(),u=new cT,l=new zc({defaultEncapsulation:ym.Emulated,useJit:!1}),c=new Qc(s,a,u,l);t=this._resolver=new Dp(l,u,n,r,i,new yh,o,c,new HE,this._staticSymbolCache,this.reflector,function(t,n){return e.collectError(t,n&&n.filePath)})}return t},enumerable:!0,configurable:!0}),e.prototype.getTemplateReferences=function(){return this.ensureTemplateMap(),this.templateReferences||[]},e.prototype.getTemplateAt=function(e,t){var n=this.getSourceFile(e);if(n){this.context=n.fileName;var r=this.findNode(n,t);if(r)return this.getSourceFromNode(e,this.host.getScriptVersion(n.fileName),r)}else{this.ensureTemplateMap();var i=this.fileToComponent.get(e);if(i)return this.getSourceFromType(e,this.host.getScriptVersion(e),i)}},e.prototype.getAnalyzedModules=function(){return this.updateAnalyzedModules(),this.ensureAnalyzedModules()},e.prototype.ensureAnalyzedModules=function(){var e=this.analyzedModules;return e||(e=0===this.host.getScriptFileNames().length?{files:[],ngModuleByPipeOrDirective:new Map,ngModules:[]}:function t(e,n,r,i){return function s(e){var t=[],n=new Map,r=new Set;e.forEach(function(e){e.ngModules.forEach(function(e){t.push(e),e.declaredDirectives.forEach(function(t){return n.set(t.reference,e)}),e.declaredPipes.forEach(function(t){return n.set(t.reference,e)})}),e.directives.forEach(function(e){return r.add(e)}),e.pipes.forEach(function(e){return r.add(e)})});var i=[];return r.forEach(function(e){n.has(e)||i.push(e)}),{ngModules:t,ngModuleByPipeOrDirective:n,symbolsMissingModule:i,files:e}}(function o(e,t,n,r){var i=new Set,o=[],s=function(e){if(i.has(e)||!t.isSourceFile(e))return!1;i.add(e);var a=function u(e,t,n,r){var i=[],o=[],s=[],a=[],u=t.hasDecorators(r),l=!1;return r.endsWith(".d.ts")&&!u||t.getSymbolsOf(r).forEach(function(r){var u=t.resolveSymbol(r).metadata;if(u&&"error"!==u.__symbolic){var c=!1;if("class"===u.__symbolic)if(n.isDirective(r))c=!0,i.push(r);else if(n.isPipe(r))c=!0,o.push(r);else if(n.isNgModule(r)){var p=n.getNgModuleMetadata(r,!1);p&&(c=!0,a.push(p))}else if(n.isInjectable(r)){c=!0;var h=n.getInjectableMetadata(r,null,!1);h&&s.push(h)}c||(l=l||function f(e,t){var n=!1,r=function(){function t(){}return t.prototype.visitArray=function(e,t){var n=this;e.forEach(function(e){return xt(e,n,t)})},t.prototype.visitStringMap=function(e,t){var n=this;Object.keys(e).forEach(function(r){return xt(e[r],n,t)})},t.prototype.visitPrimitive=function(e,t){},t.prototype.visitOther=function(t,r){t instanceof Yt&&!e.isSourceFile(t.filePath)&&(n=!0)},t}();return xt(t,new r,null),n}(e,u))}}),{fileName:r,directives:i,pipes:o,ngModules:a,injectables:s,exportsNonSourceFiles:l}}(t,n,r,e);o.push(a),a.ngModules.forEach(function(e){e.transitiveModule.modules.forEach(function(e){return s(e.reference.filePath)})})};return e.forEach(function(e){return s(e)}),o}(e,n,r,i))}(this.program.getSourceFiles().map(function(e){return e.fileName}),{isSourceFile:function(e){return!0}},this.staticSymbolResolver,this.resolver),this.analyzedModules=e),e},e.prototype.getTemplates=function(e){var t=this;if(this.ensureTemplateMap(),!this.fileToComponent.get(e)){var r=this.host.getScriptVersion(e),i=[],o=function(s){var a=t.getSourceFromNode(e,r,s);a?i.push(a):n.forEachChild(s,o)},s=this.getSourceFile(e);return s&&(this.context=s.path||s.fileName,n.forEachChild(s,o)),i.length?i:void 0}var a=this.getTemplateAt(e,0);if(a)return[a]},e.prototype.getDeclarations=function(e){var t=this,r=[],i=this.getSourceFile(e);if(i){var o=function(e){var s=t.getDeclarationFromNode(i,e);s?r.push(s):n.forEachChild(e,o)};n.forEachChild(i,o)}return r},e.prototype.getSourceFile=function(e){return this.tsService.getProgram().getSourceFile(e)},e.prototype.updateAnalyzedModules=function(){this.validate(),this.modulesOutOfDate&&(this.analyzedModules=null,this._reflector=null,this.templateReferences=null,this.fileToComponent=null,this.ensureAnalyzedModules(),this.modulesOutOfDate=!1)},Object.defineProperty(e.prototype,"program",{get:function(){return this.tsService.getProgram()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"checker",{get:function(){var e=this._checker;return e||(e=this._checker=this.program.getTypeChecker()),e},enumerable:!0,configurable:!0}),e.prototype.validate=function(){var e,t,n=this,r=this.program;if(this.lastProgram!==r){var i=function(e){return n._staticSymbolResolver.invalidateFile(e)};this.clearCaches();var o=new Set;try{for(var s=p(this.program.getSourceFiles()),a=s.next();!a.done;a=s.next()){var u=a.value.fileName;o.add(u);var l=this.host.getScriptVersion(u);l!=this.fileVersions.get(u)&&(this.fileVersions.set(u,l),this._staticSymbolResolver&&i(u))}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}var c=Array.from(this.fileVersions.keys()).filter(function(e){return!o.has(e)});c.forEach(function(e){return n.fileVersions.delete(e)}),this._staticSymbolResolver&&c.forEach(i),this.lastProgram=r}},e.prototype.clearCaches=function(){this._checker=null,this._typeCache=[],this._resolver=null,this.collectedErrors=null,this.modulesOutOfDate=!0},e.prototype.ensureTemplateMap=function(){var e,t,n,r;if(!this.fileToComponent||!this.templateReferences){var i=new Map,o=[],s=this.getAnalyzedModules(),a=gh();try{for(var u=p(s.ngModules),l=u.next();!l.done;l=u.next()){var c=l.value;try{for(var h=p(c.declaredDirectives),f=h.next();!f.done;f=h.next()){var d=f.value,v=this.resolver.getNonNormalizedDirectiveMetadata(d.reference).metadata;if(v.isComponent&&v.template&&v.template.templateUrl){var m=a.resolve(this.reflector.componentModuleUrl(d.reference),v.template.templateUrl);i.set(m,d.reference),o.push(m)}}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}this.fileToComponent=i,this.templateReferences=o}},e.prototype.getSourceFromDeclaration=function(e,t,n,r,i,o,s,a){var u=void 0,l=this;if(o)return{version:t,source:n,span:r,type:i,get members(){return function e(t,n,r,i){var o=n.getTypeAtLocation(i);return new Uh(o,{node:r,program:t,checker:n}).members()}(l.program,l.checker,a,o)},get query(){if(!u){var t=l.service.getPipesAt(e,s.getStart());u=function n(e,t,r,i){return new jh(e,t,r,i)}(l.program,l.checker,a,function(){return function e(t,n,r,i){return new Xh(i,{program:n,checker:r,node:t})}(a,l.program,l.checker,t)})}return u}}},e.prototype.getSourceFromNode=function(e,t,r){switch(r.kind){case n.SyntaxKind.NoSubstitutionTemplateLiteral:case n.SyntaxKind.StringLiteral:var i=h(this.getTemplateClassDeclFromNode(r),2)[0];if(i&&i.name){var o=this.getSourceFile(e);if(o)return this.getSourceFromDeclaration(e,t,this.stringOf(r)||"",function s(e,t){return null==t&&(t=1),{start:e.start+t,end:e.end-t}}(fT(r)),this.reflector.getStaticSymbol(o.fileName,i.name.text),i,r,o)}}},e.prototype.getSourceFromType=function(e,t,n){var r=void 0,i=this.getTemplateClassFromStaticSymbol(n);if(i){var o=this.host.getScriptSnapshot(e);if(o){var s=o.getText(0,o.getLength());r=this.getSourceFromDeclaration(e,t,s,{start:0,end:s.length},n,i,i,i.getSourceFile())}}return r},Object.defineProperty(e.prototype,"reflectorHost",{get:function(){var e=this,n=this._reflectorHost;if(!n){if(!this.context){var i=this.host.getScriptFileNames();if(0===i.length)throw new Error("Internal error: no script file names found");this.context=i[0]}var o=this.tsService.getProgram().getSourceFile(this.context);if(!o)throw new Error("Internal error: no context could be determined");var s=function a(e){for(var n=t.dirname(e);r.existsSync(n);){var i=t.join(n,"tsconfig.json");if(r.existsSync(i))return i;var o=t.dirname(n);if(o===n)break;n=o}}(o.fileName),u=t.dirname(s||this.context),l={basePath:u,genDir:u},c=this.host.getCompilationSettings();c&&c.baseUrl&&(l.baseUrl=c.baseUrl),c&&c.paths&&(l.paths=c.paths),n=this._reflectorHost=new lT(function(){return e.tsService.getProgram()},this.host,l)}return n},enumerable:!0,configurable:!0}),e.prototype.collectError=function(e,t){if(t){var n=this.collectedErrors;n&&this.collectedErrors||(n=this.collectedErrors=new Map);var r=n.get(t);r||this.collectedErrors.set(t,r=[]),r.push(e)}},Object.defineProperty(e.prototype,"staticSymbolResolver",{get:function(){var e=this,t=this._staticSymbolResolver;return t||(this._summaryResolver=new mh({loadSummary:function(e){return null},isSourceFile:function(e){return!0},toSummaryFileName:function(e){return e},fromSummaryFileName:function(e){return e}},this._staticSymbolCache),t=this._staticSymbolResolver=new Kp(this.reflectorHost,this._staticSymbolCache,this._summaryResolver,function(t,n){return e.collectError(t,n)})),t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reflector",{get:function(){var e=this,t=this._reflector;return t||(t=this._reflector=new th(this._summaryResolver,this.staticSymbolResolver,[],[],function(t,n){return e.collectError(t,n)})),t},enumerable:!0,configurable:!0}),e.prototype.getTemplateClassFromStaticSymbol=function(e){var t=this.getSourceFile(e.filePath);if(t)return n.forEachChild(t,function(t){if(t.kind===n.SyntaxKind.ClassDeclaration&&null!=t.name&&t.name.text===e.name)return t})},e.prototype.getTemplateClassDeclFromNode=function(t){var r=t.parent;if(!r)return e.missingTemplate;if(r.kind!==n.SyntaxKind.PropertyAssignment)return e.missingTemplate;if("template"!==r.name.text)return e.missingTemplate;if(!(r=r.parent)||r.kind!==n.SyntaxKind.ObjectLiteralExpression)return e.missingTemplate;if(!(r=r.parent)||r.kind!==n.SyntaxKind.CallExpression)return e.missingTemplate;var i=r.parent;if(!i||i.kind!==n.SyntaxKind.Decorator)return e.missingTemplate;var o=i.parent;return o&&o.kind===n.SyntaxKind.ClassDeclaration?[o,r.expression]:e.missingTemplate},e.prototype.getCollectedErrors=function(e,t){var r=this.collectedErrors&&this.collectedErrors.get(t.fileName);return r&&r.map(function(r){var i=function o(e,t,r){if(null!=t&&null!=r){var i=n.getPositionOfLineAndCharacter(e,t,r),o=n.forEachChild(e,function e(t){if(t.kind>n.SyntaxKind.LastToken&&t.pos<=i&&t.end>i)return n.forEachChild(t,e)||t});if(o)return{start:o.getStart(),end:o.getEnd()}}}(t,r.line||r.position&&r.position.line,r.column||r.position&&r.position.column)||e;return function s(e){return!!e[Gp]}
|
|
1892
|
+
function r(e){var t=Array.from(e.providers),n=Array.from(e.modules),r={};for(var i in e.providersByKey)r[i]=e.providersByKey[i];return{factory:e.factory,isRoot:e.isRoot,providers:t,modules:n,providersByKey:r}}(lw(this._ngModuleDefFactory));return zb.createNgModuleRef(this.moduleType,e||Uv.NULL,this._bootstrapComponents,n)}}(nb);var uT=function(){function e(e,t){var n=this;this.host=e,this.getProgram=t,this.metadataCollector=new Pf({verboseInvalidExpression:!0}),e.directoryExists&&(this.directoryExists=function(e){return n.host.directoryExists(e)})}return e.prototype.fileExists=function(e){return!!this.host.getScriptSnapshot(e)},e.prototype.readFile=function(e){var t=this.host.getScriptSnapshot(e);if(t)return t.getText(0,t.getLength())},e.prototype.getSourceFileMetadata=function(e){var t=this.getProgram().getSourceFile(e);return t?this.metadataCollector.getMetadata(t):void 0},e.prototype.cacheMetadata=function(e){return e.endsWith(".d.ts")},e}(),lT=function(){function e(e,t,n){this.options=n,this.metadataReaderCache=function r(){return{data:new Map}}(),this.hostAdapter=new uT(t,e)}return e.prototype.getMetadataFor=function(e){return function t(e,n,r){var i=r&&r.data.get(e);if(i)return i;if(n.fileExists(e))if(Of.test(e))(i=function o(e,t){var n=t.replace(Of,".metadata.json");if(e.fileExists(n))try{var r=JSON.parse(e.readFile(n)),i=r?Array.isArray(r)?r:[r]:[];if(i.length){var o=i.reduce(function(e,t){return e.version>t.version?e:t});o.version<uf&&i.push(Rf(e,o,t))}return i}catch(e){throw console.error("Failed to read JSON file "+n),e}}(n,e))||(i=[Rf(n,{__symbolic:"module",version:1,metadata:{}},e)]);else{var s=n.getSourceFileMetadata(e);i=s?[s]:[]}return!r||n.cacheMetadata&&!n.cacheMetadata(e)||r.data.set(e,i),i}(e,this.hostAdapter,this.metadataReaderCache)},e.prototype.moduleNameToFileName=function(e,r){if(!r){if(0===e.indexOf("."))throw new Error("Resolution of relative paths requires a containing file.");r=t.join(this.options.basePath,"index.ts").replace(/\\/g,"/")}var i=n.resolveModuleName(e,r,this.options,this.hostAdapter).resolvedModule;return i?i.resolvedFileName:null},e.prototype.getOutputName=function(e){return e},e}(),cT=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.parse=function(){return new ba([],[])},t}(Sa),pT=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.get=function(e){return Promise.resolve("")},t}(Ic),hT=function(){function e(e,t){this.host=e,this.tsService=t,this._staticSymbolCache=new Zt,this._typeCache=[],this.modulesOutOfDate=!0,this.fileVersions=new Map}return Object.defineProperty(e.prototype,"resolver",{get:function(){var e=this;this.validate();var t=this._resolver;if(!t){var n=new Bp(this.reflector),r=new Xc(this.reflector),i=new Hp(this.reflector),o=new kl,s=new pT,a=gh(),u=new cT,l=new zc({defaultEncapsulation:ym.Emulated,useJit:!1}),c=new Qc(s,a,u,l);t=this._resolver=new Dp(l,u,n,r,i,new yh,o,c,new HE,this._staticSymbolCache,this.reflector,function(t,n){return e.collectError(t,n&&n.filePath)})}return t},enumerable:!0,configurable:!0}),e.prototype.getTemplateReferences=function(){return this.ensureTemplateMap(),this.templateReferences||[]},e.prototype.getTemplateAt=function(e,t){var n=this.getSourceFile(e);if(n){this.context=n.fileName;var r=this.findNode(n,t);if(r)return this.getSourceFromNode(e,this.host.getScriptVersion(n.fileName),r)}else{this.ensureTemplateMap();var i=this.fileToComponent.get(e);if(i)return this.getSourceFromType(e,this.host.getScriptVersion(e),i)}},e.prototype.getAnalyzedModules=function(){return this.updateAnalyzedModules(),this.ensureAnalyzedModules()},e.prototype.ensureAnalyzedModules=function(){var e=this.analyzedModules;return e||(e=0===this.host.getScriptFileNames().length?{files:[],ngModuleByPipeOrDirective:new Map,ngModules:[]}:function t(e,n,r,i){return function s(e){var t=[],n=new Map,r=new Set;e.forEach(function(e){e.ngModules.forEach(function(e){t.push(e),e.declaredDirectives.forEach(function(t){return n.set(t.reference,e)}),e.declaredPipes.forEach(function(t){return n.set(t.reference,e)})}),e.directives.forEach(function(e){return r.add(e)}),e.pipes.forEach(function(e){return r.add(e)})});var i=[];return r.forEach(function(e){n.has(e)||i.push(e)}),{ngModules:t,ngModuleByPipeOrDirective:n,symbolsMissingModule:i,files:e}}(function o(e,t,n,r){var i=new Set,o=[],s=function(e){if(i.has(e)||!t.isSourceFile(e))return!1;i.add(e);var a=function u(e,t,n,r){var i=[],o=[],s=[],a=[],u=t.hasDecorators(r),l=!1;return r.endsWith(".d.ts")&&!u||t.getSymbolsOf(r).forEach(function(r){var u=t.resolveSymbol(r).metadata;if(u&&"error"!==u.__symbolic){var c=!1;if("class"===u.__symbolic)if(n.isDirective(r))c=!0,i.push(r);else if(n.isPipe(r))c=!0,o.push(r);else if(n.isNgModule(r)){var p=n.getNgModuleMetadata(r,!1);p&&(c=!0,a.push(p))}else if(n.isInjectable(r)){c=!0;var h=n.getInjectableMetadata(r,null,!1);h&&s.push(h)}c||(l=l||function f(e,t){var n=!1,r=function(){function t(){}return t.prototype.visitArray=function(e,t){var n=this;e.forEach(function(e){return xt(e,n,t)})},t.prototype.visitStringMap=function(e,t){var n=this;Object.keys(e).forEach(function(r){return xt(e[r],n,t)})},t.prototype.visitPrimitive=function(e,t){},t.prototype.visitOther=function(t,r){t instanceof Yt&&!e.isSourceFile(t.filePath)&&(n=!0)},t}();return xt(t,new r,null),n}(e,u))}}),{fileName:r,directives:i,pipes:o,ngModules:a,injectables:s,exportsNonSourceFiles:l}}(t,n,r,e);o.push(a),a.ngModules.forEach(function(e){e.transitiveModule.modules.forEach(function(e){return s(e.reference.filePath)})})};return e.forEach(function(e){return s(e)}),o}(e,n,r,i))}(this.program.getSourceFiles().map(function(e){return e.fileName}),{isSourceFile:function(e){return!0}},this.staticSymbolResolver,this.resolver),this.analyzedModules=e),e},e.prototype.getTemplates=function(e){var t=this;if(this.ensureTemplateMap(),!this.fileToComponent.get(e)){var r=this.host.getScriptVersion(e),i=[],o=function(s){var a=t.getSourceFromNode(e,r,s);a?i.push(a):n.forEachChild(s,o)},s=this.getSourceFile(e);return s&&(this.context=s.path||s.fileName,n.forEachChild(s,o)),i.length?i:void 0}var a=this.getTemplateAt(e,0);if(a)return[a]},e.prototype.getDeclarations=function(e){var t=this,r=[],i=this.getSourceFile(e);if(i){var o=function(e){var s=t.getDeclarationFromNode(i,e);s?r.push(s):n.forEachChild(e,o)};n.forEachChild(i,o)}return r},e.prototype.getSourceFile=function(e){return this.tsService.getProgram().getSourceFile(e)},e.prototype.updateAnalyzedModules=function(){this.validate(),this.modulesOutOfDate&&(this.analyzedModules=null,this._reflector=null,this.templateReferences=null,this.fileToComponent=null,this.ensureAnalyzedModules(),this.modulesOutOfDate=!1)},Object.defineProperty(e.prototype,"program",{get:function(){return this.tsService.getProgram()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"checker",{get:function(){var e=this._checker;return e||(e=this._checker=this.program.getTypeChecker()),e},enumerable:!0,configurable:!0}),e.prototype.validate=function(){var e,t,n=this,r=this.program;if(this.lastProgram!==r){var i=function(e){return n._staticSymbolResolver.invalidateFile(e)};this.clearCaches();var o=new Set;try{for(var s=p(this.program.getSourceFiles()),a=s.next();!a.done;a=s.next()){var u=a.value.fileName;o.add(u);var l=this.host.getScriptVersion(u);l!=this.fileVersions.get(u)&&(this.fileVersions.set(u,l),this._staticSymbolResolver&&i(u))}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}var c=Array.from(this.fileVersions.keys()).filter(function(e){return!o.has(e)});c.forEach(function(e){return n.fileVersions.delete(e)}),this._staticSymbolResolver&&c.forEach(i),this.lastProgram=r}},e.prototype.clearCaches=function(){this._checker=null,this._typeCache=[],this._resolver=null,this.collectedErrors=null,this.modulesOutOfDate=!0},e.prototype.ensureTemplateMap=function(){var e,t,n,r;if(!this.fileToComponent||!this.templateReferences){var i=new Map,o=[],s=this.getAnalyzedModules(),a=gh();try{for(var u=p(s.ngModules),l=u.next();!l.done;l=u.next()){var c=l.value;try{for(var h=p(c.declaredDirectives),f=h.next();!f.done;f=h.next()){var d=f.value,v=this.resolver.getNonNormalizedDirectiveMetadata(d.reference).metadata;if(v.isComponent&&v.template&&v.template.templateUrl){var m=a.resolve(this.reflector.componentModuleUrl(d.reference),v.template.templateUrl);i.set(m,d.reference),o.push(m)}}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}this.fileToComponent=i,this.templateReferences=o}},e.prototype.getSourceFromDeclaration=function(e,t,n,r,i,o,s,a){var u=void 0,l=this;if(o)return{version:t,source:n,span:r,type:i,get members(){return function e(t,n,r,i){var o=n.getTypeAtLocation(i);return new Uh(o,{node:r,program:t,checker:n}).members()}(l.program,l.checker,a,o)},get query(){if(!u){var t=[],n=l.getTemplateAstAtPosition(e,s.getStart());n&&(t=n.pipes),u=function r(e,t,n,i){return new jh(e,t,n,i)}(l.program,l.checker,a,function(){return function e(t,n,r,i){return new Xh(i,{program:n,checker:r,node:t})}(a,l.program,l.checker,t)})}return u}}},e.prototype.getSourceFromNode=function(e,t,r){switch(r.kind){case n.SyntaxKind.NoSubstitutionTemplateLiteral:case n.SyntaxKind.StringLiteral:var i=h(this.getTemplateClassDeclFromNode(r),2)[0];if(i&&i.name){var o=this.getSourceFile(e);if(o)return this.getSourceFromDeclaration(e,t,this.stringOf(r)||"",function s(e,t){return null==t&&(t=1),{start:e.start+t,end:e.end-t}}(fT(r)),this.reflector.getStaticSymbol(o.fileName,i.name.text),i,r,o)}}},e.prototype.getSourceFromType=function(e,t,n){var r=void 0,i=this.getTemplateClassFromStaticSymbol(n);if(i){var o=this.host.getScriptSnapshot(e);if(o){var s=o.getText(0,o.getLength());r=this.getSourceFromDeclaration(e,t,s,{start:0,end:s.length},n,i,i,i.getSourceFile())}}return r},Object.defineProperty(e.prototype,"reflectorHost",{get:function(){var e=this,n=this._reflectorHost;if(!n){if(!this.context){var i=this.host.getScriptFileNames();if(0===i.length)throw new Error("Internal error: no script file names found");this.context=i[0]}var o=this.tsService.getProgram().getSourceFile(this.context);if(!o)throw new Error("Internal error: no context could be determined");var s=function a(e){for(var n=t.dirname(e);r.existsSync(n);){var i=t.join(n,"tsconfig.json");if(r.existsSync(i))return i;var o=t.dirname(n);if(o===n)break;n=o}}(o.fileName),u=t.dirname(s||this.context),l={basePath:u,genDir:u},c=this.host.getCompilationSettings();c&&c.baseUrl&&(l.baseUrl=c.baseUrl),c&&c.paths&&(l.paths=c.paths),n=this._reflectorHost=new lT(function(){return e.tsService.getProgram()},this.host,l)}return n},enumerable:!0,configurable:!0}),e.prototype.collectError=function(e,t){if(t){var n=this.collectedErrors;n&&this.collectedErrors||(n=this.collectedErrors=new Map);var r=n.get(t);r||this.collectedErrors.set(t,r=[]),r.push(e)}},Object.defineProperty(e.prototype,"staticSymbolResolver",{get:function(){var e=this,t=this._staticSymbolResolver;return t||(this._summaryResolver=new mh({loadSummary:function(e){return null},isSourceFile:function(e){return!0},toSummaryFileName:function(e){return e},fromSummaryFileName:function(e){return e}},this._staticSymbolCache),t=this._staticSymbolResolver=new Kp(this.reflectorHost,this._staticSymbolCache,this._summaryResolver,function(t,n){return e.collectError(t,n)})),t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reflector",{get:function(){var e=this,t=this._reflector;return t||(t=this._reflector=new th(this._summaryResolver,this.staticSymbolResolver,[],[],function(t,n){return e.collectError(t,n)})),t},enumerable:!0,configurable:!0}),e.prototype.getTemplateClassFromStaticSymbol=function(e){var t=this.getSourceFile(e.filePath);if(t)return n.forEachChild(t,function(t){if(t.kind===n.SyntaxKind.ClassDeclaration&&null!=t.name&&t.name.text===e.name)return t})},e.prototype.getTemplateClassDeclFromNode=function(t){var r=t.parent;if(!r)return e.missingTemplate;if(r.kind!==n.SyntaxKind.PropertyAssignment)return e.missingTemplate;if("template"!==r.name.text)return e.missingTemplate;if(!(r=r.parent)||r.kind!==n.SyntaxKind.ObjectLiteralExpression)return e.missingTemplate;if(!(r=r.parent)||r.kind!==n.SyntaxKind.CallExpression)return e.missingTemplate;var i=r.parent;if(!i||i.kind!==n.SyntaxKind.Decorator)return e.missingTemplate;var o=i.parent;return o&&o.kind===n.SyntaxKind.ClassDeclaration?[o,r.expression]:e.missingTemplate},e.prototype.getCollectedErrors=function(e,t){var r=this.collectedErrors&&this.collectedErrors.get(t.fileName);return r&&r.map(function(r){var i=function o(e,t,r){if(null!=t&&null!=r){var i=n.getPositionOfLineAndCharacter(e,t,r),o=n.forEachChild(e,function e(t){if(t.kind>n.SyntaxKind.LastToken&&t.pos<=i&&t.end>i)return n.forEachChild(t,e)||t});if(o)return{start:o.getStart(),end:o.getEnd()}}}(t,r.line||r.position&&r.position.line,r.column||r.position&&r.position.column)||e;return function s(e){return!!e[Gp]}
|
|
1893
1893
|
/**
|
|
1894
1894
|
* @license
|
|
1895
1895
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1903,7 +1903,7 @@ function r(e){var t=Array.from(e.providers),n=Array.from(e.modules),r={};for(var
|
|
|
1903
1903
|
*
|
|
1904
1904
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1905
1905
|
* found in the LICENSE file at https://angular.io/license
|
|
1906
|
-
*/(r,i):{message:r.message,span:i}})||[]},e.prototype.getDeclarationFromNode=function(e,t){var r,i;if(t.kind==n.SyntaxKind.ClassDeclaration&&t.decorators&&t.name)try{for(var o=p(t.decorators),s=o.next();!s.done;s=o.next()){var a=s.value;if(a.expression&&a.expression.kind==n.SyntaxKind.CallExpression){var u=t;if(u.name){var l=a.expression.expression;if(this.checker.getTypeAtLocation(l)){var c=this.reflector.getStaticSymbol(e.fileName,u.name.text);try{if(this.resolver.isDirective(c)){var h=this.resolver.getNonNormalizedDirectiveMetadata(c).metadata;return{type:c,declarationSpan:f=fT(l),metadata:h,errors:this.getCollectedErrors(f,e)}}}catch(t){var f;if(t.message)return this.collectError(t,e.fileName),{type:c,declarationSpan:f=fT(l),errors:this.getCollectedErrors(f,e)}}}}}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},e.prototype.stringOf=function(e){switch(e.kind){case n.SyntaxKind.NoSubstitutionTemplateLiteral:case n.SyntaxKind.StringLiteral:return e.text}},e.prototype.findNode=function(e,t){return function e(r){if(t>=r.getStart()&&t<r.getEnd())return n.forEachChild(r,e)||r}(e)},e.missingTemplate=[void 0,void 0],e}();
|
|
1906
|
+
*/(r,i):{message:r.message,span:i}})||[]},e.prototype.getDeclarationFromNode=function(e,t){var r,i;if(t.kind==n.SyntaxKind.ClassDeclaration&&t.decorators&&t.name)try{for(var o=p(t.decorators),s=o.next();!s.done;s=o.next()){var a=s.value;if(a.expression&&a.expression.kind==n.SyntaxKind.CallExpression){var u=t;if(u.name){var l=a.expression.expression;if(this.checker.getTypeAtLocation(l)){var c=this.reflector.getStaticSymbol(e.fileName,u.name.text);try{if(this.resolver.isDirective(c)){var h=this.resolver.getNonNormalizedDirectiveMetadata(c).metadata;return{type:c,declarationSpan:f=fT(l),metadata:h,errors:this.getCollectedErrors(f,e)}}}catch(t){var f;if(t.message)return this.collectError(t,e.fileName),{type:c,declarationSpan:f=fT(l),errors:this.getCollectedErrors(f,e)}}}}}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},e.prototype.stringOf=function(e){switch(e.kind){case n.SyntaxKind.NoSubstitutionTemplateLiteral:case n.SyntaxKind.StringLiteral:return e.text}},e.prototype.findNode=function(e,t){return function e(r){if(t>=r.getStart()&&t<r.getEnd())return n.forEachChild(r,e)||r}(e)},e.prototype.getTemplateAstAtPosition=function(e,t){var n=this.getTemplateAt(e,t);if(n){var r=this.getTemplateAst(n,e);if(r&&r.htmlAst&&r.templateAst&&r.directive&&r.directives&&r.pipes&&r.expressionParser)return{position:t,fileName:e,template:n,htmlAst:r.htmlAst,directive:r.directive,directives:r.directives,pipes:r.pipes,templateAst:r.templateAst,expressionParser:r.expressionParser}}},e.prototype.getTemplateAst=function(e,t){var n=this,r=void 0;try{var i=this.resolver.getNonNormalizedDirectiveMetadata(e.type),o=i&&i.metadata;if(o){var s=new Sa,a=new Sp(s),u=new ml(new nl),l=new zc,c=new Ou(l,this.resolver.getReflector(),u,new kl,a,null,[]),h=a.parse(e.source,"",{tokenizeExpansionForms:!0}),f=this.getAnalyzedModules(),d=f.ngModuleByPipeOrDirective.get(e.type);if(d||(d=function v(e){var t,n,r=void 0,i=0;try{for(var o=p(e.ngModules),s=o.next();!s.done;s=o.next()){var a=s.value,u=a.transitiveModule.directives.length;u>i&&(r=a,i=u)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(f)),d){var m=d.transitiveModule.directives.map(function(e){return n.resolver.getNonNormalizedDirectiveMetadata(e.reference)}).filter(function(e){return e}).map(function(e){return e.metadata.toSummary()}),y=d.transitiveModule.pipes.map(function(e){return n.resolver.getOrLoadPipeMetadata(e.reference).toSummary()}),g=c.tryParseHtml(h,o,m,y,d.schemas);r={htmlAst:h.rootNodes,templateAst:g.templateAst,directive:o,directives:m,pipes:y,parseErrors:g.errors,expressionParser:u,errors:void 0}}}}catch(n){var _=e.span;n.fileName==t&&(_=e.query.getSpanAt(n.line,n.column)||_),r={errors:[{kind:Mf.Error,message:n.message,span:_}]}}return r||{}},e.missingTemplate=[void 0,void 0],e}();
|
|
1907
1907
|
/**
|
|
1908
1908
|
* @license
|
|
1909
1909
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1959,7 +1959,7 @@ function r(e){var t=Array.from(e.providers),n=Array.from(e.modules),r={};for(var
|
|
|
1959
1959
|
*
|
|
1960
1960
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1961
1961
|
* found in the LICENSE file at https://angular.io/license
|
|
1962
|
-
*/function fT(e){return{start:e.getStart(),end:e.getEnd()}}function dT(e){return{message:e.message,next:e.next?dT(e.next):void 0}}var vT=new WeakMap,mT=new hb("8.1.
|
|
1962
|
+
*/function fT(e){return{start:e.getStart(),end:e.getEnd()}}function dT(e){return{message:e.message,next:e.next?dT(e.next):void 0}}var vT=new WeakMap,mT=new hb("8.1.2");
|
|
1963
1963
|
/**
|
|
1964
1964
|
* @license
|
|
1965
1965
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1982,7 +1982,7 @@ e.createLanguageService=yd,e.TypeScriptServiceHost=hT,e.createLanguageServiceFro
|
|
|
1982
1982
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1983
1983
|
* found in the LICENSE file at https://angular.io/license
|
|
1984
1984
|
*/
|
|
1985
|
-
function yT(e,t){
|
|
1985
|
+
function yT(e,t){return yd(new hT(e,t))},e.VERSION=mT,e.getExternalFiles=function gT(e){var t=vT.get(e);if(t)return t.getTemplateReferences()},e.create=function _T(e){var t=e.languageService,r=Object.assign({},t),i=e.project.projectService.logger;function o(e,t){try{return t()}catch(t){return i.info("Failed to "+e+": "+t.toString()),i.info("Stack trace: "+t.stack),null}}var s=new hT(e.languageServiceHost,t),a=yd(s);return vT.set(e.project,s),r.getCompletionsAtPosition=function(e,n,r){var i=t.getCompletionsAtPosition(e,n,r)||{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:[]};return o("get completions",function(){var t,r,o,s=a.getCompletionsAt(e,n);if(s&&s.length){void 0===i&&(i={isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:[]});try{for(var u=p(s),l=u.next();!l.done;l=u.next())i.entries.push({kind:(o=l.value).kind,name:o.name,sortText:o.sort,kindModifiers:""})}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}}}),i},r.getQuickInfoAtPosition=function(e,r){var i=t.getQuickInfoAtPosition(e,r),o=a.getHoverAt(e,r);if(!o)return i;var s={kind:n.ScriptElementKind.unknown,kindModifiers:n.ScriptElementKindModifier.none,textSpan:{start:o.span.start,length:o.span.end-o.span.start},displayParts:o.text.map(function(e){return{text:e.text,kind:e.language||"angular"}}),documentation:[]};return i&&i.tags&&(s.tags=i.tags),s},r.getSemanticDiagnostics=function(e){var r=t.getSemanticDiagnostics(e)||[];return o("get diagnostics",function(){i.info("Computing Angular semantic diagnostics...");var o=a.getDiagnostics(e);if(o&&o.length){var s=t.getProgram().getSourceFile(e);s&&r.push.apply(r,o.map(function(e){return function t(e,r){return{file:r,start:e.span.start,length:e.span.end-e.span.start,messageText:(i=e.message,"string"==typeof i?i:function e(t){return{messageText:t.message,category:n.DiagnosticCategory.Error,code:0,next:t.next?e(t.next):void 0}}(i)),category:n.DiagnosticCategory.Error,code:0,source:"ng"};var i}(e,s)}))}}),r},r.getDefinitionAtPosition=function(e,r){var i=t.getDefinitionAtPosition(e,r);if(i&&i.length)return i;var o=a.getDefinitionAt(e,r);return o&&o.length?o.map(function(e){return{fileName:e.fileName,textSpan:{start:e.span.start,length:e.span.end-e.span.start},name:"",kind:n.ScriptElementKind.unknown,containerName:e.fileName,containerKind:n.ScriptElementKind.unknown}}):void 0},r.getDefinitionAndBoundSpan=function(e,r){var i=t.getDefinitionAndBoundSpan(e,r);if(i&&i.definitions&&i.definitions.length)return i;var o=a.getDefinitionAt(e,r);return o&&o.length?{definitions:o.map(function(e){return{fileName:e.fileName,textSpan:{start:e.span.start,length:e.span.end-e.span.start},name:"",kind:n.ScriptElementKind.unknown,containerName:e.fileName,containerKind:n.ScriptElementKind.unknown}}),textSpan:{start:o[0].span.start,length:o[0].span.end-o[0].span.start}}:void 0},r}
|
|
1986
1986
|
/**
|
|
1987
1987
|
* @license
|
|
1988
1988
|
* Copyright Google Inc. All Rights Reserved.
|