1 | (function (global, factory) {
|
2 | typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core')) :
|
3 | typeof define === 'function' && define.amd ? define('ngx-pipes', ['exports', '@angular/core'], factory) :
|
4 | (global = global || self, factory(global['ngx-pipes'] = {}, global.ng.core));
|
5 | }(this, function (exports, core) { 'use strict';
|
6 |
|
7 | |
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | var extendStatics = function(d, b) {
|
24 | extendStatics = Object.setPrototypeOf ||
|
25 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
26 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
27 | return extendStatics(d, b);
|
28 | };
|
29 |
|
30 | function __extends(d, b) {
|
31 | extendStatics(d, b);
|
32 | function __() { this.constructor = d; }
|
33 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
34 | }
|
35 |
|
36 | function __decorate(decorators, target, key, desc) {
|
37 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
38 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
39 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
40 | return c > 3 && r && Object.defineProperty(target, key, r), r;
|
41 | }
|
42 |
|
43 | function __read(o, n) {
|
44 | var m = typeof Symbol === "function" && o[Symbol.iterator];
|
45 | if (!m) return o;
|
46 | var i = m.call(o), r, ar = [], e;
|
47 | try {
|
48 | while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
49 | }
|
50 | catch (error) { e = { error: error }; }
|
51 | finally {
|
52 | try {
|
53 | if (r && !r.done && (m = i["return"])) m.call(i);
|
54 | }
|
55 | finally { if (e) throw e.error; }
|
56 | }
|
57 | return ar;
|
58 | }
|
59 |
|
60 | function __spread() {
|
61 | for (var ar = [], i = 0; i < arguments.length; i++)
|
62 | ar = ar.concat(__read(arguments[i]));
|
63 | return ar;
|
64 | }
|
65 |
|
66 | var DiffPipe = (function () {
|
67 | function DiffPipe() {
|
68 | }
|
69 | DiffPipe.prototype.transform = function (input) {
|
70 | var args = [];
|
71 | for (var _i = 1; _i < arguments.length; _i++) {
|
72 | args[_i - 1] = arguments[_i];
|
73 | }
|
74 | if (!Array.isArray(input)) {
|
75 | return input;
|
76 | }
|
77 |
|
78 | return args.reduce(function (d, c) { return d.filter(function (e) { return !~c.indexOf(e); }); }, input);
|
79 | };
|
80 | DiffPipe = __decorate([
|
81 | core.Pipe({ name: 'diff' })
|
82 | ], DiffPipe);
|
83 | return DiffPipe;
|
84 | }());
|
85 |
|
86 | var InitialPipe = (function () {
|
87 | function InitialPipe() {
|
88 | }
|
89 | InitialPipe.prototype.transform = function (input, num) {
|
90 | if (num === void 0) { num = 0; }
|
91 | return Array.isArray(input) ? input.slice(0, input.length - num) : input;
|
92 | };
|
93 | InitialPipe = __decorate([
|
94 | core.Pipe({ name: 'initial' })
|
95 | ], InitialPipe);
|
96 | return InitialPipe;
|
97 | }());
|
98 |
|
99 | var FlattenPipe = (function () {
|
100 | function FlattenPipe() {
|
101 | }
|
102 | FlattenPipe.prototype.transform = function (input, shallow) {
|
103 | if (shallow === void 0) { shallow = false; }
|
104 | if (!Array.isArray(input)) {
|
105 | return input;
|
106 | }
|
107 | return shallow ? [].concat.apply([], input) : this.flatten(input);
|
108 | };
|
109 | FlattenPipe.prototype.flatten = function (array) {
|
110 | var _this = this;
|
111 | return array.reduce(function (arr, elm) {
|
112 | if (Array.isArray(elm)) {
|
113 | return arr.concat(_this.flatten(elm));
|
114 | }
|
115 | return arr.concat(elm);
|
116 | }, []);
|
117 | };
|
118 | FlattenPipe = __decorate([
|
119 | core.Pipe({ name: 'flatten' })
|
120 | ], FlattenPipe);
|
121 | return FlattenPipe;
|
122 | }());
|
123 |
|
124 | var IntersectionPipe = (function () {
|
125 | function IntersectionPipe() {
|
126 | }
|
127 | IntersectionPipe.prototype.transform = function (input) {
|
128 | var args = [];
|
129 | for (var _i = 1; _i < arguments.length; _i++) {
|
130 | args[_i - 1] = arguments[_i];
|
131 | }
|
132 | if (!Array.isArray(input)) {
|
133 | return input;
|
134 | }
|
135 |
|
136 | return args.reduce(function (n, c) { return n.filter(function (e) { return !!~c.indexOf(e); }); }, input);
|
137 | };
|
138 | IntersectionPipe = __decorate([
|
139 | core.Pipe({ name: 'intersection' })
|
140 | ], IntersectionPipe);
|
141 | return IntersectionPipe;
|
142 | }());
|
143 |
|
144 | function isUndefined(value) {
|
145 | return typeof value === 'undefined';
|
146 | }
|
147 | function isFunction(value) {
|
148 | return typeof value === 'function';
|
149 | }
|
150 | function isNumber(value) {
|
151 | return typeof value === 'number';
|
152 | }
|
153 | function isString(value) {
|
154 | return typeof value === 'string';
|
155 | }
|
156 | function isBoolean(value) {
|
157 | return typeof value === 'boolean';
|
158 | }
|
159 | function isObject(value) {
|
160 | return value !== null && typeof value === 'object';
|
161 | }
|
162 | function isNumberFinite(value) {
|
163 | return isNumber(value) && isFinite(value);
|
164 | }
|
165 | function isVowel(letter) {
|
166 | var vowels = ['a', 'e', 'i', 'o', 'u'];
|
167 | return vowels.indexOf(letter) !== -1;
|
168 | }
|
169 | function ucFirst(text) {
|
170 | var _a = __read(text.split(/\s/g)), part = _a[0], split = _a.slice(1);
|
171 | var ucd = part
|
172 | .toLowerCase()
|
173 | .split(/(?=['|-])/g)
|
174 | .map(function (word) {
|
175 | return word.indexOf('-') + word.indexOf("'") > -2
|
176 | ? word.slice(0, 2).toUpperCase() + word.slice(2)
|
177 | : word.slice(0, 1).toUpperCase() + word.slice(1);
|
178 | })
|
179 | .join('');
|
180 | return __spread([ucd], split).join(' ');
|
181 | }
|
182 | function applyPrecision(num, precision) {
|
183 | if (precision <= 0) {
|
184 | return Math.round(num);
|
185 | }
|
186 | var tho = Math.pow(10, precision);
|
187 | return Math.round(num * tho) / tho;
|
188 | }
|
189 | function extractDeepPropertyByMapKey(obj, map) {
|
190 | var keys = map.split('.');
|
191 | var head = keys.shift();
|
192 | return keys.reduce(function (prop, key) {
|
193 | return !isUndefined(prop) && !isUndefined(prop[key]) ? prop[key] : undefined;
|
194 | }, obj[head || '']);
|
195 | }
|
196 | function extractDeepPropertyByParentMapKey(obj, map) {
|
197 | var keys = map.split('.');
|
198 | var tail = keys.pop();
|
199 | var props = extractDeepPropertyByMapKey(obj, keys.join('.'));
|
200 | return { props: props, tail: tail };
|
201 | }
|
202 | function getKeysTwoObjects(obj, other) {
|
203 | return __spread(Object.keys(obj), Object.keys(other)).filter(function (key, index, array) { return array.indexOf(key) === index; });
|
204 | }
|
205 | function isDeepEqual(obj, other) {
|
206 | if (!isObject(obj) || !isObject(other)) {
|
207 | return obj === other;
|
208 | }
|
209 | return getKeysTwoObjects(obj, other).every(function (key) {
|
210 | if (!isObject(obj[key]) && !isObject(other[key])) {
|
211 | return obj[key] === other[key];
|
212 | }
|
213 | if (!isObject(obj[key]) || !isObject(other[key])) {
|
214 | return false;
|
215 | }
|
216 | return isDeepEqual(obj[key], other[key]);
|
217 | });
|
218 | }
|
219 |
|
220 | var ReversePipe = (function () {
|
221 | function ReversePipe() {
|
222 | }
|
223 | ReversePipe.prototype.transform = function (input) {
|
224 | if (isString(input)) {
|
225 | return input
|
226 | .split('')
|
227 | .reverse()
|
228 | .join('');
|
229 | }
|
230 | return Array.isArray(input) ? input.slice().reverse() : input;
|
231 | };
|
232 | ReversePipe = __decorate([
|
233 | core.Pipe({ name: 'reverse' })
|
234 | ], ReversePipe);
|
235 | return ReversePipe;
|
236 | }());
|
237 |
|
238 | var TailPipe = (function () {
|
239 | function TailPipe() {
|
240 | }
|
241 | TailPipe.prototype.transform = function (input, num) {
|
242 | if (num === void 0) { num = 0; }
|
243 | return Array.isArray(input) ? input.slice(num) : input;
|
244 | };
|
245 | TailPipe = __decorate([
|
246 | core.Pipe({ name: 'tail' })
|
247 | ], TailPipe);
|
248 | return TailPipe;
|
249 | }());
|
250 |
|
251 | var TrurthifyPipe = (function () {
|
252 | function TrurthifyPipe() {
|
253 | }
|
254 | TrurthifyPipe.prototype.transform = function (input) {
|
255 | return Array.isArray(input) ? input.filter(function (e) { return !!e; }) : input;
|
256 | };
|
257 | TrurthifyPipe = __decorate([
|
258 | core.Pipe({ name: 'truthify' })
|
259 | ], TrurthifyPipe);
|
260 | return TrurthifyPipe;
|
261 | }());
|
262 |
|
263 | var UnionPipe = (function () {
|
264 | function UnionPipe() {
|
265 | }
|
266 | UnionPipe.prototype.transform = function (input, args) {
|
267 | if (args === void 0) { args = []; }
|
268 | if (!Array.isArray(input) || !Array.isArray(args)) {
|
269 | return input;
|
270 | }
|
271 | return args.reduce(function (newArr, currArr) {
|
272 | return newArr.concat(currArr.reduce(function (noDupArr, curr) {
|
273 |
|
274 | return !~noDupArr.indexOf(curr) && !~newArr.indexOf(curr) ? noDupArr.concat([curr]) : noDupArr;
|
275 | }, []));
|
276 | }, input);
|
277 | };
|
278 | UnionPipe = __decorate([
|
279 | core.Pipe({ name: 'union' })
|
280 | ], UnionPipe);
|
281 | return UnionPipe;
|
282 | }());
|
283 |
|
284 | var UniquePipe = (function () {
|
285 | function UniquePipe() {
|
286 | }
|
287 | UniquePipe.prototype.transform = function (input, propertyName) {
|
288 | var uniques = [];
|
289 | return Array.isArray(input)
|
290 | ? isUndefined(propertyName)
|
291 | ? input.filter(function (e, i) { return input.indexOf(e) === i; })
|
292 | : input.filter(function (e, i) {
|
293 | var value = extractDeepPropertyByMapKey(e, propertyName);
|
294 | value = isObject(value) ? JSON.stringify(value) : value;
|
295 | if (isUndefined(value) || uniques[value]) {
|
296 | return false;
|
297 | }
|
298 | uniques[value] = true;
|
299 | return true;
|
300 | })
|
301 | : input;
|
302 | };
|
303 | UniquePipe = __decorate([
|
304 | core.Pipe({ name: 'unique' })
|
305 | ], UniquePipe);
|
306 | return UniquePipe;
|
307 | }());
|
308 |
|
309 | var WithoutPipe = (function () {
|
310 | function WithoutPipe() {
|
311 | }
|
312 | WithoutPipe.prototype.transform = function (input, args) {
|
313 | if (args === void 0) { args = []; }
|
314 | return Array.isArray(input)
|
315 | ?
|
316 | input.filter(function (e) { return !~args.indexOf(e); })
|
317 | : input;
|
318 | };
|
319 | WithoutPipe = __decorate([
|
320 | core.Pipe({ name: 'without' })
|
321 | ], WithoutPipe);
|
322 | return WithoutPipe;
|
323 | }());
|
324 |
|
325 | var PluckPipe = (function () {
|
326 | function PluckPipe() {
|
327 | }
|
328 | PluckPipe.prototype.transform = function (input, map) {
|
329 | if (Array.isArray(input)) {
|
330 | return input.map(function (e) { return extractDeepPropertyByMapKey(e, map); });
|
331 | }
|
332 | return isObject(input) ? extractDeepPropertyByMapKey(input, map) : input;
|
333 | };
|
334 | PluckPipe = __decorate([
|
335 | core.Pipe({ name: 'pluck', pure: false })
|
336 | ], PluckPipe);
|
337 | return PluckPipe;
|
338 | }());
|
339 |
|
340 | var ShufflePipe = (function () {
|
341 | function ShufflePipe() {
|
342 | }
|
343 |
|
344 |
|
345 | ShufflePipe.prototype.transform = function (input) {
|
346 | var _a;
|
347 | if (!Array.isArray(input)) {
|
348 | return input;
|
349 | }
|
350 | var shuffled = __spread(input);
|
351 | var n = input.length - 1;
|
352 | for (var i = 0; i < n; ++i) {
|
353 | var j = Math.floor(Math.random() * (n - i + 1)) + i;
|
354 | _a = __read([shuffled[j], shuffled[i]], 2), shuffled[i] = _a[0], shuffled[j] = _a[1];
|
355 | }
|
356 | return shuffled;
|
357 | };
|
358 | ShufflePipe = __decorate([
|
359 | core.Pipe({ name: 'shuffle' })
|
360 | ], ShufflePipe);
|
361 | return ShufflePipe;
|
362 | }());
|
363 |
|
364 | var EveryPipe = (function () {
|
365 | function EveryPipe() {
|
366 | }
|
367 | EveryPipe.prototype.transform = function (input, predicate) {
|
368 | return Array.isArray(input) ? input.every(predicate) : false;
|
369 | };
|
370 | EveryPipe = __decorate([
|
371 | core.Pipe({ name: 'every' })
|
372 | ], EveryPipe);
|
373 | return EveryPipe;
|
374 | }());
|
375 |
|
376 | var SomePipe = (function () {
|
377 | function SomePipe() {
|
378 | }
|
379 | SomePipe.prototype.transform = function (input, predicate) {
|
380 | return Array.isArray(input) ? input.some(predicate) : input;
|
381 | };
|
382 | SomePipe = __decorate([
|
383 | core.Pipe({ name: 'some' })
|
384 | ], SomePipe);
|
385 | return SomePipe;
|
386 | }());
|
387 |
|
388 | var SamplePipe = (function () {
|
389 | function SamplePipe() {
|
390 | }
|
391 | SamplePipe.prototype.transform = function (input, len) {
|
392 | if (len === void 0) { len = 1; }
|
393 | if (!Array.isArray(input)) {
|
394 | return input;
|
395 | }
|
396 | var sample = [];
|
397 | var tmp = __spread(input);
|
398 | var l = len < tmp.length ? len : tmp.length;
|
399 | for (var i = 0; i < l; ++i) {
|
400 | sample = sample.concat(tmp.splice(Math.floor(Math.random() * tmp.length), 1));
|
401 | }
|
402 | return sample;
|
403 | };
|
404 | SamplePipe = __decorate([
|
405 | core.Pipe({ name: 'sample' })
|
406 | ], SamplePipe);
|
407 | return SamplePipe;
|
408 | }());
|
409 |
|
410 | var GroupByPipe = (function () {
|
411 | function GroupByPipe() {
|
412 | }
|
413 | GroupByPipe.prototype.transform = function (input, discriminator, delimiter) {
|
414 | if (discriminator === void 0) { discriminator = []; }
|
415 | if (delimiter === void 0) { delimiter = '|'; }
|
416 | if (!Array.isArray(input)) {
|
417 | return input;
|
418 | }
|
419 | return this.groupBy(input, discriminator, delimiter);
|
420 | };
|
421 | GroupByPipe.prototype.groupBy = function (list, discriminator, delimiter) {
|
422 | var _this = this;
|
423 | return list.reduce(function (acc, payload) {
|
424 | var key = _this.extractKeyByDiscriminator(discriminator, payload, delimiter);
|
425 | acc[key] = Array.isArray(acc[key]) ? acc[key].concat([payload]) : [payload];
|
426 | return acc;
|
427 | }, {});
|
428 | };
|
429 | GroupByPipe.prototype.extractKeyByDiscriminator = function (discriminator, payload, delimiter) {
|
430 | if (isFunction(discriminator)) {
|
431 | return discriminator(payload);
|
432 | }
|
433 | if (Array.isArray(discriminator)) {
|
434 | return discriminator.map(function (k) { return extractDeepPropertyByMapKey(payload, k); }).join(delimiter);
|
435 | }
|
436 | return extractDeepPropertyByMapKey(payload, discriminator);
|
437 | };
|
438 | GroupByPipe = __decorate([
|
439 | core.Pipe({ name: 'groupBy' })
|
440 | ], GroupByPipe);
|
441 | return GroupByPipe;
|
442 | }());
|
443 |
|
444 |
|
445 | var FilterByPipe = (function () {
|
446 | function FilterByPipe() {
|
447 | }
|
448 | FilterByPipe.prototype.transform = function (input, props, search, strict) {
|
449 | if (search === void 0) { search = ''; }
|
450 | if (strict === void 0) { strict = false; }
|
451 | if (!Array.isArray(input) ||
|
452 | (!Array.isArray(search) && !isString(search) && !isNumberFinite(search) && !isBoolean(search))) {
|
453 | return input;
|
454 | }
|
455 | var terms = String(search)
|
456 | .toLowerCase()
|
457 | .split(',');
|
458 | return input.filter(function (obj) {
|
459 | return props.some(function (prop) {
|
460 | return terms.some(function (term) {
|
461 | var value = extractDeepPropertyByMapKey(obj, prop);
|
462 |
|
463 | var _a = extractDeepPropertyByParentMapKey(obj, prop), props = _a.props, tail = _a.tail;
|
464 | if (isUndefined(value) && !isUndefined(props) && Array.isArray(props)) {
|
465 | return props.some(function (parent) {
|
466 | var str = String(parent[tail]).toLowerCase();
|
467 | return strict ? str === term : !!~str.indexOf(term);
|
468 | });
|
469 | }
|
470 | if (isUndefined(value)) {
|
471 | return false;
|
472 | }
|
473 | var strValue = String(value).toLowerCase();
|
474 | return strict ? term === strValue : !!~strValue.indexOf(term);
|
475 | });
|
476 | });
|
477 | });
|
478 | };
|
479 | FilterByPipe = __decorate([
|
480 | core.Pipe({ name: 'filterBy' })
|
481 | ], FilterByPipe);
|
482 | return FilterByPipe;
|
483 | }());
|
484 |
|
485 | var OrderByPipe = (function () {
|
486 | function OrderByPipe() {
|
487 | }
|
488 | OrderByPipe_1 = OrderByPipe;
|
489 | OrderByPipe.prototype.transform = function (input, config) {
|
490 | if (!Array.isArray(input)) {
|
491 | return input;
|
492 | }
|
493 | var out = __spread(input);
|
494 |
|
495 | if (Array.isArray(config)) {
|
496 | return out.sort(function (a, b) {
|
497 | var l = config.length;
|
498 | for (var i = 0; i < l; ++i) {
|
499 | var _a = __read(OrderByPipe_1.extractFromConfig(config[i]), 2), prop = _a[0], asc = _a[1];
|
500 | var pos = OrderByPipe_1.orderCompare(prop, asc, a, b);
|
501 | if (pos !== 0) {
|
502 | return pos;
|
503 | }
|
504 | }
|
505 | return 0;
|
506 | });
|
507 | }
|
508 |
|
509 | if (isString(config)) {
|
510 | var _a = __read(OrderByPipe_1.extractFromConfig(config), 3), prop = _a[0], asc = _a[1], sign = _a[2];
|
511 | if (config.length === 1) {
|
512 |
|
513 | switch (sign) {
|
514 | case '+':
|
515 | return out.sort(OrderByPipe_1.simpleSort.bind(this));
|
516 | case '-':
|
517 | return out.sort(OrderByPipe_1.simpleSort.bind(this)).reverse();
|
518 | }
|
519 | }
|
520 | return out.sort(OrderByPipe_1.orderCompare.bind(this, prop, asc));
|
521 | }
|
522 |
|
523 | return out.sort(OrderByPipe_1.simpleSort.bind(this));
|
524 | };
|
525 | OrderByPipe.simpleSort = function (a, b) {
|
526 | return isString(a) && isString(b) ? a.toLowerCase().localeCompare(b.toLowerCase()) : a - b;
|
527 | };
|
528 | OrderByPipe.orderCompare = function (prop, asc, a, b) {
|
529 | var first = extractDeepPropertyByMapKey(a, prop);
|
530 | var second = extractDeepPropertyByMapKey(b, prop);
|
531 | if (first === second) {
|
532 | return 0;
|
533 | }
|
534 | if (isUndefined(first) || first === '') {
|
535 | return 1;
|
536 | }
|
537 | if (isUndefined(second) || second === '') {
|
538 | return -1;
|
539 | }
|
540 | if (isString(first) && isString(second)) {
|
541 | var pos = first.toLowerCase().localeCompare(second.toLowerCase());
|
542 | return asc ? pos : -pos;
|
543 | }
|
544 | return asc ? first - second : second - first;
|
545 | };
|
546 | OrderByPipe.extractFromConfig = function (config) {
|
547 | var sign = config.substr(0, 1);
|
548 | var prop = config.replace(/^[-+]/, '');
|
549 | var asc = sign !== '-';
|
550 | return [prop, asc, sign];
|
551 | };
|
552 | var OrderByPipe_1;
|
553 | OrderByPipe = OrderByPipe_1 = __decorate([
|
554 | core.Pipe({ name: 'orderBy' })
|
555 | ], OrderByPipe);
|
556 | return OrderByPipe;
|
557 | }());
|
558 |
|
559 |
|
560 | var GroupByImpurePipe = (function (_super) {
|
561 | __extends(GroupByImpurePipe, _super);
|
562 | function GroupByImpurePipe() {
|
563 | return _super !== null && _super.apply(this, arguments) || this;
|
564 | }
|
565 | GroupByImpurePipe = __decorate([
|
566 | core.Pipe({ name: 'groupByImpure', pure: false })
|
567 | ], GroupByImpurePipe);
|
568 | return GroupByImpurePipe;
|
569 | }(GroupByPipe));
|
570 |
|
571 |
|
572 | var FilterByImpurePipe = (function (_super) {
|
573 | __extends(FilterByImpurePipe, _super);
|
574 | function FilterByImpurePipe() {
|
575 | return _super !== null && _super.apply(this, arguments) || this;
|
576 | }
|
577 | FilterByImpurePipe = __decorate([
|
578 | core.Pipe({ name: 'filterByImpure', pure: false })
|
579 | ], FilterByImpurePipe);
|
580 | return FilterByImpurePipe;
|
581 | }(FilterByPipe));
|
582 |
|
583 |
|
584 | var OrderByImpurePipe = (function (_super) {
|
585 | __extends(OrderByImpurePipe, _super);
|
586 | function OrderByImpurePipe() {
|
587 | return _super !== null && _super.apply(this, arguments) || this;
|
588 | }
|
589 | OrderByImpurePipe = __decorate([
|
590 | core.Pipe({ name: 'orderByImpure', pure: false })
|
591 | ], OrderByImpurePipe);
|
592 | return OrderByImpurePipe;
|
593 | }(OrderByPipe));
|
594 |
|
595 | var RangePipe = (function () {
|
596 | function RangePipe() {
|
597 | }
|
598 | RangePipe.prototype.transform = function (start, count, step) {
|
599 | if (start === void 0) { start = 1; }
|
600 | if (count === void 0) { count = 0; }
|
601 | if (step === void 0) { step = 1; }
|
602 | return Array(count)
|
603 | .fill('')
|
604 | .map(function (v, i) { return step * i + start; });
|
605 | };
|
606 | RangePipe = __decorate([
|
607 | core.Pipe({ name: 'range' })
|
608 | ], RangePipe);
|
609 | return RangePipe;
|
610 | }());
|
611 |
|
612 | var ChunkPipe = (function () {
|
613 | function ChunkPipe() {
|
614 | }
|
615 | ChunkPipe.prototype.transform = function (input, size) {
|
616 | if (size === void 0) { size = 1; }
|
617 | if (isString(input)) {
|
618 | return this.chunk(input
|
619 | .split(''), size);
|
620 | }
|
621 | return Array.isArray(input) ? this.chunk(input, size) : input;
|
622 | };
|
623 | ChunkPipe.prototype.chunk = function (input, size) {
|
624 | return Array(Math.ceil(input.length / size))
|
625 | .fill([])
|
626 | .map(function (_, index) { return index * size; })
|
627 | .map(function (begin) { return input.slice(begin, begin + size); });
|
628 | };
|
629 | ChunkPipe = __decorate([
|
630 | core.Pipe({ name: 'chunk' })
|
631 | ], ChunkPipe);
|
632 | return ChunkPipe;
|
633 | }());
|
634 |
|
635 | var FromPairsPipe = (function () {
|
636 | function FromPairsPipe() {
|
637 | }
|
638 | FromPairsPipe.prototype.transform = function (input) {
|
639 | if (!Array.isArray(input)) {
|
640 | return input;
|
641 | }
|
642 | return input.reduce(function (obj, arr) {
|
643 | if (!Array.isArray(arr)) {
|
644 | return obj;
|
645 | }
|
646 | var _a = __read(arr, 2), prop = _a[0], val = _a[1];
|
647 | obj[prop] = val;
|
648 | return obj;
|
649 | }, {});
|
650 | };
|
651 | FromPairsPipe = __decorate([
|
652 | core.Pipe({ name: 'fromPairs' })
|
653 | ], FromPairsPipe);
|
654 | return FromPairsPipe;
|
655 | }());
|
656 |
|
657 | var ARRAY_PIPES = [
|
658 | DiffPipe,
|
659 | FlattenPipe,
|
660 | InitialPipe,
|
661 | IntersectionPipe,
|
662 | ReversePipe,
|
663 | TailPipe,
|
664 | TrurthifyPipe,
|
665 | UnionPipe,
|
666 | UniquePipe,
|
667 | WithoutPipe,
|
668 | PluckPipe,
|
669 | ShufflePipe,
|
670 | EveryPipe,
|
671 | SomePipe,
|
672 | SamplePipe,
|
673 | GroupByPipe,
|
674 | GroupByImpurePipe,
|
675 | FilterByPipe,
|
676 | FilterByImpurePipe,
|
677 | OrderByPipe,
|
678 | OrderByImpurePipe,
|
679 | RangePipe,
|
680 | ChunkPipe,
|
681 | FromPairsPipe
|
682 | ];
|
683 | var NgArrayPipesModule = (function () {
|
684 | function NgArrayPipesModule() {
|
685 | }
|
686 | NgArrayPipesModule = __decorate([
|
687 | core.NgModule({
|
688 | declarations: ARRAY_PIPES,
|
689 | imports: [],
|
690 | exports: ARRAY_PIPES,
|
691 | })
|
692 | ], NgArrayPipesModule);
|
693 | return NgArrayPipesModule;
|
694 | }());
|
695 |
|
696 | var KeysPipe = (function () {
|
697 | function KeysPipe() {
|
698 | }
|
699 | KeysPipe.prototype.transform = function (obj) {
|
700 | if (Array.isArray(obj) || !isObject(obj)) {
|
701 | return obj;
|
702 | }
|
703 | return Object.keys(obj);
|
704 | };
|
705 | KeysPipe = __decorate([
|
706 | core.Pipe({ name: 'keys' })
|
707 | ], KeysPipe);
|
708 | return KeysPipe;
|
709 | }());
|
710 |
|
711 | var ValuesPipe = (function () {
|
712 | function ValuesPipe() {
|
713 | }
|
714 | ValuesPipe.prototype.transform = function (obj) {
|
715 | if (Array.isArray(obj) || !isObject(obj)) {
|
716 | return obj;
|
717 | }
|
718 | return Object.keys(obj).map(function (k) { return obj[k]; });
|
719 | };
|
720 | ValuesPipe = __decorate([
|
721 | core.Pipe({ name: 'values' })
|
722 | ], ValuesPipe);
|
723 | return ValuesPipe;
|
724 | }());
|
725 |
|
726 | var PairsPipe = (function () {
|
727 | function PairsPipe() {
|
728 | }
|
729 | PairsPipe.prototype.transform = function (obj) {
|
730 | if (Array.isArray(obj) || !isObject(obj)) {
|
731 | return obj;
|
732 | }
|
733 | return Object.entries(obj);
|
734 | };
|
735 | PairsPipe = __decorate([
|
736 | core.Pipe({ name: 'pairs' })
|
737 | ], PairsPipe);
|
738 | return PairsPipe;
|
739 | }());
|
740 |
|
741 | var PickPipe = (function () {
|
742 | function PickPipe() {
|
743 | }
|
744 | PickPipe.prototype.transform = function (obj) {
|
745 | var args = [];
|
746 | for (var _i = 1; _i < arguments.length; _i++) {
|
747 | args[_i - 1] = arguments[_i];
|
748 | }
|
749 | if (Array.isArray(obj) || !isObject(obj)) {
|
750 | return obj;
|
751 | }
|
752 | return args.reduce(function (o, k) {
|
753 | var _a;
|
754 | return Object.assign(o, (_a = {}, _a[k] = obj[k], _a));
|
755 | }, {});
|
756 | };
|
757 | PickPipe = __decorate([
|
758 | core.Pipe({ name: 'pick' })
|
759 | ], PickPipe);
|
760 | return PickPipe;
|
761 | }());
|
762 |
|
763 | var OmitPipe = (function () {
|
764 | function OmitPipe() {
|
765 | }
|
766 | OmitPipe.prototype.transform = function (obj) {
|
767 | var args = [];
|
768 | for (var _i = 1; _i < arguments.length; _i++) {
|
769 | args[_i - 1] = arguments[_i];
|
770 | }
|
771 | if (Array.isArray(obj) || !isObject(obj)) {
|
772 | return obj;
|
773 | }
|
774 | return (Object.keys(obj)
|
775 |
|
776 | .filter(function (k) { return !~args.indexOf(k); })
|
777 | .reduce(function (o, k) {
|
778 | var _a;
|
779 | return Object.assign(o, (_a = {}, _a[k] = obj[k], _a));
|
780 | }, {}));
|
781 | };
|
782 | OmitPipe = __decorate([
|
783 | core.Pipe({ name: 'omit' })
|
784 | ], OmitPipe);
|
785 | return OmitPipe;
|
786 | }());
|
787 |
|
788 | var InvertPipe = (function () {
|
789 | function InvertPipe() {
|
790 | }
|
791 | InvertPipe.prototype.transform = function (obj) {
|
792 | if (Array.isArray(obj) || !isObject(obj)) {
|
793 | return obj;
|
794 | }
|
795 | return Object.keys(obj).reduce(function (o, k) {
|
796 | var _a;
|
797 | return Object.assign(o, (_a = {}, _a[obj[k]] = k, _a));
|
798 | }, {});
|
799 | };
|
800 | InvertPipe = __decorate([
|
801 | core.Pipe({ name: 'invert' })
|
802 | ], InvertPipe);
|
803 | return InvertPipe;
|
804 | }());
|
805 |
|
806 | var InvertByPipe = (function () {
|
807 | function InvertByPipe() {
|
808 | }
|
809 | InvertByPipe.prototype.transform = function (obj, cb) {
|
810 | if (Array.isArray(obj) || !isObject(obj)) {
|
811 | return obj;
|
812 | }
|
813 | return Object.keys(obj).reduce(function (o, k) {
|
814 | var _a;
|
815 | var key = cb ? cb(obj[k]) : obj[k];
|
816 | return Array.isArray(o[key]) ? (o[key].push(k), o) : Object.assign(o, (_a = {}, _a[key] = [k], _a));
|
817 | }, {});
|
818 | };
|
819 | InvertByPipe = __decorate([
|
820 | core.Pipe({ name: 'invertBy' })
|
821 | ], InvertByPipe);
|
822 | return InvertByPipe;
|
823 | }());
|
824 |
|
825 | var DiffObjPipe = (function () {
|
826 | function DiffObjPipe() {
|
827 | }
|
828 | DiffObjPipe.prototype.transform = function (obj, original) {
|
829 | if (original === void 0) { original = {}; }
|
830 | if (Array.isArray(obj) || Array.isArray(original) || !isObject(obj) || !isObject(original)) {
|
831 | return {};
|
832 | }
|
833 | return getKeysTwoObjects(obj, original).reduce(function (diff, key) {
|
834 | if (!isDeepEqual(original[key], obj[key])) {
|
835 | diff[key] = obj[key];
|
836 | }
|
837 | return diff;
|
838 | }, {});
|
839 | };
|
840 | DiffObjPipe = __decorate([
|
841 | core.Pipe({ name: 'diffObj' })
|
842 | ], DiffObjPipe);
|
843 | return DiffObjPipe;
|
844 | }());
|
845 |
|
846 | var OBJECT_PIPES = [KeysPipe, ValuesPipe, PairsPipe, PickPipe, InvertPipe, InvertByPipe, OmitPipe, DiffObjPipe];
|
847 | var NgObjectPipesModule = (function () {
|
848 | function NgObjectPipesModule() {
|
849 | }
|
850 | NgObjectPipesModule = __decorate([
|
851 | core.NgModule({
|
852 | declarations: OBJECT_PIPES,
|
853 | imports: [],
|
854 | exports: OBJECT_PIPES,
|
855 | })
|
856 | ], NgObjectPipesModule);
|
857 | return NgObjectPipesModule;
|
858 | }());
|
859 |
|
860 | var AorAnPipe = (function () {
|
861 | function AorAnPipe() {
|
862 | this.irregularMap = {
|
863 | herb: 'an',
|
864 | honor: 'an',
|
865 | honorable: 'an',
|
866 | hour: 'an',
|
867 | mba: 'an',
|
868 | msc: 'an',
|
869 | 'm.sc.': 'an',
|
870 | unicorn: 'a',
|
871 | };
|
872 | }
|
873 | AorAnPipe.prototype.transform = function (stringEntity) {
|
874 | if (!stringEntity || stringEntity === '') {
|
875 | return '';
|
876 | }
|
877 | else {
|
878 | var firstWord = stringEntity.trim().split(' ')[0];
|
879 | if (this.irregularMap[firstWord.toLocaleLowerCase()]) {
|
880 | return this.irregularMap[firstWord.toLocaleLowerCase()] + " " + stringEntity;
|
881 | }
|
882 | else {
|
883 | return isVowel(stringEntity[0]) ? "an " + stringEntity : "a " + stringEntity;
|
884 | }
|
885 | }
|
886 | };
|
887 | AorAnPipe = __decorate([
|
888 | core.Pipe({
|
889 | name: 'aOrAn',
|
890 | })
|
891 | |
892 |
|
893 |
|
894 |
|
895 |
|
896 |
|
897 | ], AorAnPipe);
|
898 | return AorAnPipe;
|
899 | }());
|
900 |
|
901 | var UcWordsPipe = (function () {
|
902 | function UcWordsPipe() {
|
903 | }
|
904 | UcWordsPipe.prototype.transform = function (text) {
|
905 | if (isString(text)) {
|
906 | return text
|
907 | .split(' ')
|
908 | .map(function (sub) { return ucFirst(sub); })
|
909 | .join(' ');
|
910 | }
|
911 | return text;
|
912 | };
|
913 | UcWordsPipe = __decorate([
|
914 | core.Pipe({ name: 'ucwords' })
|
915 | ], UcWordsPipe);
|
916 | return UcWordsPipe;
|
917 | }());
|
918 |
|
919 | var LeftTrimPipe = (function () {
|
920 | function LeftTrimPipe() {
|
921 | }
|
922 | LeftTrimPipe.prototype.transform = function (text, chars) {
|
923 | if (chars === void 0) { chars = '\\s'; }
|
924 | return isString(text) ? text.replace(new RegExp("^[" + chars + "]+"), '') : text;
|
925 | };
|
926 | LeftTrimPipe = __decorate([
|
927 | core.Pipe({ name: 'ltrim' })
|
928 | ], LeftTrimPipe);
|
929 | return LeftTrimPipe;
|
930 | }());
|
931 |
|
932 | var RepeatPipe = (function () {
|
933 | function RepeatPipe() {
|
934 | }
|
935 | RepeatPipe.prototype.transform = function (str, n, separator) {
|
936 | if (n === void 0) { n = 1; }
|
937 | if (separator === void 0) { separator = ''; }
|
938 | if (n <= 0) {
|
939 | throw new RangeError();
|
940 | }
|
941 | return n === 1 ? str : this.repeat(str, n - 1, separator);
|
942 | };
|
943 | RepeatPipe.prototype.repeat = function (str, n, separator) {
|
944 | return isString(str) ? (n === 0 ? str : str + separator + this.repeat(str, n - 1, separator)) : str;
|
945 | };
|
946 | RepeatPipe = __decorate([
|
947 | core.Pipe({ name: 'repeat' })
|
948 | ], RepeatPipe);
|
949 | return RepeatPipe;
|
950 | }());
|
951 |
|
952 | var RightTrimPipe = (function () {
|
953 | function RightTrimPipe() {
|
954 | }
|
955 | RightTrimPipe.prototype.transform = function (text, chars) {
|
956 | if (chars === void 0) { chars = '\\s'; }
|
957 | return isString(text) ? text.replace(new RegExp("[" + chars + "]+$"), '') : text;
|
958 | };
|
959 | RightTrimPipe = __decorate([
|
960 | core.Pipe({ name: 'rtrim' })
|
961 | ], RightTrimPipe);
|
962 | return RightTrimPipe;
|
963 | }());
|
964 |
|
965 | var ScanPipe = (function () {
|
966 | function ScanPipe() {
|
967 | }
|
968 | ScanPipe.prototype.transform = function (text, args) {
|
969 | if (args === void 0) { args = []; }
|
970 | return isString(text)
|
971 | ? text.replace(/\{(\d+)}/g, function (match, index) { return (!isUndefined(args[index]) ? args[index] : match); })
|
972 | : text;
|
973 | };
|
974 | ScanPipe = __decorate([
|
975 | core.Pipe({ name: 'scan' })
|
976 | ], ScanPipe);
|
977 | return ScanPipe;
|
978 | }());
|
979 |
|
980 | var ShortenPipe = (function () {
|
981 | function ShortenPipe() {
|
982 | }
|
983 | ShortenPipe.prototype.transform = function (text, length, suffix, wordBreak) {
|
984 | if (length === void 0) { length = 0; }
|
985 | if (suffix === void 0) { suffix = ''; }
|
986 | if (wordBreak === void 0) { wordBreak = true; }
|
987 | if (!isString(text)) {
|
988 | return text;
|
989 | }
|
990 | if (text.length > length) {
|
991 | if (wordBreak) {
|
992 | return text.slice(0, length) + suffix;
|
993 | }
|
994 |
|
995 | if (!!~text.indexOf(' ', length)) {
|
996 | return text.slice(0, text.indexOf(' ', length)) + suffix;
|
997 | }
|
998 | }
|
999 | return text;
|
1000 | };
|
1001 | ShortenPipe = __decorate([
|
1002 | core.Pipe({ name: 'shorten' })
|
1003 | ], ShortenPipe);
|
1004 | return ShortenPipe;
|
1005 | }());
|
1006 |
|
1007 | var StripTagsPipe = (function () {
|
1008 | function StripTagsPipe() {
|
1009 | }
|
1010 | StripTagsPipe.prototype.transform = function (text) {
|
1011 | var allowedTags = [];
|
1012 | for (var _i = 1; _i < arguments.length; _i++) {
|
1013 | allowedTags[_i - 1] = arguments[_i];
|
1014 | }
|
1015 | return allowedTags.length > 0
|
1016 | ? text.replace(new RegExp("<(?!/?(" + allowedTags.join('|') + ")s*/?)[^>]+>", 'g'), '')
|
1017 | : text.replace(/<(?:.|\s)*?>/g, '');
|
1018 | };
|
1019 | StripTagsPipe = __decorate([
|
1020 | core.Pipe({ name: 'stripTags' })
|
1021 | ], StripTagsPipe);
|
1022 | return StripTagsPipe;
|
1023 | }());
|
1024 |
|
1025 | var TrimPipe = (function () {
|
1026 | function TrimPipe() {
|
1027 | }
|
1028 | TrimPipe.prototype.transform = function (text, chars) {
|
1029 | if (chars === void 0) { chars = '\\s'; }
|
1030 | return isString(text) ? text.replace(new RegExp("^[" + chars + "]+|[" + chars + "]+$", 'g'), '') : text;
|
1031 | };
|
1032 | TrimPipe = __decorate([
|
1033 | core.Pipe({ name: 'trim' })
|
1034 | ], TrimPipe);
|
1035 | return TrimPipe;
|
1036 | }());
|
1037 |
|
1038 | var UcFirstPipe = (function () {
|
1039 | function UcFirstPipe() {
|
1040 | }
|
1041 | UcFirstPipe.prototype.transform = function (text) {
|
1042 | return isString(text) ? ucFirst(text) : text;
|
1043 | };
|
1044 | UcFirstPipe = __decorate([
|
1045 | core.Pipe({ name: 'ucfirst' })
|
1046 | ], UcFirstPipe);
|
1047 | return UcFirstPipe;
|
1048 | }());
|
1049 |
|
1050 | var SlugifyPipe = (function () {
|
1051 | function SlugifyPipe() {
|
1052 | }
|
1053 | SlugifyPipe.prototype.transform = function (str) {
|
1054 | return isString(str)
|
1055 | ? str
|
1056 | .toLowerCase()
|
1057 | .trim()
|
1058 | .replace(/[^\w\-]+/g, ' ')
|
1059 | .replace(/\s+/g, '-')
|
1060 | : str;
|
1061 | };
|
1062 | SlugifyPipe = __decorate([
|
1063 | core.Pipe({ name: 'slugify' })
|
1064 | ], SlugifyPipe);
|
1065 | return SlugifyPipe;
|
1066 | }());
|
1067 |
|
1068 | var CamelizePipe = (function () {
|
1069 | function CamelizePipe() {
|
1070 | }
|
1071 | CamelizePipe.prototype.transform = function (text, chars) {
|
1072 | if (!isString(text)) {
|
1073 | return text;
|
1074 | }
|
1075 | return text
|
1076 | .toLowerCase()
|
1077 | .split(/[-_\s]/g)
|
1078 | .filter(function (v) { return !!v; })
|
1079 | .map(function (word, key) {
|
1080 | return !key ? word : word.slice(0, 1).toUpperCase() + word.slice(1);
|
1081 | })
|
1082 | .join('');
|
1083 | };
|
1084 | CamelizePipe = __decorate([
|
1085 | core.Pipe({ name: 'camelize' })
|
1086 | ], CamelizePipe);
|
1087 | return CamelizePipe;
|
1088 | }());
|
1089 |
|
1090 | var LatinisePipe = (function () {
|
1091 | function LatinisePipe() {
|
1092 |
|
1093 |
|
1094 | this.latinMap = {
|
1095 | 'Á': 'A',
|
1096 | 'Ă': 'A',
|
1097 | 'Ắ': 'A',
|
1098 | 'Ặ': 'A',
|
1099 | 'Ằ': 'A',
|
1100 | 'Ẳ': 'A',
|
1101 | 'Ẵ': 'A',
|
1102 | 'Ǎ': 'A',
|
1103 | 'Â': 'A',
|
1104 | 'Ấ': 'A',
|
1105 | 'Ậ': 'A',
|
1106 | 'Ầ': 'A',
|
1107 | 'Ẩ': 'A',
|
1108 | 'Ẫ': 'A',
|
1109 | 'Ä': 'A',
|
1110 | 'Ǟ': 'A',
|
1111 | 'Ȧ': 'A',
|
1112 | 'Ǡ': 'A',
|
1113 | 'Ạ': 'A',
|
1114 | 'Ȁ': 'A',
|
1115 | 'À': 'A',
|
1116 | 'Ả': 'A',
|
1117 | 'Ȃ': 'A',
|
1118 | 'Ā': 'A',
|
1119 | 'Ą': 'A',
|
1120 | 'Å': 'A',
|
1121 | 'Ǻ': 'A',
|
1122 | 'Ḁ': 'A',
|
1123 | 'Ⱥ': 'A',
|
1124 | 'Ã': 'A',
|
1125 | 'Ꜳ': 'AA',
|
1126 | 'Æ': 'AE',
|
1127 | 'Ǽ': 'AE',
|
1128 | 'Ǣ': 'AE',
|
1129 | 'Ꜵ': 'AO',
|
1130 | 'Ꜷ': 'AU',
|
1131 | 'Ꜹ': 'AV',
|
1132 | 'Ꜻ': 'AV',
|
1133 | 'Ꜽ': 'AY',
|
1134 | 'Ḃ': 'B',
|
1135 | 'Ḅ': 'B',
|
1136 | 'Ɓ': 'B',
|
1137 | 'Ḇ': 'B',
|
1138 | 'Ƀ': 'B',
|
1139 | 'Ƃ': 'B',
|
1140 | 'Ć': 'C',
|
1141 | 'Č': 'C',
|
1142 | 'Ç': 'C',
|
1143 | 'Ḉ': 'C',
|
1144 | 'Ĉ': 'C',
|
1145 | 'Ċ': 'C',
|
1146 | 'Ƈ': 'C',
|
1147 | 'Ȼ': 'C',
|
1148 | 'Ď': 'D',
|
1149 | 'Ḑ': 'D',
|
1150 | 'Ḓ': 'D',
|
1151 | 'Ḋ': 'D',
|
1152 | 'Ḍ': 'D',
|
1153 | 'Ɗ': 'D',
|
1154 | 'Ḏ': 'D',
|
1155 | 'Dz': 'D',
|
1156 | 'Dž': 'D',
|
1157 | 'Đ': 'D',
|
1158 | 'Ƌ': 'D',
|
1159 | 'DZ': 'DZ',
|
1160 | 'DŽ': 'DZ',
|
1161 | 'É': 'E',
|
1162 | 'Ĕ': 'E',
|
1163 | 'Ě': 'E',
|
1164 | 'Ȩ': 'E',
|
1165 | 'Ḝ': 'E',
|
1166 | 'Ê': 'E',
|
1167 | 'Ế': 'E',
|
1168 | 'Ệ': 'E',
|
1169 | 'Ề': 'E',
|
1170 | 'Ể': 'E',
|
1171 | 'Ễ': 'E',
|
1172 | 'Ḙ': 'E',
|
1173 | 'Ë': 'E',
|
1174 | 'Ė': 'E',
|
1175 | 'Ẹ': 'E',
|
1176 | 'Ȅ': 'E',
|
1177 | 'È': 'E',
|
1178 | 'Ẻ': 'E',
|
1179 | 'Ȇ': 'E',
|
1180 | 'Ē': 'E',
|
1181 | 'Ḗ': 'E',
|
1182 | 'Ḕ': 'E',
|
1183 | 'Ę': 'E',
|
1184 | 'Ɇ': 'E',
|
1185 | 'Ẽ': 'E',
|
1186 | 'Ḛ': 'E',
|
1187 | 'Ꝫ': 'ET',
|
1188 | 'Ḟ': 'F',
|
1189 | 'Ƒ': 'F',
|
1190 | 'Ǵ': 'G',
|
1191 | 'Ğ': 'G',
|
1192 | 'Ǧ': 'G',
|
1193 | 'Ģ': 'G',
|
1194 | 'Ĝ': 'G',
|
1195 | 'Ġ': 'G',
|
1196 | 'Ɠ': 'G',
|
1197 | 'Ḡ': 'G',
|
1198 | 'Ǥ': 'G',
|
1199 | 'Ḫ': 'H',
|
1200 | 'Ȟ': 'H',
|
1201 | 'Ḩ': 'H',
|
1202 | 'Ĥ': 'H',
|
1203 | 'Ⱨ': 'H',
|
1204 | 'Ḧ': 'H',
|
1205 | 'Ḣ': 'H',
|
1206 | 'Ḥ': 'H',
|
1207 | 'Ħ': 'H',
|
1208 | 'Í': 'I',
|
1209 | 'Ĭ': 'I',
|
1210 | 'Ǐ': 'I',
|
1211 | 'Î': 'I',
|
1212 | 'Ï': 'I',
|
1213 | 'Ḯ': 'I',
|
1214 | 'İ': 'I',
|
1215 | 'Ị': 'I',
|
1216 | 'Ȉ': 'I',
|
1217 | 'Ì': 'I',
|
1218 | 'Ỉ': 'I',
|
1219 | 'Ȋ': 'I',
|
1220 | 'Ī': 'I',
|
1221 | 'Į': 'I',
|
1222 | 'Ɨ': 'I',
|
1223 | 'Ĩ': 'I',
|
1224 | 'Ḭ': 'I',
|
1225 | 'Ꝺ': 'D',
|
1226 | 'Ꝼ': 'F',
|
1227 | 'Ᵹ': 'G',
|
1228 | 'Ꞃ': 'R',
|
1229 | 'Ꞅ': 'S',
|
1230 | 'Ꞇ': 'T',
|
1231 | 'Ꝭ': 'IS',
|
1232 | 'Ĵ': 'J',
|
1233 | 'Ɉ': 'J',
|
1234 | 'Ḱ': 'K',
|
1235 | 'Ǩ': 'K',
|
1236 | 'Ķ': 'K',
|
1237 | 'Ⱪ': 'K',
|
1238 | 'Ꝃ': 'K',
|
1239 | 'Ḳ': 'K',
|
1240 | 'Ƙ': 'K',
|
1241 | 'Ḵ': 'K',
|
1242 | 'Ꝁ': 'K',
|
1243 | 'Ꝅ': 'K',
|
1244 | 'Ĺ': 'L',
|
1245 | 'Ƚ': 'L',
|
1246 | 'Ľ': 'L',
|
1247 | 'Ļ': 'L',
|
1248 | 'Ḽ': 'L',
|
1249 | 'Ḷ': 'L',
|
1250 | 'Ḹ': 'L',
|
1251 | 'Ⱡ': 'L',
|
1252 | 'Ꝉ': 'L',
|
1253 | 'Ḻ': 'L',
|
1254 | 'Ŀ': 'L',
|
1255 | 'Ɫ': 'L',
|
1256 | 'Lj': 'L',
|
1257 | 'Ł': 'L',
|
1258 | 'LJ': 'LJ',
|
1259 | 'Ḿ': 'M',
|
1260 | 'Ṁ': 'M',
|
1261 | 'Ṃ': 'M',
|
1262 | 'Ɱ': 'M',
|
1263 | 'Ń': 'N',
|
1264 | 'Ň': 'N',
|
1265 | 'Ņ': 'N',
|
1266 | 'Ṋ': 'N',
|
1267 | 'Ṅ': 'N',
|
1268 | 'Ṇ': 'N',
|
1269 | 'Ǹ': 'N',
|
1270 | 'Ɲ': 'N',
|
1271 | 'Ṉ': 'N',
|
1272 | 'Ƞ': 'N',
|
1273 | 'Nj': 'N',
|
1274 | 'Ñ': 'N',
|
1275 | 'NJ': 'NJ',
|
1276 | 'Ó': 'O',
|
1277 | 'Ŏ': 'O',
|
1278 | 'Ǒ': 'O',
|
1279 | 'Ô': 'O',
|
1280 | 'Ố': 'O',
|
1281 | 'Ộ': 'O',
|
1282 | 'Ồ': 'O',
|
1283 | 'Ổ': 'O',
|
1284 | 'Ỗ': 'O',
|
1285 | 'Ö': 'O',
|
1286 | 'Ȫ': 'O',
|
1287 | 'Ȯ': 'O',
|
1288 | 'Ȱ': 'O',
|
1289 | 'Ọ': 'O',
|
1290 | 'Ő': 'O',
|
1291 | 'Ȍ': 'O',
|
1292 | 'Ò': 'O',
|
1293 | 'Ỏ': 'O',
|
1294 | 'Ơ': 'O',
|
1295 | 'Ớ': 'O',
|
1296 | 'Ợ': 'O',
|
1297 | 'Ờ': 'O',
|
1298 | 'Ở': 'O',
|
1299 | 'Ỡ': 'O',
|
1300 | 'Ȏ': 'O',
|
1301 | 'Ꝋ': 'O',
|
1302 | 'Ꝍ': 'O',
|
1303 | 'Ō': 'O',
|
1304 | 'Ṓ': 'O',
|
1305 | 'Ṑ': 'O',
|
1306 | 'Ɵ': 'O',
|
1307 | 'Ǫ': 'O',
|
1308 | 'Ǭ': 'O',
|
1309 | 'Ø': 'O',
|
1310 | 'Ǿ': 'O',
|
1311 | 'Õ': 'O',
|
1312 | 'Ṍ': 'O',
|
1313 | 'Ṏ': 'O',
|
1314 | 'Ȭ': 'O',
|
1315 | 'Ƣ': 'OI',
|
1316 | 'Ꝏ': 'OO',
|
1317 | 'Ɛ': 'E',
|
1318 | 'Ɔ': 'O',
|
1319 | 'Ȣ': 'OU',
|
1320 | 'Ṕ': 'P',
|
1321 | 'Ṗ': 'P',
|
1322 | 'Ꝓ': 'P',
|
1323 | 'Ƥ': 'P',
|
1324 | 'Ꝕ': 'P',
|
1325 | 'Ᵽ': 'P',
|
1326 | 'Ꝑ': 'P',
|
1327 | 'Ꝙ': 'Q',
|
1328 | 'Ꝗ': 'Q',
|
1329 | 'Ŕ': 'R',
|
1330 | 'Ř': 'R',
|
1331 | 'Ŗ': 'R',
|
1332 | 'Ṙ': 'R',
|
1333 | 'Ṛ': 'R',
|
1334 | 'Ṝ': 'R',
|
1335 | 'Ȑ': 'R',
|
1336 | 'Ȓ': 'R',
|
1337 | 'Ṟ': 'R',
|
1338 | 'Ɍ': 'R',
|
1339 | 'Ɽ': 'R',
|
1340 | 'Ꜿ': 'C',
|
1341 | 'Ǝ': 'E',
|
1342 | 'Ś': 'S',
|
1343 | 'Ṥ': 'S',
|
1344 | 'Š': 'S',
|
1345 | 'Ṧ': 'S',
|
1346 | 'Ş': 'S',
|
1347 | 'Ŝ': 'S',
|
1348 | 'Ș': 'S',
|
1349 | 'Ṡ': 'S',
|
1350 | 'Ṣ': 'S',
|
1351 | 'Ṩ': 'S',
|
1352 | 'ẞ': 'SS',
|
1353 | 'Ť': 'T',
|
1354 | 'Ţ': 'T',
|
1355 | 'Ṱ': 'T',
|
1356 | 'Ț': 'T',
|
1357 | 'Ⱦ': 'T',
|
1358 | 'Ṫ': 'T',
|
1359 | 'Ṭ': 'T',
|
1360 | 'Ƭ': 'T',
|
1361 | 'Ṯ': 'T',
|
1362 | 'Ʈ': 'T',
|
1363 | 'Ŧ': 'T',
|
1364 | 'Ɐ': 'A',
|
1365 | 'Ꞁ': 'L',
|
1366 | 'Ɯ': 'M',
|
1367 | 'Ʌ': 'V',
|
1368 | 'Ꜩ': 'TZ',
|
1369 | 'Ú': 'U',
|
1370 | 'Ŭ': 'U',
|
1371 | 'Ǔ': 'U',
|
1372 | 'Û': 'U',
|
1373 | 'Ṷ': 'U',
|
1374 | 'Ü': 'U',
|
1375 | 'Ǘ': 'U',
|
1376 | 'Ǚ': 'U',
|
1377 | 'Ǜ': 'U',
|
1378 | 'Ǖ': 'U',
|
1379 | 'Ṳ': 'U',
|
1380 | 'Ụ': 'U',
|
1381 | 'Ű': 'U',
|
1382 | 'Ȕ': 'U',
|
1383 | 'Ù': 'U',
|
1384 | 'Ủ': 'U',
|
1385 | 'Ư': 'U',
|
1386 | 'Ứ': 'U',
|
1387 | 'Ự': 'U',
|
1388 | 'Ừ': 'U',
|
1389 | 'Ử': 'U',
|
1390 | 'Ữ': 'U',
|
1391 | 'Ȗ': 'U',
|
1392 | 'Ū': 'U',
|
1393 | 'Ṻ': 'U',
|
1394 | 'Ų': 'U',
|
1395 | 'Ů': 'U',
|
1396 | 'Ũ': 'U',
|
1397 | 'Ṹ': 'U',
|
1398 | 'Ṵ': 'U',
|
1399 | 'Ꝟ': 'V',
|
1400 | 'Ṿ': 'V',
|
1401 | 'Ʋ': 'V',
|
1402 | 'Ṽ': 'V',
|
1403 | 'Ꝡ': 'VY',
|
1404 | 'Ẃ': 'W',
|
1405 | 'Ŵ': 'W',
|
1406 | 'Ẅ': 'W',
|
1407 | 'Ẇ': 'W',
|
1408 | 'Ẉ': 'W',
|
1409 | 'Ẁ': 'W',
|
1410 | 'Ⱳ': 'W',
|
1411 | 'Ẍ': 'X',
|
1412 | 'Ẋ': 'X',
|
1413 | 'Ý': 'Y',
|
1414 | 'Ŷ': 'Y',
|
1415 | 'Ÿ': 'Y',
|
1416 | 'Ẏ': 'Y',
|
1417 | 'Ỵ': 'Y',
|
1418 | 'Ỳ': 'Y',
|
1419 | 'Ƴ': 'Y',
|
1420 | 'Ỷ': 'Y',
|
1421 | 'Ỿ': 'Y',
|
1422 | 'Ȳ': 'Y',
|
1423 | 'Ɏ': 'Y',
|
1424 | 'Ỹ': 'Y',
|
1425 | 'Ź': 'Z',
|
1426 | 'Ž': 'Z',
|
1427 | 'Ẑ': 'Z',
|
1428 | 'Ⱬ': 'Z',
|
1429 | 'Ż': 'Z',
|
1430 | 'Ẓ': 'Z',
|
1431 | 'Ȥ': 'Z',
|
1432 | 'Ẕ': 'Z',
|
1433 | 'Ƶ': 'Z',
|
1434 | 'IJ': 'IJ',
|
1435 | 'Œ': 'OE',
|
1436 | 'ᴀ': 'A',
|
1437 | 'ᴁ': 'AE',
|
1438 | 'ʙ': 'B',
|
1439 | 'ᴃ': 'B',
|
1440 | 'ᴄ': 'C',
|
1441 | 'ᴅ': 'D',
|
1442 | 'ᴇ': 'E',
|
1443 | 'ꜰ': 'F',
|
1444 | 'ɢ': 'G',
|
1445 | 'ʛ': 'G',
|
1446 | 'ʜ': 'H',
|
1447 | 'ɪ': 'I',
|
1448 | 'ʁ': 'R',
|
1449 | 'ᴊ': 'J',
|
1450 | 'ᴋ': 'K',
|
1451 | 'ʟ': 'L',
|
1452 | 'ᴌ': 'L',
|
1453 | 'ᴍ': 'M',
|
1454 | 'ɴ': 'N',
|
1455 | 'ᴏ': 'O',
|
1456 | 'ɶ': 'OE',
|
1457 | 'ᴐ': 'O',
|
1458 | 'ᴕ': 'OU',
|
1459 | 'ᴘ': 'P',
|
1460 | 'ʀ': 'R',
|
1461 | 'ᴎ': 'N',
|
1462 | 'ᴙ': 'R',
|
1463 | 'ꜱ': 'S',
|
1464 | 'ᴛ': 'T',
|
1465 | 'ⱻ': 'E',
|
1466 | 'ᴚ': 'R',
|
1467 | 'ᴜ': 'U',
|
1468 | 'ᴠ': 'V',
|
1469 | 'ᴡ': 'W',
|
1470 | 'ʏ': 'Y',
|
1471 | 'ᴢ': 'Z',
|
1472 | 'á': 'a',
|
1473 | 'ă': 'a',
|
1474 | 'ắ': 'a',
|
1475 | 'ặ': 'a',
|
1476 | 'ằ': 'a',
|
1477 | 'ẳ': 'a',
|
1478 | 'ẵ': 'a',
|
1479 | 'ǎ': 'a',
|
1480 | 'â': 'a',
|
1481 | 'ấ': 'a',
|
1482 | 'ậ': 'a',
|
1483 | 'ầ': 'a',
|
1484 | 'ẩ': 'a',
|
1485 | 'ẫ': 'a',
|
1486 | 'ä': 'a',
|
1487 | 'ǟ': 'a',
|
1488 | 'ȧ': 'a',
|
1489 | 'ǡ': 'a',
|
1490 | 'ạ': 'a',
|
1491 | 'ȁ': 'a',
|
1492 | 'à': 'a',
|
1493 | 'ả': 'a',
|
1494 | 'ȃ': 'a',
|
1495 | 'ā': 'a',
|
1496 | 'ą': 'a',
|
1497 | 'ᶏ': 'a',
|
1498 | 'ẚ': 'a',
|
1499 | 'å': 'a',
|
1500 | 'ǻ': 'a',
|
1501 | 'ḁ': 'a',
|
1502 | 'ⱥ': 'a',
|
1503 | 'ã': 'a',
|
1504 | 'ꜳ': 'aa',
|
1505 | 'æ': 'ae',
|
1506 | 'ǽ': 'ae',
|
1507 | 'ǣ': 'ae',
|
1508 | 'ꜵ': 'ao',
|
1509 | 'ꜷ': 'au',
|
1510 | 'ꜹ': 'av',
|
1511 | 'ꜻ': 'av',
|
1512 | 'ꜽ': 'ay',
|
1513 | 'ḃ': 'b',
|
1514 | 'ḅ': 'b',
|
1515 | 'ɓ': 'b',
|
1516 | 'ḇ': 'b',
|
1517 | 'ᵬ': 'b',
|
1518 | 'ᶀ': 'b',
|
1519 | 'ƀ': 'b',
|
1520 | 'ƃ': 'b',
|
1521 | 'ɵ': 'o',
|
1522 | 'ć': 'c',
|
1523 | 'č': 'c',
|
1524 | 'ç': 'c',
|
1525 | 'ḉ': 'c',
|
1526 | 'ĉ': 'c',
|
1527 | 'ɕ': 'c',
|
1528 | 'ċ': 'c',
|
1529 | 'ƈ': 'c',
|
1530 | 'ȼ': 'c',
|
1531 | 'ď': 'd',
|
1532 | 'ḑ': 'd',
|
1533 | 'ḓ': 'd',
|
1534 | 'ȡ': 'd',
|
1535 | 'ḋ': 'd',
|
1536 | 'ḍ': 'd',
|
1537 | 'ɗ': 'd',
|
1538 | 'ᶑ': 'd',
|
1539 | 'ḏ': 'd',
|
1540 | 'ᵭ': 'd',
|
1541 | 'ᶁ': 'd',
|
1542 | 'đ': 'd',
|
1543 | 'ɖ': 'd',
|
1544 | 'ƌ': 'd',
|
1545 | 'ı': 'i',
|
1546 | 'ȷ': 'j',
|
1547 | 'ɟ': 'j',
|
1548 | 'ʄ': 'j',
|
1549 | 'dz': 'dz',
|
1550 | 'dž': 'dz',
|
1551 | 'é': 'e',
|
1552 | 'ĕ': 'e',
|
1553 | 'ě': 'e',
|
1554 | 'ȩ': 'e',
|
1555 | 'ḝ': 'e',
|
1556 | 'ê': 'e',
|
1557 | 'ế': 'e',
|
1558 | 'ệ': 'e',
|
1559 | 'ề': 'e',
|
1560 | 'ể': 'e',
|
1561 | 'ễ': 'e',
|
1562 | 'ḙ': 'e',
|
1563 | 'ë': 'e',
|
1564 | 'ė': 'e',
|
1565 | 'ẹ': 'e',
|
1566 | 'ȅ': 'e',
|
1567 | 'è': 'e',
|
1568 | 'ẻ': 'e',
|
1569 | 'ȇ': 'e',
|
1570 | 'ē': 'e',
|
1571 | 'ḗ': 'e',
|
1572 | 'ḕ': 'e',
|
1573 | 'ⱸ': 'e',
|
1574 | 'ę': 'e',
|
1575 | 'ᶒ': 'e',
|
1576 | 'ɇ': 'e',
|
1577 | 'ẽ': 'e',
|
1578 | 'ḛ': 'e',
|
1579 | 'ꝫ': 'et',
|
1580 | 'ḟ': 'f',
|
1581 | 'ƒ': 'f',
|
1582 | 'ᵮ': 'f',
|
1583 | 'ᶂ': 'f',
|
1584 | 'ǵ': 'g',
|
1585 | 'ğ': 'g',
|
1586 | 'ǧ': 'g',
|
1587 | 'ģ': 'g',
|
1588 | 'ĝ': 'g',
|
1589 | 'ġ': 'g',
|
1590 | 'ɠ': 'g',
|
1591 | 'ḡ': 'g',
|
1592 | 'ᶃ': 'g',
|
1593 | 'ǥ': 'g',
|
1594 | 'ḫ': 'h',
|
1595 | 'ȟ': 'h',
|
1596 | 'ḩ': 'h',
|
1597 | 'ĥ': 'h',
|
1598 | 'ⱨ': 'h',
|
1599 | 'ḧ': 'h',
|
1600 | 'ḣ': 'h',
|
1601 | 'ḥ': 'h',
|
1602 | 'ɦ': 'h',
|
1603 | 'ẖ': 'h',
|
1604 | 'ħ': 'h',
|
1605 | 'ƕ': 'hv',
|
1606 | 'í': 'i',
|
1607 | 'ĭ': 'i',
|
1608 | 'ǐ': 'i',
|
1609 | 'î': 'i',
|
1610 | 'ï': 'i',
|
1611 | 'ḯ': 'i',
|
1612 | 'ị': 'i',
|
1613 | 'ȉ': 'i',
|
1614 | 'ì': 'i',
|
1615 | 'ỉ': 'i',
|
1616 | 'ȋ': 'i',
|
1617 | 'ī': 'i',
|
1618 | 'į': 'i',
|
1619 | 'ᶖ': 'i',
|
1620 | 'ɨ': 'i',
|
1621 | 'ĩ': 'i',
|
1622 | 'ḭ': 'i',
|
1623 | 'ꝺ': 'd',
|
1624 | 'ꝼ': 'f',
|
1625 | 'ᵹ': 'g',
|
1626 | 'ꞃ': 'r',
|
1627 | 'ꞅ': 's',
|
1628 | 'ꞇ': 't',
|
1629 | 'ꝭ': 'is',
|
1630 | 'ǰ': 'j',
|
1631 | 'ĵ': 'j',
|
1632 | 'ʝ': 'j',
|
1633 | 'ɉ': 'j',
|
1634 | 'ḱ': 'k',
|
1635 | 'ǩ': 'k',
|
1636 | 'ķ': 'k',
|
1637 | 'ⱪ': 'k',
|
1638 | 'ꝃ': 'k',
|
1639 | 'ḳ': 'k',
|
1640 | 'ƙ': 'k',
|
1641 | 'ḵ': 'k',
|
1642 | 'ᶄ': 'k',
|
1643 | 'ꝁ': 'k',
|
1644 | 'ꝅ': 'k',
|
1645 | 'ĺ': 'l',
|
1646 | 'ƚ': 'l',
|
1647 | 'ɬ': 'l',
|
1648 | 'ľ': 'l',
|
1649 | 'ļ': 'l',
|
1650 | 'ḽ': 'l',
|
1651 | 'ȴ': 'l',
|
1652 | 'ḷ': 'l',
|
1653 | 'ḹ': 'l',
|
1654 | 'ⱡ': 'l',
|
1655 | 'ꝉ': 'l',
|
1656 | 'ḻ': 'l',
|
1657 | 'ŀ': 'l',
|
1658 | 'ɫ': 'l',
|
1659 | 'ᶅ': 'l',
|
1660 | 'ɭ': 'l',
|
1661 | 'ł': 'l',
|
1662 | 'lj': 'lj',
|
1663 | 'ſ': 's',
|
1664 | 'ẜ': 's',
|
1665 | 'ẛ': 's',
|
1666 | 'ẝ': 's',
|
1667 | 'ḿ': 'm',
|
1668 | 'ṁ': 'm',
|
1669 | 'ṃ': 'm',
|
1670 | 'ɱ': 'm',
|
1671 | 'ᵯ': 'm',
|
1672 | 'ᶆ': 'm',
|
1673 | 'ń': 'n',
|
1674 | 'ň': 'n',
|
1675 | 'ņ': 'n',
|
1676 | 'ṋ': 'n',
|
1677 | 'ȵ': 'n',
|
1678 | 'ṅ': 'n',
|
1679 | 'ṇ': 'n',
|
1680 | 'ǹ': 'n',
|
1681 | 'ɲ': 'n',
|
1682 | 'ṉ': 'n',
|
1683 | 'ƞ': 'n',
|
1684 | 'ᵰ': 'n',
|
1685 | 'ᶇ': 'n',
|
1686 | 'ɳ': 'n',
|
1687 | 'ñ': 'n',
|
1688 | 'nj': 'nj',
|
1689 | 'ó': 'o',
|
1690 | 'ŏ': 'o',
|
1691 | 'ǒ': 'o',
|
1692 | 'ô': 'o',
|
1693 | 'ố': 'o',
|
1694 | 'ộ': 'o',
|
1695 | 'ồ': 'o',
|
1696 | 'ổ': 'o',
|
1697 | 'ỗ': 'o',
|
1698 | 'ö': 'o',
|
1699 | 'ȫ': 'o',
|
1700 | 'ȯ': 'o',
|
1701 | 'ȱ': 'o',
|
1702 | 'ọ': 'o',
|
1703 | 'ő': 'o',
|
1704 | 'ȍ': 'o',
|
1705 | 'ò': 'o',
|
1706 | 'ỏ': 'o',
|
1707 | 'ơ': 'o',
|
1708 | 'ớ': 'o',
|
1709 | 'ợ': 'o',
|
1710 | 'ờ': 'o',
|
1711 | 'ở': 'o',
|
1712 | 'ỡ': 'o',
|
1713 | 'ȏ': 'o',
|
1714 | 'ꝋ': 'o',
|
1715 | 'ꝍ': 'o',
|
1716 | 'ⱺ': 'o',
|
1717 | 'ō': 'o',
|
1718 | 'ṓ': 'o',
|
1719 | 'ṑ': 'o',
|
1720 | 'ǫ': 'o',
|
1721 | 'ǭ': 'o',
|
1722 | 'ø': 'o',
|
1723 | 'ǿ': 'o',
|
1724 | 'õ': 'o',
|
1725 | 'ṍ': 'o',
|
1726 | 'ṏ': 'o',
|
1727 | 'ȭ': 'o',
|
1728 | 'ƣ': 'oi',
|
1729 | 'ꝏ': 'oo',
|
1730 | 'ɛ': 'e',
|
1731 | 'ᶓ': 'e',
|
1732 | 'ɔ': 'o',
|
1733 | 'ᶗ': 'o',
|
1734 | 'ȣ': 'ou',
|
1735 | 'ṕ': 'p',
|
1736 | 'ṗ': 'p',
|
1737 | 'ꝓ': 'p',
|
1738 | 'ƥ': 'p',
|
1739 | 'ᵱ': 'p',
|
1740 | 'ᶈ': 'p',
|
1741 | 'ꝕ': 'p',
|
1742 | 'ᵽ': 'p',
|
1743 | 'ꝑ': 'p',
|
1744 | 'ꝙ': 'q',
|
1745 | 'ʠ': 'q',
|
1746 | 'ɋ': 'q',
|
1747 | 'ꝗ': 'q',
|
1748 | 'ŕ': 'r',
|
1749 | 'ř': 'r',
|
1750 | 'ŗ': 'r',
|
1751 | 'ṙ': 'r',
|
1752 | 'ṛ': 'r',
|
1753 | 'ṝ': 'r',
|
1754 | 'ȑ': 'r',
|
1755 | 'ɾ': 'r',
|
1756 | 'ᵳ': 'r',
|
1757 | 'ȓ': 'r',
|
1758 | 'ṟ': 'r',
|
1759 | 'ɼ': 'r',
|
1760 | 'ᵲ': 'r',
|
1761 | 'ᶉ': 'r',
|
1762 | 'ɍ': 'r',
|
1763 | 'ɽ': 'r',
|
1764 | 'ↄ': 'c',
|
1765 | 'ꜿ': 'c',
|
1766 | 'ɘ': 'e',
|
1767 | 'ɿ': 'r',
|
1768 | 'ś': 's',
|
1769 | 'ṥ': 's',
|
1770 | 'š': 's',
|
1771 | 'ṧ': 's',
|
1772 | 'ş': 's',
|
1773 | 'ŝ': 's',
|
1774 | 'ș': 's',
|
1775 | 'ṡ': 's',
|
1776 | 'ṣ': 's',
|
1777 | 'ṩ': 's',
|
1778 | 'ʂ': 's',
|
1779 | 'ᵴ': 's',
|
1780 | 'ᶊ': 's',
|
1781 | 'ȿ': 's',
|
1782 | 'ɡ': 'g',
|
1783 | 'ß': 'ss',
|
1784 | 'ᴑ': 'o',
|
1785 | 'ᴓ': 'o',
|
1786 | 'ᴝ': 'u',
|
1787 | 'ť': 't',
|
1788 | 'ţ': 't',
|
1789 | 'ṱ': 't',
|
1790 | 'ț': 't',
|
1791 | 'ȶ': 't',
|
1792 | 'ẗ': 't',
|
1793 | 'ⱦ': 't',
|
1794 | 'ṫ': 't',
|
1795 | 'ṭ': 't',
|
1796 | 'ƭ': 't',
|
1797 | 'ṯ': 't',
|
1798 | 'ᵵ': 't',
|
1799 | 'ƫ': 't',
|
1800 | 'ʈ': 't',
|
1801 | 'ŧ': 't',
|
1802 | 'ᵺ': 'th',
|
1803 | 'ɐ': 'a',
|
1804 | 'ᴂ': 'ae',
|
1805 | 'ǝ': 'e',
|
1806 | 'ᵷ': 'g',
|
1807 | 'ɥ': 'h',
|
1808 | 'ʮ': 'h',
|
1809 | 'ʯ': 'h',
|
1810 | 'ᴉ': 'i',
|
1811 | 'ʞ': 'k',
|
1812 | 'ꞁ': 'l',
|
1813 | 'ɯ': 'm',
|
1814 | 'ɰ': 'm',
|
1815 | 'ᴔ': 'oe',
|
1816 | 'ɹ': 'r',
|
1817 | 'ɻ': 'r',
|
1818 | 'ɺ': 'r',
|
1819 | 'ⱹ': 'r',
|
1820 | 'ʇ': 't',
|
1821 | 'ʌ': 'v',
|
1822 | 'ʍ': 'w',
|
1823 | 'ʎ': 'y',
|
1824 | 'ꜩ': 'tz',
|
1825 | 'ú': 'u',
|
1826 | 'ŭ': 'u',
|
1827 | 'ǔ': 'u',
|
1828 | 'û': 'u',
|
1829 | 'ṷ': 'u',
|
1830 | 'ü': 'u',
|
1831 | 'ǘ': 'u',
|
1832 | 'ǚ': 'u',
|
1833 | 'ǜ': 'u',
|
1834 | 'ǖ': 'u',
|
1835 | 'ṳ': 'u',
|
1836 | 'ụ': 'u',
|
1837 | 'ű': 'u',
|
1838 | 'ȕ': 'u',
|
1839 | 'ù': 'u',
|
1840 | 'ủ': 'u',
|
1841 | 'ư': 'u',
|
1842 | 'ứ': 'u',
|
1843 | 'ự': 'u',
|
1844 | 'ừ': 'u',
|
1845 | 'ử': 'u',
|
1846 | 'ữ': 'u',
|
1847 | 'ȗ': 'u',
|
1848 | 'ū': 'u',
|
1849 | 'ṻ': 'u',
|
1850 | 'ų': 'u',
|
1851 | 'ᶙ': 'u',
|
1852 | 'ů': 'u',
|
1853 | 'ũ': 'u',
|
1854 | 'ṹ': 'u',
|
1855 | 'ṵ': 'u',
|
1856 | 'ᵫ': 'ue',
|
1857 | 'ꝸ': 'um',
|
1858 | 'ⱴ': 'v',
|
1859 | 'ꝟ': 'v',
|
1860 | 'ṿ': 'v',
|
1861 | 'ʋ': 'v',
|
1862 | 'ᶌ': 'v',
|
1863 | 'ⱱ': 'v',
|
1864 | 'ṽ': 'v',
|
1865 | 'ꝡ': 'vy',
|
1866 | 'ẃ': 'w',
|
1867 | 'ŵ': 'w',
|
1868 | 'ẅ': 'w',
|
1869 | 'ẇ': 'w',
|
1870 | 'ẉ': 'w',
|
1871 | 'ẁ': 'w',
|
1872 | 'ⱳ': 'w',
|
1873 | 'ẘ': 'w',
|
1874 | 'ẍ': 'x',
|
1875 | 'ẋ': 'x',
|
1876 | 'ᶍ': 'x',
|
1877 | 'ý': 'y',
|
1878 | 'ŷ': 'y',
|
1879 | 'ÿ': 'y',
|
1880 | 'ẏ': 'y',
|
1881 | 'ỵ': 'y',
|
1882 | 'ỳ': 'y',
|
1883 | 'ƴ': 'y',
|
1884 | 'ỷ': 'y',
|
1885 | 'ỿ': 'y',
|
1886 | 'ȳ': 'y',
|
1887 | 'ẙ': 'y',
|
1888 | 'ɏ': 'y',
|
1889 | 'ỹ': 'y',
|
1890 | 'ź': 'z',
|
1891 | 'ž': 'z',
|
1892 | 'ẑ': 'z',
|
1893 | 'ʑ': 'z',
|
1894 | 'ⱬ': 'z',
|
1895 | 'ż': 'z',
|
1896 | 'ẓ': 'z',
|
1897 | 'ȥ': 'z',
|
1898 | 'ẕ': 'z',
|
1899 | 'ᵶ': 'z',
|
1900 | 'ᶎ': 'z',
|
1901 | 'ʐ': 'z',
|
1902 | 'ƶ': 'z',
|
1903 | 'ɀ': 'z',
|
1904 | 'ff': 'ff',
|
1905 | 'ffi': 'ffi',
|
1906 | 'ffl': 'ffl',
|
1907 | 'fi': 'fi',
|
1908 | 'fl': 'fl',
|
1909 | 'ij': 'ij',
|
1910 | 'œ': 'oe',
|
1911 | 'st': 'st',
|
1912 | 'ₐ': 'a',
|
1913 | 'ₑ': 'e',
|
1914 | 'ᵢ': 'i',
|
1915 | 'ⱼ': 'j',
|
1916 | 'ₒ': 'o',
|
1917 | 'ᵣ': 'r',
|
1918 | 'ᵤ': 'u',
|
1919 | 'ᵥ': 'v',
|
1920 | 'ₓ': 'x',
|
1921 | };
|
1922 | }
|
1923 | LatinisePipe.prototype.transform = function (text, chars) {
|
1924 | var _this = this;
|
1925 | return isString(text)
|
1926 | ? text.replace(/[^A-Za-z0-9]/g, function (key) {
|
1927 | return _this.latinMap[key] || key;
|
1928 | })
|
1929 | : text;
|
1930 | };
|
1931 | LatinisePipe = __decorate([
|
1932 | core.Pipe({ name: 'latinise' })
|
1933 | ], LatinisePipe);
|
1934 | return LatinisePipe;
|
1935 | }());
|
1936 |
|
1937 | var LinesPipe = (function () {
|
1938 | function LinesPipe() {
|
1939 | }
|
1940 | LinesPipe.prototype.transform = function (text, chars) {
|
1941 | return isString(text) ? text.replace(/\r\n/g, '\n').split('\n') : text;
|
1942 | };
|
1943 | LinesPipe = __decorate([
|
1944 | core.Pipe({ name: 'lines' })
|
1945 | ], LinesPipe);
|
1946 | return LinesPipe;
|
1947 | }());
|
1948 |
|
1949 | var UnderscorePipe = (function () {
|
1950 | function UnderscorePipe() {
|
1951 | }
|
1952 | UnderscorePipe.prototype.transform = function (text, chars) {
|
1953 | return isString(text)
|
1954 | ? text
|
1955 | .trim()
|
1956 | .replace(/\s+/g, '')
|
1957 | .replace(/[A-Z]/g, function (c, k) {
|
1958 | return k ? "_" + c.toLowerCase() : c.toLowerCase();
|
1959 | })
|
1960 | : text;
|
1961 | };
|
1962 | UnderscorePipe = __decorate([
|
1963 | core.Pipe({ name: 'underscore' })
|
1964 | ], UnderscorePipe);
|
1965 | return UnderscorePipe;
|
1966 | }());
|
1967 |
|
1968 | var MatchPipe = (function () {
|
1969 | function MatchPipe() {
|
1970 | }
|
1971 | MatchPipe.prototype.transform = function (text, pattern, flags) {
|
1972 | if (!isString(text)) {
|
1973 | return text;
|
1974 | }
|
1975 | return text.match(new RegExp(pattern, flags));
|
1976 | };
|
1977 | MatchPipe = __decorate([
|
1978 | core.Pipe({ name: 'match' })
|
1979 | ], MatchPipe);
|
1980 | return MatchPipe;
|
1981 | }());
|
1982 |
|
1983 | var TestPipe = (function () {
|
1984 | function TestPipe() {
|
1985 | }
|
1986 | TestPipe.prototype.transform = function (text, pattern, flags) {
|
1987 | if (!isString(text)) {
|
1988 | return text;
|
1989 | }
|
1990 | return new RegExp(pattern, flags).test(text);
|
1991 | };
|
1992 | TestPipe = __decorate([
|
1993 | core.Pipe({ name: 'test' })
|
1994 | ], TestPipe);
|
1995 | return TestPipe;
|
1996 | }());
|
1997 |
|
1998 | var LeftPadPipe = (function () {
|
1999 | function LeftPadPipe() {
|
2000 | }
|
2001 | LeftPadPipe.prototype.transform = function (str, length, padCharacter) {
|
2002 | if (padCharacter === void 0) { padCharacter = ' '; }
|
2003 | if (!isString(str) || str.length >= length) {
|
2004 | return str;
|
2005 | }
|
2006 | while (str.length < length) {
|
2007 | str = padCharacter + str;
|
2008 | }
|
2009 | return str;
|
2010 | };
|
2011 | LeftPadPipe = __decorate([
|
2012 | core.Pipe({ name: 'lpad' })
|
2013 | ], LeftPadPipe);
|
2014 | return LeftPadPipe;
|
2015 | }());
|
2016 |
|
2017 | var RightPadPipe = (function () {
|
2018 | function RightPadPipe() {
|
2019 | }
|
2020 | RightPadPipe.prototype.transform = function (str, length, padCharacter) {
|
2021 | if (length === void 0) { length = 1; }
|
2022 | if (padCharacter === void 0) { padCharacter = ' '; }
|
2023 | if (!isString(str) || str.length >= length) {
|
2024 | return str;
|
2025 | }
|
2026 | while (str.length < length) {
|
2027 | str = str + padCharacter;
|
2028 | }
|
2029 | return str;
|
2030 | };
|
2031 | RightPadPipe = __decorate([
|
2032 | core.Pipe({ name: 'rpad' })
|
2033 | ], RightPadPipe);
|
2034 | return RightPadPipe;
|
2035 | }());
|
2036 |
|
2037 | var MakePluralStringPipe = (function () {
|
2038 | function MakePluralStringPipe() {
|
2039 | this.irregularMap = {
|
2040 | addendum: 'addenda',
|
2041 | alga: 'algae',
|
2042 | alumna: 'alumnae',
|
2043 | alumnus: 'alumni',
|
2044 | analysis: 'analyses',
|
2045 | antenna: 'antennae',
|
2046 | appendix: 'appendices',
|
2047 | aquarium: 'aquaria',
|
2048 | arch: 'arches',
|
2049 | axe: 'axes',
|
2050 | axis: 'axes',
|
2051 | bacillus: 'bacilli',
|
2052 | bacterium: 'bacteria',
|
2053 | basis: 'bases',
|
2054 | batch: 'batches',
|
2055 | beach: 'beaches',
|
2056 | beau: 'beaux',
|
2057 | bison: 'bison',
|
2058 | brush: 'brushes',
|
2059 | buffalo: 'buffaloes',
|
2060 | bureau: 'bureaus',
|
2061 | bus: 'busses',
|
2062 | cactus: 'cacti',
|
2063 | calf: 'calves',
|
2064 | chateau: 'chateaux',
|
2065 | cherry: 'cherries',
|
2066 | child: 'children',
|
2067 | church: 'churches',
|
2068 | circus: 'circuses',
|
2069 | cod: 'cod',
|
2070 | corps: 'corps',
|
2071 | corpus: 'corpora',
|
2072 | crisis: 'crises',
|
2073 | criterion: 'criteria',
|
2074 | curriculum: 'curricula',
|
2075 | datum: 'data',
|
2076 | deer: 'deer',
|
2077 | diagnosis: 'diagnoses',
|
2078 | die: 'dice',
|
2079 | domino: 'dominoes',
|
2080 | dwarf: 'dwarves',
|
2081 | echo: 'echoes',
|
2082 | elf: 'elves',
|
2083 | ellipsis: 'ellipses',
|
2084 | embargo: 'embargoes',
|
2085 | emphasis: 'emphases',
|
2086 | erratum: 'errata',
|
2087 | fax: 'faxes',
|
2088 | fireman: 'firemen',
|
2089 | fish: 'fish',
|
2090 | flush: 'flushes',
|
2091 | focus: 'foci',
|
2092 | foot: 'feet',
|
2093 | formula: 'formulas',
|
2094 | fungus: 'fungi',
|
2095 | genus: 'genera',
|
2096 | goose: 'geese',
|
2097 | grafito: 'grafiti',
|
2098 | half: 'halves',
|
2099 | hero: 'heroes',
|
2100 | hoax: 'hoaxes',
|
2101 | hoof: 'hooves',
|
2102 | hypothesis: 'hypotheses',
|
2103 | index: 'indices',
|
2104 | kiss: 'kisses',
|
2105 | knife: 'knives',
|
2106 | leaf: 'leaves',
|
2107 | life: 'lives',
|
2108 | loaf: 'loaves',
|
2109 | louse: 'lice',
|
2110 | man: 'men',
|
2111 | mango: 'mangoes',
|
2112 | matrix: 'matrices',
|
2113 | means: 'means',
|
2114 | medium: 'media',
|
2115 | memorandum: 'memoranda',
|
2116 | millennium: 'milennia',
|
2117 | moose: 'moose',
|
2118 | mosquito: 'mosquitoes',
|
2119 | motto: 'mottoes',
|
2120 | mouse: 'mice',
|
2121 | nebula: 'nebulae',
|
2122 | neurosis: 'neuroses',
|
2123 | nucleus: 'nuclei',
|
2124 | oasis: 'oases',
|
2125 | octopus: 'octopodes',
|
2126 | ovum: 'ova',
|
2127 | ox: 'oxen',
|
2128 | paralysis: 'paralyses',
|
2129 | parenthesis: 'parentheses',
|
2130 | person: 'people',
|
2131 | phenomenon: 'phenomena',
|
2132 | plateau: 'plateaux',
|
2133 | potato: 'potatoes',
|
2134 | quiz: 'quizzes',
|
2135 | radius: 'radii',
|
2136 | reflex: 'reflexes',
|
2137 | 'runner-up': 'runners-up',
|
2138 | scampo: 'scampi',
|
2139 | scarf: 'scarves',
|
2140 | scissors: 'scissors',
|
2141 | scratch: 'scratches',
|
2142 | self: 'selves',
|
2143 | series: 'series',
|
2144 | sheaf: 'sheaves',
|
2145 | sheep: 'sheep',
|
2146 | shelf: 'shelves',
|
2147 | 'son-in-law': 'sons-in-law',
|
2148 | species: 'species',
|
2149 | splash: 'splashes',
|
2150 | stimulus: 'stimuli',
|
2151 | stitch: 'stitches',
|
2152 | stratum: 'strata',
|
2153 | syllabus: 'syllabi',
|
2154 | symposium: 'symposia',
|
2155 | synopsis: 'synopses',
|
2156 | synthesis: 'syntheses',
|
2157 | tableau: 'tableaux',
|
2158 | tax: 'taxes',
|
2159 | that: 'those',
|
2160 | thesis: 'theses',
|
2161 | thief: 'thieves',
|
2162 | this: 'these',
|
2163 | tomato: 'tomatoes',
|
2164 | tooth: 'teeth',
|
2165 | tornado: 'tornadoes',
|
2166 | torpedo: 'torpedoes',
|
2167 | vertebra: 'vertebrae',
|
2168 | veto: 'vetoes',
|
2169 | vita: 'vitae',
|
2170 | volcano: 'volcanoes',
|
2171 | waltz: 'waltzes',
|
2172 | wash: 'washes',
|
2173 | watch: 'watches',
|
2174 | wharf: 'wharves',
|
2175 | wife: 'wives',
|
2176 | wolf: 'wolves',
|
2177 | woman: 'women',
|
2178 | zero: 'zeroes',
|
2179 | };
|
2180 | }
|
2181 | MakePluralStringPipe.prototype.transform = function (singularEntity, quantity) {
|
2182 | if (quantity === void 0) { quantity = 0; }
|
2183 | if (!singularEntity || singularEntity === '') {
|
2184 | return '';
|
2185 | }
|
2186 | if (quantity === 1) {
|
2187 | return singularEntity;
|
2188 | }
|
2189 | else {
|
2190 | var lastWord = singularEntity.trim().split(' ')[singularEntity.trim().split(' ').length - 1];
|
2191 | if (this.irregularMap[lastWord.toLocaleLowerCase()]) {
|
2192 | if (lastWord[0] === lastWord[0].toLocaleUpperCase()) {
|
2193 | return singularEntity.replace(lastWord, this.irregularMap[lastWord.toLocaleLowerCase()].replace(this.irregularMap[lastWord.toLocaleLowerCase()][0], this.irregularMap[lastWord.toLocaleLowerCase()][0].toLocaleUpperCase()));
|
2194 | }
|
2195 | return singularEntity.replace(lastWord, this.irregularMap[lastWord.toLocaleLowerCase()]);
|
2196 | }
|
2197 | else if (lastWord[lastWord.length - 1] === 'y') {
|
2198 |
|
2199 |
|
2200 |
|
2201 | return isVowel(lastWord[lastWord.length - 2])
|
2202 | ? singularEntity + 's'
|
2203 | : singularEntity.replace(lastWord, lastWord.slice(0, -1) + 'ies');
|
2204 | }
|
2205 | else if (lastWord[lastWord.length - 1] === 's') {
|
2206 | return singularEntity + 'es';
|
2207 | }
|
2208 | else {
|
2209 | return singularEntity + 's';
|
2210 | }
|
2211 | }
|
2212 | };
|
2213 | MakePluralStringPipe = __decorate([
|
2214 | core.Pipe({
|
2215 | name: 'makePluralString',
|
2216 | })
|
2217 | |
2218 |
|
2219 |
|
2220 |
|
2221 |
|
2222 |
|
2223 |
|
2224 |
|
2225 |
|
2226 |
|
2227 |
|
2228 |
|
2229 | ], MakePluralStringPipe);
|
2230 | return MakePluralStringPipe;
|
2231 | }());
|
2232 |
|
2233 | var WrapPipe = (function () {
|
2234 | function WrapPipe() {
|
2235 | }
|
2236 | WrapPipe.prototype.transform = function (str, prefix, suffix) {
|
2237 | if (prefix === void 0) { prefix = ''; }
|
2238 | if (suffix === void 0) { suffix = ''; }
|
2239 | if (!isString(str)) {
|
2240 | return str;
|
2241 | }
|
2242 | return (!!prefix && isString(prefix) ? prefix : '') + str + (!!suffix && isString(suffix) ? suffix : '');
|
2243 | };
|
2244 | WrapPipe = __decorate([
|
2245 | core.Pipe({ name: 'wrap' })
|
2246 | ], WrapPipe);
|
2247 | return WrapPipe;
|
2248 | }());
|
2249 |
|
2250 | var STRING_PIPES = [
|
2251 | AorAnPipe,
|
2252 | LeftTrimPipe,
|
2253 | RepeatPipe,
|
2254 | RightTrimPipe,
|
2255 | ScanPipe,
|
2256 | ShortenPipe,
|
2257 | StripTagsPipe,
|
2258 | TrimPipe,
|
2259 | UcFirstPipe,
|
2260 | UcWordsPipe,
|
2261 | SlugifyPipe,
|
2262 | CamelizePipe,
|
2263 | LatinisePipe,
|
2264 | LinesPipe,
|
2265 | UnderscorePipe,
|
2266 | MatchPipe,
|
2267 | TestPipe,
|
2268 | LeftPadPipe,
|
2269 | RightPadPipe,
|
2270 | MakePluralStringPipe,
|
2271 | WrapPipe,
|
2272 | ];
|
2273 | var NgStringPipesModule = (function () {
|
2274 | function NgStringPipesModule() {
|
2275 | }
|
2276 | NgStringPipesModule = __decorate([
|
2277 | core.NgModule({
|
2278 | declarations: STRING_PIPES,
|
2279 | imports: [],
|
2280 | exports: STRING_PIPES,
|
2281 | })
|
2282 | ], NgStringPipesModule);
|
2283 | return NgStringPipesModule;
|
2284 | }());
|
2285 |
|
2286 | var MaxPipe = (function () {
|
2287 | function MaxPipe() {
|
2288 | }
|
2289 | MaxPipe.prototype.transform = function (arr) {
|
2290 | return Array.isArray(arr) ? Math.max.apply(Math, __spread(arr)) : arr;
|
2291 | };
|
2292 | MaxPipe = __decorate([
|
2293 | core.Pipe({ name: 'max' })
|
2294 | ], MaxPipe);
|
2295 | return MaxPipe;
|
2296 | }());
|
2297 |
|
2298 | var MinPipe = (function () {
|
2299 | function MinPipe() {
|
2300 | }
|
2301 | MinPipe.prototype.transform = function (arr) {
|
2302 | return Array.isArray(arr) ? Math.min.apply(Math, __spread(arr)) : arr;
|
2303 | };
|
2304 | MinPipe = __decorate([
|
2305 | core.Pipe({ name: 'min' })
|
2306 | ], MinPipe);
|
2307 | return MinPipe;
|
2308 | }());
|
2309 |
|
2310 | var PercentagePipe = (function () {
|
2311 | function PercentagePipe() {
|
2312 | }
|
2313 | PercentagePipe.prototype.transform = function (num, total, floor) {
|
2314 | if (total === void 0) { total = 100; }
|
2315 | if (floor === void 0) { floor = false; }
|
2316 | if (isNaN(num)) {
|
2317 | return num;
|
2318 | }
|
2319 | var percent = (num * 100) / total;
|
2320 | return floor ? Math.floor(percent) : percent;
|
2321 | };
|
2322 | PercentagePipe = __decorate([
|
2323 | core.Pipe({ name: 'percentage' })
|
2324 | ], PercentagePipe);
|
2325 | return PercentagePipe;
|
2326 | }());
|
2327 |
|
2328 | var SumPipe = (function () {
|
2329 | function SumPipe() {
|
2330 | }
|
2331 | SumPipe.prototype.transform = function (arr) {
|
2332 | return Array.isArray(arr) ? arr.reduce(function (sum, curr) { return sum + curr; }, 0) : arr;
|
2333 | };
|
2334 | SumPipe = __decorate([
|
2335 | core.Pipe({ name: 'sum' })
|
2336 | ], SumPipe);
|
2337 | return SumPipe;
|
2338 | }());
|
2339 |
|
2340 | var FloorPipe = (function () {
|
2341 | function FloorPipe() {
|
2342 | }
|
2343 | FloorPipe.prototype.transform = function (num, precision) {
|
2344 | if (precision === void 0) { precision = 0; }
|
2345 | if (precision <= 0) {
|
2346 | return Math.floor(num);
|
2347 | }
|
2348 | var tho = Math.pow(10, precision);
|
2349 | return Math.floor(num * tho) / tho;
|
2350 | };
|
2351 | FloorPipe = __decorate([
|
2352 | core.Pipe({ name: 'floor' })
|
2353 | ], FloorPipe);
|
2354 | return FloorPipe;
|
2355 | }());
|
2356 |
|
2357 | var RoundPipe = (function () {
|
2358 | function RoundPipe() {
|
2359 | }
|
2360 | RoundPipe.prototype.transform = function (num, precision) {
|
2361 | if (precision === void 0) { precision = 0; }
|
2362 | return applyPrecision(num, precision);
|
2363 | };
|
2364 | RoundPipe = __decorate([
|
2365 | core.Pipe({ name: 'round' })
|
2366 | ], RoundPipe);
|
2367 | return RoundPipe;
|
2368 | }());
|
2369 |
|
2370 | var SqrtPipe = (function () {
|
2371 | function SqrtPipe() {
|
2372 | }
|
2373 | SqrtPipe.prototype.transform = function (num) {
|
2374 | return !isNaN(num) ? Math.sqrt(num) : num;
|
2375 | };
|
2376 | SqrtPipe = __decorate([
|
2377 | core.Pipe({ name: 'sqrt' })
|
2378 | ], SqrtPipe);
|
2379 | return SqrtPipe;
|
2380 | }());
|
2381 |
|
2382 | var PowerPipe = (function () {
|
2383 | function PowerPipe() {
|
2384 | }
|
2385 | PowerPipe.prototype.transform = function (num, power) {
|
2386 | if (power === void 0) { power = 2; }
|
2387 | return !isNaN(num) ? Math.pow(num, power) : num;
|
2388 | };
|
2389 | PowerPipe = __decorate([
|
2390 | core.Pipe({ name: 'pow' })
|
2391 | ], PowerPipe);
|
2392 | return PowerPipe;
|
2393 | }());
|
2394 |
|
2395 | var CeilPipe = (function () {
|
2396 | function CeilPipe() {
|
2397 | }
|
2398 | CeilPipe.prototype.transform = function (num, precision) {
|
2399 | if (precision === void 0) { precision = 0; }
|
2400 | if (precision <= 0) {
|
2401 | return Math.ceil(num);
|
2402 | }
|
2403 | var tho = Math.pow(10, precision);
|
2404 | return Math.ceil(num * tho) / tho;
|
2405 | };
|
2406 | CeilPipe = __decorate([
|
2407 | core.Pipe({ name: 'ceil' })
|
2408 | ], CeilPipe);
|
2409 | return CeilPipe;
|
2410 | }());
|
2411 |
|
2412 | var DegreesPipe = (function () {
|
2413 | function DegreesPipe() {
|
2414 | }
|
2415 | DegreesPipe.prototype.transform = function (radians) {
|
2416 | if (!isNumberFinite(radians)) {
|
2417 | return NaN;
|
2418 | }
|
2419 | return (radians * 180) / Math.PI;
|
2420 | };
|
2421 | DegreesPipe = __decorate([
|
2422 | core.Pipe({ name: 'degrees' })
|
2423 | ], DegreesPipe);
|
2424 | return DegreesPipe;
|
2425 | }());
|
2426 |
|
2427 | var BytesPipe = (function () {
|
2428 | function BytesPipe() {
|
2429 | this.dictionary = [
|
2430 | { max: 1024, type: 'B' },
|
2431 | { max: 1048576, type: 'KB' },
|
2432 | { max: 1073741824, type: 'MB' },
|
2433 | { max: 1.0995116e12, type: 'GB' },
|
2434 | ];
|
2435 | }
|
2436 | BytesPipe.prototype.transform = function (value, precision) {
|
2437 | if (!isNumberFinite(value)) {
|
2438 | return NaN;
|
2439 | }
|
2440 | var format = this.dictionary.find(function (d) { return value < d.max; }) || this.dictionary[this.dictionary.length - 1];
|
2441 | var calc = value / (format.max / 1024);
|
2442 | var num = isUndefined(precision) ? calc : applyPrecision(calc, precision);
|
2443 | return num + " " + format.type;
|
2444 | };
|
2445 | BytesPipe = __decorate([
|
2446 | core.Pipe({ name: 'bytes' })
|
2447 | ], BytesPipe);
|
2448 | return BytesPipe;
|
2449 | }());
|
2450 |
|
2451 | var RadiansPipe = (function () {
|
2452 | function RadiansPipe() {
|
2453 | }
|
2454 | RadiansPipe.prototype.transform = function (degrees) {
|
2455 | if (!isNumberFinite(degrees)) {
|
2456 | return NaN;
|
2457 | }
|
2458 | return (degrees * Math.PI) / 180;
|
2459 | };
|
2460 | RadiansPipe = __decorate([
|
2461 | core.Pipe({ name: 'radians' })
|
2462 | ], RadiansPipe);
|
2463 | return RadiansPipe;
|
2464 | }());
|
2465 |
|
2466 | var MATH_PIPES = [
|
2467 | MaxPipe,
|
2468 | MinPipe,
|
2469 | PercentagePipe,
|
2470 | SumPipe,
|
2471 | FloorPipe,
|
2472 | RoundPipe,
|
2473 | SqrtPipe,
|
2474 | PowerPipe,
|
2475 | CeilPipe,
|
2476 | DegreesPipe,
|
2477 | BytesPipe,
|
2478 | RadiansPipe,
|
2479 | ];
|
2480 | var NgMathPipesModule = (function () {
|
2481 | function NgMathPipesModule() {
|
2482 | }
|
2483 | NgMathPipesModule = __decorate([
|
2484 | core.NgModule({
|
2485 | declarations: MATH_PIPES,
|
2486 | imports: [],
|
2487 | exports: MATH_PIPES,
|
2488 | })
|
2489 | ], NgMathPipesModule);
|
2490 | return NgMathPipesModule;
|
2491 | }());
|
2492 |
|
2493 | var IsDefinedPipe = (function () {
|
2494 | function IsDefinedPipe() {
|
2495 | }
|
2496 | IsDefinedPipe.prototype.transform = function (input) {
|
2497 | return !isUndefined(input);
|
2498 | };
|
2499 | IsDefinedPipe = __decorate([
|
2500 | core.Pipe({ name: 'isDefined' })
|
2501 | ], IsDefinedPipe);
|
2502 | return IsDefinedPipe;
|
2503 | }());
|
2504 |
|
2505 | var IsNullPipe = (function () {
|
2506 | function IsNullPipe() {
|
2507 | }
|
2508 | IsNullPipe.prototype.transform = function (input) {
|
2509 | return input === null;
|
2510 | };
|
2511 | IsNullPipe = __decorate([
|
2512 | core.Pipe({ name: 'isNull' })
|
2513 | ], IsNullPipe);
|
2514 | return IsNullPipe;
|
2515 | }());
|
2516 |
|
2517 | var IsUndefinedPipe = (function () {
|
2518 | function IsUndefinedPipe() {
|
2519 | }
|
2520 | IsUndefinedPipe.prototype.transform = function (input) {
|
2521 | return isUndefined(input);
|
2522 | };
|
2523 | IsUndefinedPipe = __decorate([
|
2524 | core.Pipe({ name: 'isUndefined' })
|
2525 | ], IsUndefinedPipe);
|
2526 | return IsUndefinedPipe;
|
2527 | }());
|
2528 |
|
2529 | var IsStringPipe = (function () {
|
2530 | function IsStringPipe() {
|
2531 | }
|
2532 | IsStringPipe.prototype.transform = function (input) {
|
2533 | return isString(input);
|
2534 | };
|
2535 | IsStringPipe = __decorate([
|
2536 | core.Pipe({ name: 'isString' })
|
2537 | ], IsStringPipe);
|
2538 | return IsStringPipe;
|
2539 | }());
|
2540 |
|
2541 | var IsFunctionPipe = (function () {
|
2542 | function IsFunctionPipe() {
|
2543 | }
|
2544 | IsFunctionPipe.prototype.transform = function (input) {
|
2545 | return isFunction(input);
|
2546 | };
|
2547 | IsFunctionPipe = __decorate([
|
2548 | core.Pipe({ name: 'isFunction' })
|
2549 | ], IsFunctionPipe);
|
2550 | return IsFunctionPipe;
|
2551 | }());
|
2552 |
|
2553 | var IsNumberPipe = (function () {
|
2554 | function IsNumberPipe() {
|
2555 | }
|
2556 | IsNumberPipe.prototype.transform = function (input) {
|
2557 | return isNumber(input);
|
2558 | };
|
2559 | IsNumberPipe = __decorate([
|
2560 | core.Pipe({ name: 'isNumber' })
|
2561 | ], IsNumberPipe);
|
2562 | return IsNumberPipe;
|
2563 | }());
|
2564 |
|
2565 | var IsArrayPipe = (function () {
|
2566 | function IsArrayPipe() {
|
2567 | }
|
2568 | IsArrayPipe.prototype.transform = function (input) {
|
2569 | return Array.isArray(input);
|
2570 | };
|
2571 | IsArrayPipe = __decorate([
|
2572 | core.Pipe({ name: 'isArray' })
|
2573 | ], IsArrayPipe);
|
2574 | return IsArrayPipe;
|
2575 | }());
|
2576 |
|
2577 | var IsObjectPipe = (function () {
|
2578 | function IsObjectPipe() {
|
2579 | }
|
2580 | IsObjectPipe.prototype.transform = function (input) {
|
2581 | return isObject(input);
|
2582 | };
|
2583 | IsObjectPipe = __decorate([
|
2584 | core.Pipe({ name: 'isObject' })
|
2585 | ], IsObjectPipe);
|
2586 | return IsObjectPipe;
|
2587 | }());
|
2588 |
|
2589 | var IsGreaterEqualThanPipe = (function () {
|
2590 | function IsGreaterEqualThanPipe() {
|
2591 | }
|
2592 | IsGreaterEqualThanPipe.prototype.transform = function (input, other) {
|
2593 | return input >= other;
|
2594 | };
|
2595 | IsGreaterEqualThanPipe = __decorate([
|
2596 | core.Pipe({ name: 'isGreaterEqualThan' })
|
2597 | ], IsGreaterEqualThanPipe);
|
2598 | return IsGreaterEqualThanPipe;
|
2599 | }());
|
2600 |
|
2601 | var IsGreaterThanPipe = (function () {
|
2602 | function IsGreaterThanPipe() {
|
2603 | }
|
2604 | IsGreaterThanPipe.prototype.transform = function (input, other) {
|
2605 | return input > other;
|
2606 | };
|
2607 | IsGreaterThanPipe = __decorate([
|
2608 | core.Pipe({ name: 'isGreaterThan' })
|
2609 | ], IsGreaterThanPipe);
|
2610 | return IsGreaterThanPipe;
|
2611 | }());
|
2612 |
|
2613 | var IsLessEqualThanPipe = (function () {
|
2614 | function IsLessEqualThanPipe() {
|
2615 | }
|
2616 | IsLessEqualThanPipe.prototype.transform = function (input, other) {
|
2617 | return input <= other;
|
2618 | };
|
2619 | IsLessEqualThanPipe = __decorate([
|
2620 | core.Pipe({ name: 'isLessEqualThan' })
|
2621 | ], IsLessEqualThanPipe);
|
2622 | return IsLessEqualThanPipe;
|
2623 | }());
|
2624 |
|
2625 | var IsEqualToPipe = (function () {
|
2626 | function IsEqualToPipe() {
|
2627 | }
|
2628 | IsEqualToPipe.prototype.transform = function (input, other) {
|
2629 |
|
2630 | return input == other;
|
2631 | };
|
2632 | IsEqualToPipe = __decorate([
|
2633 | core.Pipe({ name: 'isEqualTo' })
|
2634 | ], IsEqualToPipe);
|
2635 | return IsEqualToPipe;
|
2636 | }());
|
2637 |
|
2638 | var IsNotEqualToPipe = (function () {
|
2639 | function IsNotEqualToPipe() {
|
2640 | }
|
2641 | IsNotEqualToPipe.prototype.transform = function (input, other) {
|
2642 |
|
2643 | return input != other;
|
2644 | };
|
2645 | IsNotEqualToPipe = __decorate([
|
2646 | core.Pipe({ name: 'isNotEqualTo' })
|
2647 | ], IsNotEqualToPipe);
|
2648 | return IsNotEqualToPipe;
|
2649 | }());
|
2650 |
|
2651 | var IsIdenticalToPipe = (function () {
|
2652 | function IsIdenticalToPipe() {
|
2653 | }
|
2654 | IsIdenticalToPipe.prototype.transform = function (input, other) {
|
2655 | return input === other;
|
2656 | };
|
2657 | IsIdenticalToPipe = __decorate([
|
2658 | core.Pipe({ name: 'isIdenticalTo' })
|
2659 | ], IsIdenticalToPipe);
|
2660 | return IsIdenticalToPipe;
|
2661 | }());
|
2662 |
|
2663 | var IsNotIdenticalToPipe = (function () {
|
2664 | function IsNotIdenticalToPipe() {
|
2665 | }
|
2666 | IsNotIdenticalToPipe.prototype.transform = function (input, other) {
|
2667 | return input !== other;
|
2668 | };
|
2669 | IsNotIdenticalToPipe = __decorate([
|
2670 | core.Pipe({ name: 'isNotIdenticalTo' })
|
2671 | ], IsNotIdenticalToPipe);
|
2672 | return IsNotIdenticalToPipe;
|
2673 | }());
|
2674 |
|
2675 | var IsLessThanPipe = (function () {
|
2676 | function IsLessThanPipe() {
|
2677 | }
|
2678 | IsLessThanPipe.prototype.transform = function (input, other) {
|
2679 | return input < other;
|
2680 | };
|
2681 | IsLessThanPipe = __decorate([
|
2682 | core.Pipe({ name: 'isLessThan' })
|
2683 | ], IsLessThanPipe);
|
2684 | return IsLessThanPipe;
|
2685 | }());
|
2686 |
|
2687 | var BOOLEAN_PIPES = [
|
2688 | IsDefinedPipe,
|
2689 | IsNullPipe,
|
2690 | IsUndefinedPipe,
|
2691 | IsStringPipe,
|
2692 | IsFunctionPipe,
|
2693 | IsNumberPipe,
|
2694 | IsArrayPipe,
|
2695 | IsObjectPipe,
|
2696 | IsGreaterEqualThanPipe,
|
2697 | IsGreaterThanPipe,
|
2698 | IsLessEqualThanPipe,
|
2699 | IsLessEqualThanPipe,
|
2700 | IsEqualToPipe,
|
2701 | IsNotEqualToPipe,
|
2702 | IsIdenticalToPipe,
|
2703 | IsNotIdenticalToPipe,
|
2704 | IsLessThanPipe,
|
2705 | ];
|
2706 | var NgBooleanPipesModule = (function () {
|
2707 | function NgBooleanPipesModule() {
|
2708 | }
|
2709 | NgBooleanPipesModule = __decorate([
|
2710 | core.NgModule({
|
2711 | declarations: BOOLEAN_PIPES,
|
2712 | imports: [],
|
2713 | exports: BOOLEAN_PIPES,
|
2714 | })
|
2715 | ], NgBooleanPipesModule);
|
2716 | return NgBooleanPipesModule;
|
2717 | }());
|
2718 |
|
2719 | var TimeAgoPipe = (function () {
|
2720 | function TimeAgoPipe() {
|
2721 | }
|
2722 | TimeAgoPipe_1 = TimeAgoPipe;
|
2723 | |
2724 |
|
2725 |
|
2726 |
|
2727 | TimeAgoPipe.prototype.transform = function (inputDate) {
|
2728 | if (!inputDate || (!inputDate.getTime && !inputDate.toDate)) {
|
2729 | return 'Invalid date';
|
2730 | }
|
2731 | var past = inputDate.toDate ? inputDate.toDate() : inputDate.getTime();
|
2732 | var now = +new Date();
|
2733 | if (past > now) {
|
2734 | return 'in the future';
|
2735 | }
|
2736 | for (var i = 0, l = TimeAgoPipe_1.MAPPER.length, ms = now - past, div = TimeAgoPipe_1.YEAR_MS; i < l; ++i) {
|
2737 | var elm = TimeAgoPipe_1.MAPPER[i];
|
2738 | var unit = Math.floor(ms / (div /= elm.div));
|
2739 | if (unit >= 1) {
|
2740 | return unit === 1 ? elm.single : unit + " " + elm.many + " ago";
|
2741 | }
|
2742 | }
|
2743 | return 'just now';
|
2744 | };
|
2745 | var TimeAgoPipe_1;
|
2746 | TimeAgoPipe.YEAR_MS = 1000 * 60 * 60 * 24 * 7 * 4 * 12;
|
2747 | TimeAgoPipe.MAPPER = [
|
2748 | { single: 'last year', many: 'years', div: 1 },
|
2749 | { single: 'last month', many: 'months', div: 12 },
|
2750 | { single: 'last week', many: 'weeks', div: 4 },
|
2751 | { single: 'yesterday', many: 'days', div: 7 },
|
2752 | { single: 'an hour ago', many: 'hours', div: 24 },
|
2753 | { single: 'just now', many: 'minutes', div: 60 },
|
2754 | ];
|
2755 | TimeAgoPipe = TimeAgoPipe_1 = __decorate([
|
2756 | core.Pipe({ name: 'timeAgo' })
|
2757 | ], TimeAgoPipe);
|
2758 | return TimeAgoPipe;
|
2759 | }());
|
2760 |
|
2761 | var DATE_PIPES = [TimeAgoPipe];
|
2762 | var NgDatePipesModule = (function () {
|
2763 | function NgDatePipesModule() {
|
2764 | }
|
2765 | NgDatePipesModule = __decorate([
|
2766 | core.NgModule({
|
2767 | declarations: DATE_PIPES,
|
2768 | imports: [],
|
2769 | exports: DATE_PIPES,
|
2770 | })
|
2771 | ], NgDatePipesModule);
|
2772 | return NgDatePipesModule;
|
2773 | }());
|
2774 |
|
2775 | var NgPipesModule = (function () {
|
2776 | function NgPipesModule() {
|
2777 | }
|
2778 | NgPipesModule = __decorate([
|
2779 | core.NgModule({
|
2780 | exports: [
|
2781 | NgArrayPipesModule,
|
2782 | NgStringPipesModule,
|
2783 | NgMathPipesModule,
|
2784 | NgBooleanPipesModule,
|
2785 | NgObjectPipesModule,
|
2786 | NgDatePipesModule,
|
2787 | ],
|
2788 | })
|
2789 | ], NgPipesModule);
|
2790 | return NgPipesModule;
|
2791 | }());
|
2792 |
|
2793 | exports.AorAnPipe = AorAnPipe;
|
2794 | exports.BOOLEAN_PIPES = BOOLEAN_PIPES;
|
2795 | exports.BytesPipe = BytesPipe;
|
2796 | exports.CamelizePipe = CamelizePipe;
|
2797 | exports.CeilPipe = CeilPipe;
|
2798 | exports.ChunkPipe = ChunkPipe;
|
2799 | exports.DATE_PIPES = DATE_PIPES;
|
2800 | exports.DegreesPipe = DegreesPipe;
|
2801 | exports.DiffObjPipe = DiffObjPipe;
|
2802 | exports.DiffPipe = DiffPipe;
|
2803 | exports.EveryPipe = EveryPipe;
|
2804 | exports.FilterByImpurePipe = FilterByImpurePipe;
|
2805 | exports.FilterByPipe = FilterByPipe;
|
2806 | exports.FlattenPipe = FlattenPipe;
|
2807 | exports.FloorPipe = FloorPipe;
|
2808 | exports.GroupByImpurePipe = GroupByImpurePipe;
|
2809 | exports.GroupByPipe = GroupByPipe;
|
2810 | exports.InitialPipe = InitialPipe;
|
2811 | exports.IntersectionPipe = IntersectionPipe;
|
2812 | exports.InvertByPipe = InvertByPipe;
|
2813 | exports.InvertPipe = InvertPipe;
|
2814 | exports.IsArrayPipe = IsArrayPipe;
|
2815 | exports.IsDefinedPipe = IsDefinedPipe;
|
2816 | exports.IsEqualToPipe = IsEqualToPipe;
|
2817 | exports.IsFunctionPipe = IsFunctionPipe;
|
2818 | exports.IsGreaterEqualThanPipe = IsGreaterEqualThanPipe;
|
2819 | exports.IsGreaterThanPipe = IsGreaterThanPipe;
|
2820 | exports.IsIdenticalToPipe = IsIdenticalToPipe;
|
2821 | exports.IsLessEqualThanPipe = IsLessEqualThanPipe;
|
2822 | exports.IsLessThanPipe = IsLessThanPipe;
|
2823 | exports.IsNotEqualToPipe = IsNotEqualToPipe;
|
2824 | exports.IsNotIdenticalToPipe = IsNotIdenticalToPipe;
|
2825 | exports.IsNullPipe = IsNullPipe;
|
2826 | exports.IsNumberPipe = IsNumberPipe;
|
2827 | exports.IsObjectPipe = IsObjectPipe;
|
2828 | exports.IsStringPipe = IsStringPipe;
|
2829 | exports.IsUndefinedPipe = IsUndefinedPipe;
|
2830 | exports.KeysPipe = KeysPipe;
|
2831 | exports.LatinisePipe = LatinisePipe;
|
2832 | exports.LeftPadPipe = LeftPadPipe;
|
2833 | exports.LeftTrimPipe = LeftTrimPipe;
|
2834 | exports.LinesPipe = LinesPipe;
|
2835 | exports.MATH_PIPES = MATH_PIPES;
|
2836 | exports.MakePluralStringPipe = MakePluralStringPipe;
|
2837 | exports.MatchPipe = MatchPipe;
|
2838 | exports.MaxPipe = MaxPipe;
|
2839 | exports.MinPipe = MinPipe;
|
2840 | exports.NgArrayPipesModule = NgArrayPipesModule;
|
2841 | exports.NgBooleanPipesModule = NgBooleanPipesModule;
|
2842 | exports.NgDatePipesModule = NgDatePipesModule;
|
2843 | exports.NgMathPipesModule = NgMathPipesModule;
|
2844 | exports.NgObjectPipesModule = NgObjectPipesModule;
|
2845 | exports.NgPipesModule = NgPipesModule;
|
2846 | exports.NgStringPipesModule = NgStringPipesModule;
|
2847 | exports.OmitPipe = OmitPipe;
|
2848 | exports.OrderByImpurePipe = OrderByImpurePipe;
|
2849 | exports.OrderByPipe = OrderByPipe;
|
2850 | exports.PairsPipe = PairsPipe;
|
2851 | exports.PercentagePipe = PercentagePipe;
|
2852 | exports.PickPipe = PickPipe;
|
2853 | exports.PluckPipe = PluckPipe;
|
2854 | exports.PowerPipe = PowerPipe;
|
2855 | exports.RangePipe = RangePipe;
|
2856 | exports.RepeatPipe = RepeatPipe;
|
2857 | exports.ReversePipe = ReversePipe;
|
2858 | exports.RightPadPipe = RightPadPipe;
|
2859 | exports.RightTrimPipe = RightTrimPipe;
|
2860 | exports.RoundPipe = RoundPipe;
|
2861 | exports.STRING_PIPES = STRING_PIPES;
|
2862 | exports.SamplePipe = SamplePipe;
|
2863 | exports.ScanPipe = ScanPipe;
|
2864 | exports.ShortenPipe = ShortenPipe;
|
2865 | exports.ShufflePipe = ShufflePipe;
|
2866 | exports.SlugifyPipe = SlugifyPipe;
|
2867 | exports.SomePipe = SomePipe;
|
2868 | exports.SqrtPipe = SqrtPipe;
|
2869 | exports.StripTagsPipe = StripTagsPipe;
|
2870 | exports.SumPipe = SumPipe;
|
2871 | exports.TailPipe = TailPipe;
|
2872 | exports.TestPipe = TestPipe;
|
2873 | exports.TimeAgoPipe = TimeAgoPipe;
|
2874 | exports.TrimPipe = TrimPipe;
|
2875 | exports.TrurthifyPipe = TrurthifyPipe;
|
2876 | exports.UcFirstPipe = UcFirstPipe;
|
2877 | exports.UcWordsPipe = UcWordsPipe;
|
2878 | exports.UnderscorePipe = UnderscorePipe;
|
2879 | exports.UnionPipe = UnionPipe;
|
2880 | exports.UniquePipe = UniquePipe;
|
2881 | exports.ValuesPipe = ValuesPipe;
|
2882 | exports.WithoutPipe = WithoutPipe;
|
2883 | exports.WrapPipe = WrapPipe;
|
2884 | exports.ɵa = isString;
|
2885 | exports.ɵb = FromPairsPipe;
|
2886 | exports.ɵc = RadiansPipe;
|
2887 |
|
2888 | Object.defineProperty(exports, '__esModule', { value: true });
|
2889 |
|
2890 | }));
|
2891 |
|