1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2024-12-27 10:32:24 +01:00
LocalCDN-Firefox-Chrome-Brave/resources/angular.js/1.5.11/angular-message-format.min.jsm
2021-02-01 06:10:04 +01:00

27 lines
10 KiB
JavaScript

/*
AngularJS v1.5.11
(c) 2010-2017 Google, Inc. http://angularjs.org
License: MIT
*/
(function(k){'use strict';function E(a){if(null==a)return"";switch(typeof a){case "string":return a;case "number":return""+a;default:return w(a)}}function f(a,b){for(var c=a.split(/\n/g),n=0;n<c.length;n++){var d=c[n];if(b>=d.length)b-=d.length;else return{h:n+1,f:b+1}}}function x(a){function b(){return a}var c=y[a];if(null!=c)return c;b.$$watchDelegate=function(b,c,d){var e=b.$watch(r,function(){l(c)&&c(a,a,b);e()},d);return e};y[a]=b;b.exp=a;b.expressions=[];return b}function F(a,b){function c(c){c=
a(c);return null==c?c:c-b}if(0===b)return a;var d;c.$$watchDelegate=function(c,p,e){return d=c.$watch(a,function(a,d){l(p)&&p(null==a?a:a-b,null==d?d:d-b,c)},e)};return c}function h(a,b){var c=this;this.b=a;this.e=b;if(void 0===b.other)throw e("reqother");this.d=function(a){return c.D(a)};this.d.$$watchDelegate=function(a,b,d){return c.P(a,b,d)};this.d.exp=a.exp;this.d.expressions=a.expressions}function q(a,b,c,d){var e=this;this.scope=b;this.oa=a;this.v=c;this.qa=d;this.U=void 0;this.K=r;this.ka=
b.$watch(a.b,function(a){return e.ja(a)},d)}function s(a,b){h.call(this,a,b)}function z(){}function t(a,b,c,d){h.call(this,a,b);this.offset=c;this.M=d}function A(){}function g(a,b){this.u=a;this.B=b;this.i=[];this.g=[];this.J=[];this.s="";this.q=null}function u(a,b,c){this.c=a;this.scope=b;this.W=void 0;this.v=c;var d=this;this.la=b.$watchGroup(a.g,function(a,b){d.Ea(a,b)})}function v(a,b){b.b=a.b;b.C=a.C;b.w=a.w;b.e=a.e;b.k=a.k;b.c=a.c;b.n=a.n;b.F=a.F;b.l=a.l}function B(a){v(a,this)}function d(a,
b,c,d,e,p,f,g){this.text=a;this.index=b||0;this.A=c;this.M=d;this.Da=e;this.pa=!!p;this.u=f;this.B=!!g;this.F=this.c=this.k=this.e=this.w=this.C=this.b=null;this.L=[];this.G=this.j=this.ca=this.O=this.da=this.l=this.n=this.o=this.a=this.d=null}function C(a){switch(a){case "{":return"}";case "[":return"]";case "(":return")";default:return null}}function G(a){switch(a){case "}":return"{";case "]":return"[";case ")":return"(";default:return null}}var y=Object.create(null);h.prototype.T=function(a){return this.e[this.R(a)]};
h.prototype.D=function(a){return this.T(this.b(a))(a)};h.prototype.P=function(a,b,c){var d=new q(this,a,b,c);return function(){d.I()}};q.prototype.ja=function(a){var b=this;this.K();a=this.oa.T(a);this.K=this.scope.$watch(a,function(a,d){return b.na(a,d)},this.qa)};q.prototype.na=function(a,b){l(this.v)&&this.v.call(null,a,a===b?a:this.U,this.scope);this.U=a};q.prototype.I=function(){this.ka();this.K()};z.prototype=h.prototype;s.prototype=new z;s.prototype.R=function(a){return void 0!==this.e[a]?
a:"other"};A.prototype=h.prototype;t.prototype=new A;t.prototype.R=function(a){if(isNaN(a))return"other";if(void 0!==this.e[a])return a;a=this.M(a-this.offset);return void 0!==this.e[a]?a:"other"};g.prototype.S=function(){this.s&&(null==this.q?this.i.push(this.s):(this.i.push(this.q.join("")),this.q=null),this.s="")};g.prototype.p=function(a){a.length&&(this.s?this.q?this.q.push(a):this.q=[this.s,a]:this.s=a)};g.prototype.H=function(a){this.S();this.J.push(this.i.length);this.g.push(a);this.i.push("")};
g.prototype.ma=function(a){for(var b=Array(this.g.length),c=0;c<this.g.length;c++)b[c]=this.g[c](a);return b};g.prototype.D=function(a){for(var b=0;b<this.J.length;b++){var c=a[b];if(this.B&&void 0===c)return;this.i[this.J[b]]=c}return this.i.join("")};g.prototype.ea=function(a,b){var c=this;this.S();if(!a||0!==this.g.length){if(0===this.i.length)return x("");this.u&&1<this.i.length&&e.throwNoconcat(b);if(0===this.g.length)return 1!==this.i.length&&this.r(),x(this.i[0]);var d=function(a){return c.D(c.ma(a))};
d.$$watchDelegate=function(a,b,d){return c.P(a,b,d)};d.exp=b;d.expressions=Array(this.g.length);for(var f=0;f<this.g.length;f++)d.expressions[f]=this.g[f].exp;return d}};g.prototype.P=function(a,b){var c=new u(this,a,b);return function(){c.I()}};u.prototype.Ea=function(a,b){var c=this.c.D(a);l(this.v)&&this.v.call(null,c,a===b?c:this.W,this.scope);this.W=c};u.prototype.I=function(){this.la()};var H=new B(new d("",0,null,null,null,!1,null,!1));d.prototype.pushState=function(){this.L.push(new B(this));
v(H,this)};d.prototype.V=function(){0===this.L.length&&this.r();var a=this.L.pop();v(a,this)};d.prototype.m=function(a,b){a.lastIndex=this.index;var c=a.exec(this.text);return null==c||!0!==b&&c.index!==this.index?null:(this.index=a.lastIndex,c)};d.prototype.t=function(a){return this.m(a,!0)};d.prototype.ha=function(a){return!!this.m(a)};d.prototype.Ba=function(a){this.o=[a];do{for(this.a=this.o.pop();this.a;)this.a();this.ga(this.a)}while(0<this.o.length)};d.prototype.r=function(){throw e("logicbug",
this.text);};d.prototype.ga=function(a){void 0===a&&this.r()};var I=/\s*(\w+)\s*/g;d.prototype.ia=function(){var a=this.m(I);if(null==a)throw a=f(this.text,this.index),e("reqarg",a.h,a.f,this.text);var b=a[1];if("select"===b||"plural"===b)throw a=f(this.text,this.index),e("reqcomma",b,a.h,a.f,this.text);a=f(this.text,this.index);throw e("unknarg",b,a.h,a.f,this.text);};d.prototype.Ca=function(a){this.da=a.index;this.O=a[0];this.ca="'"===this.O?J:K;this.a=this.ua};var J=/\\(?:\\|'|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{2}|[0-7]{3}|\r\n|\n|[\s\S])|'/g,
K=/\\(?:\\|"|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{2}|[0-7]{3}|\r\n|\n|[\s\S])|"/g;d.prototype.ua=function(){var a=this.t(this.ca);if(null==a)throw a=f(this.text,this.da),e("untermstr",a.h,a.f,this.text);a[0]===this.O&&(this.a=null)};var L=/\s*(plural|select)\s*,\s*/g;d.prototype.ya=function(){var a=this.t(L);null==a&&this.ia();switch(a[1]){case "plural":this.a=this.za;break;case "select":this.a=this.Aa;break;default:this.r()}};d.prototype.za=function(){this.e=Object.create(null);this.n=this.N;this.a=this.xa};
d.prototype.Aa=function(){this.e=Object.create(null);this.a=this.n=this.ba};var m=/[0]|(?:[1-9][0-9]*)/g,M=new RegExp("\\s*offset\\s*:\\s*("+m.source+")","g");d.prototype.xa=function(){var a=this.m(M);this.w=null==a?0:parseInt(a[1],10);this.C=F(this.b,this.w);this.a=this.N};d.prototype.Q=function(a,b){if(void 0!==this.e[a]){var c=f(this.text,b);throw e("dupvalue",a,c.h,c.f,this.text);}};var N=/\s*(\w+)/g;d.prototype.ba=function(){var a=this.m(N);null==a?(this.d=(new s(this.b,this.e)).d,this.a=null):
(this.k=a[1],this.Q(this.k,a.index),this.a=this.aa)};var O=new RegExp("\\s*(?:(?:=("+m.source+"))|(\\w+))","g");d.prototype.N=function(){var a=this.m(O);null==a?(this.d=(new t(this.b,this.e,this.w,this.M)).d,this.a=null):(this.k=null!=a[1]?parseInt(a[1],10):a[2],this.Q(this.k,a.index),this.a=this.aa)};var P=/\s*\{/g;d.prototype.aa=function(){if(!this.ha(P)){var a=f(this.text,this.index);throw e("reqopenbrace",this.k,a.h,a.f,this.text);}this.F=this.index;this.c=new g(this.u,this.B);this.a=this.$};
var Q=/\\.|{{|}/g,R=/\\.|{{|#|}/g,D=/\\.|{{/g;d.prototype.fa=function(){var a=this.index,b;if(null==this.n){if(b=this.t(D),null==b)return this.G=this.text.substring(a),this.index=this.text.length,null}else if(b=this.t(this.n===this.N?R:Q),null==b)throw a=f(this.text,this.F),e("reqendbrace",this.k,a.h,a.f,this.text);var c=b[0];this.G=this.text.substring(a,b.index);return c};d.prototype.$=function(){var a=this.index,b=this.fa();null==b?(this.index=this.text.length,this.c.p(this.text.substring(a)),this.a=
null):"\\"===b[0]?this.c.p(this.G+b[1]):(this.c.p(this.G),"{{"===b?(this.pushState(),this.o.push(this.ta),this.a=this.X):"}"===b?(this.e[this.k]=this.c.ea(!1,this.text),this.a=this.n):"#"===b?this.c.H(this.C):this.r())};d.prototype.va=function(){this.c=new g(this.u,this.B);this.a=this.Z};d.prototype.Z=function(){var a=this.index,b=this.t(D);if(null==b)this.index=this.text.length,this.c.p(this.text.substring(a)),this.d=this.c.ea(this.pa,this.text),this.a=null;else{var c=b[0];"\\"===c[0]?this.c.p(this.text.substring(a,
b.index)+c[1]):(this.c.p(this.text.substring(a,b.index)),this.pushState(),this.o.push(this.wa),this.a=this.X)}};d.prototype.wa=function(){var a=this.d;this.V();this.c.H(a);this.a=this.Z};d.prototype.X=function(){this.d=null;this.o.push(this.sa);this.a=this.ra};d.prototype.ta=function(){var a=this.d;this.V();this.c.H(a);this.a=this.$};var S=/\s*}}/g;d.prototype.sa=function(){if(null==this.m(S)){var a=f(this.text,this.index);throw e("reqendinterp","}}",a.h,a.f,this.text);}null==this.d&&(this.d=this.A(this.b,
this.Da),this.d.exp=this.b.exp,this.d.expressions=this.b.expressions);this.a=null};d.prototype.ra=function(){this.j=[];this.l=this.index;this.a=this.Y};var T=/[[\]{}()'",]/g;d.prototype.Y=function(){var a=this.t(T);if(null==a){if(0===this.j.length){this.index=this.text.length;this.b=this.A(this.text.substring(this.l,this.index));this.b.exp=this.text.substring(this.l,this.index);this.b.expressions=this.b.expressions;this.a=null;return}throw e("badexpr",this.Ga(this.j[0]),this.text);}var b=a[0];if("'"===
b||'"'===b)this.o.push(this.Y),this.Ca(a);else if(","===b){if(this.u)throw a=f(this.text,this.index),e("unsafe",this.u,a.h,a.f,this.text);0===this.j.length&&(this.b=this.A(this.text.substring(this.l,a.index)),this.b.exp=this.text.substring(this.l,a.index),this.b.expressions=this.b.expressions,this.a=null,this.a=this.ya)}else if(null!=C(b))this.j.unshift(b);else{var c=G(b);null==c&&this.r();if(0<this.j.length){if(c===this.j[0]){this.j.shift();return}a=f(this.text,this.index);throw e("badexpr",b,a.h,
a.f,C(this.j[0]),this.text);}this.index=a.index;this.b=this.A(this.text.substring(this.l,this.index));this.b.exp=this.text.substring(this.l,this.index);this.b.expressions=this.b.expressions;this.a=null}};var U=["$$messageFormat","$delegate",function(a,b){if("{{"!==b.startSymbol()||"}}"!==b.endSymbol())throw e("nochgmustache");var c=a.interpolate;c.startSymbol=b.startSymbol;c.endSymbol=b.endSymbol;return c}],e,l,r,w,m=k.angular.module("ngMessageFormat",["ng"]);m.factory("$$messageFormat",["$parse",
"$locale","$sce","$exceptionHandler",function(a,b,c,f){function g(a,b,d){return function(g){try{return g=a?c.getTrusted(a,g):c.valueOf(g),b&&void 0===g?g:E(g)}catch(h){f(e.interr(d,h))}}}return{interpolate:function(c,e,f,h){c=new d(c,0,a,b.pluralCat,g(f,h,c),e,f,h);c.Ba(c.va);return c.d}}}]);m.config(["$provide",function(a){e=k.angular.$interpolateMinErr;l=k.angular.isFunction;r=k.angular.noop;w=k.angular.toJson;a.decorator("$interpolate",U)}])})(window,window.Fa);
//# sourceMappingURL=angular-message-format.min.js.map