diff --git a/1.6.6/angular-1.6.6.zip b/1.6.6/angular-1.6.6.zip new file mode 100644 index 000000000..23d125b05 Binary files /dev/null and b/1.6.6/angular-1.6.6.zip differ diff --git a/1.6.6/angular-animate.js b/1.6.6/angular-animate.js new file mode 100644 index 000000000..c1c084df5 --- /dev/null +++ b/1.6.6/angular-animate.js @@ -0,0 +1,4154 @@ +/** + * @license AngularJS v1.6.6 + * (c) 2010-2017 Google, Inc. http://angularjs.org + * License: MIT + */ +(function(window, angular) {'use strict'; + +var ELEMENT_NODE = 1; +var COMMENT_NODE = 8; + +var ADD_CLASS_SUFFIX = '-add'; +var REMOVE_CLASS_SUFFIX = '-remove'; +var EVENT_CLASS_PREFIX = 'ng-'; +var ACTIVE_CLASS_SUFFIX = '-active'; +var PREPARE_CLASS_SUFFIX = '-prepare'; + +var NG_ANIMATE_CLASSNAME = 'ng-animate'; +var NG_ANIMATE_CHILDREN_DATA = '$$ngAnimateChildren'; + +// Detect proper transitionend/animationend event names. +var CSS_PREFIX = '', TRANSITION_PROP, TRANSITIONEND_EVENT, ANIMATION_PROP, ANIMATIONEND_EVENT; + +// If unprefixed events are not supported but webkit-prefixed are, use the latter. +// Otherwise, just use W3C names, browsers not supporting them at all will just ignore them. +// Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend` +// but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`. +// Register both events in case `window.onanimationend` is not supported because of that, +// do the same for `transitionend` as Safari is likely to exhibit similar behavior. +// Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit +// therefore there is no reason to test anymore for other vendor prefixes: +// http://caniuse.com/#search=transition +if ((window.ontransitionend === undefined) && (window.onwebkittransitionend !== undefined)) { + CSS_PREFIX = '-webkit-'; + TRANSITION_PROP = 'WebkitTransition'; + TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend'; +} else { + TRANSITION_PROP = 'transition'; + TRANSITIONEND_EVENT = 'transitionend'; +} + +if ((window.onanimationend === undefined) && (window.onwebkitanimationend !== undefined)) { + CSS_PREFIX = '-webkit-'; + ANIMATION_PROP = 'WebkitAnimation'; + ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend'; +} else { + ANIMATION_PROP = 'animation'; + ANIMATIONEND_EVENT = 'animationend'; +} + +var DURATION_KEY = 'Duration'; +var PROPERTY_KEY = 'Property'; +var DELAY_KEY = 'Delay'; +var TIMING_KEY = 'TimingFunction'; +var ANIMATION_ITERATION_COUNT_KEY = 'IterationCount'; +var ANIMATION_PLAYSTATE_KEY = 'PlayState'; +var SAFE_FAST_FORWARD_DURATION_VALUE = 9999; + +var ANIMATION_DELAY_PROP = ANIMATION_PROP + DELAY_KEY; +var ANIMATION_DURATION_PROP = ANIMATION_PROP + DURATION_KEY; +var TRANSITION_DELAY_PROP = TRANSITION_PROP + DELAY_KEY; +var TRANSITION_DURATION_PROP = TRANSITION_PROP + DURATION_KEY; + +var ngMinErr = angular.$$minErr('ng'); +function assertArg(arg, name, reason) { + if (!arg) { + throw ngMinErr('areq', 'Argument \'{0}\' is {1}', (name || '?'), (reason || 'required')); + } + return arg; +} + +function mergeClasses(a,b) { + if (!a && !b) return ''; + if (!a) return b; + if (!b) return a; + if (isArray(a)) a = a.join(' '); + if (isArray(b)) b = b.join(' '); + return a + ' ' + b; +} + +function packageStyles(options) { + var styles = {}; + if (options && (options.to || options.from)) { + styles.to = options.to; + styles.from = options.from; + } + return styles; +} + +function pendClasses(classes, fix, isPrefix) { + var className = ''; + classes = isArray(classes) + ? classes + : classes && isString(classes) && classes.length + ? classes.split(/\s+/) + : []; + forEach(classes, function(klass, i) { + if (klass && klass.length > 0) { + className += (i > 0) ? ' ' : ''; + className += isPrefix ? fix + klass + : klass + fix; + } + }); + return className; +} + +function removeFromArray(arr, val) { + var index = arr.indexOf(val); + if (val >= 0) { + arr.splice(index, 1); + } +} + +function stripCommentsFromElement(element) { + if (element instanceof jqLite) { + switch (element.length) { + case 0: + return element; + + case 1: + // there is no point of stripping anything if the element + // is the only element within the jqLite wrapper. + // (it's important that we retain the element instance.) + if (element[0].nodeType === ELEMENT_NODE) { + return element; + } + break; + + default: + return jqLite(extractElementNode(element)); + } + } + + if (element.nodeType === ELEMENT_NODE) { + return jqLite(element); + } +} + +function extractElementNode(element) { + if (!element[0]) return element; + for (var i = 0; i < element.length; i++) { + var elm = element[i]; + if (elm.nodeType === ELEMENT_NODE) { + return elm; + } + } +} + +function $$addClass($$jqLite, element, className) { + forEach(element, function(elm) { + $$jqLite.addClass(elm, className); + }); +} + +function $$removeClass($$jqLite, element, className) { + forEach(element, function(elm) { + $$jqLite.removeClass(elm, className); + }); +} + +function applyAnimationClassesFactory($$jqLite) { + return function(element, options) { + if (options.addClass) { + $$addClass($$jqLite, element, options.addClass); + options.addClass = null; + } + if (options.removeClass) { + $$removeClass($$jqLite, element, options.removeClass); + options.removeClass = null; + } + }; +} + +function prepareAnimationOptions(options) { + options = options || {}; + if (!options.$$prepared) { + var domOperation = options.domOperation || noop; + options.domOperation = function() { + options.$$domOperationFired = true; + domOperation(); + domOperation = noop; + }; + options.$$prepared = true; + } + return options; +} + +function applyAnimationStyles(element, options) { + applyAnimationFromStyles(element, options); + applyAnimationToStyles(element, options); +} + +function applyAnimationFromStyles(element, options) { + if (options.from) { + element.css(options.from); + options.from = null; + } +} + +function applyAnimationToStyles(element, options) { + if (options.to) { + element.css(options.to); + options.to = null; + } +} + +function mergeAnimationDetails(element, oldAnimation, newAnimation) { + var target = oldAnimation.options || {}; + var newOptions = newAnimation.options || {}; + + var toAdd = (target.addClass || '') + ' ' + (newOptions.addClass || ''); + var toRemove = (target.removeClass || '') + ' ' + (newOptions.removeClass || ''); + var classes = resolveElementClasses(element.attr('class'), toAdd, toRemove); + + if (newOptions.preparationClasses) { + target.preparationClasses = concatWithSpace(newOptions.preparationClasses, target.preparationClasses); + delete newOptions.preparationClasses; + } + + // noop is basically when there is no callback; otherwise something has been set + var realDomOperation = target.domOperation !== noop ? target.domOperation : null; + + extend(target, newOptions); + + // TODO(matsko or sreeramu): proper fix is to maintain all animation callback in array and call at last,but now only leave has the callback so no issue with this. + if (realDomOperation) { + target.domOperation = realDomOperation; + } + + if (classes.addClass) { + target.addClass = classes.addClass; + } else { + target.addClass = null; + } + + if (classes.removeClass) { + target.removeClass = classes.removeClass; + } else { + target.removeClass = null; + } + + oldAnimation.addClass = target.addClass; + oldAnimation.removeClass = target.removeClass; + + return target; +} + +function resolveElementClasses(existing, toAdd, toRemove) { + var ADD_CLASS = 1; + var REMOVE_CLASS = -1; + + var flags = {}; + existing = splitClassesToLookup(existing); + + toAdd = splitClassesToLookup(toAdd); + forEach(toAdd, function(value, key) { + flags[key] = ADD_CLASS; + }); + + toRemove = splitClassesToLookup(toRemove); + forEach(toRemove, function(value, key) { + flags[key] = flags[key] === ADD_CLASS ? null : REMOVE_CLASS; + }); + + var classes = { + addClass: '', + removeClass: '' + }; + + forEach(flags, function(val, klass) { + var prop, allow; + if (val === ADD_CLASS) { + prop = 'addClass'; + allow = !existing[klass] || existing[klass + REMOVE_CLASS_SUFFIX]; + } else if (val === REMOVE_CLASS) { + prop = 'removeClass'; + allow = existing[klass] || existing[klass + ADD_CLASS_SUFFIX]; + } + if (allow) { + if (classes[prop].length) { + classes[prop] += ' '; + } + classes[prop] += klass; + } + }); + + function splitClassesToLookup(classes) { + if (isString(classes)) { + classes = classes.split(' '); + } + + var obj = {}; + forEach(classes, function(klass) { + // sometimes the split leaves empty string values + // incase extra spaces were applied to the options + if (klass.length) { + obj[klass] = true; + } + }); + return obj; + } + + return classes; +} + +function getDomNode(element) { + return (element instanceof jqLite) ? element[0] : element; +} + +function applyGeneratedPreparationClasses(element, event, options) { + var classes = ''; + if (event) { + classes = pendClasses(event, EVENT_CLASS_PREFIX, true); + } + if (options.addClass) { + classes = concatWithSpace(classes, pendClasses(options.addClass, ADD_CLASS_SUFFIX)); + } + if (options.removeClass) { + classes = concatWithSpace(classes, pendClasses(options.removeClass, REMOVE_CLASS_SUFFIX)); + } + if (classes.length) { + options.preparationClasses = classes; + element.addClass(classes); + } +} + +function clearGeneratedClasses(element, options) { + if (options.preparationClasses) { + element.removeClass(options.preparationClasses); + options.preparationClasses = null; + } + if (options.activeClasses) { + element.removeClass(options.activeClasses); + options.activeClasses = null; + } +} + +function blockTransitions(node, duration) { + // we use a negative delay value since it performs blocking + // yet it doesn't kill any existing transitions running on the + // same element which makes this safe for class-based animations + var value = duration ? '-' + duration + 's' : ''; + applyInlineStyle(node, [TRANSITION_DELAY_PROP, value]); + return [TRANSITION_DELAY_PROP, value]; +} + +function blockKeyframeAnimations(node, applyBlock) { + var value = applyBlock ? 'paused' : ''; + var key = ANIMATION_PROP + ANIMATION_PLAYSTATE_KEY; + applyInlineStyle(node, [key, value]); + return [key, value]; +} + +function applyInlineStyle(node, styleTuple) { + var prop = styleTuple[0]; + var value = styleTuple[1]; + node.style[prop] = value; +} + +function concatWithSpace(a,b) { + if (!a) return b; + if (!b) return a; + return a + ' ' + b; +} + +var $$rAFSchedulerFactory = ['$$rAF', function($$rAF) { + var queue, cancelFn; + + function scheduler(tasks) { + // we make a copy since RAFScheduler mutates the state + // of the passed in array variable and this would be difficult + // to track down on the outside code + queue = queue.concat(tasks); + nextTick(); + } + + queue = scheduler.queue = []; + + /* waitUntilQuiet does two things: + * 1. It will run the FINAL `fn` value only when an uncanceled RAF has passed through + * 2. It will delay the next wave of tasks from running until the quiet `fn` has run. + * + * The motivation here is that animation code can request more time from the scheduler + * before the next wave runs. This allows for certain DOM properties such as classes to + * be resolved in time for the next animation to run. + */ + scheduler.waitUntilQuiet = function(fn) { + if (cancelFn) cancelFn(); + + cancelFn = $$rAF(function() { + cancelFn = null; + fn(); + nextTick(); + }); + }; + + return scheduler; + + function nextTick() { + if (!queue.length) return; + + var items = queue.shift(); + for (var i = 0; i < items.length; i++) { + items[i](); + } + + if (!cancelFn) { + $$rAF(function() { + if (!cancelFn) nextTick(); + }); + } + } +}]; + +/** + * @ngdoc directive + * @name ngAnimateChildren + * @restrict AE + * @element ANY + * + * @description + * + * ngAnimateChildren allows you to specify that children of this element should animate even if any + * of the children's parents are currently animating. By default, when an element has an active `enter`, `leave`, or `move` + * (structural) animation, child elements that also have an active structural animation are not animated. + * + * Note that even if `ngAnimateChildren` is set, no child animations will run when the parent element is removed from the DOM (`leave` animation). + * + * + * @param {string} ngAnimateChildren If the value is empty, `true` or `on`, + * then child animations are allowed. If the value is `false`, child animations are not allowed. + * + * @example + * + +
+ + +
+
+
+ List of items: +
Item {{item}}
+
+
+
+
+ + + .container.ng-enter, + .container.ng-leave { + transition: all ease 1.5s; + } + + .container.ng-enter, + .container.ng-leave-active { + opacity: 0; + } + + .container.ng-leave, + .container.ng-enter-active { + opacity: 1; + } + + .item { + background: firebrick; + color: #FFF; + margin-bottom: 10px; + } + + .item.ng-enter, + .item.ng-leave { + transition: transform 1.5s ease; + } + + .item.ng-enter { + transform: translateX(50px); + } + + .item.ng-enter-active { + transform: translateX(0); + } + + + angular.module('ngAnimateChildren', ['ngAnimate']) + .controller('MainController', function MainController() { + this.animateChildren = false; + this.enterElement = false; + }); + +
+ */ +var $$AnimateChildrenDirective = ['$interpolate', function($interpolate) { + return { + link: function(scope, element, attrs) { + var val = attrs.ngAnimateChildren; + if (isString(val) && val.length === 0) { //empty attribute + element.data(NG_ANIMATE_CHILDREN_DATA, true); + } else { + // Interpolate and set the value, so that it is available to + // animations that run right after compilation + setData($interpolate(val)(scope)); + attrs.$observe('ngAnimateChildren', setData); + } + + function setData(value) { + value = value === 'on' || value === 'true'; + element.data(NG_ANIMATE_CHILDREN_DATA, value); + } + } + }; +}]; + +/* exported $AnimateCssProvider */ + +var ANIMATE_TIMER_KEY = '$$animateCss'; + +/** + * @ngdoc service + * @name $animateCss + * @kind object + * + * @description + * The `$animateCss` service is a useful utility to trigger customized CSS-based transitions/keyframes + * from a JavaScript-based animation or directly from a directive. The purpose of `$animateCss` is NOT + * to side-step how `$animate` and ngAnimate work, but the goal is to allow pre-existing animations or + * directives to create more complex animations that can be purely driven using CSS code. + * + * Note that only browsers that support CSS transitions and/or keyframe animations are capable of + * rendering animations triggered via `$animateCss` (bad news for IE9 and lower). + * + * ## Usage + * Once again, `$animateCss` is designed to be used inside of a registered JavaScript animation that + * is powered by ngAnimate. It is possible to use `$animateCss` directly inside of a directive, however, + * any automatic control over cancelling animations and/or preventing animations from being run on + * child elements will not be handled by Angular. For this to work as expected, please use `$animate` to + * trigger the animation and then setup a JavaScript animation that injects `$animateCss` to trigger + * the CSS animation. + * + * The example below shows how we can create a folding animation on an element using `ng-if`: + * + * ```html + * + *
+ * This element will go BOOM + *
+ * + * ``` + * + * Now we create the **JavaScript animation** that will trigger the CSS transition: + * + * ```js + * ngModule.animation('.fold-animation', ['$animateCss', function($animateCss) { + * return { + * enter: function(element, doneFn) { + * var height = element[0].offsetHeight; + * return $animateCss(element, { + * from: { height:'0px' }, + * to: { height:height + 'px' }, + * duration: 1 // one second + * }); + * } + * } + * }]); + * ``` + * + * ## More Advanced Uses + * + * `$animateCss` is the underlying code that ngAnimate uses to power **CSS-based animations** behind the scenes. Therefore CSS hooks + * like `.ng-EVENT`, `.ng-EVENT-active`, `.ng-EVENT-stagger` are all features that can be triggered using `$animateCss` via JavaScript code. + * + * This also means that just about any combination of adding classes, removing classes, setting styles, dynamically setting a keyframe animation, + * applying a hardcoded duration or delay value, changing the animation easing or applying a stagger animation are all options that work with + * `$animateCss`. The service itself is smart enough to figure out the combination of options and examine the element styling properties in order + * to provide a working animation that will run in CSS. + * + * The example below showcases a more advanced version of the `.fold-animation` from the example above: + * + * ```js + * ngModule.animation('.fold-animation', ['$animateCss', function($animateCss) { + * return { + * enter: function(element, doneFn) { + * var height = element[0].offsetHeight; + * return $animateCss(element, { + * addClass: 'red large-text pulse-twice', + * easing: 'ease-out', + * from: { height:'0px' }, + * to: { height:height + 'px' }, + * duration: 1 // one second + * }); + * } + * } + * }]); + * ``` + * + * Since we're adding/removing CSS classes then the CSS transition will also pick those up: + * + * ```css + * /* since a hardcoded duration value of 1 was provided in the JavaScript animation code, + * the CSS classes below will be transitioned despite them being defined as regular CSS classes */ + * .red { background:red; } + * .large-text { font-size:20px; } + * + * /* we can also use a keyframe animation and $animateCss will make it work alongside the transition */ + * .pulse-twice { + * animation: 0.5s pulse linear 2; + * -webkit-animation: 0.5s pulse linear 2; + * } + * + * @keyframes pulse { + * from { transform: scale(0.5); } + * to { transform: scale(1.5); } + * } + * + * @-webkit-keyframes pulse { + * from { -webkit-transform: scale(0.5); } + * to { -webkit-transform: scale(1.5); } + * } + * ``` + * + * Given this complex combination of CSS classes, styles and options, `$animateCss` will figure everything out and make the animation happen. + * + * ## How the Options are handled + * + * `$animateCss` is very versatile and intelligent when it comes to figuring out what configurations to apply to the element to ensure the animation + * works with the options provided. Say for example we were adding a class that contained a keyframe value and we wanted to also animate some inline + * styles using the `from` and `to` properties. + * + * ```js + * var animator = $animateCss(element, { + * from: { background:'red' }, + * to: { background:'blue' } + * }); + * animator.start(); + * ``` + * + * ```css + * .rotating-animation { + * animation:0.5s rotate linear; + * -webkit-animation:0.5s rotate linear; + * } + * + * @keyframes rotate { + * from { transform: rotate(0deg); } + * to { transform: rotate(360deg); } + * } + * + * @-webkit-keyframes rotate { + * from { -webkit-transform: rotate(0deg); } + * to { -webkit-transform: rotate(360deg); } + * } + * ``` + * + * The missing pieces here are that we do not have a transition set (within the CSS code nor within the `$animateCss` options) and the duration of the animation is + * going to be detected from what the keyframe styles on the CSS class are. In this event, `$animateCss` will automatically create an inline transition + * style matching the duration detected from the keyframe style (which is present in the CSS class that is being added) and then prepare both the transition + * and keyframe animations to run in parallel on the element. Then when the animation is underway the provided `from` and `to` CSS styles will be applied + * and spread across the transition and keyframe animation. + * + * ## What is returned + * + * `$animateCss` works in two stages: a preparation phase and an animation phase. Therefore when `$animateCss` is first called it will NOT actually + * start the animation. All that is going on here is that the element is being prepared for the animation (which means that the generated CSS classes are + * added and removed on the element). Once `$animateCss` is called it will return an object with the following properties: + * + * ```js + * var animator = $animateCss(element, { ... }); + * ``` + * + * Now what do the contents of our `animator` variable look like: + * + * ```js + * { + * // starts the animation + * start: Function, + * + * // ends (aborts) the animation + * end: Function + * } + * ``` + * + * To actually start the animation we need to run `animation.start()` which will then return a promise that we can hook into to detect when the animation ends. + * If we choose not to run the animation then we MUST run `animation.end()` to perform a cleanup on the element (since some CSS classes and styles may have been + * applied to the element during the preparation phase). Note that all other properties such as duration, delay, transitions and keyframes are just properties + * and that changing them will not reconfigure the parameters of the animation. + * + * ### runner.done() vs runner.then() + * It is documented that `animation.start()` will return a promise object and this is true, however, there is also an additional method available on the + * runner called `.done(callbackFn)`. The done method works the same as `.finally(callbackFn)`, however, it does **not trigger a digest to occur**. + * Therefore, for performance reasons, it's always best to use `runner.done(callback)` instead of `runner.then()`, `runner.catch()` or `runner.finally()` + * unless you really need a digest to kick off afterwards. + * + * Keep in mind that, to make this easier, ngAnimate has tweaked the JS animations API to recognize when a runner instance is returned from $animateCss + * (so there is no need to call `runner.done(doneFn)` inside of your JavaScript animation code). + * Check the {@link ngAnimate.$animateCss#usage animation code above} to see how this works. + * + * @param {DOMElement} element the element that will be animated + * @param {object} options the animation-related options that will be applied during the animation + * + * * `event` - The DOM event (e.g. enter, leave, move). When used, a generated CSS class of `ng-EVENT` and `ng-EVENT-active` will be applied + * to the element during the animation. Multiple events can be provided when spaces are used as a separator. (Note that this will not perform any DOM operation.) + * * `structural` - Indicates that the `ng-` prefix will be added to the event class. Setting to `false` or omitting will turn `ng-EVENT` and + * `ng-EVENT-active` in `EVENT` and `EVENT-active`. Unused if `event` is omitted. + * * `easing` - The CSS easing value that will be applied to the transition or keyframe animation (or both). + * * `transitionStyle` - The raw CSS transition style that will be used (e.g. `1s linear all`). + * * `keyframeStyle` - The raw CSS keyframe animation style that will be used (e.g. `1s my_animation linear`). + * * `from` - The starting CSS styles (a key/value object) that will be applied at the start of the animation. + * * `to` - The ending CSS styles (a key/value object) that will be applied across the animation via a CSS transition. + * * `addClass` - A space separated list of CSS classes that will be added to the element and spread across the animation. + * * `removeClass` - A space separated list of CSS classes that will be removed from the element and spread across the animation. + * * `duration` - A number value representing the total duration of the transition and/or keyframe (note that a value of 1 is 1000ms). If a value of `0` + * is provided then the animation will be skipped entirely. + * * `delay` - A number value representing the total delay of the transition and/or keyframe (note that a value of 1 is 1000ms). If a value of `true` is + * used then whatever delay value is detected from the CSS classes will be mirrored on the elements styles (e.g. by setting delay true then the style value + * of the element will be `transition-delay: DETECTED_VALUE`). Using `true` is useful when you want the CSS classes and inline styles to all share the same + * CSS delay value. + * * `stagger` - A numeric time value representing the delay between successively animated elements + * ({@link ngAnimate#css-staggering-animations Click here to learn how CSS-based staggering works in ngAnimate.}) + * * `staggerIndex` - The numeric index representing the stagger item (e.g. a value of 5 is equal to the sixth item in the stagger; therefore when a + * `stagger` option value of `0.1` is used then there will be a stagger delay of `600ms`) + * * `applyClassesEarly` - Whether or not the classes being added or removed will be used when detecting the animation. This is set by `$animate` when enter/leave/move animations are fired to ensure that the CSS classes are resolved in time. (Note that this will prevent any transitions from occurring on the classes being added and removed.) + * * `cleanupStyles` - Whether or not the provided `from` and `to` styles will be removed once + * the animation is closed. This is useful for when the styles are used purely for the sake of + * the animation and do not have a lasting visual effect on the element (e.g. a collapse and open animation). + * By default this value is set to `false`. + * + * @return {object} an object with start and end methods and details about the animation. + * + * * `start` - The method to start the animation. This will return a `Promise` when called. + * * `end` - This method will cancel the animation and remove all applied CSS classes and styles. + */ +var ONE_SECOND = 1000; + +var ELAPSED_TIME_MAX_DECIMAL_PLACES = 3; +var CLOSING_TIME_BUFFER = 1.5; + +var DETECT_CSS_PROPERTIES = { + transitionDuration: TRANSITION_DURATION_PROP, + transitionDelay: TRANSITION_DELAY_PROP, + transitionProperty: TRANSITION_PROP + PROPERTY_KEY, + animationDuration: ANIMATION_DURATION_PROP, + animationDelay: ANIMATION_DELAY_PROP, + animationIterationCount: ANIMATION_PROP + ANIMATION_ITERATION_COUNT_KEY +}; + +var DETECT_STAGGER_CSS_PROPERTIES = { + transitionDuration: TRANSITION_DURATION_PROP, + transitionDelay: TRANSITION_DELAY_PROP, + animationDuration: ANIMATION_DURATION_PROP, + animationDelay: ANIMATION_DELAY_PROP +}; + +function getCssKeyframeDurationStyle(duration) { + return [ANIMATION_DURATION_PROP, duration + 's']; +} + +function getCssDelayStyle(delay, isKeyframeAnimation) { + var prop = isKeyframeAnimation ? ANIMATION_DELAY_PROP : TRANSITION_DELAY_PROP; + return [prop, delay + 's']; +} + +function computeCssStyles($window, element, properties) { + var styles = Object.create(null); + var detectedStyles = $window.getComputedStyle(element) || {}; + forEach(properties, function(formalStyleName, actualStyleName) { + var val = detectedStyles[formalStyleName]; + if (val) { + var c = val.charAt(0); + + // only numerical-based values have a negative sign or digit as the first value + if (c === '-' || c === '+' || c >= 0) { + val = parseMaxTime(val); + } + + // by setting this to null in the event that the delay is not set or is set directly as 0 + // then we can still allow for negative values to be used later on and not mistake this + // value for being greater than any other negative value. + if (val === 0) { + val = null; + } + styles[actualStyleName] = val; + } + }); + + return styles; +} + +function parseMaxTime(str) { + var maxValue = 0; + var values = str.split(/\s*,\s*/); + forEach(values, function(value) { + // it's always safe to consider only second values and omit `ms` values since + // getComputedStyle will always handle the conversion for us + if (value.charAt(value.length - 1) === 's') { + value = value.substring(0, value.length - 1); + } + value = parseFloat(value) || 0; + maxValue = maxValue ? Math.max(value, maxValue) : value; + }); + return maxValue; +} + +function truthyTimingValue(val) { + return val === 0 || val != null; +} + +function getCssTransitionDurationStyle(duration, applyOnlyDuration) { + var style = TRANSITION_PROP; + var value = duration + 's'; + if (applyOnlyDuration) { + style += DURATION_KEY; + } else { + value += ' linear all'; + } + return [style, value]; +} + +function createLocalCacheLookup() { + var cache = Object.create(null); + return { + flush: function() { + cache = Object.create(null); + }, + + count: function(key) { + var entry = cache[key]; + return entry ? entry.total : 0; + }, + + get: function(key) { + var entry = cache[key]; + return entry && entry.value; + }, + + put: function(key, value) { + if (!cache[key]) { + cache[key] = { total: 1, value: value }; + } else { + cache[key].total++; + } + } + }; +} + +// we do not reassign an already present style value since +// if we detect the style property value again we may be +// detecting styles that were added via the `from` styles. +// We make use of `isDefined` here since an empty string +// or null value (which is what getPropertyValue will return +// for a non-existing style) will still be marked as a valid +// value for the style (a falsy value implies that the style +// is to be removed at the end of the animation). If we had a simple +// "OR" statement then it would not be enough to catch that. +function registerRestorableStyles(backup, node, properties) { + forEach(properties, function(prop) { + backup[prop] = isDefined(backup[prop]) + ? backup[prop] + : node.style.getPropertyValue(prop); + }); +} + +var $AnimateCssProvider = ['$animateProvider', /** @this */ function($animateProvider) { + var gcsLookup = createLocalCacheLookup(); + var gcsStaggerLookup = createLocalCacheLookup(); + + this.$get = ['$window', '$$jqLite', '$$AnimateRunner', '$timeout', + '$$forceReflow', '$sniffer', '$$rAFScheduler', '$$animateQueue', + function($window, $$jqLite, $$AnimateRunner, $timeout, + $$forceReflow, $sniffer, $$rAFScheduler, $$animateQueue) { + + var applyAnimationClasses = applyAnimationClassesFactory($$jqLite); + + var parentCounter = 0; + function gcsHashFn(node, extraClasses) { + var KEY = '$$ngAnimateParentKey'; + var parentNode = node.parentNode; + var parentID = parentNode[KEY] || (parentNode[KEY] = ++parentCounter); + return parentID + '-' + node.getAttribute('class') + '-' + extraClasses; + } + + function computeCachedCssStyles(node, className, cacheKey, properties) { + var timings = gcsLookup.get(cacheKey); + + if (!timings) { + timings = computeCssStyles($window, node, properties); + if (timings.animationIterationCount === 'infinite') { + timings.animationIterationCount = 1; + } + } + + // we keep putting this in multiple times even though the value and the cacheKey are the same + // because we're keeping an internal tally of how many duplicate animations are detected. + gcsLookup.put(cacheKey, timings); + return timings; + } + + function computeCachedCssStaggerStyles(node, className, cacheKey, properties) { + var stagger; + + // if we have one or more existing matches of matching elements + // containing the same parent + CSS styles (which is how cacheKey works) + // then staggering is possible + if (gcsLookup.count(cacheKey) > 0) { + stagger = gcsStaggerLookup.get(cacheKey); + + if (!stagger) { + var staggerClassName = pendClasses(className, '-stagger'); + + $$jqLite.addClass(node, staggerClassName); + + stagger = computeCssStyles($window, node, properties); + + // force the conversion of a null value to zero incase not set + stagger.animationDuration = Math.max(stagger.animationDuration, 0); + stagger.transitionDuration = Math.max(stagger.transitionDuration, 0); + + $$jqLite.removeClass(node, staggerClassName); + + gcsStaggerLookup.put(cacheKey, stagger); + } + } + + return stagger || {}; + } + + var rafWaitQueue = []; + function waitUntilQuiet(callback) { + rafWaitQueue.push(callback); + $$rAFScheduler.waitUntilQuiet(function() { + gcsLookup.flush(); + gcsStaggerLookup.flush(); + + // DO NOT REMOVE THIS LINE OR REFACTOR OUT THE `pageWidth` variable. + // PLEASE EXAMINE THE `$$forceReflow` service to understand why. + var pageWidth = $$forceReflow(); + + // we use a for loop to ensure that if the queue is changed + // during this looping then it will consider new requests + for (var i = 0; i < rafWaitQueue.length; i++) { + rafWaitQueue[i](pageWidth); + } + rafWaitQueue.length = 0; + }); + } + + function computeTimings(node, className, cacheKey) { + var timings = computeCachedCssStyles(node, className, cacheKey, DETECT_CSS_PROPERTIES); + var aD = timings.animationDelay; + var tD = timings.transitionDelay; + timings.maxDelay = aD && tD + ? Math.max(aD, tD) + : (aD || tD); + timings.maxDuration = Math.max( + timings.animationDuration * timings.animationIterationCount, + timings.transitionDuration); + + return timings; + } + + return function init(element, initialOptions) { + // all of the animation functions should create + // a copy of the options data, however, if a + // parent service has already created a copy then + // we should stick to using that + var options = initialOptions || {}; + if (!options.$$prepared) { + options = prepareAnimationOptions(copy(options)); + } + + var restoreStyles = {}; + var node = getDomNode(element); + if (!node + || !node.parentNode + || !$$animateQueue.enabled()) { + return closeAndReturnNoopAnimator(); + } + + var temporaryStyles = []; + var classes = element.attr('class'); + var styles = packageStyles(options); + var animationClosed; + var animationPaused; + var animationCompleted; + var runner; + var runnerHost; + var maxDelay; + var maxDelayTime; + var maxDuration; + var maxDurationTime; + var startTime; + var events = []; + + if (options.duration === 0 || (!$sniffer.animations && !$sniffer.transitions)) { + return closeAndReturnNoopAnimator(); + } + + var method = options.event && isArray(options.event) + ? options.event.join(' ') + : options.event; + + var isStructural = method && options.structural; + var structuralClassName = ''; + var addRemoveClassName = ''; + + if (isStructural) { + structuralClassName = pendClasses(method, EVENT_CLASS_PREFIX, true); + } else if (method) { + structuralClassName = method; + } + + if (options.addClass) { + addRemoveClassName += pendClasses(options.addClass, ADD_CLASS_SUFFIX); + } + + if (options.removeClass) { + if (addRemoveClassName.length) { + addRemoveClassName += ' '; + } + addRemoveClassName += pendClasses(options.removeClass, REMOVE_CLASS_SUFFIX); + } + + // there may be a situation where a structural animation is combined together + // with CSS classes that need to resolve before the animation is computed. + // However this means that there is no explicit CSS code to block the animation + // from happening (by setting 0s none in the class name). If this is the case + // we need to apply the classes before the first rAF so we know to continue if + // there actually is a detected transition or keyframe animation + if (options.applyClassesEarly && addRemoveClassName.length) { + applyAnimationClasses(element, options); + } + + var preparationClasses = [structuralClassName, addRemoveClassName].join(' ').trim(); + var fullClassName = classes + ' ' + preparationClasses; + var activeClasses = pendClasses(preparationClasses, ACTIVE_CLASS_SUFFIX); + var hasToStyles = styles.to && Object.keys(styles.to).length > 0; + var containsKeyframeAnimation = (options.keyframeStyle || '').length > 0; + + // there is no way we can trigger an animation if no styles and + // no classes are being applied which would then trigger a transition, + // unless there a is raw keyframe value that is applied to the element. + if (!containsKeyframeAnimation + && !hasToStyles + && !preparationClasses) { + return closeAndReturnNoopAnimator(); + } + + var cacheKey, stagger; + if (options.stagger > 0) { + var staggerVal = parseFloat(options.stagger); + stagger = { + transitionDelay: staggerVal, + animationDelay: staggerVal, + transitionDuration: 0, + animationDuration: 0 + }; + } else { + cacheKey = gcsHashFn(node, fullClassName); + stagger = computeCachedCssStaggerStyles(node, preparationClasses, cacheKey, DETECT_STAGGER_CSS_PROPERTIES); + } + + if (!options.$$skipPreparationClasses) { + $$jqLite.addClass(element, preparationClasses); + } + + var applyOnlyDuration; + + if (options.transitionStyle) { + var transitionStyle = [TRANSITION_PROP, options.transitionStyle]; + applyInlineStyle(node, transitionStyle); + temporaryStyles.push(transitionStyle); + } + + if (options.duration >= 0) { + applyOnlyDuration = node.style[TRANSITION_PROP].length > 0; + var durationStyle = getCssTransitionDurationStyle(options.duration, applyOnlyDuration); + + // we set the duration so that it will be picked up by getComputedStyle later + applyInlineStyle(node, durationStyle); + temporaryStyles.push(durationStyle); + } + + if (options.keyframeStyle) { + var keyframeStyle = [ANIMATION_PROP, options.keyframeStyle]; + applyInlineStyle(node, keyframeStyle); + temporaryStyles.push(keyframeStyle); + } + + var itemIndex = stagger + ? options.staggerIndex >= 0 + ? options.staggerIndex + : gcsLookup.count(cacheKey) + : 0; + + var isFirst = itemIndex === 0; + + // this is a pre-emptive way of forcing the setup classes to be added and applied INSTANTLY + // without causing any combination of transitions to kick in. By adding a negative delay value + // it forces the setup class' transition to end immediately. We later then remove the negative + // transition delay to allow for the transition to naturally do it's thing. The beauty here is + // that if there is no transition defined then nothing will happen and this will also allow + // other transitions to be stacked on top of each other without any chopping them out. + if (isFirst && !options.skipBlocking) { + blockTransitions(node, SAFE_FAST_FORWARD_DURATION_VALUE); + } + + var timings = computeTimings(node, fullClassName, cacheKey); + var relativeDelay = timings.maxDelay; + maxDelay = Math.max(relativeDelay, 0); + maxDuration = timings.maxDuration; + + var flags = {}; + flags.hasTransitions = timings.transitionDuration > 0; + flags.hasAnimations = timings.animationDuration > 0; + flags.hasTransitionAll = flags.hasTransitions && timings.transitionProperty === 'all'; + flags.applyTransitionDuration = hasToStyles && ( + (flags.hasTransitions && !flags.hasTransitionAll) + || (flags.hasAnimations && !flags.hasTransitions)); + flags.applyAnimationDuration = options.duration && flags.hasAnimations; + flags.applyTransitionDelay = truthyTimingValue(options.delay) && (flags.applyTransitionDuration || flags.hasTransitions); + flags.applyAnimationDelay = truthyTimingValue(options.delay) && flags.hasAnimations; + flags.recalculateTimingStyles = addRemoveClassName.length > 0; + + if (flags.applyTransitionDuration || flags.applyAnimationDuration) { + maxDuration = options.duration ? parseFloat(options.duration) : maxDuration; + + if (flags.applyTransitionDuration) { + flags.hasTransitions = true; + timings.transitionDuration = maxDuration; + applyOnlyDuration = node.style[TRANSITION_PROP + PROPERTY_KEY].length > 0; + temporaryStyles.push(getCssTransitionDurationStyle(maxDuration, applyOnlyDuration)); + } + + if (flags.applyAnimationDuration) { + flags.hasAnimations = true; + timings.animationDuration = maxDuration; + temporaryStyles.push(getCssKeyframeDurationStyle(maxDuration)); + } + } + + if (maxDuration === 0 && !flags.recalculateTimingStyles) { + return closeAndReturnNoopAnimator(); + } + + if (options.delay != null) { + var delayStyle; + if (typeof options.delay !== 'boolean') { + delayStyle = parseFloat(options.delay); + // number in options.delay means we have to recalculate the delay for the closing timeout + maxDelay = Math.max(delayStyle, 0); + } + + if (flags.applyTransitionDelay) { + temporaryStyles.push(getCssDelayStyle(delayStyle)); + } + + if (flags.applyAnimationDelay) { + temporaryStyles.push(getCssDelayStyle(delayStyle, true)); + } + } + + // we need to recalculate the delay value since we used a pre-emptive negative + // delay value and the delay value is required for the final event checking. This + // property will ensure that this will happen after the RAF phase has passed. + if (options.duration == null && timings.transitionDuration > 0) { + flags.recalculateTimingStyles = flags.recalculateTimingStyles || isFirst; + } + + maxDelayTime = maxDelay * ONE_SECOND; + maxDurationTime = maxDuration * ONE_SECOND; + if (!options.skipBlocking) { + flags.blockTransition = timings.transitionDuration > 0; + flags.blockKeyframeAnimation = timings.animationDuration > 0 && + stagger.animationDelay > 0 && + stagger.animationDuration === 0; + } + + if (options.from) { + if (options.cleanupStyles) { + registerRestorableStyles(restoreStyles, node, Object.keys(options.from)); + } + applyAnimationFromStyles(element, options); + } + + if (flags.blockTransition || flags.blockKeyframeAnimation) { + applyBlocking(maxDuration); + } else if (!options.skipBlocking) { + blockTransitions(node, false); + } + + // TODO(matsko): for 1.5 change this code to have an animator object for better debugging + return { + $$willAnimate: true, + end: endFn, + start: function() { + if (animationClosed) return; + + runnerHost = { + end: endFn, + cancel: cancelFn, + resume: null, //this will be set during the start() phase + pause: null + }; + + runner = new $$AnimateRunner(runnerHost); + + waitUntilQuiet(start); + + // we don't have access to pause/resume the animation + // since it hasn't run yet. AnimateRunner will therefore + // set noop functions for resume and pause and they will + // later be overridden once the animation is triggered + return runner; + } + }; + + function endFn() { + close(); + } + + function cancelFn() { + close(true); + } + + function close(rejected) { + // if the promise has been called already then we shouldn't close + // the animation again + if (animationClosed || (animationCompleted && animationPaused)) return; + animationClosed = true; + animationPaused = false; + + if (!options.$$skipPreparationClasses) { + $$jqLite.removeClass(element, preparationClasses); + } + $$jqLite.removeClass(element, activeClasses); + + blockKeyframeAnimations(node, false); + blockTransitions(node, false); + + forEach(temporaryStyles, function(entry) { + // There is only one way to remove inline style properties entirely from elements. + // By using `removeProperty` this works, but we need to convert camel-cased CSS + // styles down to hyphenated values. + node.style[entry[0]] = ''; + }); + + applyAnimationClasses(element, options); + applyAnimationStyles(element, options); + + if (Object.keys(restoreStyles).length) { + forEach(restoreStyles, function(value, prop) { + if (value) { + node.style.setProperty(prop, value); + } else { + node.style.removeProperty(prop); + } + }); + } + + // the reason why we have this option is to allow a synchronous closing callback + // that is fired as SOON as the animation ends (when the CSS is removed) or if + // the animation never takes off at all. A good example is a leave animation since + // the element must be removed just after the animation is over or else the element + // will appear on screen for one animation frame causing an overbearing flicker. + if (options.onDone) { + options.onDone(); + } + + if (events && events.length) { + // Remove the transitionend / animationend listener(s) + element.off(events.join(' '), onAnimationProgress); + } + + //Cancel the fallback closing timeout and remove the timer data + var animationTimerData = element.data(ANIMATE_TIMER_KEY); + if (animationTimerData) { + $timeout.cancel(animationTimerData[0].timer); + element.removeData(ANIMATE_TIMER_KEY); + } + + // if the preparation function fails then the promise is not setup + if (runner) { + runner.complete(!rejected); + } + } + + function applyBlocking(duration) { + if (flags.blockTransition) { + blockTransitions(node, duration); + } + + if (flags.blockKeyframeAnimation) { + blockKeyframeAnimations(node, !!duration); + } + } + + function closeAndReturnNoopAnimator() { + runner = new $$AnimateRunner({ + end: endFn, + cancel: cancelFn + }); + + // should flush the cache animation + waitUntilQuiet(noop); + close(); + + return { + $$willAnimate: false, + start: function() { + return runner; + }, + end: endFn + }; + } + + function onAnimationProgress(event) { + event.stopPropagation(); + var ev = event.originalEvent || event; + + // we now always use `Date.now()` due to the recent changes with + // event.timeStamp in Firefox, Webkit and Chrome (see #13494 for more info) + var timeStamp = ev.$manualTimeStamp || Date.now(); + + /* Firefox (or possibly just Gecko) likes to not round values up + * when a ms measurement is used for the animation */ + var elapsedTime = parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES)); + + /* $manualTimeStamp is a mocked timeStamp value which is set + * within browserTrigger(). This is only here so that tests can + * mock animations properly. Real events fallback to event.timeStamp, + * or, if they don't, then a timeStamp is automatically created for them. + * We're checking to see if the timeStamp surpasses the expected delay, + * but we're using elapsedTime instead of the timeStamp on the 2nd + * pre-condition since animationPauseds sometimes close off early */ + if (Math.max(timeStamp - startTime, 0) >= maxDelayTime && elapsedTime >= maxDuration) { + // we set this flag to ensure that if the transition is paused then, when resumed, + // the animation will automatically close itself since transitions cannot be paused. + animationCompleted = true; + close(); + } + } + + function start() { + if (animationClosed) return; + if (!node.parentNode) { + close(); + return; + } + + // even though we only pause keyframe animations here the pause flag + // will still happen when transitions are used. Only the transition will + // not be paused since that is not possible. If the animation ends when + // paused then it will not complete until unpaused or cancelled. + var playPause = function(playAnimation) { + if (!animationCompleted) { + animationPaused = !playAnimation; + if (timings.animationDuration) { + var value = blockKeyframeAnimations(node, animationPaused); + if (animationPaused) { + temporaryStyles.push(value); + } else { + removeFromArray(temporaryStyles, value); + } + } + } else if (animationPaused && playAnimation) { + animationPaused = false; + close(); + } + }; + + // checking the stagger duration prevents an accidentally cascade of the CSS delay style + // being inherited from the parent. If the transition duration is zero then we can safely + // rely that the delay value is an intentional stagger delay style. + var maxStagger = itemIndex > 0 + && ((timings.transitionDuration && stagger.transitionDuration === 0) || + (timings.animationDuration && stagger.animationDuration === 0)) + && Math.max(stagger.animationDelay, stagger.transitionDelay); + if (maxStagger) { + $timeout(triggerAnimationStart, + Math.floor(maxStagger * itemIndex * ONE_SECOND), + false); + } else { + triggerAnimationStart(); + } + + // this will decorate the existing promise runner with pause/resume methods + runnerHost.resume = function() { + playPause(true); + }; + + runnerHost.pause = function() { + playPause(false); + }; + + function triggerAnimationStart() { + // just incase a stagger animation kicks in when the animation + // itself was cancelled entirely + if (animationClosed) return; + + applyBlocking(false); + + forEach(temporaryStyles, function(entry) { + var key = entry[0]; + var value = entry[1]; + node.style[key] = value; + }); + + applyAnimationClasses(element, options); + $$jqLite.addClass(element, activeClasses); + + if (flags.recalculateTimingStyles) { + fullClassName = node.getAttribute('class') + ' ' + preparationClasses; + cacheKey = gcsHashFn(node, fullClassName); + + timings = computeTimings(node, fullClassName, cacheKey); + relativeDelay = timings.maxDelay; + maxDelay = Math.max(relativeDelay, 0); + maxDuration = timings.maxDuration; + + if (maxDuration === 0) { + close(); + return; + } + + flags.hasTransitions = timings.transitionDuration > 0; + flags.hasAnimations = timings.animationDuration > 0; + } + + if (flags.applyAnimationDelay) { + relativeDelay = typeof options.delay !== 'boolean' && truthyTimingValue(options.delay) + ? parseFloat(options.delay) + : relativeDelay; + + maxDelay = Math.max(relativeDelay, 0); + timings.animationDelay = relativeDelay; + delayStyle = getCssDelayStyle(relativeDelay, true); + temporaryStyles.push(delayStyle); + node.style[delayStyle[0]] = delayStyle[1]; + } + + maxDelayTime = maxDelay * ONE_SECOND; + maxDurationTime = maxDuration * ONE_SECOND; + + if (options.easing) { + var easeProp, easeVal = options.easing; + if (flags.hasTransitions) { + easeProp = TRANSITION_PROP + TIMING_KEY; + temporaryStyles.push([easeProp, easeVal]); + node.style[easeProp] = easeVal; + } + if (flags.hasAnimations) { + easeProp = ANIMATION_PROP + TIMING_KEY; + temporaryStyles.push([easeProp, easeVal]); + node.style[easeProp] = easeVal; + } + } + + if (timings.transitionDuration) { + events.push(TRANSITIONEND_EVENT); + } + + if (timings.animationDuration) { + events.push(ANIMATIONEND_EVENT); + } + + startTime = Date.now(); + var timerTime = maxDelayTime + CLOSING_TIME_BUFFER * maxDurationTime; + var endTime = startTime + timerTime; + + var animationsData = element.data(ANIMATE_TIMER_KEY) || []; + var setupFallbackTimer = true; + if (animationsData.length) { + var currentTimerData = animationsData[0]; + setupFallbackTimer = endTime > currentTimerData.expectedEndTime; + if (setupFallbackTimer) { + $timeout.cancel(currentTimerData.timer); + } else { + animationsData.push(close); + } + } + + if (setupFallbackTimer) { + var timer = $timeout(onAnimationExpired, timerTime, false); + animationsData[0] = { + timer: timer, + expectedEndTime: endTime + }; + animationsData.push(close); + element.data(ANIMATE_TIMER_KEY, animationsData); + } + + if (events.length) { + element.on(events.join(' '), onAnimationProgress); + } + + if (options.to) { + if (options.cleanupStyles) { + registerRestorableStyles(restoreStyles, node, Object.keys(options.to)); + } + applyAnimationToStyles(element, options); + } + } + + function onAnimationExpired() { + var animationsData = element.data(ANIMATE_TIMER_KEY); + + // this will be false in the event that the element was + // removed from the DOM (via a leave animation or something + // similar) + if (animationsData) { + for (var i = 1; i < animationsData.length; i++) { + animationsData[i](); + } + element.removeData(ANIMATE_TIMER_KEY); + } + } + } + }; + }]; +}]; + +var $$AnimateCssDriverProvider = ['$$animationProvider', /** @this */ function($$animationProvider) { + $$animationProvider.drivers.push('$$animateCssDriver'); + + var NG_ANIMATE_SHIM_CLASS_NAME = 'ng-animate-shim'; + var NG_ANIMATE_ANCHOR_CLASS_NAME = 'ng-anchor'; + + var NG_OUT_ANCHOR_CLASS_NAME = 'ng-anchor-out'; + var NG_IN_ANCHOR_CLASS_NAME = 'ng-anchor-in'; + + function isDocumentFragment(node) { + return node.parentNode && node.parentNode.nodeType === 11; + } + + this.$get = ['$animateCss', '$rootScope', '$$AnimateRunner', '$rootElement', '$sniffer', '$$jqLite', '$document', + function($animateCss, $rootScope, $$AnimateRunner, $rootElement, $sniffer, $$jqLite, $document) { + + // only browsers that support these properties can render animations + if (!$sniffer.animations && !$sniffer.transitions) return noop; + + var bodyNode = $document[0].body; + var rootNode = getDomNode($rootElement); + + var rootBodyElement = jqLite( + // this is to avoid using something that exists outside of the body + // we also special case the doc fragment case because our unit test code + // appends the $rootElement to the body after the app has been bootstrapped + isDocumentFragment(rootNode) || bodyNode.contains(rootNode) ? rootNode : bodyNode + ); + + return function initDriverFn(animationDetails) { + return animationDetails.from && animationDetails.to + ? prepareFromToAnchorAnimation(animationDetails.from, + animationDetails.to, + animationDetails.classes, + animationDetails.anchors) + : prepareRegularAnimation(animationDetails); + }; + + function filterCssClasses(classes) { + //remove all the `ng-` stuff + return classes.replace(/\bng-\S+\b/g, ''); + } + + function getUniqueValues(a, b) { + if (isString(a)) a = a.split(' '); + if (isString(b)) b = b.split(' '); + return a.filter(function(val) { + return b.indexOf(val) === -1; + }).join(' '); + } + + function prepareAnchoredAnimation(classes, outAnchor, inAnchor) { + var clone = jqLite(getDomNode(outAnchor).cloneNode(true)); + var startingClasses = filterCssClasses(getClassVal(clone)); + + outAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME); + inAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME); + + clone.addClass(NG_ANIMATE_ANCHOR_CLASS_NAME); + + rootBodyElement.append(clone); + + var animatorIn, animatorOut = prepareOutAnimation(); + + // the user may not end up using the `out` animation and + // only making use of the `in` animation or vice-versa. + // In either case we should allow this and not assume the + // animation is over unless both animations are not used. + if (!animatorOut) { + animatorIn = prepareInAnimation(); + if (!animatorIn) { + return end(); + } + } + + var startingAnimator = animatorOut || animatorIn; + + return { + start: function() { + var runner; + + var currentAnimation = startingAnimator.start(); + currentAnimation.done(function() { + currentAnimation = null; + if (!animatorIn) { + animatorIn = prepareInAnimation(); + if (animatorIn) { + currentAnimation = animatorIn.start(); + currentAnimation.done(function() { + currentAnimation = null; + end(); + runner.complete(); + }); + return currentAnimation; + } + } + // in the event that there is no `in` animation + end(); + runner.complete(); + }); + + runner = new $$AnimateRunner({ + end: endFn, + cancel: endFn + }); + + return runner; + + function endFn() { + if (currentAnimation) { + currentAnimation.end(); + } + } + } + }; + + function calculateAnchorStyles(anchor) { + var styles = {}; + + var coords = getDomNode(anchor).getBoundingClientRect(); + + // we iterate directly since safari messes up and doesn't return + // all the keys for the coords object when iterated + forEach(['width','height','top','left'], function(key) { + var value = coords[key]; + switch (key) { + case 'top': + value += bodyNode.scrollTop; + break; + case 'left': + value += bodyNode.scrollLeft; + break; + } + styles[key] = Math.floor(value) + 'px'; + }); + return styles; + } + + function prepareOutAnimation() { + var animator = $animateCss(clone, { + addClass: NG_OUT_ANCHOR_CLASS_NAME, + delay: true, + from: calculateAnchorStyles(outAnchor) + }); + + // read the comment within `prepareRegularAnimation` to understand + // why this check is necessary + return animator.$$willAnimate ? animator : null; + } + + function getClassVal(element) { + return element.attr('class') || ''; + } + + function prepareInAnimation() { + var endingClasses = filterCssClasses(getClassVal(inAnchor)); + var toAdd = getUniqueValues(endingClasses, startingClasses); + var toRemove = getUniqueValues(startingClasses, endingClasses); + + var animator = $animateCss(clone, { + to: calculateAnchorStyles(inAnchor), + addClass: NG_IN_ANCHOR_CLASS_NAME + ' ' + toAdd, + removeClass: NG_OUT_ANCHOR_CLASS_NAME + ' ' + toRemove, + delay: true + }); + + // read the comment within `prepareRegularAnimation` to understand + // why this check is necessary + return animator.$$willAnimate ? animator : null; + } + + function end() { + clone.remove(); + outAnchor.removeClass(NG_ANIMATE_SHIM_CLASS_NAME); + inAnchor.removeClass(NG_ANIMATE_SHIM_CLASS_NAME); + } + } + + function prepareFromToAnchorAnimation(from, to, classes, anchors) { + var fromAnimation = prepareRegularAnimation(from, noop); + var toAnimation = prepareRegularAnimation(to, noop); + + var anchorAnimations = []; + forEach(anchors, function(anchor) { + var outElement = anchor['out']; + var inElement = anchor['in']; + var animator = prepareAnchoredAnimation(classes, outElement, inElement); + if (animator) { + anchorAnimations.push(animator); + } + }); + + // no point in doing anything when there are no elements to animate + if (!fromAnimation && !toAnimation && anchorAnimations.length === 0) return; + + return { + start: function() { + var animationRunners = []; + + if (fromAnimation) { + animationRunners.push(fromAnimation.start()); + } + + if (toAnimation) { + animationRunners.push(toAnimation.start()); + } + + forEach(anchorAnimations, function(animation) { + animationRunners.push(animation.start()); + }); + + var runner = new $$AnimateRunner({ + end: endFn, + cancel: endFn // CSS-driven animations cannot be cancelled, only ended + }); + + $$AnimateRunner.all(animationRunners, function(status) { + runner.complete(status); + }); + + return runner; + + function endFn() { + forEach(animationRunners, function(runner) { + runner.end(); + }); + } + } + }; + } + + function prepareRegularAnimation(animationDetails) { + var element = animationDetails.element; + var options = animationDetails.options || {}; + + if (animationDetails.structural) { + options.event = animationDetails.event; + options.structural = true; + options.applyClassesEarly = true; + + // we special case the leave animation since we want to ensure that + // the element is removed as soon as the animation is over. Otherwise + // a flicker might appear or the element may not be removed at all + if (animationDetails.event === 'leave') { + options.onDone = options.domOperation; + } + } + + // We assign the preparationClasses as the actual animation event since + // the internals of $animateCss will just suffix the event token values + // with `-active` to trigger the animation. + if (options.preparationClasses) { + options.event = concatWithSpace(options.event, options.preparationClasses); + } + + var animator = $animateCss(element, options); + + // the driver lookup code inside of $$animation attempts to spawn a + // driver one by one until a driver returns a.$$willAnimate animator object. + // $animateCss will always return an object, however, it will pass in + // a flag as a hint as to whether an animation was detected or not + return animator.$$willAnimate ? animator : null; + } + }]; +}]; + +// TODO(matsko): use caching here to speed things up for detection +// TODO(matsko): add documentation +// by the time... + +var $$AnimateJsProvider = ['$animateProvider', /** @this */ function($animateProvider) { + this.$get = ['$injector', '$$AnimateRunner', '$$jqLite', + function($injector, $$AnimateRunner, $$jqLite) { + + var applyAnimationClasses = applyAnimationClassesFactory($$jqLite); + // $animateJs(element, 'enter'); + return function(element, event, classes, options) { + var animationClosed = false; + + // the `classes` argument is optional and if it is not used + // then the classes will be resolved from the element's className + // property as well as options.addClass/options.removeClass. + if (arguments.length === 3 && isObject(classes)) { + options = classes; + classes = null; + } + + options = prepareAnimationOptions(options); + if (!classes) { + classes = element.attr('class') || ''; + if (options.addClass) { + classes += ' ' + options.addClass; + } + if (options.removeClass) { + classes += ' ' + options.removeClass; + } + } + + var classesToAdd = options.addClass; + var classesToRemove = options.removeClass; + + // the lookupAnimations function returns a series of animation objects that are + // matched up with one or more of the CSS classes. These animation objects are + // defined via the module.animation factory function. If nothing is detected then + // we don't return anything which then makes $animation query the next driver. + var animations = lookupAnimations(classes); + var before, after; + if (animations.length) { + var afterFn, beforeFn; + if (event === 'leave') { + beforeFn = 'leave'; + afterFn = 'afterLeave'; // TODO(matsko): get rid of this + } else { + beforeFn = 'before' + event.charAt(0).toUpperCase() + event.substr(1); + afterFn = event; + } + + if (event !== 'enter' && event !== 'move') { + before = packageAnimations(element, event, options, animations, beforeFn); + } + after = packageAnimations(element, event, options, animations, afterFn); + } + + // no matching animations + if (!before && !after) return; + + function applyOptions() { + options.domOperation(); + applyAnimationClasses(element, options); + } + + function close() { + animationClosed = true; + applyOptions(); + applyAnimationStyles(element, options); + } + + var runner; + + return { + $$willAnimate: true, + end: function() { + if (runner) { + runner.end(); + } else { + close(); + runner = new $$AnimateRunner(); + runner.complete(true); + } + return runner; + }, + start: function() { + if (runner) { + return runner; + } + + runner = new $$AnimateRunner(); + var closeActiveAnimations; + var chain = []; + + if (before) { + chain.push(function(fn) { + closeActiveAnimations = before(fn); + }); + } + + if (chain.length) { + chain.push(function(fn) { + applyOptions(); + fn(true); + }); + } else { + applyOptions(); + } + + if (after) { + chain.push(function(fn) { + closeActiveAnimations = after(fn); + }); + } + + runner.setHost({ + end: function() { + endAnimations(); + }, + cancel: function() { + endAnimations(true); + } + }); + + $$AnimateRunner.chain(chain, onComplete); + return runner; + + function onComplete(success) { + close(success); + runner.complete(success); + } + + function endAnimations(cancelled) { + if (!animationClosed) { + (closeActiveAnimations || noop)(cancelled); + onComplete(cancelled); + } + } + } + }; + + function executeAnimationFn(fn, element, event, options, onDone) { + var args; + switch (event) { + case 'animate': + args = [element, options.from, options.to, onDone]; + break; + + case 'setClass': + args = [element, classesToAdd, classesToRemove, onDone]; + break; + + case 'addClass': + args = [element, classesToAdd, onDone]; + break; + + case 'removeClass': + args = [element, classesToRemove, onDone]; + break; + + default: + args = [element, onDone]; + break; + } + + args.push(options); + + var value = fn.apply(fn, args); + if (value) { + if (isFunction(value.start)) { + value = value.start(); + } + + if (value instanceof $$AnimateRunner) { + value.done(onDone); + } else if (isFunction(value)) { + // optional onEnd / onCancel callback + return value; + } + } + + return noop; + } + + function groupEventedAnimations(element, event, options, animations, fnName) { + var operations = []; + forEach(animations, function(ani) { + var animation = ani[fnName]; + if (!animation) return; + + // note that all of these animations will run in parallel + operations.push(function() { + var runner; + var endProgressCb; + + var resolved = false; + var onAnimationComplete = function(rejected) { + if (!resolved) { + resolved = true; + (endProgressCb || noop)(rejected); + runner.complete(!rejected); + } + }; + + runner = new $$AnimateRunner({ + end: function() { + onAnimationComplete(); + }, + cancel: function() { + onAnimationComplete(true); + } + }); + + endProgressCb = executeAnimationFn(animation, element, event, options, function(result) { + var cancelled = result === false; + onAnimationComplete(cancelled); + }); + + return runner; + }); + }); + + return operations; + } + + function packageAnimations(element, event, options, animations, fnName) { + var operations = groupEventedAnimations(element, event, options, animations, fnName); + if (operations.length === 0) { + var a, b; + if (fnName === 'beforeSetClass') { + a = groupEventedAnimations(element, 'removeClass', options, animations, 'beforeRemoveClass'); + b = groupEventedAnimations(element, 'addClass', options, animations, 'beforeAddClass'); + } else if (fnName === 'setClass') { + a = groupEventedAnimations(element, 'removeClass', options, animations, 'removeClass'); + b = groupEventedAnimations(element, 'addClass', options, animations, 'addClass'); + } + + if (a) { + operations = operations.concat(a); + } + if (b) { + operations = operations.concat(b); + } + } + + if (operations.length === 0) return; + + // TODO(matsko): add documentation + return function startAnimation(callback) { + var runners = []; + if (operations.length) { + forEach(operations, function(animateFn) { + runners.push(animateFn()); + }); + } + + if (runners.length) { + $$AnimateRunner.all(runners, callback); + } else { + callback(); + } + + return function endFn(reject) { + forEach(runners, function(runner) { + if (reject) { + runner.cancel(); + } else { + runner.end(); + } + }); + }; + }; + } + }; + + function lookupAnimations(classes) { + classes = isArray(classes) ? classes : classes.split(' '); + var matches = [], flagMap = {}; + for (var i = 0; i < classes.length; i++) { + var klass = classes[i], + animationFactory = $animateProvider.$$registeredAnimations[klass]; + if (animationFactory && !flagMap[klass]) { + matches.push($injector.get(animationFactory)); + flagMap[klass] = true; + } + } + return matches; + } + }]; +}]; + +var $$AnimateJsDriverProvider = ['$$animationProvider', /** @this */ function($$animationProvider) { + $$animationProvider.drivers.push('$$animateJsDriver'); + this.$get = ['$$animateJs', '$$AnimateRunner', function($$animateJs, $$AnimateRunner) { + return function initDriverFn(animationDetails) { + if (animationDetails.from && animationDetails.to) { + var fromAnimation = prepareAnimation(animationDetails.from); + var toAnimation = prepareAnimation(animationDetails.to); + if (!fromAnimation && !toAnimation) return; + + return { + start: function() { + var animationRunners = []; + + if (fromAnimation) { + animationRunners.push(fromAnimation.start()); + } + + if (toAnimation) { + animationRunners.push(toAnimation.start()); + } + + $$AnimateRunner.all(animationRunners, done); + + var runner = new $$AnimateRunner({ + end: endFnFactory(), + cancel: endFnFactory() + }); + + return runner; + + function endFnFactory() { + return function() { + forEach(animationRunners, function(runner) { + // at this point we cannot cancel animations for groups just yet. 1.5+ + runner.end(); + }); + }; + } + + function done(status) { + runner.complete(status); + } + } + }; + } else { + return prepareAnimation(animationDetails); + } + }; + + function prepareAnimation(animationDetails) { + // TODO(matsko): make sure to check for grouped animations and delegate down to normal animations + var element = animationDetails.element; + var event = animationDetails.event; + var options = animationDetails.options; + var classes = animationDetails.classes; + return $$animateJs(element, event, classes, options); + } + }]; +}]; + +var NG_ANIMATE_ATTR_NAME = 'data-ng-animate'; +var NG_ANIMATE_PIN_DATA = '$ngAnimatePin'; +var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animateProvider) { + var PRE_DIGEST_STATE = 1; + var RUNNING_STATE = 2; + var ONE_SPACE = ' '; + + var rules = this.rules = { + skip: [], + cancel: [], + join: [] + }; + + function makeTruthyCssClassMap(classString) { + if (!classString) { + return null; + } + + var keys = classString.split(ONE_SPACE); + var map = Object.create(null); + + forEach(keys, function(key) { + map[key] = true; + }); + return map; + } + + function hasMatchingClasses(newClassString, currentClassString) { + if (newClassString && currentClassString) { + var currentClassMap = makeTruthyCssClassMap(currentClassString); + return newClassString.split(ONE_SPACE).some(function(className) { + return currentClassMap[className]; + }); + } + } + + function isAllowed(ruleType, currentAnimation, previousAnimation) { + return rules[ruleType].some(function(fn) { + return fn(currentAnimation, previousAnimation); + }); + } + + function hasAnimationClasses(animation, and) { + var a = (animation.addClass || '').length > 0; + var b = (animation.removeClass || '').length > 0; + return and ? a && b : a || b; + } + + rules.join.push(function(newAnimation, currentAnimation) { + // if the new animation is class-based then we can just tack that on + return !newAnimation.structural && hasAnimationClasses(newAnimation); + }); + + rules.skip.push(function(newAnimation, currentAnimation) { + // there is no need to animate anything if no classes are being added and + // there is no structural animation that will be triggered + return !newAnimation.structural && !hasAnimationClasses(newAnimation); + }); + + rules.skip.push(function(newAnimation, currentAnimation) { + // why should we trigger a new structural animation if the element will + // be removed from the DOM anyway? + return currentAnimation.event === 'leave' && newAnimation.structural; + }); + + rules.skip.push(function(newAnimation, currentAnimation) { + // if there is an ongoing current animation then don't even bother running the class-based animation + return currentAnimation.structural && currentAnimation.state === RUNNING_STATE && !newAnimation.structural; + }); + + rules.cancel.push(function(newAnimation, currentAnimation) { + // there can never be two structural animations running at the same time + return currentAnimation.structural && newAnimation.structural; + }); + + rules.cancel.push(function(newAnimation, currentAnimation) { + // if the previous animation is already running, but the new animation will + // be triggered, but the new animation is structural + return currentAnimation.state === RUNNING_STATE && newAnimation.structural; + }); + + rules.cancel.push(function(newAnimation, currentAnimation) { + // cancel the animation if classes added / removed in both animation cancel each other out, + // but only if the current animation isn't structural + + if (currentAnimation.structural) return false; + + var nA = newAnimation.addClass; + var nR = newAnimation.removeClass; + var cA = currentAnimation.addClass; + var cR = currentAnimation.removeClass; + + // early detection to save the global CPU shortage :) + if ((isUndefined(nA) && isUndefined(nR)) || (isUndefined(cA) && isUndefined(cR))) { + return false; + } + + return hasMatchingClasses(nA, cR) || hasMatchingClasses(nR, cA); + }); + + this.$get = ['$$rAF', '$rootScope', '$rootElement', '$document', '$$Map', + '$$animation', '$$AnimateRunner', '$templateRequest', '$$jqLite', '$$forceReflow', + '$$isDocumentHidden', + function($$rAF, $rootScope, $rootElement, $document, $$Map, + $$animation, $$AnimateRunner, $templateRequest, $$jqLite, $$forceReflow, + $$isDocumentHidden) { + + var activeAnimationsLookup = new $$Map(); + var disabledElementsLookup = new $$Map(); + var animationsEnabled = null; + + function postDigestTaskFactory() { + var postDigestCalled = false; + return function(fn) { + // we only issue a call to postDigest before + // it has first passed. This prevents any callbacks + // from not firing once the animation has completed + // since it will be out of the digest cycle. + if (postDigestCalled) { + fn(); + } else { + $rootScope.$$postDigest(function() { + postDigestCalled = true; + fn(); + }); + } + }; + } + + // Wait until all directive and route-related templates are downloaded and + // compiled. The $templateRequest.totalPendingRequests variable keeps track of + // all of the remote templates being currently downloaded. If there are no + // templates currently downloading then the watcher will still fire anyway. + var deregisterWatch = $rootScope.$watch( + function() { return $templateRequest.totalPendingRequests === 0; }, + function(isEmpty) { + if (!isEmpty) return; + deregisterWatch(); + + // Now that all templates have been downloaded, $animate will wait until + // the post digest queue is empty before enabling animations. By having two + // calls to $postDigest calls we can ensure that the flag is enabled at the + // very end of the post digest queue. Since all of the animations in $animate + // use $postDigest, it's important that the code below executes at the end. + // This basically means that the page is fully downloaded and compiled before + // any animations are triggered. + $rootScope.$$postDigest(function() { + $rootScope.$$postDigest(function() { + // we check for null directly in the event that the application already called + // .enabled() with whatever arguments that it provided it with + if (animationsEnabled === null) { + animationsEnabled = true; + } + }); + }); + } + ); + + var callbackRegistry = Object.create(null); + + // remember that the `customFilter`/`classNameFilter` are set during the + // provider/config stage therefore we can optimize here and setup helper functions + var customFilter = $animateProvider.customFilter(); + var classNameFilter = $animateProvider.classNameFilter(); + var returnTrue = function() { return true; }; + + var isAnimatableByFilter = customFilter || returnTrue; + var isAnimatableClassName = !classNameFilter ? returnTrue : function(node, options) { + var className = [node.getAttribute('class'), options.addClass, options.removeClass].join(' '); + return classNameFilter.test(className); + }; + + var applyAnimationClasses = applyAnimationClassesFactory($$jqLite); + + function normalizeAnimationDetails(element, animation) { + return mergeAnimationDetails(element, animation, {}); + } + + // IE9-11 has no method "contains" in SVG element and in Node.prototype. Bug #10259. + var contains = window.Node.prototype.contains || /** @this */ function(arg) { + // eslint-disable-next-line no-bitwise + return this === arg || !!(this.compareDocumentPosition(arg) & 16); + }; + + function findCallbacks(targetParentNode, targetNode, event) { + var matches = []; + var entries = callbackRegistry[event]; + if (entries) { + forEach(entries, function(entry) { + if (contains.call(entry.node, targetNode)) { + matches.push(entry.callback); + } else if (event === 'leave' && contains.call(entry.node, targetParentNode)) { + matches.push(entry.callback); + } + }); + } + + return matches; + } + + function filterFromRegistry(list, matchContainer, matchCallback) { + var containerNode = extractElementNode(matchContainer); + return list.filter(function(entry) { + var isMatch = entry.node === containerNode && + (!matchCallback || entry.callback === matchCallback); + return !isMatch; + }); + } + + function cleanupEventListeners(phase, node) { + if (phase === 'close' && !node.parentNode) { + // If the element is not attached to a parentNode, it has been removed by + // the domOperation, and we can safely remove the event callbacks + $animate.off(node); + } + } + + var $animate = { + on: function(event, container, callback) { + var node = extractElementNode(container); + callbackRegistry[event] = callbackRegistry[event] || []; + callbackRegistry[event].push({ + node: node, + callback: callback + }); + + // Remove the callback when the element is removed from the DOM + jqLite(container).on('$destroy', function() { + var animationDetails = activeAnimationsLookup.get(node); + + if (!animationDetails) { + // If there's an animation ongoing, the callback calling code will remove + // the event listeners. If we'd remove here, the callbacks would be removed + // before the animation ends + $animate.off(event, container, callback); + } + }); + }, + + off: function(event, container, callback) { + if (arguments.length === 1 && !isString(arguments[0])) { + container = arguments[0]; + for (var eventType in callbackRegistry) { + callbackRegistry[eventType] = filterFromRegistry(callbackRegistry[eventType], container); + } + + return; + } + + var entries = callbackRegistry[event]; + if (!entries) return; + + callbackRegistry[event] = arguments.length === 1 + ? null + : filterFromRegistry(entries, container, callback); + }, + + pin: function(element, parentElement) { + assertArg(isElement(element), 'element', 'not an element'); + assertArg(isElement(parentElement), 'parentElement', 'not an element'); + element.data(NG_ANIMATE_PIN_DATA, parentElement); + }, + + push: function(element, event, options, domOperation) { + options = options || {}; + options.domOperation = domOperation; + return queueAnimation(element, event, options); + }, + + // this method has four signatures: + // () - global getter + // (bool) - global setter + // (element) - element getter + // (element, bool) - element setter + enabled: function(element, bool) { + var argCount = arguments.length; + + if (argCount === 0) { + // () - Global getter + bool = !!animationsEnabled; + } else { + var hasElement = isElement(element); + + if (!hasElement) { + // (bool) - Global setter + bool = animationsEnabled = !!element; + } else { + var node = getDomNode(element); + + if (argCount === 1) { + // (element) - Element getter + bool = !disabledElementsLookup.get(node); + } else { + // (element, bool) - Element setter + disabledElementsLookup.set(node, !bool); + } + } + } + + return bool; + } + }; + + return $animate; + + function queueAnimation(originalElement, event, initialOptions) { + // we always make a copy of the options since + // there should never be any side effects on + // the input data when running `$animateCss`. + var options = copy(initialOptions); + + var element = stripCommentsFromElement(originalElement); + var node = getDomNode(element); + var parentNode = node && node.parentNode; + + options = prepareAnimationOptions(options); + + // we create a fake runner with a working promise. + // These methods will become available after the digest has passed + var runner = new $$AnimateRunner(); + + // this is used to trigger callbacks in postDigest mode + var runInNextPostDigestOrNow = postDigestTaskFactory(); + + if (isArray(options.addClass)) { + options.addClass = options.addClass.join(' '); + } + + if (options.addClass && !isString(options.addClass)) { + options.addClass = null; + } + + if (isArray(options.removeClass)) { + options.removeClass = options.removeClass.join(' '); + } + + if (options.removeClass && !isString(options.removeClass)) { + options.removeClass = null; + } + + if (options.from && !isObject(options.from)) { + options.from = null; + } + + if (options.to && !isObject(options.to)) { + options.to = null; + } + + // If animations are hard-disabled for the whole application there is no need to continue. + // There are also situations where a directive issues an animation for a jqLite wrapper that + // contains only comment nodes. In this case, there is no way we can perform an animation. + if (!animationsEnabled || + !node || + !isAnimatableByFilter(node, event, initialOptions) || + !isAnimatableClassName(node, options)) { + close(); + return runner; + } + + var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0; + + var documentHidden = $$isDocumentHidden(); + + // This is a hard disable of all animations the element itself, therefore there is no need to + // continue further past this point if not enabled + // Animations are also disabled if the document is currently hidden (page is not visible + // to the user), because browsers slow down or do not flush calls to requestAnimationFrame + var skipAnimations = documentHidden || disabledElementsLookup.get(node); + var existingAnimation = (!skipAnimations && activeAnimationsLookup.get(node)) || {}; + var hasExistingAnimation = !!existingAnimation.state; + + // there is no point in traversing the same collection of parent ancestors if a followup + // animation will be run on the same element that already did all that checking work + if (!skipAnimations && (!hasExistingAnimation || existingAnimation.state !== PRE_DIGEST_STATE)) { + skipAnimations = !areAnimationsAllowed(node, parentNode, event); + } + + if (skipAnimations) { + // Callbacks should fire even if the document is hidden (regression fix for issue #14120) + if (documentHidden) notifyProgress(runner, event, 'start'); + close(); + if (documentHidden) notifyProgress(runner, event, 'close'); + return runner; + } + + if (isStructural) { + closeChildAnimations(node); + } + + var newAnimation = { + structural: isStructural, + element: element, + event: event, + addClass: options.addClass, + removeClass: options.removeClass, + close: close, + options: options, + runner: runner + }; + + if (hasExistingAnimation) { + var skipAnimationFlag = isAllowed('skip', newAnimation, existingAnimation); + if (skipAnimationFlag) { + if (existingAnimation.state === RUNNING_STATE) { + close(); + return runner; + } else { + mergeAnimationDetails(element, existingAnimation, newAnimation); + return existingAnimation.runner; + } + } + var cancelAnimationFlag = isAllowed('cancel', newAnimation, existingAnimation); + if (cancelAnimationFlag) { + if (existingAnimation.state === RUNNING_STATE) { + // this will end the animation right away and it is safe + // to do so since the animation is already running and the + // runner callback code will run in async + existingAnimation.runner.end(); + } else if (existingAnimation.structural) { + // this means that the animation is queued into a digest, but + // hasn't started yet. Therefore it is safe to run the close + // method which will call the runner methods in async. + existingAnimation.close(); + } else { + // this will merge the new animation options into existing animation options + mergeAnimationDetails(element, existingAnimation, newAnimation); + + return existingAnimation.runner; + } + } else { + // a joined animation means that this animation will take over the existing one + // so an example would involve a leave animation taking over an enter. Then when + // the postDigest kicks in the enter will be ignored. + var joinAnimationFlag = isAllowed('join', newAnimation, existingAnimation); + if (joinAnimationFlag) { + if (existingAnimation.state === RUNNING_STATE) { + normalizeAnimationDetails(element, newAnimation); + } else { + applyGeneratedPreparationClasses(element, isStructural ? event : null, options); + + event = newAnimation.event = existingAnimation.event; + options = mergeAnimationDetails(element, existingAnimation, newAnimation); + + //we return the same runner since only the option values of this animation will + //be fed into the `existingAnimation`. + return existingAnimation.runner; + } + } + } + } else { + // normalization in this case means that it removes redundant CSS classes that + // already exist (addClass) or do not exist (removeClass) on the element + normalizeAnimationDetails(element, newAnimation); + } + + // when the options are merged and cleaned up we may end up not having to do + // an animation at all, therefore we should check this before issuing a post + // digest callback. Structural animations will always run no matter what. + var isValidAnimation = newAnimation.structural; + if (!isValidAnimation) { + // animate (from/to) can be quickly checked first, otherwise we check if any classes are present + isValidAnimation = (newAnimation.event === 'animate' && Object.keys(newAnimation.options.to || {}).length > 0) + || hasAnimationClasses(newAnimation); + } + + if (!isValidAnimation) { + close(); + clearElementAnimationState(node); + return runner; + } + + // the counter keeps track of cancelled animations + var counter = (existingAnimation.counter || 0) + 1; + newAnimation.counter = counter; + + markElementAnimationState(node, PRE_DIGEST_STATE, newAnimation); + + $rootScope.$$postDigest(function() { + // It is possible that the DOM nodes inside `originalElement` have been replaced. This can + // happen if the animated element is a transcluded clone and also has a `templateUrl` + // directive on it. Therefore, we must recreate `element` in order to interact with the + // actual DOM nodes. + // Note: We still need to use the old `node` for certain things, such as looking up in + // HashMaps where it was used as the key. + + element = stripCommentsFromElement(originalElement); + + var animationDetails = activeAnimationsLookup.get(node); + var animationCancelled = !animationDetails; + animationDetails = animationDetails || {}; + + // if addClass/removeClass is called before something like enter then the + // registered parent element may not be present. The code below will ensure + // that a final value for parent element is obtained + var parentElement = element.parent() || []; + + // animate/structural/class-based animations all have requirements. Otherwise there + // is no point in performing an animation. The parent node must also be set. + var isValidAnimation = parentElement.length > 0 + && (animationDetails.event === 'animate' + || animationDetails.structural + || hasAnimationClasses(animationDetails)); + + // this means that the previous animation was cancelled + // even if the follow-up animation is the same event + if (animationCancelled || animationDetails.counter !== counter || !isValidAnimation) { + // if another animation did not take over then we need + // to make sure that the domOperation and options are + // handled accordingly + if (animationCancelled) { + applyAnimationClasses(element, options); + applyAnimationStyles(element, options); + } + + // if the event changed from something like enter to leave then we do + // it, otherwise if it's the same then the end result will be the same too + if (animationCancelled || (isStructural && animationDetails.event !== event)) { + options.domOperation(); + runner.end(); + } + + // in the event that the element animation was not cancelled or a follow-up animation + // isn't allowed to animate from here then we need to clear the state of the element + // so that any future animations won't read the expired animation data. + if (!isValidAnimation) { + clearElementAnimationState(node); + } + + return; + } + + // this combined multiple class to addClass / removeClass into a setClass event + // so long as a structural event did not take over the animation + event = !animationDetails.structural && hasAnimationClasses(animationDetails, true) + ? 'setClass' + : animationDetails.event; + + markElementAnimationState(node, RUNNING_STATE); + var realRunner = $$animation(element, event, animationDetails.options); + + // this will update the runner's flow-control events based on + // the `realRunner` object. + runner.setHost(realRunner); + notifyProgress(runner, event, 'start', {}); + + realRunner.done(function(status) { + close(!status); + var animationDetails = activeAnimationsLookup.get(node); + if (animationDetails && animationDetails.counter === counter) { + clearElementAnimationState(node); + } + notifyProgress(runner, event, 'close', {}); + }); + }); + + return runner; + + function notifyProgress(runner, event, phase, data) { + runInNextPostDigestOrNow(function() { + var callbacks = findCallbacks(parentNode, node, event); + if (callbacks.length) { + // do not optimize this call here to RAF because + // we don't know how heavy the callback code here will + // be and if this code is buffered then this can + // lead to a performance regression. + $$rAF(function() { + forEach(callbacks, function(callback) { + callback(element, phase, data); + }); + cleanupEventListeners(phase, node); + }); + } else { + cleanupEventListeners(phase, node); + } + }); + runner.progress(event, phase, data); + } + + function close(reject) { + clearGeneratedClasses(element, options); + applyAnimationClasses(element, options); + applyAnimationStyles(element, options); + options.domOperation(); + runner.complete(!reject); + } + } + + function closeChildAnimations(node) { + var children = node.querySelectorAll('[' + NG_ANIMATE_ATTR_NAME + ']'); + forEach(children, function(child) { + var state = parseInt(child.getAttribute(NG_ANIMATE_ATTR_NAME), 10); + var animationDetails = activeAnimationsLookup.get(child); + if (animationDetails) { + switch (state) { + case RUNNING_STATE: + animationDetails.runner.end(); + /* falls through */ + case PRE_DIGEST_STATE: + activeAnimationsLookup.delete(child); + break; + } + } + }); + } + + function clearElementAnimationState(node) { + node.removeAttribute(NG_ANIMATE_ATTR_NAME); + activeAnimationsLookup.delete(node); + } + + /** + * This fn returns false if any of the following is true: + * a) animations on any parent element are disabled, and animations on the element aren't explicitly allowed + * b) a parent element has an ongoing structural animation, and animateChildren is false + * c) the element is not a child of the body + * d) the element is not a child of the $rootElement + */ + function areAnimationsAllowed(node, parentNode, event) { + var bodyNode = $document[0].body; + var rootNode = getDomNode($rootElement); + + var bodyNodeDetected = (node === bodyNode) || node.nodeName === 'HTML'; + var rootNodeDetected = (node === rootNode); + var parentAnimationDetected = false; + var elementDisabled = disabledElementsLookup.get(node); + var animateChildren; + + var parentHost = jqLite.data(node, NG_ANIMATE_PIN_DATA); + if (parentHost) { + parentNode = getDomNode(parentHost); + } + + while (parentNode) { + if (!rootNodeDetected) { + // angular doesn't want to attempt to animate elements outside of the application + // therefore we need to ensure that the rootElement is an ancestor of the current element + rootNodeDetected = (parentNode === rootNode); + } + + if (parentNode.nodeType !== ELEMENT_NODE) { + // no point in inspecting the #document element + break; + } + + var details = activeAnimationsLookup.get(parentNode) || {}; + // either an enter, leave or move animation will commence + // therefore we can't allow any animations to take place + // but if a parent animation is class-based then that's ok + if (!parentAnimationDetected) { + var parentNodeDisabled = disabledElementsLookup.get(parentNode); + + if (parentNodeDisabled === true && elementDisabled !== false) { + // disable animations if the user hasn't explicitly enabled animations on the + // current element + elementDisabled = true; + // element is disabled via parent element, no need to check anything else + break; + } else if (parentNodeDisabled === false) { + elementDisabled = false; + } + parentAnimationDetected = details.structural; + } + + if (isUndefined(animateChildren) || animateChildren === true) { + var value = jqLite.data(parentNode, NG_ANIMATE_CHILDREN_DATA); + if (isDefined(value)) { + animateChildren = value; + } + } + + // there is no need to continue traversing at this point + if (parentAnimationDetected && animateChildren === false) break; + + if (!bodyNodeDetected) { + // we also need to ensure that the element is or will be a part of the body element + // otherwise it is pointless to even issue an animation to be rendered + bodyNodeDetected = (parentNode === bodyNode); + } + + if (bodyNodeDetected && rootNodeDetected) { + // If both body and root have been found, any other checks are pointless, + // as no animation data should live outside the application + break; + } + + if (!rootNodeDetected) { + // If `rootNode` is not detected, check if `parentNode` is pinned to another element + parentHost = jqLite.data(parentNode, NG_ANIMATE_PIN_DATA); + if (parentHost) { + // The pin target element becomes the next parent element + parentNode = getDomNode(parentHost); + continue; + } + } + + parentNode = parentNode.parentNode; + } + + var allowAnimation = (!parentAnimationDetected || animateChildren) && elementDisabled !== true; + return allowAnimation && rootNodeDetected && bodyNodeDetected; + } + + function markElementAnimationState(node, state, details) { + details = details || {}; + details.state = state; + + node.setAttribute(NG_ANIMATE_ATTR_NAME, state); + + var oldValue = activeAnimationsLookup.get(node); + var newValue = oldValue + ? extend(oldValue, details) + : details; + activeAnimationsLookup.set(node, newValue); + } + }]; +}]; + +/* exported $$AnimationProvider */ + +var $$AnimationProvider = ['$animateProvider', /** @this */ function($animateProvider) { + var NG_ANIMATE_REF_ATTR = 'ng-animate-ref'; + + var drivers = this.drivers = []; + + var RUNNER_STORAGE_KEY = '$$animationRunner'; + + function setRunner(element, runner) { + element.data(RUNNER_STORAGE_KEY, runner); + } + + function removeRunner(element) { + element.removeData(RUNNER_STORAGE_KEY); + } + + function getRunner(element) { + return element.data(RUNNER_STORAGE_KEY); + } + + this.$get = ['$$jqLite', '$rootScope', '$injector', '$$AnimateRunner', '$$Map', '$$rAFScheduler', + function($$jqLite, $rootScope, $injector, $$AnimateRunner, $$Map, $$rAFScheduler) { + + var animationQueue = []; + var applyAnimationClasses = applyAnimationClassesFactory($$jqLite); + + function sortAnimations(animations) { + var tree = { children: [] }; + var i, lookup = new $$Map(); + + // this is done first beforehand so that the map + // is filled with a list of the elements that will be animated + for (i = 0; i < animations.length; i++) { + var animation = animations[i]; + lookup.set(animation.domNode, animations[i] = { + domNode: animation.domNode, + fn: animation.fn, + children: [] + }); + } + + for (i = 0; i < animations.length; i++) { + processNode(animations[i]); + } + + return flatten(tree); + + function processNode(entry) { + if (entry.processed) return entry; + entry.processed = true; + + var elementNode = entry.domNode; + var parentNode = elementNode.parentNode; + lookup.set(elementNode, entry); + + var parentEntry; + while (parentNode) { + parentEntry = lookup.get(parentNode); + if (parentEntry) { + if (!parentEntry.processed) { + parentEntry = processNode(parentEntry); + } + break; + } + parentNode = parentNode.parentNode; + } + + (parentEntry || tree).children.push(entry); + return entry; + } + + function flatten(tree) { + var result = []; + var queue = []; + var i; + + for (i = 0; i < tree.children.length; i++) { + queue.push(tree.children[i]); + } + + var remainingLevelEntries = queue.length; + var nextLevelEntries = 0; + var row = []; + + for (i = 0; i < queue.length; i++) { + var entry = queue[i]; + if (remainingLevelEntries <= 0) { + remainingLevelEntries = nextLevelEntries; + nextLevelEntries = 0; + result.push(row); + row = []; + } + row.push(entry.fn); + entry.children.forEach(function(childEntry) { + nextLevelEntries++; + queue.push(childEntry); + }); + remainingLevelEntries--; + } + + if (row.length) { + result.push(row); + } + + return result; + } + } + + // TODO(matsko): document the signature in a better way + return function(element, event, options) { + options = prepareAnimationOptions(options); + var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0; + + // there is no animation at the current moment, however + // these runner methods will get later updated with the + // methods leading into the driver's end/cancel methods + // for now they just stop the animation from starting + var runner = new $$AnimateRunner({ + end: function() { close(); }, + cancel: function() { close(true); } + }); + + if (!drivers.length) { + close(); + return runner; + } + + setRunner(element, runner); + + var classes = mergeClasses(element.attr('class'), mergeClasses(options.addClass, options.removeClass)); + var tempClasses = options.tempClasses; + if (tempClasses) { + classes += ' ' + tempClasses; + options.tempClasses = null; + } + + var prepareClassName; + if (isStructural) { + prepareClassName = 'ng-' + event + PREPARE_CLASS_SUFFIX; + $$jqLite.addClass(element, prepareClassName); + } + + animationQueue.push({ + // this data is used by the postDigest code and passed into + // the driver step function + element: element, + classes: classes, + event: event, + structural: isStructural, + options: options, + beforeStart: beforeStart, + close: close + }); + + element.on('$destroy', handleDestroyedElement); + + // we only want there to be one function called within the post digest + // block. This way we can group animations for all the animations that + // were apart of the same postDigest flush call. + if (animationQueue.length > 1) return runner; + + $rootScope.$$postDigest(function() { + var animations = []; + forEach(animationQueue, function(entry) { + // the element was destroyed early on which removed the runner + // form its storage. This means we can't animate this element + // at all and it already has been closed due to destruction. + if (getRunner(entry.element)) { + animations.push(entry); + } else { + entry.close(); + } + }); + + // now any future animations will be in another postDigest + animationQueue.length = 0; + + var groupedAnimations = groupAnimations(animations); + var toBeSortedAnimations = []; + + forEach(groupedAnimations, function(animationEntry) { + toBeSortedAnimations.push({ + domNode: getDomNode(animationEntry.from ? animationEntry.from.element : animationEntry.element), + fn: function triggerAnimationStart() { + // it's important that we apply the `ng-animate` CSS class and the + // temporary classes before we do any driver invoking since these + // CSS classes may be required for proper CSS detection. + animationEntry.beforeStart(); + + var startAnimationFn, closeFn = animationEntry.close; + + // in the event that the element was removed before the digest runs or + // during the RAF sequencing then we should not trigger the animation. + var targetElement = animationEntry.anchors + ? (animationEntry.from.element || animationEntry.to.element) + : animationEntry.element; + + if (getRunner(targetElement)) { + var operation = invokeFirstDriver(animationEntry); + if (operation) { + startAnimationFn = operation.start; + } + } + + if (!startAnimationFn) { + closeFn(); + } else { + var animationRunner = startAnimationFn(); + animationRunner.done(function(status) { + closeFn(!status); + }); + updateAnimationRunners(animationEntry, animationRunner); + } + } + }); + }); + + // we need to sort each of the animations in order of parent to child + // relationships. This ensures that the child classes are applied at the + // right time. + $$rAFScheduler(sortAnimations(toBeSortedAnimations)); + }); + + return runner; + + // TODO(matsko): change to reference nodes + function getAnchorNodes(node) { + var SELECTOR = '[' + NG_ANIMATE_REF_ATTR + ']'; + var items = node.hasAttribute(NG_ANIMATE_REF_ATTR) + ? [node] + : node.querySelectorAll(SELECTOR); + var anchors = []; + forEach(items, function(node) { + var attr = node.getAttribute(NG_ANIMATE_REF_ATTR); + if (attr && attr.length) { + anchors.push(node); + } + }); + return anchors; + } + + function groupAnimations(animations) { + var preparedAnimations = []; + var refLookup = {}; + forEach(animations, function(animation, index) { + var element = animation.element; + var node = getDomNode(element); + var event = animation.event; + var enterOrMove = ['enter', 'move'].indexOf(event) >= 0; + var anchorNodes = animation.structural ? getAnchorNodes(node) : []; + + if (anchorNodes.length) { + var direction = enterOrMove ? 'to' : 'from'; + + forEach(anchorNodes, function(anchor) { + var key = anchor.getAttribute(NG_ANIMATE_REF_ATTR); + refLookup[key] = refLookup[key] || {}; + refLookup[key][direction] = { + animationID: index, + element: jqLite(anchor) + }; + }); + } else { + preparedAnimations.push(animation); + } + }); + + var usedIndicesLookup = {}; + var anchorGroups = {}; + forEach(refLookup, function(operations, key) { + var from = operations.from; + var to = operations.to; + + if (!from || !to) { + // only one of these is set therefore we can't have an + // anchor animation since all three pieces are required + var index = from ? from.animationID : to.animationID; + var indexKey = index.toString(); + if (!usedIndicesLookup[indexKey]) { + usedIndicesLookup[indexKey] = true; + preparedAnimations.push(animations[index]); + } + return; + } + + var fromAnimation = animations[from.animationID]; + var toAnimation = animations[to.animationID]; + var lookupKey = from.animationID.toString(); + if (!anchorGroups[lookupKey]) { + var group = anchorGroups[lookupKey] = { + structural: true, + beforeStart: function() { + fromAnimation.beforeStart(); + toAnimation.beforeStart(); + }, + close: function() { + fromAnimation.close(); + toAnimation.close(); + }, + classes: cssClassesIntersection(fromAnimation.classes, toAnimation.classes), + from: fromAnimation, + to: toAnimation, + anchors: [] // TODO(matsko): change to reference nodes + }; + + // the anchor animations require that the from and to elements both have at least + // one shared CSS class which effectively marries the two elements together to use + // the same animation driver and to properly sequence the anchor animation. + if (group.classes.length) { + preparedAnimations.push(group); + } else { + preparedAnimations.push(fromAnimation); + preparedAnimations.push(toAnimation); + } + } + + anchorGroups[lookupKey].anchors.push({ + 'out': from.element, 'in': to.element + }); + }); + + return preparedAnimations; + } + + function cssClassesIntersection(a,b) { + a = a.split(' '); + b = b.split(' '); + var matches = []; + + for (var i = 0; i < a.length; i++) { + var aa = a[i]; + if (aa.substring(0,3) === 'ng-') continue; + + for (var j = 0; j < b.length; j++) { + if (aa === b[j]) { + matches.push(aa); + break; + } + } + } + + return matches.join(' '); + } + + function invokeFirstDriver(animationDetails) { + // we loop in reverse order since the more general drivers (like CSS and JS) + // may attempt more elements, but custom drivers are more particular + for (var i = drivers.length - 1; i >= 0; i--) { + var driverName = drivers[i]; + var factory = $injector.get(driverName); + var driver = factory(animationDetails); + if (driver) { + return driver; + } + } + } + + function beforeStart() { + element.addClass(NG_ANIMATE_CLASSNAME); + if (tempClasses) { + $$jqLite.addClass(element, tempClasses); + } + if (prepareClassName) { + $$jqLite.removeClass(element, prepareClassName); + prepareClassName = null; + } + } + + function updateAnimationRunners(animation, newRunner) { + if (animation.from && animation.to) { + update(animation.from.element); + update(animation.to.element); + } else { + update(animation.element); + } + + function update(element) { + var runner = getRunner(element); + if (runner) runner.setHost(newRunner); + } + } + + function handleDestroyedElement() { + var runner = getRunner(element); + if (runner && (event !== 'leave' || !options.$$domOperationFired)) { + runner.end(); + } + } + + function close(rejected) { + element.off('$destroy', handleDestroyedElement); + removeRunner(element); + + applyAnimationClasses(element, options); + applyAnimationStyles(element, options); + options.domOperation(); + + if (tempClasses) { + $$jqLite.removeClass(element, tempClasses); + } + + element.removeClass(NG_ANIMATE_CLASSNAME); + runner.complete(!rejected); + } + }; + }]; +}]; + +/** + * @ngdoc directive + * @name ngAnimateSwap + * @restrict A + * @scope + * + * @description + * + * ngAnimateSwap is a animation-oriented directive that allows for the container to + * be removed and entered in whenever the associated expression changes. A + * common usecase for this directive is a rotating banner or slider component which + * contains one image being present at a time. When the active image changes + * then the old image will perform a `leave` animation and the new element + * will be inserted via an `enter` animation. + * + * @animations + * | Animation | Occurs | + * |----------------------------------|--------------------------------------| + * | {@link ng.$animate#enter enter} | when the new element is inserted to the DOM | + * | {@link ng.$animate#leave leave} | when the old element is removed from the DOM | + * + * @example + * + * + *
+ *
+ * {{ number }} + *
+ *
+ *
+ * + * angular.module('ngAnimateSwapExample', ['ngAnimate']) + * .controller('AppCtrl', ['$scope', '$interval', function($scope, $interval) { + * $scope.number = 0; + * $interval(function() { + * $scope.number++; + * }, 1000); + * + * var colors = ['red','blue','green','yellow','orange']; + * $scope.colorClass = function(number) { + * return colors[number % colors.length]; + * }; + * }]); + * + * + * .container { + * height:250px; + * width:250px; + * position:relative; + * overflow:hidden; + * border:2px solid black; + * } + * .container .cell { + * font-size:150px; + * text-align:center; + * line-height:250px; + * position:absolute; + * top:0; + * left:0; + * right:0; + * border-bottom:2px solid black; + * } + * .swap-animation.ng-enter, .swap-animation.ng-leave { + * transition:0.5s linear all; + * } + * .swap-animation.ng-enter { + * top:-250px; + * } + * .swap-animation.ng-enter-active { + * top:0px; + * } + * .swap-animation.ng-leave { + * top:0px; + * } + * .swap-animation.ng-leave-active { + * top:250px; + * } + * .red { background:red; } + * .green { background:green; } + * .blue { background:blue; } + * .yellow { background:yellow; } + * .orange { background:orange; } + * + *
+ */ +var ngAnimateSwapDirective = ['$animate', '$rootScope', function($animate, $rootScope) { + return { + restrict: 'A', + transclude: 'element', + terminal: true, + priority: 600, // we use 600 here to ensure that the directive is caught before others + link: function(scope, $element, attrs, ctrl, $transclude) { + var previousElement, previousScope; + scope.$watchCollection(attrs.ngAnimateSwap || attrs['for'], function(value) { + if (previousElement) { + $animate.leave(previousElement); + } + if (previousScope) { + previousScope.$destroy(); + previousScope = null; + } + if (value || value === 0) { + previousScope = scope.$new(); + $transclude(previousScope, function(element) { + previousElement = element; + $animate.enter(element, null, $element); + }); + } + }); + } + }; +}]; + +/** + * @ngdoc module + * @name ngAnimate + * @description + * + * The `ngAnimate` module provides support for CSS-based animations (keyframes and transitions) as well as JavaScript-based animations via + * callback hooks. Animations are not enabled by default, however, by including `ngAnimate` the animation hooks are enabled for an Angular app. + * + *
+ * + * # Usage + * Simply put, there are two ways to make use of animations when ngAnimate is used: by using **CSS** and **JavaScript**. The former works purely based + * using CSS (by using matching CSS selectors/styles) and the latter triggers animations that are registered via `module.animation()`. For + * both CSS and JS animations the sole requirement is to have a matching `CSS class` that exists both in the registered animation and within + * the HTML element that the animation will be triggered on. + * + * ## Directive Support + * The following directives are "animation aware": + * + * | Directive | Supported Animations | + * |----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------| + * | {@link ng.directive:ngRepeat#animations ngRepeat} | enter, leave and move | + * | {@link ngRoute.directive:ngView#animations ngView} | enter and leave | + * | {@link ng.directive:ngInclude#animations ngInclude} | enter and leave | + * | {@link ng.directive:ngSwitch#animations ngSwitch} | enter and leave | + * | {@link ng.directive:ngIf#animations ngIf} | enter and leave | + * | {@link ng.directive:ngClass#animations ngClass} | add and remove (the CSS class(es) present) | + * | {@link ng.directive:ngShow#animations ngShow} & {@link ng.directive:ngHide#animations ngHide} | add and remove (the ng-hide class value) | + * | {@link ng.directive:form#animation-hooks form} & {@link ng.directive:ngModel#animation-hooks ngModel} | add and remove (dirty, pristine, valid, invalid & all other validations) | + * | {@link module:ngMessages#animations ngMessages} | add and remove (ng-active & ng-inactive) | + * | {@link module:ngMessages#animations ngMessage} | enter and leave | + * + * (More information can be found by visiting each the documentation associated with each directive.) + * + * ## CSS-based Animations + * + * CSS-based animations with ngAnimate are unique since they require no JavaScript code at all. By using a CSS class that we reference between our HTML + * and CSS code we can create an animation that will be picked up by Angular when an underlying directive performs an operation. + * + * The example below shows how an `enter` animation can be made possible on an element using `ng-if`: + * + * ```html + *
+ * Fade me in out + *
+ * + * + * ``` + * + * Notice the CSS class **fade**? We can now create the CSS transition code that references this class: + * + * ```css + * /* The starting CSS styles for the enter animation */ + * .fade.ng-enter { + * transition:0.5s linear all; + * opacity:0; + * } + * + * /* The finishing CSS styles for the enter animation */ + * .fade.ng-enter.ng-enter-active { + * opacity:1; + * } + * ``` + * + * The key thing to remember here is that, depending on the animation event (which each of the directives above trigger depending on what's going on) two + * generated CSS classes will be applied to the element; in the example above we have `.ng-enter` and `.ng-enter-active`. For CSS transitions, the transition + * code **must** be defined within the starting CSS class (in this case `.ng-enter`). The destination class is what the transition will animate towards. + * + * If for example we wanted to create animations for `leave` and `move` (ngRepeat triggers move) then we can do so using the same CSS naming conventions: + * + * ```css + * /* now the element will fade out before it is removed from the DOM */ + * .fade.ng-leave { + * transition:0.5s linear all; + * opacity:1; + * } + * .fade.ng-leave.ng-leave-active { + * opacity:0; + * } + * ``` + * + * We can also make use of **CSS Keyframes** by referencing the keyframe animation within the starting CSS class: + * + * ```css + * /* there is no need to define anything inside of the destination + * CSS class since the keyframe will take charge of the animation */ + * .fade.ng-leave { + * animation: my_fade_animation 0.5s linear; + * -webkit-animation: my_fade_animation 0.5s linear; + * } + * + * @keyframes my_fade_animation { + * from { opacity:1; } + * to { opacity:0; } + * } + * + * @-webkit-keyframes my_fade_animation { + * from { opacity:1; } + * to { opacity:0; } + * } + * ``` + * + * Feel free also mix transitions and keyframes together as well as any other CSS classes on the same element. + * + * ### CSS Class-based Animations + * + * Class-based animations (animations that are triggered via `ngClass`, `ngShow`, `ngHide` and some other directives) have a slightly different + * naming convention. Class-based animations are basic enough that a standard transition or keyframe can be referenced on the class being added + * and removed. + * + * For example if we wanted to do a CSS animation for `ngHide` then we place an animation on the `.ng-hide` CSS class: + * + * ```html + *
+ * Show and hide me + *
+ * + * + * + * ``` + * + * All that is going on here with ngShow/ngHide behind the scenes is the `.ng-hide` class is added/removed (when the hidden state is valid). Since + * ngShow and ngHide are animation aware then we can match up a transition and ngAnimate handles the rest. + * + * In addition the addition and removal of the CSS class, ngAnimate also provides two helper methods that we can use to further decorate the animation + * with CSS styles. + * + * ```html + *
+ * Highlight this box + *
+ * + * + * + * ``` + * + * We can also make use of CSS keyframes by placing them within the CSS classes. + * + * + * ### CSS Staggering Animations + * A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a + * curtain-like effect. The ngAnimate module (versions >=1.2) supports staggering animations and the stagger effect can be + * performed by creating a **ng-EVENT-stagger** CSS class and attaching that class to the base CSS class used for + * the animation. The style property expected within the stagger class can either be a **transition-delay** or an + * **animation-delay** property (or both if your animation contains both transitions and keyframe animations). + * + * ```css + * .my-animation.ng-enter { + * /* standard transition code */ + * transition: 1s linear all; + * opacity:0; + * } + * .my-animation.ng-enter-stagger { + * /* this will have a 100ms delay between each successive leave animation */ + * transition-delay: 0.1s; + * + * /* As of 1.4.4, this must always be set: it signals ngAnimate + * to not accidentally inherit a delay property from another CSS class */ + * transition-duration: 0s; + * + * /* if you are using animations instead of transitions you should configure as follows: + * animation-delay: 0.1s; + * animation-duration: 0s; */ + * } + * .my-animation.ng-enter.ng-enter-active { + * /* standard transition styles */ + * opacity:1; + * } + * ``` + * + * Staggering animations work by default in ngRepeat (so long as the CSS class is defined). Outside of ngRepeat, to use staggering animations + * on your own, they can be triggered by firing multiple calls to the same event on $animate. However, the restrictions surrounding this + * are that each of the elements must have the same CSS className value as well as the same parent element. A stagger operation + * will also be reset if one or more animation frames have passed since the multiple calls to `$animate` were fired. + * + * The following code will issue the **ng-leave-stagger** event on the element provided: + * + * ```js + * var kids = parent.children(); + * + * $animate.leave(kids[0]); //stagger index=0 + * $animate.leave(kids[1]); //stagger index=1 + * $animate.leave(kids[2]); //stagger index=2 + * $animate.leave(kids[3]); //stagger index=3 + * $animate.leave(kids[4]); //stagger index=4 + * + * window.requestAnimationFrame(function() { + * //stagger has reset itself + * $animate.leave(kids[5]); //stagger index=0 + * $animate.leave(kids[6]); //stagger index=1 + * + * $scope.$digest(); + * }); + * ``` + * + * Stagger animations are currently only supported within CSS-defined animations. + * + * ### The `ng-animate` CSS class + * + * When ngAnimate is animating an element it will apply the `ng-animate` CSS class to the element for the duration of the animation. + * This is a temporary CSS class and it will be removed once the animation is over (for both JavaScript and CSS-based animations). + * + * Therefore, animations can be applied to an element using this temporary class directly via CSS. + * + * ```css + * .zipper.ng-animate { + * transition:0.5s linear all; + * } + * .zipper.ng-enter { + * opacity:0; + * } + * .zipper.ng-enter.ng-enter-active { + * opacity:1; + * } + * .zipper.ng-leave { + * opacity:1; + * } + * .zipper.ng-leave.ng-leave-active { + * opacity:0; + * } + * ``` + * + * (Note that the `ng-animate` CSS class is reserved and it cannot be applied on an element directly since ngAnimate will always remove + * the CSS class once an animation has completed.) + * + * + * ### The `ng-[event]-prepare` class + * + * This is a special class that can be used to prevent unwanted flickering / flash of content before + * the actual animation starts. The class is added as soon as an animation is initialized, but removed + * before the actual animation starts (after waiting for a $digest). + * It is also only added for *structural* animations (`enter`, `move`, and `leave`). + * + * In practice, flickering can appear when nesting elements with structural animations such as `ngIf` + * into elements that have class-based animations such as `ngClass`. + * + * ```html + *
+ *
+ *
+ *
+ *
+ * ``` + * + * It is possible that during the `enter` animation, the `.message` div will be briefly visible before it starts animating. + * In that case, you can add styles to the CSS that make sure the element stays hidden before the animation starts: + * + * ```css + * .message.ng-enter-prepare { + * opacity: 0; + * } + * + * ``` + * + * ## JavaScript-based Animations + * + * ngAnimate also allows for animations to be consumed by JavaScript code. The approach is similar to CSS-based animations (where there is a shared + * CSS class that is referenced in our HTML code) but in addition we need to register the JavaScript animation on the module. By making use of the + * `module.animation()` module function we can register the animation. + * + * Let's see an example of a enter/leave animation using `ngRepeat`: + * + * ```html + *
+ * {{ item }} + *
+ * ``` + * + * See the **slide** CSS class? Let's use that class to define an animation that we'll structure in our module code by using `module.animation`: + * + * ```js + * myModule.animation('.slide', [function() { + * return { + * // make note that other events (like addClass/removeClass) + * // have different function input parameters + * enter: function(element, doneFn) { + * jQuery(element).fadeIn(1000, doneFn); + * + * // remember to call doneFn so that angular + * // knows that the animation has concluded + * }, + * + * move: function(element, doneFn) { + * jQuery(element).fadeIn(1000, doneFn); + * }, + * + * leave: function(element, doneFn) { + * jQuery(element).fadeOut(1000, doneFn); + * } + * } + * }]); + * ``` + * + * The nice thing about JS-based animations is that we can inject other services and make use of advanced animation libraries such as + * greensock.js and velocity.js. + * + * If our animation code class-based (meaning that something like `ngClass`, `ngHide` and `ngShow` triggers it) then we can still define + * our animations inside of the same registered animation, however, the function input arguments are a bit different: + * + * ```html + *
+ * this box is moody + *
+ * + * + * + * ``` + * + * ```js + * myModule.animation('.colorful', [function() { + * return { + * addClass: function(element, className, doneFn) { + * // do some cool animation and call the doneFn + * }, + * removeClass: function(element, className, doneFn) { + * // do some cool animation and call the doneFn + * }, + * setClass: function(element, addedClass, removedClass, doneFn) { + * // do some cool animation and call the doneFn + * } + * } + * }]); + * ``` + * + * ## CSS + JS Animations Together + * + * AngularJS 1.4 and higher has taken steps to make the amalgamation of CSS and JS animations more flexible. However, unlike earlier versions of Angular, + * defining CSS and JS animations to work off of the same CSS class will not work anymore. Therefore the example below will only result in **JS animations taking + * charge of the animation**: + * + * ```html + *
+ * Slide in and out + *
+ * ``` + * + * ```js + * myModule.animation('.slide', [function() { + * return { + * enter: function(element, doneFn) { + * jQuery(element).slideIn(1000, doneFn); + * } + * } + * }]); + * ``` + * + * ```css + * .slide.ng-enter { + * transition:0.5s linear all; + * transform:translateY(-100px); + * } + * .slide.ng-enter.ng-enter-active { + * transform:translateY(0); + * } + * ``` + * + * Does this mean that CSS and JS animations cannot be used together? Do JS-based animations always have higher priority? We can make up for the + * lack of CSS animations by using the `$animateCss` service to trigger our own tweaked-out, CSS-based animations directly from + * our own JS-based animation code: + * + * ```js + * myModule.animation('.slide', ['$animateCss', function($animateCss) { + * return { + * enter: function(element) { +* // this will trigger `.slide.ng-enter` and `.slide.ng-enter-active`. + * return $animateCss(element, { + * event: 'enter', + * structural: true + * }); + * } + * } + * }]); + * ``` + * + * The nice thing here is that we can save bandwidth by sticking to our CSS-based animation code and we don't need to rely on a 3rd-party animation framework. + * + * The `$animateCss` service is very powerful since we can feed in all kinds of extra properties that will be evaluated and fed into a CSS transition or + * keyframe animation. For example if we wanted to animate the height of an element while adding and removing classes then we can do so by providing that + * data into `$animateCss` directly: + * + * ```js + * myModule.animation('.slide', ['$animateCss', function($animateCss) { + * return { + * enter: function(element) { + * return $animateCss(element, { + * event: 'enter', + * structural: true, + * addClass: 'maroon-setting', + * from: { height:0 }, + * to: { height: 200 } + * }); + * } + * } + * }]); + * ``` + * + * Now we can fill in the rest via our transition CSS code: + * + * ```css + * /* the transition tells ngAnimate to make the animation happen */ + * .slide.ng-enter { transition:0.5s linear all; } + * + * /* this extra CSS class will be absorbed into the transition + * since the $animateCss code is adding the class */ + * .maroon-setting { background:red; } + * ``` + * + * And `$animateCss` will figure out the rest. Just make sure to have the `done()` callback fire the `doneFn` function to signal when the animation is over. + * + * To learn more about what's possible be sure to visit the {@link ngAnimate.$animateCss $animateCss service}. + * + * ## Animation Anchoring (via `ng-animate-ref`) + * + * ngAnimate in AngularJS 1.4 comes packed with the ability to cross-animate elements between + * structural areas of an application (like views) by pairing up elements using an attribute + * called `ng-animate-ref`. + * + * Let's say for example we have two views that are managed by `ng-view` and we want to show + * that there is a relationship between two components situated in within these views. By using the + * `ng-animate-ref` attribute we can identify that the two components are paired together and we + * can then attach an animation, which is triggered when the view changes. + * + * Say for example we have the following template code: + * + * ```html + * + *
+ *
+ * + * + * + * + * + * + * + * + * ``` + * + * Now, when the view changes (once the link is clicked), ngAnimate will examine the + * HTML contents to see if there is a match reference between any components in the view + * that is leaving and the view that is entering. It will scan both the view which is being + * removed (leave) and inserted (enter) to see if there are any paired DOM elements that + * contain a matching ref value. + * + * The two images match since they share the same ref value. ngAnimate will now create a + * transport element (which is a clone of the first image element) and it will then attempt + * to animate to the position of the second image element in the next view. For the animation to + * work a special CSS class called `ng-anchor` will be added to the transported element. + * + * We can now attach a transition onto the `.banner.ng-anchor` CSS class and then + * ngAnimate will handle the entire transition for us as well as the addition and removal of + * any changes of CSS classes between the elements: + * + * ```css + * .banner.ng-anchor { + * /* this animation will last for 1 second since there are + * two phases to the animation (an `in` and an `out` phase) */ + * transition:0.5s linear all; + * } + * ``` + * + * We also **must** include animations for the views that are being entered and removed + * (otherwise anchoring wouldn't be possible since the new view would be inserted right away). + * + * ```css + * .view-animation.ng-enter, .view-animation.ng-leave { + * transition:0.5s linear all; + * position:fixed; + * left:0; + * top:0; + * width:100%; + * } + * .view-animation.ng-enter { + * transform:translateX(100%); + * } + * .view-animation.ng-leave, + * .view-animation.ng-enter.ng-enter-active { + * transform:translateX(0%); + * } + * .view-animation.ng-leave.ng-leave-active { + * transform:translateX(-100%); + * } + * ``` + * + * Now we can jump back to the anchor animation. When the animation happens, there are two stages that occur: + * an `out` and an `in` stage. The `out` stage happens first and that is when the element is animated away + * from its origin. Once that animation is over then the `in` stage occurs which animates the + * element to its destination. The reason why there are two animations is to give enough time + * for the enter animation on the new element to be ready. + * + * The example above sets up a transition for both the in and out phases, but we can also target the out or + * in phases directly via `ng-anchor-out` and `ng-anchor-in`. + * + * ```css + * .banner.ng-anchor-out { + * transition: 0.5s linear all; + * + * /* the scale will be applied during the out animation, + * but will be animated away when the in animation runs */ + * transform: scale(1.2); + * } + * + * .banner.ng-anchor-in { + * transition: 1s linear all; + * } + * ``` + * + * + * + * + * ### Anchoring Demo + * + + + Home +
+
+
+
+
+ + angular.module('anchoringExample', ['ngAnimate', 'ngRoute']) + .config(['$routeProvider', function($routeProvider) { + $routeProvider.when('/', { + templateUrl: 'home.html', + controller: 'HomeController as home' + }); + $routeProvider.when('/profile/:id', { + templateUrl: 'profile.html', + controller: 'ProfileController as profile' + }); + }]) + .run(['$rootScope', function($rootScope) { + $rootScope.records = [ + { id: 1, title: 'Miss Beulah Roob' }, + { id: 2, title: 'Trent Morissette' }, + { id: 3, title: 'Miss Ava Pouros' }, + { id: 4, title: 'Rod Pouros' }, + { id: 5, title: 'Abdul Rice' }, + { id: 6, title: 'Laurie Rutherford Sr.' }, + { id: 7, title: 'Nakia McLaughlin' }, + { id: 8, title: 'Jordon Blanda DVM' }, + { id: 9, title: 'Rhoda Hand' }, + { id: 10, title: 'Alexandrea Sauer' } + ]; + }]) + .controller('HomeController', [function() { + //empty + }]) + .controller('ProfileController', ['$rootScope', '$routeParams', + function ProfileController($rootScope, $routeParams) { + var index = parseInt($routeParams.id, 10); + var record = $rootScope.records[index - 1]; + + this.title = record.title; + this.id = record.id; + }]); + + +

Welcome to the home page

+

Please click on an element

+ + {{ record.title }} + +
+ +
+ {{ profile.title }} +
+
+ + .record { + display:block; + font-size:20px; + } + .profile { + background:black; + color:white; + font-size:100px; + } + .view-container { + position:relative; + } + .view-container > .view.ng-animate { + position:absolute; + top:0; + left:0; + width:100%; + min-height:500px; + } + .view.ng-enter, .view.ng-leave, + .record.ng-anchor { + transition:0.5s linear all; + } + .view.ng-enter { + transform:translateX(100%); + } + .view.ng-enter.ng-enter-active, .view.ng-leave { + transform:translateX(0%); + } + .view.ng-leave.ng-leave-active { + transform:translateX(-100%); + } + .record.ng-anchor-out { + background:red; + } + +
+ * + * ### How is the element transported? + * + * When an anchor animation occurs, ngAnimate will clone the starting element and position it exactly where the starting + * element is located on screen via absolute positioning. The cloned element will be placed inside of the root element + * of the application (where ng-app was defined) and all of the CSS classes of the starting element will be applied. The + * element will then animate into the `out` and `in` animations and will eventually reach the coordinates and match + * the dimensions of the destination element. During the entire animation a CSS class of `.ng-animate-shim` will be applied + * to both the starting and destination elements in order to hide them from being visible (the CSS styling for the class + * is: `visibility:hidden`). Once the anchor reaches its destination then it will be removed and the destination element + * will become visible since the shim class will be removed. + * + * ### How is the morphing handled? + * + * CSS Anchoring relies on transitions and keyframes and the internal code is intelligent enough to figure out + * what CSS classes differ between the starting element and the destination element. These different CSS classes + * will be added/removed on the anchor element and a transition will be applied (the transition that is provided + * in the anchor class). Long story short, ngAnimate will figure out what classes to add and remove which will + * make the transition of the element as smooth and automatic as possible. Be sure to use simple CSS classes that + * do not rely on DOM nesting structure so that the anchor element appears the same as the starting element (since + * the cloned element is placed inside of root element which is likely close to the body element). + * + * Note that if the root element is on the `` element then the cloned node will be placed inside of body. + * + * + * ## Using $animate in your directive code + * + * So far we've explored how to feed in animations into an Angular application, but how do we trigger animations within our own directives in our application? + * By injecting the `$animate` service into our directive code, we can trigger structural and class-based hooks which can then be consumed by animations. Let's + * imagine we have a greeting box that shows and hides itself when the data changes + * + * ```html + * Hi there + * ``` + * + * ```js + * ngModule.directive('greetingBox', ['$animate', function($animate) { + * return function(scope, element, attrs) { + * attrs.$observe('active', function(value) { + * value ? $animate.addClass(element, 'on') : $animate.removeClass(element, 'on'); + * }); + * }); + * }]); + * ``` + * + * Now the `on` CSS class is added and removed on the greeting box component. Now if we add a CSS class on top of the greeting box element + * in our HTML code then we can trigger a CSS or JS animation to happen. + * + * ```css + * /* normally we would create a CSS class to reference on the element */ + * greeting-box.on { transition:0.5s linear all; background:green; color:white; } + * ``` + * + * The `$animate` service contains a variety of other methods like `enter`, `leave`, `animate` and `setClass`. To learn more about what's + * possible be sure to visit the {@link ng.$animate $animate service API page}. + * + * + * ## Callbacks and Promises + * + * When `$animate` is called it returns a promise that can be used to capture when the animation has ended. Therefore if we were to trigger + * an animation (within our directive code) then we can continue performing directive and scope related activities after the animation has + * ended by chaining onto the returned promise that animation method returns. + * + * ```js + * // somewhere within the depths of the directive + * $animate.enter(element, parent).then(function() { + * //the animation has completed + * }); + * ``` + * + * (Note that earlier versions of Angular prior to v1.4 required the promise code to be wrapped using `$scope.$apply(...)`. This is not the case + * anymore.) + * + * In addition to the animation promise, we can also make use of animation-related callbacks within our directives and controller code by registering + * an event listener using the `$animate` service. Let's say for example that an animation was triggered on our view + * routing controller to hook into that: + * + * ```js + * ngModule.controller('HomePageController', ['$animate', function($animate) { + * $animate.on('enter', ngViewElement, function(element) { + * // the animation for this route has completed + * }]); + * }]) + * ``` + * + * (Note that you will need to trigger a digest within the callback to get angular to notice any scope-related changes.) + */ + +var copy; +var extend; +var forEach; +var isArray; +var isDefined; +var isElement; +var isFunction; +var isObject; +var isString; +var isUndefined; +var jqLite; +var noop; + +/** + * @ngdoc service + * @name $animate + * @kind object + * + * @description + * The ngAnimate `$animate` service documentation is the same for the core `$animate` service. + * + * Click here {@link ng.$animate to learn more about animations with `$animate`}. + */ +angular.module('ngAnimate', [], function initAngularHelpers() { + // Access helpers from angular core. + // Do it inside a `config` block to ensure `window.angular` is available. + noop = angular.noop; + copy = angular.copy; + extend = angular.extend; + jqLite = angular.element; + forEach = angular.forEach; + isArray = angular.isArray; + isString = angular.isString; + isObject = angular.isObject; + isUndefined = angular.isUndefined; + isDefined = angular.isDefined; + isFunction = angular.isFunction; + isElement = angular.isElement; +}) + .info({ angularVersion: '1.6.6' }) + .directive('ngAnimateSwap', ngAnimateSwapDirective) + + .directive('ngAnimateChildren', $$AnimateChildrenDirective) + .factory('$$rAFScheduler', $$rAFSchedulerFactory) + + .provider('$$animateQueue', $$AnimateQueueProvider) + .provider('$$animation', $$AnimationProvider) + + .provider('$animateCss', $AnimateCssProvider) + .provider('$$animateCssDriver', $$AnimateCssDriverProvider) + + .provider('$$animateJs', $$AnimateJsProvider) + .provider('$$animateJsDriver', $$AnimateJsDriverProvider); + + +})(window, window.angular); diff --git a/1.6.6/angular-animate.min.js b/1.6.6/angular-animate.min.js new file mode 100644 index 000000000..4157461df --- /dev/null +++ b/1.6.6/angular-animate.min.js @@ -0,0 +1,57 @@ +/* + AngularJS v1.6.6 + (c) 2010-2017 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(S,q){'use strict';function Ea(a,b,c){if(!a)throw Pa("areq",b||"?",c||"required");return a}function Fa(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;V(a)&&(a=a.join(" "));V(b)&&(b=b.join(" "));return a+" "+b}function Qa(a){var b={};a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from);return b}function W(a,b,c){var d="";a=V(a)?a:a&&C(a)&&a.length?a.split(/\s+/):[];t(a,function(a,f){a&&0=a&&(a=g,g=0,b.push(e),e=[]);e.push(f.fn);f.children.forEach(function(a){g++;c.push(a)});a--}e.length&&b.push(e);return b}(c)}var s=[],y=X(a);return function(n,q,v){function E(a){a=a.hasAttribute("ng-animate-ref")? +[a]:a.querySelectorAll("[ng-animate-ref]");var b=[];t(a,function(a){var c=a.getAttribute("ng-animate-ref");c&&c.length&&b.push(a)});return b}function g(a){var b=[],c={};t(a,function(a,d){var k=J(a.element),g=0<=["enter","move"].indexOf(a.event),k=a.structural?E(k):[];if(k.length){var e=g?"to":"from";t(k,function(a){var b=a.getAttribute("ng-animate-ref");c[b]=c[b]||{};c[b][e]={animationID:d,element:A(a)}})}else b.push(a)});var d={},g={};t(c,function(c,e){var f=c.from,p=c.to;if(f&&p){var H=a[f.animationID], +z=a[p.animationID],m=f.animationID.toString();if(!g[m]){var l=g[m]={structural:!0,beforeStart:function(){H.beforeStart();z.beforeStart()},close:function(){H.close();z.close()},classes:M(H.classes,z.classes),from:H,to:z,anchors:[]};l.classes.length?b.push(l):(b.push(H),b.push(z))}g[m].anchors.push({out:f.element,"in":p.element})}else f=f?f.animationID:p.animationID,p=f.toString(),d[p]||(d[p]=!0,b.push(a[f]))});return b}function M(a,b){a=a.split(" ");b=b.split(" ");for(var c=[],d=0;d=P&&b>=N&&(ba=!0,m())}function ga(){function b(){if(!M){L(!1);t(x,function(a){k.style[a[0]]=a[1]});g(a,h);e.addClass(a,ca); +if(r.recalculateTimingStyles){ma=k.getAttribute("class")+" "+fa;ja=q(k,ma);B=E(k,ma,ja);$=B.maxDelay;w=Math.max($,0);N=B.maxDuration;if(0===N){m();return}r.hasTransitions=0s.expectedEndTime)?n.cancel(s.timer):f.push(m)}F&&(l=n(c,l,!1),f[0]={timer:l,expectedEndTime:d},f.push(m),a.data("$$animateCss",f));if(ea.length)a.on(ea.join(" "),z);h.to&&(h.cleanupStyles&&Ma(p,k,Object.keys(h.to)),Ia(a,h))}}function c(){var b=a.data("$$animateCss"); +if(b){for(var d=1;dARIA](http://www.w3.org/TR/wai-aria/) + * attributes that convey state or semantic information about the application for users + * of assistive technologies, such as screen readers. + * + *
+ * + * ## Usage + * + * For ngAria to do its magic, simply include the module `ngAria` as a dependency. The following + * directives are supported: + * `ngModel`, `ngChecked`, `ngReadonly`, `ngRequired`, `ngValue`, `ngDisabled`, `ngShow`, `ngHide`, `ngClick`, + * `ngDblClick`, and `ngMessages`. + * + * Below is a more detailed breakdown of the attributes handled by ngAria: + * + * | Directive | Supported Attributes | + * |---------------------------------------------|-----------------------------------------------------------------------------------------------------| + * | {@link ng.directive:ngModel ngModel} | aria-checked, aria-valuemin, aria-valuemax, aria-valuenow, aria-invalid, aria-required, input roles | + * | {@link ng.directive:ngDisabled ngDisabled} | aria-disabled | + * | {@link ng.directive:ngRequired ngRequired} | aria-required | + * | {@link ng.directive:ngChecked ngChecked} | aria-checked | + * | {@link ng.directive:ngReadonly ngReadonly} | aria-readonly | + * | {@link ng.directive:ngValue ngValue} | aria-checked | + * | {@link ng.directive:ngShow ngShow} | aria-hidden | + * | {@link ng.directive:ngHide ngHide} | aria-hidden | + * | {@link ng.directive:ngDblclick ngDblclick} | tabindex | + * | {@link module:ngMessages ngMessages} | aria-live | + * | {@link ng.directive:ngClick ngClick} | tabindex, keydown event, button role | + * + * Find out more information about each directive by reading the + * {@link guide/accessibility ngAria Developer Guide}. + * + * ## Example + * Using ngDisabled with ngAria: + * ```html + * + * ``` + * Becomes: + * ```html + * + * ``` + * + * ## Disabling Attributes + * It's possible to disable individual attributes added by ngAria with the + * {@link ngAria.$ariaProvider#config config} method. For more details, see the + * {@link guide/accessibility Developer Guide}. + */ +var ngAriaModule = angular.module('ngAria', ['ng']). + info({ angularVersion: '1.6.6' }). + provider('$aria', $AriaProvider); + +/** +* Internal Utilities +*/ +var nodeBlackList = ['BUTTON', 'A', 'INPUT', 'TEXTAREA', 'SELECT', 'DETAILS', 'SUMMARY']; + +var isNodeOneOf = function(elem, nodeTypeArray) { + if (nodeTypeArray.indexOf(elem[0].nodeName) !== -1) { + return true; + } +}; +/** + * @ngdoc provider + * @name $ariaProvider + * @this + * + * @description + * + * Used for configuring the ARIA attributes injected and managed by ngAria. + * + * ```js + * angular.module('myApp', ['ngAria'], function config($ariaProvider) { + * $ariaProvider.config({ + * ariaValue: true, + * tabindex: false + * }); + * }); + *``` + * + * ## Dependencies + * Requires the {@link ngAria} module to be installed. + * + */ +function $AriaProvider() { + var config = { + ariaHidden: true, + ariaChecked: true, + ariaReadonly: true, + ariaDisabled: true, + ariaRequired: true, + ariaInvalid: true, + ariaValue: true, + tabindex: true, + bindKeydown: true, + bindRoleForClick: true + }; + + /** + * @ngdoc method + * @name $ariaProvider#config + * + * @param {object} config object to enable/disable specific ARIA attributes + * + * - **ariaHidden** – `{boolean}` – Enables/disables aria-hidden tags + * - **ariaChecked** – `{boolean}` – Enables/disables aria-checked tags + * - **ariaReadonly** – `{boolean}` – Enables/disables aria-readonly tags + * - **ariaDisabled** – `{boolean}` – Enables/disables aria-disabled tags + * - **ariaRequired** – `{boolean}` – Enables/disables aria-required tags + * - **ariaInvalid** – `{boolean}` – Enables/disables aria-invalid tags + * - **ariaValue** – `{boolean}` – Enables/disables aria-valuemin, aria-valuemax and + * aria-valuenow tags + * - **tabindex** – `{boolean}` – Enables/disables tabindex tags + * - **bindKeydown** – `{boolean}` – Enables/disables keyboard event binding on non-interactive + * elements (such as `div` or `li`) using ng-click, making them more accessible to users of + * assistive technologies + * - **bindRoleForClick** – `{boolean}` – Adds role=button to non-interactive elements (such as + * `div` or `li`) using ng-click, making them more accessible to users of assistive + * technologies + * + * @description + * Enables/disables various ARIA attributes + */ + this.config = function(newConfig) { + config = angular.extend(config, newConfig); + }; + + function watchExpr(attrName, ariaAttr, nodeBlackList, negate) { + return function(scope, elem, attr) { + var ariaCamelName = attr.$normalize(ariaAttr); + if (config[ariaCamelName] && !isNodeOneOf(elem, nodeBlackList) && !attr[ariaCamelName]) { + scope.$watch(attr[attrName], function(boolVal) { + // ensure boolean value + boolVal = negate ? !boolVal : !!boolVal; + elem.attr(ariaAttr, boolVal); + }); + } + }; + } + /** + * @ngdoc service + * @name $aria + * + * @description + * @priority 200 + * + * The $aria service contains helper methods for applying common + * [ARIA](http://www.w3.org/TR/wai-aria/) attributes to HTML directives. + * + * ngAria injects common accessibility attributes that tell assistive technologies when HTML + * elements are enabled, selected, hidden, and more. To see how this is performed with ngAria, + * let's review a code snippet from ngAria itself: + * + *```js + * ngAriaModule.directive('ngDisabled', ['$aria', function($aria) { + * return $aria.$$watchExpr('ngDisabled', 'aria-disabled', nodeBlackList, false); + * }]) + *``` + * Shown above, the ngAria module creates a directive with the same signature as the + * traditional `ng-disabled` directive. But this ngAria version is dedicated to + * solely managing accessibility attributes on custom elements. The internal `$aria` service is + * used to watch the boolean attribute `ngDisabled`. If it has not been explicitly set by the + * developer, `aria-disabled` is injected as an attribute with its value synchronized to the + * value in `ngDisabled`. + * + * Because ngAria hooks into the `ng-disabled` directive, developers do not have to do + * anything to enable this feature. The `aria-disabled` attribute is automatically managed + * simply as a silent side-effect of using `ng-disabled` with the ngAria module. + * + * The full list of directives that interface with ngAria: + * * **ngModel** + * * **ngChecked** + * * **ngReadonly** + * * **ngRequired** + * * **ngDisabled** + * * **ngValue** + * * **ngShow** + * * **ngHide** + * * **ngClick** + * * **ngDblclick** + * * **ngMessages** + * + * Read the {@link guide/accessibility ngAria Developer Guide} for a thorough explanation of each + * directive. + * + * + * ## Dependencies + * Requires the {@link ngAria} module to be installed. + */ + this.$get = function() { + return { + config: function(key) { + return config[key]; + }, + $$watchExpr: watchExpr + }; + }; +} + + +ngAriaModule.directive('ngShow', ['$aria', function($aria) { + return $aria.$$watchExpr('ngShow', 'aria-hidden', [], true); +}]) +.directive('ngHide', ['$aria', function($aria) { + return $aria.$$watchExpr('ngHide', 'aria-hidden', [], false); +}]) +.directive('ngValue', ['$aria', function($aria) { + return $aria.$$watchExpr('ngValue', 'aria-checked', nodeBlackList, false); +}]) +.directive('ngChecked', ['$aria', function($aria) { + return $aria.$$watchExpr('ngChecked', 'aria-checked', nodeBlackList, false); +}]) +.directive('ngReadonly', ['$aria', function($aria) { + return $aria.$$watchExpr('ngReadonly', 'aria-readonly', nodeBlackList, false); +}]) +.directive('ngRequired', ['$aria', function($aria) { + return $aria.$$watchExpr('ngRequired', 'aria-required', nodeBlackList, false); +}]) +.directive('ngModel', ['$aria', function($aria) { + + function shouldAttachAttr(attr, normalizedAttr, elem, allowBlacklistEls) { + return $aria.config(normalizedAttr) && !elem.attr(attr) && (allowBlacklistEls || !isNodeOneOf(elem, nodeBlackList)); + } + + function shouldAttachRole(role, elem) { + // if element does not have role attribute + // AND element type is equal to role (if custom element has a type equaling shape) <-- remove? + // AND element is not in nodeBlackList + return !elem.attr('role') && (elem.attr('type') === role) && !isNodeOneOf(elem, nodeBlackList); + } + + function getShape(attr, elem) { + var type = attr.type, + role = attr.role; + + return ((type || role) === 'checkbox' || role === 'menuitemcheckbox') ? 'checkbox' : + ((type || role) === 'radio' || role === 'menuitemradio') ? 'radio' : + (type === 'range' || role === 'progressbar' || role === 'slider') ? 'range' : ''; + } + + return { + restrict: 'A', + require: 'ngModel', + priority: 200, //Make sure watches are fired after any other directives that affect the ngModel value + compile: function(elem, attr) { + var shape = getShape(attr, elem); + + return { + post: function(scope, elem, attr, ngModel) { + var needsTabIndex = shouldAttachAttr('tabindex', 'tabindex', elem, false); + + function ngAriaWatchModelValue() { + return ngModel.$modelValue; + } + + function getRadioReaction(newVal) { + // Strict comparison would cause a BC + // eslint-disable-next-line eqeqeq + var boolVal = (attr.value == ngModel.$viewValue); + elem.attr('aria-checked', boolVal); + } + + function getCheckboxReaction() { + elem.attr('aria-checked', !ngModel.$isEmpty(ngModel.$viewValue)); + } + + switch (shape) { + case 'radio': + case 'checkbox': + if (shouldAttachRole(shape, elem)) { + elem.attr('role', shape); + } + if (shouldAttachAttr('aria-checked', 'ariaChecked', elem, false)) { + scope.$watch(ngAriaWatchModelValue, shape === 'radio' ? + getRadioReaction : getCheckboxReaction); + } + if (needsTabIndex) { + elem.attr('tabindex', 0); + } + break; + case 'range': + if (shouldAttachRole(shape, elem)) { + elem.attr('role', 'slider'); + } + if ($aria.config('ariaValue')) { + var needsAriaValuemin = !elem.attr('aria-valuemin') && + (attr.hasOwnProperty('min') || attr.hasOwnProperty('ngMin')); + var needsAriaValuemax = !elem.attr('aria-valuemax') && + (attr.hasOwnProperty('max') || attr.hasOwnProperty('ngMax')); + var needsAriaValuenow = !elem.attr('aria-valuenow'); + + if (needsAriaValuemin) { + attr.$observe('min', function ngAriaValueMinReaction(newVal) { + elem.attr('aria-valuemin', newVal); + }); + } + if (needsAriaValuemax) { + attr.$observe('max', function ngAriaValueMinReaction(newVal) { + elem.attr('aria-valuemax', newVal); + }); + } + if (needsAriaValuenow) { + scope.$watch(ngAriaWatchModelValue, function ngAriaValueNowReaction(newVal) { + elem.attr('aria-valuenow', newVal); + }); + } + } + if (needsTabIndex) { + elem.attr('tabindex', 0); + } + break; + } + + if (!attr.hasOwnProperty('ngRequired') && ngModel.$validators.required + && shouldAttachAttr('aria-required', 'ariaRequired', elem, false)) { + // ngModel.$error.required is undefined on custom controls + attr.$observe('required', function() { + elem.attr('aria-required', !!attr['required']); + }); + } + + if (shouldAttachAttr('aria-invalid', 'ariaInvalid', elem, true)) { + scope.$watch(function ngAriaInvalidWatch() { + return ngModel.$invalid; + }, function ngAriaInvalidReaction(newVal) { + elem.attr('aria-invalid', !!newVal); + }); + } + } + }; + } + }; +}]) +.directive('ngDisabled', ['$aria', function($aria) { + return $aria.$$watchExpr('ngDisabled', 'aria-disabled', nodeBlackList, false); +}]) +.directive('ngMessages', function() { + return { + restrict: 'A', + require: '?ngMessages', + link: function(scope, elem, attr, ngMessages) { + if (!elem.attr('aria-live')) { + elem.attr('aria-live', 'assertive'); + } + } + }; +}) +.directive('ngClick',['$aria', '$parse', function($aria, $parse) { + return { + restrict: 'A', + compile: function(elem, attr) { + var fn = $parse(attr.ngClick); + return function(scope, elem, attr) { + + if (!isNodeOneOf(elem, nodeBlackList)) { + + if ($aria.config('bindRoleForClick') && !elem.attr('role')) { + elem.attr('role', 'button'); + } + + if ($aria.config('tabindex') && !elem.attr('tabindex')) { + elem.attr('tabindex', 0); + } + + if ($aria.config('bindKeydown') && !attr.ngKeydown && !attr.ngKeypress && !attr.ngKeyup) { + elem.on('keydown', function(event) { + var keyCode = event.which || event.keyCode; + if (keyCode === 32 || keyCode === 13) { + scope.$apply(callback); + } + + function callback() { + fn(scope, { $event: event }); + } + }); + } + } + }; + } + }; +}]) +.directive('ngDblclick', ['$aria', function($aria) { + return function(scope, elem, attr) { + if ($aria.config('tabindex') && !elem.attr('tabindex') && !isNodeOneOf(elem, nodeBlackList)) { + elem.attr('tabindex', 0); + } + }; +}]); + + +})(window, window.angular); diff --git a/1.6.6/angular-aria.min.js b/1.6.6/angular-aria.min.js new file mode 100644 index 000000000..e3a8d88a5 --- /dev/null +++ b/1.6.6/angular-aria.min.js @@ -0,0 +1,14 @@ +/* + AngularJS v1.6.6 + (c) 2010-2017 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(s,p){'use strict';var c="BUTTON A INPUT TEXTAREA SELECT DETAILS SUMMARY".split(" "),h=function(a,b){if(-1!==b.indexOf(a[0].nodeName))return!0};p.module("ngAria",["ng"]).info({angularVersion:"1.6.6"}).provider("$aria",function(){function a(a,c,n,k){return function(d,f,e){var g=e.$normalize(c);!b[g]||h(f,n)||e[g]||d.$watch(e[a],function(a){a=k?!a:!!a;f.attr(c,a)})}}var b={ariaHidden:!0,ariaChecked:!0,ariaReadonly:!0,ariaDisabled:!0,ariaRequired:!0,ariaInvalid:!0,ariaValue:!0,tabindex:!0,bindKeydown:!0, +bindRoleForClick:!0};this.config=function(a){b=p.extend(b,a)};this.$get=function(){return{config:function(a){return b[a]},$$watchExpr:a}}}).directive("ngShow",["$aria",function(a){return a.$$watchExpr("ngShow","aria-hidden",[],!0)}]).directive("ngHide",["$aria",function(a){return a.$$watchExpr("ngHide","aria-hidden",[],!1)}]).directive("ngValue",["$aria",function(a){return a.$$watchExpr("ngValue","aria-checked",c,!1)}]).directive("ngChecked",["$aria",function(a){return a.$$watchExpr("ngChecked","aria-checked", +c,!1)}]).directive("ngReadonly",["$aria",function(a){return a.$$watchExpr("ngReadonly","aria-readonly",c,!1)}]).directive("ngRequired",["$aria",function(a){return a.$$watchExpr("ngRequired","aria-required",c,!1)}]).directive("ngModel",["$aria",function(a){function b(b,k,d,f){return a.config(k)&&!d.attr(b)&&(f||!h(d,c))}function l(a,b){return!b.attr("role")&&b.attr("type")===a&&!h(b,c)}function m(a,b){var d=a.type,f=a.role;return"checkbox"===(d||f)||"menuitemcheckbox"===f?"checkbox":"radio"===(d|| +f)||"menuitemradio"===f?"radio":"range"===d||"progressbar"===f||"slider"===f?"range":""}return{restrict:"A",require:"ngModel",priority:200,compile:function(c,k){var d=m(k,c);return{post:function(f,e,g,c){function k(){return c.$modelValue}function h(a){e.attr("aria-checked",g.value==c.$viewValue)}function m(){e.attr("aria-checked",!c.$isEmpty(c.$viewValue))}var n=b("tabindex","tabindex",e,!1);switch(d){case "radio":case "checkbox":l(d,e)&&e.attr("role",d);b("aria-checked","ariaChecked",e,!1)&&f.$watch(k, +"radio"===d?h:m);n&&e.attr("tabindex",0);break;case "range":l(d,e)&&e.attr("role","slider");if(a.config("ariaValue")){var p=!e.attr("aria-valuemin")&&(g.hasOwnProperty("min")||g.hasOwnProperty("ngMin")),q=!e.attr("aria-valuemax")&&(g.hasOwnProperty("max")||g.hasOwnProperty("ngMax")),r=!e.attr("aria-valuenow");p&&g.$observe("min",function(a){e.attr("aria-valuemin",a)});q&&g.$observe("max",function(a){e.attr("aria-valuemax",a)});r&&f.$watch(k,function(a){e.attr("aria-valuenow",a)})}n&&e.attr("tabindex", +0)}!g.hasOwnProperty("ngRequired")&&c.$validators.required&&b("aria-required","ariaRequired",e,!1)&&g.$observe("required",function(){e.attr("aria-required",!!g.required)});b("aria-invalid","ariaInvalid",e,!0)&&f.$watch(function(){return c.$invalid},function(a){e.attr("aria-invalid",!!a)})}}}}}]).directive("ngDisabled",["$aria",function(a){return a.$$watchExpr("ngDisabled","aria-disabled",c,!1)}]).directive("ngMessages",function(){return{restrict:"A",require:"?ngMessages",link:function(a,b,c,h){b.attr("aria-live")|| +b.attr("aria-live","assertive")}}}).directive("ngClick",["$aria","$parse",function(a,b){return{restrict:"A",compile:function(l,m){var n=b(m.ngClick);return function(b,d,f){if(!h(d,c)&&(a.config("bindRoleForClick")&&!d.attr("role")&&d.attr("role","button"),a.config("tabindex")&&!d.attr("tabindex")&&d.attr("tabindex",0),a.config("bindKeydown")&&!f.ngKeydown&&!f.ngKeypress&&!f.ngKeyup))d.on("keydown",function(a){function c(){n(b,{$event:a})}var d=a.which||a.keyCode;32!==d&&13!==d||b.$apply(c)})}}}}]).directive("ngDblclick", +["$aria",function(a){return function(b,l,m){!a.config("tabindex")||l.attr("tabindex")||h(l,c)||l.attr("tabindex",0)}}])})(window,window.angular); +//# sourceMappingURL=angular-aria.min.js.map diff --git a/1.6.6/angular-aria.min.js.map b/1.6.6/angular-aria.min.js.map new file mode 100644 index 000000000..0fe67fb82 --- /dev/null +++ b/1.6.6/angular-aria.min.js.map @@ -0,0 +1,8 @@ +{ +"version":3, +"file":"angular-aria.min.js", +"lineCount":13, +"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkB,CA8D3B,IAAIC,EAAgB,gDAAA,MAAA,CAAA,GAAA,CAApB,CAEIC,EAAcA,QAAQ,CAACC,CAAD,CAAOC,CAAP,CAAsB,CAC9C,GAAiD,EAAjD,GAAIA,CAAAC,QAAA,CAAsBF,CAAA,CAAK,CAAL,CAAAG,SAAtB,CAAJ,CACE,MAAO,CAAA,CAFqC,CAT7BN,EAAAO,OAAA,CAAe,QAAf,CAAyB,CAAC,IAAD,CAAzB,CAAAC,KAAA,CACU,CAAEC,eAAgB,OAAlB,CADV,CAAAC,SAAAC,CAEc,OAFdA,CAoCnBC,QAAsB,EAAG,CA2CvBC,QAASA,EAAS,CAACC,CAAD,CAAWC,CAAX,CAAqBd,CAArB,CAAoCe,CAApC,CAA4C,CAC5D,MAAO,SAAQ,CAACC,CAAD,CAAQd,CAAR,CAAce,CAAd,CAAoB,CACjC,IAAIC,EAAgBD,CAAAE,WAAA,CAAgBL,CAAhB,CAChB,EAAAM,CAAA,CAAOF,CAAP,CAAJ,EAA8BjB,CAAA,CAAYC,CAAZ,CAAkBF,CAAlB,CAA9B,EAAmEiB,CAAA,CAAKC,CAAL,CAAnE,EACEF,CAAAK,OAAA,CAAaJ,CAAA,CAAKJ,CAAL,CAAb,CAA6B,QAAQ,CAACS,CAAD,CAAU,CAE7CA,CAAA,CAAUP,CAAA,CAAS,CAACO,CAAV,CAAoB,CAAEA,CAAAA,CAChCpB,EAAAe,KAAA,CAAUH,CAAV,CAAoBQ,CAApB,CAH6C,CAA/C,CAH+B,CADyB,CA1C9D,IAAIF,EAAS,CACXG,WAAY,CAAA,CADD,CAEXC,YAAa,CAAA,CAFF,CAGXC,aAAc,CAAA,CAHH,CAIXC,aAAc,CAAA,CAJH,CAKXC,aAAc,CAAA,CALH,CAMXC,YAAa,CAAA,CANF,CAOXC,UAAW,CAAA,CAPA,CAQXC,SAAU,CAAA,CARC,CASXC,YAAa,CAAA,CATF;AAUXC,iBAAkB,CAAA,CAVP,CAsCb,KAAAZ,OAAA,CAAca,QAAQ,CAACC,CAAD,CAAY,CAChCd,CAAA,CAASrB,CAAAoC,OAAA,CAAef,CAAf,CAAuBc,CAAvB,CADuB,CAkElC,KAAAE,KAAA,CAAYC,QAAQ,EAAG,CACrB,MAAO,CACLjB,OAAQA,QAAQ,CAACkB,CAAD,CAAM,CACpB,MAAOlB,EAAA,CAAOkB,CAAP,CADa,CADjB,CAILC,YAAa3B,CAJR,CADc,CAzGA,CApCNF,CAwJnB8B,UAAA,CAAuB,QAAvB,CAAiC,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CACzD,MAAOA,EAAAF,YAAA,CAAkB,QAAlB,CAA4B,aAA5B,CAA2C,EAA3C,CAA+C,CAAA,CAA/C,CADkD,CAA1B,CAAjC,CAAAC,UAAA,CAGW,QAHX,CAGqB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CAC7C,MAAOA,EAAAF,YAAA,CAAkB,QAAlB,CAA4B,aAA5B,CAA2C,EAA3C,CAA+C,CAAA,CAA/C,CADsC,CAA1B,CAHrB,CAAAC,UAAA,CAMW,SANX,CAMsB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CAC9C,MAAOA,EAAAF,YAAA,CAAkB,SAAlB,CAA6B,cAA7B,CAA6CvC,CAA7C,CAA4D,CAAA,CAA5D,CADuC,CAA1B,CANtB,CAAAwC,UAAA,CASW,WATX,CASwB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CAChD,MAAOA,EAAAF,YAAA,CAAkB,WAAlB,CAA+B,cAA/B;AAA+CvC,CAA/C,CAA8D,CAAA,CAA9D,CADyC,CAA1B,CATxB,CAAAwC,UAAA,CAYW,YAZX,CAYyB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CACjD,MAAOA,EAAAF,YAAA,CAAkB,YAAlB,CAAgC,eAAhC,CAAiDvC,CAAjD,CAAgE,CAAA,CAAhE,CAD0C,CAA1B,CAZzB,CAAAwC,UAAA,CAeW,YAfX,CAeyB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CACjD,MAAOA,EAAAF,YAAA,CAAkB,YAAlB,CAAgC,eAAhC,CAAiDvC,CAAjD,CAAgE,CAAA,CAAhE,CAD0C,CAA1B,CAfzB,CAAAwC,UAAA,CAkBW,SAlBX,CAkBsB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CAE9CC,QAASA,EAAgB,CAACzB,CAAD,CAAO0B,CAAP,CAAuBzC,CAAvB,CAA6B0C,CAA7B,CAAgD,CACvE,MAAOH,EAAArB,OAAA,CAAauB,CAAb,CAAP,EAAuC,CAACzC,CAAAe,KAAA,CAAUA,CAAV,CAAxC,GAA4D2B,CAA5D,EAAiF,CAAC3C,CAAA,CAAYC,CAAZ,CAAkBF,CAAlB,CAAlF,CADuE,CAIzE6C,QAASA,EAAgB,CAACC,CAAD,CAAO5C,CAAP,CAAa,CAIpC,MAAO,CAACA,CAAAe,KAAA,CAAU,MAAV,CAAR,EAA8Bf,CAAAe,KAAA,CAAU,MAAV,CAA9B,GAAoD6B,CAApD,EAA6D,CAAC7C,CAAA,CAAYC,CAAZ,CAAkBF,CAAlB,CAJ1B,CAOtC+C,QAASA,EAAQ,CAAC9B,CAAD,CAAOf,CAAP,CAAa,CAAA,IACxB8C,EAAO/B,CAAA+B,KADiB,CAExBF,EAAO7B,CAAA6B,KAEX,OAA2B,UAApB,IAAEE,CAAF,EAAUF,CAAV,GAA2C,kBAA3C,GAAkCA,CAAlC,CAAiE,UAAjE,CACoB,OAApB,IAAEE,CAAF;AAAUF,CAAV,GAA2C,eAA3C,GAAkCA,CAAlC,CAA8D,OAA9D,CACU,OAAV,GAACE,CAAD,EAA2C,aAA3C,GAAkCF,CAAlC,EAAqE,QAArE,GAA4DA,CAA5D,CAAiF,OAAjF,CAA2F,EANtE,CAS9B,MAAO,CACLG,SAAU,GADL,CAELC,QAAS,SAFJ,CAGLC,SAAU,GAHL,CAILC,QAASA,QAAQ,CAAClD,CAAD,CAAOe,CAAP,CAAa,CAC5B,IAAIoC,EAAQN,CAAA,CAAS9B,CAAT,CAAef,CAAf,CAEZ,OAAO,CACLoD,KAAMA,QAAQ,CAACtC,CAAD,CAAQd,CAAR,CAAce,CAAd,CAAoBsC,CAApB,CAA6B,CAGzCC,QAASA,EAAqB,EAAG,CAC/B,MAAOD,EAAAE,YADwB,CAIjCC,QAASA,EAAgB,CAACC,CAAD,CAAS,CAIhCzD,CAAAe,KAAA,CAAU,cAAV,CADeA,CAAA2C,MACf,EAD6BL,CAAAM,WAC7B,CAJgC,CAOlCC,QAASA,EAAmB,EAAG,CAC7B5D,CAAAe,KAAA,CAAU,cAAV,CAA0B,CAACsC,CAAAQ,SAAA,CAAiBR,CAAAM,WAAjB,CAA3B,CAD6B,CAb/B,IAAIG,EAAgBtB,CAAA,CAAiB,UAAjB,CAA6B,UAA7B,CAAyCxC,CAAzC,CAA+C,CAAA,CAA/C,CAiBpB,QAAQmD,CAAR,EACE,KAAK,OAAL,CACA,KAAK,UAAL,CACMR,CAAA,CAAiBQ,CAAjB,CAAwBnD,CAAxB,CAAJ,EACEA,CAAAe,KAAA,CAAU,MAAV,CAAkBoC,CAAlB,CAEEX,EAAA,CAAiB,cAAjB,CAAiC,aAAjC,CAAgDxC,CAAhD,CAAsD,CAAA,CAAtD,CAAJ,EACEc,CAAAK,OAAA,CAAamC,CAAb;AAA8C,OAAV,GAAAH,CAAA,CAChCK,CADgC,CACbI,CADvB,CAGEE,EAAJ,EACE9D,CAAAe,KAAA,CAAU,UAAV,CAAsB,CAAtB,CAEF,MACF,MAAK,OAAL,CACM4B,CAAA,CAAiBQ,CAAjB,CAAwBnD,CAAxB,CAAJ,EACEA,CAAAe,KAAA,CAAU,MAAV,CAAkB,QAAlB,CAEF,IAAIwB,CAAArB,OAAA,CAAa,WAAb,CAAJ,CAA+B,CAC7B,IAAI6C,EAAoB,CAAC/D,CAAAe,KAAA,CAAU,eAAV,CAArBgD,GACChD,CAAAiD,eAAA,CAAoB,KAApB,CADDD,EAC+BhD,CAAAiD,eAAA,CAAoB,OAApB,CAD/BD,CAAJ,CAEIE,EAAoB,CAACjE,CAAAe,KAAA,CAAU,eAAV,CAArBkD,GACClD,CAAAiD,eAAA,CAAoB,KAApB,CADDC,EAC+BlD,CAAAiD,eAAA,CAAoB,OAApB,CAD/BC,CAFJ,CAIIC,EAAoB,CAAClE,CAAAe,KAAA,CAAU,eAAV,CAErBgD,EAAJ,EACEhD,CAAAoD,SAAA,CAAc,KAAd,CAAqBC,QAA+B,CAACX,CAAD,CAAS,CAC3DzD,CAAAe,KAAA,CAAU,eAAV,CAA2B0C,CAA3B,CAD2D,CAA7D,CAIEQ,EAAJ,EACElD,CAAAoD,SAAA,CAAc,KAAd,CAAqBC,QAA+B,CAACX,CAAD,CAAS,CAC3DzD,CAAAe,KAAA,CAAU,eAAV,CAA2B0C,CAA3B,CAD2D,CAA7D,CAIES,EAAJ,EACEpD,CAAAK,OAAA,CAAamC,CAAb,CAAoCe,QAA+B,CAACZ,CAAD,CAAS,CAC1EzD,CAAAe,KAAA,CAAU,eAAV,CAA2B0C,CAA3B,CAD0E,CAA5E,CAlB2B,CAuB3BK,CAAJ,EACE9D,CAAAe,KAAA,CAAU,UAAV;AAAsB,CAAtB,CA1CN,CA+CK,CAAAA,CAAAiD,eAAA,CAAoB,YAApB,CAAL,EAA0CX,CAAAiB,YAAAC,SAA1C,EACK/B,CAAA,CAAiB,eAAjB,CAAkC,cAAlC,CAAkDxC,CAAlD,CAAwD,CAAA,CAAxD,CADL,EAGEe,CAAAoD,SAAA,CAAc,UAAd,CAA0B,QAAQ,EAAG,CACnCnE,CAAAe,KAAA,CAAU,eAAV,CAA2B,CAAE,CAAAA,CAAA,SAA7B,CADmC,CAArC,CAKEyB,EAAA,CAAiB,cAAjB,CAAiC,aAAjC,CAAgDxC,CAAhD,CAAsD,CAAA,CAAtD,CAAJ,EACEc,CAAAK,OAAA,CAAaqD,QAA2B,EAAG,CACzC,MAAOnB,EAAAoB,SADkC,CAA3C,CAEGC,QAA8B,CAACjB,CAAD,CAAS,CACxCzD,CAAAe,KAAA,CAAU,cAAV,CAA0B,CAAE0C,CAAAA,CAA5B,CADwC,CAF1C,CA1EuC,CADtC,CAHqB,CAJzB,CAtBuC,CAA1B,CAlBtB,CAAAnB,UAAA,CAqIW,YArIX,CAqIyB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CACjD,MAAOA,EAAAF,YAAA,CAAkB,YAAlB,CAAgC,eAAhC,CAAiDvC,CAAjD,CAAgE,CAAA,CAAhE,CAD0C,CAA1B,CArIzB,CAAAwC,UAAA,CAwIW,YAxIX,CAwIyB,QAAQ,EAAG,CAClC,MAAO,CACLS,SAAU,GADL,CAELC,QAAS,aAFJ,CAGL2B,KAAMA,QAAQ,CAAC7D,CAAD,CAAQd,CAAR,CAAce,CAAd,CAAoB6D,CAApB,CAAgC,CACvC5E,CAAAe,KAAA,CAAU,WAAV,CAAL;AACEf,CAAAe,KAAA,CAAU,WAAV,CAAuB,WAAvB,CAF0C,CAHzC,CAD2B,CAxIpC,CAAAuB,UAAA,CAmJW,SAnJX,CAmJqB,CAAC,OAAD,CAAU,QAAV,CAAoB,QAAQ,CAACC,CAAD,CAAQsC,CAAR,CAAgB,CAC/D,MAAO,CACL9B,SAAU,GADL,CAELG,QAASA,QAAQ,CAAClD,CAAD,CAAOe,CAAP,CAAa,CAC5B,IAAI+D,EAAKD,CAAA,CAAO9D,CAAAgE,QAAP,CACT,OAAO,SAAQ,CAACjE,CAAD,CAAQd,CAAR,CAAce,CAAd,CAAoB,CAEjC,GAAK,CAAAhB,CAAA,CAAYC,CAAZ,CAAkBF,CAAlB,CAAL,GAEMyC,CAAArB,OAAA,CAAa,kBAAb,CAQA,EARqC,CAAAlB,CAAAe,KAAA,CAAU,MAAV,CAQrC,EAPFf,CAAAe,KAAA,CAAU,MAAV,CAAkB,QAAlB,CAOE,CAJAwB,CAAArB,OAAA,CAAa,UAAb,CAIA,EAJ6B,CAAAlB,CAAAe,KAAA,CAAU,UAAV,CAI7B,EAHFf,CAAAe,KAAA,CAAU,UAAV,CAAsB,CAAtB,CAGE,CAAAwB,CAAArB,OAAA,CAAa,aAAb,CAAA,EAAgC8D,CAAAjE,CAAAiE,UAAhC,EAAmDC,CAAAlE,CAAAkE,WAAnD,EAAuEC,CAAAnE,CAAAmE,QAV7E,EAWIlF,CAAAmF,GAAA,CAAQ,SAAR,CAAmB,QAAQ,CAACC,CAAD,CAAQ,CAMjCC,QAASA,EAAQ,EAAG,CAClBP,CAAA,CAAGhE,CAAH,CAAU,CAAEwE,OAAQF,CAAV,CAAV,CADkB,CALpB,IAAIG,EAAUH,CAAAI,MAAVD,EAAyBH,CAAAG,QACb,GAAhB,GAAIA,CAAJ,EAAkC,EAAlC,GAAsBA,CAAtB,EACEzE,CAAA2E,OAAA,CAAaJ,CAAb,CAH+B,CAAnC,CAb6B,CAFP,CAFzB,CADwD,CAA5C,CAnJrB,CAAA/C,UAAA,CAqLW,YArLX;AAqLyB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CACjD,MAAO,SAAQ,CAACzB,CAAD,CAAQd,CAAR,CAAce,CAAd,CAAoB,CAC7B,CAAAwB,CAAArB,OAAA,CAAa,UAAb,CAAJ,EAAiClB,CAAAe,KAAA,CAAU,UAAV,CAAjC,EAA2DhB,CAAA,CAAYC,CAAZ,CAAkBF,CAAlB,CAA3D,EACEE,CAAAe,KAAA,CAAU,UAAV,CAAsB,CAAtB,CAF+B,CADc,CAA1B,CArLzB,CA/M2B,CAA1B,CAAD,CA6YGnB,MA7YH,CA6YWA,MAAAC,QA7YX;", +"sources":["angular-aria.js"], +"names":["window","angular","nodeBlackList","isNodeOneOf","elem","nodeTypeArray","indexOf","nodeName","module","info","angularVersion","provider","ngAriaModule","$AriaProvider","watchExpr","attrName","ariaAttr","negate","scope","attr","ariaCamelName","$normalize","config","$watch","boolVal","ariaHidden","ariaChecked","ariaReadonly","ariaDisabled","ariaRequired","ariaInvalid","ariaValue","tabindex","bindKeydown","bindRoleForClick","this.config","newConfig","extend","$get","this.$get","key","$$watchExpr","directive","$aria","shouldAttachAttr","normalizedAttr","allowBlacklistEls","shouldAttachRole","role","getShape","type","restrict","require","priority","compile","shape","post","ngModel","ngAriaWatchModelValue","$modelValue","getRadioReaction","newVal","value","$viewValue","getCheckboxReaction","$isEmpty","needsTabIndex","needsAriaValuemin","hasOwnProperty","needsAriaValuemax","needsAriaValuenow","$observe","ngAriaValueMinReaction","ngAriaValueNowReaction","$validators","required","ngAriaInvalidWatch","$invalid","ngAriaInvalidReaction","link","ngMessages","$parse","fn","ngClick","ngKeydown","ngKeypress","ngKeyup","on","event","callback","$event","keyCode","which","$apply"] +} diff --git a/1.6.6/angular-cookies.js b/1.6.6/angular-cookies.js new file mode 100644 index 000000000..36a6a54c9 --- /dev/null +++ b/1.6.6/angular-cookies.js @@ -0,0 +1,331 @@ +/** + * @license AngularJS v1.6.6 + * (c) 2010-2017 Google, Inc. http://angularjs.org + * License: MIT + */ +(function(window, angular) {'use strict'; + +/** + * @ngdoc module + * @name ngCookies + * @description + * + * # ngCookies + * + * The `ngCookies` module provides a convenient wrapper for reading and writing browser cookies. + * + * + *
+ * + * See {@link ngCookies.$cookies `$cookies`} for usage. + */ + + +angular.module('ngCookies', ['ng']). + info({ angularVersion: '1.6.6' }). + /** + * @ngdoc provider + * @name $cookiesProvider + * @description + * Use `$cookiesProvider` to change the default behavior of the {@link ngCookies.$cookies $cookies} service. + * */ + provider('$cookies', [/** @this */function $CookiesProvider() { + /** + * @ngdoc property + * @name $cookiesProvider#defaults + * @description + * + * Object containing default options to pass when setting cookies. + * + * The object may have following properties: + * + * - **path** - `{string}` - The cookie will be available only for this path and its + * sub-paths. By default, this is the URL that appears in your `` tag. + * - **domain** - `{string}` - The cookie will be available only for this domain and + * its sub-domains. For security reasons the user agent will not accept the cookie + * if the current domain is not a sub-domain of this domain or equal to it. + * - **expires** - `{string|Date}` - String of the form "Wdy, DD Mon YYYY HH:MM:SS GMT" + * or a Date object indicating the exact date/time this cookie will expire. + * - **secure** - `{boolean}` - If `true`, then the cookie will only be available through a + * secured connection. + * + * Note: By default, the address that appears in your `` tag will be used as the path. + * This is important so that cookies will be visible for all routes when html5mode is enabled. + * + * @example + * + * ```js + * angular.module('cookiesProviderExample', ['ngCookies']) + * .config(['$cookiesProvider', function($cookiesProvider) { + * // Setting default options + * $cookiesProvider.defaults.domain = 'foo.com'; + * $cookiesProvider.defaults.secure = true; + * }]); + * ``` + **/ + var defaults = this.defaults = {}; + + function calcOptions(options) { + return options ? angular.extend({}, defaults, options) : defaults; + } + + /** + * @ngdoc service + * @name $cookies + * + * @description + * Provides read/write access to browser's cookies. + * + *
+ * Up until Angular 1.3, `$cookies` exposed properties that represented the + * current browser cookie values. In version 1.4, this behavior has changed, and + * `$cookies` now provides a standard api of getters, setters etc. + *
+ * + * Requires the {@link ngCookies `ngCookies`} module to be installed. + * + * @example + * + * ```js + * angular.module('cookiesExample', ['ngCookies']) + * .controller('ExampleController', ['$cookies', function($cookies) { + * // Retrieving a cookie + * var favoriteCookie = $cookies.get('myFavorite'); + * // Setting a cookie + * $cookies.put('myFavorite', 'oatmeal'); + * }]); + * ``` + */ + this.$get = ['$$cookieReader', '$$cookieWriter', function($$cookieReader, $$cookieWriter) { + return { + /** + * @ngdoc method + * @name $cookies#get + * + * @description + * Returns the value of given cookie key + * + * @param {string} key Id to use for lookup. + * @returns {string} Raw cookie value. + */ + get: function(key) { + return $$cookieReader()[key]; + }, + + /** + * @ngdoc method + * @name $cookies#getObject + * + * @description + * Returns the deserialized value of given cookie key + * + * @param {string} key Id to use for lookup. + * @returns {Object} Deserialized cookie value. + */ + getObject: function(key) { + var value = this.get(key); + return value ? angular.fromJson(value) : value; + }, + + /** + * @ngdoc method + * @name $cookies#getAll + * + * @description + * Returns a key value object with all the cookies + * + * @returns {Object} All cookies + */ + getAll: function() { + return $$cookieReader(); + }, + + /** + * @ngdoc method + * @name $cookies#put + * + * @description + * Sets a value for given cookie key + * + * @param {string} key Id for the `value`. + * @param {string} value Raw value to be stored. + * @param {Object=} options Options object. + * See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults} + */ + put: function(key, value, options) { + $$cookieWriter(key, value, calcOptions(options)); + }, + + /** + * @ngdoc method + * @name $cookies#putObject + * + * @description + * Serializes and sets a value for given cookie key + * + * @param {string} key Id for the `value`. + * @param {Object} value Value to be stored. + * @param {Object=} options Options object. + * See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults} + */ + putObject: function(key, value, options) { + this.put(key, angular.toJson(value), options); + }, + + /** + * @ngdoc method + * @name $cookies#remove + * + * @description + * Remove given cookie + * + * @param {string} key Id of the key-value pair to delete. + * @param {Object=} options Options object. + * See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults} + */ + remove: function(key, options) { + $$cookieWriter(key, undefined, calcOptions(options)); + } + }; + }]; + }]); + +angular.module('ngCookies'). +/** + * @ngdoc service + * @name $cookieStore + * @deprecated + * sinceVersion="v1.4.0" + * Please use the {@link ngCookies.$cookies `$cookies`} service instead. + * + * @requires $cookies + * + * @description + * Provides a key-value (string-object) storage, that is backed by session cookies. + * Objects put or retrieved from this storage are automatically serialized or + * deserialized by angular's toJson/fromJson. + * + * Requires the {@link ngCookies `ngCookies`} module to be installed. + * + * @example + * + * ```js + * angular.module('cookieStoreExample', ['ngCookies']) + * .controller('ExampleController', ['$cookieStore', function($cookieStore) { + * // Put cookie + * $cookieStore.put('myFavorite','oatmeal'); + * // Get cookie + * var favoriteCookie = $cookieStore.get('myFavorite'); + * // Removing a cookie + * $cookieStore.remove('myFavorite'); + * }]); + * ``` + */ + factory('$cookieStore', ['$cookies', function($cookies) { + + return { + /** + * @ngdoc method + * @name $cookieStore#get + * + * @description + * Returns the value of given cookie key + * + * @param {string} key Id to use for lookup. + * @returns {Object} Deserialized cookie value, undefined if the cookie does not exist. + */ + get: function(key) { + return $cookies.getObject(key); + }, + + /** + * @ngdoc method + * @name $cookieStore#put + * + * @description + * Sets a value for given cookie key + * + * @param {string} key Id for the `value`. + * @param {Object} value Value to be stored. + */ + put: function(key, value) { + $cookies.putObject(key, value); + }, + + /** + * @ngdoc method + * @name $cookieStore#remove + * + * @description + * Remove given cookie + * + * @param {string} key Id of the key-value pair to delete. + */ + remove: function(key) { + $cookies.remove(key); + } + }; + + }]); + +/** + * @name $$cookieWriter + * @requires $document + * + * @description + * This is a private service for writing cookies + * + * @param {string} name Cookie name + * @param {string=} value Cookie value (if undefined, cookie will be deleted) + * @param {Object=} options Object with options that need to be stored for the cookie. + */ +function $$CookieWriter($document, $log, $browser) { + var cookiePath = $browser.baseHref(); + var rawDocument = $document[0]; + + function buildCookieString(name, value, options) { + var path, expires; + options = options || {}; + expires = options.expires; + path = angular.isDefined(options.path) ? options.path : cookiePath; + if (angular.isUndefined(value)) { + expires = 'Thu, 01 Jan 1970 00:00:00 GMT'; + value = ''; + } + if (angular.isString(expires)) { + expires = new Date(expires); + } + + var str = encodeURIComponent(name) + '=' + encodeURIComponent(value); + str += path ? ';path=' + path : ''; + str += options.domain ? ';domain=' + options.domain : ''; + str += expires ? ';expires=' + expires.toUTCString() : ''; + str += options.secure ? ';secure' : ''; + + // per http://www.ietf.org/rfc/rfc2109.txt browser must allow at minimum: + // - 300 cookies + // - 20 cookies per unique domain + // - 4096 bytes per cookie + var cookieLength = str.length + 1; + if (cookieLength > 4096) { + $log.warn('Cookie \'' + name + + '\' possibly not set or overflowed because it was too large (' + + cookieLength + ' > 4096 bytes)!'); + } + + return str; + } + + return function(name, value, options) { + rawDocument.cookie = buildCookieString(name, value, options); + }; +} + +$$CookieWriter.$inject = ['$document', '$log', '$browser']; + +angular.module('ngCookies').provider('$$cookieWriter', /** @this */ function $$CookieWriterProvider() { + this.$get = $$CookieWriter; +}); + + +})(window, window.angular); diff --git a/1.6.6/angular-cookies.min.js b/1.6.6/angular-cookies.min.js new file mode 100644 index 000000000..40a21a477 --- /dev/null +++ b/1.6.6/angular-cookies.min.js @@ -0,0 +1,9 @@ +/* + AngularJS v1.6.6 + (c) 2010-2017 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(n,c){'use strict';function l(b,a,g){var d=g.baseHref(),k=b[0];return function(b,e,f){var g,h;f=f||{};h=f.expires;g=c.isDefined(f.path)?f.path:d;c.isUndefined(e)&&(h="Thu, 01 Jan 1970 00:00:00 GMT",e="");c.isString(h)&&(h=new Date(h));e=encodeURIComponent(b)+"="+encodeURIComponent(e);e=e+(g?";path="+g:"")+(f.domain?";domain="+f.domain:"");e+=h?";expires="+h.toUTCString():"";e+=f.secure?";secure":"";f=e.length+1;4096 4096 bytes)!");k.cookie=e}}c.module("ngCookies",["ng"]).info({angularVersion:"1.6.6"}).provider("$cookies",[function(){var b=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(a,g){return{get:function(d){return a()[d]},getObject:function(d){return(d=this.get(d))?c.fromJson(d):d},getAll:function(){return a()},put:function(d,a,m){g(d,a,m?c.extend({},b,m):b)},putObject:function(d,b,a){this.put(d,c.toJson(b),a)},remove:function(a,k){g(a,void 0,k?c.extend({},b,k):b)}}}]}]);c.module("ngCookies").factory("$cookieStore", +["$cookies",function(b){return{get:function(a){return b.getObject(a)},put:function(a,c){b.putObject(a,c)},remove:function(a){b.remove(a)}}}]);l.$inject=["$document","$log","$browser"];c.module("ngCookies").provider("$$cookieWriter",function(){this.$get=l})})(window,window.angular); +//# sourceMappingURL=angular-cookies.min.js.map diff --git a/1.6.6/angular-cookies.min.js.map b/1.6.6/angular-cookies.min.js.map new file mode 100644 index 000000000..a4278c4d3 --- /dev/null +++ b/1.6.6/angular-cookies.min.js.map @@ -0,0 +1,8 @@ +{ +"version":3, +"file":"angular-cookies.min.js", +"lineCount":8, +"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkB,CAoR3BC,QAASA,EAAc,CAACC,CAAD,CAAYC,CAAZ,CAAkBC,CAAlB,CAA4B,CACjD,IAAIC,EAAaD,CAAAE,SAAA,EAAjB,CACIC,EAAcL,CAAA,CAAU,CAAV,CAmClB,OAAO,SAAQ,CAACM,CAAD,CAAOC,CAAP,CAAcC,CAAd,CAAuB,CAjCW,IAC3CC,CAD2C,CACrCC,CACVF,EAAA,CAgCoDA,CAhCpD,EAAqB,EACrBE,EAAA,CAAUF,CAAAE,QACVD,EAAA,CAAOX,CAAAa,UAAA,CAAkBH,CAAAC,KAAlB,CAAA,CAAkCD,CAAAC,KAAlC,CAAiDN,CACpDL,EAAAc,YAAA,CAAoBL,CAApB,CAAJ,GACEG,CACA,CADU,+BACV,CAAAH,CAAA,CAAQ,EAFV,CAIIT,EAAAe,SAAA,CAAiBH,CAAjB,CAAJ,GACEA,CADF,CACY,IAAII,IAAJ,CAASJ,CAAT,CADZ,CAIIK,EAAAA,CAAMC,kBAAA,CAqB6BV,CArB7B,CAANS,CAAiC,GAAjCA,CAAuCC,kBAAA,CAAmBT,CAAnB,CAE3CQ,EAAA,CADAA,CACA,EADON,CAAA,CAAO,QAAP,CAAkBA,CAAlB,CAAyB,EAChC,GAAOD,CAAAS,OAAA,CAAiB,UAAjB,CAA8BT,CAAAS,OAA9B,CAA+C,EAAtD,CACAF,EAAA,EAAOL,CAAA,CAAU,WAAV,CAAwBA,CAAAQ,YAAA,EAAxB,CAAgD,EACvDH,EAAA,EAAOP,CAAAW,OAAA,CAAiB,SAAjB,CAA6B,EAMhCC,EAAAA,CAAeL,CAAAM,OAAfD,CAA4B,CACb,KAAnB,CAAIA,CAAJ,EACEnB,CAAAqB,KAAA,CAAU,UAAV,CASqChB,CATrC,CACE,6DADF;AAEEc,CAFF,CAEiB,iBAFjB,CASFf,EAAAkB,OAAA,CAJOR,CAG6B,CArCW,CAlQnDjB,CAAA0B,OAAA,CAAe,WAAf,CAA4B,CAAC,IAAD,CAA5B,CAAAC,KAAA,CACO,CAAEC,eAAgB,OAAlB,CADP,CAAAC,SAAA,CAQY,UARZ,CAQwB,CAAaC,QAAyB,EAAG,CAkC7D,IAAIC,EAAW,IAAAA,SAAXA,CAA2B,EAiC/B,KAAAC,KAAA,CAAY,CAAC,gBAAD,CAAmB,gBAAnB,CAAqC,QAAQ,CAACC,CAAD,CAAiBC,CAAjB,CAAiC,CACxF,MAAO,CAWLC,IAAKA,QAAQ,CAACC,CAAD,CAAM,CACjB,MAAOH,EAAA,EAAA,CAAiBG,CAAjB,CADU,CAXd,CAyBLC,UAAWA,QAAQ,CAACD,CAAD,CAAM,CAEvB,MAAO,CADH3B,CACG,CADK,IAAA0B,IAAA,CAASC,CAAT,CACL,EAAQpC,CAAAsC,SAAA,CAAiB7B,CAAjB,CAAR,CAAkCA,CAFlB,CAzBpB,CAuCL8B,OAAQA,QAAQ,EAAG,CACjB,MAAON,EAAA,EADU,CAvCd,CAuDLO,IAAKA,QAAQ,CAACJ,CAAD,CAAM3B,CAAN,CAAaC,CAAb,CAAsB,CACjCwB,CAAA,CAAeE,CAAf,CAAoB3B,CAApB,CAAuCC,CAvFpC,CAAUV,CAAAyC,OAAA,CAAe,EAAf,CAAmBV,CAAnB,CAuF0BrB,CAvF1B,CAAV,CAAkDqB,CAuFrD,CADiC,CAvD9B,CAuELW,UAAWA,QAAQ,CAACN,CAAD,CAAM3B,CAAN,CAAaC,CAAb,CAAsB,CACvC,IAAA8B,IAAA,CAASJ,CAAT,CAAcpC,CAAA2C,OAAA,CAAelC,CAAf,CAAd,CAAqCC,CAArC,CADuC,CAvEpC,CAsFLkC,OAAQA,QAAQ,CAACR,CAAD,CAAM1B,CAAN,CAAe,CAC7BwB,CAAA,CAAeE,CAAf,CAAoBS,IAAAA,EAApB,CAA2CnC,CAtHxC,CAAUV,CAAAyC,OAAA,CAAe,EAAf,CAAmBV,CAAnB,CAsH8BrB,CAtH9B,CAAV,CAAkDqB,CAsHrD,CAD6B,CAtF1B,CADiF,CAA9E,CAnEiD,CAAzC,CARxB,CAyKA/B,EAAA0B,OAAA,CAAe,WAAf,CAAAoB,QAAA,CA+BS,cA/BT;AA+ByB,CAAC,UAAD,CAAa,QAAQ,CAACC,CAAD,CAAW,CAErD,MAAO,CAWLZ,IAAKA,QAAQ,CAACC,CAAD,CAAM,CACjB,MAAOW,EAAAV,UAAA,CAAmBD,CAAnB,CADU,CAXd,CAyBLI,IAAKA,QAAQ,CAACJ,CAAD,CAAM3B,CAAN,CAAa,CACxBsC,CAAAL,UAAA,CAAmBN,CAAnB,CAAwB3B,CAAxB,CADwB,CAzBrB,CAsCLmC,OAAQA,QAAQ,CAACR,CAAD,CAAM,CACpBW,CAAAH,OAAA,CAAgBR,CAAhB,CADoB,CAtCjB,CAF8C,CAAhC,CA/BzB,CAmIAnC,EAAA+C,QAAA,CAAyB,CAAC,WAAD,CAAc,MAAd,CAAsB,UAAtB,CAEzBhD,EAAA0B,OAAA,CAAe,WAAf,CAAAG,SAAA,CAAqC,gBAArC,CAAoEoB,QAA+B,EAAG,CACpG,IAAAjB,KAAA,CAAY/B,CADwF,CAAtG,CAhU2B,CAA1B,CAAD,CAqUGF,MArUH,CAqUWA,MAAAC,QArUX;", +"sources":["angular-cookies.js"], +"names":["window","angular","$$CookieWriter","$document","$log","$browser","cookiePath","baseHref","rawDocument","name","value","options","path","expires","isDefined","isUndefined","isString","Date","str","encodeURIComponent","domain","toUTCString","secure","cookieLength","length","warn","cookie","module","info","angularVersion","provider","$CookiesProvider","defaults","$get","$$cookieReader","$$cookieWriter","get","key","getObject","fromJson","getAll","put","extend","putObject","toJson","remove","undefined","factory","$cookies","$inject","$$CookieWriterProvider"] +} diff --git a/1.6.6/angular-csp.css b/1.6.6/angular-csp.css new file mode 100644 index 000000000..f3cd926cb --- /dev/null +++ b/1.6.6/angular-csp.css @@ -0,0 +1,21 @@ +/* Include this file in your html if you are using the CSP mode. */ + +@charset "UTF-8"; + +[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], +.ng-cloak, .x-ng-cloak, +.ng-hide:not(.ng-hide-animate) { + display: none !important; +} + +ng\:form { + display: block; +} + +.ng-animate-shim { + visibility:hidden; +} + +.ng-anchor { + position:absolute; +} diff --git a/1.6.6/angular-loader.js b/1.6.6/angular-loader.js new file mode 100644 index 000000000..7ea2e5012 --- /dev/null +++ b/1.6.6/angular-loader.js @@ -0,0 +1,609 @@ +/** + * @license AngularJS v1.6.6 + * (c) 2010-2017 Google, Inc. http://angularjs.org + * License: MIT + */ + +(function() {'use strict'; + // NOTE: + // These functions are copied here from `src/Angular.js`, because they are needed inside the + // `angular-loader.js` closure and need to be available before the main `angular.js` script has + // been loaded. + function isFunction(value) {return typeof value === 'function';} + function isDefined(value) {return typeof value !== 'undefined';} + function isNumber(value) {return typeof value === 'number';} + function isObject(value) {return value !== null && typeof value === 'object';} + function isScope(obj) {return obj && obj.$evalAsync && obj.$watch;} + function isUndefined(value) {return typeof value === 'undefined';} + function isWindow(obj) {return obj && obj.window === obj;} + function sliceArgs(args, startIndex) {return Array.prototype.slice.call(args, startIndex || 0);} + function toJsonReplacer(key, value) { + var val = value; + + if (typeof key === 'string' && key.charAt(0) === '$' && key.charAt(1) === '$') { + val = undefined; + } else if (isWindow(value)) { + val = '$WINDOW'; + } else if (value && window.document === value) { + val = '$DOCUMENT'; + } else if (isScope(value)) { + val = '$SCOPE'; + } + + return val; + } + +/* exported toDebugString */ + +function serializeObject(obj, maxDepth) { + var seen = []; + + // There is no direct way to stringify object until reaching a specific depth + // and a very deep object can cause a performance issue, so we copy the object + // based on this specific depth and then stringify it. + if (isValidObjectMaxDepth(maxDepth)) { + // This file is also included in `angular-loader`, so `copy()` might not always be available in + // the closure. Therefore, it is lazily retrieved as `angular.copy()` when needed. + obj = angular.copy(obj, null, maxDepth); + } + return JSON.stringify(obj, function(key, val) { + val = toJsonReplacer(key, val); + if (isObject(val)) { + + if (seen.indexOf(val) >= 0) return '...'; + + seen.push(val); + } + return val; + }); +} + +function toDebugString(obj, maxDepth) { + if (typeof obj === 'function') { + return obj.toString().replace(/ \{[\s\S]*$/, ''); + } else if (isUndefined(obj)) { + return 'undefined'; + } else if (typeof obj !== 'string') { + return serializeObject(obj, maxDepth); + } + return obj; +} + +/* exported + minErrConfig, + errorHandlingConfig, + isValidObjectMaxDepth +*/ + +var minErrConfig = { + objectMaxDepth: 5 +}; + +/** + * @ngdoc function + * @name angular.errorHandlingConfig + * @module ng + * @kind function + * + * @description + * Configure several aspects of error handling in AngularJS if used as a setter or return the + * current configuration if used as a getter. The following options are supported: + * + * - **objectMaxDepth**: The maximum depth to which objects are traversed when stringified for error messages. + * + * Omitted or undefined options will leave the corresponding configuration values unchanged. + * + * @param {Object=} config - The configuration object. May only contain the options that need to be + * updated. Supported keys: + * + * * `objectMaxDepth` **{Number}** - The max depth for stringifying objects. Setting to a + * non-positive or non-numeric value, removes the max depth limit. + * Default: 5 + */ +function errorHandlingConfig(config) { + if (isObject(config)) { + if (isDefined(config.objectMaxDepth)) { + minErrConfig.objectMaxDepth = isValidObjectMaxDepth(config.objectMaxDepth) ? config.objectMaxDepth : NaN; + } + } else { + return minErrConfig; + } +} + +/** + * @private + * @param {Number} maxDepth + * @return {boolean} + */ +function isValidObjectMaxDepth(maxDepth) { + return isNumber(maxDepth) && maxDepth > 0; +} + +/** + * @description + * + * This object provides a utility for producing rich Error messages within + * Angular. It can be called as follows: + * + * var exampleMinErr = minErr('example'); + * throw exampleMinErr('one', 'This {0} is {1}', foo, bar); + * + * The above creates an instance of minErr in the example namespace. The + * resulting error will have a namespaced error code of example.one. The + * resulting error will replace {0} with the value of foo, and {1} with the + * value of bar. The object is not restricted in the number of arguments it can + * take. + * + * If fewer arguments are specified than necessary for interpolation, the extra + * interpolation markers will be preserved in the final string. + * + * Since data will be parsed statically during a build step, some restrictions + * are applied with respect to how minErr instances are created and called. + * Instances should have names of the form namespaceMinErr for a minErr created + * using minErr('namespace') . Error codes, namespaces and template strings + * should all be static strings, not variables or general expressions. + * + * @param {string} module The namespace to use for the new minErr instance. + * @param {function} ErrorConstructor Custom error constructor to be instantiated when returning + * error from returned function, for cases when a particular type of error is useful. + * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance + */ + +function minErr(module, ErrorConstructor) { + ErrorConstructor = ErrorConstructor || Error; + return function() { + var code = arguments[0], + template = arguments[1], + message = '[' + (module ? module + ':' : '') + code + '] ', + templateArgs = sliceArgs(arguments, 2).map(function(arg) { + return toDebugString(arg, minErrConfig.objectMaxDepth); + }), + paramPrefix, i; + + message += template.replace(/\{\d+\}/g, function(match) { + var index = +match.slice(1, -1); + + if (index < templateArgs.length) { + return templateArgs[index]; + } + + return match; + }); + + message += '\nhttp://errors.angularjs.org/1.6.6/' + + (module ? module + '/' : '') + code; + + for (i = 0, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') { + message += paramPrefix + 'p' + i + '=' + encodeURIComponent(templateArgs[i]); + } + + return new ErrorConstructor(message); + }; +} + +/** + * @ngdoc type + * @name angular.Module + * @module ng + * @description + * + * Interface for configuring angular {@link angular.module modules}. + */ + +function setupModuleLoader(window) { + + var $injectorMinErr = minErr('$injector'); + var ngMinErr = minErr('ng'); + + function ensure(obj, name, factory) { + return obj[name] || (obj[name] = factory()); + } + + var angular = ensure(window, 'angular', Object); + + // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap + angular.$$minErr = angular.$$minErr || minErr; + + return ensure(angular, 'module', function() { + /** @type {Object.} */ + var modules = {}; + + /** + * @ngdoc function + * @name angular.module + * @module ng + * @description + * + * The `angular.module` is a global place for creating, registering and retrieving Angular + * modules. + * All modules (angular core or 3rd party) that should be available to an application must be + * registered using this mechanism. + * + * Passing one argument retrieves an existing {@link angular.Module}, + * whereas passing more than one argument creates a new {@link angular.Module} + * + * + * # Module + * + * A module is a collection of services, directives, controllers, filters, and configuration information. + * `angular.module` is used to configure the {@link auto.$injector $injector}. + * + * ```js + * // Create a new module + * var myModule = angular.module('myModule', []); + * + * // register a new service + * myModule.value('appName', 'MyCoolApp'); + * + * // configure existing services inside initialization blocks. + * myModule.config(['$locationProvider', function($locationProvider) { + * // Configure existing providers + * $locationProvider.hashPrefix('!'); + * }]); + * ``` + * + * Then you can create an injector and load your modules like this: + * + * ```js + * var injector = angular.injector(['ng', 'myModule']) + * ``` + * + * However it's more likely that you'll just use + * {@link ng.directive:ngApp ngApp} or + * {@link angular.bootstrap} to simplify this process for you. + * + * @param {!string} name The name of the module to create or retrieve. + * @param {!Array.=} requires If specified then new module is being created. If + * unspecified then the module is being retrieved for further configuration. + * @param {Function=} configFn Optional configuration function for the module. Same as + * {@link angular.Module#config Module#config()}. + * @returns {angular.Module} new module with the {@link angular.Module} api. + */ + return function module(name, requires, configFn) { + + var info = {}; + + var assertNotHasOwnProperty = function(name, context) { + if (name === 'hasOwnProperty') { + throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context); + } + }; + + assertNotHasOwnProperty(name, 'module'); + if (requires && modules.hasOwnProperty(name)) { + modules[name] = null; + } + return ensure(modules, name, function() { + if (!requires) { + throw $injectorMinErr('nomod', 'Module \'{0}\' is not available! You either misspelled ' + + 'the module name or forgot to load it. If registering a module ensure that you ' + + 'specify the dependencies as the second argument.', name); + } + + /** @type {!Array.>} */ + var invokeQueue = []; + + /** @type {!Array.} */ + var configBlocks = []; + + /** @type {!Array.} */ + var runBlocks = []; + + var config = invokeLater('$injector', 'invoke', 'push', configBlocks); + + /** @type {angular.Module} */ + var moduleInstance = { + // Private state + _invokeQueue: invokeQueue, + _configBlocks: configBlocks, + _runBlocks: runBlocks, + + /** + * @ngdoc method + * @name angular.Module#info + * @module ng + * + * @param {Object=} info Information about the module + * @returns {Object|Module} The current info object for this module if called as a getter, + * or `this` if called as a setter. + * + * @description + * Read and write custom information about this module. + * For example you could put the version of the module in here. + * + * ```js + * angular.module('myModule', []).info({ version: '1.0.0' }); + * ``` + * + * The version could then be read back out by accessing the module elsewhere: + * + * ``` + * var version = angular.module('myModule').info().version; + * ``` + * + * You can also retrieve this information during runtime via the + * {@link $injector#modules `$injector.modules`} property: + * + * ```js + * var version = $injector.modules['myModule'].info().version; + * ``` + */ + info: function(value) { + if (isDefined(value)) { + if (!isObject(value)) throw ngMinErr('aobj', 'Argument \'{0}\' must be an object', 'value'); + info = value; + return this; + } + return info; + }, + + /** + * @ngdoc property + * @name angular.Module#requires + * @module ng + * + * @description + * Holds the list of modules which the injector will load before the current module is + * loaded. + */ + requires: requires, + + /** + * @ngdoc property + * @name angular.Module#name + * @module ng + * + * @description + * Name of the module. + */ + name: name, + + + /** + * @ngdoc method + * @name angular.Module#provider + * @module ng + * @param {string} name service name + * @param {Function} providerType Construction function for creating new instance of the + * service. + * @description + * See {@link auto.$provide#provider $provide.provider()}. + */ + provider: invokeLaterAndSetModuleName('$provide', 'provider'), + + /** + * @ngdoc method + * @name angular.Module#factory + * @module ng + * @param {string} name service name + * @param {Function} providerFunction Function for creating new instance of the service. + * @description + * See {@link auto.$provide#factory $provide.factory()}. + */ + factory: invokeLaterAndSetModuleName('$provide', 'factory'), + + /** + * @ngdoc method + * @name angular.Module#service + * @module ng + * @param {string} name service name + * @param {Function} constructor A constructor function that will be instantiated. + * @description + * See {@link auto.$provide#service $provide.service()}. + */ + service: invokeLaterAndSetModuleName('$provide', 'service'), + + /** + * @ngdoc method + * @name angular.Module#value + * @module ng + * @param {string} name service name + * @param {*} object Service instance object. + * @description + * See {@link auto.$provide#value $provide.value()}. + */ + value: invokeLater('$provide', 'value'), + + /** + * @ngdoc method + * @name angular.Module#constant + * @module ng + * @param {string} name constant name + * @param {*} object Constant value. + * @description + * Because the constants are fixed, they get applied before other provide methods. + * See {@link auto.$provide#constant $provide.constant()}. + */ + constant: invokeLater('$provide', 'constant', 'unshift'), + + /** + * @ngdoc method + * @name angular.Module#decorator + * @module ng + * @param {string} name The name of the service to decorate. + * @param {Function} decorFn This function will be invoked when the service needs to be + * instantiated and should return the decorated service instance. + * @description + * See {@link auto.$provide#decorator $provide.decorator()}. + */ + decorator: invokeLaterAndSetModuleName('$provide', 'decorator', configBlocks), + + /** + * @ngdoc method + * @name angular.Module#animation + * @module ng + * @param {string} name animation name + * @param {Function} animationFactory Factory function for creating new instance of an + * animation. + * @description + * + * **NOTE**: animations take effect only if the **ngAnimate** module is loaded. + * + * + * Defines an animation hook that can be later used with + * {@link $animate $animate} service and directives that use this service. + * + * ```js + * module.animation('.animation-name', function($inject1, $inject2) { + * return { + * eventName : function(element, done) { + * //code to run the animation + * //once complete, then run done() + * return function cancellationFunction(element) { + * //code to cancel the animation + * } + * } + * } + * }) + * ``` + * + * See {@link ng.$animateProvider#register $animateProvider.register()} and + * {@link ngAnimate ngAnimate module} for more information. + */ + animation: invokeLaterAndSetModuleName('$animateProvider', 'register'), + + /** + * @ngdoc method + * @name angular.Module#filter + * @module ng + * @param {string} name Filter name - this must be a valid angular expression identifier + * @param {Function} filterFactory Factory function for creating new instance of filter. + * @description + * See {@link ng.$filterProvider#register $filterProvider.register()}. + * + *
+ * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`. + * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace + * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores + * (`myapp_subsection_filterx`). + *
+ */ + filter: invokeLaterAndSetModuleName('$filterProvider', 'register'), + + /** + * @ngdoc method + * @name angular.Module#controller + * @module ng + * @param {string|Object} name Controller name, or an object map of controllers where the + * keys are the names and the values are the constructors. + * @param {Function} constructor Controller constructor function. + * @description + * See {@link ng.$controllerProvider#register $controllerProvider.register()}. + */ + controller: invokeLaterAndSetModuleName('$controllerProvider', 'register'), + + /** + * @ngdoc method + * @name angular.Module#directive + * @module ng + * @param {string|Object} name Directive name, or an object map of directives where the + * keys are the names and the values are the factories. + * @param {Function} directiveFactory Factory function for creating new instance of + * directives. + * @description + * See {@link ng.$compileProvider#directive $compileProvider.directive()}. + */ + directive: invokeLaterAndSetModuleName('$compileProvider', 'directive'), + + /** + * @ngdoc method + * @name angular.Module#component + * @module ng + * @param {string} name Name of the component in camel-case (i.e. myComp which will match as my-comp) + * @param {Object} options Component definition object (a simplified + * {@link ng.$compile#directive-definition-object directive definition object}) + * + * @description + * See {@link ng.$compileProvider#component $compileProvider.component()}. + */ + component: invokeLaterAndSetModuleName('$compileProvider', 'component'), + + /** + * @ngdoc method + * @name angular.Module#config + * @module ng + * @param {Function} configFn Execute this function on module load. Useful for service + * configuration. + * @description + * Use this method to register work which needs to be performed on module loading. + * For more about how to configure services, see + * {@link providers#provider-recipe Provider Recipe}. + */ + config: config, + + /** + * @ngdoc method + * @name angular.Module#run + * @module ng + * @param {Function} initializationFn Execute this function after injector creation. + * Useful for application initialization. + * @description + * Use this method to register work which should be performed when the injector is done + * loading all modules. + */ + run: function(block) { + runBlocks.push(block); + return this; + } + }; + + if (configFn) { + config(configFn); + } + + return moduleInstance; + + /** + * @param {string} provider + * @param {string} method + * @param {String=} insertMethod + * @returns {angular.Module} + */ + function invokeLater(provider, method, insertMethod, queue) { + if (!queue) queue = invokeQueue; + return function() { + queue[insertMethod || 'push']([provider, method, arguments]); + return moduleInstance; + }; + } + + /** + * @param {string} provider + * @param {string} method + * @returns {angular.Module} + */ + function invokeLaterAndSetModuleName(provider, method, queue) { + if (!queue) queue = invokeQueue; + return function(recipeName, factoryFunction) { + if (factoryFunction && isFunction(factoryFunction)) factoryFunction.$$moduleName = name; + queue.push([provider, method, arguments]); + return moduleInstance; + }; + } + }); + }; + }); + +} + +setupModuleLoader(window); +})(window); + +/** + * Closure compiler type information + * + * @typedef { { + * requires: !Array., + * invokeQueue: !Array.>, + * + * service: function(string, Function):angular.Module, + * factory: function(string, Function):angular.Module, + * value: function(string, *):angular.Module, + * + * filter: function(string, Function):angular.Module, + * + * init: function(Function):angular.Module + * } } + */ +angular.Module; + diff --git a/1.6.6/angular-loader.min.js b/1.6.6/angular-loader.min.js new file mode 100644 index 000000000..fef9c561a --- /dev/null +++ b/1.6.6/angular-loader.min.js @@ -0,0 +1,10 @@ +/* + AngularJS v1.6.6 + (c) 2010-2017 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(){'use strict';function g(a,f){f=f||Error;return function(){var d=arguments[0],e;e="["+(a?a+":":"")+d+"] http://errors.angularjs.org/1.6.6/"+(a?a+"/":"")+d;for(d=1;d= line.length) { + index -= line.length; + } else { + return { line: i + 1, column: index + 1 }; + } + } +} +var PARSE_CACHE_FOR_TEXT_LITERALS = Object.create(null); + +function parseTextLiteral(text) { + var cachedFn = PARSE_CACHE_FOR_TEXT_LITERALS[text]; + if (cachedFn != null) { + return cachedFn; + } + function parsedFn(context) { return text; } + parsedFn['$$watchDelegate'] = function watchDelegate(scope, listener, objectEquality) { + var unwatch = scope['$watch'](noop, + function textLiteralWatcher() { + if (isFunction(listener)) { listener(text, text, scope); } + unwatch(); + }, + objectEquality); + return unwatch; + }; + PARSE_CACHE_FOR_TEXT_LITERALS[text] = parsedFn; + parsedFn['exp'] = text; // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js + parsedFn['expressions'] = []; // Require this to call $compile.$$addBindingInfo() which allows Protractor to find elements by binding. + return parsedFn; +} + +function subtractOffset(expressionFn, offset) { + if (offset === 0) { + return expressionFn; + } + function minusOffset(value) { + return (value == null) ? value : value - offset; + } + function parsedFn(context) { return minusOffset(expressionFn(context)); } + var unwatch; + parsedFn['$$watchDelegate'] = function watchDelegate(scope, listener, objectEquality) { + unwatch = scope['$watch'](expressionFn, + function pluralExpressionWatchListener(newValue, oldValue) { + if (isFunction(listener)) { listener(minusOffset(newValue), minusOffset(oldValue), scope); } + }, + objectEquality); + return unwatch; + }; + return parsedFn; +} + +// NOTE: ADVANCED_OPTIMIZATIONS mode. +// +// This file is compiled with Closure compiler's ADVANCED_OPTIMIZATIONS flag! Be wary of using +// constructs incompatible with that mode. + +/* global $interpolateMinErr: false */ +/* global isFunction: false */ +/* global noop: false */ + +/** + * @constructor + * @private + */ +function MessageSelectorBase(expressionFn, choices) { + var self = this; + this.expressionFn = expressionFn; + this.choices = choices; + if (choices['other'] === undefined) { + throw $interpolateMinErr('reqother', '“other” is a required option.'); + } + this.parsedFn = function(context) { return self.getResult(context); }; + this.parsedFn['$$watchDelegate'] = function $$watchDelegate(scope, listener, objectEquality) { + return self.watchDelegate(scope, listener, objectEquality); + }; + this.parsedFn['exp'] = expressionFn['exp']; + this.parsedFn['expressions'] = expressionFn['expressions']; +} + +MessageSelectorBase.prototype.getMessageFn = function getMessageFn(value) { + return this.choices[this.categorizeValue(value)]; +}; + +MessageSelectorBase.prototype.getResult = function getResult(context) { + return this.getMessageFn(this.expressionFn(context))(context); +}; + +MessageSelectorBase.prototype.watchDelegate = function watchDelegate(scope, listener, objectEquality) { + var watchers = new MessageSelectorWatchers(this, scope, listener, objectEquality); + return function() { watchers.cancelWatch(); }; +}; + +/** + * @constructor + * @private + */ +function MessageSelectorWatchers(msgSelector, scope, listener, objectEquality) { + var self = this; + this.scope = scope; + this.msgSelector = msgSelector; + this.listener = listener; + this.objectEquality = objectEquality; + this.lastMessage = undefined; + this.messageFnWatcher = noop; + var expressionFnListener = function(newValue, oldValue) { return self.expressionFnListener(newValue, oldValue); }; + this.expressionFnWatcher = scope['$watch'](msgSelector.expressionFn, expressionFnListener, objectEquality); +} + +MessageSelectorWatchers.prototype.expressionFnListener = function expressionFnListener(newValue, oldValue) { + var self = this; + this.messageFnWatcher(); + var messageFnListener = function(newMessage, oldMessage) { return self.messageFnListener(newMessage, oldMessage); }; + var messageFn = this.msgSelector.getMessageFn(newValue); + this.messageFnWatcher = this.scope['$watch'](messageFn, messageFnListener, this.objectEquality); +}; + +MessageSelectorWatchers.prototype.messageFnListener = function messageFnListener(newMessage, oldMessage) { + if (isFunction(this.listener)) { + this.listener.call(null, newMessage, newMessage === oldMessage ? newMessage : this.lastMessage, this.scope); + } + this.lastMessage = newMessage; +}; + +MessageSelectorWatchers.prototype.cancelWatch = function cancelWatch() { + this.expressionFnWatcher(); + this.messageFnWatcher(); +}; + +/** + * @constructor + * @extends MessageSelectorBase + * @private + */ +function SelectMessage(expressionFn, choices) { + MessageSelectorBase.call(this, expressionFn, choices); +} + +function SelectMessageProto() {} +SelectMessageProto.prototype = MessageSelectorBase.prototype; + +SelectMessage.prototype = new SelectMessageProto(); +SelectMessage.prototype.categorizeValue = function categorizeSelectValue(value) { + return (this.choices[value] !== undefined) ? value : 'other'; +}; + +/** + * @constructor + * @extends MessageSelectorBase + * @private + */ +function PluralMessage(expressionFn, choices, offset, pluralCat) { + MessageSelectorBase.call(this, expressionFn, choices); + this.offset = offset; + this.pluralCat = pluralCat; +} + +function PluralMessageProto() {} +PluralMessageProto.prototype = MessageSelectorBase.prototype; + +PluralMessage.prototype = new PluralMessageProto(); +PluralMessage.prototype.categorizeValue = function categorizePluralValue(value) { + if (isNaN(value)) { + return 'other'; + } else if (this.choices[value] !== undefined) { + return value; + } else { + var category = this.pluralCat(value - this.offset); + return (this.choices[category] !== undefined) ? category : 'other'; + } +}; + +// NOTE: ADVANCED_OPTIMIZATIONS mode. +// +// This file is compiled with Closure compiler's ADVANCED_OPTIMIZATIONS flag! Be wary of using +// constructs incompatible with that mode. + +/* global $interpolateMinErr: false */ +/* global isFunction: false */ +/* global parseTextLiteral: false */ + +/** + * @constructor + * @private + */ +function InterpolationParts(trustedContext, allOrNothing) { + this.trustedContext = trustedContext; + this.allOrNothing = allOrNothing; + this.textParts = []; + this.expressionFns = []; + this.expressionIndices = []; + this.partialText = ''; + this.concatParts = null; +} + +InterpolationParts.prototype.flushPartialText = function flushPartialText() { + if (this.partialText) { + if (this.concatParts == null) { + this.textParts.push(this.partialText); + } else { + this.textParts.push(this.concatParts.join('')); + this.concatParts = null; + } + this.partialText = ''; + } +}; + +InterpolationParts.prototype.addText = function addText(text) { + if (text.length) { + if (!this.partialText) { + this.partialText = text; + } else if (this.concatParts) { + this.concatParts.push(text); + } else { + this.concatParts = [this.partialText, text]; + } + } +}; + +InterpolationParts.prototype.addExpressionFn = function addExpressionFn(expressionFn) { + this.flushPartialText(); + this.expressionIndices.push(this.textParts.length); + this.expressionFns.push(expressionFn); + this.textParts.push(''); +}; + +InterpolationParts.prototype.getExpressionValues = function getExpressionValues(context) { + var expressionValues = new Array(this.expressionFns.length); + for (var i = 0; i < this.expressionFns.length; i++) { + expressionValues[i] = this.expressionFns[i](context); + } + return expressionValues; +}; + +InterpolationParts.prototype.getResult = function getResult(expressionValues) { + for (var i = 0; i < this.expressionIndices.length; i++) { + var expressionValue = expressionValues[i]; + if (this.allOrNothing && expressionValue === undefined) return; + this.textParts[this.expressionIndices[i]] = expressionValue; + } + return this.textParts.join(''); +}; + + +InterpolationParts.prototype.toParsedFn = function toParsedFn(mustHaveExpression, originalText) { + var self = this; + this.flushPartialText(); + if (mustHaveExpression && this.expressionFns.length === 0) { + return undefined; + } + if (this.textParts.length === 0) { + return parseTextLiteral(''); + } + if (this.trustedContext && this.textParts.length > 1) { + $interpolateMinErr['throwNoconcat'](originalText); + } + if (this.expressionFns.length === 0) { + if (this.textParts.length !== 1) { this.errorInParseLogic(); } + return parseTextLiteral(this.textParts[0]); + } + var parsedFn = function(context) { + return self.getResult(self.getExpressionValues(context)); + }; + parsedFn['$$watchDelegate'] = function $$watchDelegate(scope, listener, objectEquality) { + return self.watchDelegate(scope, listener, objectEquality); + }; + + parsedFn['exp'] = originalText; // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js + parsedFn['expressions'] = new Array(this.expressionFns.length); // Require this to call $compile.$$addBindingInfo() which allows Protractor to find elements by binding. + for (var i = 0; i < this.expressionFns.length; i++) { + parsedFn['expressions'][i] = this.expressionFns[i]['exp']; + } + + return parsedFn; +}; + +InterpolationParts.prototype.watchDelegate = function watchDelegate(scope, listener, objectEquality) { + var watcher = new InterpolationPartsWatcher(this, scope, listener, objectEquality); + return function() { watcher.cancelWatch(); }; +}; + +function InterpolationPartsWatcher(interpolationParts, scope, listener, objectEquality) { + this.interpolationParts = interpolationParts; + this.scope = scope; + this.previousResult = (undefined); + this.listener = listener; + var self = this; + this.expressionFnsWatcher = scope['$watchGroup'](interpolationParts.expressionFns, function(newExpressionValues, oldExpressionValues) { + self.watchListener(newExpressionValues, oldExpressionValues); + }); +} + +InterpolationPartsWatcher.prototype.watchListener = function watchListener(newExpressionValues, oldExpressionValues) { + var result = this.interpolationParts.getResult(newExpressionValues); + if (isFunction(this.listener)) { + this.listener.call(null, result, newExpressionValues === oldExpressionValues ? result : this.previousResult, this.scope); + } + this.previousResult = result; +}; + +InterpolationPartsWatcher.prototype.cancelWatch = function cancelWatch() { + this.expressionFnsWatcher(); +}; + +// NOTE: ADVANCED_OPTIMIZATIONS mode. +// +// This file is compiled with Closure compiler's ADVANCED_OPTIMIZATIONS flag! Be wary of using +// constructs incompatible with that mode. + +/* global $interpolateMinErr: false */ +/* global indexToLineAndColumn: false */ +/* global InterpolationParts: false */ +/* global PluralMessage: false */ +/* global SelectMessage: false */ +/* global subtractOffset: false */ + +// The params src and dst are exactly one of two types: NestedParserState or MessageFormatParser. +// This function is fully optimized by V8. (inspect via IRHydra or --trace-deopt.) +// The idea behind writing it this way is to avoid repeating oneself. This is the ONE place where +// the parser state that is saved/restored when parsing nested mustaches is specified. +function copyNestedParserState(src, dst) { + dst.expressionFn = src.expressionFn; + dst.expressionMinusOffsetFn = src.expressionMinusOffsetFn; + dst.pluralOffset = src.pluralOffset; + dst.choices = src.choices; + dst.choiceKey = src.choiceKey; + dst.interpolationParts = src.interpolationParts; + dst.ruleChoiceKeyword = src.ruleChoiceKeyword; + dst.msgStartIndex = src.msgStartIndex; + dst.expressionStartIndex = src.expressionStartIndex; +} + +function NestedParserState(parser) { + copyNestedParserState(parser, this); +} + +/** + * @constructor + * @private + */ +function MessageFormatParser(text, startIndex, $parse, pluralCat, stringifier, + mustHaveExpression, trustedContext, allOrNothing) { + this.text = text; + this.index = startIndex || 0; + this.$parse = $parse; + this.pluralCat = pluralCat; + this.stringifier = stringifier; + this.mustHaveExpression = !!mustHaveExpression; + this.trustedContext = trustedContext; + this.allOrNothing = !!allOrNothing; + this.expressionFn = null; + this.expressionMinusOffsetFn = null; + this.pluralOffset = null; + this.choices = null; + this.choiceKey = null; + this.interpolationParts = null; + this.msgStartIndex = null; + this.nestedStateStack = []; + this.parsedFn = null; + this.rule = null; + this.ruleStack = null; + this.ruleChoiceKeyword = null; + this.interpNestLevel = null; + this.expressionStartIndex = null; + this.stringStartIndex = null; + this.stringQuote = null; + this.stringInterestsRe = null; + this.angularOperatorStack = null; + this.textPart = null; +} + +// preserve v8 optimization. +var EMPTY_STATE = new NestedParserState(new MessageFormatParser( + /* text= */ '', /* startIndex= */ 0, /* $parse= */ null, /* pluralCat= */ null, /* stringifier= */ null, + /* mustHaveExpression= */ false, /* trustedContext= */ null, /* allOrNothing */ false)); + +MessageFormatParser.prototype.pushState = function pushState() { + this.nestedStateStack.push(new NestedParserState(this)); + copyNestedParserState(EMPTY_STATE, this); +}; + +MessageFormatParser.prototype.popState = function popState() { + if (this.nestedStateStack.length === 0) { + this.errorInParseLogic(); + } + var previousState = this.nestedStateStack.pop(); + copyNestedParserState(previousState, this); +}; + +// Oh my JavaScript! Who knew you couldn't match a regex at a specific +// location in a string but will always search forward?! +// Apparently you'll be growing this ability via the sticky flag (y) in +// ES6. I'll just to work around you for now. +MessageFormatParser.prototype.matchRe = function matchRe(re, search) { + re.lastIndex = this.index; + var match = re.exec(this.text); + if (match != null && (search === true || (match.index === this.index))) { + this.index = re.lastIndex; + return match; + } + return null; +}; + +MessageFormatParser.prototype.searchRe = function searchRe(re) { + return this.matchRe(re, true); +}; + + +MessageFormatParser.prototype.consumeRe = function consumeRe(re) { + // Without the sticky flag, we can't use the .test() method to consume a + // match at the current index. Instead, we'll use the slower .exec() method + // and verify match.index. + return !!this.matchRe(re); +}; + +// Run through our grammar avoiding deeply nested function call chains. +MessageFormatParser.prototype.run = function run(initialRule) { + this.ruleStack = [initialRule]; + do { + this.rule = this.ruleStack.pop(); + while (this.rule) { + this.rule(); + } + this.assertRuleOrNull(this.rule); + } while (this.ruleStack.length > 0); +}; + +MessageFormatParser.prototype.errorInParseLogic = function errorInParseLogic() { + throw $interpolateMinErr('logicbug', + 'The messageformat parser has encountered an internal error. Please file a github issue against the AngularJS project and provide this message text that triggers the bug. Text: “{0}”', + this.text); +}; + +MessageFormatParser.prototype.assertRuleOrNull = function assertRuleOrNull(rule) { + if (rule === undefined) { + this.errorInParseLogic(); + } +}; + +var NEXT_WORD_RE = /\s*(\w+)\s*/g; +MessageFormatParser.prototype.errorExpecting = function errorExpecting() { + // What was wrong with the syntax? Unsupported type, missing comma, or something else? + var match = this.matchRe(NEXT_WORD_RE), position; + if (match == null) { + position = indexToLineAndColumn(this.text, this.index); + throw $interpolateMinErr('reqarg', + 'Expected one of “plural” or “select” at line {0}, column {1} of text “{2}”', + position.line, position.column, this.text); + } + var word = match[1]; + if (word === 'select' || word === 'plural') { + position = indexToLineAndColumn(this.text, this.index); + throw $interpolateMinErr('reqcomma', + 'Expected a comma after the keyword “{0}” at line {1}, column {2} of text “{3}”', + word, position.line, position.column, this.text); + } else { + position = indexToLineAndColumn(this.text, this.index); + throw $interpolateMinErr('unknarg', + 'Unsupported keyword “{0}” at line {0}, column {1}. Only “plural” and “select” are currently supported. Text: “{3}”', + word, position.line, position.column, this.text); + } +}; + +var STRING_START_RE = /['"]/g; +MessageFormatParser.prototype.ruleString = function ruleString() { + var match = this.matchRe(STRING_START_RE); + if (match == null) { + var position = indexToLineAndColumn(this.text, this.index); + throw $interpolateMinErr('wantstring', + 'Expected the beginning of a string at line {0}, column {1} in text “{2}”', + position.line, position.column, this.text); + } + this.startStringAtMatch(match); +}; + +MessageFormatParser.prototype.startStringAtMatch = function startStringAtMatch(match) { + this.stringStartIndex = match.index; + this.stringQuote = match[0]; + this.stringInterestsRe = this.stringQuote === '\'' ? SQUOTED_STRING_INTEREST_RE : DQUOTED_STRING_INTEREST_RE; + this.rule = this.ruleInsideString; +}; + +var SQUOTED_STRING_INTEREST_RE = /\\(?:\\|'|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{2}|[0-7]{3}|\r\n|\n|[\s\S])|'/g; +var DQUOTED_STRING_INTEREST_RE = /\\(?:\\|"|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{2}|[0-7]{3}|\r\n|\n|[\s\S])|"/g; +MessageFormatParser.prototype.ruleInsideString = function ruleInsideString() { + var match = this.searchRe(this.stringInterestsRe); + if (match == null) { + var position = indexToLineAndColumn(this.text, this.stringStartIndex); + throw $interpolateMinErr('untermstr', + 'The string beginning at line {0}, column {1} is unterminated in text “{2}”', + position.line, position.column, this.text); + } + if (match[0] === this.stringQuote) { + this.rule = null; + } +}; + +var PLURAL_OR_SELECT_ARG_TYPE_RE = /\s*(plural|select)\s*,\s*/g; +MessageFormatParser.prototype.rulePluralOrSelect = function rulePluralOrSelect() { + var match = this.searchRe(PLURAL_OR_SELECT_ARG_TYPE_RE); + if (match == null) { + this.errorExpecting(); + } + var argType = match[1]; + switch (argType) { + case 'plural': this.rule = this.rulePluralStyle; break; + case 'select': this.rule = this.ruleSelectStyle; break; + default: this.errorInParseLogic(); + } +}; + +MessageFormatParser.prototype.rulePluralStyle = function rulePluralStyle() { + this.choices = Object.create(null); + this.ruleChoiceKeyword = this.rulePluralValueOrKeyword; + this.rule = this.rulePluralOffset; +}; + +MessageFormatParser.prototype.ruleSelectStyle = function ruleSelectStyle() { + this.choices = Object.create(null); + this.ruleChoiceKeyword = this.ruleSelectKeyword; + this.rule = this.ruleSelectKeyword; +}; + +var NUMBER_RE = /[0]|(?:[1-9][0-9]*)/g; +var PLURAL_OFFSET_RE = new RegExp('\\s*offset\\s*:\\s*(' + NUMBER_RE.source + ')', 'g'); + +MessageFormatParser.prototype.rulePluralOffset = function rulePluralOffset() { + var match = this.matchRe(PLURAL_OFFSET_RE); + this.pluralOffset = (match == null) ? 0 : parseInt(match[1], 10); + this.expressionMinusOffsetFn = subtractOffset(this.expressionFn, this.pluralOffset); + this.rule = this.rulePluralValueOrKeyword; +}; + +MessageFormatParser.prototype.assertChoiceKeyIsNew = function assertChoiceKeyIsNew(choiceKey, index) { + if (this.choices[choiceKey] !== undefined) { + var position = indexToLineAndColumn(this.text, index); + throw $interpolateMinErr('dupvalue', + 'The choice “{0}” is specified more than once. Duplicate key is at line {1}, column {2} in text “{3}”', + choiceKey, position.line, position.column, this.text); + } +}; + +var SELECT_KEYWORD = /\s*(\w+)/g; +MessageFormatParser.prototype.ruleSelectKeyword = function ruleSelectKeyword() { + var match = this.matchRe(SELECT_KEYWORD); + if (match == null) { + this.parsedFn = new SelectMessage(this.expressionFn, this.choices).parsedFn; + this.rule = null; + return; + } + this.choiceKey = match[1]; + this.assertChoiceKeyIsNew(this.choiceKey, match.index); + this.rule = this.ruleMessageText; +}; + +var EXPLICIT_VALUE_OR_KEYWORD_RE = new RegExp('\\s*(?:(?:=(' + NUMBER_RE.source + '))|(\\w+))', 'g'); +MessageFormatParser.prototype.rulePluralValueOrKeyword = function rulePluralValueOrKeyword() { + var match = this.matchRe(EXPLICIT_VALUE_OR_KEYWORD_RE); + if (match == null) { + this.parsedFn = new PluralMessage(this.expressionFn, this.choices, this.pluralOffset, this.pluralCat).parsedFn; + this.rule = null; + return; + } + if (match[1] != null) { + this.choiceKey = parseInt(match[1], 10); + } else { + this.choiceKey = match[2]; + } + this.assertChoiceKeyIsNew(this.choiceKey, match.index); + this.rule = this.ruleMessageText; +}; + +var BRACE_OPEN_RE = /\s*\{/g; +var BRACE_CLOSE_RE = /}/g; +MessageFormatParser.prototype.ruleMessageText = function ruleMessageText() { + if (!this.consumeRe(BRACE_OPEN_RE)) { + var position = indexToLineAndColumn(this.text, this.index); + throw $interpolateMinErr('reqopenbrace', + 'The plural choice “{0}” must be followed by a message in braces at line {1}, column {2} in text “{3}”', + this.choiceKey, position.line, position.column, this.text); + } + this.msgStartIndex = this.index; + this.interpolationParts = new InterpolationParts(this.trustedContext, this.allOrNothing); + this.rule = this.ruleInInterpolationOrMessageText; +}; + +// Note: Since "\" is used as an escape character, don't allow it to be part of the +// startSymbol/endSymbol when I add the feature to allow them to be redefined. +var INTERP_OR_END_MESSAGE_RE = /\\.|{{|}/g; +var INTERP_OR_PLURALVALUE_OR_END_MESSAGE_RE = /\\.|{{|#|}/g; +var ESCAPE_OR_MUSTACHE_BEGIN_RE = /\\.|{{/g; +MessageFormatParser.prototype.advanceInInterpolationOrMessageText = function advanceInInterpolationOrMessageText() { + var currentIndex = this.index, match; + if (this.ruleChoiceKeyword == null) { // interpolation + match = this.searchRe(ESCAPE_OR_MUSTACHE_BEGIN_RE); + if (match == null) { // End of interpolation text. Nothing more to process. + this.textPart = this.text.substring(currentIndex); + this.index = this.text.length; + return null; + } + } else { + match = this.searchRe(this.ruleChoiceKeyword === this.rulePluralValueOrKeyword ? + INTERP_OR_PLURALVALUE_OR_END_MESSAGE_RE : INTERP_OR_END_MESSAGE_RE); + if (match == null) { + var position = indexToLineAndColumn(this.text, this.msgStartIndex); + throw $interpolateMinErr('reqendbrace', + 'The plural/select choice “{0}” message starting at line {1}, column {2} does not have an ending closing brace. Text “{3}”', + this.choiceKey, position.line, position.column, this.text); + } + } + // match is non-null. + var token = match[0]; + this.textPart = this.text.substring(currentIndex, match.index); + return token; +}; + +MessageFormatParser.prototype.ruleInInterpolationOrMessageText = function ruleInInterpolationOrMessageText() { + var currentIndex = this.index; + var token = this.advanceInInterpolationOrMessageText(); + if (token == null) { + // End of interpolation text. Nothing more to process. + this.index = this.text.length; + this.interpolationParts.addText(this.text.substring(currentIndex)); + this.rule = null; + return; + } + if (token[0] === '\\') { + // unescape next character and continue + this.interpolationParts.addText(this.textPart + token[1]); + return; + } + this.interpolationParts.addText(this.textPart); + if (token === '{{') { + this.pushState(); + this.ruleStack.push(this.ruleEndMustacheInInterpolationOrMessage); + this.rule = this.ruleEnteredMustache; + } else if (token === '}') { + this.choices[this.choiceKey] = this.interpolationParts.toParsedFn(/*mustHaveExpression=*/false, this.text); + this.rule = this.ruleChoiceKeyword; + } else if (token === '#') { + this.interpolationParts.addExpressionFn(this.expressionMinusOffsetFn); + } else { + this.errorInParseLogic(); + } +}; + +MessageFormatParser.prototype.ruleInterpolate = function ruleInterpolate() { + this.interpolationParts = new InterpolationParts(this.trustedContext, this.allOrNothing); + this.rule = this.ruleInInterpolation; +}; + +MessageFormatParser.prototype.ruleInInterpolation = function ruleInInterpolation() { + var currentIndex = this.index; + var match = this.searchRe(ESCAPE_OR_MUSTACHE_BEGIN_RE); + if (match == null) { + // End of interpolation text. Nothing more to process. + this.index = this.text.length; + this.interpolationParts.addText(this.text.substring(currentIndex)); + this.parsedFn = this.interpolationParts.toParsedFn(this.mustHaveExpression, this.text); + this.rule = null; + return; + } + var token = match[0]; + if (token[0] === '\\') { + // unescape next character and continue + this.interpolationParts.addText(this.text.substring(currentIndex, match.index) + token[1]); + return; + } + this.interpolationParts.addText(this.text.substring(currentIndex, match.index)); + this.pushState(); + this.ruleStack.push(this.ruleInterpolationEndMustache); + this.rule = this.ruleEnteredMustache; +}; + +MessageFormatParser.prototype.ruleInterpolationEndMustache = function ruleInterpolationEndMustache() { + var expressionFn = this.parsedFn; + this.popState(); + this.interpolationParts.addExpressionFn(expressionFn); + this.rule = this.ruleInInterpolation; +}; + +MessageFormatParser.prototype.ruleEnteredMustache = function ruleEnteredMustache() { + this.parsedFn = null; + this.ruleStack.push(this.ruleEndMustache); + this.rule = this.ruleAngularExpression; +}; + +MessageFormatParser.prototype.ruleEndMustacheInInterpolationOrMessage = function ruleEndMustacheInInterpolationOrMessage() { + var expressionFn = this.parsedFn; + this.popState(); + this.interpolationParts.addExpressionFn(expressionFn); + this.rule = this.ruleInInterpolationOrMessageText; +}; + + + +var INTERP_END_RE = /\s*}}/g; +MessageFormatParser.prototype.ruleEndMustache = function ruleEndMustache() { + var match = this.matchRe(INTERP_END_RE); + if (match == null) { + var position = indexToLineAndColumn(this.text, this.index); + throw $interpolateMinErr('reqendinterp', + 'Expecting end of interpolation symbol, “{0}”, at line {1}, column {2} in text “{3}”', + '}}', position.line, position.column, this.text); + } + if (this.parsedFn == null) { + // If we parsed a MessageFormat extension, (e.g. select/plural today, maybe more some other + // day), then the result *has* to be a string and those rules would have already set + // this.parsedFn. If there was no MessageFormat extension, then there is no requirement to + // stringify the result and parsedFn isn't set. We set it here. While we could have set it + // unconditionally when exiting the Angular expression, I intend for us to not just replace + // $interpolate, but also to replace $parse in a future version (so ng-bind can work), and in + // such a case we do not want to unnecessarily stringify something if it's not going to be used + // in a string context. + this.parsedFn = this.$parse(this.expressionFn, this.stringifier); + this.parsedFn['exp'] = this.expressionFn['exp']; // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js + this.parsedFn['expressions'] = this.expressionFn['expressions']; // Require this to call $compile.$$addBindingInfo() which allows Protractor to find elements by binding. + } + this.rule = null; +}; + +MessageFormatParser.prototype.ruleAngularExpression = function ruleAngularExpression() { + this.angularOperatorStack = []; + this.expressionStartIndex = this.index; + this.rule = this.ruleInAngularExpression; +}; + +function getEndOperator(opBegin) { + switch (opBegin) { + case '{': return '}'; + case '[': return ']'; + case '(': return ')'; + default: return null; + } +} + +function getBeginOperator(opEnd) { + switch (opEnd) { + case '}': return '{'; + case ']': return '['; + case ')': return '('; + default: return null; + } +} + +// TODO(chirayu): The interpolation endSymbol must also be accounted for. It +// just so happens that "}" is an operator so it's in the list below. But we +// should support any other type of start/end interpolation symbol. +var INTERESTING_OPERATORS_RE = /[[\]{}()'",]/g; +MessageFormatParser.prototype.ruleInAngularExpression = function ruleInAngularExpression() { + var match = this.searchRe(INTERESTING_OPERATORS_RE); + var position; + if (match == null) { + if (this.angularOperatorStack.length === 0) { + // This is the end of the Angular expression so this is actually a + // success. Note that when inside an interpolation, this means we even + // consumed the closing interpolation symbols if they were curlies. This + // is NOT an error at this point but will become an error further up the + // stack when the part that saw the opening curlies is unable to find the + // closing ones. + this.index = this.text.length; + this.expressionFn = this.$parse(this.text.substring(this.expressionStartIndex, this.index)); + // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js + this.expressionFn['exp'] = this.text.substring(this.expressionStartIndex, this.index); + this.expressionFn['expressions'] = this.expressionFn['expressions']; + this.rule = null; + return; + } + var innermostOperator = this.angularOperatorStack[0]; + throw $interpolateMinErr('badexpr', + 'Unexpected end of Angular expression. Expecting operator “{0}” at the end of the text “{1}”', + this.getEndOperator(innermostOperator), this.text); + } + var operator = match[0]; + if (operator === '\'' || operator === '"') { + this.ruleStack.push(this.ruleInAngularExpression); + this.startStringAtMatch(match); + return; + } + if (operator === ',') { + if (this.trustedContext) { + position = indexToLineAndColumn(this.text, this.index); + throw $interpolateMinErr('unsafe', + 'Use of select/plural MessageFormat syntax is currently disallowed in a secure context ({0}). At line {1}, column {2} of text “{3}”', + this.trustedContext, position.line, position.column, this.text); + } + // only the top level comma has relevance. + if (this.angularOperatorStack.length === 0) { + // todo: does this need to be trimmed? + this.expressionFn = this.$parse(this.text.substring(this.expressionStartIndex, match.index)); + // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js + this.expressionFn['exp'] = this.text.substring(this.expressionStartIndex, match.index); + this.expressionFn['expressions'] = this.expressionFn['expressions']; + this.rule = null; + this.rule = this.rulePluralOrSelect; + } + return; + } + if (getEndOperator(operator) != null) { + this.angularOperatorStack.unshift(operator); + return; + } + var beginOperator = getBeginOperator(operator); + if (beginOperator == null) { + this.errorInParseLogic(); + } + if (this.angularOperatorStack.length > 0) { + if (beginOperator === this.angularOperatorStack[0]) { + this.angularOperatorStack.shift(); + return; + } + position = indexToLineAndColumn(this.text, this.index); + throw $interpolateMinErr('badexpr', + 'Unexpected operator “{0}” at line {1}, column {2} in text. Was expecting “{3}”. Text: “{4}”', + operator, position.line, position.column, getEndOperator(this.angularOperatorStack[0]), this.text); + } + // We are trying to pop off the operator stack but there really isn't anything to pop off. + this.index = match.index; + this.expressionFn = this.$parse(this.text.substring(this.expressionStartIndex, this.index)); + // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js + this.expressionFn['exp'] = this.text.substring(this.expressionStartIndex, this.index); + this.expressionFn['expressions'] = this.expressionFn['expressions']; + this.rule = null; +}; + +// NOTE: ADVANCED_OPTIMIZATIONS mode. +// +// This file is compiled with Closure compiler's ADVANCED_OPTIMIZATIONS flag! Be wary of using +// constructs incompatible with that mode. + +/* global $interpolateMinErr: true */ +/* global isFunction: true */ +/* global noop: true */ +/* global toJson: true */ +/* global MessageFormatParser: false */ + +/** + * @ngdoc module + * @name ngMessageFormat + * @packageName angular-message-format + * + * @description + * + * ## What is ngMessageFormat? + * + * The ngMessageFormat module extends the Angular {@link ng.$interpolate `$interpolate`} service + * with a syntax for handling pluralization and gender specific messages, which is based on the + * [ICU MessageFormat syntax][ICU]. + * + * See [the design doc][ngMessageFormat doc] for more information. + * + * [ICU]: http://userguide.icu-project.org/formatparse/messages#TOC-MessageFormat + * [ngMessageFormat doc]: https://docs.google.com/a/google.com/document/d/1pbtW2yvtmFBikfRrJd8VAsabiFkKezmYZ_PbgdjQOVU/edit + * + * ## Examples + * + * ### Gender + * + * This example uses the "select" keyword to specify the message based on gender. + * + * + * + *
+ * Select Recipient:
+ +

{{recipient.gender, select, + male {{{recipient.name}} unwrapped his gift. } + female {{{recipient.name}} unwrapped her gift. } + other {{{recipient.name}} unwrapped their gift. } + }}

+ *
+ *
+ * + * function Person(name, gender) { + * this.name = name; + * this.gender = gender; + * } + * + * var alice = new Person('Alice', 'female'), + * bob = new Person('Bob', 'male'), + * ashley = new Person('Ashley', ''); + * + * angular.module('msgFmtExample', ['ngMessageFormat']) + * .controller('AppController', ['$scope', function($scope) { + * $scope.recipients = [alice, bob, ashley]; + * $scope.recipient = $scope.recipients[0]; + * }]); + * + *
+ * + * ### Plural + * + * This example shows how the "plural" keyword is used to account for a variable number of entities. + * The "#" variable holds the current number and can be embedded in the message. + * + * Note that "=1" takes precedence over "one". + * + * The example also shows the "offset" keyword, which allows you to offset the value of the "#" variable. + * + * + * + *
+ *
+ * Select recipients:
+ *
+ *

{{recipients.length, plural, offset:1 + * =0 {{{sender.name}} gave no gifts (\#=#)} + * =1 {{{sender.name}} gave a gift to {{recipients[0].name}} (\#=#)} + * one {{{sender.name}} gave {{recipients[0].name}} and one other person a gift (\#=#)} + * other {{{sender.name}} gave {{recipients[0].name}} and # other people a gift (\#=#)} + * }}

+ *
+ *
+ * + * + * function Person(name, gender) { + * this.name = name; + * this.gender = gender; + * } + * + * var alice = new Person('Alice', 'female'), + * bob = new Person('Bob', 'male'), + * sarah = new Person('Sarah', 'female'), + * harry = new Person('Harry Potter', 'male'), + * ashley = new Person('Ashley', ''); + * + * angular.module('msgFmtExample', ['ngMessageFormat']) + * .controller('AppController', ['$scope', function($scope) { + * $scope.people = [alice, bob, sarah, ashley]; + * $scope.recipients = [alice, bob, sarah]; + * $scope.sender = harry; + * }]); + * + * + * + * describe('MessageFormat plural', function() { + * + * it('should pluralize initial values', function() { + * var messageElem = element(by.binding('recipients.length')), + * decreaseRecipientsBtn = element(by.id('decreaseRecipients')); + * + * expect(messageElem.getText()).toEqual('Harry Potter gave Alice and 2 other people a gift (#=2)'); + * decreaseRecipientsBtn.click(); + * expect(messageElem.getText()).toEqual('Harry Potter gave Alice and one other person a gift (#=1)'); + * decreaseRecipientsBtn.click(); + * expect(messageElem.getText()).toEqual('Harry Potter gave a gift to Alice (#=0)'); + * decreaseRecipientsBtn.click(); + * expect(messageElem.getText()).toEqual('Harry Potter gave no gifts (#=-1)'); + * }); + * }); + * + *
+ * + * ### Plural and Gender together + * + * This example shows how you can specify gender rules for specific plural matches - in this case, + * =1 is special cased for gender. + * + * + *
+ Select recipients:
+
+

{{recipients.length, plural, + =0 {{{sender.name}} has not given any gifts to anyone.} + =1 { {{recipients[0].gender, select, + female { {{sender.name}} gave {{recipients[0].name}} her gift.} + male { {{sender.name}} gave {{recipients[0].name}} his gift.} + other { {{sender.name}} gave {{recipients[0].name}} their gift.} + }} + } + other {{{sender.name}} gave {{recipients.length}} people gifts.} + }}

+ + * + * function Person(name, gender) { + * this.name = name; + * this.gender = gender; + * } + * + * var alice = new Person('Alice', 'female'), + * bob = new Person('Bob', 'male'), + * harry = new Person('Harry Potter', 'male'), + * ashley = new Person('Ashley', ''); + * + * angular.module('msgFmtExample', ['ngMessageFormat']) + * .controller('AppController', ['$scope', function($scope) { + * $scope.people = [alice, bob, ashley]; + * $scope.recipients = [alice]; + * $scope.sender = harry; + * }]); + * + + */ + +var $$MessageFormatFactory = ['$parse', '$locale', '$sce', '$exceptionHandler', function $$messageFormat( + $parse, $locale, $sce, $exceptionHandler) { + + function getStringifier(trustedContext, allOrNothing, text) { + return function stringifier(value) { + try { + value = trustedContext ? $sce['getTrusted'](trustedContext, value) : $sce['valueOf'](value); + return allOrNothing && (value === undefined) ? value : $$stringify(value); + } catch (err) { + $exceptionHandler($interpolateMinErr['interr'](text, err)); + } + }; + } + + function interpolate(text, mustHaveExpression, trustedContext, allOrNothing) { + var stringifier = getStringifier(trustedContext, allOrNothing, text); + var parser = new MessageFormatParser(text, 0, $parse, $locale['pluralCat'], stringifier, + mustHaveExpression, trustedContext, allOrNothing); + parser.run(parser.ruleInterpolate); + return parser.parsedFn; + } + + return { + 'interpolate': interpolate + }; +}]; + +var $$interpolateDecorator = ['$$messageFormat', '$delegate', function $$interpolateDecorator($$messageFormat, $interpolate) { + if ($interpolate['startSymbol']() !== '{{' || $interpolate['endSymbol']() !== '}}') { + throw $interpolateMinErr('nochgmustache', 'angular-message-format.js currently does not allow you to use custom start and end symbols for interpolation.'); + } + var interpolate = $$messageFormat['interpolate']; + interpolate['startSymbol'] = $interpolate['startSymbol']; + interpolate['endSymbol'] = $interpolate['endSymbol']; + return interpolate; +}]; + +var $interpolateMinErr; +var isFunction; +var noop; +var toJson; +var $$stringify; + +var module = window['angular']['module']('ngMessageFormat', ['ng']); +module['info']({ 'angularVersion': '1.6.6' }); +module['factory']('$$messageFormat', $$MessageFormatFactory); +module['config'](['$provide', function($provide) { + $interpolateMinErr = window['angular']['$interpolateMinErr']; + isFunction = window['angular']['isFunction']; + noop = window['angular']['noop']; + toJson = window['angular']['toJson']; + $$stringify = window['angular']['$$stringify']; + + $provide['decorator']('$interpolate', $$interpolateDecorator); +}]); + + +})(window, window.angular); diff --git a/1.6.6/angular-message-format.min.js b/1.6.6/angular-message-format.min.js new file mode 100644 index 000000000..fb6c57759 --- /dev/null +++ b/1.6.6/angular-message-format.min.js @@ -0,0 +1,26 @@ +/* + AngularJS v1.6.6 + (c) 2010-2017 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(l){'use strict';function f(a,b){for(var c=a.split(/\n/g),n=0;n=d.length)b-=d.length;else return{h:n+1,f:b+1}}}function w(a){function b(){return a}var c=x[a];if(null!=c)return c;b.$$watchDelegate=function(b,c,d){var e=b.$watch(r,function(){m(c)&&c(a,a,b);e()},d);return e};x[a]=b;b.exp=a;b.expressions=[];return b}function E(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){m(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 y(){}function t(a,b,c,d){h.call(this, +a,b);this.offset=c;this.M=d}function z(){}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 A(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 B(a){switch(a){case "{":return"}";case "[":return"]";case "(":return")";default:return null}}function F(a){switch(a){case "}":return"{";case "]":return"[";case ")":return"(";default:return null}}var x=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){m(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()};y.prototype=h.prototype;s.prototype=new y;s.prototype.R=function(a){return void 0!==this.e[a]?a:"other"};z.prototype=h.prototype;t.prototype=new z;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 + * + *
+ *
Please enter a value for this field.
+ *
This field must be a valid email address.
+ *
This field can be at most 15 characters long.
+ *
+ * + * ``` + * + * In order to show error messages corresponding to `myField` we first create an element with an `ngMessages` attribute + * set to the `$error` object owned by the `myField` input in our `myForm` form. + * + * Within this element we then create separate elements for each of the possible errors that `myField` could have. + * The `ngMessage` attribute is used to declare which element(s) will appear for which error - for example, + * setting `ng-message="required"` specifies that this particular element should be displayed when there + * is no value present for the required field `myField` (because the key `required` will be `true` in the object + * `myForm.myField.$error`). + * + * ### Message order + * + * By default, `ngMessages` will only display one message for a particular key/value collection at any time. If more + * than one message (or error) key is currently true, then which message is shown is determined by the order of messages + * in the HTML template code (messages declared first are prioritised). This mechanism means the developer does not have + * to prioritize messages using custom JavaScript code. + * + * Given the following error object for our example (which informs us that the field `myField` currently has both the + * `required` and `email` errors): + * + * ```javascript + * + * myField.$error = { required : true, email: true, maxlength: false }; + * ``` + * The `required` message will be displayed to the user since it appears before the `email` message in the DOM. + * Once the user types a single character, the `required` message will disappear (since the field now has a value) + * but the `email` message will be visible because it is still applicable. + * + * ### Displaying multiple messages at the same time + * + * While `ngMessages` will by default only display one error element at a time, the `ng-messages-multiple` attribute can + * be applied to the `ngMessages` container element to cause it to display all applicable error messages at once: + * + * ```html + * + *
...
+ * + * + * ... + * ``` + * + * ## Reusing and Overriding Messages + * In addition to prioritization, ngMessages also allows for including messages from a remote or an inline + * template. This allows for generic collection of messages to be reused across multiple parts of an + * application. + * + * ```html + * + * + *
+ *
+ *
+ * ``` + * + * However, including generic messages may not be useful enough to match all input fields, therefore, + * `ngMessages` provides the ability to override messages defined in the remote template by redefining + * them within the directive container. + * + * ```html + * + * + * + *
+ * + * + *
+ * + *
You did not enter your email address
+ * + * + *
Your email address is invalid
+ * + * + *
+ *
+ *
+ * ``` + * + * In the example HTML code above the message that is set on required will override the corresponding + * required message defined within the remote template. Therefore, with particular input fields (such + * email addresses, date fields, autocomplete inputs, etc...), specialized error messages can be applied + * while more generic messages can be used to handle other, more general input errors. + * + * ## Dynamic Messaging + * ngMessages also supports using expressions to dynamically change key values. Using arrays and + * repeaters to list messages is also supported. This means that the code below will be able to + * fully adapt itself and display the appropriate message when any of the expression data changes: + * + * ```html + *
+ * + *
+ *
You did not enter your email address
+ *
+ * + *
{{ errorMessage.text }}
+ *
+ *
+ *
+ * ``` + * + * The `errorMessage.type` expression can be a string value or it can be an array so + * that multiple errors can be associated with a single error message: + * + * ```html + * + *
+ *
You did not enter your email address
+ *
+ * Your email must be between 5 and 100 characters long + *
+ *
+ * ``` + * + * Feel free to use other structural directives such as ng-if and ng-switch to further control + * what messages are active and when. Be careful, if you place ng-message on the same element + * as these structural directives, Angular may not be able to determine if a message is active + * or not. Therefore it is best to place the ng-message on a child element of the structural + * directive. + * + * ```html + *
+ *
+ *
Please enter something
+ *
+ *
+ * ``` + * + * ## Animations + * If the `ngAnimate` module is active within the application then the `ngMessages`, `ngMessage` and + * `ngMessageExp` directives will trigger animations whenever any messages are added and removed from + * the DOM by the `ngMessages` directive. + * + * Whenever the `ngMessages` directive contains one or more visible messages then the `.ng-active` CSS + * class will be added to the element. The `.ng-inactive` CSS class will be applied when there are no + * messages present. Therefore, CSS transitions and keyframes as well as JavaScript animations can + * hook into the animations whenever these classes are added/removed. + * + * Let's say that our HTML code for our messages container looks like so: + * + * ```html + * + * ``` + * + * Then the CSS animation code for the message container looks like so: + * + * ```css + * .my-messages { + * transition:1s linear all; + * } + * .my-messages.ng-active { + * // messages are visible + * } + * .my-messages.ng-inactive { + * // messages are hidden + * } + * ``` + * + * Whenever an inner message is attached (becomes visible) or removed (becomes hidden) then the enter + * and leave animation is triggered for each particular element bound to the `ngMessage` directive. + * + * Therefore, the CSS code for the inner messages looks like so: + * + * ```css + * .some-message { + * transition:1s linear all; + * } + * + * .some-message.ng-enter {} + * .some-message.ng-enter.ng-enter-active {} + * + * .some-message.ng-leave {} + * .some-message.ng-leave.ng-leave-active {} + * ``` + * + * {@link ngAnimate Click here} to learn how to use JavaScript animations or to learn more about ngAnimate. + */ +angular.module('ngMessages', [], function initAngularHelpers() { + // Access helpers from angular core. + // Do it inside a `config` block to ensure `window.angular` is available. + forEach = angular.forEach; + isArray = angular.isArray; + isString = angular.isString; + jqLite = angular.element; +}) + .info({ angularVersion: '1.6.6' }) + + /** + * @ngdoc directive + * @module ngMessages + * @name ngMessages + * @restrict AE + * + * @description + * `ngMessages` is a directive that is designed to show and hide messages based on the state + * of a key/value object that it listens on. The directive itself complements error message + * reporting with the `ngModel` $error object (which stores a key/value state of validation errors). + * + * `ngMessages` manages the state of internal messages within its container element. The internal + * messages use the `ngMessage` directive and will be inserted/removed from the page depending + * on if they're present within the key/value object. By default, only one message will be displayed + * at a time and this depends on the prioritization of the messages within the template. (This can + * be changed by using the `ng-messages-multiple` or `multiple` attribute on the directive container.) + * + * A remote template can also be used to promote message reusability and messages can also be + * overridden. + * + * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`. + * + * @usage + * ```html + * + * + * ... + * ... + * ... + * + * + * + * + * ... + * ... + * ... + * + * ``` + * + * @param {string} ngMessages an angular expression evaluating to a key/value object + * (this is typically the $error object on an ngModel instance). + * @param {string=} ngMessagesMultiple|multiple when set, all messages will be displayed with true + * + * @example + * + * + *
+ * + *
myForm.myName.$error = {{ myForm.myName.$error | json }}
+ * + *
+ *
You did not enter a field
+ *
Your field is too short
+ *
Your field is too long
+ *
+ *
+ *
+ * + * angular.module('ngMessagesExample', ['ngMessages']); + * + *
+ */ + .directive('ngMessages', ['$animate', function($animate) { + var ACTIVE_CLASS = 'ng-active'; + var INACTIVE_CLASS = 'ng-inactive'; + + return { + require: 'ngMessages', + restrict: 'AE', + controller: ['$element', '$scope', '$attrs', function NgMessagesCtrl($element, $scope, $attrs) { + var ctrl = this; + var latestKey = 0; + var nextAttachId = 0; + + this.getAttachId = function getAttachId() { return nextAttachId++; }; + + var messages = this.messages = {}; + var renderLater, cachedCollection; + + this.render = function(collection) { + collection = collection || {}; + + renderLater = false; + cachedCollection = collection; + + // this is true if the attribute is empty or if the attribute value is truthy + var multiple = isAttrTruthy($scope, $attrs.ngMessagesMultiple) || + isAttrTruthy($scope, $attrs.multiple); + + var unmatchedMessages = []; + var matchedKeys = {}; + var messageItem = ctrl.head; + var messageFound = false; + var totalMessages = 0; + + // we use != instead of !== to allow for both undefined and null values + while (messageItem != null) { + totalMessages++; + var messageCtrl = messageItem.message; + + var messageUsed = false; + if (!messageFound) { + forEach(collection, function(value, key) { + if (!messageUsed && truthy(value) && messageCtrl.test(key)) { + // this is to prevent the same error name from showing up twice + if (matchedKeys[key]) return; + matchedKeys[key] = true; + + messageUsed = true; + messageCtrl.attach(); + } + }); + } + + if (messageUsed) { + // unless we want to display multiple messages then we should + // set a flag here to avoid displaying the next message in the list + messageFound = !multiple; + } else { + unmatchedMessages.push(messageCtrl); + } + + messageItem = messageItem.next; + } + + forEach(unmatchedMessages, function(messageCtrl) { + messageCtrl.detach(); + }); + + if (unmatchedMessages.length !== totalMessages) { + $animate.setClass($element, ACTIVE_CLASS, INACTIVE_CLASS); + } else { + $animate.setClass($element, INACTIVE_CLASS, ACTIVE_CLASS); + } + }; + + $scope.$watchCollection($attrs.ngMessages || $attrs['for'], ctrl.render); + + // If the element is destroyed, proactively destroy all the currently visible messages + $element.on('$destroy', function() { + forEach(messages, function(item) { + item.message.detach(); + }); + }); + + this.reRender = function() { + if (!renderLater) { + renderLater = true; + $scope.$evalAsync(function() { + if (renderLater && cachedCollection) { + ctrl.render(cachedCollection); + } + }); + } + }; + + this.register = function(comment, messageCtrl) { + var nextKey = latestKey.toString(); + messages[nextKey] = { + message: messageCtrl + }; + insertMessageNode($element[0], comment, nextKey); + comment.$$ngMessageNode = nextKey; + latestKey++; + + ctrl.reRender(); + }; + + this.deregister = function(comment) { + var key = comment.$$ngMessageNode; + delete comment.$$ngMessageNode; + removeMessageNode($element[0], comment, key); + delete messages[key]; + ctrl.reRender(); + }; + + function findPreviousMessage(parent, comment) { + var prevNode = comment; + var parentLookup = []; + + while (prevNode && prevNode !== parent) { + var prevKey = prevNode.$$ngMessageNode; + if (prevKey && prevKey.length) { + return messages[prevKey]; + } + + // dive deeper into the DOM and examine its children for any ngMessage + // comments that may be in an element that appears deeper in the list + if (prevNode.childNodes.length && parentLookup.indexOf(prevNode) === -1) { + parentLookup.push(prevNode); + prevNode = prevNode.childNodes[prevNode.childNodes.length - 1]; + } else if (prevNode.previousSibling) { + prevNode = prevNode.previousSibling; + } else { + prevNode = prevNode.parentNode; + parentLookup.push(prevNode); + } + } + } + + function insertMessageNode(parent, comment, key) { + var messageNode = messages[key]; + if (!ctrl.head) { + ctrl.head = messageNode; + } else { + var match = findPreviousMessage(parent, comment); + if (match) { + messageNode.next = match.next; + match.next = messageNode; + } else { + messageNode.next = ctrl.head; + ctrl.head = messageNode; + } + } + } + + function removeMessageNode(parent, comment, key) { + var messageNode = messages[key]; + + var match = findPreviousMessage(parent, comment); + if (match) { + match.next = messageNode.next; + } else { + ctrl.head = messageNode.next; + } + } + }] + }; + + function isAttrTruthy(scope, attr) { + return (isString(attr) && attr.length === 0) || //empty attribute + truthy(scope.$eval(attr)); + } + + function truthy(val) { + return isString(val) ? val.length : !!val; + } + }]) + + /** + * @ngdoc directive + * @name ngMessagesInclude + * @restrict AE + * @scope + * + * @description + * `ngMessagesInclude` is a directive with the purpose to import existing ngMessage template + * code from a remote template and place the downloaded template code into the exact spot + * that the ngMessagesInclude directive is placed within the ngMessages container. This allows + * for a series of pre-defined messages to be reused and also allows for the developer to + * determine what messages are overridden due to the placement of the ngMessagesInclude directive. + * + * @usage + * ```html + * + * + * ... + * + * + * + * + * ... + * + * ``` + * + * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`. + * + * @param {string} ngMessagesInclude|src a string value corresponding to the remote template. + */ + .directive('ngMessagesInclude', + ['$templateRequest', '$document', '$compile', function($templateRequest, $document, $compile) { + + return { + restrict: 'AE', + require: '^^ngMessages', // we only require this for validation sake + link: function($scope, element, attrs) { + var src = attrs.ngMessagesInclude || attrs.src; + $templateRequest(src).then(function(html) { + if ($scope.$$destroyed) return; + + if (isString(html) && !html.trim()) { + // Empty template - nothing to compile + replaceElementWithMarker(element, src); + } else { + // Non-empty template - compile and link + $compile(html)($scope, function(contents) { + element.after(contents); + replaceElementWithMarker(element, src); + }); + } + }); + } + }; + + // Helpers + function replaceElementWithMarker(element, src) { + // A comment marker is placed for debugging purposes + var comment = $compile.$$createComment ? + $compile.$$createComment('ngMessagesInclude', src) : + $document[0].createComment(' ngMessagesInclude: ' + src + ' '); + var marker = jqLite(comment); + element.after(marker); + + // Don't pollute the DOM anymore by keeping an empty directive element + element.remove(); + } + }]) + + /** + * @ngdoc directive + * @name ngMessage + * @restrict AE + * @scope + * + * @description + * `ngMessage` is a directive with the purpose to show and hide a particular message. + * For `ngMessage` to operate, a parent `ngMessages` directive on a parent DOM element + * must be situated since it determines which messages are visible based on the state + * of the provided key/value map that `ngMessages` listens on. + * + * More information about using `ngMessage` can be found in the + * {@link module:ngMessages `ngMessages` module documentation}. + * + * @usage + * ```html + * + * + * ... + * ... + * + * + * + * + * ... + * ... + * + * ``` + * + * @param {expression} ngMessage|when a string value corresponding to the message key. + */ + .directive('ngMessage', ngMessageDirectiveFactory()) + + + /** + * @ngdoc directive + * @name ngMessageExp + * @restrict AE + * @priority 1 + * @scope + * + * @description + * `ngMessageExp` is the same as {@link directive:ngMessage `ngMessage`}, but instead of a static + * value, it accepts an expression to be evaluated for the message key. + * + * @usage + * ```html + * + * + * ... + * + * + * + * + * ... + * + * ``` + * + * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`. + * + * @param {expression} ngMessageExp|whenExp an expression value corresponding to the message key. + */ + .directive('ngMessageExp', ngMessageDirectiveFactory()); + +function ngMessageDirectiveFactory() { + return ['$animate', function($animate) { + return { + restrict: 'AE', + transclude: 'element', + priority: 1, // must run before ngBind, otherwise the text is set on the comment + terminal: true, + require: '^^ngMessages', + link: function(scope, element, attrs, ngMessagesCtrl, $transclude) { + var commentNode = element[0]; + + var records; + var staticExp = attrs.ngMessage || attrs.when; + var dynamicExp = attrs.ngMessageExp || attrs.whenExp; + var assignRecords = function(items) { + records = items + ? (isArray(items) + ? items + : items.split(/[\s,]+/)) + : null; + ngMessagesCtrl.reRender(); + }; + + if (dynamicExp) { + assignRecords(scope.$eval(dynamicExp)); + scope.$watchCollection(dynamicExp, assignRecords); + } else { + assignRecords(staticExp); + } + + var currentElement, messageCtrl; + ngMessagesCtrl.register(commentNode, messageCtrl = { + test: function(name) { + return contains(records, name); + }, + attach: function() { + if (!currentElement) { + $transclude(function(elm, newScope) { + $animate.enter(elm, null, element); + currentElement = elm; + + // Each time we attach this node to a message we get a new id that we can match + // when we are destroying the node later. + var $$attachId = currentElement.$$attachId = ngMessagesCtrl.getAttachId(); + + // in the event that the element or a parent element is destroyed + // by another structural directive then it's time + // to deregister the message from the controller + currentElement.on('$destroy', function() { + if (currentElement && currentElement.$$attachId === $$attachId) { + ngMessagesCtrl.deregister(commentNode); + messageCtrl.detach(); + } + newScope.$destroy(); + }); + }); + } + }, + detach: function() { + if (currentElement) { + var elm = currentElement; + currentElement = null; + $animate.leave(elm); + } + } + }); + } + }; + }]; + + function contains(collection, key) { + if (collection) { + return isArray(collection) + ? collection.indexOf(key) >= 0 + : collection.hasOwnProperty(key); + } + } +} + + +})(window, window.angular); diff --git a/1.6.6/angular-messages.min.js b/1.6.6/angular-messages.min.js new file mode 100644 index 000000000..cfb863995 --- /dev/null +++ b/1.6.6/angular-messages.min.js @@ -0,0 +1,12 @@ +/* + AngularJS v1.6.6 + (c) 2010-2017 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(y,l){'use strict';function w(){return["$animate",function(t){return{restrict:"AE",transclude:"element",priority:1,terminal:!0,require:"^^ngMessages",link:function(u,n,a,c,f){var e=n[0],d,r=a.ngMessage||a.when;a=a.ngMessageExp||a.whenExp;var k=function(a){d=a?p(a)?a:a.split(/[\s,]+/):null;c.reRender()};a?(k(u.$eval(a)),u.$watchCollection(a,k)):k(r);var g,s;c.register(e,s={test:function(a){var m=d;a=m?p(m)?0<=m.indexOf(a):m.hasOwnProperty(a):void 0;return a},attach:function(){g||f(function(a, +m){t.enter(a,null,n);g=a;var d=g.$$attachId=c.getAttachId();g.on("$destroy",function(){g&&g.$$attachId===d&&(c.deregister(e),s.detach());m.$destroy()})})},detach:function(){if(g){var a=g;g=null;t.leave(a)}}})}}}]}var v,p,q,x;l.module("ngMessages",[],function(){v=l.forEach;p=l.isArray;q=l.isString;x=l.element}).info({angularVersion:"1.6.6"}).directive("ngMessages",["$animate",function(t){function u(a,c){return q(c)&&0===c.length||n(a.$eval(c))}function n(a){return q(a)?a.length:!!a}return{require:"ngMessages", +restrict:"AE",controller:["$element","$scope","$attrs",function(a,c,f){function e(a,c){for(var b=c,d=[];b&&b!==a;){var h=b.$$ngMessageNode;if(h&&h.length)return g[h];b.childNodes.length&&-1===d.indexOf(b)?(d.push(b),b=b.childNodes[b.childNodes.length-1]):b.previousSibling?b=b.previousSibling:(b=b.parentNode,d.push(b))}}var d=this,r=0,k=0;this.getAttachId=function(){return k++};var g=this.messages={},s,l;this.render=function(m){m=m||{};s=!1;l=m;for(var g=u(c,f.ngMessagesMultiple)||u(c,f.multiple), +b=[],e={},h=d.head,r=!1,k=0;null!=h;){k++;var q=h.message,p=!1;r||v(m,function(a,b){!p&&n(a)&&q.test(b)&&!e[b]&&(p=e[b]=!0,q.attach())});p?r=!g:b.push(q);h=h.next}v(b,function(a){a.detach()});b.length!==k?t.setClass(a,"ng-active","ng-inactive"):t.setClass(a,"ng-inactive","ng-active")};c.$watchCollection(f.ngMessages||f["for"],d.render);a.on("$destroy",function(){v(g,function(a){a.message.detach()})});this.reRender=function(){s||(s=!0,c.$evalAsync(function(){s&&l&&d.render(l)}))};this.register=function(c, +f){var b=r.toString();g[b]={message:f};var k=a[0],h=g[b];d.head?(k=e(k,c))?(h.next=k.next,k.next=h):(h.next=d.head,d.head=h):d.head=h;c.$$ngMessageNode=b;r++;d.reRender()};this.deregister=function(c){var f=c.$$ngMessageNode;delete c.$$ngMessageNode;var b=g[f];(c=e(a[0],c))?c.next=b.next:d.head=b.next;delete g[f];d.reRender()}}]}}]).directive("ngMessagesInclude",["$templateRequest","$document","$compile",function(l,p,n){function a(a,f){var e=n.$$createComment?n.$$createComment("ngMessagesInclude", +f):p[0].createComment(" ngMessagesInclude: "+f+" "),e=x(e);a.after(e);a.remove()}return{restrict:"AE",require:"^^ngMessages",link:function(c,f,e){var d=e.ngMessagesInclude||e.src;l(d).then(function(e){c.$$destroyed||(q(e)&&!e.trim()?a(f,d):n(e)(c,function(c){f.after(c);a(f,d)}))})}}}]).directive("ngMessage",w()).directive("ngMessageExp",w())})(window,window.angular); +//# sourceMappingURL=angular-messages.min.js.map diff --git a/1.6.6/angular-messages.min.js.map b/1.6.6/angular-messages.min.js.map new file mode 100644 index 000000000..c024198bf --- /dev/null +++ b/1.6.6/angular-messages.min.js.map @@ -0,0 +1,8 @@ +{ +"version":3, +"file":"angular-messages.min.js", +"lineCount":11, +"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkB,CA8oB3BC,QAASA,EAAyB,EAAG,CACnC,MAAO,CAAC,UAAD,CAAa,QAAQ,CAACC,CAAD,CAAW,CACrC,MAAO,CACLC,SAAU,IADL,CAELC,WAAY,SAFP,CAGLC,SAAU,CAHL,CAILC,SAAU,CAAA,CAJL,CAKLC,QAAS,cALJ,CAMLC,KAAMA,QAAQ,CAACC,CAAD,CAAQC,CAAR,CAAiBC,CAAjB,CAAwBC,CAAxB,CAAwCC,CAAxC,CAAqD,CACjE,IAAIC,EAAcJ,CAAA,CAAQ,CAAR,CAAlB,CAEIK,CAFJ,CAGIC,EAAYL,CAAAM,UAAZD,EAA+BL,CAAAO,KAC/BC,EAAAA,CAAaR,CAAAS,aAAbD,EAAmCR,CAAAU,QACvC,KAAIC,EAAgBA,QAAQ,CAACC,CAAD,CAAQ,CAClCR,CAAA,CAAUQ,CAAA,CACHC,CAAA,CAAQD,CAAR,CAAA,CACGA,CADH,CAEGA,CAAAE,MAAA,CAAY,QAAZ,CAHA,CAIJ,IACNb,EAAAc,SAAA,EANkC,CAShCP,EAAJ,EACEG,CAAA,CAAcb,CAAAkB,MAAA,CAAYR,CAAZ,CAAd,CACA,CAAAV,CAAAmB,iBAAA,CAAuBT,CAAvB,CAAmCG,CAAnC,CAFF,EAIEA,CAAA,CAAcN,CAAd,CAnB+D,KAsB7Da,CAtB6D,CAsB7CC,CACpBlB,EAAAmB,SAAA,CAAwBjB,CAAxB,CAAqCgB,CAArC,CAAmD,CACjDE,KAAMA,QAAQ,CAACC,CAAD,CAAO,CACHlB,IAAAA,EAAAA,CAuCtB,EAAA,CADEmB,CAAJ,CACSV,CAAA,CAAQU,CAAR,CAAA,CAC0B,CAD1B,EACDA,CAAAC,QAAA,CAxCyBF,CAwCzB,CADC,CAEDC,CAAAE,eAAA,CAzCyBH,CAyCzB,CAHR,CADiC,IAAA,EArCzB,OAAO,EADY,CAD4B,CAIjDI,OAAQA,QAAQ,EAAG,CACZR,CAAL,EACEhB,CAAA,CAAY,QAAQ,CAACyB,CAAD;AAAMC,CAAN,CAAgB,CAClCrC,CAAAsC,MAAA,CAAeF,CAAf,CAAoB,IAApB,CAA0B5B,CAA1B,CACAmB,EAAA,CAAiBS,CAIjB,KAAIG,EAAaZ,CAAAY,WAAbA,CAAyC7B,CAAA8B,YAAA,EAK7Cb,EAAAc,GAAA,CAAkB,UAAlB,CAA8B,QAAQ,EAAG,CACnCd,CAAJ,EAAsBA,CAAAY,WAAtB,GAAoDA,CAApD,GACE7B,CAAAgC,WAAA,CAA0B9B,CAA1B,CACA,CAAAgB,CAAAe,OAAA,EAFF,CAIAN,EAAAO,SAAA,EALuC,CAAzC,CAXkC,CAApC,CAFe,CAJ8B,CA2BjDD,OAAQA,QAAQ,EAAG,CACjB,GAAIhB,CAAJ,CAAoB,CAClB,IAAIS,EAAMT,CACVA,EAAA,CAAiB,IACjB3B,EAAA6C,MAAA,CAAeT,CAAf,CAHkB,CADH,CA3B8B,CAAnD,CAvBiE,CAN9D,CAD8B,CAAhC,CAD4B,CA5oBrC,IAAIU,CAAJ,CACIxB,CADJ,CAEIyB,CAFJ,CAGIC,CAgQJlD,EAAAmD,OAAA,CAAe,YAAf,CAA6B,EAA7B,CAAiCC,QAA2B,EAAG,CAG7DJ,CAAA,CAAUhD,CAAAgD,QACVxB,EAAA,CAAUxB,CAAAwB,QACVyB,EAAA,CAAWjD,CAAAiD,SACXC,EAAA,CAASlD,CAAAU,QANoD,CAA/D,CAAA2C,KAAA,CAQQ,CAAEC,eAAgB,OAAlB,CARR,CAAAC,UAAA,CAkFa,YAlFb,CAkF2B,CAAC,UAAD,CAAa,QAAQ,CAACrD,CAAD,CAAW,CAuKvDsD,QAASA,EAAY,CAAC/C,CAAD,CAAQgD,CAAR,CAAc,CAClC,MAAQR,EAAA,CAASQ,CAAT,CAAR,EAA0C,CAA1C,GAA0BA,CAAAC,OAA1B,EACOC,CAAA,CAAOlD,CAAAkB,MAAA,CAAY8B,CAAZ,CAAP,CAF2B,CAKnCE,QAASA,EAAM,CAACC,CAAD,CAAM,CACnB,MAAOX,EAAA,CAASW,CAAT,CAAA,CAAgBA,CAAAF,OAAhB,CAA6B,CAAEE,CAAAA,CADnB,CAxKrB,MAAO,CACLrD,QAAS,YADJ;AAELJ,SAAU,IAFL,CAGL0D,WAAY,CAAC,UAAD,CAAa,QAAb,CAAuB,QAAvB,CAAiCC,QAAuB,CAACC,CAAD,CAAWC,CAAX,CAAmBC,CAAnB,CAA2B,CA2G7FC,QAASA,EAAmB,CAACC,CAAD,CAASC,CAAT,CAAkB,CAI5C,IAHA,IAAIC,EAAWD,CAAf,CACIE,EAAe,EAEnB,CAAOD,CAAP,EAAmBA,CAAnB,GAAgCF,CAAhC,CAAA,CAAwC,CACtC,IAAII,EAAUF,CAAAG,gBACd,IAAID,CAAJ,EAAeA,CAAAb,OAAf,CACE,MAAOe,EAAA,CAASF,CAAT,CAKLF,EAAAK,WAAAhB,OAAJ,EAAsE,EAAtE,GAAkCY,CAAAnC,QAAA,CAAqBkC,CAArB,CAAlC,EACEC,CAAAK,KAAA,CAAkBN,CAAlB,CACA,CAAAA,CAAA,CAAWA,CAAAK,WAAA,CAAoBL,CAAAK,WAAAhB,OAApB,CAAiD,CAAjD,CAFb,EAGWW,CAAAO,gBAAJ,CACLP,CADK,CACMA,CAAAO,gBADN,EAGLP,CACA,CADWA,CAAAQ,WACX,CAAAP,CAAAK,KAAA,CAAkBN,CAAlB,CAJK,CAX+B,CAJI,CA1G9C,IAAIS,EAAO,IAAX,CACIC,EAAY,CADhB,CAEIC,EAAe,CAEnB,KAAAtC,YAAA,CAAmBuC,QAAoB,EAAG,CAAE,MAAOD,EAAA,EAAT,CAE1C,KAAIP,EAAW,IAAAA,SAAXA,CAA2B,EAA/B,CACIS,CADJ,CACiBC,CAEjB,KAAAC,OAAA,CAAcC,QAAQ,CAACnD,CAAD,CAAa,CACjCA,CAAA,CAAaA,CAAb,EAA2B,EAE3BgD,EAAA,CAAc,CAAA,CACdC,EAAA,CAAmBjD,CAanB,KAVA,IAAIoD,EAAW9B,CAAA,CAAaQ,CAAb,CAAqBC,CAAAsB,mBAArB,CAAXD,EACW9B,CAAA,CAAaQ,CAAb,CAAqBC,CAAAqB,SAArB,CADf;AAGIE,EAAoB,EAHxB,CAIIC,EAAc,EAJlB,CAKIC,EAAcZ,CAAAa,KALlB,CAMIC,EAAe,CAAA,CANnB,CAOIC,EAAgB,CAGpB,CAAsB,IAAtB,EAAOH,CAAP,CAAA,CAA4B,CAC1BG,CAAA,EACA,KAAI/D,EAAc4D,CAAAI,QAAlB,CAEIC,EAAc,CAAA,CACbH,EAAL,EACE5C,CAAA,CAAQd,CAAR,CAAoB,QAAQ,CAAC8D,CAAD,CAAQC,CAAR,CAAa,CAClCF,CAAAA,CAAL,EAAoBpC,CAAA,CAAOqC,CAAP,CAApB,EAAqClE,CAAAE,KAAA,CAAiBiE,CAAjB,CAArC,EAEM,CAAAR,CAAA,CAAYQ,CAAZ,CAFN,GAKEF,CACA,CAHAN,CAAA,CAAYQ,CAAZ,CAGA,CAHmB,CAAA,CAGnB,CAAAnE,CAAAO,OAAA,EANF,CADuC,CAAzC,CAYE0D,EAAJ,CAGEH,CAHF,CAGiB,CAACN,CAHlB,CAKEE,CAAAb,KAAA,CAAuB7C,CAAvB,CAGF4D,EAAA,CAAcA,CAAAQ,KA1BY,CA6B5BlD,CAAA,CAAQwC,CAAR,CAA2B,QAAQ,CAAC1D,CAAD,CAAc,CAC/CA,CAAAe,OAAA,EAD+C,CAAjD,CAII2C,EAAA9B,OAAJ,GAAiCmC,CAAjC,CACE3F,CAAAiG,SAAA,CAAkBpC,CAAlB,CAnEWqC,WAmEX,CAlEaC,aAkEb,CADF,CAGEnG,CAAAiG,SAAA,CAAkBpC,CAAlB,CApEasC,aAoEb,CArEWD,WAqEX,CArD+B,CAyDnCpC,EAAApC,iBAAA,CAAwBqC,CAAAqC,WAAxB,EAA6CrC,CAAA,CAAO,KAAP,CAA7C,CAA4Da,CAAAM,OAA5D,CAGArB,EAAApB,GAAA,CAAY,UAAZ,CAAwB,QAAQ,EAAG,CACjCK,CAAA,CAAQyB,CAAR,CAAkB,QAAQ,CAAC8B,CAAD,CAAO,CAC/BA,CAAAT,QAAAjD,OAAA,EAD+B,CAAjC,CADiC,CAAnC,CAMA,KAAAnB,SAAA,CAAgB8E,QAAQ,EAAG,CACpBtB,CAAL,GACEA,CACA,CADc,CAAA,CACd,CAAAlB,CAAAyC,WAAA,CAAkB,QAAQ,EAAG,CACvBvB,CAAJ,EAAmBC,CAAnB,EACEL,CAAAM,OAAA,CAAYD,CAAZ,CAFyB,CAA7B,CAFF,CADyB,CAW3B,KAAApD,SAAA,CAAgB2E,QAAQ,CAACtC,CAAD;AAAUtC,CAAV,CAAuB,CAC7C,IAAI6E,EAAU5B,CAAA6B,SAAA,EACdnC,EAAA,CAASkC,CAAT,CAAA,CAAoB,CAClBb,QAAShE,CADS,CAGF,KAAA,EAAAiC,CAAA,CAAS,CAAT,CAAA,CAwCd8C,EAAcpC,CAAA,CAxCsBkC,CAwCtB,CACb7B,EAAAa,KAAL,CAIE,CADImB,CACJ,CADY5C,CAAA,CAAoBC,CAApB,CA5CiBC,CA4CjB,CACZ,GACEyC,CAAAX,KACA,CADmBY,CAAAZ,KACnB,CAAAY,CAAAZ,KAAA,CAAaW,CAFf,GAIEA,CAAAX,KACA,CADmBpB,CAAAa,KACnB,CAAAb,CAAAa,KAAA,CAAYkB,CALd,CAJF,CACE/B,CAAAa,KADF,CACckB,CAzCdzC,EAAAI,gBAAA,CAA0BmC,CAC1B5B,EAAA,EAEAD,EAAApD,SAAA,EAT6C,CAY/C,KAAAkB,WAAA,CAAkBmE,QAAQ,CAAC3C,CAAD,CAAU,CAClC,IAAI6B,EAAM7B,CAAAI,gBACV,QAAOJ,CAAAI,gBA+CP,KAAIqC,EAAcpC,CAAA,CA9CsBwB,CA8CtB,CAGlB,EADIa,CACJ,CADY5C,CAAA,CAhDMH,CAAAI,CAAS,CAATA,CAgDN,CAhDmBC,CAgDnB,CACZ,EACE0C,CAAAZ,KADF,CACeW,CAAAX,KADf,CAGEpB,CAAAa,KAHF,CAGckB,CAAAX,KAnDd,QAAOzB,CAAA,CAASwB,CAAT,CACPnB,EAAApD,SAAA,EALkC,CAnGyD,CAAnF,CAHP,CAJgD,CAAhC,CAlF3B,CAAA6B,UAAA,CAiSa,mBAjSb,CAkSI,CAAC,kBAAD,CAAqB,WAArB,CAAkC,UAAlC,CAA8C,QAAQ,CAACyD,CAAD,CAAmBC,CAAnB,CAA8BC,CAA9B,CAAwC,CAyB9FC,QAASA,EAAwB,CAACzG,CAAD,CAAU0G,CAAV,CAAe,CAE9C,IAAIhD,EAAU8C,CAAAG,gBAAA,CACVH,CAAAG,gBAAA,CAAyB,mBAAzB;AAA8CD,CAA9C,CADU,CAEVH,CAAA,CAAU,CAAV,CAAAK,cAAA,CAA2B,sBAA3B,CAAoDF,CAApD,CAA0D,GAA1D,CAFJ,CAGIG,EAASrE,CAAA,CAAOkB,CAAP,CACb1D,EAAA8G,MAAA,CAAcD,CAAd,CAGA7G,EAAA+G,OAAA,EAT8C,CAvBhD,MAAO,CACLtH,SAAU,IADL,CAELI,QAAS,cAFJ,CAGLC,KAAMA,QAAQ,CAACwD,CAAD,CAAStD,CAAT,CAAkBC,CAAlB,CAAyB,CACrC,IAAIyG,EAAMzG,CAAA+G,kBAANN,EAAiCzG,CAAAyG,IACrCJ,EAAA,CAAiBI,CAAjB,CAAAO,KAAA,CAA2B,QAAQ,CAACC,CAAD,CAAO,CACpC5D,CAAA6D,YAAJ,GAEI5E,CAAA,CAAS2E,CAAT,CAAJ,EAAuB,CAAAA,CAAAE,KAAA,EAAvB,CAEEX,CAAA,CAAyBzG,CAAzB,CAAkC0G,CAAlC,CAFF,CAKEF,CAAA,CAASU,CAAT,CAAA,CAAe5D,CAAf,CAAuB,QAAQ,CAAC+D,CAAD,CAAW,CACxCrH,CAAA8G,MAAA,CAAcO,CAAd,CACAZ,EAAA,CAAyBzG,CAAzB,CAAkC0G,CAAlC,CAFwC,CAA1C,CAPF,CADwC,CAA1C,CAFqC,CAHlC,CAFuF,CAA9F,CAlSJ,CAAA7D,UAAA,CAwWa,WAxWb,CAwW0BtD,CAAA,EAxW1B,CAAAsD,UAAA,CAuYa,cAvYb,CAuY6BtD,CAAA,EAvY7B,CArQ2B,CAA1B,CAAD,CA8tBGF,MA9tBH,CA8tBWA,MAAAC,QA9tBX;", +"sources":["angular-messages.js"], +"names":["window","angular","ngMessageDirectiveFactory","$animate","restrict","transclude","priority","terminal","require","link","scope","element","attrs","ngMessagesCtrl","$transclude","commentNode","records","staticExp","ngMessage","when","dynamicExp","ngMessageExp","whenExp","assignRecords","items","isArray","split","reRender","$eval","$watchCollection","currentElement","messageCtrl","register","test","name","collection","indexOf","hasOwnProperty","attach","elm","newScope","enter","$$attachId","getAttachId","on","deregister","detach","$destroy","leave","forEach","isString","jqLite","module","initAngularHelpers","info","angularVersion","directive","isAttrTruthy","attr","length","truthy","val","controller","NgMessagesCtrl","$element","$scope","$attrs","findPreviousMessage","parent","comment","prevNode","parentLookup","prevKey","$$ngMessageNode","messages","childNodes","push","previousSibling","parentNode","ctrl","latestKey","nextAttachId","this.getAttachId","renderLater","cachedCollection","render","this.render","multiple","ngMessagesMultiple","unmatchedMessages","matchedKeys","messageItem","head","messageFound","totalMessages","message","messageUsed","value","key","next","setClass","ACTIVE_CLASS","INACTIVE_CLASS","ngMessages","item","this.reRender","$evalAsync","this.register","nextKey","toString","messageNode","match","this.deregister","$templateRequest","$document","$compile","replaceElementWithMarker","src","$$createComment","createComment","marker","after","remove","ngMessagesInclude","then","html","$$destroyed","trim","contents"] +} diff --git a/1.6.6/angular-mocks.js b/1.6.6/angular-mocks.js new file mode 100644 index 000000000..caaeb013f --- /dev/null +++ b/1.6.6/angular-mocks.js @@ -0,0 +1,3435 @@ +/** + * @license AngularJS v1.6.6 + * (c) 2010-2017 Google, Inc. http://angularjs.org + * License: MIT + */ +(function(window, angular) { + +'use strict'; + +/** + * @ngdoc object + * @name angular.mock + * @description + * + * Namespace from 'angular-mocks.js' which contains testing related code. + * + */ +angular.mock = {}; + +/** + * ! This is a private undocumented service ! + * + * @name $browser + * + * @description + * This service is a mock implementation of {@link ng.$browser}. It provides fake + * implementation for commonly used browser apis that are hard to test, e.g. setTimeout, xhr, + * cookies, etc. + * + * The api of this service is the same as that of the real {@link ng.$browser $browser}, except + * that there are several helper methods available which can be used in tests. + */ +angular.mock.$BrowserProvider = function() { + this.$get = function() { + return new angular.mock.$Browser(); + }; +}; + +angular.mock.$Browser = function() { + var self = this; + + this.isMock = true; + self.$$url = 'http://server/'; + self.$$lastUrl = self.$$url; // used by url polling fn + self.pollFns = []; + + // Testability API + + var outstandingRequestCount = 0; + var outstandingRequestCallbacks = []; + self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; }; + self.$$completeOutstandingRequest = function(fn) { + try { + fn(); + } finally { + outstandingRequestCount--; + if (!outstandingRequestCount) { + while (outstandingRequestCallbacks.length) { + outstandingRequestCallbacks.pop()(); + } + } + } + }; + self.notifyWhenNoOutstandingRequests = function(callback) { + if (outstandingRequestCount) { + outstandingRequestCallbacks.push(callback); + } else { + callback(); + } + }; + + // register url polling fn + + self.onUrlChange = function(listener) { + self.pollFns.push( + function() { + if (self.$$lastUrl !== self.$$url || self.$$state !== self.$$lastState) { + self.$$lastUrl = self.$$url; + self.$$lastState = self.$$state; + listener(self.$$url, self.$$state); + } + } + ); + + return listener; + }; + + self.$$applicationDestroyed = angular.noop; + self.$$checkUrlChange = angular.noop; + + self.deferredFns = []; + self.deferredNextId = 0; + + self.defer = function(fn, delay) { + // Note that we do not use `$$incOutstandingRequestCount` or `$$completeOutstandingRequest` + // in this mock implementation. + delay = delay || 0; + self.deferredFns.push({time:(self.defer.now + delay), fn:fn, id: self.deferredNextId}); + self.deferredFns.sort(function(a, b) { return a.time - b.time;}); + return self.deferredNextId++; + }; + + + /** + * @name $browser#defer.now + * + * @description + * Current milliseconds mock time. + */ + self.defer.now = 0; + + + self.defer.cancel = function(deferId) { + var fnIndex; + + angular.forEach(self.deferredFns, function(fn, index) { + if (fn.id === deferId) fnIndex = index; + }); + + if (angular.isDefined(fnIndex)) { + self.deferredFns.splice(fnIndex, 1); + return true; + } + + return false; + }; + + + /** + * @name $browser#defer.flush + * + * @description + * Flushes all pending requests and executes the defer callbacks. + * + * @param {number=} number of milliseconds to flush. See {@link #defer.now} + */ + self.defer.flush = function(delay) { + var nextTime; + + if (angular.isDefined(delay)) { + // A delay was passed so compute the next time + nextTime = self.defer.now + delay; + } else { + if (self.deferredFns.length) { + // No delay was passed so set the next time so that it clears the deferred queue + nextTime = self.deferredFns[self.deferredFns.length - 1].time; + } else { + // No delay passed, but there are no deferred tasks so flush - indicates an error! + throw new Error('No deferred tasks to be flushed'); + } + } + + while (self.deferredFns.length && self.deferredFns[0].time <= nextTime) { + // Increment the time and call the next deferred function + self.defer.now = self.deferredFns[0].time; + self.deferredFns.shift().fn(); + } + + // Ensure that the current time is correct + self.defer.now = nextTime; + }; + + self.$$baseHref = '/'; + self.baseHref = function() { + return this.$$baseHref; + }; +}; +angular.mock.$Browser.prototype = { + + /** + * @name $browser#poll + * + * @description + * run all fns in pollFns + */ + poll: function poll() { + angular.forEach(this.pollFns, function(pollFn) { + pollFn(); + }); + }, + + url: function(url, replace, state) { + if (angular.isUndefined(state)) { + state = null; + } + if (url) { + this.$$url = url; + // Native pushState serializes & copies the object; simulate it. + this.$$state = angular.copy(state); + return this; + } + + return this.$$url; + }, + + state: function() { + return this.$$state; + } +}; + + +/** + * @ngdoc provider + * @name $exceptionHandlerProvider + * + * @description + * Configures the mock implementation of {@link ng.$exceptionHandler} to rethrow or to log errors + * passed to the `$exceptionHandler`. + */ + +/** + * @ngdoc service + * @name $exceptionHandler + * + * @description + * Mock implementation of {@link ng.$exceptionHandler} that rethrows or logs errors passed + * to it. See {@link ngMock.$exceptionHandlerProvider $exceptionHandlerProvider} for configuration + * information. + * + * + * ```js + * describe('$exceptionHandlerProvider', function() { + * + * it('should capture log messages and exceptions', function() { + * + * module(function($exceptionHandlerProvider) { + * $exceptionHandlerProvider.mode('log'); + * }); + * + * inject(function($log, $exceptionHandler, $timeout) { + * $timeout(function() { $log.log(1); }); + * $timeout(function() { $log.log(2); throw 'banana peel'; }); + * $timeout(function() { $log.log(3); }); + * expect($exceptionHandler.errors).toEqual([]); + * expect($log.assertEmpty()); + * $timeout.flush(); + * expect($exceptionHandler.errors).toEqual(['banana peel']); + * expect($log.log.logs).toEqual([[1], [2], [3]]); + * }); + * }); + * }); + * ``` + */ + +angular.mock.$ExceptionHandlerProvider = function() { + var handler; + + /** + * @ngdoc method + * @name $exceptionHandlerProvider#mode + * + * @description + * Sets the logging mode. + * + * @param {string} mode Mode of operation, defaults to `rethrow`. + * + * - `log`: Sometimes it is desirable to test that an error is thrown, for this case the `log` + * mode stores an array of errors in `$exceptionHandler.errors`, to allow later assertion of + * them. See {@link ngMock.$log#assertEmpty assertEmpty()} and + * {@link ngMock.$log#reset reset()}. + * - `rethrow`: If any errors are passed to the handler in tests, it typically means that there + * is a bug in the application or test, so this mock will make these tests fail. For any + * implementations that expect exceptions to be thrown, the `rethrow` mode will also maintain + * a log of thrown errors in `$exceptionHandler.errors`. + */ + this.mode = function(mode) { + + switch (mode) { + case 'log': + case 'rethrow': + var errors = []; + handler = function(e) { + if (arguments.length === 1) { + errors.push(e); + } else { + errors.push([].slice.call(arguments, 0)); + } + if (mode === 'rethrow') { + throw e; + } + }; + handler.errors = errors; + break; + default: + throw new Error('Unknown mode \'' + mode + '\', only \'log\'/\'rethrow\' modes are allowed!'); + } + }; + + this.$get = function() { + return handler; + }; + + this.mode('rethrow'); +}; + + +/** + * @ngdoc service + * @name $log + * + * @description + * Mock implementation of {@link ng.$log} that gathers all logged messages in arrays + * (one array per logging level). These arrays are exposed as `logs` property of each of the + * level-specific log function, e.g. for level `error` the array is exposed as `$log.error.logs`. + * + */ +angular.mock.$LogProvider = function() { + var debug = true; + + function concat(array1, array2, index) { + return array1.concat(Array.prototype.slice.call(array2, index)); + } + + this.debugEnabled = function(flag) { + if (angular.isDefined(flag)) { + debug = flag; + return this; + } else { + return debug; + } + }; + + this.$get = function() { + var $log = { + log: function() { $log.log.logs.push(concat([], arguments, 0)); }, + warn: function() { $log.warn.logs.push(concat([], arguments, 0)); }, + info: function() { $log.info.logs.push(concat([], arguments, 0)); }, + error: function() { $log.error.logs.push(concat([], arguments, 0)); }, + debug: function() { + if (debug) { + $log.debug.logs.push(concat([], arguments, 0)); + } + } + }; + + /** + * @ngdoc method + * @name $log#reset + * + * @description + * Reset all of the logging arrays to empty. + */ + $log.reset = function() { + /** + * @ngdoc property + * @name $log#log.logs + * + * @description + * Array of messages logged using {@link ng.$log#log `log()`}. + * + * @example + * ```js + * $log.log('Some Log'); + * var first = $log.log.logs.unshift(); + * ``` + */ + $log.log.logs = []; + /** + * @ngdoc property + * @name $log#info.logs + * + * @description + * Array of messages logged using {@link ng.$log#info `info()`}. + * + * @example + * ```js + * $log.info('Some Info'); + * var first = $log.info.logs.unshift(); + * ``` + */ + $log.info.logs = []; + /** + * @ngdoc property + * @name $log#warn.logs + * + * @description + * Array of messages logged using {@link ng.$log#warn `warn()`}. + * + * @example + * ```js + * $log.warn('Some Warning'); + * var first = $log.warn.logs.unshift(); + * ``` + */ + $log.warn.logs = []; + /** + * @ngdoc property + * @name $log#error.logs + * + * @description + * Array of messages logged using {@link ng.$log#error `error()`}. + * + * @example + * ```js + * $log.error('Some Error'); + * var first = $log.error.logs.unshift(); + * ``` + */ + $log.error.logs = []; + /** + * @ngdoc property + * @name $log#debug.logs + * + * @description + * Array of messages logged using {@link ng.$log#debug `debug()`}. + * + * @example + * ```js + * $log.debug('Some Error'); + * var first = $log.debug.logs.unshift(); + * ``` + */ + $log.debug.logs = []; + }; + + /** + * @ngdoc method + * @name $log#assertEmpty + * + * @description + * Assert that all of the logging methods have no logged messages. If any messages are present, + * an exception is thrown. + */ + $log.assertEmpty = function() { + var errors = []; + angular.forEach(['error', 'warn', 'info', 'log', 'debug'], function(logLevel) { + angular.forEach($log[logLevel].logs, function(log) { + angular.forEach(log, function(logItem) { + errors.push('MOCK $log (' + logLevel + '): ' + String(logItem) + '\n' + + (logItem.stack || '')); + }); + }); + }); + if (errors.length) { + errors.unshift('Expected $log to be empty! Either a message was logged unexpectedly, or ' + + 'an expected log message was not checked and removed:'); + errors.push(''); + throw new Error(errors.join('\n---------\n')); + } + }; + + $log.reset(); + return $log; + }; +}; + + +/** + * @ngdoc service + * @name $interval + * + * @description + * Mock implementation of the $interval service. + * + * Use {@link ngMock.$interval#flush `$interval.flush(millis)`} to + * move forward by `millis` milliseconds and trigger any functions scheduled to run in that + * time. + * + * @param {function()} fn A function that should be called repeatedly. + * @param {number} delay Number of milliseconds between each function call. + * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat + * indefinitely. + * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise + * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block. + * @param {...*=} Pass additional parameters to the executed function. + * @returns {promise} A promise which will be notified on each iteration. + */ +angular.mock.$IntervalProvider = function() { + this.$get = ['$browser', '$rootScope', '$q', '$$q', + function($browser, $rootScope, $q, $$q) { + var repeatFns = [], + nextRepeatId = 0, + now = 0; + + var $interval = function(fn, delay, count, invokeApply) { + var hasParams = arguments.length > 4, + args = hasParams ? Array.prototype.slice.call(arguments, 4) : [], + iteration = 0, + skipApply = (angular.isDefined(invokeApply) && !invokeApply), + deferred = (skipApply ? $$q : $q).defer(), + promise = deferred.promise; + + count = (angular.isDefined(count)) ? count : 0; + promise.then(null, function() {}, (!hasParams) ? fn : function() { + fn.apply(null, args); + }); + + promise.$$intervalId = nextRepeatId; + + function tick() { + deferred.notify(iteration++); + + if (count > 0 && iteration >= count) { + var fnIndex; + deferred.resolve(iteration); + + angular.forEach(repeatFns, function(fn, index) { + if (fn.id === promise.$$intervalId) fnIndex = index; + }); + + if (angular.isDefined(fnIndex)) { + repeatFns.splice(fnIndex, 1); + } + } + + if (skipApply) { + $browser.defer.flush(); + } else { + $rootScope.$apply(); + } + } + + repeatFns.push({ + nextTime: (now + (delay || 0)), + delay: delay || 1, + fn: tick, + id: nextRepeatId, + deferred: deferred + }); + repeatFns.sort(function(a, b) { return a.nextTime - b.nextTime;}); + + nextRepeatId++; + return promise; + }; + /** + * @ngdoc method + * @name $interval#cancel + * + * @description + * Cancels a task associated with the `promise`. + * + * @param {promise} promise A promise from calling the `$interval` function. + * @returns {boolean} Returns `true` if the task was successfully cancelled. + */ + $interval.cancel = function(promise) { + if (!promise) return false; + var fnIndex; + + angular.forEach(repeatFns, function(fn, index) { + if (fn.id === promise.$$intervalId) fnIndex = index; + }); + + if (angular.isDefined(fnIndex)) { + repeatFns[fnIndex].deferred.promise.then(undefined, function() {}); + repeatFns[fnIndex].deferred.reject('canceled'); + repeatFns.splice(fnIndex, 1); + return true; + } + + return false; + }; + + /** + * @ngdoc method + * @name $interval#flush + * @description + * + * Runs interval tasks scheduled to be run in the next `millis` milliseconds. + * + * @param {number=} millis maximum timeout amount to flush up until. + * + * @return {number} The amount of time moved forward. + */ + $interval.flush = function(millis) { + var before = now; + now += millis; + while (repeatFns.length && repeatFns[0].nextTime <= now) { + var task = repeatFns[0]; + task.fn(); + if (task.nextTime === before) { + // this can only happen the first time + // a zero-delay interval gets triggered + task.nextTime++; + } + task.nextTime += task.delay; + repeatFns.sort(function(a, b) { return a.nextTime - b.nextTime;}); + } + return millis; + }; + + return $interval; + }]; +}; + + +function jsonStringToDate(string) { + // The R_ISO8061_STR regex is never going to fit into the 100 char limit! + // eslit-disable-next-line max-len + var R_ISO8061_STR = /^(-?\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/; + + var match; + if ((match = string.match(R_ISO8061_STR))) { + var date = new Date(0), + tzHour = 0, + tzMin = 0; + if (match[9]) { + tzHour = toInt(match[9] + match[10]); + tzMin = toInt(match[9] + match[11]); + } + date.setUTCFullYear(toInt(match[1]), toInt(match[2]) - 1, toInt(match[3])); + date.setUTCHours(toInt(match[4] || 0) - tzHour, + toInt(match[5] || 0) - tzMin, + toInt(match[6] || 0), + toInt(match[7] || 0)); + return date; + } + return string; +} + +function toInt(str) { + return parseInt(str, 10); +} + +function padNumberInMock(num, digits, trim) { + var neg = ''; + if (num < 0) { + neg = '-'; + num = -num; + } + num = '' + num; + while (num.length < digits) num = '0' + num; + if (trim) { + num = num.substr(num.length - digits); + } + return neg + num; +} + + +/** + * @ngdoc type + * @name angular.mock.TzDate + * @description + * + * *NOTE*: this is not an injectable instance, just a globally available mock class of `Date`. + * + * Mock of the Date type which has its timezone specified via constructor arg. + * + * The main purpose is to create Date-like instances with timezone fixed to the specified timezone + * offset, so that we can test code that depends on local timezone settings without dependency on + * the time zone settings of the machine where the code is running. + * + * @param {number} offset Offset of the *desired* timezone in hours (fractions will be honored) + * @param {(number|string)} timestamp Timestamp representing the desired time in *UTC* + * + * @example + * !!!! WARNING !!!!! + * This is not a complete Date object so only methods that were implemented can be called safely. + * To make matters worse, TzDate instances inherit stuff from Date via a prototype. + * + * We do our best to intercept calls to "unimplemented" methods, but since the list of methods is + * incomplete we might be missing some non-standard methods. This can result in errors like: + * "Date.prototype.foo called on incompatible Object". + * + * ```js + * var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00Z'); + * newYearInBratislava.getTimezoneOffset() => -60; + * newYearInBratislava.getFullYear() => 2010; + * newYearInBratislava.getMonth() => 0; + * newYearInBratislava.getDate() => 1; + * newYearInBratislava.getHours() => 0; + * newYearInBratislava.getMinutes() => 0; + * newYearInBratislava.getSeconds() => 0; + * ``` + * + */ +angular.mock.TzDate = function(offset, timestamp) { + var self = new Date(0); + if (angular.isString(timestamp)) { + var tsStr = timestamp; + + self.origDate = jsonStringToDate(timestamp); + + timestamp = self.origDate.getTime(); + if (isNaN(timestamp)) { + // eslint-disable-next-line no-throw-literal + throw { + name: 'Illegal Argument', + message: 'Arg \'' + tsStr + '\' passed into TzDate constructor is not a valid date string' + }; + } + } else { + self.origDate = new Date(timestamp); + } + + var localOffset = new Date(timestamp).getTimezoneOffset(); + self.offsetDiff = localOffset * 60 * 1000 - offset * 1000 * 60 * 60; + self.date = new Date(timestamp + self.offsetDiff); + + self.getTime = function() { + return self.date.getTime() - self.offsetDiff; + }; + + self.toLocaleDateString = function() { + return self.date.toLocaleDateString(); + }; + + self.getFullYear = function() { + return self.date.getFullYear(); + }; + + self.getMonth = function() { + return self.date.getMonth(); + }; + + self.getDate = function() { + return self.date.getDate(); + }; + + self.getHours = function() { + return self.date.getHours(); + }; + + self.getMinutes = function() { + return self.date.getMinutes(); + }; + + self.getSeconds = function() { + return self.date.getSeconds(); + }; + + self.getMilliseconds = function() { + return self.date.getMilliseconds(); + }; + + self.getTimezoneOffset = function() { + return offset * 60; + }; + + self.getUTCFullYear = function() { + return self.origDate.getUTCFullYear(); + }; + + self.getUTCMonth = function() { + return self.origDate.getUTCMonth(); + }; + + self.getUTCDate = function() { + return self.origDate.getUTCDate(); + }; + + self.getUTCHours = function() { + return self.origDate.getUTCHours(); + }; + + self.getUTCMinutes = function() { + return self.origDate.getUTCMinutes(); + }; + + self.getUTCSeconds = function() { + return self.origDate.getUTCSeconds(); + }; + + self.getUTCMilliseconds = function() { + return self.origDate.getUTCMilliseconds(); + }; + + self.getDay = function() { + return self.date.getDay(); + }; + + // provide this method only on browsers that already have it + if (self.toISOString) { + self.toISOString = function() { + return padNumberInMock(self.origDate.getUTCFullYear(), 4) + '-' + + padNumberInMock(self.origDate.getUTCMonth() + 1, 2) + '-' + + padNumberInMock(self.origDate.getUTCDate(), 2) + 'T' + + padNumberInMock(self.origDate.getUTCHours(), 2) + ':' + + padNumberInMock(self.origDate.getUTCMinutes(), 2) + ':' + + padNumberInMock(self.origDate.getUTCSeconds(), 2) + '.' + + padNumberInMock(self.origDate.getUTCMilliseconds(), 3) + 'Z'; + }; + } + + //hide all methods not implemented in this mock that the Date prototype exposes + var unimplementedMethods = ['getUTCDay', + 'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds', + 'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear', + 'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', + 'setYear', 'toDateString', 'toGMTString', 'toJSON', 'toLocaleFormat', 'toLocaleString', + 'toLocaleTimeString', 'toSource', 'toString', 'toTimeString', 'toUTCString', 'valueOf']; + + angular.forEach(unimplementedMethods, function(methodName) { + self[methodName] = function() { + throw new Error('Method \'' + methodName + '\' is not implemented in the TzDate mock'); + }; + }); + + return self; +}; + +//make "tzDateInstance instanceof Date" return true +angular.mock.TzDate.prototype = Date.prototype; + + +/** + * @ngdoc service + * @name $animate + * + * @description + * Mock implementation of the {@link ng.$animate `$animate`} service. Exposes two additional methods + * for testing animations. + * + * You need to require the `ngAnimateMock` module in your test suite for instance `beforeEach(module('ngAnimateMock'))` + */ +angular.mock.animate = angular.module('ngAnimateMock', ['ng']) + .info({ angularVersion: '1.6.6' }) + + .config(['$provide', function($provide) { + + $provide.factory('$$forceReflow', function() { + function reflowFn() { + reflowFn.totalReflows++; + } + reflowFn.totalReflows = 0; + return reflowFn; + }); + + $provide.factory('$$animateAsyncRun', function() { + var queue = []; + var queueFn = function() { + return function(fn) { + queue.push(fn); + }; + }; + queueFn.flush = function() { + if (queue.length === 0) return false; + + for (var i = 0; i < queue.length; i++) { + queue[i](); + } + queue = []; + + return true; + }; + return queueFn; + }); + + $provide.decorator('$$animateJs', ['$delegate', function($delegate) { + var runners = []; + + var animateJsConstructor = function() { + var animator = $delegate.apply($delegate, arguments); + // If no javascript animation is found, animator is undefined + if (animator) { + runners.push(animator); + } + return animator; + }; + + animateJsConstructor.$closeAndFlush = function() { + runners.forEach(function(runner) { + runner.end(); + }); + runners = []; + }; + + return animateJsConstructor; + }]); + + $provide.decorator('$animateCss', ['$delegate', function($delegate) { + var runners = []; + + var animateCssConstructor = function(element, options) { + var animator = $delegate(element, options); + runners.push(animator); + return animator; + }; + + animateCssConstructor.$closeAndFlush = function() { + runners.forEach(function(runner) { + runner.end(); + }); + runners = []; + }; + + return animateCssConstructor; + }]); + + $provide.decorator('$animate', ['$delegate', '$timeout', '$browser', '$$rAF', '$animateCss', '$$animateJs', + '$$forceReflow', '$$animateAsyncRun', '$rootScope', + function($delegate, $timeout, $browser, $$rAF, $animateCss, $$animateJs, + $$forceReflow, $$animateAsyncRun, $rootScope) { + var animate = { + queue: [], + cancel: $delegate.cancel, + on: $delegate.on, + off: $delegate.off, + pin: $delegate.pin, + get reflows() { + return $$forceReflow.totalReflows; + }, + enabled: $delegate.enabled, + /** + * @ngdoc method + * @name $animate#closeAndFlush + * @description + * + * This method will close all pending animations (both {@link ngAnimate#javascript-based-animations Javascript} + * and {@link ngAnimate.$animateCss CSS}) and it will also flush any remaining animation frames and/or callbacks. + */ + closeAndFlush: function() { + // we allow the flush command to swallow the errors + // because depending on whether CSS or JS animations are + // used, there may not be a RAF flush. The primary flush + // at the end of this function must throw an exception + // because it will track if there were pending animations + this.flush(true); + $animateCss.$closeAndFlush(); + $$animateJs.$closeAndFlush(); + this.flush(); + }, + /** + * @ngdoc method + * @name $animate#flush + * @description + * + * This method is used to flush the pending callbacks and animation frames to either start + * an animation or conclude an animation. Note that this will not actually close an + * actively running animation (see {@link ngMock.$animate#closeAndFlush `closeAndFlush()`} for that). + */ + flush: function(hideErrors) { + $rootScope.$digest(); + + var doNextRun, somethingFlushed = false; + do { + doNextRun = false; + + if ($$rAF.queue.length) { + $$rAF.flush(); + doNextRun = somethingFlushed = true; + } + + if ($$animateAsyncRun.flush()) { + doNextRun = somethingFlushed = true; + } + } while (doNextRun); + + if (!somethingFlushed && !hideErrors) { + throw new Error('No pending animations ready to be closed or flushed'); + } + + $rootScope.$digest(); + } + }; + + angular.forEach( + ['animate','enter','leave','move','addClass','removeClass','setClass'], function(method) { + animate[method] = function() { + animate.queue.push({ + event: method, + element: arguments[0], + options: arguments[arguments.length - 1], + args: arguments + }); + return $delegate[method].apply($delegate, arguments); + }; + }); + + return animate; + }]); + + }]); + + +/** + * @ngdoc function + * @name angular.mock.dump + * @description + * + * *NOTE*: This is not an injectable instance, just a globally available function. + * + * Method for serializing common angular objects (scope, elements, etc..) into strings. + * It is useful for logging objects to the console when debugging. + * + * @param {*} object - any object to turn into string. + * @return {string} a serialized string of the argument + */ +angular.mock.dump = function(object) { + return serialize(object); + + function serialize(object) { + var out; + + if (angular.isElement(object)) { + object = angular.element(object); + out = angular.element('
'); + angular.forEach(object, function(element) { + out.append(angular.element(element).clone()); + }); + out = out.html(); + } else if (angular.isArray(object)) { + out = []; + angular.forEach(object, function(o) { + out.push(serialize(o)); + }); + out = '[ ' + out.join(', ') + ' ]'; + } else if (angular.isObject(object)) { + if (angular.isFunction(object.$eval) && angular.isFunction(object.$apply)) { + out = serializeScope(object); + } else if (object instanceof Error) { + out = object.stack || ('' + object.name + ': ' + object.message); + } else { + // TODO(i): this prevents methods being logged, + // we should have a better way to serialize objects + out = angular.toJson(object, true); + } + } else { + out = String(object); + } + + return out; + } + + function serializeScope(scope, offset) { + offset = offset || ' '; + var log = [offset + 'Scope(' + scope.$id + '): {']; + for (var key in scope) { + if (Object.prototype.hasOwnProperty.call(scope, key) && !key.match(/^(\$|this)/)) { + log.push(' ' + key + ': ' + angular.toJson(scope[key])); + } + } + var child = scope.$$childHead; + while (child) { + log.push(serializeScope(child, offset + ' ')); + child = child.$$nextSibling; + } + log.push('}'); + return log.join('\n' + offset); + } +}; + +/** + * @ngdoc service + * @name $httpBackend + * @description + * Fake HTTP backend implementation suitable for unit testing applications that use the + * {@link ng.$http $http service}. + * + *
+ * **Note**: For fake HTTP backend implementation suitable for end-to-end testing or backend-less + * development please see {@link ngMockE2E.$httpBackend e2e $httpBackend mock}. + *
+ * + * During unit testing, we want our unit tests to run quickly and have no external dependencies so + * we don’t want to send [XHR](https://developer.mozilla.org/en/xmlhttprequest) or + * [JSONP](http://en.wikipedia.org/wiki/JSONP) requests to a real server. All we really need is + * to verify whether a certain request has been sent or not, or alternatively just let the + * application make requests, respond with pre-trained responses and assert that the end result is + * what we expect it to be. + * + * This mock implementation can be used to respond with static or dynamic responses via the + * `expect` and `when` apis and their shortcuts (`expectGET`, `whenPOST`, etc). + * + * When an Angular application needs some data from a server, it calls the $http service, which + * sends the request to a real server using $httpBackend service. With dependency injection, it is + * easy to inject $httpBackend mock (which has the same API as $httpBackend) and use it to verify + * the requests and respond with some testing data without sending a request to a real server. + * + * There are two ways to specify what test data should be returned as http responses by the mock + * backend when the code under test makes http requests: + * + * - `$httpBackend.expect` - specifies a request expectation + * - `$httpBackend.when` - specifies a backend definition + * + * + * ## Request Expectations vs Backend Definitions + * + * Request expectations provide a way to make assertions about requests made by the application and + * to define responses for those requests. The test will fail if the expected requests are not made + * or they are made in the wrong order. + * + * Backend definitions allow you to define a fake backend for your application which doesn't assert + * if a particular request was made or not, it just returns a trained response if a request is made. + * The test will pass whether or not the request gets made during testing. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Request expectationsBackend definitions
Syntax.expect(...).respond(...).when(...).respond(...)
Typical usagestrict unit testsloose (black-box) unit testing
Fulfills multiple requestsNOYES
Order of requests mattersYESNO
Request requiredYESNO
Response requiredoptional (see below)YES
+ * + * In cases where both backend definitions and request expectations are specified during unit + * testing, the request expectations are evaluated first. + * + * If a request expectation has no response specified, the algorithm will search your backend + * definitions for an appropriate response. + * + * If a request didn't match any expectation or if the expectation doesn't have the response + * defined, the backend definitions are evaluated in sequential order to see if any of them match + * the request. The response from the first matched definition is returned. + * + * + * ## Flushing HTTP requests + * + * The $httpBackend used in production always responds to requests asynchronously. If we preserved + * this behavior in unit testing, we'd have to create async unit tests, which are hard to write, + * to follow and to maintain. But neither can the testing mock respond synchronously; that would + * change the execution of the code under test. For this reason, the mock $httpBackend has a + * `flush()` method, which allows the test to explicitly flush pending requests. This preserves + * the async api of the backend, while allowing the test to execute synchronously. + * + * + * ## Unit testing with mock $httpBackend + * The following code shows how to setup and use the mock backend when unit testing a controller. + * First we create the controller under test: + * + ```js + // The module code + angular + .module('MyApp', []) + .controller('MyController', MyController); + + // The controller code + function MyController($scope, $http) { + var authToken; + + $http.get('/auth.py').then(function(response) { + authToken = response.headers('A-Token'); + $scope.user = response.data; + }).catch(function() { + $scope.status = 'Failed...'; + }); + + $scope.saveMessage = function(message) { + var headers = { 'Authorization': authToken }; + $scope.status = 'Saving...'; + + $http.post('/add-msg.py', message, { headers: headers } ).then(function(response) { + $scope.status = ''; + }).catch(function() { + $scope.status = 'Failed...'; + }); + }; + } + ``` + * + * Now we setup the mock backend and create the test specs: + * + ```js + // testing controller + describe('MyController', function() { + var $httpBackend, $rootScope, createController, authRequestHandler; + + // Set up the module + beforeEach(module('MyApp')); + + beforeEach(inject(function($injector) { + // Set up the mock http service responses + $httpBackend = $injector.get('$httpBackend'); + // backend definition common for all tests + authRequestHandler = $httpBackend.when('GET', '/auth.py') + .respond({userId: 'userX'}, {'A-Token': 'xxx'}); + + // Get hold of a scope (i.e. the root scope) + $rootScope = $injector.get('$rootScope'); + // The $controller service is used to create instances of controllers + var $controller = $injector.get('$controller'); + + createController = function() { + return $controller('MyController', {'$scope' : $rootScope }); + }; + })); + + + afterEach(function() { + $httpBackend.verifyNoOutstandingExpectation(); + $httpBackend.verifyNoOutstandingRequest(); + }); + + + it('should fetch authentication token', function() { + $httpBackend.expectGET('/auth.py'); + var controller = createController(); + $httpBackend.flush(); + }); + + + it('should fail authentication', function() { + + // Notice how you can change the response even after it was set + authRequestHandler.respond(401, ''); + + $httpBackend.expectGET('/auth.py'); + var controller = createController(); + $httpBackend.flush(); + expect($rootScope.status).toBe('Failed...'); + }); + + + it('should send msg to server', function() { + var controller = createController(); + $httpBackend.flush(); + + // now you don’t care about the authentication, but + // the controller will still send the request and + // $httpBackend will respond without you having to + // specify the expectation and response for this request + + $httpBackend.expectPOST('/add-msg.py', 'message content').respond(201, ''); + $rootScope.saveMessage('message content'); + expect($rootScope.status).toBe('Saving...'); + $httpBackend.flush(); + expect($rootScope.status).toBe(''); + }); + + + it('should send auth header', function() { + var controller = createController(); + $httpBackend.flush(); + + $httpBackend.expectPOST('/add-msg.py', undefined, function(headers) { + // check if the header was sent, if it wasn't the expectation won't + // match the request and the test will fail + return headers['Authorization'] === 'xxx'; + }).respond(201, ''); + + $rootScope.saveMessage('whatever'); + $httpBackend.flush(); + }); + }); + ``` + * + * ## Dynamic responses + * + * You define a response to a request by chaining a call to `respond()` onto a definition or expectation. + * If you provide a **callback** as the first parameter to `respond(callback)` then you can dynamically generate + * a response based on the properties of the request. + * + * The `callback` function should be of the form `function(method, url, data, headers, params)`. + * + * ### Query parameters + * + * By default, query parameters on request URLs are parsed into the `params` object. So a request URL + * of `/list?q=searchstr&orderby=-name` would set `params` to be `{q: 'searchstr', orderby: '-name'}`. + * + * ### Regex parameter matching + * + * If an expectation or definition uses a **regex** to match the URL, you can provide an array of **keys** via a + * `params` argument. The index of each **key** in the array will match the index of a **group** in the + * **regex**. + * + * The `params` object in the **callback** will now have properties with these keys, which hold the value of the + * corresponding **group** in the **regex**. + * + * This also applies to the `when` and `expect` shortcut methods. + * + * + * ```js + * $httpBackend.expect('GET', /\/user\/(.+)/, undefined, undefined, ['id']) + * .respond(function(method, url, data, headers, params) { + * // for requested url of '/user/1234' params is {id: '1234'} + * }); + * + * $httpBackend.whenPATCH(/\/user\/(.+)\/article\/(.+)/, undefined, undefined, ['user', 'article']) + * .respond(function(method, url, data, headers, params) { + * // for url of '/user/1234/article/567' params is {user: '1234', article: '567'} + * }); + * ``` + * + * ## Matching route requests + * + * For extra convenience, `whenRoute` and `expectRoute` shortcuts are available. These methods offer colon + * delimited matching of the url path, ignoring the query string. This allows declarations + * similar to how application routes are configured with `$routeProvider`. Because these methods convert + * the definition url to regex, declaration order is important. Combined with query parameter parsing, + * the following is possible: + * + ```js + $httpBackend.whenRoute('GET', '/users/:id') + .respond(function(method, url, data, headers, params) { + return [200, MockUserList[Number(params.id)]]; + }); + + $httpBackend.whenRoute('GET', '/users') + .respond(function(method, url, data, headers, params) { + var userList = angular.copy(MockUserList), + defaultSort = 'lastName', + count, pages, isPrevious, isNext; + + // paged api response '/v1/users?page=2' + params.page = Number(params.page) || 1; + + // query for last names '/v1/users?q=Archer' + if (params.q) { + userList = $filter('filter')({lastName: params.q}); + } + + pages = Math.ceil(userList.length / pagingLength); + isPrevious = params.page > 1; + isNext = params.page < pages; + + return [200, { + count: userList.length, + previous: isPrevious, + next: isNext, + // sort field -> '/v1/users?sortBy=firstName' + results: $filter('orderBy')(userList, params.sortBy || defaultSort) + .splice((params.page - 1) * pagingLength, pagingLength) + }]; + }); + ``` + */ +angular.mock.$httpBackendDecorator = + ['$rootScope', '$timeout', '$delegate', createHttpBackendMock]; + +/** + * General factory function for $httpBackend mock. + * Returns instance for unit testing (when no arguments specified): + * - passing through is disabled + * - auto flushing is disabled + * + * Returns instance for e2e testing (when `$delegate` and `$browser` specified): + * - passing through (delegating request to real backend) is enabled + * - auto flushing is enabled + * + * @param {Object=} $delegate Real $httpBackend instance (allow passing through if specified) + * @param {Object=} $browser Auto-flushing enabled if specified + * @return {Object} Instance of $httpBackend mock + */ +function createHttpBackendMock($rootScope, $timeout, $delegate, $browser) { + var definitions = [], + expectations = [], + responses = [], + responsesPush = angular.bind(responses, responses.push), + copy = angular.copy, + // We cache the original backend so that if both ngMock and ngMockE2E override the + // service the ngMockE2E version can pass through to the real backend + originalHttpBackend = $delegate.$$originalHttpBackend || $delegate; + + function createResponse(status, data, headers, statusText) { + if (angular.isFunction(status)) return status; + + return function() { + return angular.isNumber(status) + ? [status, data, headers, statusText, 'complete'] + : [200, status, data, headers, 'complete']; + }; + } + + // TODO(vojta): change params to: method, url, data, headers, callback + function $httpBackend(method, url, data, callback, headers, timeout, withCredentials, responseType, eventHandlers, uploadEventHandlers) { + + var xhr = new MockXhr(), + expectation = expectations[0], + wasExpected = false; + + xhr.$$events = eventHandlers; + xhr.upload.$$events = uploadEventHandlers; + + function prettyPrint(data) { + return (angular.isString(data) || angular.isFunction(data) || data instanceof RegExp) + ? data + : angular.toJson(data); + } + + function wrapResponse(wrapped) { + if (!$browser && timeout) { + if (timeout.then) { + timeout.then(handleTimeout); + } else { + $timeout(handleTimeout, timeout); + } + } + + handleResponse.description = method + ' ' + url; + return handleResponse; + + function handleResponse() { + var response = wrapped.response(method, url, data, headers, wrapped.params(url)); + xhr.$$respHeaders = response[2]; + callback(copy(response[0]), copy(response[1]), xhr.getAllResponseHeaders(), + copy(response[3] || ''), copy(response[4])); + } + + function handleTimeout() { + for (var i = 0, ii = responses.length; i < ii; i++) { + if (responses[i] === handleResponse) { + responses.splice(i, 1); + callback(-1, undefined, '', undefined, 'timeout'); + break; + } + } + } + } + + if (expectation && expectation.match(method, url)) { + if (!expectation.matchData(data)) { + throw new Error('Expected ' + expectation + ' with different data\n' + + 'EXPECTED: ' + prettyPrint(expectation.data) + '\nGOT: ' + data); + } + + if (!expectation.matchHeaders(headers)) { + throw new Error('Expected ' + expectation + ' with different headers\n' + + 'EXPECTED: ' + prettyPrint(expectation.headers) + '\nGOT: ' + + prettyPrint(headers)); + } + + expectations.shift(); + + if (expectation.response) { + responses.push(wrapResponse(expectation)); + return; + } + wasExpected = true; + } + + var i = -1, definition; + while ((definition = definitions[++i])) { + if (definition.match(method, url, data, headers || {})) { + if (definition.response) { + // if $browser specified, we do auto flush all requests + ($browser ? $browser.defer : responsesPush)(wrapResponse(definition)); + } else if (definition.passThrough) { + originalHttpBackend(method, url, data, callback, headers, timeout, withCredentials, responseType, eventHandlers, uploadEventHandlers); + } else throw new Error('No response defined !'); + return; + } + } + throw wasExpected ? + new Error('No response defined !') : + new Error('Unexpected request: ' + method + ' ' + url + '\n' + + (expectation ? 'Expected ' + expectation : 'No more request expected')); + } + + /** + * @ngdoc method + * @name $httpBackend#when + * @description + * Creates a new backend definition. + * + * @param {string} method HTTP method. + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives + * data string and returns true if the data is as expected. + * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header + * object and returns true if the headers match the current definition. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + * + * - respond – + * ```js + * {function([status,] data[, headers, statusText]) + * | function(function(method, url, data, headers, params)} + * ``` + * – The respond method takes a set of static data to be returned or a function that can + * return an array containing response status (number), response data (Array|Object|string), + * response headers (Object), and the text for the status (string). The respond method returns + * the `requestHandler` object for possible overrides. + */ + $httpBackend.when = function(method, url, data, headers, keys) { + + assertArgDefined(arguments, 1, 'url'); + + var definition = new MockHttpExpectation(method, url, data, headers, keys), + chain = { + respond: function(status, data, headers, statusText) { + definition.passThrough = undefined; + definition.response = createResponse(status, data, headers, statusText); + return chain; + } + }; + + if ($browser) { + chain.passThrough = function() { + definition.response = undefined; + definition.passThrough = true; + return chain; + }; + } + + definitions.push(definition); + return chain; + }; + + /** + * @ngdoc method + * @name $httpBackend#whenGET + * @description + * Creates a new backend definition for GET requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {(Object|function(Object))=} headers HTTP headers. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#whenHEAD + * @description + * Creates a new backend definition for HEAD requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {(Object|function(Object))=} headers HTTP headers. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#whenDELETE + * @description + * Creates a new backend definition for DELETE requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {(Object|function(Object))=} headers HTTP headers. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#whenPOST + * @description + * Creates a new backend definition for POST requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives + * data string and returns true if the data is as expected. + * @param {(Object|function(Object))=} headers HTTP headers. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#whenPUT + * @description + * Creates a new backend definition for PUT requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives + * data string and returns true if the data is as expected. + * @param {(Object|function(Object))=} headers HTTP headers. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#whenJSONP + * @description + * Creates a new backend definition for JSONP requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + createShortMethods('when'); + + /** + * @ngdoc method + * @name $httpBackend#whenRoute + * @description + * Creates a new backend definition that compares only with the requested route. + * + * @param {string} method HTTP method. + * @param {string} url HTTP url string that supports colon param matching. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. See #when for more info. + */ + $httpBackend.whenRoute = function(method, url) { + var pathObj = parseRoute(url); + return $httpBackend.when(method, pathObj.regexp, undefined, undefined, pathObj.keys); + }; + + function parseRoute(url) { + var ret = { + regexp: url + }, + keys = ret.keys = []; + + if (!url || !angular.isString(url)) return ret; + + url = url + .replace(/([().])/g, '\\$1') + .replace(/(\/)?:(\w+)([?*])?/g, function(_, slash, key, option) { + var optional = option === '?' ? option : null; + var star = option === '*' ? option : null; + keys.push({ name: key, optional: !!optional }); + slash = slash || ''; + return '' + + (optional ? '' : slash) + + '(?:' + + (optional ? slash : '') + + (star && '(.+?)' || '([^/]+)') + + (optional || '') + + ')' + + (optional || ''); + }) + .replace(/([/$*])/g, '\\$1'); + + ret.regexp = new RegExp('^' + url, 'i'); + return ret; + } + + /** + * @ngdoc method + * @name $httpBackend#expect + * @description + * Creates a new request expectation. + * + * @param {string} method HTTP method. + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. + * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header + * object and returns true if the headers match the current expectation. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + * + * - respond – + * ``` + * { function([status,] data[, headers, statusText]) + * | function(function(method, url, data, headers, params)} + * ``` + * – The respond method takes a set of static data to be returned or a function that can + * return an array containing response status (number), response data (Array|Object|string), + * response headers (Object), and the text for the status (string). The respond method returns + * the `requestHandler` object for possible overrides. + */ + $httpBackend.expect = function(method, url, data, headers, keys) { + + assertArgDefined(arguments, 1, 'url'); + + var expectation = new MockHttpExpectation(method, url, data, headers, keys), + chain = { + respond: function(status, data, headers, statusText) { + expectation.response = createResponse(status, data, headers, statusText); + return chain; + } + }; + + expectations.push(expectation); + return chain; + }; + + /** + * @ngdoc method + * @name $httpBackend#expectGET + * @description + * Creates a new request expectation for GET requests. For more info see `expect()`. + * + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {Object=} headers HTTP headers. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. See #expect for more info. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectHEAD + * @description + * Creates a new request expectation for HEAD requests. For more info see `expect()`. + * + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {Object=} headers HTTP headers. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectDELETE + * @description + * Creates a new request expectation for DELETE requests. For more info see `expect()`. + * + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {Object=} headers HTTP headers. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectPOST + * @description + * Creates a new request expectation for POST requests. For more info see `expect()`. + * + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. + * @param {Object=} headers HTTP headers. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectPUT + * @description + * Creates a new request expectation for PUT requests. For more info see `expect()`. + * + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. + * @param {Object=} headers HTTP headers. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectPATCH + * @description + * Creates a new request expectation for PATCH requests. For more info see `expect()`. + * + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. + * @param {Object=} headers HTTP headers. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectJSONP + * @description + * Creates a new request expectation for JSONP requests. For more info see `expect()`. + * + * @param {string|RegExp|function(string)=} url HTTP url or function that receives an url + * and returns true if the url matches the current definition. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + createShortMethods('expect'); + + /** + * @ngdoc method + * @name $httpBackend#expectRoute + * @description + * Creates a new request expectation that compares only with the requested route. + * + * @param {string} method HTTP method. + * @param {string} url HTTP url string that supports colon param matching. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. See #expect for more info. + */ + $httpBackend.expectRoute = function(method, url) { + var pathObj = parseRoute(url); + return $httpBackend.expect(method, pathObj.regexp, undefined, undefined, pathObj.keys); + }; + + + /** + * @ngdoc method + * @name $httpBackend#flush + * @description + * Flushes pending requests using the trained responses. Requests are flushed in the order they + * were made, but it is also possible to skip one or more requests (for example to have them + * flushed later). This is useful for simulating scenarios where responses arrive from the server + * in any order. + * + * If there are no pending requests to flush when the method is called, an exception is thrown (as + * this is typically a sign of programming error). + * + * @param {number=} count - Number of responses to flush. If undefined/null, all pending requests + * (starting after `skip`) will be flushed. + * @param {number=} [skip=0] - Number of pending requests to skip. For example, a value of `5` + * would skip the first 5 pending requests and start flushing from the 6th onwards. + */ + $httpBackend.flush = function(count, skip, digest) { + if (digest !== false) $rootScope.$digest(); + + skip = skip || 0; + if (skip >= responses.length) throw new Error('No pending request to flush !'); + + if (angular.isDefined(count) && count !== null) { + while (count--) { + var part = responses.splice(skip, 1); + if (!part.length) throw new Error('No more pending request to flush !'); + part[0](); + } + } else { + while (responses.length > skip) { + responses.splice(skip, 1)[0](); + } + } + $httpBackend.verifyNoOutstandingExpectation(digest); + }; + + + /** + * @ngdoc method + * @name $httpBackend#verifyNoOutstandingExpectation + * @description + * Verifies that all of the requests defined via the `expect` api were made. If any of the + * requests were not made, verifyNoOutstandingExpectation throws an exception. + * + * Typically, you would call this method following each test case that asserts requests using an + * "afterEach" clause. + * + * ```js + * afterEach($httpBackend.verifyNoOutstandingExpectation); + * ``` + */ + $httpBackend.verifyNoOutstandingExpectation = function(digest) { + if (digest !== false) $rootScope.$digest(); + if (expectations.length) { + throw new Error('Unsatisfied requests: ' + expectations.join(', ')); + } + }; + + + /** + * @ngdoc method + * @name $httpBackend#verifyNoOutstandingRequest + * @description + * Verifies that there are no outstanding requests that need to be flushed. + * + * Typically, you would call this method following each test case that asserts requests using an + * "afterEach" clause. + * + * ```js + * afterEach($httpBackend.verifyNoOutstandingRequest); + * ``` + */ + $httpBackend.verifyNoOutstandingRequest = function(digest) { + if (digest !== false) $rootScope.$digest(); + if (responses.length) { + var unflushedDescriptions = responses.map(function(res) { return res.description; }); + throw new Error('Unflushed requests: ' + responses.length + '\n ' + + unflushedDescriptions.join('\n ')); + } + }; + + + /** + * @ngdoc method + * @name $httpBackend#resetExpectations + * @description + * Resets all request expectations, but preserves all backend definitions. Typically, you would + * call resetExpectations during a multiple-phase test when you want to reuse the same instance of + * $httpBackend mock. + */ + $httpBackend.resetExpectations = function() { + expectations.length = 0; + responses.length = 0; + }; + + $httpBackend.$$originalHttpBackend = originalHttpBackend; + + return $httpBackend; + + + function createShortMethods(prefix) { + angular.forEach(['GET', 'DELETE', 'JSONP', 'HEAD'], function(method) { + $httpBackend[prefix + method] = function(url, headers, keys) { + assertArgDefined(arguments, 0, 'url'); + + // Change url to `null` if `undefined` to stop it throwing an exception further down + if (angular.isUndefined(url)) url = null; + + return $httpBackend[prefix](method, url, undefined, headers, keys); + }; + }); + + angular.forEach(['PUT', 'POST', 'PATCH'], function(method) { + $httpBackend[prefix + method] = function(url, data, headers, keys) { + assertArgDefined(arguments, 0, 'url'); + + // Change url to `null` if `undefined` to stop it throwing an exception further down + if (angular.isUndefined(url)) url = null; + + return $httpBackend[prefix](method, url, data, headers, keys); + }; + }); + } +} + +function assertArgDefined(args, index, name) { + if (args.length > index && angular.isUndefined(args[index])) { + throw new Error('Undefined argument `' + name + '`; the argument is provided but not defined'); + } +} + + +function MockHttpExpectation(method, url, data, headers, keys) { + + function getUrlParams(u) { + var params = u.slice(u.indexOf('?') + 1).split('&'); + return params.sort(); + } + + function compareUrl(u) { + return (url.slice(0, url.indexOf('?')) === u.slice(0, u.indexOf('?')) && + getUrlParams(url).join() === getUrlParams(u).join()); + } + + this.data = data; + this.headers = headers; + + this.match = function(m, u, d, h) { + if (method !== m) return false; + if (!this.matchUrl(u)) return false; + if (angular.isDefined(d) && !this.matchData(d)) return false; + if (angular.isDefined(h) && !this.matchHeaders(h)) return false; + return true; + }; + + this.matchUrl = function(u) { + if (!url) return true; + if (angular.isFunction(url.test)) return url.test(u); + if (angular.isFunction(url)) return url(u); + return (url === u || compareUrl(u)); + }; + + this.matchHeaders = function(h) { + if (angular.isUndefined(headers)) return true; + if (angular.isFunction(headers)) return headers(h); + return angular.equals(headers, h); + }; + + this.matchData = function(d) { + if (angular.isUndefined(data)) return true; + if (data && angular.isFunction(data.test)) return data.test(d); + if (data && angular.isFunction(data)) return data(d); + if (data && !angular.isString(data)) { + return angular.equals(angular.fromJson(angular.toJson(data)), angular.fromJson(d)); + } + // eslint-disable-next-line eqeqeq + return data == d; + }; + + this.toString = function() { + return method + ' ' + url; + }; + + this.params = function(u) { + return angular.extend(parseQuery(), pathParams()); + + function pathParams() { + var keyObj = {}; + if (!url || !angular.isFunction(url.test) || !keys || keys.length === 0) return keyObj; + + var m = url.exec(u); + if (!m) return keyObj; + for (var i = 1, len = m.length; i < len; ++i) { + var key = keys[i - 1]; + var val = m[i]; + if (key && val) { + keyObj[key.name || key] = val; + } + } + + return keyObj; + } + + function parseQuery() { + var obj = {}, key_value, key, + queryStr = u.indexOf('?') > -1 + ? u.substring(u.indexOf('?') + 1) + : ''; + + angular.forEach(queryStr.split('&'), function(keyValue) { + if (keyValue) { + key_value = keyValue.replace(/\+/g,'%20').split('='); + key = tryDecodeURIComponent(key_value[0]); + if (angular.isDefined(key)) { + var val = angular.isDefined(key_value[1]) ? tryDecodeURIComponent(key_value[1]) : true; + if (!hasOwnProperty.call(obj, key)) { + obj[key] = val; + } else if (angular.isArray(obj[key])) { + obj[key].push(val); + } else { + obj[key] = [obj[key],val]; + } + } + } + }); + return obj; + } + function tryDecodeURIComponent(value) { + try { + return decodeURIComponent(value); + } catch (e) { + // Ignore any invalid uri component + } + } + }; +} + +function createMockXhr() { + return new MockXhr(); +} + +function MockXhr() { + + // hack for testing $http, $httpBackend + MockXhr.$$lastInstance = this; + + this.open = function(method, url, async) { + this.$$method = method; + this.$$url = url; + this.$$async = async; + this.$$reqHeaders = {}; + this.$$respHeaders = {}; + }; + + this.send = function(data) { + this.$$data = data; + }; + + this.setRequestHeader = function(key, value) { + this.$$reqHeaders[key] = value; + }; + + this.getResponseHeader = function(name) { + // the lookup must be case insensitive, + // that's why we try two quick lookups first and full scan last + var header = this.$$respHeaders[name]; + if (header) return header; + + name = angular.lowercase(name); + header = this.$$respHeaders[name]; + if (header) return header; + + header = undefined; + angular.forEach(this.$$respHeaders, function(headerVal, headerName) { + if (!header && angular.lowercase(headerName) === name) header = headerVal; + }); + return header; + }; + + this.getAllResponseHeaders = function() { + var lines = []; + + angular.forEach(this.$$respHeaders, function(value, key) { + lines.push(key + ': ' + value); + }); + return lines.join('\n'); + }; + + this.abort = angular.noop; + + // This section simulates the events on a real XHR object (and the upload object) + // When we are testing $httpBackend (inside the angular project) we make partial use of this + // but store the events directly ourselves on `$$events`, instead of going through the `addEventListener` + this.$$events = {}; + this.addEventListener = function(name, listener) { + if (angular.isUndefined(this.$$events[name])) this.$$events[name] = []; + this.$$events[name].push(listener); + }; + + this.upload = { + $$events: {}, + addEventListener: this.addEventListener + }; +} + + +/** + * @ngdoc service + * @name $timeout + * @description + * + * This service is just a simple decorator for {@link ng.$timeout $timeout} service + * that adds a "flush" and "verifyNoPendingTasks" methods. + */ + +angular.mock.$TimeoutDecorator = ['$delegate', '$browser', function($delegate, $browser) { + + /** + * @ngdoc method + * @name $timeout#flush + * @description + * + * Flushes the queue of pending tasks. + * + * @param {number=} delay maximum timeout amount to flush up until + */ + $delegate.flush = function(delay) { + $browser.defer.flush(delay); + }; + + /** + * @ngdoc method + * @name $timeout#verifyNoPendingTasks + * @description + * + * Verifies that there are no pending tasks that need to be flushed. + */ + $delegate.verifyNoPendingTasks = function() { + if ($browser.deferredFns.length) { + throw new Error('Deferred tasks to flush (' + $browser.deferredFns.length + '): ' + + formatPendingTasksAsString($browser.deferredFns)); + } + }; + + function formatPendingTasksAsString(tasks) { + var result = []; + angular.forEach(tasks, function(task) { + result.push('{id: ' + task.id + ', time: ' + task.time + '}'); + }); + + return result.join(', '); + } + + return $delegate; +}]; + +angular.mock.$RAFDecorator = ['$delegate', function($delegate) { + var rafFn = function(fn) { + var index = rafFn.queue.length; + rafFn.queue.push(fn); + return function() { + rafFn.queue.splice(index, 1); + }; + }; + + rafFn.queue = []; + rafFn.supported = $delegate.supported; + + rafFn.flush = function() { + if (rafFn.queue.length === 0) { + throw new Error('No rAF callbacks present'); + } + + var length = rafFn.queue.length; + for (var i = 0; i < length; i++) { + rafFn.queue[i](); + } + + rafFn.queue = rafFn.queue.slice(i); + }; + + return rafFn; +}]; + +/** + * + */ +var originalRootElement; +angular.mock.$RootElementProvider = function() { + this.$get = ['$injector', function($injector) { + originalRootElement = angular.element('
').data('$injector', $injector); + return originalRootElement; + }]; +}; + +/** + * @ngdoc service + * @name $controller + * @description + * A decorator for {@link ng.$controller} with additional `bindings` parameter, useful when testing + * controllers of directives that use {@link $compile#-bindtocontroller- `bindToController`}. + * + * Depending on the value of + * {@link ng.$compileProvider#preAssignBindingsEnabled `preAssignBindingsEnabled()`}, the properties + * will be bound before or after invoking the constructor. + * + * + * ## Example + * + * ```js + * + * // Directive definition ... + * + * myMod.directive('myDirective', { + * controller: 'MyDirectiveController', + * bindToController: { + * name: '@' + * } + * }); + * + * + * // Controller definition ... + * + * myMod.controller('MyDirectiveController', ['$log', function($log) { + * this.log = function() { + * $log.info(this.name); + * }; + * }]); + * + * + * // In a test ... + * + * describe('myDirectiveController', function() { + * describe('log()', function() { + * it('should write the bound name to the log', inject(function($controller, $log) { + * var ctrl = $controller('MyDirectiveController', { /* no locals */ }, { name: 'Clark Kent' }); + * ctrl.log(); + * + * expect(ctrl.name).toEqual('Clark Kent'); + * expect($log.info.logs).toEqual(['Clark Kent']); + * })); + * }); + * }); + * + * ``` + * + * @param {Function|string} constructor If called with a function then it's considered to be the + * controller constructor function. Otherwise it's considered to be a string which is used + * to retrieve the controller constructor using the following steps: + * + * * check if a controller with given name is registered via `$controllerProvider` + * * check if evaluating the string on the current scope returns a constructor + * * if $controllerProvider#allowGlobals, check `window[constructor]` on the global + * `window` object (deprecated, not recommended) + * + * The string can use the `controller as property` syntax, where the controller instance is published + * as the specified property on the `scope`; the `scope` must be injected into `locals` param for this + * to work correctly. + * + * @param {Object} locals Injection locals for Controller. + * @param {Object=} bindings Properties to add to the controller instance. This is used to simulate + * the `bindToController` feature and simplify certain kinds of tests. + * @return {Object} Instance of given controller. + */ +function createControllerDecorator(compileProvider) { + angular.mock.$ControllerDecorator = ['$delegate', function($delegate) { + return function(expression, locals, later, ident) { + if (later && typeof later === 'object') { + var preAssignBindingsEnabled = compileProvider.preAssignBindingsEnabled(); + + var instantiate = $delegate(expression, locals, true, ident); + if (preAssignBindingsEnabled) { + angular.extend(instantiate.instance, later); + } + + var instance = instantiate(); + if (!preAssignBindingsEnabled || instance !== instantiate.instance) { + angular.extend(instance, later); + } + + return instance; + } + return $delegate(expression, locals, later, ident); + }; + }]; + + return angular.mock.$ControllerDecorator; +} + +/** + * @ngdoc service + * @name $componentController + * @description + * A service that can be used to create instances of component controllers. Useful for unit-testing. + * + * Be aware that the controller will be instantiated and attached to the scope as specified in + * the component definition object. If you do not provide a `$scope` object in the `locals` param + * then the helper will create a new isolated scope as a child of `$rootScope`. + * + * If you are using `$element` or `$attrs` in the controller, make sure to provide them as `locals`. + * The `$element` must be a jqLite-wrapped DOM element, and `$attrs` should be an object that + * has all properties / functions that you are using in the controller. If this is getting too complex, + * you should compile the component instead and access the component's controller via the + * {@link angular.element#methods `controller`} function. + * + * See also the section on {@link guide/component#unit-testing-component-controllers unit-testing component controllers} + * in the guide. + * + * @param {string} componentName the name of the component whose controller we want to instantiate + * @param {Object} locals Injection locals for Controller. + * @param {Object=} bindings Properties to add to the controller before invoking the constructor. This is used + * to simulate the `bindToController` feature and simplify certain kinds of tests. + * @param {string=} ident Override the property name to use when attaching the controller to the scope. + * @return {Object} Instance of requested controller. + */ +angular.mock.$ComponentControllerProvider = ['$compileProvider', + function ComponentControllerProvider($compileProvider) { + this.$get = ['$controller','$injector', '$rootScope', function($controller, $injector, $rootScope) { + return function $componentController(componentName, locals, bindings, ident) { + // get all directives associated to the component name + var directives = $injector.get(componentName + 'Directive'); + // look for those directives that are components + var candidateDirectives = directives.filter(function(directiveInfo) { + // components have controller, controllerAs and restrict:'E' + return directiveInfo.controller && directiveInfo.controllerAs && directiveInfo.restrict === 'E'; + }); + // check if valid directives found + if (candidateDirectives.length === 0) { + throw new Error('No component found'); + } + if (candidateDirectives.length > 1) { + throw new Error('Too many components found'); + } + // get the info of the component + var directiveInfo = candidateDirectives[0]; + // create a scope if needed + locals = locals || {}; + locals.$scope = locals.$scope || $rootScope.$new(true); + return $controller(directiveInfo.controller, locals, bindings, ident || directiveInfo.controllerAs); + }; + }]; +}]; + + +/** + * @ngdoc module + * @name ngMock + * @packageName angular-mocks + * @description + * + * # ngMock + * + * The `ngMock` module provides support to inject and mock Angular services into unit tests. + * In addition, ngMock also extends various core ng services such that they can be + * inspected and controlled in a synchronous manner within test code. + * + * + *
+ * + * @installation + * + * First, download the file: + * * [Google CDN](https://developers.google.com/speed/libraries/devguide#angularjs) e.g. + * `"//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-mocks.js"` + * * [NPM](https://www.npmjs.com/) e.g. `npm install angular-mocks@X.Y.Z` + * * [Yarn](https://yarnpkg.com) e.g. `yarn add angular-mocks@X.Y.Z` + * * [Bower](http://bower.io) e.g. `bower install angular-mocks#X.Y.Z` + * * [code.angularjs.org](https://code.angularjs.org/) (discouraged for production use) e.g. + * `"//code.angularjs.org/X.Y.Z/angular-mocks.js"` + * + * where X.Y.Z is the AngularJS version you are running. + * + * Then, configure your test runner to load `angular-mocks.js` after `angular.js`. + * This example uses Karma: + * + * ``` + * config.set({ + * files: [ + * 'build/angular.js', // and other module files you need + * 'build/angular-mocks.js', + * '', + * '' + * ] + * }); + * ``` + * + * Including the `angular-mocks.js` file automatically adds the `ngMock` module, so your tests + * are ready to go! + */ +angular.module('ngMock', ['ng']).provider({ + $browser: angular.mock.$BrowserProvider, + $exceptionHandler: angular.mock.$ExceptionHandlerProvider, + $log: angular.mock.$LogProvider, + $interval: angular.mock.$IntervalProvider, + $rootElement: angular.mock.$RootElementProvider, + $componentController: angular.mock.$ComponentControllerProvider +}).config(['$provide', '$compileProvider', function($provide, $compileProvider) { + $provide.decorator('$timeout', angular.mock.$TimeoutDecorator); + $provide.decorator('$$rAF', angular.mock.$RAFDecorator); + $provide.decorator('$rootScope', angular.mock.$RootScopeDecorator); + $provide.decorator('$controller', createControllerDecorator($compileProvider)); + $provide.decorator('$httpBackend', angular.mock.$httpBackendDecorator); +}]).info({ angularVersion: '1.6.6' }); + +/** + * @ngdoc module + * @name ngMockE2E + * @module ngMockE2E + * @packageName angular-mocks + * @description + * + * The `ngMockE2E` is an angular module which contains mocks suitable for end-to-end testing. + * Currently there is only one mock present in this module - + * the {@link ngMockE2E.$httpBackend e2e $httpBackend} mock. + */ +angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) { + $provide.decorator('$httpBackend', angular.mock.e2e.$httpBackendDecorator); +}]).info({ angularVersion: '1.6.6' }); + +/** + * @ngdoc service + * @name $httpBackend + * @module ngMockE2E + * @description + * Fake HTTP backend implementation suitable for end-to-end testing or backend-less development of + * applications that use the {@link ng.$http $http service}. + * + *
+ * **Note**: For fake http backend implementation suitable for unit testing please see + * {@link ngMock.$httpBackend unit-testing $httpBackend mock}. + *
+ * + * This implementation can be used to respond with static or dynamic responses via the `when` api + * and its shortcuts (`whenGET`, `whenPOST`, etc) and optionally pass through requests to the + * real $httpBackend for specific requests (e.g. to interact with certain remote apis or to fetch + * templates from a webserver). + * + * As opposed to unit-testing, in an end-to-end testing scenario or in scenario when an application + * is being developed with the real backend api replaced with a mock, it is often desirable for + * certain category of requests to bypass the mock and issue a real http request (e.g. to fetch + * templates or static files from the webserver). To configure the backend with this behavior + * use the `passThrough` request handler of `when` instead of `respond`. + * + * Additionally, we don't want to manually have to flush mocked out requests like we do during unit + * testing. For this reason the e2e $httpBackend flushes mocked out requests + * automatically, closely simulating the behavior of the XMLHttpRequest object. + * + * To setup the application to run with this http backend, you have to create a module that depends + * on the `ngMockE2E` and your application modules and defines the fake backend: + * + * ```js + * var myAppDev = angular.module('myAppDev', ['myApp', 'ngMockE2E']); + * myAppDev.run(function($httpBackend) { + * var phones = [{name: 'phone1'}, {name: 'phone2'}]; + * + * // returns the current list of phones + * $httpBackend.whenGET('/phones').respond(phones); + * + * // adds a new phone to the phones array + * $httpBackend.whenPOST('/phones').respond(function(method, url, data) { + * var phone = angular.fromJson(data); + * phones.push(phone); + * return [200, phone, {}]; + * }); + * $httpBackend.whenGET(/^\/templates\//).passThrough(); // Requests for templates are handled by the real server + * //... + * }); + * ``` + * + * Afterwards, bootstrap your app with this new module. + * + * ## Example + * + * + * var myApp = angular.module('myApp', []); + * + * myApp.controller('MainCtrl', function MainCtrl($http) { + * var ctrl = this; + * + * ctrl.phones = []; + * ctrl.newPhone = { + * name: '' + * }; + * + * ctrl.getPhones = function() { + * $http.get('/phones').then(function(response) { + * ctrl.phones = response.data; + * }); + * }; + * + * ctrl.addPhone = function(phone) { + * $http.post('/phones', phone).then(function() { + * ctrl.newPhone = {name: ''}; + * return ctrl.getPhones(); + * }); + * }; + * + * ctrl.getPhones(); + * }); + * + * + * var myAppDev = angular.module('myAppE2E', ['myApp', 'ngMockE2E']); + * + * myAppDev.run(function($httpBackend) { + * var phones = [{name: 'phone1'}, {name: 'phone2'}]; + * + * // returns the current list of phones + * $httpBackend.whenGET('/phones').respond(phones); + * + * // adds a new phone to the phones array + * $httpBackend.whenPOST('/phones').respond(function(method, url, data) { + * var phone = angular.fromJson(data); + * phones.push(phone); + * return [200, phone, {}]; + * }); + * }); + * + * + *
+ *
+ * + * + *
+ *

Phones

+ *
    + *
  • {{phone.name}}
  • + *
+ *
+ *
+ *
+ * + * + */ + +/** + * @ngdoc method + * @name $httpBackend#when + * @module ngMockE2E + * @description + * Creates a new backend definition. + * + * @param {string} method HTTP method. + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives + * data string and returns true if the data is as expected. + * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header + * object and returns true if the headers match the current definition. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on + * {@link ngMock.$httpBackend $httpBackend mock}. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + * + * - respond – + * ``` + * { function([status,] data[, headers, statusText]) + * | function(function(method, url, data, headers, params)} + * ``` + * – The respond method takes a set of static data to be returned or a function that can return + * an array containing response status (number), response data (Array|Object|string), response + * headers (Object), and the text for the status (string). + * - passThrough – `{function()}` – Any request matching a backend definition with + * `passThrough` handler will be passed through to the real backend (an XHR request will be made + * to the server.) + * - Both methods return the `requestHandler` object for possible overrides. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenGET + * @module ngMockE2E + * @description + * Creates a new backend definition for GET requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {(Object|function(Object))=} headers HTTP headers. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on + * {@link ngMock.$httpBackend $httpBackend mock}. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenHEAD + * @module ngMockE2E + * @description + * Creates a new backend definition for HEAD requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {(Object|function(Object))=} headers HTTP headers. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on + * {@link ngMock.$httpBackend $httpBackend mock}. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenDELETE + * @module ngMockE2E + * @description + * Creates a new backend definition for DELETE requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {(Object|function(Object))=} headers HTTP headers. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on + * {@link ngMock.$httpBackend $httpBackend mock}. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenPOST + * @module ngMockE2E + * @description + * Creates a new backend definition for POST requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives + * data string and returns true if the data is as expected. + * @param {(Object|function(Object))=} headers HTTP headers. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on + * {@link ngMock.$httpBackend $httpBackend mock}. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenPUT + * @module ngMockE2E + * @description + * Creates a new backend definition for PUT requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives + * data string and returns true if the data is as expected. + * @param {(Object|function(Object))=} headers HTTP headers. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on + * {@link ngMock.$httpBackend $httpBackend mock}. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenPATCH + * @module ngMockE2E + * @description + * Creates a new backend definition for PATCH requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives + * data string and returns true if the data is as expected. + * @param {(Object|function(Object))=} headers HTTP headers. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on + * {@link ngMock.$httpBackend $httpBackend mock}. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenJSONP + * @module ngMockE2E + * @description + * Creates a new backend definition for JSONP requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url + * and returns true if the url matches the current definition. + * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on + * {@link ngMock.$httpBackend $httpBackend mock}. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ +/** + * @ngdoc method + * @name $httpBackend#whenRoute + * @module ngMockE2E + * @description + * Creates a new backend definition that compares only with the requested route. + * + * @param {string} method HTTP method. + * @param {string} url HTTP url string that supports colon param matching. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ +angular.mock.e2e = {}; +angular.mock.e2e.$httpBackendDecorator = + ['$rootScope', '$timeout', '$delegate', '$browser', createHttpBackendMock]; + + +/** + * @ngdoc type + * @name $rootScope.Scope + * @module ngMock + * @description + * {@link ng.$rootScope.Scope Scope} type decorated with helper methods useful for testing. These + * methods are automatically available on any {@link ng.$rootScope.Scope Scope} instance when + * `ngMock` module is loaded. + * + * In addition to all the regular `Scope` methods, the following helper methods are available: + */ +angular.mock.$RootScopeDecorator = ['$delegate', function($delegate) { + + var $rootScopePrototype = Object.getPrototypeOf($delegate); + + $rootScopePrototype.$countChildScopes = countChildScopes; + $rootScopePrototype.$countWatchers = countWatchers; + + return $delegate; + + // ------------------------------------------------------------------------------------------ // + + /** + * @ngdoc method + * @name $rootScope.Scope#$countChildScopes + * @module ngMock + * @this $rootScope.Scope + * @description + * Counts all the direct and indirect child scopes of the current scope. + * + * The current scope is excluded from the count. The count includes all isolate child scopes. + * + * @returns {number} Total number of child scopes. + */ + function countChildScopes() { + var count = 0; // exclude the current scope + var pendingChildHeads = [this.$$childHead]; + var currentScope; + + while (pendingChildHeads.length) { + currentScope = pendingChildHeads.shift(); + + while (currentScope) { + count += 1; + pendingChildHeads.push(currentScope.$$childHead); + currentScope = currentScope.$$nextSibling; + } + } + + return count; + } + + + /** + * @ngdoc method + * @name $rootScope.Scope#$countWatchers + * @this $rootScope.Scope + * @module ngMock + * @description + * Counts all the watchers of direct and indirect child scopes of the current scope. + * + * The watchers of the current scope are included in the count and so are all the watchers of + * isolate child scopes. + * + * @returns {number} Total number of watchers. + */ + function countWatchers() { + var count = this.$$watchers ? this.$$watchers.length : 0; // include the current scope + var pendingChildHeads = [this.$$childHead]; + var currentScope; + + while (pendingChildHeads.length) { + currentScope = pendingChildHeads.shift(); + + while (currentScope) { + count += currentScope.$$watchers ? currentScope.$$watchers.length : 0; + pendingChildHeads.push(currentScope.$$childHead); + currentScope = currentScope.$$nextSibling; + } + } + + return count; + } +}]; + + +(function(jasmineOrMocha) { + + if (!jasmineOrMocha) { + return; + } + + var currentSpec = null, + injectorState = new InjectorState(), + annotatedFunctions = [], + wasInjectorCreated = function() { + return !!currentSpec; + }; + + angular.mock.$$annotate = angular.injector.$$annotate; + angular.injector.$$annotate = function(fn) { + if (typeof fn === 'function' && !fn.$inject) { + annotatedFunctions.push(fn); + } + return angular.mock.$$annotate.apply(this, arguments); + }; + + /** + * @ngdoc function + * @name angular.mock.module + * @description + * + * *NOTE*: This function is also published on window for easy access.
+ * *NOTE*: This function is declared ONLY WHEN running tests with jasmine or mocha + * + * This function registers a module configuration code. It collects the configuration information + * which will be used when the injector is created by {@link angular.mock.inject inject}. + * + * See {@link angular.mock.inject inject} for usage example + * + * @param {...(string|Function|Object)} fns any number of modules which are represented as string + * aliases or as anonymous module initialization functions. The modules are used to + * configure the injector. The 'ng' and 'ngMock' modules are automatically loaded. If an + * object literal is passed each key-value pair will be registered on the module via + * {@link auto.$provide $provide}.value, the key being the string name (or token) to associate + * with the value on the injector. + */ + var module = window.module = angular.mock.module = function() { + var moduleFns = Array.prototype.slice.call(arguments, 0); + return wasInjectorCreated() ? workFn() : workFn; + ///////////////////// + function workFn() { + if (currentSpec.$injector) { + throw new Error('Injector already created, can not register a module!'); + } else { + var fn, modules = currentSpec.$modules || (currentSpec.$modules = []); + angular.forEach(moduleFns, function(module) { + if (angular.isObject(module) && !angular.isArray(module)) { + fn = ['$provide', function($provide) { + angular.forEach(module, function(value, key) { + $provide.value(key, value); + }); + }]; + } else { + fn = module; + } + if (currentSpec.$providerInjector) { + currentSpec.$providerInjector.invoke(fn); + } else { + modules.push(fn); + } + }); + } + } + }; + + module.$$beforeAllHook = (window.before || window.beforeAll); + module.$$afterAllHook = (window.after || window.afterAll); + + // purely for testing ngMock itself + module.$$currentSpec = function(to) { + if (arguments.length === 0) return to; + currentSpec = to; + }; + + /** + * @ngdoc function + * @name angular.mock.module.sharedInjector + * @description + * + * *NOTE*: This function is declared ONLY WHEN running tests with jasmine or mocha + * + * This function ensures a single injector will be used for all tests in a given describe context. + * This contrasts with the default behaviour where a new injector is created per test case. + * + * Use sharedInjector when you want to take advantage of Jasmine's `beforeAll()`, or mocha's + * `before()` methods. Call `module.sharedInjector()` before you setup any other hooks that + * will create (i.e call `module()`) or use (i.e call `inject()`) the injector. + * + * You cannot call `sharedInjector()` from within a context already using `sharedInjector()`. + * + * ## Example + * + * Typically beforeAll is used to make many assertions about a single operation. This can + * cut down test run-time as the test setup doesn't need to be re-run, and enabling focussed + * tests each with a single assertion. + * + * ```js + * describe("Deep Thought", function() { + * + * module.sharedInjector(); + * + * beforeAll(module("UltimateQuestion")); + * + * beforeAll(inject(function(DeepThought) { + * expect(DeepThought.answer).toBeUndefined(); + * DeepThought.generateAnswer(); + * })); + * + * it("has calculated the answer correctly", inject(function(DeepThought) { + * // Because of sharedInjector, we have access to the instance of the DeepThought service + * // that was provided to the beforeAll() hook. Therefore we can test the generated answer + * expect(DeepThought.answer).toBe(42); + * })); + * + * it("has calculated the answer within the expected time", inject(function(DeepThought) { + * expect(DeepThought.runTimeMillennia).toBeLessThan(8000); + * })); + * + * it("has double checked the answer", inject(function(DeepThought) { + * expect(DeepThought.absolutelySureItIsTheRightAnswer).toBe(true); + * })); + * + * }); + * + * ``` + */ + module.sharedInjector = function() { + if (!(module.$$beforeAllHook && module.$$afterAllHook)) { + throw Error('sharedInjector() cannot be used unless your test runner defines beforeAll/afterAll'); + } + + var initialized = false; + + module.$$beforeAllHook(/** @this */ function() { + if (injectorState.shared) { + injectorState.sharedError = Error('sharedInjector() cannot be called inside a context that has already called sharedInjector()'); + throw injectorState.sharedError; + } + initialized = true; + currentSpec = this; + injectorState.shared = true; + }); + + module.$$afterAllHook(function() { + if (initialized) { + injectorState = new InjectorState(); + module.$$cleanup(); + } else { + injectorState.sharedError = null; + } + }); + }; + + module.$$beforeEach = function() { + if (injectorState.shared && currentSpec && currentSpec !== this) { + var state = currentSpec; + currentSpec = this; + angular.forEach(['$injector','$modules','$providerInjector', '$injectorStrict'], function(k) { + currentSpec[k] = state[k]; + state[k] = null; + }); + } else { + currentSpec = this; + originalRootElement = null; + annotatedFunctions = []; + } + }; + + module.$$afterEach = function() { + if (injectorState.cleanupAfterEach()) { + module.$$cleanup(); + } + }; + + module.$$cleanup = function() { + var injector = currentSpec.$injector; + + annotatedFunctions.forEach(function(fn) { + delete fn.$inject; + }); + + currentSpec.$injector = null; + currentSpec.$modules = null; + currentSpec.$providerInjector = null; + currentSpec = null; + + if (injector) { + // Ensure `$rootElement` is instantiated, before checking `originalRootElement` + var $rootElement = injector.get('$rootElement'); + var rootNode = $rootElement && $rootElement[0]; + var cleanUpNodes = !originalRootElement ? [] : [originalRootElement[0]]; + if (rootNode && (!originalRootElement || rootNode !== originalRootElement[0])) { + cleanUpNodes.push(rootNode); + } + angular.element.cleanData(cleanUpNodes); + + // Ensure `$destroy()` is available, before calling it + // (a mocked `$rootScope` might not implement it (or not even be an object at all)) + var $rootScope = injector.get('$rootScope'); + if ($rootScope && $rootScope.$destroy) $rootScope.$destroy(); + } + + // clean up jquery's fragment cache + angular.forEach(angular.element.fragments, function(val, key) { + delete angular.element.fragments[key]; + }); + + MockXhr.$$lastInstance = null; + + angular.forEach(angular.callbacks, function(val, key) { + delete angular.callbacks[key]; + }); + angular.callbacks.$$counter = 0; + }; + + (window.beforeEach || window.setup)(module.$$beforeEach); + (window.afterEach || window.teardown)(module.$$afterEach); + + /** + * @ngdoc function + * @name angular.mock.inject + * @description + * + * *NOTE*: This function is also published on window for easy access.
+ * *NOTE*: This function is declared ONLY WHEN running tests with jasmine or mocha + * + * The inject function wraps a function into an injectable function. The inject() creates new + * instance of {@link auto.$injector $injector} per test, which is then used for + * resolving references. + * + * + * ## Resolving References (Underscore Wrapping) + * Often, we would like to inject a reference once, in a `beforeEach()` block and reuse this + * in multiple `it()` clauses. To be able to do this we must assign the reference to a variable + * that is declared in the scope of the `describe()` block. Since we would, most likely, want + * the variable to have the same name of the reference we have a problem, since the parameter + * to the `inject()` function would hide the outer variable. + * + * To help with this, the injected parameters can, optionally, be enclosed with underscores. + * These are ignored by the injector when the reference name is resolved. + * + * For example, the parameter `_myService_` would be resolved as the reference `myService`. + * Since it is available in the function body as `_myService_`, we can then assign it to a variable + * defined in an outer scope. + * + * ``` + * // Defined out reference variable outside + * var myService; + * + * // Wrap the parameter in underscores + * beforeEach( inject( function(_myService_){ + * myService = _myService_; + * })); + * + * // Use myService in a series of tests. + * it('makes use of myService', function() { + * myService.doStuff(); + * }); + * + * ``` + * + * See also {@link angular.mock.module angular.mock.module} + * + * ## Example + * Example of what a typical jasmine tests looks like with the inject method. + * ```js + * + * angular.module('myApplicationModule', []) + * .value('mode', 'app') + * .value('version', 'v1.0.1'); + * + * + * describe('MyApp', function() { + * + * // You need to load modules that you want to test, + * // it loads only the "ng" module by default. + * beforeEach(module('myApplicationModule')); + * + * + * // inject() is used to inject arguments of all given functions + * it('should provide a version', inject(function(mode, version) { + * expect(version).toEqual('v1.0.1'); + * expect(mode).toEqual('app'); + * })); + * + * + * // The inject and module method can also be used inside of the it or beforeEach + * it('should override a version and test the new version is injected', function() { + * // module() takes functions or strings (module aliases) + * module(function($provide) { + * $provide.value('version', 'overridden'); // override version here + * }); + * + * inject(function(version) { + * expect(version).toEqual('overridden'); + * }); + * }); + * }); + * + * ``` + * + * @param {...Function} fns any number of functions which will be injected using the injector. + */ + + + + var ErrorAddingDeclarationLocationStack = function ErrorAddingDeclarationLocationStack(e, errorForStack) { + this.message = e.message; + this.name = e.name; + if (e.line) this.line = e.line; + if (e.sourceId) this.sourceId = e.sourceId; + if (e.stack && errorForStack) + this.stack = e.stack + '\n' + errorForStack.stack; + if (e.stackArray) this.stackArray = e.stackArray; + }; + ErrorAddingDeclarationLocationStack.prototype = Error.prototype; + + window.inject = angular.mock.inject = function() { + var blockFns = Array.prototype.slice.call(arguments, 0); + var errorForStack = new Error('Declaration Location'); + // IE10+ and PhanthomJS do not set stack trace information, until the error is thrown + if (!errorForStack.stack) { + try { + throw errorForStack; + } catch (e) { /* empty */ } + } + return wasInjectorCreated() ? WorkFn.call(currentSpec) : WorkFn; + ///////////////////// + function WorkFn() { + var modules = currentSpec.$modules || []; + var strictDi = !!currentSpec.$injectorStrict; + modules.unshift(['$injector', function($injector) { + currentSpec.$providerInjector = $injector; + }]); + modules.unshift('ngMock'); + modules.unshift('ng'); + var injector = currentSpec.$injector; + if (!injector) { + if (strictDi) { + // If strictDi is enabled, annotate the providerInjector blocks + angular.forEach(modules, function(moduleFn) { + if (typeof moduleFn === 'function') { + angular.injector.$$annotate(moduleFn); + } + }); + } + injector = currentSpec.$injector = angular.injector(modules, strictDi); + currentSpec.$injectorStrict = strictDi; + } + for (var i = 0, ii = blockFns.length; i < ii; i++) { + if (currentSpec.$injectorStrict) { + // If the injector is strict / strictDi, and the spec wants to inject using automatic + // annotation, then annotate the function here. + injector.annotate(blockFns[i]); + } + try { + injector.invoke(blockFns[i] || angular.noop, this); + } catch (e) { + if (e.stack && errorForStack) { + throw new ErrorAddingDeclarationLocationStack(e, errorForStack); + } + throw e; + } finally { + errorForStack = null; + } + } + } + }; + + + angular.mock.inject.strictDi = function(value) { + value = arguments.length ? !!value : true; + return wasInjectorCreated() ? workFn() : workFn; + + function workFn() { + if (value !== currentSpec.$injectorStrict) { + if (currentSpec.$injector) { + throw new Error('Injector already created, can not modify strict annotations'); + } else { + currentSpec.$injectorStrict = value; + } + } + } + }; + + function InjectorState() { + this.shared = false; + this.sharedError = null; + + this.cleanupAfterEach = function() { + return !this.shared || this.sharedError; + }; + } +})(window.jasmine || window.mocha); + +'use strict'; + +(function() { + /** + * Triggers a browser event. Attempts to choose the right event if one is + * not specified. + * + * @param {Object} element Either a wrapped jQuery/jqLite node or a DOMElement + * @param {string} eventType Optional event type + * @param {Object=} eventData An optional object which contains additional event data (such as x,y + * coordinates, keys, etc...) that are passed into the event when triggered + */ + window.browserTrigger = function browserTrigger(element, eventType, eventData) { + if (element && !element.nodeName) element = element[0]; + if (!element) return; + + eventData = eventData || {}; + var relatedTarget = eventData.relatedTarget || element; + var keys = eventData.keys; + var x = eventData.x; + var y = eventData.y; + + var inputType = (element.type) ? element.type.toLowerCase() : null, + nodeName = element.nodeName.toLowerCase(); + if (!eventType) { + eventType = { + 'text': 'change', + 'textarea': 'change', + 'hidden': 'change', + 'password': 'change', + 'button': 'click', + 'submit': 'click', + 'reset': 'click', + 'image': 'click', + 'checkbox': 'click', + 'radio': 'click', + 'select-one': 'change', + 'select-multiple': 'change', + '_default_': 'click' + }[inputType || '_default_']; + } + + if (nodeName === 'option') { + element.parentNode.value = element.value; + element = element.parentNode; + eventType = 'change'; + } + + keys = keys || []; + function pressed(key) { + return keys.indexOf(key) !== -1; + } + + var evnt; + if (/transitionend/.test(eventType)) { + if (window.WebKitTransitionEvent) { + evnt = new window.WebKitTransitionEvent(eventType, eventData); + evnt.initEvent(eventType, false, true); + } else { + try { + evnt = new window.TransitionEvent(eventType, eventData); + } catch (e) { + evnt = window.document.createEvent('TransitionEvent'); + evnt.initTransitionEvent(eventType, null, null, null, eventData.elapsedTime || 0); + } + } + } else if (/animationend/.test(eventType)) { + if (window.WebKitAnimationEvent) { + evnt = new window.WebKitAnimationEvent(eventType, eventData); + evnt.initEvent(eventType, false, true); + } else { + try { + evnt = new window.AnimationEvent(eventType, eventData); + } catch (e) { + evnt = window.document.createEvent('AnimationEvent'); + evnt.initAnimationEvent(eventType, null, null, null, eventData.elapsedTime || 0); + } + } + } else if (/touch/.test(eventType) && supportsTouchEvents()) { + evnt = createTouchEvent(element, eventType, x, y); + } else if (/key/.test(eventType)) { + evnt = window.document.createEvent('Events'); + evnt.initEvent(eventType, eventData.bubbles, eventData.cancelable); + evnt.view = window; + evnt.ctrlKey = pressed('ctrl'); + evnt.altKey = pressed('alt'); + evnt.shiftKey = pressed('shift'); + evnt.metaKey = pressed('meta'); + evnt.keyCode = eventData.keyCode; + evnt.charCode = eventData.charCode; + evnt.which = eventData.which; + } else { + evnt = window.document.createEvent('MouseEvents'); + x = x || 0; + y = y || 0; + evnt.initMouseEvent(eventType, true, true, window, 0, x, y, x, y, pressed('ctrl'), + pressed('alt'), pressed('shift'), pressed('meta'), 0, relatedTarget); + } + + /* we're unable to change the timeStamp value directly so this + * is only here to allow for testing where the timeStamp value is + * read */ + evnt.$manualTimeStamp = eventData.timeStamp; + + if (!evnt) return; + + var originalPreventDefault = evnt.preventDefault, + appWindow = element.ownerDocument.defaultView, + fakeProcessDefault = true, + finalProcessDefault, + angular = appWindow.angular || {}; + + // igor: temporary fix for https://bugzilla.mozilla.org/show_bug.cgi?id=684208 + angular['ff-684208-preventDefault'] = false; + evnt.preventDefault = function() { + fakeProcessDefault = false; + return originalPreventDefault.apply(evnt, arguments); + }; + + if (!eventData.bubbles || supportsEventBubblingInDetachedTree() || isAttachedToDocument(element)) { + element.dispatchEvent(evnt); + } else { + triggerForPath(element, evnt); + } + + finalProcessDefault = !(angular['ff-684208-preventDefault'] || !fakeProcessDefault); + + delete angular['ff-684208-preventDefault']; + + return finalProcessDefault; + }; + + function supportsTouchEvents() { + if ('_cached' in supportsTouchEvents) { + return supportsTouchEvents._cached; + } + if (!window.document.createTouch || !window.document.createTouchList) { + supportsTouchEvents._cached = false; + return false; + } + try { + window.document.createEvent('TouchEvent'); + } catch (e) { + supportsTouchEvents._cached = false; + return false; + } + supportsTouchEvents._cached = true; + return true; + } + + function createTouchEvent(element, eventType, x, y) { + var evnt = new window.Event(eventType); + x = x || 0; + y = y || 0; + + var touch = window.document.createTouch(window, element, Date.now(), x, y, x, y); + var touches = window.document.createTouchList(touch); + + evnt.touches = touches; + + return evnt; + } + + function supportsEventBubblingInDetachedTree() { + if ('_cached' in supportsEventBubblingInDetachedTree) { + return supportsEventBubblingInDetachedTree._cached; + } + supportsEventBubblingInDetachedTree._cached = false; + var doc = window.document; + if (doc) { + var parent = doc.createElement('div'), + child = parent.cloneNode(); + parent.appendChild(child); + parent.addEventListener('e', function() { + supportsEventBubblingInDetachedTree._cached = true; + }); + var evnt = window.document.createEvent('Events'); + evnt.initEvent('e', true, true); + child.dispatchEvent(evnt); + } + return supportsEventBubblingInDetachedTree._cached; + } + + function triggerForPath(element, evnt) { + var stop = false; + + var _stopPropagation = evnt.stopPropagation; + evnt.stopPropagation = function() { + stop = true; + _stopPropagation.apply(evnt, arguments); + }; + patchEventTargetForBubbling(evnt, element); + do { + element.dispatchEvent(evnt); + // eslint-disable-next-line no-unmodified-loop-condition + } while (!stop && (element = element.parentNode)); + } + + function patchEventTargetForBubbling(event, target) { + event._target = target; + Object.defineProperty(event, 'target', {get: function() { return this._target;}}); + } + + function isAttachedToDocument(element) { + while ((element = element.parentNode)) { + if (element === window) { + return true; + } + } + return false; + } +})(); + + +})(window, window.angular); diff --git a/1.6.6/angular-parse-ext.js b/1.6.6/angular-parse-ext.js new file mode 100644 index 000000000..756ed2949 --- /dev/null +++ b/1.6.6/angular-parse-ext.js @@ -0,0 +1,1274 @@ +/** + * @license AngularJS v1.6.6 + * (c) 2010-2017 Google, Inc. http://angularjs.org + * License: MIT + */ +(function(window, angular) {'use strict'; + +/****************************************************** + * Generated file, do not modify * + * * + *****************************************************/ + +function IDS_Y(cp) { + if (0x0041 <= cp && cp <= 0x005A) return true; + if (0x0061 <= cp && cp <= 0x007A) return true; + if (cp === 0x00AA) return true; + if (cp === 0x00B5) return true; + if (cp === 0x00BA) return true; + if (0x00C0 <= cp && cp <= 0x00D6) return true; + if (0x00D8 <= cp && cp <= 0x00F6) return true; + if (0x00F8 <= cp && cp <= 0x02C1) return true; + if (0x02C6 <= cp && cp <= 0x02D1) return true; + if (0x02E0 <= cp && cp <= 0x02E4) return true; + if (cp === 0x02EC) return true; + if (cp === 0x02EE) return true; + if (0x0370 <= cp && cp <= 0x0374) return true; + if (0x0376 <= cp && cp <= 0x0377) return true; + if (0x037A <= cp && cp <= 0x037D) return true; + if (cp === 0x037F) return true; + if (cp === 0x0386) return true; + if (0x0388 <= cp && cp <= 0x038A) return true; + if (cp === 0x038C) return true; + if (0x038E <= cp && cp <= 0x03A1) return true; + if (0x03A3 <= cp && cp <= 0x03F5) return true; + if (0x03F7 <= cp && cp <= 0x0481) return true; + if (0x048A <= cp && cp <= 0x052F) return true; + if (0x0531 <= cp && cp <= 0x0556) return true; + if (cp === 0x0559) return true; + if (0x0561 <= cp && cp <= 0x0587) return true; + if (0x05D0 <= cp && cp <= 0x05EA) return true; + if (0x05F0 <= cp && cp <= 0x05F2) return true; + if (0x0620 <= cp && cp <= 0x064A) return true; + if (0x066E <= cp && cp <= 0x066F) return true; + if (0x0671 <= cp && cp <= 0x06D3) return true; + if (cp === 0x06D5) return true; + if (0x06E5 <= cp && cp <= 0x06E6) return true; + if (0x06EE <= cp && cp <= 0x06EF) return true; + if (0x06FA <= cp && cp <= 0x06FC) return true; + if (cp === 0x06FF) return true; + if (cp === 0x0710) return true; + if (0x0712 <= cp && cp <= 0x072F) return true; + if (0x074D <= cp && cp <= 0x07A5) return true; + if (cp === 0x07B1) return true; + if (0x07CA <= cp && cp <= 0x07EA) return true; + if (0x07F4 <= cp && cp <= 0x07F5) return true; + if (cp === 0x07FA) return true; + if (0x0800 <= cp && cp <= 0x0815) return true; + if (cp === 0x081A) return true; + if (cp === 0x0824) return true; + if (cp === 0x0828) return true; + if (0x0840 <= cp && cp <= 0x0858) return true; + if (0x08A0 <= cp && cp <= 0x08B4) return true; + if (0x0904 <= cp && cp <= 0x0939) return true; + if (cp === 0x093D) return true; + if (cp === 0x0950) return true; + if (0x0958 <= cp && cp <= 0x0961) return true; + if (0x0971 <= cp && cp <= 0x0980) return true; + if (0x0985 <= cp && cp <= 0x098C) return true; + if (0x098F <= cp && cp <= 0x0990) return true; + if (0x0993 <= cp && cp <= 0x09A8) return true; + if (0x09AA <= cp && cp <= 0x09B0) return true; + if (cp === 0x09B2) return true; + if (0x09B6 <= cp && cp <= 0x09B9) return true; + if (cp === 0x09BD) return true; + if (cp === 0x09CE) return true; + if (0x09DC <= cp && cp <= 0x09DD) return true; + if (0x09DF <= cp && cp <= 0x09E1) return true; + if (0x09F0 <= cp && cp <= 0x09F1) return true; + if (0x0A05 <= cp && cp <= 0x0A0A) return true; + if (0x0A0F <= cp && cp <= 0x0A10) return true; + if (0x0A13 <= cp && cp <= 0x0A28) return true; + if (0x0A2A <= cp && cp <= 0x0A30) return true; + if (0x0A32 <= cp && cp <= 0x0A33) return true; + if (0x0A35 <= cp && cp <= 0x0A36) return true; + if (0x0A38 <= cp && cp <= 0x0A39) return true; + if (0x0A59 <= cp && cp <= 0x0A5C) return true; + if (cp === 0x0A5E) return true; + if (0x0A72 <= cp && cp <= 0x0A74) return true; + if (0x0A85 <= cp && cp <= 0x0A8D) return true; + if (0x0A8F <= cp && cp <= 0x0A91) return true; + if (0x0A93 <= cp && cp <= 0x0AA8) return true; + if (0x0AAA <= cp && cp <= 0x0AB0) return true; + if (0x0AB2 <= cp && cp <= 0x0AB3) return true; + if (0x0AB5 <= cp && cp <= 0x0AB9) return true; + if (cp === 0x0ABD) return true; + if (cp === 0x0AD0) return true; + if (0x0AE0 <= cp && cp <= 0x0AE1) return true; + if (cp === 0x0AF9) return true; + if (0x0B05 <= cp && cp <= 0x0B0C) return true; + if (0x0B0F <= cp && cp <= 0x0B10) return true; + if (0x0B13 <= cp && cp <= 0x0B28) return true; + if (0x0B2A <= cp && cp <= 0x0B30) return true; + if (0x0B32 <= cp && cp <= 0x0B33) return true; + if (0x0B35 <= cp && cp <= 0x0B39) return true; + if (cp === 0x0B3D) return true; + if (0x0B5C <= cp && cp <= 0x0B5D) return true; + if (0x0B5F <= cp && cp <= 0x0B61) return true; + if (cp === 0x0B71) return true; + if (cp === 0x0B83) return true; + if (0x0B85 <= cp && cp <= 0x0B8A) return true; + if (0x0B8E <= cp && cp <= 0x0B90) return true; + if (0x0B92 <= cp && cp <= 0x0B95) return true; + if (0x0B99 <= cp && cp <= 0x0B9A) return true; + if (cp === 0x0B9C) return true; + if (0x0B9E <= cp && cp <= 0x0B9F) return true; + if (0x0BA3 <= cp && cp <= 0x0BA4) return true; + if (0x0BA8 <= cp && cp <= 0x0BAA) return true; + if (0x0BAE <= cp && cp <= 0x0BB9) return true; + if (cp === 0x0BD0) return true; + if (0x0C05 <= cp && cp <= 0x0C0C) return true; + if (0x0C0E <= cp && cp <= 0x0C10) return true; + if (0x0C12 <= cp && cp <= 0x0C28) return true; + if (0x0C2A <= cp && cp <= 0x0C39) return true; + if (cp === 0x0C3D) return true; + if (0x0C58 <= cp && cp <= 0x0C5A) return true; + if (0x0C60 <= cp && cp <= 0x0C61) return true; + if (0x0C85 <= cp && cp <= 0x0C8C) return true; + if (0x0C8E <= cp && cp <= 0x0C90) return true; + if (0x0C92 <= cp && cp <= 0x0CA8) return true; + if (0x0CAA <= cp && cp <= 0x0CB3) return true; + if (0x0CB5 <= cp && cp <= 0x0CB9) return true; + if (cp === 0x0CBD) return true; + if (cp === 0x0CDE) return true; + if (0x0CE0 <= cp && cp <= 0x0CE1) return true; + if (0x0CF1 <= cp && cp <= 0x0CF2) return true; + if (0x0D05 <= cp && cp <= 0x0D0C) return true; + if (0x0D0E <= cp && cp <= 0x0D10) return true; + if (0x0D12 <= cp && cp <= 0x0D3A) return true; + if (cp === 0x0D3D) return true; + if (cp === 0x0D4E) return true; + if (0x0D5F <= cp && cp <= 0x0D61) return true; + if (0x0D7A <= cp && cp <= 0x0D7F) return true; + if (0x0D85 <= cp && cp <= 0x0D96) return true; + if (0x0D9A <= cp && cp <= 0x0DB1) return true; + if (0x0DB3 <= cp && cp <= 0x0DBB) return true; + if (cp === 0x0DBD) return true; + if (0x0DC0 <= cp && cp <= 0x0DC6) return true; + if (0x0E01 <= cp && cp <= 0x0E30) return true; + if (0x0E32 <= cp && cp <= 0x0E33) return true; + if (0x0E40 <= cp && cp <= 0x0E46) return true; + if (0x0E81 <= cp && cp <= 0x0E82) return true; + if (cp === 0x0E84) return true; + if (0x0E87 <= cp && cp <= 0x0E88) return true; + if (cp === 0x0E8A) return true; + if (cp === 0x0E8D) return true; + if (0x0E94 <= cp && cp <= 0x0E97) return true; + if (0x0E99 <= cp && cp <= 0x0E9F) return true; + if (0x0EA1 <= cp && cp <= 0x0EA3) return true; + if (cp === 0x0EA5) return true; + if (cp === 0x0EA7) return true; + if (0x0EAA <= cp && cp <= 0x0EAB) return true; + if (0x0EAD <= cp && cp <= 0x0EB0) return true; + if (0x0EB2 <= cp && cp <= 0x0EB3) return true; + if (cp === 0x0EBD) return true; + if (0x0EC0 <= cp && cp <= 0x0EC4) return true; + if (cp === 0x0EC6) return true; + if (0x0EDC <= cp && cp <= 0x0EDF) return true; + if (cp === 0x0F00) return true; + if (0x0F40 <= cp && cp <= 0x0F47) return true; + if (0x0F49 <= cp && cp <= 0x0F6C) return true; + if (0x0F88 <= cp && cp <= 0x0F8C) return true; + if (0x1000 <= cp && cp <= 0x102A) return true; + if (cp === 0x103F) return true; + if (0x1050 <= cp && cp <= 0x1055) return true; + if (0x105A <= cp && cp <= 0x105D) return true; + if (cp === 0x1061) return true; + if (0x1065 <= cp && cp <= 0x1066) return true; + if (0x106E <= cp && cp <= 0x1070) return true; + if (0x1075 <= cp && cp <= 0x1081) return true; + if (cp === 0x108E) return true; + if (0x10A0 <= cp && cp <= 0x10C5) return true; + if (cp === 0x10C7) return true; + if (cp === 0x10CD) return true; + if (0x10D0 <= cp && cp <= 0x10FA) return true; + if (0x10FC <= cp && cp <= 0x1248) return true; + if (0x124A <= cp && cp <= 0x124D) return true; + if (0x1250 <= cp && cp <= 0x1256) return true; + if (cp === 0x1258) return true; + if (0x125A <= cp && cp <= 0x125D) return true; + if (0x1260 <= cp && cp <= 0x1288) return true; + if (0x128A <= cp && cp <= 0x128D) return true; + if (0x1290 <= cp && cp <= 0x12B0) return true; + if (0x12B2 <= cp && cp <= 0x12B5) return true; + if (0x12B8 <= cp && cp <= 0x12BE) return true; + if (cp === 0x12C0) return true; + if (0x12C2 <= cp && cp <= 0x12C5) return true; + if (0x12C8 <= cp && cp <= 0x12D6) return true; + if (0x12D8 <= cp && cp <= 0x1310) return true; + if (0x1312 <= cp && cp <= 0x1315) return true; + if (0x1318 <= cp && cp <= 0x135A) return true; + if (0x1380 <= cp && cp <= 0x138F) return true; + if (0x13A0 <= cp && cp <= 0x13F5) return true; + if (0x13F8 <= cp && cp <= 0x13FD) return true; + if (0x1401 <= cp && cp <= 0x166C) return true; + if (0x166F <= cp && cp <= 0x167F) return true; + if (0x1681 <= cp && cp <= 0x169A) return true; + if (0x16A0 <= cp && cp <= 0x16EA) return true; + if (0x16EE <= cp && cp <= 0x16F8) return true; + if (0x1700 <= cp && cp <= 0x170C) return true; + if (0x170E <= cp && cp <= 0x1711) return true; + if (0x1720 <= cp && cp <= 0x1731) return true; + if (0x1740 <= cp && cp <= 0x1751) return true; + if (0x1760 <= cp && cp <= 0x176C) return true; + if (0x176E <= cp && cp <= 0x1770) return true; + if (0x1780 <= cp && cp <= 0x17B3) return true; + if (cp === 0x17D7) return true; + if (cp === 0x17DC) return true; + if (0x1820 <= cp && cp <= 0x1877) return true; + if (0x1880 <= cp && cp <= 0x18A8) return true; + if (cp === 0x18AA) return true; + if (0x18B0 <= cp && cp <= 0x18F5) return true; + if (0x1900 <= cp && cp <= 0x191E) return true; + if (0x1950 <= cp && cp <= 0x196D) return true; + if (0x1970 <= cp && cp <= 0x1974) return true; + if (0x1980 <= cp && cp <= 0x19AB) return true; + if (0x19B0 <= cp && cp <= 0x19C9) return true; + if (0x1A00 <= cp && cp <= 0x1A16) return true; + if (0x1A20 <= cp && cp <= 0x1A54) return true; + if (cp === 0x1AA7) return true; + if (0x1B05 <= cp && cp <= 0x1B33) return true; + if (0x1B45 <= cp && cp <= 0x1B4B) return true; + if (0x1B83 <= cp && cp <= 0x1BA0) return true; + if (0x1BAE <= cp && cp <= 0x1BAF) return true; + if (0x1BBA <= cp && cp <= 0x1BE5) return true; + if (0x1C00 <= cp && cp <= 0x1C23) return true; + if (0x1C4D <= cp && cp <= 0x1C4F) return true; + if (0x1C5A <= cp && cp <= 0x1C7D) return true; + if (0x1CE9 <= cp && cp <= 0x1CEC) return true; + if (0x1CEE <= cp && cp <= 0x1CF1) return true; + if (0x1CF5 <= cp && cp <= 0x1CF6) return true; + if (0x1D00 <= cp && cp <= 0x1DBF) return true; + if (0x1E00 <= cp && cp <= 0x1F15) return true; + if (0x1F18 <= cp && cp <= 0x1F1D) return true; + if (0x1F20 <= cp && cp <= 0x1F45) return true; + if (0x1F48 <= cp && cp <= 0x1F4D) return true; + if (0x1F50 <= cp && cp <= 0x1F57) return true; + if (cp === 0x1F59) return true; + if (cp === 0x1F5B) return true; + if (cp === 0x1F5D) return true; + if (0x1F5F <= cp && cp <= 0x1F7D) return true; + if (0x1F80 <= cp && cp <= 0x1FB4) return true; + if (0x1FB6 <= cp && cp <= 0x1FBC) return true; + if (cp === 0x1FBE) return true; + if (0x1FC2 <= cp && cp <= 0x1FC4) return true; + if (0x1FC6 <= cp && cp <= 0x1FCC) return true; + if (0x1FD0 <= cp && cp <= 0x1FD3) return true; + if (0x1FD6 <= cp && cp <= 0x1FDB) return true; + if (0x1FE0 <= cp && cp <= 0x1FEC) return true; + if (0x1FF2 <= cp && cp <= 0x1FF4) return true; + if (0x1FF6 <= cp && cp <= 0x1FFC) return true; + if (cp === 0x2071) return true; + if (cp === 0x207F) return true; + if (0x2090 <= cp && cp <= 0x209C) return true; + if (cp === 0x2102) return true; + if (cp === 0x2107) return true; + if (0x210A <= cp && cp <= 0x2113) return true; + if (cp === 0x2115) return true; + if (0x2118 <= cp && cp <= 0x211D) return true; + if (cp === 0x2124) return true; + if (cp === 0x2126) return true; + if (cp === 0x2128) return true; + if (0x212A <= cp && cp <= 0x2139) return true; + if (0x213C <= cp && cp <= 0x213F) return true; + if (0x2145 <= cp && cp <= 0x2149) return true; + if (cp === 0x214E) return true; + if (0x2160 <= cp && cp <= 0x2188) return true; + if (0x2C00 <= cp && cp <= 0x2C2E) return true; + if (0x2C30 <= cp && cp <= 0x2C5E) return true; + if (0x2C60 <= cp && cp <= 0x2CE4) return true; + if (0x2CEB <= cp && cp <= 0x2CEE) return true; + if (0x2CF2 <= cp && cp <= 0x2CF3) return true; + if (0x2D00 <= cp && cp <= 0x2D25) return true; + if (cp === 0x2D27) return true; + if (cp === 0x2D2D) return true; + if (0x2D30 <= cp && cp <= 0x2D67) return true; + if (cp === 0x2D6F) return true; + if (0x2D80 <= cp && cp <= 0x2D96) return true; + if (0x2DA0 <= cp && cp <= 0x2DA6) return true; + if (0x2DA8 <= cp && cp <= 0x2DAE) return true; + if (0x2DB0 <= cp && cp <= 0x2DB6) return true; + if (0x2DB8 <= cp && cp <= 0x2DBE) return true; + if (0x2DC0 <= cp && cp <= 0x2DC6) return true; + if (0x2DC8 <= cp && cp <= 0x2DCE) return true; + if (0x2DD0 <= cp && cp <= 0x2DD6) return true; + if (0x2DD8 <= cp && cp <= 0x2DDE) return true; + if (0x3005 <= cp && cp <= 0x3007) return true; + if (0x3021 <= cp && cp <= 0x3029) return true; + if (0x3031 <= cp && cp <= 0x3035) return true; + if (0x3038 <= cp && cp <= 0x303C) return true; + if (0x3041 <= cp && cp <= 0x3096) return true; + if (0x309B <= cp && cp <= 0x309F) return true; + if (0x30A1 <= cp && cp <= 0x30FA) return true; + if (0x30FC <= cp && cp <= 0x30FF) return true; + if (0x3105 <= cp && cp <= 0x312D) return true; + if (0x3131 <= cp && cp <= 0x318E) return true; + if (0x31A0 <= cp && cp <= 0x31BA) return true; + if (0x31F0 <= cp && cp <= 0x31FF) return true; + if (0x3400 <= cp && cp <= 0x4DB5) return true; + if (0x4E00 <= cp && cp <= 0x9FD5) return true; + if (0xA000 <= cp && cp <= 0xA48C) return true; + if (0xA4D0 <= cp && cp <= 0xA4FD) return true; + if (0xA500 <= cp && cp <= 0xA60C) return true; + if (0xA610 <= cp && cp <= 0xA61F) return true; + if (0xA62A <= cp && cp <= 0xA62B) return true; + if (0xA640 <= cp && cp <= 0xA66E) return true; + if (0xA67F <= cp && cp <= 0xA69D) return true; + if (0xA6A0 <= cp && cp <= 0xA6EF) return true; + if (0xA717 <= cp && cp <= 0xA71F) return true; + if (0xA722 <= cp && cp <= 0xA788) return true; + if (0xA78B <= cp && cp <= 0xA7AD) return true; + if (0xA7B0 <= cp && cp <= 0xA7B7) return true; + if (0xA7F7 <= cp && cp <= 0xA801) return true; + if (0xA803 <= cp && cp <= 0xA805) return true; + if (0xA807 <= cp && cp <= 0xA80A) return true; + if (0xA80C <= cp && cp <= 0xA822) return true; + if (0xA840 <= cp && cp <= 0xA873) return true; + if (0xA882 <= cp && cp <= 0xA8B3) return true; + if (0xA8F2 <= cp && cp <= 0xA8F7) return true; + if (cp === 0xA8FB) return true; + if (cp === 0xA8FD) return true; + if (0xA90A <= cp && cp <= 0xA925) return true; + if (0xA930 <= cp && cp <= 0xA946) return true; + if (0xA960 <= cp && cp <= 0xA97C) return true; + if (0xA984 <= cp && cp <= 0xA9B2) return true; + if (cp === 0xA9CF) return true; + if (0xA9E0 <= cp && cp <= 0xA9E4) return true; + if (0xA9E6 <= cp && cp <= 0xA9EF) return true; + if (0xA9FA <= cp && cp <= 0xA9FE) return true; + if (0xAA00 <= cp && cp <= 0xAA28) return true; + if (0xAA40 <= cp && cp <= 0xAA42) return true; + if (0xAA44 <= cp && cp <= 0xAA4B) return true; + if (0xAA60 <= cp && cp <= 0xAA76) return true; + if (cp === 0xAA7A) return true; + if (0xAA7E <= cp && cp <= 0xAAAF) return true; + if (cp === 0xAAB1) return true; + if (0xAAB5 <= cp && cp <= 0xAAB6) return true; + if (0xAAB9 <= cp && cp <= 0xAABD) return true; + if (cp === 0xAAC0) return true; + if (cp === 0xAAC2) return true; + if (0xAADB <= cp && cp <= 0xAADD) return true; + if (0xAAE0 <= cp && cp <= 0xAAEA) return true; + if (0xAAF2 <= cp && cp <= 0xAAF4) return true; + if (0xAB01 <= cp && cp <= 0xAB06) return true; + if (0xAB09 <= cp && cp <= 0xAB0E) return true; + if (0xAB11 <= cp && cp <= 0xAB16) return true; + if (0xAB20 <= cp && cp <= 0xAB26) return true; + if (0xAB28 <= cp && cp <= 0xAB2E) return true; + if (0xAB30 <= cp && cp <= 0xAB5A) return true; + if (0xAB5C <= cp && cp <= 0xAB65) return true; + if (0xAB70 <= cp && cp <= 0xABE2) return true; + if (0xAC00 <= cp && cp <= 0xD7A3) return true; + if (0xD7B0 <= cp && cp <= 0xD7C6) return true; + if (0xD7CB <= cp && cp <= 0xD7FB) return true; + if (0xF900 <= cp && cp <= 0xFA6D) return true; + if (0xFA70 <= cp && cp <= 0xFAD9) return true; + if (0xFB00 <= cp && cp <= 0xFB06) return true; + if (0xFB13 <= cp && cp <= 0xFB17) return true; + if (cp === 0xFB1D) return true; + if (0xFB1F <= cp && cp <= 0xFB28) return true; + if (0xFB2A <= cp && cp <= 0xFB36) return true; + if (0xFB38 <= cp && cp <= 0xFB3C) return true; + if (cp === 0xFB3E) return true; + if (0xFB40 <= cp && cp <= 0xFB41) return true; + if (0xFB43 <= cp && cp <= 0xFB44) return true; + if (0xFB46 <= cp && cp <= 0xFBB1) return true; + if (0xFBD3 <= cp && cp <= 0xFD3D) return true; + if (0xFD50 <= cp && cp <= 0xFD8F) return true; + if (0xFD92 <= cp && cp <= 0xFDC7) return true; + if (0xFDF0 <= cp && cp <= 0xFDFB) return true; + if (0xFE70 <= cp && cp <= 0xFE74) return true; + if (0xFE76 <= cp && cp <= 0xFEFC) return true; + if (0xFF21 <= cp && cp <= 0xFF3A) return true; + if (0xFF41 <= cp && cp <= 0xFF5A) return true; + if (0xFF66 <= cp && cp <= 0xFFBE) return true; + if (0xFFC2 <= cp && cp <= 0xFFC7) return true; + if (0xFFCA <= cp && cp <= 0xFFCF) return true; + if (0xFFD2 <= cp && cp <= 0xFFD7) return true; + if (0xFFDA <= cp && cp <= 0xFFDC) return true; + if (0x10000 <= cp && cp <= 0x1000B) return true; + if (0x1000D <= cp && cp <= 0x10026) return true; + if (0x10028 <= cp && cp <= 0x1003A) return true; + if (0x1003C <= cp && cp <= 0x1003D) return true; + if (0x1003F <= cp && cp <= 0x1004D) return true; + if (0x10050 <= cp && cp <= 0x1005D) return true; + if (0x10080 <= cp && cp <= 0x100FA) return true; + if (0x10140 <= cp && cp <= 0x10174) return true; + if (0x10280 <= cp && cp <= 0x1029C) return true; + if (0x102A0 <= cp && cp <= 0x102D0) return true; + if (0x10300 <= cp && cp <= 0x1031F) return true; + if (0x10330 <= cp && cp <= 0x1034A) return true; + if (0x10350 <= cp && cp <= 0x10375) return true; + if (0x10380 <= cp && cp <= 0x1039D) return true; + if (0x103A0 <= cp && cp <= 0x103C3) return true; + if (0x103C8 <= cp && cp <= 0x103CF) return true; + if (0x103D1 <= cp && cp <= 0x103D5) return true; + if (0x10400 <= cp && cp <= 0x1049D) return true; + if (0x10500 <= cp && cp <= 0x10527) return true; + if (0x10530 <= cp && cp <= 0x10563) return true; + if (0x10600 <= cp && cp <= 0x10736) return true; + if (0x10740 <= cp && cp <= 0x10755) return true; + if (0x10760 <= cp && cp <= 0x10767) return true; + if (0x10800 <= cp && cp <= 0x10805) return true; + if (cp === 0x10808) return true; + if (0x1080A <= cp && cp <= 0x10835) return true; + if (0x10837 <= cp && cp <= 0x10838) return true; + if (cp === 0x1083C) return true; + if (0x1083F <= cp && cp <= 0x10855) return true; + if (0x10860 <= cp && cp <= 0x10876) return true; + if (0x10880 <= cp && cp <= 0x1089E) return true; + if (0x108E0 <= cp && cp <= 0x108F2) return true; + if (0x108F4 <= cp && cp <= 0x108F5) return true; + if (0x10900 <= cp && cp <= 0x10915) return true; + if (0x10920 <= cp && cp <= 0x10939) return true; + if (0x10980 <= cp && cp <= 0x109B7) return true; + if (0x109BE <= cp && cp <= 0x109BF) return true; + if (cp === 0x10A00) return true; + if (0x10A10 <= cp && cp <= 0x10A13) return true; + if (0x10A15 <= cp && cp <= 0x10A17) return true; + if (0x10A19 <= cp && cp <= 0x10A33) return true; + if (0x10A60 <= cp && cp <= 0x10A7C) return true; + if (0x10A80 <= cp && cp <= 0x10A9C) return true; + if (0x10AC0 <= cp && cp <= 0x10AC7) return true; + if (0x10AC9 <= cp && cp <= 0x10AE4) return true; + if (0x10B00 <= cp && cp <= 0x10B35) return true; + if (0x10B40 <= cp && cp <= 0x10B55) return true; + if (0x10B60 <= cp && cp <= 0x10B72) return true; + if (0x10B80 <= cp && cp <= 0x10B91) return true; + if (0x10C00 <= cp && cp <= 0x10C48) return true; + if (0x10C80 <= cp && cp <= 0x10CB2) return true; + if (0x10CC0 <= cp && cp <= 0x10CF2) return true; + if (0x11003 <= cp && cp <= 0x11037) return true; + if (0x11083 <= cp && cp <= 0x110AF) return true; + if (0x110D0 <= cp && cp <= 0x110E8) return true; + if (0x11103 <= cp && cp <= 0x11126) return true; + if (0x11150 <= cp && cp <= 0x11172) return true; + if (cp === 0x11176) return true; + if (0x11183 <= cp && cp <= 0x111B2) return true; + if (0x111C1 <= cp && cp <= 0x111C4) return true; + if (cp === 0x111DA) return true; + if (cp === 0x111DC) return true; + if (0x11200 <= cp && cp <= 0x11211) return true; + if (0x11213 <= cp && cp <= 0x1122B) return true; + if (0x11280 <= cp && cp <= 0x11286) return true; + if (cp === 0x11288) return true; + if (0x1128A <= cp && cp <= 0x1128D) return true; + if (0x1128F <= cp && cp <= 0x1129D) return true; + if (0x1129F <= cp && cp <= 0x112A8) return true; + if (0x112B0 <= cp && cp <= 0x112DE) return true; + if (0x11305 <= cp && cp <= 0x1130C) return true; + if (0x1130F <= cp && cp <= 0x11310) return true; + if (0x11313 <= cp && cp <= 0x11328) return true; + if (0x1132A <= cp && cp <= 0x11330) return true; + if (0x11332 <= cp && cp <= 0x11333) return true; + if (0x11335 <= cp && cp <= 0x11339) return true; + if (cp === 0x1133D) return true; + if (cp === 0x11350) return true; + if (0x1135D <= cp && cp <= 0x11361) return true; + if (0x11480 <= cp && cp <= 0x114AF) return true; + if (0x114C4 <= cp && cp <= 0x114C5) return true; + if (cp === 0x114C7) return true; + if (0x11580 <= cp && cp <= 0x115AE) return true; + if (0x115D8 <= cp && cp <= 0x115DB) return true; + if (0x11600 <= cp && cp <= 0x1162F) return true; + if (cp === 0x11644) return true; + if (0x11680 <= cp && cp <= 0x116AA) return true; + if (0x11700 <= cp && cp <= 0x11719) return true; + if (0x118A0 <= cp && cp <= 0x118DF) return true; + if (cp === 0x118FF) return true; + if (0x11AC0 <= cp && cp <= 0x11AF8) return true; + if (0x12000 <= cp && cp <= 0x12399) return true; + if (0x12400 <= cp && cp <= 0x1246E) return true; + if (0x12480 <= cp && cp <= 0x12543) return true; + if (0x13000 <= cp && cp <= 0x1342E) return true; + if (0x14400 <= cp && cp <= 0x14646) return true; + if (0x16800 <= cp && cp <= 0x16A38) return true; + if (0x16A40 <= cp && cp <= 0x16A5E) return true; + if (0x16AD0 <= cp && cp <= 0x16AED) return true; + if (0x16B00 <= cp && cp <= 0x16B2F) return true; + if (0x16B40 <= cp && cp <= 0x16B43) return true; + if (0x16B63 <= cp && cp <= 0x16B77) return true; + if (0x16B7D <= cp && cp <= 0x16B8F) return true; + if (0x16F00 <= cp && cp <= 0x16F44) return true; + if (cp === 0x16F50) return true; + if (0x16F93 <= cp && cp <= 0x16F9F) return true; + if (0x1B000 <= cp && cp <= 0x1B001) return true; + if (0x1BC00 <= cp && cp <= 0x1BC6A) return true; + if (0x1BC70 <= cp && cp <= 0x1BC7C) return true; + if (0x1BC80 <= cp && cp <= 0x1BC88) return true; + if (0x1BC90 <= cp && cp <= 0x1BC99) return true; + if (0x1D400 <= cp && cp <= 0x1D454) return true; + if (0x1D456 <= cp && cp <= 0x1D49C) return true; + if (0x1D49E <= cp && cp <= 0x1D49F) return true; + if (cp === 0x1D4A2) return true; + if (0x1D4A5 <= cp && cp <= 0x1D4A6) return true; + if (0x1D4A9 <= cp && cp <= 0x1D4AC) return true; + if (0x1D4AE <= cp && cp <= 0x1D4B9) return true; + if (cp === 0x1D4BB) return true; + if (0x1D4BD <= cp && cp <= 0x1D4C3) return true; + if (0x1D4C5 <= cp && cp <= 0x1D505) return true; + if (0x1D507 <= cp && cp <= 0x1D50A) return true; + if (0x1D50D <= cp && cp <= 0x1D514) return true; + if (0x1D516 <= cp && cp <= 0x1D51C) return true; + if (0x1D51E <= cp && cp <= 0x1D539) return true; + if (0x1D53B <= cp && cp <= 0x1D53E) return true; + if (0x1D540 <= cp && cp <= 0x1D544) return true; + if (cp === 0x1D546) return true; + if (0x1D54A <= cp && cp <= 0x1D550) return true; + if (0x1D552 <= cp && cp <= 0x1D6A5) return true; + if (0x1D6A8 <= cp && cp <= 0x1D6C0) return true; + if (0x1D6C2 <= cp && cp <= 0x1D6DA) return true; + if (0x1D6DC <= cp && cp <= 0x1D6FA) return true; + if (0x1D6FC <= cp && cp <= 0x1D714) return true; + if (0x1D716 <= cp && cp <= 0x1D734) return true; + if (0x1D736 <= cp && cp <= 0x1D74E) return true; + if (0x1D750 <= cp && cp <= 0x1D76E) return true; + if (0x1D770 <= cp && cp <= 0x1D788) return true; + if (0x1D78A <= cp && cp <= 0x1D7A8) return true; + if (0x1D7AA <= cp && cp <= 0x1D7C2) return true; + if (0x1D7C4 <= cp && cp <= 0x1D7CB) return true; + if (0x1E800 <= cp && cp <= 0x1E8C4) return true; + if (0x1EE00 <= cp && cp <= 0x1EE03) return true; + if (0x1EE05 <= cp && cp <= 0x1EE1F) return true; + if (0x1EE21 <= cp && cp <= 0x1EE22) return true; + if (cp === 0x1EE24) return true; + if (cp === 0x1EE27) return true; + if (0x1EE29 <= cp && cp <= 0x1EE32) return true; + if (0x1EE34 <= cp && cp <= 0x1EE37) return true; + if (cp === 0x1EE39) return true; + if (cp === 0x1EE3B) return true; + if (cp === 0x1EE42) return true; + if (cp === 0x1EE47) return true; + if (cp === 0x1EE49) return true; + if (cp === 0x1EE4B) return true; + if (0x1EE4D <= cp && cp <= 0x1EE4F) return true; + if (0x1EE51 <= cp && cp <= 0x1EE52) return true; + if (cp === 0x1EE54) return true; + if (cp === 0x1EE57) return true; + if (cp === 0x1EE59) return true; + if (cp === 0x1EE5B) return true; + if (cp === 0x1EE5D) return true; + if (cp === 0x1EE5F) return true; + if (0x1EE61 <= cp && cp <= 0x1EE62) return true; + if (cp === 0x1EE64) return true; + if (0x1EE67 <= cp && cp <= 0x1EE6A) return true; + if (0x1EE6C <= cp && cp <= 0x1EE72) return true; + if (0x1EE74 <= cp && cp <= 0x1EE77) return true; + if (0x1EE79 <= cp && cp <= 0x1EE7C) return true; + if (cp === 0x1EE7E) return true; + if (0x1EE80 <= cp && cp <= 0x1EE89) return true; + if (0x1EE8B <= cp && cp <= 0x1EE9B) return true; + if (0x1EEA1 <= cp && cp <= 0x1EEA3) return true; + if (0x1EEA5 <= cp && cp <= 0x1EEA9) return true; + if (0x1EEAB <= cp && cp <= 0x1EEBB) return true; + if (0x20000 <= cp && cp <= 0x2A6D6) return true; + if (0x2A700 <= cp && cp <= 0x2B734) return true; + if (0x2B740 <= cp && cp <= 0x2B81D) return true; + if (0x2B820 <= cp && cp <= 0x2CEA1) return true; + if (0x2F800 <= cp && cp <= 0x2FA1D) return true; + return false; +} +function IDC_Y(cp) { + if (0x0030 <= cp && cp <= 0x0039) return true; + if (0x0041 <= cp && cp <= 0x005A) return true; + if (cp === 0x005F) return true; + if (0x0061 <= cp && cp <= 0x007A) return true; + if (cp === 0x00AA) return true; + if (cp === 0x00B5) return true; + if (cp === 0x00B7) return true; + if (cp === 0x00BA) return true; + if (0x00C0 <= cp && cp <= 0x00D6) return true; + if (0x00D8 <= cp && cp <= 0x00F6) return true; + if (0x00F8 <= cp && cp <= 0x02C1) return true; + if (0x02C6 <= cp && cp <= 0x02D1) return true; + if (0x02E0 <= cp && cp <= 0x02E4) return true; + if (cp === 0x02EC) return true; + if (cp === 0x02EE) return true; + if (0x0300 <= cp && cp <= 0x0374) return true; + if (0x0376 <= cp && cp <= 0x0377) return true; + if (0x037A <= cp && cp <= 0x037D) return true; + if (cp === 0x037F) return true; + if (0x0386 <= cp && cp <= 0x038A) return true; + if (cp === 0x038C) return true; + if (0x038E <= cp && cp <= 0x03A1) return true; + if (0x03A3 <= cp && cp <= 0x03F5) return true; + if (0x03F7 <= cp && cp <= 0x0481) return true; + if (0x0483 <= cp && cp <= 0x0487) return true; + if (0x048A <= cp && cp <= 0x052F) return true; + if (0x0531 <= cp && cp <= 0x0556) return true; + if (cp === 0x0559) return true; + if (0x0561 <= cp && cp <= 0x0587) return true; + if (0x0591 <= cp && cp <= 0x05BD) return true; + if (cp === 0x05BF) return true; + if (0x05C1 <= cp && cp <= 0x05C2) return true; + if (0x05C4 <= cp && cp <= 0x05C5) return true; + if (cp === 0x05C7) return true; + if (0x05D0 <= cp && cp <= 0x05EA) return true; + if (0x05F0 <= cp && cp <= 0x05F2) return true; + if (0x0610 <= cp && cp <= 0x061A) return true; + if (0x0620 <= cp && cp <= 0x0669) return true; + if (0x066E <= cp && cp <= 0x06D3) return true; + if (0x06D5 <= cp && cp <= 0x06DC) return true; + if (0x06DF <= cp && cp <= 0x06E8) return true; + if (0x06EA <= cp && cp <= 0x06FC) return true; + if (cp === 0x06FF) return true; + if (0x0710 <= cp && cp <= 0x074A) return true; + if (0x074D <= cp && cp <= 0x07B1) return true; + if (0x07C0 <= cp && cp <= 0x07F5) return true; + if (cp === 0x07FA) return true; + if (0x0800 <= cp && cp <= 0x082D) return true; + if (0x0840 <= cp && cp <= 0x085B) return true; + if (0x08A0 <= cp && cp <= 0x08B4) return true; + if (0x08E3 <= cp && cp <= 0x0963) return true; + if (0x0966 <= cp && cp <= 0x096F) return true; + if (0x0971 <= cp && cp <= 0x0983) return true; + if (0x0985 <= cp && cp <= 0x098C) return true; + if (0x098F <= cp && cp <= 0x0990) return true; + if (0x0993 <= cp && cp <= 0x09A8) return true; + if (0x09AA <= cp && cp <= 0x09B0) return true; + if (cp === 0x09B2) return true; + if (0x09B6 <= cp && cp <= 0x09B9) return true; + if (0x09BC <= cp && cp <= 0x09C4) return true; + if (0x09C7 <= cp && cp <= 0x09C8) return true; + if (0x09CB <= cp && cp <= 0x09CE) return true; + if (cp === 0x09D7) return true; + if (0x09DC <= cp && cp <= 0x09DD) return true; + if (0x09DF <= cp && cp <= 0x09E3) return true; + if (0x09E6 <= cp && cp <= 0x09F1) return true; + if (0x0A01 <= cp && cp <= 0x0A03) return true; + if (0x0A05 <= cp && cp <= 0x0A0A) return true; + if (0x0A0F <= cp && cp <= 0x0A10) return true; + if (0x0A13 <= cp && cp <= 0x0A28) return true; + if (0x0A2A <= cp && cp <= 0x0A30) return true; + if (0x0A32 <= cp && cp <= 0x0A33) return true; + if (0x0A35 <= cp && cp <= 0x0A36) return true; + if (0x0A38 <= cp && cp <= 0x0A39) return true; + if (cp === 0x0A3C) return true; + if (0x0A3E <= cp && cp <= 0x0A42) return true; + if (0x0A47 <= cp && cp <= 0x0A48) return true; + if (0x0A4B <= cp && cp <= 0x0A4D) return true; + if (cp === 0x0A51) return true; + if (0x0A59 <= cp && cp <= 0x0A5C) return true; + if (cp === 0x0A5E) return true; + if (0x0A66 <= cp && cp <= 0x0A75) return true; + if (0x0A81 <= cp && cp <= 0x0A83) return true; + if (0x0A85 <= cp && cp <= 0x0A8D) return true; + if (0x0A8F <= cp && cp <= 0x0A91) return true; + if (0x0A93 <= cp && cp <= 0x0AA8) return true; + if (0x0AAA <= cp && cp <= 0x0AB0) return true; + if (0x0AB2 <= cp && cp <= 0x0AB3) return true; + if (0x0AB5 <= cp && cp <= 0x0AB9) return true; + if (0x0ABC <= cp && cp <= 0x0AC5) return true; + if (0x0AC7 <= cp && cp <= 0x0AC9) return true; + if (0x0ACB <= cp && cp <= 0x0ACD) return true; + if (cp === 0x0AD0) return true; + if (0x0AE0 <= cp && cp <= 0x0AE3) return true; + if (0x0AE6 <= cp && cp <= 0x0AEF) return true; + if (cp === 0x0AF9) return true; + if (0x0B01 <= cp && cp <= 0x0B03) return true; + if (0x0B05 <= cp && cp <= 0x0B0C) return true; + if (0x0B0F <= cp && cp <= 0x0B10) return true; + if (0x0B13 <= cp && cp <= 0x0B28) return true; + if (0x0B2A <= cp && cp <= 0x0B30) return true; + if (0x0B32 <= cp && cp <= 0x0B33) return true; + if (0x0B35 <= cp && cp <= 0x0B39) return true; + if (0x0B3C <= cp && cp <= 0x0B44) return true; + if (0x0B47 <= cp && cp <= 0x0B48) return true; + if (0x0B4B <= cp && cp <= 0x0B4D) return true; + if (0x0B56 <= cp && cp <= 0x0B57) return true; + if (0x0B5C <= cp && cp <= 0x0B5D) return true; + if (0x0B5F <= cp && cp <= 0x0B63) return true; + if (0x0B66 <= cp && cp <= 0x0B6F) return true; + if (cp === 0x0B71) return true; + if (0x0B82 <= cp && cp <= 0x0B83) return true; + if (0x0B85 <= cp && cp <= 0x0B8A) return true; + if (0x0B8E <= cp && cp <= 0x0B90) return true; + if (0x0B92 <= cp && cp <= 0x0B95) return true; + if (0x0B99 <= cp && cp <= 0x0B9A) return true; + if (cp === 0x0B9C) return true; + if (0x0B9E <= cp && cp <= 0x0B9F) return true; + if (0x0BA3 <= cp && cp <= 0x0BA4) return true; + if (0x0BA8 <= cp && cp <= 0x0BAA) return true; + if (0x0BAE <= cp && cp <= 0x0BB9) return true; + if (0x0BBE <= cp && cp <= 0x0BC2) return true; + if (0x0BC6 <= cp && cp <= 0x0BC8) return true; + if (0x0BCA <= cp && cp <= 0x0BCD) return true; + if (cp === 0x0BD0) return true; + if (cp === 0x0BD7) return true; + if (0x0BE6 <= cp && cp <= 0x0BEF) return true; + if (0x0C00 <= cp && cp <= 0x0C03) return true; + if (0x0C05 <= cp && cp <= 0x0C0C) return true; + if (0x0C0E <= cp && cp <= 0x0C10) return true; + if (0x0C12 <= cp && cp <= 0x0C28) return true; + if (0x0C2A <= cp && cp <= 0x0C39) return true; + if (0x0C3D <= cp && cp <= 0x0C44) return true; + if (0x0C46 <= cp && cp <= 0x0C48) return true; + if (0x0C4A <= cp && cp <= 0x0C4D) return true; + if (0x0C55 <= cp && cp <= 0x0C56) return true; + if (0x0C58 <= cp && cp <= 0x0C5A) return true; + if (0x0C60 <= cp && cp <= 0x0C63) return true; + if (0x0C66 <= cp && cp <= 0x0C6F) return true; + if (0x0C81 <= cp && cp <= 0x0C83) return true; + if (0x0C85 <= cp && cp <= 0x0C8C) return true; + if (0x0C8E <= cp && cp <= 0x0C90) return true; + if (0x0C92 <= cp && cp <= 0x0CA8) return true; + if (0x0CAA <= cp && cp <= 0x0CB3) return true; + if (0x0CB5 <= cp && cp <= 0x0CB9) return true; + if (0x0CBC <= cp && cp <= 0x0CC4) return true; + if (0x0CC6 <= cp && cp <= 0x0CC8) return true; + if (0x0CCA <= cp && cp <= 0x0CCD) return true; + if (0x0CD5 <= cp && cp <= 0x0CD6) return true; + if (cp === 0x0CDE) return true; + if (0x0CE0 <= cp && cp <= 0x0CE3) return true; + if (0x0CE6 <= cp && cp <= 0x0CEF) return true; + if (0x0CF1 <= cp && cp <= 0x0CF2) return true; + if (0x0D01 <= cp && cp <= 0x0D03) return true; + if (0x0D05 <= cp && cp <= 0x0D0C) return true; + if (0x0D0E <= cp && cp <= 0x0D10) return true; + if (0x0D12 <= cp && cp <= 0x0D3A) return true; + if (0x0D3D <= cp && cp <= 0x0D44) return true; + if (0x0D46 <= cp && cp <= 0x0D48) return true; + if (0x0D4A <= cp && cp <= 0x0D4E) return true; + if (cp === 0x0D57) return true; + if (0x0D5F <= cp && cp <= 0x0D63) return true; + if (0x0D66 <= cp && cp <= 0x0D6F) return true; + if (0x0D7A <= cp && cp <= 0x0D7F) return true; + if (0x0D82 <= cp && cp <= 0x0D83) return true; + if (0x0D85 <= cp && cp <= 0x0D96) return true; + if (0x0D9A <= cp && cp <= 0x0DB1) return true; + if (0x0DB3 <= cp && cp <= 0x0DBB) return true; + if (cp === 0x0DBD) return true; + if (0x0DC0 <= cp && cp <= 0x0DC6) return true; + if (cp === 0x0DCA) return true; + if (0x0DCF <= cp && cp <= 0x0DD4) return true; + if (cp === 0x0DD6) return true; + if (0x0DD8 <= cp && cp <= 0x0DDF) return true; + if (0x0DE6 <= cp && cp <= 0x0DEF) return true; + if (0x0DF2 <= cp && cp <= 0x0DF3) return true; + if (0x0E01 <= cp && cp <= 0x0E3A) return true; + if (0x0E40 <= cp && cp <= 0x0E4E) return true; + if (0x0E50 <= cp && cp <= 0x0E59) return true; + if (0x0E81 <= cp && cp <= 0x0E82) return true; + if (cp === 0x0E84) return true; + if (0x0E87 <= cp && cp <= 0x0E88) return true; + if (cp === 0x0E8A) return true; + if (cp === 0x0E8D) return true; + if (0x0E94 <= cp && cp <= 0x0E97) return true; + if (0x0E99 <= cp && cp <= 0x0E9F) return true; + if (0x0EA1 <= cp && cp <= 0x0EA3) return true; + if (cp === 0x0EA5) return true; + if (cp === 0x0EA7) return true; + if (0x0EAA <= cp && cp <= 0x0EAB) return true; + if (0x0EAD <= cp && cp <= 0x0EB9) return true; + if (0x0EBB <= cp && cp <= 0x0EBD) return true; + if (0x0EC0 <= cp && cp <= 0x0EC4) return true; + if (cp === 0x0EC6) return true; + if (0x0EC8 <= cp && cp <= 0x0ECD) return true; + if (0x0ED0 <= cp && cp <= 0x0ED9) return true; + if (0x0EDC <= cp && cp <= 0x0EDF) return true; + if (cp === 0x0F00) return true; + if (0x0F18 <= cp && cp <= 0x0F19) return true; + if (0x0F20 <= cp && cp <= 0x0F29) return true; + if (cp === 0x0F35) return true; + if (cp === 0x0F37) return true; + if (cp === 0x0F39) return true; + if (0x0F3E <= cp && cp <= 0x0F47) return true; + if (0x0F49 <= cp && cp <= 0x0F6C) return true; + if (0x0F71 <= cp && cp <= 0x0F84) return true; + if (0x0F86 <= cp && cp <= 0x0F97) return true; + if (0x0F99 <= cp && cp <= 0x0FBC) return true; + if (cp === 0x0FC6) return true; + if (0x1000 <= cp && cp <= 0x1049) return true; + if (0x1050 <= cp && cp <= 0x109D) return true; + if (0x10A0 <= cp && cp <= 0x10C5) return true; + if (cp === 0x10C7) return true; + if (cp === 0x10CD) return true; + if (0x10D0 <= cp && cp <= 0x10FA) return true; + if (0x10FC <= cp && cp <= 0x1248) return true; + if (0x124A <= cp && cp <= 0x124D) return true; + if (0x1250 <= cp && cp <= 0x1256) return true; + if (cp === 0x1258) return true; + if (0x125A <= cp && cp <= 0x125D) return true; + if (0x1260 <= cp && cp <= 0x1288) return true; + if (0x128A <= cp && cp <= 0x128D) return true; + if (0x1290 <= cp && cp <= 0x12B0) return true; + if (0x12B2 <= cp && cp <= 0x12B5) return true; + if (0x12B8 <= cp && cp <= 0x12BE) return true; + if (cp === 0x12C0) return true; + if (0x12C2 <= cp && cp <= 0x12C5) return true; + if (0x12C8 <= cp && cp <= 0x12D6) return true; + if (0x12D8 <= cp && cp <= 0x1310) return true; + if (0x1312 <= cp && cp <= 0x1315) return true; + if (0x1318 <= cp && cp <= 0x135A) return true; + if (0x135D <= cp && cp <= 0x135F) return true; + if (0x1369 <= cp && cp <= 0x1371) return true; + if (0x1380 <= cp && cp <= 0x138F) return true; + if (0x13A0 <= cp && cp <= 0x13F5) return true; + if (0x13F8 <= cp && cp <= 0x13FD) return true; + if (0x1401 <= cp && cp <= 0x166C) return true; + if (0x166F <= cp && cp <= 0x167F) return true; + if (0x1681 <= cp && cp <= 0x169A) return true; + if (0x16A0 <= cp && cp <= 0x16EA) return true; + if (0x16EE <= cp && cp <= 0x16F8) return true; + if (0x1700 <= cp && cp <= 0x170C) return true; + if (0x170E <= cp && cp <= 0x1714) return true; + if (0x1720 <= cp && cp <= 0x1734) return true; + if (0x1740 <= cp && cp <= 0x1753) return true; + if (0x1760 <= cp && cp <= 0x176C) return true; + if (0x176E <= cp && cp <= 0x1770) return true; + if (0x1772 <= cp && cp <= 0x1773) return true; + if (0x1780 <= cp && cp <= 0x17D3) return true; + if (cp === 0x17D7) return true; + if (0x17DC <= cp && cp <= 0x17DD) return true; + if (0x17E0 <= cp && cp <= 0x17E9) return true; + if (0x180B <= cp && cp <= 0x180D) return true; + if (0x1810 <= cp && cp <= 0x1819) return true; + if (0x1820 <= cp && cp <= 0x1877) return true; + if (0x1880 <= cp && cp <= 0x18AA) return true; + if (0x18B0 <= cp && cp <= 0x18F5) return true; + if (0x1900 <= cp && cp <= 0x191E) return true; + if (0x1920 <= cp && cp <= 0x192B) return true; + if (0x1930 <= cp && cp <= 0x193B) return true; + if (0x1946 <= cp && cp <= 0x196D) return true; + if (0x1970 <= cp && cp <= 0x1974) return true; + if (0x1980 <= cp && cp <= 0x19AB) return true; + if (0x19B0 <= cp && cp <= 0x19C9) return true; + if (0x19D0 <= cp && cp <= 0x19DA) return true; + if (0x1A00 <= cp && cp <= 0x1A1B) return true; + if (0x1A20 <= cp && cp <= 0x1A5E) return true; + if (0x1A60 <= cp && cp <= 0x1A7C) return true; + if (0x1A7F <= cp && cp <= 0x1A89) return true; + if (0x1A90 <= cp && cp <= 0x1A99) return true; + if (cp === 0x1AA7) return true; + if (0x1AB0 <= cp && cp <= 0x1ABD) return true; + if (0x1B00 <= cp && cp <= 0x1B4B) return true; + if (0x1B50 <= cp && cp <= 0x1B59) return true; + if (0x1B6B <= cp && cp <= 0x1B73) return true; + if (0x1B80 <= cp && cp <= 0x1BF3) return true; + if (0x1C00 <= cp && cp <= 0x1C37) return true; + if (0x1C40 <= cp && cp <= 0x1C49) return true; + if (0x1C4D <= cp && cp <= 0x1C7D) return true; + if (0x1CD0 <= cp && cp <= 0x1CD2) return true; + if (0x1CD4 <= cp && cp <= 0x1CF6) return true; + if (0x1CF8 <= cp && cp <= 0x1CF9) return true; + if (0x1D00 <= cp && cp <= 0x1DF5) return true; + if (0x1DFC <= cp && cp <= 0x1F15) return true; + if (0x1F18 <= cp && cp <= 0x1F1D) return true; + if (0x1F20 <= cp && cp <= 0x1F45) return true; + if (0x1F48 <= cp && cp <= 0x1F4D) return true; + if (0x1F50 <= cp && cp <= 0x1F57) return true; + if (cp === 0x1F59) return true; + if (cp === 0x1F5B) return true; + if (cp === 0x1F5D) return true; + if (0x1F5F <= cp && cp <= 0x1F7D) return true; + if (0x1F80 <= cp && cp <= 0x1FB4) return true; + if (0x1FB6 <= cp && cp <= 0x1FBC) return true; + if (cp === 0x1FBE) return true; + if (0x1FC2 <= cp && cp <= 0x1FC4) return true; + if (0x1FC6 <= cp && cp <= 0x1FCC) return true; + if (0x1FD0 <= cp && cp <= 0x1FD3) return true; + if (0x1FD6 <= cp && cp <= 0x1FDB) return true; + if (0x1FE0 <= cp && cp <= 0x1FEC) return true; + if (0x1FF2 <= cp && cp <= 0x1FF4) return true; + if (0x1FF6 <= cp && cp <= 0x1FFC) return true; + if (0x203F <= cp && cp <= 0x2040) return true; + if (cp === 0x2054) return true; + if (cp === 0x2071) return true; + if (cp === 0x207F) return true; + if (0x2090 <= cp && cp <= 0x209C) return true; + if (0x20D0 <= cp && cp <= 0x20DC) return true; + if (cp === 0x20E1) return true; + if (0x20E5 <= cp && cp <= 0x20F0) return true; + if (cp === 0x2102) return true; + if (cp === 0x2107) return true; + if (0x210A <= cp && cp <= 0x2113) return true; + if (cp === 0x2115) return true; + if (0x2118 <= cp && cp <= 0x211D) return true; + if (cp === 0x2124) return true; + if (cp === 0x2126) return true; + if (cp === 0x2128) return true; + if (0x212A <= cp && cp <= 0x2139) return true; + if (0x213C <= cp && cp <= 0x213F) return true; + if (0x2145 <= cp && cp <= 0x2149) return true; + if (cp === 0x214E) return true; + if (0x2160 <= cp && cp <= 0x2188) return true; + if (0x2C00 <= cp && cp <= 0x2C2E) return true; + if (0x2C30 <= cp && cp <= 0x2C5E) return true; + if (0x2C60 <= cp && cp <= 0x2CE4) return true; + if (0x2CEB <= cp && cp <= 0x2CF3) return true; + if (0x2D00 <= cp && cp <= 0x2D25) return true; + if (cp === 0x2D27) return true; + if (cp === 0x2D2D) return true; + if (0x2D30 <= cp && cp <= 0x2D67) return true; + if (cp === 0x2D6F) return true; + if (0x2D7F <= cp && cp <= 0x2D96) return true; + if (0x2DA0 <= cp && cp <= 0x2DA6) return true; + if (0x2DA8 <= cp && cp <= 0x2DAE) return true; + if (0x2DB0 <= cp && cp <= 0x2DB6) return true; + if (0x2DB8 <= cp && cp <= 0x2DBE) return true; + if (0x2DC0 <= cp && cp <= 0x2DC6) return true; + if (0x2DC8 <= cp && cp <= 0x2DCE) return true; + if (0x2DD0 <= cp && cp <= 0x2DD6) return true; + if (0x2DD8 <= cp && cp <= 0x2DDE) return true; + if (0x2DE0 <= cp && cp <= 0x2DFF) return true; + if (0x3005 <= cp && cp <= 0x3007) return true; + if (0x3021 <= cp && cp <= 0x302F) return true; + if (0x3031 <= cp && cp <= 0x3035) return true; + if (0x3038 <= cp && cp <= 0x303C) return true; + if (0x3041 <= cp && cp <= 0x3096) return true; + if (0x3099 <= cp && cp <= 0x309F) return true; + if (0x30A1 <= cp && cp <= 0x30FA) return true; + if (0x30FC <= cp && cp <= 0x30FF) return true; + if (0x3105 <= cp && cp <= 0x312D) return true; + if (0x3131 <= cp && cp <= 0x318E) return true; + if (0x31A0 <= cp && cp <= 0x31BA) return true; + if (0x31F0 <= cp && cp <= 0x31FF) return true; + if (0x3400 <= cp && cp <= 0x4DB5) return true; + if (0x4E00 <= cp && cp <= 0x9FD5) return true; + if (0xA000 <= cp && cp <= 0xA48C) return true; + if (0xA4D0 <= cp && cp <= 0xA4FD) return true; + if (0xA500 <= cp && cp <= 0xA60C) return true; + if (0xA610 <= cp && cp <= 0xA62B) return true; + if (0xA640 <= cp && cp <= 0xA66F) return true; + if (0xA674 <= cp && cp <= 0xA67D) return true; + if (0xA67F <= cp && cp <= 0xA6F1) return true; + if (0xA717 <= cp && cp <= 0xA71F) return true; + if (0xA722 <= cp && cp <= 0xA788) return true; + if (0xA78B <= cp && cp <= 0xA7AD) return true; + if (0xA7B0 <= cp && cp <= 0xA7B7) return true; + if (0xA7F7 <= cp && cp <= 0xA827) return true; + if (0xA840 <= cp && cp <= 0xA873) return true; + if (0xA880 <= cp && cp <= 0xA8C4) return true; + if (0xA8D0 <= cp && cp <= 0xA8D9) return true; + if (0xA8E0 <= cp && cp <= 0xA8F7) return true; + if (cp === 0xA8FB) return true; + if (cp === 0xA8FD) return true; + if (0xA900 <= cp && cp <= 0xA92D) return true; + if (0xA930 <= cp && cp <= 0xA953) return true; + if (0xA960 <= cp && cp <= 0xA97C) return true; + if (0xA980 <= cp && cp <= 0xA9C0) return true; + if (0xA9CF <= cp && cp <= 0xA9D9) return true; + if (0xA9E0 <= cp && cp <= 0xA9FE) return true; + if (0xAA00 <= cp && cp <= 0xAA36) return true; + if (0xAA40 <= cp && cp <= 0xAA4D) return true; + if (0xAA50 <= cp && cp <= 0xAA59) return true; + if (0xAA60 <= cp && cp <= 0xAA76) return true; + if (0xAA7A <= cp && cp <= 0xAAC2) return true; + if (0xAADB <= cp && cp <= 0xAADD) return true; + if (0xAAE0 <= cp && cp <= 0xAAEF) return true; + if (0xAAF2 <= cp && cp <= 0xAAF6) return true; + if (0xAB01 <= cp && cp <= 0xAB06) return true; + if (0xAB09 <= cp && cp <= 0xAB0E) return true; + if (0xAB11 <= cp && cp <= 0xAB16) return true; + if (0xAB20 <= cp && cp <= 0xAB26) return true; + if (0xAB28 <= cp && cp <= 0xAB2E) return true; + if (0xAB30 <= cp && cp <= 0xAB5A) return true; + if (0xAB5C <= cp && cp <= 0xAB65) return true; + if (0xAB70 <= cp && cp <= 0xABEA) return true; + if (0xABEC <= cp && cp <= 0xABED) return true; + if (0xABF0 <= cp && cp <= 0xABF9) return true; + if (0xAC00 <= cp && cp <= 0xD7A3) return true; + if (0xD7B0 <= cp && cp <= 0xD7C6) return true; + if (0xD7CB <= cp && cp <= 0xD7FB) return true; + if (0xF900 <= cp && cp <= 0xFA6D) return true; + if (0xFA70 <= cp && cp <= 0xFAD9) return true; + if (0xFB00 <= cp && cp <= 0xFB06) return true; + if (0xFB13 <= cp && cp <= 0xFB17) return true; + if (0xFB1D <= cp && cp <= 0xFB28) return true; + if (0xFB2A <= cp && cp <= 0xFB36) return true; + if (0xFB38 <= cp && cp <= 0xFB3C) return true; + if (cp === 0xFB3E) return true; + if (0xFB40 <= cp && cp <= 0xFB41) return true; + if (0xFB43 <= cp && cp <= 0xFB44) return true; + if (0xFB46 <= cp && cp <= 0xFBB1) return true; + if (0xFBD3 <= cp && cp <= 0xFD3D) return true; + if (0xFD50 <= cp && cp <= 0xFD8F) return true; + if (0xFD92 <= cp && cp <= 0xFDC7) return true; + if (0xFDF0 <= cp && cp <= 0xFDFB) return true; + if (0xFE00 <= cp && cp <= 0xFE0F) return true; + if (0xFE20 <= cp && cp <= 0xFE2F) return true; + if (0xFE33 <= cp && cp <= 0xFE34) return true; + if (0xFE4D <= cp && cp <= 0xFE4F) return true; + if (0xFE70 <= cp && cp <= 0xFE74) return true; + if (0xFE76 <= cp && cp <= 0xFEFC) return true; + if (0xFF10 <= cp && cp <= 0xFF19) return true; + if (0xFF21 <= cp && cp <= 0xFF3A) return true; + if (cp === 0xFF3F) return true; + if (0xFF41 <= cp && cp <= 0xFF5A) return true; + if (0xFF66 <= cp && cp <= 0xFFBE) return true; + if (0xFFC2 <= cp && cp <= 0xFFC7) return true; + if (0xFFCA <= cp && cp <= 0xFFCF) return true; + if (0xFFD2 <= cp && cp <= 0xFFD7) return true; + if (0xFFDA <= cp && cp <= 0xFFDC) return true; + if (0x10000 <= cp && cp <= 0x1000B) return true; + if (0x1000D <= cp && cp <= 0x10026) return true; + if (0x10028 <= cp && cp <= 0x1003A) return true; + if (0x1003C <= cp && cp <= 0x1003D) return true; + if (0x1003F <= cp && cp <= 0x1004D) return true; + if (0x10050 <= cp && cp <= 0x1005D) return true; + if (0x10080 <= cp && cp <= 0x100FA) return true; + if (0x10140 <= cp && cp <= 0x10174) return true; + if (cp === 0x101FD) return true; + if (0x10280 <= cp && cp <= 0x1029C) return true; + if (0x102A0 <= cp && cp <= 0x102D0) return true; + if (cp === 0x102E0) return true; + if (0x10300 <= cp && cp <= 0x1031F) return true; + if (0x10330 <= cp && cp <= 0x1034A) return true; + if (0x10350 <= cp && cp <= 0x1037A) return true; + if (0x10380 <= cp && cp <= 0x1039D) return true; + if (0x103A0 <= cp && cp <= 0x103C3) return true; + if (0x103C8 <= cp && cp <= 0x103CF) return true; + if (0x103D1 <= cp && cp <= 0x103D5) return true; + if (0x10400 <= cp && cp <= 0x1049D) return true; + if (0x104A0 <= cp && cp <= 0x104A9) return true; + if (0x10500 <= cp && cp <= 0x10527) return true; + if (0x10530 <= cp && cp <= 0x10563) return true; + if (0x10600 <= cp && cp <= 0x10736) return true; + if (0x10740 <= cp && cp <= 0x10755) return true; + if (0x10760 <= cp && cp <= 0x10767) return true; + if (0x10800 <= cp && cp <= 0x10805) return true; + if (cp === 0x10808) return true; + if (0x1080A <= cp && cp <= 0x10835) return true; + if (0x10837 <= cp && cp <= 0x10838) return true; + if (cp === 0x1083C) return true; + if (0x1083F <= cp && cp <= 0x10855) return true; + if (0x10860 <= cp && cp <= 0x10876) return true; + if (0x10880 <= cp && cp <= 0x1089E) return true; + if (0x108E0 <= cp && cp <= 0x108F2) return true; + if (0x108F4 <= cp && cp <= 0x108F5) return true; + if (0x10900 <= cp && cp <= 0x10915) return true; + if (0x10920 <= cp && cp <= 0x10939) return true; + if (0x10980 <= cp && cp <= 0x109B7) return true; + if (0x109BE <= cp && cp <= 0x109BF) return true; + if (0x10A00 <= cp && cp <= 0x10A03) return true; + if (0x10A05 <= cp && cp <= 0x10A06) return true; + if (0x10A0C <= cp && cp <= 0x10A13) return true; + if (0x10A15 <= cp && cp <= 0x10A17) return true; + if (0x10A19 <= cp && cp <= 0x10A33) return true; + if (0x10A38 <= cp && cp <= 0x10A3A) return true; + if (cp === 0x10A3F) return true; + if (0x10A60 <= cp && cp <= 0x10A7C) return true; + if (0x10A80 <= cp && cp <= 0x10A9C) return true; + if (0x10AC0 <= cp && cp <= 0x10AC7) return true; + if (0x10AC9 <= cp && cp <= 0x10AE6) return true; + if (0x10B00 <= cp && cp <= 0x10B35) return true; + if (0x10B40 <= cp && cp <= 0x10B55) return true; + if (0x10B60 <= cp && cp <= 0x10B72) return true; + if (0x10B80 <= cp && cp <= 0x10B91) return true; + if (0x10C00 <= cp && cp <= 0x10C48) return true; + if (0x10C80 <= cp && cp <= 0x10CB2) return true; + if (0x10CC0 <= cp && cp <= 0x10CF2) return true; + if (0x11000 <= cp && cp <= 0x11046) return true; + if (0x11066 <= cp && cp <= 0x1106F) return true; + if (0x1107F <= cp && cp <= 0x110BA) return true; + if (0x110D0 <= cp && cp <= 0x110E8) return true; + if (0x110F0 <= cp && cp <= 0x110F9) return true; + if (0x11100 <= cp && cp <= 0x11134) return true; + if (0x11136 <= cp && cp <= 0x1113F) return true; + if (0x11150 <= cp && cp <= 0x11173) return true; + if (cp === 0x11176) return true; + if (0x11180 <= cp && cp <= 0x111C4) return true; + if (0x111CA <= cp && cp <= 0x111CC) return true; + if (0x111D0 <= cp && cp <= 0x111DA) return true; + if (cp === 0x111DC) return true; + if (0x11200 <= cp && cp <= 0x11211) return true; + if (0x11213 <= cp && cp <= 0x11237) return true; + if (0x11280 <= cp && cp <= 0x11286) return true; + if (cp === 0x11288) return true; + if (0x1128A <= cp && cp <= 0x1128D) return true; + if (0x1128F <= cp && cp <= 0x1129D) return true; + if (0x1129F <= cp && cp <= 0x112A8) return true; + if (0x112B0 <= cp && cp <= 0x112EA) return true; + if (0x112F0 <= cp && cp <= 0x112F9) return true; + if (0x11300 <= cp && cp <= 0x11303) return true; + if (0x11305 <= cp && cp <= 0x1130C) return true; + if (0x1130F <= cp && cp <= 0x11310) return true; + if (0x11313 <= cp && cp <= 0x11328) return true; + if (0x1132A <= cp && cp <= 0x11330) return true; + if (0x11332 <= cp && cp <= 0x11333) return true; + if (0x11335 <= cp && cp <= 0x11339) return true; + if (0x1133C <= cp && cp <= 0x11344) return true; + if (0x11347 <= cp && cp <= 0x11348) return true; + if (0x1134B <= cp && cp <= 0x1134D) return true; + if (cp === 0x11350) return true; + if (cp === 0x11357) return true; + if (0x1135D <= cp && cp <= 0x11363) return true; + if (0x11366 <= cp && cp <= 0x1136C) return true; + if (0x11370 <= cp && cp <= 0x11374) return true; + if (0x11480 <= cp && cp <= 0x114C5) return true; + if (cp === 0x114C7) return true; + if (0x114D0 <= cp && cp <= 0x114D9) return true; + if (0x11580 <= cp && cp <= 0x115B5) return true; + if (0x115B8 <= cp && cp <= 0x115C0) return true; + if (0x115D8 <= cp && cp <= 0x115DD) return true; + if (0x11600 <= cp && cp <= 0x11640) return true; + if (cp === 0x11644) return true; + if (0x11650 <= cp && cp <= 0x11659) return true; + if (0x11680 <= cp && cp <= 0x116B7) return true; + if (0x116C0 <= cp && cp <= 0x116C9) return true; + if (0x11700 <= cp && cp <= 0x11719) return true; + if (0x1171D <= cp && cp <= 0x1172B) return true; + if (0x11730 <= cp && cp <= 0x11739) return true; + if (0x118A0 <= cp && cp <= 0x118E9) return true; + if (cp === 0x118FF) return true; + if (0x11AC0 <= cp && cp <= 0x11AF8) return true; + if (0x12000 <= cp && cp <= 0x12399) return true; + if (0x12400 <= cp && cp <= 0x1246E) return true; + if (0x12480 <= cp && cp <= 0x12543) return true; + if (0x13000 <= cp && cp <= 0x1342E) return true; + if (0x14400 <= cp && cp <= 0x14646) return true; + if (0x16800 <= cp && cp <= 0x16A38) return true; + if (0x16A40 <= cp && cp <= 0x16A5E) return true; + if (0x16A60 <= cp && cp <= 0x16A69) return true; + if (0x16AD0 <= cp && cp <= 0x16AED) return true; + if (0x16AF0 <= cp && cp <= 0x16AF4) return true; + if (0x16B00 <= cp && cp <= 0x16B36) return true; + if (0x16B40 <= cp && cp <= 0x16B43) return true; + if (0x16B50 <= cp && cp <= 0x16B59) return true; + if (0x16B63 <= cp && cp <= 0x16B77) return true; + if (0x16B7D <= cp && cp <= 0x16B8F) return true; + if (0x16F00 <= cp && cp <= 0x16F44) return true; + if (0x16F50 <= cp && cp <= 0x16F7E) return true; + if (0x16F8F <= cp && cp <= 0x16F9F) return true; + if (0x1B000 <= cp && cp <= 0x1B001) return true; + if (0x1BC00 <= cp && cp <= 0x1BC6A) return true; + if (0x1BC70 <= cp && cp <= 0x1BC7C) return true; + if (0x1BC80 <= cp && cp <= 0x1BC88) return true; + if (0x1BC90 <= cp && cp <= 0x1BC99) return true; + if (0x1BC9D <= cp && cp <= 0x1BC9E) return true; + if (0x1D165 <= cp && cp <= 0x1D169) return true; + if (0x1D16D <= cp && cp <= 0x1D172) return true; + if (0x1D17B <= cp && cp <= 0x1D182) return true; + if (0x1D185 <= cp && cp <= 0x1D18B) return true; + if (0x1D1AA <= cp && cp <= 0x1D1AD) return true; + if (0x1D242 <= cp && cp <= 0x1D244) return true; + if (0x1D400 <= cp && cp <= 0x1D454) return true; + if (0x1D456 <= cp && cp <= 0x1D49C) return true; + if (0x1D49E <= cp && cp <= 0x1D49F) return true; + if (cp === 0x1D4A2) return true; + if (0x1D4A5 <= cp && cp <= 0x1D4A6) return true; + if (0x1D4A9 <= cp && cp <= 0x1D4AC) return true; + if (0x1D4AE <= cp && cp <= 0x1D4B9) return true; + if (cp === 0x1D4BB) return true; + if (0x1D4BD <= cp && cp <= 0x1D4C3) return true; + if (0x1D4C5 <= cp && cp <= 0x1D505) return true; + if (0x1D507 <= cp && cp <= 0x1D50A) return true; + if (0x1D50D <= cp && cp <= 0x1D514) return true; + if (0x1D516 <= cp && cp <= 0x1D51C) return true; + if (0x1D51E <= cp && cp <= 0x1D539) return true; + if (0x1D53B <= cp && cp <= 0x1D53E) return true; + if (0x1D540 <= cp && cp <= 0x1D544) return true; + if (cp === 0x1D546) return true; + if (0x1D54A <= cp && cp <= 0x1D550) return true; + if (0x1D552 <= cp && cp <= 0x1D6A5) return true; + if (0x1D6A8 <= cp && cp <= 0x1D6C0) return true; + if (0x1D6C2 <= cp && cp <= 0x1D6DA) return true; + if (0x1D6DC <= cp && cp <= 0x1D6FA) return true; + if (0x1D6FC <= cp && cp <= 0x1D714) return true; + if (0x1D716 <= cp && cp <= 0x1D734) return true; + if (0x1D736 <= cp && cp <= 0x1D74E) return true; + if (0x1D750 <= cp && cp <= 0x1D76E) return true; + if (0x1D770 <= cp && cp <= 0x1D788) return true; + if (0x1D78A <= cp && cp <= 0x1D7A8) return true; + if (0x1D7AA <= cp && cp <= 0x1D7C2) return true; + if (0x1D7C4 <= cp && cp <= 0x1D7CB) return true; + if (0x1D7CE <= cp && cp <= 0x1D7FF) return true; + if (0x1DA00 <= cp && cp <= 0x1DA36) return true; + if (0x1DA3B <= cp && cp <= 0x1DA6C) return true; + if (cp === 0x1DA75) return true; + if (cp === 0x1DA84) return true; + if (0x1DA9B <= cp && cp <= 0x1DA9F) return true; + if (0x1DAA1 <= cp && cp <= 0x1DAAF) return true; + if (0x1E800 <= cp && cp <= 0x1E8C4) return true; + if (0x1E8D0 <= cp && cp <= 0x1E8D6) return true; + if (0x1EE00 <= cp && cp <= 0x1EE03) return true; + if (0x1EE05 <= cp && cp <= 0x1EE1F) return true; + if (0x1EE21 <= cp && cp <= 0x1EE22) return true; + if (cp === 0x1EE24) return true; + if (cp === 0x1EE27) return true; + if (0x1EE29 <= cp && cp <= 0x1EE32) return true; + if (0x1EE34 <= cp && cp <= 0x1EE37) return true; + if (cp === 0x1EE39) return true; + if (cp === 0x1EE3B) return true; + if (cp === 0x1EE42) return true; + if (cp === 0x1EE47) return true; + if (cp === 0x1EE49) return true; + if (cp === 0x1EE4B) return true; + if (0x1EE4D <= cp && cp <= 0x1EE4F) return true; + if (0x1EE51 <= cp && cp <= 0x1EE52) return true; + if (cp === 0x1EE54) return true; + if (cp === 0x1EE57) return true; + if (cp === 0x1EE59) return true; + if (cp === 0x1EE5B) return true; + if (cp === 0x1EE5D) return true; + if (cp === 0x1EE5F) return true; + if (0x1EE61 <= cp && cp <= 0x1EE62) return true; + if (cp === 0x1EE64) return true; + if (0x1EE67 <= cp && cp <= 0x1EE6A) return true; + if (0x1EE6C <= cp && cp <= 0x1EE72) return true; + if (0x1EE74 <= cp && cp <= 0x1EE77) return true; + if (0x1EE79 <= cp && cp <= 0x1EE7C) return true; + if (cp === 0x1EE7E) return true; + if (0x1EE80 <= cp && cp <= 0x1EE89) return true; + if (0x1EE8B <= cp && cp <= 0x1EE9B) return true; + if (0x1EEA1 <= cp && cp <= 0x1EEA3) return true; + if (0x1EEA5 <= cp && cp <= 0x1EEA9) return true; + if (0x1EEAB <= cp && cp <= 0x1EEBB) return true; + if (0x20000 <= cp && cp <= 0x2A6D6) return true; + if (0x2A700 <= cp && cp <= 0x2B734) return true; + if (0x2B740 <= cp && cp <= 0x2B81D) return true; + if (0x2B820 <= cp && cp <= 0x2CEA1) return true; + if (0x2F800 <= cp && cp <= 0x2FA1D) return true; + if (0xE0100 <= cp && cp <= 0xE01EF) return true; + return false; +} + +/* eslint-disable new-cap */ + +/** + * @ngdoc module + * @name ngParseExt + * @packageName angular-parse-ext + * @description + * + * # ngParseExt + * + * The `ngParseExt` module provides functionality to allow Unicode characters in + * identifiers inside Angular expressions. + * + * + *
+ * + * This module allows the usage of any identifier that follows ES6 identifier naming convention + * to be used as an identifier in an Angular expression. ES6 delegates some of the identifier + * rules definition to Unicode, this module uses ES6 and Unicode 8.0 identifiers convention. + * + */ + +/* global angularParseExtModule: true, + IDS_Y, + IDC_Y +*/ + +function isValidIdentifierStart(ch, cp) { + return ch === '$' || + ch === '_' || + IDS_Y(cp); +} + +function isValidIdentifierContinue(ch, cp) { + return ch === '$' || + ch === '_' || + cp === 0x200C || // + cp === 0x200D || // + IDC_Y(cp); +} + +angular.module('ngParseExt', []) + .config(['$parseProvider', function($parseProvider) { + $parseProvider.setIdentifierFns(isValidIdentifierStart, isValidIdentifierContinue); + }]) + .info({ angularVersion: '1.6.6' }); + + +})(window, window.angular); diff --git a/1.6.6/angular-parse-ext.min.js b/1.6.6/angular-parse-ext.min.js new file mode 100644 index 000000000..4adb00de6 --- /dev/null +++ b/1.6.6/angular-parse-ext.min.js @@ -0,0 +1,49 @@ +/* + AngularJS v1.6.6 + (c) 2010-2017 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(f,c){'use strict';function d(b,a){return"$"===b||"_"===b||(65<=a&&90>=a||97<=a&&122>=a||170===a||181===a||186===a||192<=a&&214>=a||216<=a&&246>=a||248<=a&&705>=a||710<=a&&721>=a||736<=a&&740>=a||748===a||750===a||880<=a&&884>=a||886<=a&&887>=a||890<=a&&893>=a||895===a||902===a||904<=a&&906>=a||908===a||910<=a&&929>=a||931<=a&&1013>=a||1015<=a&&1153>=a||1162<=a&&1327>=a||1329<=a&&1366>=a||1369===a||1377<=a&&1415>=a||1488<=a&&1514>=a||1520<=a&&1522>=a||1568<=a&&1610>=a||1646<=a&&1647>=a|| +1649<=a&&1747>=a||1749===a||1765<=a&&1766>=a||1774<=a&&1775>=a||1786<=a&&1788>=a||1791===a||1808===a||1810<=a&&1839>=a||1869<=a&&1957>=a||1969===a||1994<=a&&2026>=a||2036<=a&&2037>=a||2042===a||2048<=a&&2069>=a||2074===a||2084===a||2088===a||2112<=a&&2136>=a||2208<=a&&2228>=a||2308<=a&&2361>=a||2365===a||2384===a||2392<=a&&2401>=a||2417<=a&&2432>=a||2437<=a&&2444>=a||2447<=a&&2448>=a||2451<=a&&2472>=a||2474<=a&&2480>=a||2482===a||2486<=a&&2489>=a||2493===a||2510===a||2524<=a&&2525>=a||2527<=a&&2529>= +a||2544<=a&&2545>=a||2565<=a&&2570>=a||2575<=a&&2576>=a||2579<=a&&2600>=a||2602<=a&&2608>=a||2610<=a&&2611>=a||2613<=a&&2614>=a||2616<=a&&2617>=a||2649<=a&&2652>=a||2654===a||2674<=a&&2676>=a||2693<=a&&2701>=a||2703<=a&&2705>=a||2707<=a&&2728>=a||2730<=a&&2736>=a||2738<=a&&2739>=a||2741<=a&&2745>=a||2749===a||2768===a||2784<=a&&2785>=a||2809===a||2821<=a&&2828>=a||2831<=a&&2832>=a||2835<=a&&2856>=a||2858<=a&&2864>=a||2866<=a&&2867>=a||2869<=a&&2873>=a||2877===a||2908<=a&&2909>=a||2911<=a&&2913>=a|| +2929===a||2947===a||2949<=a&&2954>=a||2958<=a&&2960>=a||2962<=a&&2965>=a||2969<=a&&2970>=a||2972===a||2974<=a&&2975>=a||2979<=a&&2980>=a||2984<=a&&2986>=a||2990<=a&&3001>=a||3024===a||3077<=a&&3084>=a||3086<=a&&3088>=a||3090<=a&&3112>=a||3114<=a&&3129>=a||3133===a||3160<=a&&3162>=a||3168<=a&&3169>=a||3205<=a&&3212>=a||3214<=a&&3216>=a||3218<=a&&3240>=a||3242<=a&&3251>=a||3253<=a&&3257>=a||3261===a||3294===a||3296<=a&&3297>=a||3313<=a&&3314>=a||3333<=a&&3340>=a||3342<=a&&3344>=a||3346<=a&&3386>=a|| +3389===a||3406===a||3423<=a&&3425>=a||3450<=a&&3455>=a||3461<=a&&3478>=a||3482<=a&&3505>=a||3507<=a&&3515>=a||3517===a||3520<=a&&3526>=a||3585<=a&&3632>=a||3634<=a&&3635>=a||3648<=a&&3654>=a||3713<=a&&3714>=a||3716===a||3719<=a&&3720>=a||3722===a||3725===a||3732<=a&&3735>=a||3737<=a&&3743>=a||3745<=a&&3747>=a||3749===a||3751===a||3754<=a&&3755>=a||3757<=a&&3760>=a||3762<=a&&3763>=a||3773===a||3776<=a&&3780>=a||3782===a||3804<=a&&3807>=a||3840===a||3904<=a&&3911>=a||3913<=a&&3948>=a||3976<=a&&3980>= +a||4096<=a&&4138>=a||4159===a||4176<=a&&4181>=a||4186<=a&&4189>=a||4193===a||4197<=a&&4198>=a||4206<=a&&4208>=a||4213<=a&&4225>=a||4238===a||4256<=a&&4293>=a||4295===a||4301===a||4304<=a&&4346>=a||4348<=a&&4680>=a||4682<=a&&4685>=a||4688<=a&&4694>=a||4696===a||4698<=a&&4701>=a||4704<=a&&4744>=a||4746<=a&&4749>=a||4752<=a&&4784>=a||4786<=a&&4789>=a||4792<=a&&4798>=a||4800===a||4802<=a&&4805>=a||4808<=a&&4822>=a||4824<=a&&4880>=a||4882<=a&&4885>=a||4888<=a&&4954>=a||4992<=a&&5007>=a||5024<=a&&5109>= +a||5112<=a&&5117>=a||5121<=a&&5740>=a||5743<=a&&5759>=a||5761<=a&&5786>=a||5792<=a&&5866>=a||5870<=a&&5880>=a||5888<=a&&5900>=a||5902<=a&&5905>=a||5920<=a&&5937>=a||5952<=a&&5969>=a||5984<=a&&5996>=a||5998<=a&&6E3>=a||6016<=a&&6067>=a||6103===a||6108===a||6176<=a&&6263>=a||6272<=a&&6312>=a||6314===a||6320<=a&&6389>=a||6400<=a&&6430>=a||6480<=a&&6509>=a||6512<=a&&6516>=a||6528<=a&&6571>=a||6576<=a&&6601>=a||6656<=a&&6678>=a||6688<=a&&6740>=a||6823===a||6917<=a&&6963>=a||6981<=a&&6987>=a||7043<=a&& +7072>=a||7086<=a&&7087>=a||7098<=a&&7141>=a||7168<=a&&7203>=a||7245<=a&&7247>=a||7258<=a&&7293>=a||7401<=a&&7404>=a||7406<=a&&7409>=a||7413<=a&&7414>=a||7424<=a&&7615>=a||7680<=a&&7957>=a||7960<=a&&7965>=a||7968<=a&&8005>=a||8008<=a&&8013>=a||8016<=a&&8023>=a||8025===a||8027===a||8029===a||8031<=a&&8061>=a||8064<=a&&8116>=a||8118<=a&&8124>=a||8126===a||8130<=a&&8132>=a||8134<=a&&8140>=a||8144<=a&&8147>=a||8150<=a&&8155>=a||8160<=a&&8172>=a||8178<=a&&8180>=a||8182<=a&&8188>=a||8305===a||8319===a|| +8336<=a&&8348>=a||8450===a||8455===a||8458<=a&&8467>=a||8469===a||8472<=a&&8477>=a||8484===a||8486===a||8488===a||8490<=a&&8505>=a||8508<=a&&8511>=a||8517<=a&&8521>=a||8526===a||8544<=a&&8584>=a||11264<=a&&11310>=a||11312<=a&&11358>=a||11360<=a&&11492>=a||11499<=a&&11502>=a||11506<=a&&11507>=a||11520<=a&&11557>=a||11559===a||11565===a||11568<=a&&11623>=a||11631===a||11648<=a&&11670>=a||11680<=a&&11686>=a||11688<=a&&11694>=a||11696<=a&&11702>=a||11704<=a&&11710>=a||11712<=a&&11718>=a||11720<=a&&11726>= +a||11728<=a&&11734>=a||11736<=a&&11742>=a||12293<=a&&12295>=a||12321<=a&&12329>=a||12337<=a&&12341>=a||12344<=a&&12348>=a||12353<=a&&12438>=a||12443<=a&&12447>=a||12449<=a&&12538>=a||12540<=a&&12543>=a||12549<=a&&12589>=a||12593<=a&&12686>=a||12704<=a&&12730>=a||12784<=a&&12799>=a||13312<=a&&19893>=a||19968<=a&&40917>=a||40960<=a&&42124>=a||42192<=a&&42237>=a||42240<=a&&42508>=a||42512<=a&&42527>=a||42538<=a&&42539>=a||42560<=a&&42606>=a||42623<=a&&42653>=a||42656<=a&&42735>=a||42775<=a&&42783>=a|| +42786<=a&&42888>=a||42891<=a&&42925>=a||42928<=a&&42935>=a||42999<=a&&43009>=a||43011<=a&&43013>=a||43015<=a&&43018>=a||43020<=a&&43042>=a||43072<=a&&43123>=a||43138<=a&&43187>=a||43250<=a&&43255>=a||43259===a||43261===a||43274<=a&&43301>=a||43312<=a&&43334>=a||43360<=a&&43388>=a||43396<=a&&43442>=a||43471===a||43488<=a&&43492>=a||43494<=a&&43503>=a||43514<=a&&43518>=a||43520<=a&&43560>=a||43584<=a&&43586>=a||43588<=a&&43595>=a||43616<=a&&43638>=a||43642===a||43646<=a&&43695>=a||43697===a||43701<= +a&&43702>=a||43705<=a&&43709>=a||43712===a||43714===a||43739<=a&&43741>=a||43744<=a&&43754>=a||43762<=a&&43764>=a||43777<=a&&43782>=a||43785<=a&&43790>=a||43793<=a&&43798>=a||43808<=a&&43814>=a||43816<=a&&43822>=a||43824<=a&&43866>=a||43868<=a&&43877>=a||43888<=a&&44002>=a||44032<=a&&55203>=a||55216<=a&&55238>=a||55243<=a&&55291>=a||63744<=a&&64109>=a||64112<=a&&64217>=a||64256<=a&&64262>=a||64275<=a&&64279>=a||64285===a||64287<=a&&64296>=a||64298<=a&&64310>=a||64312<=a&&64316>=a||64318===a||64320<= +a&&64321>=a||64323<=a&&64324>=a||64326<=a&&64433>=a||64467<=a&&64829>=a||64848<=a&&64911>=a||64914<=a&&64967>=a||65008<=a&&65019>=a||65136<=a&&65140>=a||65142<=a&&65276>=a||65313<=a&&65338>=a||65345<=a&&65370>=a||65382<=a&&65470>=a||65474<=a&&65479>=a||65482<=a&&65487>=a||65490<=a&&65495>=a||65498<=a&&65500>=a||65536<=a&&65547>=a||65549<=a&&65574>=a||65576<=a&&65594>=a||65596<=a&&65597>=a||65599<=a&&65613>=a||65616<=a&&65629>=a||65664<=a&&65786>=a||65856<=a&&65908>=a||66176<=a&&66204>=a||66208<=a&& +66256>=a||66304<=a&&66335>=a||66352<=a&&66378>=a||66384<=a&&66421>=a||66432<=a&&66461>=a||66464<=a&&66499>=a||66504<=a&&66511>=a||66513<=a&&66517>=a||66560<=a&&66717>=a||66816<=a&&66855>=a||66864<=a&&66915>=a||67072<=a&&67382>=a||67392<=a&&67413>=a||67424<=a&&67431>=a||67584<=a&&67589>=a||67592===a||67594<=a&&67637>=a||67639<=a&&67640>=a||67644===a||67647<=a&&67669>=a||67680<=a&&67702>=a||67712<=a&&67742>=a||67808<=a&&67826>=a||67828<=a&&67829>=a||67840<=a&&67861>=a||67872<=a&&67897>=a||67968<=a&& +68023>=a||68030<=a&&68031>=a||68096===a||68112<=a&&68115>=a||68117<=a&&68119>=a||68121<=a&&68147>=a||68192<=a&&68220>=a||68224<=a&&68252>=a||68288<=a&&68295>=a||68297<=a&&68324>=a||68352<=a&&68405>=a||68416<=a&&68437>=a||68448<=a&&68466>=a||68480<=a&&68497>=a||68608<=a&&68680>=a||68736<=a&&68786>=a||68800<=a&&68850>=a||69635<=a&&69687>=a||69763<=a&&69807>=a||69840<=a&&69864>=a||69891<=a&&69926>=a||69968<=a&&70002>=a||70006===a||70019<=a&&70066>=a||70081<=a&&70084>=a||70106===a||70108===a||70144<= +a&&70161>=a||70163<=a&&70187>=a||70272<=a&&70278>=a||70280===a||70282<=a&&70285>=a||70287<=a&&70301>=a||70303<=a&&70312>=a||70320<=a&&70366>=a||70405<=a&&70412>=a||70415<=a&&70416>=a||70419<=a&&70440>=a||70442<=a&&70448>=a||70450<=a&&70451>=a||70453<=a&&70457>=a||70461===a||70480===a||70493<=a&&70497>=a||70784<=a&&70831>=a||70852<=a&&70853>=a||70855===a||71040<=a&&71086>=a||71128<=a&&71131>=a||71168<=a&&71215>=a||71236===a||71296<=a&&71338>=a||71424<=a&&71449>=a||71840<=a&&71903>=a||71935===a||72384<= +a&&72440>=a||73728<=a&&74649>=a||74752<=a&&74862>=a||74880<=a&&75075>=a||77824<=a&&78894>=a||82944<=a&&83526>=a||92160<=a&&92728>=a||92736<=a&&92766>=a||92880<=a&&92909>=a||92928<=a&&92975>=a||92992<=a&&92995>=a||93027<=a&&93047>=a||93053<=a&&93071>=a||93952<=a&&94020>=a||94032===a||94099<=a&&94111>=a||110592<=a&&110593>=a||113664<=a&&113770>=a||113776<=a&&113788>=a||113792<=a&&113800>=a||113808<=a&&113817>=a||119808<=a&&119892>=a||119894<=a&&119964>=a||119966<=a&&119967>=a||119970===a||119973<=a&& +119974>=a||119977<=a&&119980>=a||119982<=a&&119993>=a||119995===a||119997<=a&&120003>=a||120005<=a&&120069>=a||120071<=a&&120074>=a||120077<=a&&120084>=a||120086<=a&&120092>=a||120094<=a&&120121>=a||120123<=a&&120126>=a||120128<=a&&120132>=a||120134===a||120138<=a&&120144>=a||120146<=a&&120485>=a||120488<=a&&120512>=a||120514<=a&&120538>=a||120540<=a&&120570>=a||120572<=a&&120596>=a||120598<=a&&120628>=a||120630<=a&&120654>=a||120656<=a&&120686>=a||120688<=a&&120712>=a||120714<=a&&120744>=a||120746<= +a&&120770>=a||120772<=a&&120779>=a||124928<=a&&125124>=a||126464<=a&&126467>=a||126469<=a&&126495>=a||126497<=a&&126498>=a||126500===a||126503===a||126505<=a&&126514>=a||126516<=a&&126519>=a||126521===a||126523===a||126530===a||126535===a||126537===a||126539===a||126541<=a&&126543>=a||126545<=a&&126546>=a||126548===a||126551===a||126553===a||126555===a||126557===a||126559===a||126561<=a&&126562>=a||126564===a||126567<=a&&126570>=a||126572<=a&&126578>=a||126580<=a&&126583>=a||126585<=a&&126588>=a|| +126590===a||126592<=a&&126601>=a||126603<=a&&126619>=a||126625<=a&&126627>=a||126629<=a&&126633>=a||126635<=a&&126651>=a||131072<=a&&173782>=a||173824<=a&&177972>=a||177984<=a&&178205>=a||178208<=a&&183969>=a||194560<=a&&195101>=a?!0:!1)}function e(b,a){return"$"===b||"_"===b||8204===a||8205===a||(48<=a&&57>=a||65<=a&&90>=a||95===a||97<=a&&122>=a||170===a||181===a||183===a||186===a||192<=a&&214>=a||216<=a&&246>=a||248<=a&&705>=a||710<=a&&721>=a||736<=a&&740>=a||748===a||750===a||768<=a&&884>=a||886<= +a&&887>=a||890<=a&&893>=a||895===a||902<=a&&906>=a||908===a||910<=a&&929>=a||931<=a&&1013>=a||1015<=a&&1153>=a||1155<=a&&1159>=a||1162<=a&&1327>=a||1329<=a&&1366>=a||1369===a||1377<=a&&1415>=a||1425<=a&&1469>=a||1471===a||1473<=a&&1474>=a||1476<=a&&1477>=a||1479===a||1488<=a&&1514>=a||1520<=a&&1522>=a||1552<=a&&1562>=a||1568<=a&&1641>=a||1646<=a&&1747>=a||1749<=a&&1756>=a||1759<=a&&1768>=a||1770<=a&&1788>=a||1791===a||1808<=a&&1866>=a||1869<=a&&1969>=a||1984<=a&&2037>=a||2042===a||2048<=a&&2093>= +a||2112<=a&&2139>=a||2208<=a&&2228>=a||2275<=a&&2403>=a||2406<=a&&2415>=a||2417<=a&&2435>=a||2437<=a&&2444>=a||2447<=a&&2448>=a||2451<=a&&2472>=a||2474<=a&&2480>=a||2482===a||2486<=a&&2489>=a||2492<=a&&2500>=a||2503<=a&&2504>=a||2507<=a&&2510>=a||2519===a||2524<=a&&2525>=a||2527<=a&&2531>=a||2534<=a&&2545>=a||2561<=a&&2563>=a||2565<=a&&2570>=a||2575<=a&&2576>=a||2579<=a&&2600>=a||2602<=a&&2608>=a||2610<=a&&2611>=a||2613<=a&&2614>=a||2616<=a&&2617>=a||2620===a||2622<=a&&2626>=a||2631<=a&&2632>=a|| +2635<=a&&2637>=a||2641===a||2649<=a&&2652>=a||2654===a||2662<=a&&2677>=a||2689<=a&&2691>=a||2693<=a&&2701>=a||2703<=a&&2705>=a||2707<=a&&2728>=a||2730<=a&&2736>=a||2738<=a&&2739>=a||2741<=a&&2745>=a||2748<=a&&2757>=a||2759<=a&&2761>=a||2763<=a&&2765>=a||2768===a||2784<=a&&2787>=a||2790<=a&&2799>=a||2809===a||2817<=a&&2819>=a||2821<=a&&2828>=a||2831<=a&&2832>=a||2835<=a&&2856>=a||2858<=a&&2864>=a||2866<=a&&2867>=a||2869<=a&&2873>=a||2876<=a&&2884>=a||2887<=a&&2888>=a||2891<=a&&2893>=a||2902<=a&&2903>= +a||2908<=a&&2909>=a||2911<=a&&2915>=a||2918<=a&&2927>=a||2929===a||2946<=a&&2947>=a||2949<=a&&2954>=a||2958<=a&&2960>=a||2962<=a&&2965>=a||2969<=a&&2970>=a||2972===a||2974<=a&&2975>=a||2979<=a&&2980>=a||2984<=a&&2986>=a||2990<=a&&3001>=a||3006<=a&&3010>=a||3014<=a&&3016>=a||3018<=a&&3021>=a||3024===a||3031===a||3046<=a&&3055>=a||3072<=a&&3075>=a||3077<=a&&3084>=a||3086<=a&&3088>=a||3090<=a&&3112>=a||3114<=a&&3129>=a||3133<=a&&3140>=a||3142<=a&&3144>=a||3146<=a&&3149>=a||3157<=a&&3158>=a||3160<=a&& +3162>=a||3168<=a&&3171>=a||3174<=a&&3183>=a||3201<=a&&3203>=a||3205<=a&&3212>=a||3214<=a&&3216>=a||3218<=a&&3240>=a||3242<=a&&3251>=a||3253<=a&&3257>=a||3260<=a&&3268>=a||3270<=a&&3272>=a||3274<=a&&3277>=a||3285<=a&&3286>=a||3294===a||3296<=a&&3299>=a||3302<=a&&3311>=a||3313<=a&&3314>=a||3329<=a&&3331>=a||3333<=a&&3340>=a||3342<=a&&3344>=a||3346<=a&&3386>=a||3389<=a&&3396>=a||3398<=a&&3400>=a||3402<=a&&3406>=a||3415===a||3423<=a&&3427>=a||3430<=a&&3439>=a||3450<=a&&3455>=a||3458<=a&&3459>=a||3461<= +a&&3478>=a||3482<=a&&3505>=a||3507<=a&&3515>=a||3517===a||3520<=a&&3526>=a||3530===a||3535<=a&&3540>=a||3542===a||3544<=a&&3551>=a||3558<=a&&3567>=a||3570<=a&&3571>=a||3585<=a&&3642>=a||3648<=a&&3662>=a||3664<=a&&3673>=a||3713<=a&&3714>=a||3716===a||3719<=a&&3720>=a||3722===a||3725===a||3732<=a&&3735>=a||3737<=a&&3743>=a||3745<=a&&3747>=a||3749===a||3751===a||3754<=a&&3755>=a||3757<=a&&3769>=a||3771<=a&&3773>=a||3776<=a&&3780>=a||3782===a||3784<=a&&3789>=a||3792<=a&&3801>=a||3804<=a&&3807>=a||3840=== +a||3864<=a&&3865>=a||3872<=a&&3881>=a||3893===a||3895===a||3897===a||3902<=a&&3911>=a||3913<=a&&3948>=a||3953<=a&&3972>=a||3974<=a&&3991>=a||3993<=a&&4028>=a||4038===a||4096<=a&&4169>=a||4176<=a&&4253>=a||4256<=a&&4293>=a||4295===a||4301===a||4304<=a&&4346>=a||4348<=a&&4680>=a||4682<=a&&4685>=a||4688<=a&&4694>=a||4696===a||4698<=a&&4701>=a||4704<=a&&4744>=a||4746<=a&&4749>=a||4752<=a&&4784>=a||4786<=a&&4789>=a||4792<=a&&4798>=a||4800===a||4802<=a&&4805>=a||4808<=a&&4822>=a||4824<=a&&4880>=a||4882<= +a&&4885>=a||4888<=a&&4954>=a||4957<=a&&4959>=a||4969<=a&&4977>=a||4992<=a&&5007>=a||5024<=a&&5109>=a||5112<=a&&5117>=a||5121<=a&&5740>=a||5743<=a&&5759>=a||5761<=a&&5786>=a||5792<=a&&5866>=a||5870<=a&&5880>=a||5888<=a&&5900>=a||5902<=a&&5908>=a||5920<=a&&5940>=a||5952<=a&&5971>=a||5984<=a&&5996>=a||5998<=a&&6E3>=a||6002<=a&&6003>=a||6016<=a&&6099>=a||6103===a||6108<=a&&6109>=a||6112<=a&&6121>=a||6155<=a&&6157>=a||6160<=a&&6169>=a||6176<=a&&6263>=a||6272<=a&&6314>=a||6320<=a&&6389>=a||6400<=a&&6430>= +a||6432<=a&&6443>=a||6448<=a&&6459>=a||6470<=a&&6509>=a||6512<=a&&6516>=a||6528<=a&&6571>=a||6576<=a&&6601>=a||6608<=a&&6618>=a||6656<=a&&6683>=a||6688<=a&&6750>=a||6752<=a&&6780>=a||6783<=a&&6793>=a||6800<=a&&6809>=a||6823===a||6832<=a&&6845>=a||6912<=a&&6987>=a||6992<=a&&7001>=a||7019<=a&&7027>=a||7040<=a&&7155>=a||7168<=a&&7223>=a||7232<=a&&7241>=a||7245<=a&&7293>=a||7376<=a&&7378>=a||7380<=a&&7414>=a||7416<=a&&7417>=a||7424<=a&&7669>=a||7676<=a&&7957>=a||7960<=a&&7965>=a||7968<=a&&8005>=a||8008<= +a&&8013>=a||8016<=a&&8023>=a||8025===a||8027===a||8029===a||8031<=a&&8061>=a||8064<=a&&8116>=a||8118<=a&&8124>=a||8126===a||8130<=a&&8132>=a||8134<=a&&8140>=a||8144<=a&&8147>=a||8150<=a&&8155>=a||8160<=a&&8172>=a||8178<=a&&8180>=a||8182<=a&&8188>=a||8255<=a&&8256>=a||8276===a||8305===a||8319===a||8336<=a&&8348>=a||8400<=a&&8412>=a||8417===a||8421<=a&&8432>=a||8450===a||8455===a||8458<=a&&8467>=a||8469===a||8472<=a&&8477>=a||8484===a||8486===a||8488===a||8490<=a&&8505>=a||8508<=a&&8511>=a||8517<=a&& +8521>=a||8526===a||8544<=a&&8584>=a||11264<=a&&11310>=a||11312<=a&&11358>=a||11360<=a&&11492>=a||11499<=a&&11507>=a||11520<=a&&11557>=a||11559===a||11565===a||11568<=a&&11623>=a||11631===a||11647<=a&&11670>=a||11680<=a&&11686>=a||11688<=a&&11694>=a||11696<=a&&11702>=a||11704<=a&&11710>=a||11712<=a&&11718>=a||11720<=a&&11726>=a||11728<=a&&11734>=a||11736<=a&&11742>=a||11744<=a&&11775>=a||12293<=a&&12295>=a||12321<=a&&12335>=a||12337<=a&&12341>=a||12344<=a&&12348>=a||12353<=a&&12438>=a||12441<=a&&12447>= +a||12449<=a&&12538>=a||12540<=a&&12543>=a||12549<=a&&12589>=a||12593<=a&&12686>=a||12704<=a&&12730>=a||12784<=a&&12799>=a||13312<=a&&19893>=a||19968<=a&&40917>=a||40960<=a&&42124>=a||42192<=a&&42237>=a||42240<=a&&42508>=a||42512<=a&&42539>=a||42560<=a&&42607>=a||42612<=a&&42621>=a||42623<=a&&42737>=a||42775<=a&&42783>=a||42786<=a&&42888>=a||42891<=a&&42925>=a||42928<=a&&42935>=a||42999<=a&&43047>=a||43072<=a&&43123>=a||43136<=a&&43204>=a||43216<=a&&43225>=a||43232<=a&&43255>=a||43259===a||43261=== +a||43264<=a&&43309>=a||43312<=a&&43347>=a||43360<=a&&43388>=a||43392<=a&&43456>=a||43471<=a&&43481>=a||43488<=a&&43518>=a||43520<=a&&43574>=a||43584<=a&&43597>=a||43600<=a&&43609>=a||43616<=a&&43638>=a||43642<=a&&43714>=a||43739<=a&&43741>=a||43744<=a&&43759>=a||43762<=a&&43766>=a||43777<=a&&43782>=a||43785<=a&&43790>=a||43793<=a&&43798>=a||43808<=a&&43814>=a||43816<=a&&43822>=a||43824<=a&&43866>=a||43868<=a&&43877>=a||43888<=a&&44010>=a||44012<=a&&44013>=a||44016<=a&&44025>=a||44032<=a&&55203>=a|| +55216<=a&&55238>=a||55243<=a&&55291>=a||63744<=a&&64109>=a||64112<=a&&64217>=a||64256<=a&&64262>=a||64275<=a&&64279>=a||64285<=a&&64296>=a||64298<=a&&64310>=a||64312<=a&&64316>=a||64318===a||64320<=a&&64321>=a||64323<=a&&64324>=a||64326<=a&&64433>=a||64467<=a&&64829>=a||64848<=a&&64911>=a||64914<=a&&64967>=a||65008<=a&&65019>=a||65024<=a&&65039>=a||65056<=a&&65071>=a||65075<=a&&65076>=a||65101<=a&&65103>=a||65136<=a&&65140>=a||65142<=a&&65276>=a||65296<=a&&65305>=a||65313<=a&&65338>=a||65343===a|| +65345<=a&&65370>=a||65382<=a&&65470>=a||65474<=a&&65479>=a||65482<=a&&65487>=a||65490<=a&&65495>=a||65498<=a&&65500>=a||65536<=a&&65547>=a||65549<=a&&65574>=a||65576<=a&&65594>=a||65596<=a&&65597>=a||65599<=a&&65613>=a||65616<=a&&65629>=a||65664<=a&&65786>=a||65856<=a&&65908>=a||66045===a||66176<=a&&66204>=a||66208<=a&&66256>=a||66272===a||66304<=a&&66335>=a||66352<=a&&66378>=a||66384<=a&&66426>=a||66432<=a&&66461>=a||66464<=a&&66499>=a||66504<=a&&66511>=a||66513<=a&&66517>=a||66560<=a&&66717>=a|| +66720<=a&&66729>=a||66816<=a&&66855>=a||66864<=a&&66915>=a||67072<=a&&67382>=a||67392<=a&&67413>=a||67424<=a&&67431>=a||67584<=a&&67589>=a||67592===a||67594<=a&&67637>=a||67639<=a&&67640>=a||67644===a||67647<=a&&67669>=a||67680<=a&&67702>=a||67712<=a&&67742>=a||67808<=a&&67826>=a||67828<=a&&67829>=a||67840<=a&&67861>=a||67872<=a&&67897>=a||67968<=a&&68023>=a||68030<=a&&68031>=a||68096<=a&&68099>=a||68101<=a&&68102>=a||68108<=a&&68115>=a||68117<=a&&68119>=a||68121<=a&&68147>=a||68152<=a&&68154>=a|| +68159===a||68192<=a&&68220>=a||68224<=a&&68252>=a||68288<=a&&68295>=a||68297<=a&&68326>=a||68352<=a&&68405>=a||68416<=a&&68437>=a||68448<=a&&68466>=a||68480<=a&&68497>=a||68608<=a&&68680>=a||68736<=a&&68786>=a||68800<=a&&68850>=a||69632<=a&&69702>=a||69734<=a&&69743>=a||69759<=a&&69818>=a||69840<=a&&69864>=a||69872<=a&&69881>=a||69888<=a&&69940>=a||69942<=a&&69951>=a||69968<=a&&70003>=a||70006===a||70016<=a&&70084>=a||70090<=a&&70092>=a||70096<=a&&70106>=a||70108===a||70144<=a&&70161>=a||70163<=a&& +70199>=a||70272<=a&&70278>=a||70280===a||70282<=a&&70285>=a||70287<=a&&70301>=a||70303<=a&&70312>=a||70320<=a&&70378>=a||70384<=a&&70393>=a||70400<=a&&70403>=a||70405<=a&&70412>=a||70415<=a&&70416>=a||70419<=a&&70440>=a||70442<=a&&70448>=a||70450<=a&&70451>=a||70453<=a&&70457>=a||70460<=a&&70468>=a||70471<=a&&70472>=a||70475<=a&&70477>=a||70480===a||70487===a||70493<=a&&70499>=a||70502<=a&&70508>=a||70512<=a&&70516>=a||70784<=a&&70853>=a||70855===a||70864<=a&&70873>=a||71040<=a&&71093>=a||71096<= +a&&71104>=a||71128<=a&&71133>=a||71168<=a&&71232>=a||71236===a||71248<=a&&71257>=a||71296<=a&&71351>=a||71360<=a&&71369>=a||71424<=a&&71449>=a||71453<=a&&71467>=a||71472<=a&&71481>=a||71840<=a&&71913>=a||71935===a||72384<=a&&72440>=a||73728<=a&&74649>=a||74752<=a&&74862>=a||74880<=a&&75075>=a||77824<=a&&78894>=a||82944<=a&&83526>=a||92160<=a&&92728>=a||92736<=a&&92766>=a||92768<=a&&92777>=a||92880<=a&&92909>=a||92912<=a&&92916>=a||92928<=a&&92982>=a||92992<=a&&92995>=a||93008<=a&&93017>=a||93027<= +a&&93047>=a||93053<=a&&93071>=a||93952<=a&&94020>=a||94032<=a&&94078>=a||94095<=a&&94111>=a||110592<=a&&110593>=a||113664<=a&&113770>=a||113776<=a&&113788>=a||113792<=a&&113800>=a||113808<=a&&113817>=a||113821<=a&&113822>=a||119141<=a&&119145>=a||119149<=a&&119154>=a||119163<=a&&119170>=a||119173<=a&&119179>=a||119210<=a&&119213>=a||119362<=a&&119364>=a||119808<=a&&119892>=a||119894<=a&&119964>=a||119966<=a&&119967>=a||119970===a||119973<=a&&119974>=a||119977<=a&&119980>=a||119982<=a&&119993>=a|| +119995===a||119997<=a&&120003>=a||120005<=a&&120069>=a||120071<=a&&120074>=a||120077<=a&&120084>=a||120086<=a&&120092>=a||120094<=a&&120121>=a||120123<=a&&120126>=a||120128<=a&&120132>=a||120134===a||120138<=a&&120144>=a||120146<=a&&120485>=a||120488<=a&&120512>=a||120514<=a&&120538>=a||120540<=a&&120570>=a||120572<=a&&120596>=a||120598<=a&&120628>=a||120630<=a&&120654>=a||120656<=a&&120686>=a||120688<=a&&120712>=a||120714<=a&&120744>=a||120746<=a&&120770>=a||120772<=a&&120779>=a||120782<=a&&120831>= +a||121344<=a&&121398>=a||121403<=a&&121452>=a||121461===a||121476===a||121499<=a&&121503>=a||121505<=a&&121519>=a||124928<=a&&125124>=a||125136<=a&&125142>=a||126464<=a&&126467>=a||126469<=a&&126495>=a||126497<=a&&126498>=a||126500===a||126503===a||126505<=a&&126514>=a||126516<=a&&126519>=a||126521===a||126523===a||126530===a||126535===a||126537===a||126539===a||126541<=a&&126543>=a||126545<=a&&126546>=a||126548===a||126551===a||126553===a||126555===a||126557===a||126559===a||126561<=a&&126562>=a|| +126564===a||126567<=a&&126570>=a||126572<=a&&126578>=a||126580<=a&&126583>=a||126585<=a&&126588>=a||126590===a||126592<=a&&126601>=a||126603<=a&&126619>=a||126625<=a&&126627>=a||126629<=a&&126633>=a||126635<=a&&126651>=a||131072<=a&&173782>=a||173824<=a&&177972>=a||177984<=a&&178205>=a||178208<=a&&183969>=a||194560<=a&&195101>=a||917760<=a&&917999>=a?!0:!1)}c.module("ngParseExt",[]).config(["$parseProvider",function(b){b.setIdentifierFns(d,e)}]).info({angularVersion:"1.6.6"})})(window,window.angular); +//# sourceMappingURL=angular-parse-ext.min.js.map diff --git a/1.6.6/angular-parse-ext.min.js.map b/1.6.6/angular-parse-ext.min.js.map new file mode 100644 index 000000000..4b276d007 --- /dev/null +++ b/1.6.6/angular-parse-ext.min.js.map @@ -0,0 +1,8 @@ +{ +"version":3, +"file":"angular-parse-ext.min.js", +"lineCount":48, +"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkB,CA+tC3BC,QAASA,EAAsB,CAACC,CAAD,CAAKC,CAAL,CAAS,CACtC,MAAc,GAAd,GAAOD,CAAP,EACc,GADd,GACOA,CADP,GAxtCI,EA0iBJ,EAgrBaC,CAhrBb,EA1iB0B,EA0iB1B,EAgrBaA,CAhrBb,EAziBI,EAyiBJ,EAgrBaA,CAhrBb,EAziB0B,GAyiB1B,EAgrBaA,CAhrBb,EAxiBW,GAwiBX,GAgrBaA,CAhrBb,EAviBW,GAuiBX,GAgrBaA,CAhrBb,EAtiBW,GAsiBX,GAgrBaA,CAhrBb,EAriBI,GAqiBJ,EAgrBaA,CAhrBb,EAriB0B,GAqiB1B,EAgrBaA,CAhrBb,EApiBI,GAoiBJ,EAgrBaA,CAhrBb,EApiB0B,GAoiB1B,EAgrBaA,CAhrBb,EAniBI,GAmiBJ,EAgrBaA,CAhrBb,EAniB0B,GAmiB1B,EAgrBaA,CAhrBb,EAliBI,GAkiBJ,EAgrBaA,CAhrBb,EAliB0B,GAkiB1B,EAgrBaA,CAhrBb,EAjiBI,GAiiBJ,EAgrBaA,CAhrBb,EAjiB0B,GAiiB1B,EAgrBaA,CAhrBb,EAhiBW,GAgiBX,GAgrBaA,CAhrBb,EA/hBW,GA+hBX,GAgrBaA,CAhrBb,EA9hBI,GA8hBJ,EAgrBaA,CAhrBb,EA9hB0B,GA8hB1B,EAgrBaA,CAhrBb,EA7hBI,GA6hBJ,EAgrBaA,CAhrBb,EA7hB0B,GA6hB1B,EAgrBaA,CAhrBb,EA5hBI,GA4hBJ,EAgrBaA,CAhrBb,EA5hB0B,GA4hB1B,EAgrBaA,CAhrBb,EA3hBW,GA2hBX,GAgrBaA,CAhrBb,EA1hBW,GA0hBX,GAgrBaA,CAhrBb,EAzhBI,GAyhBJ,EAgrBaA,CAhrBb,EAzhB0B,GAyhB1B,EAgrBaA,CAhrBb,EAxhBW,GAwhBX,GAgrBaA,CAhrBb,EAvhBI,GAuhBJ,EAgrBaA,CAhrBb,EAvhB0B,GAuhB1B,EAgrBaA,CAhrBb,EAthBI,GAshBJ,EAgrBaA,CAhrBb,EAthB0B,IAshB1B,EAgrBaA,CAhrBb,EArhBI,IAqhBJ,EAgrBaA,CAhrBb,EArhB0B,IAqhB1B,EAgrBaA,CAhrBb,EAphBI,IAohBJ,EAgrBaA,CAhrBb,EAphB0B,IAohB1B,EAgrBaA,CAhrBb,EAnhBI,IAmhBJ,EAgrBaA,CAhrBb,EAnhB0B,IAmhB1B,EAgrBaA,CAhrBb,EAlhBW,IAkhBX,GAgrBaA,CAhrBb,EAjhBI,IAihBJ,EAgrBaA,CAhrBb,EAjhB0B,IAihB1B,EAgrBaA,CAhrBb,EAhhBI,IAghBJ,EAgrBaA,CAhrBb,EAhhB0B,IAghB1B,EAgrBaA,CAhrBb,EA/gBI,IA+gBJ,EAgrBaA,CAhrBb,EA/gB0B,IA+gB1B,EAgrBaA,CAhrBb,EA9gBI,IA8gBJ,EAgrBaA,CAhrBb,EA9gB0B,IA8gB1B,EAgrBaA,CAhrBb,EA7gBI,IA6gBJ,EAgrBaA,CAhrBb,EA7gB0B,IA6gB1B,EAgrBaA,CAhrBb;AA5gBI,IA4gBJ,EAgrBaA,CAhrBb,EA5gB0B,IA4gB1B,EAgrBaA,CAhrBb,EA3gBW,IA2gBX,GAgrBaA,CAhrBb,EA1gBI,IA0gBJ,EAgrBaA,CAhrBb,EA1gB0B,IA0gB1B,EAgrBaA,CAhrBb,EAzgBI,IAygBJ,EAgrBaA,CAhrBb,EAzgB0B,IAygB1B,EAgrBaA,CAhrBb,EAxgBI,IAwgBJ,EAgrBaA,CAhrBb,EAxgB0B,IAwgB1B,EAgrBaA,CAhrBb,EAvgBW,IAugBX,GAgrBaA,CAhrBb,EAtgBW,IAsgBX,GAgrBaA,CAhrBb,EArgBI,IAqgBJ,EAgrBaA,CAhrBb,EArgB0B,IAqgB1B,EAgrBaA,CAhrBb,EApgBI,IAogBJ,EAgrBaA,CAhrBb,EApgB0B,IAogB1B,EAgrBaA,CAhrBb,EAngBW,IAmgBX,GAgrBaA,CAhrBb,EAlgBI,IAkgBJ,EAgrBaA,CAhrBb,EAlgB0B,IAkgB1B,EAgrBaA,CAhrBb,EAjgBI,IAigBJ,EAgrBaA,CAhrBb,EAjgB0B,IAigB1B,EAgrBaA,CAhrBb,EAhgBW,IAggBX,GAgrBaA,CAhrBb,EA/fI,IA+fJ,EAgrBaA,CAhrBb,EA/f0B,IA+f1B,EAgrBaA,CAhrBb,EA9fW,IA8fX,GAgrBaA,CAhrBb,EA7fW,IA6fX,GAgrBaA,CAhrBb,EA5fW,IA4fX,GAgrBaA,CAhrBb,EA3fI,IA2fJ,EAgrBaA,CAhrBb,EA3f0B,IA2f1B,EAgrBaA,CAhrBb,EA1fI,IA0fJ,EAgrBaA,CAhrBb,EA1f0B,IA0f1B,EAgrBaA,CAhrBb,EAzfI,IAyfJ,EAgrBaA,CAhrBb,EAzf0B,IAyf1B,EAgrBaA,CAhrBb,EAxfW,IAwfX,GAgrBaA,CAhrBb,EAvfW,IAufX,GAgrBaA,CAhrBb,EAtfI,IAsfJ,EAgrBaA,CAhrBb,EAtf0B,IAsf1B,EAgrBaA,CAhrBb,EArfI,IAqfJ,EAgrBaA,CAhrBb,EArf0B,IAqf1B,EAgrBaA,CAhrBb,EApfI,IAofJ,EAgrBaA,CAhrBb,EApf0B,IAof1B,EAgrBaA,CAhrBb,EAnfI,IAmfJ,EAgrBaA,CAhrBb,EAnf0B,IAmf1B,EAgrBaA,CAhrBb,EAlfI,IAkfJ,EAgrBaA,CAhrBb,EAlf0B,IAkf1B,EAgrBaA,CAhrBb,EAjfI,IAifJ,EAgrBaA,CAhrBb,EAjf0B,IAif1B,EAgrBaA,CAhrBb,EAhfW,IAgfX,GAgrBaA,CAhrBb,EA/eI,IA+eJ,EAgrBaA,CAhrBb,EA/e0B,IA+e1B,EAgrBaA,CAhrBb,EA9eW,IA8eX,GAgrBaA,CAhrBb,EA7eW,IA6eX,GAgrBaA,CAhrBb,EA5eI,IA4eJ,EAgrBaA,CAhrBb,EA5e0B,IA4e1B,EAgrBaA,CAhrBb,EA3eI,IA2eJ,EAgrBaA,CAhrBb,EA3e0B,IA2e1B;AAgrBaA,CAhrBb,EA1eI,IA0eJ,EAgrBaA,CAhrBb,EA1e0B,IA0e1B,EAgrBaA,CAhrBb,EAzeI,IAyeJ,EAgrBaA,CAhrBb,EAze0B,IAye1B,EAgrBaA,CAhrBb,EAxeI,IAweJ,EAgrBaA,CAhrBb,EAxe0B,IAwe1B,EAgrBaA,CAhrBb,EAveI,IAueJ,EAgrBaA,CAhrBb,EAve0B,IAue1B,EAgrBaA,CAhrBb,EAteI,IAseJ,EAgrBaA,CAhrBb,EAte0B,IAse1B,EAgrBaA,CAhrBb,EAreI,IAqeJ,EAgrBaA,CAhrBb,EAre0B,IAqe1B,EAgrBaA,CAhrBb,EApeI,IAoeJ,EAgrBaA,CAhrBb,EApe0B,IAoe1B,EAgrBaA,CAhrBb,EAneI,IAmeJ,EAgrBaA,CAhrBb,EAne0B,IAme1B,EAgrBaA,CAhrBb,EAleI,IAkeJ,EAgrBaA,CAhrBb,EAle0B,IAke1B,EAgrBaA,CAhrBb,EAjeW,IAieX,GAgrBaA,CAhrBb,EAheI,IAgeJ,EAgrBaA,CAhrBb,EAhe0B,IAge1B,EAgrBaA,CAhrBb,EA/dI,IA+dJ,EAgrBaA,CAhrBb,EA/d0B,IA+d1B,EAgrBaA,CAhrBb,EA9dI,IA8dJ,EAgrBaA,CAhrBb,EA9d0B,IA8d1B,EAgrBaA,CAhrBb,EA7dI,IA6dJ,EAgrBaA,CAhrBb,EA7d0B,IA6d1B,EAgrBaA,CAhrBb,EA5dI,IA4dJ,EAgrBaA,CAhrBb,EA5d0B,IA4d1B,EAgrBaA,CAhrBb,EA3dI,IA2dJ,EAgrBaA,CAhrBb,EA3d0B,IA2d1B,EAgrBaA,CAhrBb,EA1dI,IA0dJ,EAgrBaA,CAhrBb,EA1d0B,IA0d1B,EAgrBaA,CAhrBb,EAzdW,IAydX,GAgrBaA,CAhrBb,EAxdW,IAwdX,GAgrBaA,CAhrBb,EAvdI,IAudJ,EAgrBaA,CAhrBb,EAvd0B,IAud1B,EAgrBaA,CAhrBb,EAtdW,IAsdX,GAgrBaA,CAhrBb,EArdI,IAqdJ,EAgrBaA,CAhrBb,EArd0B,IAqd1B,EAgrBaA,CAhrBb,EApdI,IAodJ,EAgrBaA,CAhrBb,EApd0B,IAod1B,EAgrBaA,CAhrBb,EAndI,IAmdJ,EAgrBaA,CAhrBb,EAnd0B,IAmd1B,EAgrBaA,CAhrBb,EAldI,IAkdJ,EAgrBaA,CAhrBb,EAld0B,IAkd1B,EAgrBaA,CAhrBb,EAjdI,IAidJ,EAgrBaA,CAhrBb,EAjd0B,IAid1B,EAgrBaA,CAhrBb,EAhdI,IAgdJ,EAgrBaA,CAhrBb,EAhd0B,IAgd1B,EAgrBaA,CAhrBb,EA/cW,IA+cX,GAgrBaA,CAhrBb,EA9cI,IA8cJ,EAgrBaA,CAhrBb,EA9c0B,IA8c1B,EAgrBaA,CAhrBb,EA7cI,IA6cJ,EAgrBaA,CAhrBb,EA7c0B,IA6c1B,EAgrBaA,CAhrBb;AA5cW,IA4cX,GAgrBaA,CAhrBb,EA3cW,IA2cX,GAgrBaA,CAhrBb,EA1cI,IA0cJ,EAgrBaA,CAhrBb,EA1c0B,IA0c1B,EAgrBaA,CAhrBb,EAzcI,IAycJ,EAgrBaA,CAhrBb,EAzc0B,IAyc1B,EAgrBaA,CAhrBb,EAxcI,IAwcJ,EAgrBaA,CAhrBb,EAxc0B,IAwc1B,EAgrBaA,CAhrBb,EAvcI,IAucJ,EAgrBaA,CAhrBb,EAvc0B,IAuc1B,EAgrBaA,CAhrBb,EAtcW,IAscX,GAgrBaA,CAhrBb,EArcI,IAqcJ,EAgrBaA,CAhrBb,EArc0B,IAqc1B,EAgrBaA,CAhrBb,EApcI,IAocJ,EAgrBaA,CAhrBb,EApc0B,IAoc1B,EAgrBaA,CAhrBb,EAncI,IAmcJ,EAgrBaA,CAhrBb,EAnc0B,IAmc1B,EAgrBaA,CAhrBb,EAlcI,IAkcJ,EAgrBaA,CAhrBb,EAlc0B,IAkc1B,EAgrBaA,CAhrBb,EAjcW,IAicX,GAgrBaA,CAhrBb,EAhcI,IAgcJ,EAgrBaA,CAhrBb,EAhc0B,IAgc1B,EAgrBaA,CAhrBb,EA/bI,IA+bJ,EAgrBaA,CAhrBb,EA/b0B,IA+b1B,EAgrBaA,CAhrBb,EA9bI,IA8bJ,EAgrBaA,CAhrBb,EA9b0B,IA8b1B,EAgrBaA,CAhrBb,EA7bI,IA6bJ,EAgrBaA,CAhrBb,EA7b0B,IA6b1B,EAgrBaA,CAhrBb,EA5bW,IA4bX,GAgrBaA,CAhrBb,EA3bI,IA2bJ,EAgrBaA,CAhrBb,EA3b0B,IA2b1B,EAgrBaA,CAhrBb,EA1bI,IA0bJ,EAgrBaA,CAhrBb,EA1b0B,IA0b1B,EAgrBaA,CAhrBb,EAzbI,IAybJ,EAgrBaA,CAhrBb,EAzb0B,IAyb1B,EAgrBaA,CAhrBb,EAxbI,IAwbJ,EAgrBaA,CAhrBb,EAxb0B,IAwb1B,EAgrBaA,CAhrBb,EAvbI,IAubJ,EAgrBaA,CAhrBb,EAvb0B,IAub1B,EAgrBaA,CAhrBb,EAtbI,IAsbJ,EAgrBaA,CAhrBb,EAtb0B,IAsb1B,EAgrBaA,CAhrBb,EArbI,IAqbJ,EAgrBaA,CAhrBb,EArb0B,IAqb1B,EAgrBaA,CAhrBb,EApbW,IAobX,GAgrBaA,CAhrBb,EAnbW,IAmbX,GAgrBaA,CAhrBb,EAlbI,IAkbJ,EAgrBaA,CAhrBb,EAlb0B,IAkb1B,EAgrBaA,CAhrBb,EAjbI,IAibJ,EAgrBaA,CAhrBb,EAjb0B,IAib1B,EAgrBaA,CAhrBb,EAhbI,IAgbJ,EAgrBaA,CAhrBb,EAhb0B,IAgb1B,EAgrBaA,CAhrBb,EA/aI,IA+aJ,EAgrBaA,CAhrBb,EA/a0B,IA+a1B,EAgrBaA,CAhrBb,EA9aI,IA8aJ,EAgrBaA,CAhrBb,EA9a0B,IA8a1B,EAgrBaA,CAhrBb;AA7aW,IA6aX,GAgrBaA,CAhrBb,EA5aW,IA4aX,GAgrBaA,CAhrBb,EA3aI,IA2aJ,EAgrBaA,CAhrBb,EA3a0B,IA2a1B,EAgrBaA,CAhrBb,EA1aI,IA0aJ,EAgrBaA,CAhrBb,EA1a0B,IA0a1B,EAgrBaA,CAhrBb,EAzaI,IAyaJ,EAgrBaA,CAhrBb,EAza0B,IAya1B,EAgrBaA,CAhrBb,EAxaI,IAwaJ,EAgrBaA,CAhrBb,EAxa0B,IAwa1B,EAgrBaA,CAhrBb,EAvaI,IAuaJ,EAgrBaA,CAhrBb,EAva0B,IAua1B,EAgrBaA,CAhrBb,EAtaW,IAsaX,GAgrBaA,CAhrBb,EAraI,IAqaJ,EAgrBaA,CAhrBb,EAra0B,IAqa1B,EAgrBaA,CAhrBb,EApaI,IAoaJ,EAgrBaA,CAhrBb,EApa0B,IAoa1B,EAgrBaA,CAhrBb,EAnaI,IAmaJ,EAgrBaA,CAhrBb,EAna0B,IAma1B,EAgrBaA,CAhrBb,EAlaI,IAkaJ,EAgrBaA,CAhrBb,EAla0B,IAka1B,EAgrBaA,CAhrBb,EAjaI,IAiaJ,EAgrBaA,CAhrBb,EAja0B,IAia1B,EAgrBaA,CAhrBb,EAhaW,IAgaX,GAgrBaA,CAhrBb,EA/ZI,IA+ZJ,EAgrBaA,CAhrBb,EA/Z0B,IA+Z1B,EAgrBaA,CAhrBb,EA9ZW,IA8ZX,GAgrBaA,CAhrBb,EA7ZW,IA6ZX,GAgrBaA,CAhrBb,EA5ZI,IA4ZJ,EAgrBaA,CAhrBb,EA5Z0B,IA4Z1B,EAgrBaA,CAhrBb,EA3ZI,IA2ZJ,EAgrBaA,CAhrBb,EA3Z0B,IA2Z1B,EAgrBaA,CAhrBb,EA1ZI,IA0ZJ,EAgrBaA,CAhrBb,EA1Z0B,IA0Z1B,EAgrBaA,CAhrBb,EAzZW,IAyZX,GAgrBaA,CAhrBb,EAxZW,IAwZX,GAgrBaA,CAhrBb,EAvZI,IAuZJ,EAgrBaA,CAhrBb,EAvZ0B,IAuZ1B,EAgrBaA,CAhrBb,EAtZI,IAsZJ,EAgrBaA,CAhrBb,EAtZ0B,IAsZ1B,EAgrBaA,CAhrBb,EArZI,IAqZJ,EAgrBaA,CAhrBb,EArZ0B,IAqZ1B,EAgrBaA,CAhrBb,EApZW,IAoZX,GAgrBaA,CAhrBb,EAnZI,IAmZJ,EAgrBaA,CAhrBb,EAnZ0B,IAmZ1B,EAgrBaA,CAhrBb,EAlZW,IAkZX,GAgrBaA,CAhrBb,EAjZI,IAiZJ,EAgrBaA,CAhrBb,EAjZ0B,IAiZ1B,EAgrBaA,CAhrBb,EAhZW,IAgZX,GAgrBaA,CAhrBb,EA/YI,IA+YJ,EAgrBaA,CAhrBb,EA/Y0B,IA+Y1B,EAgrBaA,CAhrBb,EA9YI,IA8YJ,EAgrBaA,CAhrBb,EA9Y0B,IA8Y1B,EAgrBaA,CAhrBb,EA7YI,IA6YJ,EAgrBaA,CAhrBb,EA7Y0B,IA6Y1B;AAgrBaA,CAhrBb,EA5YI,IA4YJ,EAgrBaA,CAhrBb,EA5Y0B,IA4Y1B,EAgrBaA,CAhrBb,EA3YW,IA2YX,GAgrBaA,CAhrBb,EA1YI,IA0YJ,EAgrBaA,CAhrBb,EA1Y0B,IA0Y1B,EAgrBaA,CAhrBb,EAzYI,IAyYJ,EAgrBaA,CAhrBb,EAzY0B,IAyY1B,EAgrBaA,CAhrBb,EAxYW,IAwYX,GAgrBaA,CAhrBb,EAvYI,IAuYJ,EAgrBaA,CAhrBb,EAvY0B,IAuY1B,EAgrBaA,CAhrBb,EAtYI,IAsYJ,EAgrBaA,CAhrBb,EAtY0B,IAsY1B,EAgrBaA,CAhrBb,EArYI,IAqYJ,EAgrBaA,CAhrBb,EArY0B,IAqY1B,EAgrBaA,CAhrBb,EApYW,IAoYX,GAgrBaA,CAhrBb,EAnYI,IAmYJ,EAgrBaA,CAhrBb,EAnY0B,IAmY1B,EAgrBaA,CAhrBb,EAlYW,IAkYX,GAgrBaA,CAhrBb,EAjYW,IAiYX,GAgrBaA,CAhrBb,EAhYI,IAgYJ,EAgrBaA,CAhrBb,EAhY0B,IAgY1B,EAgrBaA,CAhrBb,EA/XI,IA+XJ,EAgrBaA,CAhrBb,EA/X0B,IA+X1B,EAgrBaA,CAhrBb,EA9XI,IA8XJ,EAgrBaA,CAhrBb,EA9X0B,IA8X1B,EAgrBaA,CAhrBb,EA7XI,IA6XJ,EAgrBaA,CAhrBb,EA7X0B,IA6X1B,EAgrBaA,CAhrBb,EA5XW,IA4XX,GAgrBaA,CAhrBb,EA3XI,IA2XJ,EAgrBaA,CAhrBb,EA3X0B,IA2X1B,EAgrBaA,CAhrBb,EA1XI,IA0XJ,EAgrBaA,CAhrBb,EA1X0B,IA0X1B,EAgrBaA,CAhrBb,EAzXI,IAyXJ,EAgrBaA,CAhrBb,EAzX0B,IAyX1B,EAgrBaA,CAhrBb,EAxXI,IAwXJ,EAgrBaA,CAhrBb,EAxX0B,IAwX1B,EAgrBaA,CAhrBb,EAvXI,IAuXJ,EAgrBaA,CAhrBb,EAvX0B,IAuX1B,EAgrBaA,CAhrBb,EAtXI,IAsXJ,EAgrBaA,CAhrBb,EAtX0B,IAsX1B,EAgrBaA,CAhrBb,EArXW,IAqXX,GAgrBaA,CAhrBb,EApXI,IAoXJ,EAgrBaA,CAhrBb,EApX0B,IAoX1B,EAgrBaA,CAhrBb,EAnXI,IAmXJ,EAgrBaA,CAhrBb,EAnX0B,IAmX1B,EAgrBaA,CAhrBb,EAlXI,IAkXJ,EAgrBaA,CAhrBb,EAlX0B,IAkX1B,EAgrBaA,CAhrBb,EAjXI,IAiXJ,EAgrBaA,CAhrBb,EAjX0B,IAiX1B,EAgrBaA,CAhrBb,EAhXI,IAgXJ,EAgrBaA,CAhrBb,EAhX0B,IAgX1B,EAgrBaA,CAhrBb,EA/WI,IA+WJ,EAgrBaA,CAhrBb,EA/W0B,IA+W1B,EAgrBaA,CAhrBb,EA9WI,IA8WJ,EAgrBaA,CAhrBb,EA9W0B,IA8W1B;AAgrBaA,CAhrBb,EA7WI,IA6WJ,EAgrBaA,CAhrBb,EA7W0B,IA6W1B,EAgrBaA,CAhrBb,EA5WI,IA4WJ,EAgrBaA,CAhrBb,EA5W0B,IA4W1B,EAgrBaA,CAhrBb,EA3WI,IA2WJ,EAgrBaA,CAhrBb,EA3W0B,IA2W1B,EAgrBaA,CAhrBb,EA1WI,IA0WJ,EAgrBaA,CAhrBb,EA1W0B,IA0W1B,EAgrBaA,CAhrBb,EAzWI,IAyWJ,EAgrBaA,CAhrBb,EAzW0B,IAyW1B,EAgrBaA,CAhrBb,EAxWI,IAwWJ,EAgrBaA,CAhrBb,EAxW0B,IAwW1B,EAgrBaA,CAhrBb,EAvWI,IAuWJ,EAgrBaA,CAhrBb,EAvW0B,IAuW1B,EAgrBaA,CAhrBb,EAtWI,IAsWJ,EAgrBaA,CAhrBb,EAtW0B,IAsW1B,EAgrBaA,CAhrBb,EArWI,IAqWJ,EAgrBaA,CAhrBb,EArW0B,IAqW1B,EAgrBaA,CAhrBb,EApWI,IAoWJ,EAgrBaA,CAhrBb,EApW0B,IAoW1B,EAgrBaA,CAhrBb,EAnWI,IAmWJ,EAgrBaA,CAhrBb,EAnW0B,IAmW1B,EAgrBaA,CAhrBb,EAlWI,IAkWJ,EAgrBaA,CAhrBb,EAlW0B,GAkW1B,EAgrBaA,CAhrBb,EAjWI,IAiWJ,EAgrBaA,CAhrBb,EAjW0B,IAiW1B,EAgrBaA,CAhrBb,EAhWW,IAgWX,GAgrBaA,CAhrBb,EA/VW,IA+VX,GAgrBaA,CAhrBb,EA9VI,IA8VJ,EAgrBaA,CAhrBb,EA9V0B,IA8V1B,EAgrBaA,CAhrBb,EA7VI,IA6VJ,EAgrBaA,CAhrBb,EA7V0B,IA6V1B,EAgrBaA,CAhrBb,EA5VW,IA4VX,GAgrBaA,CAhrBb,EA3VI,IA2VJ,EAgrBaA,CAhrBb,EA3V0B,IA2V1B,EAgrBaA,CAhrBb,EA1VI,IA0VJ,EAgrBaA,CAhrBb,EA1V0B,IA0V1B,EAgrBaA,CAhrBb,EAzVI,IAyVJ,EAgrBaA,CAhrBb,EAzV0B,IAyV1B,EAgrBaA,CAhrBb,EAxVI,IAwVJ,EAgrBaA,CAhrBb,EAxV0B,IAwV1B,EAgrBaA,CAhrBb,EAvVI,IAuVJ,EAgrBaA,CAhrBb,EAvV0B,IAuV1B,EAgrBaA,CAhrBb,EAtVI,IAsVJ,EAgrBaA,CAhrBb,EAtV0B,IAsV1B,EAgrBaA,CAhrBb,EArVI,IAqVJ,EAgrBaA,CAhrBb,EArV0B,IAqV1B,EAgrBaA,CAhrBb,EApVI,IAoVJ,EAgrBaA,CAhrBb,EApV0B,IAoV1B,EAgrBaA,CAhrBb,EAnVW,IAmVX,GAgrBaA,CAhrBb,EAlVI,IAkVJ,EAgrBaA,CAhrBb,EAlV0B,IAkV1B,EAgrBaA,CAhrBb,EAjVI,IAiVJ,EAgrBaA,CAhrBb,EAjV0B,IAiV1B,EAgrBaA,CAhrBb,EAhVI,IAgVJ,EAgrBaA,CAhrBb;AAhV0B,IAgV1B,EAgrBaA,CAhrBb,EA/UI,IA+UJ,EAgrBaA,CAhrBb,EA/U0B,IA+U1B,EAgrBaA,CAhrBb,EA9UI,IA8UJ,EAgrBaA,CAhrBb,EA9U0B,IA8U1B,EAgrBaA,CAhrBb,EA7UI,IA6UJ,EAgrBaA,CAhrBb,EA7U0B,IA6U1B,EAgrBaA,CAhrBb,EA5UI,IA4UJ,EAgrBaA,CAhrBb,EA5U0B,IA4U1B,EAgrBaA,CAhrBb,EA3UI,IA2UJ,EAgrBaA,CAhrBb,EA3U0B,IA2U1B,EAgrBaA,CAhrBb,EA1UI,IA0UJ,EAgrBaA,CAhrBb,EA1U0B,IA0U1B,EAgrBaA,CAhrBb,EAzUI,IAyUJ,EAgrBaA,CAhrBb,EAzU0B,IAyU1B,EAgrBaA,CAhrBb,EAxUI,IAwUJ,EAgrBaA,CAhrBb,EAxU0B,IAwU1B,EAgrBaA,CAhrBb,EAvUI,IAuUJ,EAgrBaA,CAhrBb,EAvU0B,IAuU1B,EAgrBaA,CAhrBb,EAtUI,IAsUJ,EAgrBaA,CAhrBb,EAtU0B,IAsU1B,EAgrBaA,CAhrBb,EArUI,IAqUJ,EAgrBaA,CAhrBb,EArU0B,IAqU1B,EAgrBaA,CAhrBb,EApUI,IAoUJ,EAgrBaA,CAhrBb,EApU0B,IAoU1B,EAgrBaA,CAhrBb,EAnUI,IAmUJ,EAgrBaA,CAhrBb,EAnU0B,IAmU1B,EAgrBaA,CAhrBb,EAlUI,IAkUJ,EAgrBaA,CAhrBb,EAlU0B,IAkU1B,EAgrBaA,CAhrBb,EAjUW,IAiUX,GAgrBaA,CAhrBb,EAhUW,IAgUX,GAgrBaA,CAhrBb,EA/TW,IA+TX,GAgrBaA,CAhrBb,EA9TI,IA8TJ,EAgrBaA,CAhrBb,EA9T0B,IA8T1B,EAgrBaA,CAhrBb,EA7TI,IA6TJ,EAgrBaA,CAhrBb,EA7T0B,IA6T1B,EAgrBaA,CAhrBb,EA5TI,IA4TJ,EAgrBaA,CAhrBb,EA5T0B,IA4T1B,EAgrBaA,CAhrBb,EA3TW,IA2TX,GAgrBaA,CAhrBb,EA1TI,IA0TJ,EAgrBaA,CAhrBb,EA1T0B,IA0T1B,EAgrBaA,CAhrBb,EAzTI,IAyTJ,EAgrBaA,CAhrBb,EAzT0B,IAyT1B,EAgrBaA,CAhrBb,EAxTI,IAwTJ,EAgrBaA,CAhrBb,EAxT0B,IAwT1B,EAgrBaA,CAhrBb,EAvTI,IAuTJ,EAgrBaA,CAhrBb,EAvT0B,IAuT1B,EAgrBaA,CAhrBb,EAtTI,IAsTJ,EAgrBaA,CAhrBb,EAtT0B,IAsT1B,EAgrBaA,CAhrBb,EArTI,IAqTJ,EAgrBaA,CAhrBb,EArT0B,IAqT1B,EAgrBaA,CAhrBb,EApTI,IAoTJ,EAgrBaA,CAhrBb,EApT0B,IAoT1B,EAgrBaA,CAhrBb,EAnTW,IAmTX,GAgrBaA,CAhrBb,EAlTW,IAkTX,GAgrBaA,CAhrBb;AAjTI,IAiTJ,EAgrBaA,CAhrBb,EAjT0B,IAiT1B,EAgrBaA,CAhrBb,EAhTW,IAgTX,GAgrBaA,CAhrBb,EA/SW,IA+SX,GAgrBaA,CAhrBb,EA9SI,IA8SJ,EAgrBaA,CAhrBb,EA9S0B,IA8S1B,EAgrBaA,CAhrBb,EA7SW,IA6SX,GAgrBaA,CAhrBb,EA5SI,IA4SJ,EAgrBaA,CAhrBb,EA5S0B,IA4S1B,EAgrBaA,CAhrBb,EA3SW,IA2SX,GAgrBaA,CAhrBb,EA1SW,IA0SX,GAgrBaA,CAhrBb,EAzSW,IAySX,GAgrBaA,CAhrBb,EAxSI,IAwSJ,EAgrBaA,CAhrBb,EAxS0B,IAwS1B,EAgrBaA,CAhrBb,EAvSI,IAuSJ,EAgrBaA,CAhrBb,EAvS0B,IAuS1B,EAgrBaA,CAhrBb,EAtSI,IAsSJ,EAgrBaA,CAhrBb,EAtS0B,IAsS1B,EAgrBaA,CAhrBb,EArSW,IAqSX,GAgrBaA,CAhrBb,EApSI,IAoSJ,EAgrBaA,CAhrBb,EApS0B,IAoS1B,EAgrBaA,CAhrBb,EAnSI,KAmSJ,EAgrBaA,CAhrBb,EAnS0B,KAmS1B,EAgrBaA,CAhrBb,EAlSI,KAkSJ,EAgrBaA,CAhrBb,EAlS0B,KAkS1B,EAgrBaA,CAhrBb,EAjSI,KAiSJ,EAgrBaA,CAhrBb,EAjS0B,KAiS1B,EAgrBaA,CAhrBb,EAhSI,KAgSJ,EAgrBaA,CAhrBb,EAhS0B,KAgS1B,EAgrBaA,CAhrBb,EA/RI,KA+RJ,EAgrBaA,CAhrBb,EA/R0B,KA+R1B,EAgrBaA,CAhrBb,EA9RI,KA8RJ,EAgrBaA,CAhrBb,EA9R0B,KA8R1B,EAgrBaA,CAhrBb,EA7RW,KA6RX,GAgrBaA,CAhrBb,EA5RW,KA4RX,GAgrBaA,CAhrBb,EA3RI,KA2RJ,EAgrBaA,CAhrBb,EA3R0B,KA2R1B,EAgrBaA,CAhrBb,EA1RW,KA0RX,GAgrBaA,CAhrBb,EAzRI,KAyRJ,EAgrBaA,CAhrBb,EAzR0B,KAyR1B,EAgrBaA,CAhrBb,EAxRI,KAwRJ,EAgrBaA,CAhrBb,EAxR0B,KAwR1B,EAgrBaA,CAhrBb,EAvRI,KAuRJ,EAgrBaA,CAhrBb,EAvR0B,KAuR1B,EAgrBaA,CAhrBb,EAtRI,KAsRJ,EAgrBaA,CAhrBb,EAtR0B,KAsR1B,EAgrBaA,CAhrBb,EArRI,KAqRJ,EAgrBaA,CAhrBb,EArR0B,KAqR1B,EAgrBaA,CAhrBb,EApRI,KAoRJ,EAgrBaA,CAhrBb,EApR0B,KAoR1B,EAgrBaA,CAhrBb,EAnRI,KAmRJ,EAgrBaA,CAhrBb,EAnR0B,KAmR1B;AAgrBaA,CAhrBb,EAlRI,KAkRJ,EAgrBaA,CAhrBb,EAlR0B,KAkR1B,EAgrBaA,CAhrBb,EAjRI,KAiRJ,EAgrBaA,CAhrBb,EAjR0B,KAiR1B,EAgrBaA,CAhrBb,EAhRI,KAgRJ,EAgrBaA,CAhrBb,EAhR0B,KAgR1B,EAgrBaA,CAhrBb,EA/QI,KA+QJ,EAgrBaA,CAhrBb,EA/Q0B,KA+Q1B,EAgrBaA,CAhrBb,EA9QI,KA8QJ,EAgrBaA,CAhrBb,EA9Q0B,KA8Q1B,EAgrBaA,CAhrBb,EA7QI,KA6QJ,EAgrBaA,CAhrBb,EA7Q0B,KA6Q1B,EAgrBaA,CAhrBb,EA5QI,KA4QJ,EAgrBaA,CAhrBb,EA5Q0B,KA4Q1B,EAgrBaA,CAhrBb,EA3QI,KA2QJ,EAgrBaA,CAhrBb,EA3Q0B,KA2Q1B,EAgrBaA,CAhrBb,EA1QI,KA0QJ,EAgrBaA,CAhrBb,EA1Q0B,KA0Q1B,EAgrBaA,CAhrBb,EAzQI,KAyQJ,EAgrBaA,CAhrBb,EAzQ0B,KAyQ1B,EAgrBaA,CAhrBb,EAxQI,KAwQJ,EAgrBaA,CAhrBb,EAxQ0B,KAwQ1B,EAgrBaA,CAhrBb,EAvQI,KAuQJ,EAgrBaA,CAhrBb,EAvQ0B,KAuQ1B,EAgrBaA,CAhrBb,EAtQI,KAsQJ,EAgrBaA,CAhrBb,EAtQ0B,KAsQ1B,EAgrBaA,CAhrBb,EArQI,KAqQJ,EAgrBaA,CAhrBb,EArQ0B,KAqQ1B,EAgrBaA,CAhrBb,EApQI,KAoQJ,EAgrBaA,CAhrBb,EApQ0B,KAoQ1B,EAgrBaA,CAhrBb,EAnQI,KAmQJ,EAgrBaA,CAhrBb,EAnQ0B,KAmQ1B,EAgrBaA,CAhrBb,EAlQI,KAkQJ,EAgrBaA,CAhrBb,EAlQ0B,KAkQ1B,EAgrBaA,CAhrBb,EAjQI,KAiQJ,EAgrBaA,CAhrBb,EAjQ0B,KAiQ1B,EAgrBaA,CAhrBb,EAhQI,KAgQJ,EAgrBaA,CAhrBb,EAhQ0B,KAgQ1B,EAgrBaA,CAhrBb,EA/PI,KA+PJ,EAgrBaA,CAhrBb,EA/P0B,KA+P1B,EAgrBaA,CAhrBb,EA9PI,KA8PJ,EAgrBaA,CAhrBb,EA9P0B,KA8P1B,EAgrBaA,CAhrBb,EA7PI,KA6PJ,EAgrBaA,CAhrBb,EA7P0B,KA6P1B,EAgrBaA,CAhrBb,EA5PI,KA4PJ,EAgrBaA,CAhrBb,EA5P0B,KA4P1B,EAgrBaA,CAhrBb,EA3PI,KA2PJ,EAgrBaA,CAhrBb,EA3P0B,KA2P1B,EAgrBaA,CAhrBb,EA1PI,KA0PJ,EAgrBaA,CAhrBb,EA1P0B,KA0P1B,EAgrBaA,CAhrBb;AAzPI,KAyPJ,EAgrBaA,CAhrBb,EAzP0B,KAyP1B,EAgrBaA,CAhrBb,EAxPI,KAwPJ,EAgrBaA,CAhrBb,EAxP0B,KAwP1B,EAgrBaA,CAhrBb,EAvPI,KAuPJ,EAgrBaA,CAhrBb,EAvP0B,KAuP1B,EAgrBaA,CAhrBb,EAtPI,KAsPJ,EAgrBaA,CAhrBb,EAtP0B,KAsP1B,EAgrBaA,CAhrBb,EArPI,KAqPJ,EAgrBaA,CAhrBb,EArP0B,KAqP1B,EAgrBaA,CAhrBb,EApPI,KAoPJ,EAgrBaA,CAhrBb,EApP0B,KAoP1B,EAgrBaA,CAhrBb,EAnPI,KAmPJ,EAgrBaA,CAhrBb,EAnP0B,KAmP1B,EAgrBaA,CAhrBb,EAlPI,KAkPJ,EAgrBaA,CAhrBb,EAlP0B,KAkP1B,EAgrBaA,CAhrBb,EAjPI,KAiPJ,EAgrBaA,CAhrBb,EAjP0B,KAiP1B,EAgrBaA,CAhrBb,EAhPI,KAgPJ,EAgrBaA,CAhrBb,EAhP0B,KAgP1B,EAgrBaA,CAhrBb,EA/OW,KA+OX,GAgrBaA,CAhrBb,EA9OW,KA8OX,GAgrBaA,CAhrBb,EA7OI,KA6OJ,EAgrBaA,CAhrBb,EA7O0B,KA6O1B,EAgrBaA,CAhrBb,EA5OI,KA4OJ,EAgrBaA,CAhrBb,EA5O0B,KA4O1B,EAgrBaA,CAhrBb,EA3OI,KA2OJ,EAgrBaA,CAhrBb,EA3O0B,KA2O1B,EAgrBaA,CAhrBb,EA1OI,KA0OJ,EAgrBaA,CAhrBb,EA1O0B,KA0O1B,EAgrBaA,CAhrBb,EAzOW,KAyOX,GAgrBaA,CAhrBb,EAxOI,KAwOJ,EAgrBaA,CAhrBb,EAxO0B,KAwO1B,EAgrBaA,CAhrBb,EAvOI,KAuOJ,EAgrBaA,CAhrBb,EAvO0B,KAuO1B,EAgrBaA,CAhrBb,EAtOI,KAsOJ,EAgrBaA,CAhrBb,EAtO0B,KAsO1B,EAgrBaA,CAhrBb,EArOI,KAqOJ,EAgrBaA,CAhrBb,EArO0B,KAqO1B,EAgrBaA,CAhrBb,EApOI,KAoOJ,EAgrBaA,CAhrBb,EApO0B,KAoO1B,EAgrBaA,CAhrBb,EAnOI,KAmOJ,EAgrBaA,CAhrBb,EAnO0B,KAmO1B,EAgrBaA,CAhrBb,EAlOI,KAkOJ,EAgrBaA,CAhrBb,EAlO0B,KAkO1B,EAgrBaA,CAhrBb,EAjOW,KAiOX,GAgrBaA,CAhrBb,EAhOI,KAgOJ,EAgrBaA,CAhrBb,EAhO0B,KAgO1B,EAgrBaA,CAhrBb,EA/NW,KA+NX,GAgrBaA,CAhrBb,EA9NI,KA8NJ;AAgrBaA,CAhrBb,EA9N0B,KA8N1B,EAgrBaA,CAhrBb,EA7NI,KA6NJ,EAgrBaA,CAhrBb,EA7N0B,KA6N1B,EAgrBaA,CAhrBb,EA5NW,KA4NX,GAgrBaA,CAhrBb,EA3NW,KA2NX,GAgrBaA,CAhrBb,EA1NI,KA0NJ,EAgrBaA,CAhrBb,EA1N0B,KA0N1B,EAgrBaA,CAhrBb,EAzNI,KAyNJ,EAgrBaA,CAhrBb,EAzN0B,KAyN1B,EAgrBaA,CAhrBb,EAxNI,KAwNJ,EAgrBaA,CAhrBb,EAxN0B,KAwN1B,EAgrBaA,CAhrBb,EAvNI,KAuNJ,EAgrBaA,CAhrBb,EAvN0B,KAuN1B,EAgrBaA,CAhrBb,EAtNI,KAsNJ,EAgrBaA,CAhrBb,EAtN0B,KAsN1B,EAgrBaA,CAhrBb,EArNI,KAqNJ,EAgrBaA,CAhrBb,EArN0B,KAqN1B,EAgrBaA,CAhrBb,EApNI,KAoNJ,EAgrBaA,CAhrBb,EApN0B,KAoN1B,EAgrBaA,CAhrBb,EAnNI,KAmNJ,EAgrBaA,CAhrBb,EAnN0B,KAmN1B,EAgrBaA,CAhrBb,EAlNI,KAkNJ,EAgrBaA,CAhrBb,EAlN0B,KAkN1B,EAgrBaA,CAhrBb,EAjNI,KAiNJ,EAgrBaA,CAhrBb,EAjN0B,KAiN1B,EAgrBaA,CAhrBb,EAhNI,KAgNJ,EAgrBaA,CAhrBb,EAhN0B,KAgN1B,EAgrBaA,CAhrBb,EA/MI,KA+MJ,EAgrBaA,CAhrBb,EA/M0B,KA+M1B,EAgrBaA,CAhrBb,EA9MI,KA8MJ,EAgrBaA,CAhrBb,EA9M0B,KA8M1B,EAgrBaA,CAhrBb,EA7MI,KA6MJ,EAgrBaA,CAhrBb,EA7M0B,KA6M1B,EAgrBaA,CAhrBb,EA5MI,KA4MJ,EAgrBaA,CAhrBb,EA5M0B,KA4M1B,EAgrBaA,CAhrBb,EA3MI,KA2MJ,EAgrBaA,CAhrBb,EA3M0B,KA2M1B,EAgrBaA,CAhrBb,EA1MI,KA0MJ,EAgrBaA,CAhrBb,EA1M0B,KA0M1B,EAgrBaA,CAhrBb,EAzMI,KAyMJ,EAgrBaA,CAhrBb,EAzM0B,KAyM1B,EAgrBaA,CAhrBb,EAxMW,KAwMX,GAgrBaA,CAhrBb,EAvMI,KAuMJ,EAgrBaA,CAhrBb,EAvM0B,KAuM1B,EAgrBaA,CAhrBb,EAtMI,KAsMJ,EAgrBaA,CAhrBb,EAtM0B,KAsM1B,EAgrBaA,CAhrBb,EArMI,KAqMJ,EAgrBaA,CAhrBb,EArM0B,KAqM1B,EAgrBaA,CAhrBb,EApMW,KAoMX,GAgrBaA,CAhrBb,EAnMI,KAmMJ;AAgrBaA,CAhrBb,EAnM0B,KAmM1B,EAgrBaA,CAhrBb,EAlMI,KAkMJ,EAgrBaA,CAhrBb,EAlM0B,KAkM1B,EAgrBaA,CAhrBb,EAjMI,KAiMJ,EAgrBaA,CAhrBb,EAjM0B,KAiM1B,EAgrBaA,CAhrBb,EAhMI,KAgMJ,EAgrBaA,CAhrBb,EAhM0B,KAgM1B,EAgrBaA,CAhrBb,EA/LI,KA+LJ,EAgrBaA,CAhrBb,EA/L0B,KA+L1B,EAgrBaA,CAhrBb,EA9LI,KA8LJ,EAgrBaA,CAhrBb,EA9L0B,KA8L1B,EAgrBaA,CAhrBb,EA7LI,KA6LJ,EAgrBaA,CAhrBb,EA7L0B,KA6L1B,EAgrBaA,CAhrBb,EA5LI,KA4LJ,EAgrBaA,CAhrBb,EA5L0B,KA4L1B,EAgrBaA,CAhrBb,EA3LI,KA2LJ,EAgrBaA,CAhrBb,EA3L0B,KA2L1B,EAgrBaA,CAhrBb,EA1LI,KA0LJ,EAgrBaA,CAhrBb,EA1L0B,KA0L1B,EAgrBaA,CAhrBb,EAzLI,KAyLJ,EAgrBaA,CAhrBb,EAzL0B,KAyL1B,EAgrBaA,CAhrBb,EAxLI,KAwLJ,EAgrBaA,CAhrBb,EAxL0B,KAwL1B,EAgrBaA,CAhrBb,EAvLI,KAuLJ,EAgrBaA,CAhrBb,EAvL0B,KAuL1B,EAgrBaA,CAhrBb,EAtLI,KAsLJ,EAgrBaA,CAhrBb,EAtL0B,KAsL1B,EAgrBaA,CAhrBb,EArLI,KAqLJ,EAgrBaA,CAhrBb,EArL0B,KAqL1B,EAgrBaA,CAhrBb,EApLI,KAoLJ,EAgrBaA,CAhrBb,EApL0B,KAoL1B,EAgrBaA,CAhrBb,EAnLI,KAmLJ,EAgrBaA,CAhrBb,EAnL2B,KAmL3B,EAgrBaA,CAhrBb,EAlLI,KAkLJ,EAgrBaA,CAhrBb,EAlL2B,KAkL3B,EAgrBaA,CAhrBb,EAjLI,KAiLJ,EAgrBaA,CAhrBb,EAjL2B,KAiL3B,EAgrBaA,CAhrBb,EAhLI,KAgLJ,EAgrBaA,CAhrBb,EAhL2B,KAgL3B,EAgrBaA,CAhrBb,EA/KI,KA+KJ,EAgrBaA,CAhrBb,EA/K2B,KA+K3B,EAgrBaA,CAhrBb,EA9KI,KA8KJ,EAgrBaA,CAhrBb,EA9K2B,KA8K3B,EAgrBaA,CAhrBb,EA7KI,KA6KJ,EAgrBaA,CAhrBb,EA7K2B,KA6K3B,EAgrBaA,CAhrBb,EA5KI,KA4KJ,EAgrBaA,CAhrBb,EA5K2B,KA4K3B,EAgrBaA,CAhrBb,EA3KI,KA2KJ,EAgrBaA,CAhrBb,EA3K2B,KA2K3B,EAgrBaA,CAhrBb,EA1KI,KA0KJ,EAgrBaA,CAhrBb;AA1K2B,KA0K3B,EAgrBaA,CAhrBb,EAzKI,KAyKJ,EAgrBaA,CAhrBb,EAzK2B,KAyK3B,EAgrBaA,CAhrBb,EAxKI,KAwKJ,EAgrBaA,CAhrBb,EAxK2B,KAwK3B,EAgrBaA,CAhrBb,EAvKI,KAuKJ,EAgrBaA,CAhrBb,EAvK2B,KAuK3B,EAgrBaA,CAhrBb,EAtKI,KAsKJ,EAgrBaA,CAhrBb,EAtK2B,KAsK3B,EAgrBaA,CAhrBb,EArKI,KAqKJ,EAgrBaA,CAhrBb,EArK2B,KAqK3B,EAgrBaA,CAhrBb,EApKI,KAoKJ,EAgrBaA,CAhrBb,EApK2B,KAoK3B,EAgrBaA,CAhrBb,EAnKI,KAmKJ,EAgrBaA,CAhrBb,EAnK2B,KAmK3B,EAgrBaA,CAhrBb,EAlKI,KAkKJ,EAgrBaA,CAhrBb,EAlK2B,KAkK3B,EAgrBaA,CAhrBb,EAjKI,KAiKJ,EAgrBaA,CAhrBb,EAjK2B,KAiK3B,EAgrBaA,CAhrBb,EAhKI,KAgKJ,EAgrBaA,CAhrBb,EAhK2B,KAgK3B,EAgrBaA,CAhrBb,EA/JI,KA+JJ,EAgrBaA,CAhrBb,EA/J2B,KA+J3B,EAgrBaA,CAhrBb,EA9JI,KA8JJ,EAgrBaA,CAhrBb,EA9J2B,KA8J3B,EAgrBaA,CAhrBb,EA7JI,KA6JJ,EAgrBaA,CAhrBb,EA7J2B,KA6J3B,EAgrBaA,CAhrBb,EA5JI,KA4JJ,EAgrBaA,CAhrBb,EA5J2B,KA4J3B,EAgrBaA,CAhrBb,EA3JW,KA2JX,GAgrBaA,CAhrBb,EA1JI,KA0JJ,EAgrBaA,CAhrBb,EA1J2B,KA0J3B,EAgrBaA,CAhrBb,EAzJI,KAyJJ,EAgrBaA,CAhrBb,EAzJ2B,KAyJ3B,EAgrBaA,CAhrBb,EAxJW,KAwJX,GAgrBaA,CAhrBb,EAvJI,KAuJJ,EAgrBaA,CAhrBb,EAvJ2B,KAuJ3B,EAgrBaA,CAhrBb,EAtJI,KAsJJ,EAgrBaA,CAhrBb,EAtJ2B,KAsJ3B,EAgrBaA,CAhrBb,EArJI,KAqJJ,EAgrBaA,CAhrBb,EArJ2B,KAqJ3B,EAgrBaA,CAhrBb,EApJI,KAoJJ,EAgrBaA,CAhrBb,EApJ2B,KAoJ3B,EAgrBaA,CAhrBb,EAnJI,KAmJJ,EAgrBaA,CAhrBb,EAnJ2B,KAmJ3B,EAgrBaA,CAhrBb,EAlJI,KAkJJ,EAgrBaA,CAhrBb,EAlJ2B,KAkJ3B,EAgrBaA,CAhrBb,EAjJI,KAiJJ,EAgrBaA,CAhrBb,EAjJ2B,KAiJ3B,EAgrBaA,CAhrBb,EAhJI,KAgJJ,EAgrBaA,CAhrBb;AAhJ2B,KAgJ3B,EAgrBaA,CAhrBb,EA/II,KA+IJ,EAgrBaA,CAhrBb,EA/I2B,KA+I3B,EAgrBaA,CAhrBb,EA9IW,KA8IX,GAgrBaA,CAhrBb,EA7II,KA6IJ,EAgrBaA,CAhrBb,EA7I2B,KA6I3B,EAgrBaA,CAhrBb,EA5II,KA4IJ,EAgrBaA,CAhrBb,EA5I2B,KA4I3B,EAgrBaA,CAhrBb,EA3II,KA2IJ,EAgrBaA,CAhrBb,EA3I2B,KA2I3B,EAgrBaA,CAhrBb,EA1II,KA0IJ,EAgrBaA,CAhrBb,EA1I2B,KA0I3B,EAgrBaA,CAhrBb,EAzII,KAyIJ,EAgrBaA,CAhrBb,EAzI2B,KAyI3B,EAgrBaA,CAhrBb,EAxII,KAwIJ,EAgrBaA,CAhrBb,EAxI2B,KAwI3B,EAgrBaA,CAhrBb,EAvII,KAuIJ,EAgrBaA,CAhrBb,EAvI2B,KAuI3B,EAgrBaA,CAhrBb,EAtII,KAsIJ,EAgrBaA,CAhrBb,EAtI2B,KAsI3B,EAgrBaA,CAhrBb,EArII,KAqIJ,EAgrBaA,CAhrBb,EArI2B,KAqI3B,EAgrBaA,CAhrBb,EApII,KAoIJ,EAgrBaA,CAhrBb,EApI2B,KAoI3B,EAgrBaA,CAhrBb,EAnII,KAmIJ,EAgrBaA,CAhrBb,EAnI2B,KAmI3B,EAgrBaA,CAhrBb,EAlII,KAkIJ,EAgrBaA,CAhrBb,EAlI2B,KAkI3B,EAgrBaA,CAhrBb,EAjII,KAiIJ,EAgrBaA,CAhrBb,EAjI2B,KAiI3B,EAgrBaA,CAhrBb,EAhII,KAgIJ,EAgrBaA,CAhrBb,EAhI2B,KAgI3B,EAgrBaA,CAhrBb,EA/HI,KA+HJ,EAgrBaA,CAhrBb,EA/H2B,KA+H3B,EAgrBaA,CAhrBb,EA9HI,KA8HJ,EAgrBaA,CAhrBb,EA9H2B,KA8H3B,EAgrBaA,CAhrBb,EA7HI,KA6HJ,EAgrBaA,CAhrBb,EA7H2B,KA6H3B,EAgrBaA,CAhrBb,EA5HI,KA4HJ,EAgrBaA,CAhrBb,EA5H2B,KA4H3B,EAgrBaA,CAhrBb,EA3HI,KA2HJ,EAgrBaA,CAhrBb,EA3H2B,KA2H3B,EAgrBaA,CAhrBb,EA1HW,KA0HX,GAgrBaA,CAhrBb,EAzHI,KAyHJ,EAgrBaA,CAhrBb,EAzH2B,KAyH3B,EAgrBaA,CAhrBb,EAxHI,KAwHJ,EAgrBaA,CAhrBb,EAxH2B,KAwH3B,EAgrBaA,CAhrBb,EAvHW,KAuHX,GAgrBaA,CAhrBb,EAtHW,KAsHX,GAgrBaA,CAhrBb,EArHI,KAqHJ;AAgrBaA,CAhrBb,EArH2B,KAqH3B,EAgrBaA,CAhrBb,EApHI,KAoHJ,EAgrBaA,CAhrBb,EApH2B,KAoH3B,EAgrBaA,CAhrBb,EAnHI,KAmHJ,EAgrBaA,CAhrBb,EAnH2B,KAmH3B,EAgrBaA,CAhrBb,EAlHW,KAkHX,GAgrBaA,CAhrBb,EAjHI,KAiHJ,EAgrBaA,CAhrBb,EAjH2B,KAiH3B,EAgrBaA,CAhrBb,EAhHI,KAgHJ,EAgrBaA,CAhrBb,EAhH2B,KAgH3B,EAgrBaA,CAhrBb,EA/GI,KA+GJ,EAgrBaA,CAhrBb,EA/G2B,KA+G3B,EAgrBaA,CAhrBb,EA9GI,KA8GJ,EAgrBaA,CAhrBb,EA9G2B,KA8G3B,EAgrBaA,CAhrBb,EA7GI,KA6GJ,EAgrBaA,CAhrBb,EA7G2B,KA6G3B,EAgrBaA,CAhrBb,EA5GI,KA4GJ,EAgrBaA,CAhrBb,EA5G2B,KA4G3B,EAgrBaA,CAhrBb,EA3GI,KA2GJ,EAgrBaA,CAhrBb,EA3G2B,KA2G3B,EAgrBaA,CAhrBb,EA1GI,KA0GJ,EAgrBaA,CAhrBb,EA1G2B,KA0G3B,EAgrBaA,CAhrBb,EAzGI,KAyGJ,EAgrBaA,CAhrBb,EAzG2B,KAyG3B,EAgrBaA,CAhrBb,EAxGI,KAwGJ,EAgrBaA,CAhrBb,EAxG2B,KAwG3B,EAgrBaA,CAhrBb,EAvGW,KAuGX,GAgrBaA,CAhrBb,EAtGW,KAsGX,GAgrBaA,CAhrBb,EArGI,KAqGJ,EAgrBaA,CAhrBb,EArG2B,KAqG3B,EAgrBaA,CAhrBb,EApGI,KAoGJ,EAgrBaA,CAhrBb,EApG2B,KAoG3B,EAgrBaA,CAhrBb,EAnGI,KAmGJ,EAgrBaA,CAhrBb,EAnG2B,KAmG3B,EAgrBaA,CAhrBb,EAlGW,KAkGX,GAgrBaA,CAhrBb,EAjGI,KAiGJ,EAgrBaA,CAhrBb,EAjG2B,KAiG3B,EAgrBaA,CAhrBb,EAhGI,KAgGJ,EAgrBaA,CAhrBb,EAhG2B,KAgG3B,EAgrBaA,CAhrBb,EA/FI,KA+FJ,EAgrBaA,CAhrBb,EA/F2B,KA+F3B,EAgrBaA,CAhrBb,EA9FW,KA8FX,GAgrBaA,CAhrBb,EA7FI,KA6FJ,EAgrBaA,CAhrBb,EA7F2B,KA6F3B,EAgrBaA,CAhrBb,EA5FI,KA4FJ,EAgrBaA,CAhrBb,EA5F2B,KA4F3B,EAgrBaA,CAhrBb,EA3FI,KA2FJ,EAgrBaA,CAhrBb,EA3F2B,KA2F3B,EAgrBaA,CAhrBb,EA1FW,KA0FX,GAgrBaA,CAhrBb,EAzFI,KAyFJ;AAgrBaA,CAhrBb,EAzF2B,KAyF3B,EAgrBaA,CAhrBb,EAxFI,KAwFJ,EAgrBaA,CAhrBb,EAxF2B,KAwF3B,EAgrBaA,CAhrBb,EAvFI,KAuFJ,EAgrBaA,CAhrBb,EAvF2B,KAuF3B,EAgrBaA,CAhrBb,EAtFI,KAsFJ,EAgrBaA,CAhrBb,EAtF2B,KAsF3B,EAgrBaA,CAhrBb,EArFI,KAqFJ,EAgrBaA,CAhrBb,EArF2B,KAqF3B,EAgrBaA,CAhrBb,EApFI,KAoFJ,EAgrBaA,CAhrBb,EApF2B,KAoF3B,EAgrBaA,CAhrBb,EAnFI,KAmFJ,EAgrBaA,CAhrBb,EAnF2B,KAmF3B,EAgrBaA,CAhrBb,EAlFI,KAkFJ,EAgrBaA,CAhrBb,EAlF2B,KAkF3B,EAgrBaA,CAhrBb,EAjFI,KAiFJ,EAgrBaA,CAhrBb,EAjF2B,KAiF3B,EAgrBaA,CAhrBb,EAhFI,KAgFJ,EAgrBaA,CAhrBb,EAhF2B,KAgF3B,EAgrBaA,CAhrBb,EA/EI,KA+EJ,EAgrBaA,CAhrBb,EA/E2B,KA+E3B,EAgrBaA,CAhrBb,EA9EI,KA8EJ,EAgrBaA,CAhrBb,EA9E2B,KA8E3B,EAgrBaA,CAhrBb,EA7EI,KA6EJ,EAgrBaA,CAhrBb,EA7E2B,KA6E3B,EAgrBaA,CAhrBb,EA5EI,KA4EJ,EAgrBaA,CAhrBb,EA5E2B,KA4E3B,EAgrBaA,CAhrBb,EA3EW,KA2EX,GAgrBaA,CAhrBb,EA1EI,KA0EJ,EAgrBaA,CAhrBb,EA1E2B,KA0E3B,EAgrBaA,CAhrBb,EAzEI,MAyEJ,EAgrBaA,CAhrBb,EAzE2B,MAyE3B,EAgrBaA,CAhrBb,EAxEI,MAwEJ,EAgrBaA,CAhrBb,EAxE2B,MAwE3B,EAgrBaA,CAhrBb,EAvEI,MAuEJ,EAgrBaA,CAhrBb,EAvE2B,MAuE3B,EAgrBaA,CAhrBb,EAtEI,MAsEJ,EAgrBaA,CAhrBb,EAtE2B,MAsE3B,EAgrBaA,CAhrBb,EArEI,MAqEJ,EAgrBaA,CAhrBb,EArE2B,MAqE3B,EAgrBaA,CAhrBb,EApEI,MAoEJ,EAgrBaA,CAhrBb,EApE2B,MAoE3B,EAgrBaA,CAhrBb,EAnEI,MAmEJ,EAgrBaA,CAhrBb,EAnE2B,MAmE3B,EAgrBaA,CAhrBb,EAlEI,MAkEJ,EAgrBaA,CAhrBb,EAlE2B,MAkE3B,EAgrBaA,CAhrBb,EAjEW,MAiEX,GAgrBaA,CAhrBb,EAhEI,MAgEJ,EAgrBaA,CAhrBb;AAhE2B,MAgE3B,EAgrBaA,CAhrBb,EA/DI,MA+DJ,EAgrBaA,CAhrBb,EA/D2B,MA+D3B,EAgrBaA,CAhrBb,EA9DI,MA8DJ,EAgrBaA,CAhrBb,EA9D2B,MA8D3B,EAgrBaA,CAhrBb,EA7DW,MA6DX,GAgrBaA,CAhrBb,EA5DI,MA4DJ,EAgrBaA,CAhrBb,EA5D2B,MA4D3B,EAgrBaA,CAhrBb,EA3DI,MA2DJ,EAgrBaA,CAhrBb,EA3D2B,MA2D3B,EAgrBaA,CAhrBb,EA1DI,MA0DJ,EAgrBaA,CAhrBb,EA1D2B,MA0D3B,EAgrBaA,CAhrBb,EAzDI,MAyDJ,EAgrBaA,CAhrBb,EAzD2B,MAyD3B,EAgrBaA,CAhrBb,EAxDI,MAwDJ,EAgrBaA,CAhrBb,EAxD2B,MAwD3B,EAgrBaA,CAhrBb,EAvDI,MAuDJ,EAgrBaA,CAhrBb,EAvD2B,MAuD3B,EAgrBaA,CAhrBb,EAtDI,MAsDJ,EAgrBaA,CAhrBb,EAtD2B,MAsD3B,EAgrBaA,CAhrBb,EArDI,MAqDJ,EAgrBaA,CAhrBb,EArD2B,MAqD3B,EAgrBaA,CAhrBb,EApDW,MAoDX,GAgrBaA,CAhrBb,EAnDI,MAmDJ,EAgrBaA,CAhrBb,EAnD2B,MAmD3B,EAgrBaA,CAhrBb,EAlDI,MAkDJ,EAgrBaA,CAhrBb,EAlD2B,MAkD3B,EAgrBaA,CAhrBb,EAjDI,MAiDJ,EAgrBaA,CAhrBb,EAjD2B,MAiD3B,EAgrBaA,CAhrBb,EAhDI,MAgDJ,EAgrBaA,CAhrBb,EAhD2B,MAgD3B,EAgrBaA,CAhrBb,EA/CI,MA+CJ,EAgrBaA,CAhrBb,EA/C2B,MA+C3B,EAgrBaA,CAhrBb,EA9CI,MA8CJ,EAgrBaA,CAhrBb,EA9C2B,MA8C3B,EAgrBaA,CAhrBb,EA7CI,MA6CJ,EAgrBaA,CAhrBb,EA7C2B,MA6C3B,EAgrBaA,CAhrBb,EA5CI,MA4CJ,EAgrBaA,CAhrBb,EA5C2B,MA4C3B,EAgrBaA,CAhrBb,EA3CI,MA2CJ,EAgrBaA,CAhrBb,EA3C2B,MA2C3B,EAgrBaA,CAhrBb,EA1CI,MA0CJ,EAgrBaA,CAhrBb,EA1C2B,MA0C3B,EAgrBaA,CAhrBb,EAzCI,MAyCJ,EAgrBaA,CAhrBb,EAzC2B,MAyC3B,EAgrBaA,CAhrBb,EAxCI,MAwCJ;AAgrBaA,CAhrBb,EAxC2B,MAwC3B,EAgrBaA,CAhrBb,EAvCI,MAuCJ,EAgrBaA,CAhrBb,EAvC2B,MAuC3B,EAgrBaA,CAhrBb,EAtCI,MAsCJ,EAgrBaA,CAhrBb,EAtC2B,MAsC3B,EAgrBaA,CAhrBb,EArCI,MAqCJ,EAgrBaA,CAhrBb,EArC2B,MAqC3B,EAgrBaA,CAhrBb,EApCI,MAoCJ,EAgrBaA,CAhrBb,EApC2B,MAoC3B,EAgrBaA,CAhrBb,EAnCI,MAmCJ,EAgrBaA,CAhrBb,EAnC2B,MAmC3B,EAgrBaA,CAhrBb,EAlCW,MAkCX,GAgrBaA,CAhrBb,EAjCW,MAiCX,GAgrBaA,CAhrBb,EAhCI,MAgCJ,EAgrBaA,CAhrBb,EAhC2B,MAgC3B,EAgrBaA,CAhrBb,EA/BI,MA+BJ,EAgrBaA,CAhrBb,EA/B2B,MA+B3B,EAgrBaA,CAhrBb,EA9BW,MA8BX,GAgrBaA,CAhrBb,EA7BW,MA6BX,GAgrBaA,CAhrBb,EA5BW,MA4BX,GAgrBaA,CAhrBb,EA3BW,MA2BX,GAgrBaA,CAhrBb,EA1BW,MA0BX,GAgrBaA,CAhrBb,EAzBW,MAyBX,GAgrBaA,CAhrBb,EAxBI,MAwBJ,EAgrBaA,CAhrBb,EAxB2B,MAwB3B,EAgrBaA,CAhrBb,EAvBI,MAuBJ,EAgrBaA,CAhrBb,EAvB2B,MAuB3B,EAgrBaA,CAhrBb,EAtBW,MAsBX,GAgrBaA,CAhrBb,EArBW,MAqBX,GAgrBaA,CAhrBb,EApBW,MAoBX,GAgrBaA,CAhrBb,EAnBW,MAmBX,GAgrBaA,CAhrBb,EAlBW,MAkBX,GAgrBaA,CAhrBb,EAjBW,MAiBX,GAgrBaA,CAhrBb,EAhBI,MAgBJ,EAgrBaA,CAhrBb,EAhB2B,MAgB3B,EAgrBaA,CAhrBb,EAfW,MAeX,GAgrBaA,CAhrBb,EAdI,MAcJ,EAgrBaA,CAhrBb,EAd2B,MAc3B,EAgrBaA,CAhrBb,EAbI,MAaJ,EAgrBaA,CAhrBb,EAb2B,MAa3B,EAgrBaA,CAhrBb,EAZI,MAYJ,EAgrBaA,CAhrBb,EAZ2B,MAY3B,EAgrBaA,CAhrBb,EAXI,MAWJ,EAgrBaA,CAhrBb,EAX2B,MAW3B,EAgrBaA,CAhrBb;AAVW,MAUX,GAgrBaA,CAhrBb,EATI,MASJ,EAgrBaA,CAhrBb,EAT2B,MAS3B,EAgrBaA,CAhrBb,EARI,MAQJ,EAgrBaA,CAhrBb,EAR2B,MAQ3B,EAgrBaA,CAhrBb,EAPI,MAOJ,EAgrBaA,CAhrBb,EAP2B,MAO3B,EAgrBaA,CAhrBb,EANI,MAMJ,EAgrBaA,CAhrBb,EAN2B,MAM3B,EAgrBaA,CAhrBb,EALI,MAKJ,EAgrBaA,CAhrBb,EAL2B,MAK3B,EAgrBaA,CAhrBb,EAJI,MAIJ,EAgrBaA,CAhrBb,EAJ2B,MAI3B,EAgrBaA,CAhrBb,EAHI,MAGJ,EAgrBaA,CAhrBb,EAH2B,MAG3B,EAgrBaA,CAhrBb,EAFI,MAEJ,EAgrBaA,CAhrBb,EAF2B,MAE3B,EAgrBaA,CAhrBb,EADI,MACJ,EAgrBaA,CAhrBb,EAD2B,MAC3B,EAgrBaA,CAhrBb,EAAI,MAAJ,EAgrBaA,CAhrBb,EAA2B,MAA3B,EAgrBaA,CAhrBb,CAA2C,CAAA,CAA3C,CACO,CAAA,CA6qBP,CADsC,CAMxCC,QAASA,EAAyB,CAACF,CAAD,CAAKC,CAAL,CAAS,CACzC,MAAc,GAAd,GAAOD,CAAP,EACc,GADd,GACOA,CADP,EAEc,IAFd,GAEOC,CAFP,EAGc,IAHd,GAGOA,CAHP,GAhrBI,EA0oBJ,EA0CaA,CA1Cb,EA1oB0B,EA0oB1B,EA0CaA,CA1Cb,EAzoBI,EAyoBJ,EA0CaA,CA1Cb,EAzoB0B,EAyoB1B,EA0CaA,CA1Cb,EAxoBW,EAwoBX,GA0CaA,CA1Cb,EAvoBI,EAuoBJ,EA0CaA,CA1Cb,EAvoB0B,GAuoB1B,EA0CaA,CA1Cb,EAtoBW,GAsoBX,GA0CaA,CA1Cb,EAroBW,GAqoBX,GA0CaA,CA1Cb,EApoBW,GAooBX,GA0CaA,CA1Cb,EAnoBW,GAmoBX,GA0CaA,CA1Cb,EAloBI,GAkoBJ,EA0CaA,CA1Cb,EAloB0B,GAkoB1B,EA0CaA,CA1Cb,EAjoBI,GAioBJ,EA0CaA,CA1Cb,EAjoB0B,GAioB1B,EA0CaA,CA1Cb,EAhoBI,GAgoBJ,EA0CaA,CA1Cb,EAhoB0B,GAgoB1B,EA0CaA,CA1Cb,EA/nBI,GA+nBJ,EA0CaA,CA1Cb,EA/nB0B,GA+nB1B,EA0CaA,CA1Cb,EA9nBI,GA8nBJ,EA0CaA,CA1Cb,EA9nB0B,GA8nB1B,EA0CaA,CA1Cb,EA7nBW,GA6nBX,GA0CaA,CA1Cb,EA5nBW,GA4nBX,GA0CaA,CA1Cb,EA3nBI,GA2nBJ,EA0CaA,CA1Cb,EA3nB0B,GA2nB1B,EA0CaA,CA1Cb,EA1nBI,GA0nBJ;AA0CaA,CA1Cb,EA1nB0B,GA0nB1B,EA0CaA,CA1Cb,EAznBI,GAynBJ,EA0CaA,CA1Cb,EAznB0B,GAynB1B,EA0CaA,CA1Cb,EAxnBW,GAwnBX,GA0CaA,CA1Cb,EAvnBI,GAunBJ,EA0CaA,CA1Cb,EAvnB0B,GAunB1B,EA0CaA,CA1Cb,EAtnBW,GAsnBX,GA0CaA,CA1Cb,EArnBI,GAqnBJ,EA0CaA,CA1Cb,EArnB0B,GAqnB1B,EA0CaA,CA1Cb,EApnBI,GAonBJ,EA0CaA,CA1Cb,EApnB0B,IAonB1B,EA0CaA,CA1Cb,EAnnBI,IAmnBJ,EA0CaA,CA1Cb,EAnnB0B,IAmnB1B,EA0CaA,CA1Cb,EAlnBI,IAknBJ,EA0CaA,CA1Cb,EAlnB0B,IAknB1B,EA0CaA,CA1Cb,EAjnBI,IAinBJ,EA0CaA,CA1Cb,EAjnB0B,IAinB1B,EA0CaA,CA1Cb,EAhnBI,IAgnBJ,EA0CaA,CA1Cb,EAhnB0B,IAgnB1B,EA0CaA,CA1Cb,EA/mBW,IA+mBX,GA0CaA,CA1Cb,EA9mBI,IA8mBJ,EA0CaA,CA1Cb,EA9mB0B,IA8mB1B,EA0CaA,CA1Cb,EA7mBI,IA6mBJ,EA0CaA,CA1Cb,EA7mB0B,IA6mB1B,EA0CaA,CA1Cb,EA5mBW,IA4mBX,GA0CaA,CA1Cb,EA3mBI,IA2mBJ,EA0CaA,CA1Cb,EA3mB0B,IA2mB1B,EA0CaA,CA1Cb,EA1mBI,IA0mBJ,EA0CaA,CA1Cb,EA1mB0B,IA0mB1B,EA0CaA,CA1Cb,EAzmBW,IAymBX,GA0CaA,CA1Cb,EAxmBI,IAwmBJ,EA0CaA,CA1Cb,EAxmB0B,IAwmB1B,EA0CaA,CA1Cb,EAvmBI,IAumBJ,EA0CaA,CA1Cb,EAvmB0B,IAumB1B,EA0CaA,CA1Cb,EAtmBI,IAsmBJ,EA0CaA,CA1Cb,EAtmB0B,IAsmB1B,EA0CaA,CA1Cb,EArmBI,IAqmBJ,EA0CaA,CA1Cb,EArmB0B,IAqmB1B,EA0CaA,CA1Cb,EApmBI,IAomBJ,EA0CaA,CA1Cb,EApmB0B,IAomB1B,EA0CaA,CA1Cb,EAnmBI,IAmmBJ,EA0CaA,CA1Cb,EAnmB0B,IAmmB1B,EA0CaA,CA1Cb,EAlmBI,IAkmBJ,EA0CaA,CA1Cb,EAlmB0B,IAkmB1B,EA0CaA,CA1Cb,EAjmBI,IAimBJ,EA0CaA,CA1Cb,EAjmB0B,IAimB1B,EA0CaA,CA1Cb,EAhmBW,IAgmBX,GA0CaA,CA1Cb,EA/lBI,IA+lBJ,EA0CaA,CA1Cb,EA/lB0B,IA+lB1B,EA0CaA,CA1Cb,EA9lBI,IA8lBJ,EA0CaA,CA1Cb,EA9lB0B,IA8lB1B,EA0CaA,CA1Cb,EA7lBI,IA6lBJ,EA0CaA,CA1Cb,EA7lB0B,IA6lB1B,EA0CaA,CA1Cb,EA5lBW,IA4lBX,GA0CaA,CA1Cb,EA3lBI,IA2lBJ,EA0CaA,CA1Cb,EA3lB0B,IA2lB1B;AA0CaA,CA1Cb,EA1lBI,IA0lBJ,EA0CaA,CA1Cb,EA1lB0B,IA0lB1B,EA0CaA,CA1Cb,EAzlBI,IAylBJ,EA0CaA,CA1Cb,EAzlB0B,IAylB1B,EA0CaA,CA1Cb,EAxlBI,IAwlBJ,EA0CaA,CA1Cb,EAxlB0B,IAwlB1B,EA0CaA,CA1Cb,EAvlBI,IAulBJ,EA0CaA,CA1Cb,EAvlB0B,IAulB1B,EA0CaA,CA1Cb,EAtlBI,IAslBJ,EA0CaA,CA1Cb,EAtlB0B,IAslB1B,EA0CaA,CA1Cb,EArlBI,IAqlBJ,EA0CaA,CA1Cb,EArlB0B,IAqlB1B,EA0CaA,CA1Cb,EAplBI,IAolBJ,EA0CaA,CA1Cb,EAplB0B,IAolB1B,EA0CaA,CA1Cb,EAnlBI,IAmlBJ,EA0CaA,CA1Cb,EAnlB0B,IAmlB1B,EA0CaA,CA1Cb,EAllBI,IAklBJ,EA0CaA,CA1Cb,EAllB0B,IAklB1B,EA0CaA,CA1Cb,EAjlBW,IAilBX,GA0CaA,CA1Cb,EAhlBI,IAglBJ,EA0CaA,CA1Cb,EAhlB0B,IAglB1B,EA0CaA,CA1Cb,EA/kBI,IA+kBJ,EA0CaA,CA1Cb,EA/kB0B,IA+kB1B,EA0CaA,CA1Cb,EA9kBI,IA8kBJ,EA0CaA,CA1Cb,EA9kB0B,IA8kB1B,EA0CaA,CA1Cb,EA7kBI,IA6kBJ,EA0CaA,CA1Cb,EA7kB0B,IA6kB1B,EA0CaA,CA1Cb,EA5kBW,IA4kBX,GA0CaA,CA1Cb,EA3kBI,IA2kBJ,EA0CaA,CA1Cb,EA3kB0B,IA2kB1B,EA0CaA,CA1Cb,EA1kBI,IA0kBJ,EA0CaA,CA1Cb,EA1kB0B,IA0kB1B,EA0CaA,CA1Cb,EAzkBI,IAykBJ,EA0CaA,CA1Cb,EAzkB0B,IAykB1B,EA0CaA,CA1Cb,EAxkBI,IAwkBJ,EA0CaA,CA1Cb,EAxkB0B,IAwkB1B,EA0CaA,CA1Cb,EAvkBI,IAukBJ,EA0CaA,CA1Cb,EAvkB0B,IAukB1B,EA0CaA,CA1Cb,EAtkBI,IAskBJ,EA0CaA,CA1Cb,EAtkB0B,IAskB1B,EA0CaA,CA1Cb,EArkBI,IAqkBJ,EA0CaA,CA1Cb,EArkB0B,IAqkB1B,EA0CaA,CA1Cb,EApkBI,IAokBJ,EA0CaA,CA1Cb,EApkB0B,IAokB1B,EA0CaA,CA1Cb,EAnkBI,IAmkBJ,EA0CaA,CA1Cb,EAnkB0B,IAmkB1B,EA0CaA,CA1Cb,EAlkBI,IAkkBJ,EA0CaA,CA1Cb,EAlkB0B,IAkkB1B,EA0CaA,CA1Cb,EAjkBI,IAikBJ,EA0CaA,CA1Cb,EAjkB0B,IAikB1B,EA0CaA,CA1Cb,EAhkBW,IAgkBX,GA0CaA,CA1Cb,EA/jBI,IA+jBJ,EA0CaA,CA1Cb,EA/jB0B,IA+jB1B,EA0CaA,CA1Cb,EA9jBI,IA8jBJ,EA0CaA,CA1Cb,EA9jB0B,IA8jB1B,EA0CaA,CA1Cb;AA7jBI,IA6jBJ,EA0CaA,CA1Cb,EA7jB0B,IA6jB1B,EA0CaA,CA1Cb,EA5jBW,IA4jBX,GA0CaA,CA1Cb,EA3jBI,IA2jBJ,EA0CaA,CA1Cb,EA3jB0B,IA2jB1B,EA0CaA,CA1Cb,EA1jBW,IA0jBX,GA0CaA,CA1Cb,EAzjBI,IAyjBJ,EA0CaA,CA1Cb,EAzjB0B,IAyjB1B,EA0CaA,CA1Cb,EAxjBI,IAwjBJ,EA0CaA,CA1Cb,EAxjB0B,IAwjB1B,EA0CaA,CA1Cb,EAvjBI,IAujBJ,EA0CaA,CA1Cb,EAvjB0B,IAujB1B,EA0CaA,CA1Cb,EAtjBI,IAsjBJ,EA0CaA,CA1Cb,EAtjB0B,IAsjB1B,EA0CaA,CA1Cb,EArjBI,IAqjBJ,EA0CaA,CA1Cb,EArjB0B,IAqjB1B,EA0CaA,CA1Cb,EApjBI,IAojBJ,EA0CaA,CA1Cb,EApjB0B,IAojB1B,EA0CaA,CA1Cb,EAnjBI,IAmjBJ,EA0CaA,CA1Cb,EAnjB0B,IAmjB1B,EA0CaA,CA1Cb,EAljBI,IAkjBJ,EA0CaA,CA1Cb,EAljB0B,IAkjB1B,EA0CaA,CA1Cb,EAjjBI,IAijBJ,EA0CaA,CA1Cb,EAjjB0B,IAijB1B,EA0CaA,CA1Cb,EAhjBI,IAgjBJ,EA0CaA,CA1Cb,EAhjB0B,IAgjB1B,EA0CaA,CA1Cb,EA/iBI,IA+iBJ,EA0CaA,CA1Cb,EA/iB0B,IA+iB1B,EA0CaA,CA1Cb,EA9iBW,IA8iBX,GA0CaA,CA1Cb,EA7iBI,IA6iBJ,EA0CaA,CA1Cb,EA7iB0B,IA6iB1B,EA0CaA,CA1Cb,EA5iBI,IA4iBJ,EA0CaA,CA1Cb,EA5iB0B,IA4iB1B,EA0CaA,CA1Cb,EA3iBW,IA2iBX,GA0CaA,CA1Cb,EA1iBI,IA0iBJ,EA0CaA,CA1Cb,EA1iB0B,IA0iB1B,EA0CaA,CA1Cb,EAziBI,IAyiBJ,EA0CaA,CA1Cb,EAziB0B,IAyiB1B,EA0CaA,CA1Cb,EAxiBI,IAwiBJ,EA0CaA,CA1Cb,EAxiB0B,IAwiB1B,EA0CaA,CA1Cb,EAviBI,IAuiBJ,EA0CaA,CA1Cb,EAviB0B,IAuiB1B,EA0CaA,CA1Cb,EAtiBI,IAsiBJ,EA0CaA,CA1Cb,EAtiB0B,IAsiB1B,EA0CaA,CA1Cb,EAriBI,IAqiBJ,EA0CaA,CA1Cb,EAriB0B,IAqiB1B,EA0CaA,CA1Cb,EApiBI,IAoiBJ,EA0CaA,CA1Cb,EApiB0B,IAoiB1B,EA0CaA,CA1Cb,EAniBI,IAmiBJ,EA0CaA,CA1Cb,EAniB0B,IAmiB1B,EA0CaA,CA1Cb,EAliBI,IAkiBJ,EA0CaA,CA1Cb,EAliB0B,IAkiB1B,EA0CaA,CA1Cb,EAjiBI,IAiiBJ,EA0CaA,CA1Cb,EAjiB0B,IAiiB1B,EA0CaA,CA1Cb,EAhiBI,IAgiBJ,EA0CaA,CA1Cb,EAhiB0B,IAgiB1B;AA0CaA,CA1Cb,EA/hBI,IA+hBJ,EA0CaA,CA1Cb,EA/hB0B,IA+hB1B,EA0CaA,CA1Cb,EA9hBI,IA8hBJ,EA0CaA,CA1Cb,EA9hB0B,IA8hB1B,EA0CaA,CA1Cb,EA7hBI,IA6hBJ,EA0CaA,CA1Cb,EA7hB0B,IA6hB1B,EA0CaA,CA1Cb,EA5hBW,IA4hBX,GA0CaA,CA1Cb,EA3hBI,IA2hBJ,EA0CaA,CA1Cb,EA3hB0B,IA2hB1B,EA0CaA,CA1Cb,EA1hBI,IA0hBJ,EA0CaA,CA1Cb,EA1hB0B,IA0hB1B,EA0CaA,CA1Cb,EAzhBI,IAyhBJ,EA0CaA,CA1Cb,EAzhB0B,IAyhB1B,EA0CaA,CA1Cb,EAxhBI,IAwhBJ,EA0CaA,CA1Cb,EAxhB0B,IAwhB1B,EA0CaA,CA1Cb,EAvhBI,IAuhBJ,EA0CaA,CA1Cb,EAvhB0B,IAuhB1B,EA0CaA,CA1Cb,EAthBW,IAshBX,GA0CaA,CA1Cb,EArhBI,IAqhBJ,EA0CaA,CA1Cb,EArhB0B,IAqhB1B,EA0CaA,CA1Cb,EAphBI,IAohBJ,EA0CaA,CA1Cb,EAphB0B,IAohB1B,EA0CaA,CA1Cb,EAnhBI,IAmhBJ,EA0CaA,CA1Cb,EAnhB0B,IAmhB1B,EA0CaA,CA1Cb,EAlhBI,IAkhBJ,EA0CaA,CA1Cb,EAlhB0B,IAkhB1B,EA0CaA,CA1Cb,EAjhBI,IAihBJ,EA0CaA,CA1Cb,EAjhB0B,IAihB1B,EA0CaA,CA1Cb,EAhhBI,IAghBJ,EA0CaA,CA1Cb,EAhhB0B,IAghB1B,EA0CaA,CA1Cb,EA/gBI,IA+gBJ,EA0CaA,CA1Cb,EA/gB0B,IA+gB1B,EA0CaA,CA1Cb,EA9gBW,IA8gBX,GA0CaA,CA1Cb,EA7gBW,IA6gBX,GA0CaA,CA1Cb,EA5gBI,IA4gBJ,EA0CaA,CA1Cb,EA5gB0B,IA4gB1B,EA0CaA,CA1Cb,EA3gBI,IA2gBJ,EA0CaA,CA1Cb,EA3gB0B,IA2gB1B,EA0CaA,CA1Cb,EA1gBI,IA0gBJ,EA0CaA,CA1Cb,EA1gB0B,IA0gB1B,EA0CaA,CA1Cb,EAzgBI,IAygBJ,EA0CaA,CA1Cb,EAzgB0B,IAygB1B,EA0CaA,CA1Cb,EAxgBI,IAwgBJ,EA0CaA,CA1Cb,EAxgB0B,IAwgB1B,EA0CaA,CA1Cb,EAvgBI,IAugBJ,EA0CaA,CA1Cb,EAvgB0B,IAugB1B,EA0CaA,CA1Cb,EAtgBI,IAsgBJ,EA0CaA,CA1Cb,EAtgB0B,IAsgB1B,EA0CaA,CA1Cb,EArgBI,IAqgBJ,EA0CaA,CA1Cb,EArgB0B,IAqgB1B,EA0CaA,CA1Cb,EApgBI,IAogBJ,EA0CaA,CA1Cb,EApgB0B,IAogB1B,EA0CaA,CA1Cb,EAngBI,IAmgBJ,EA0CaA,CA1Cb,EAngB0B,IAmgB1B,EA0CaA,CA1Cb,EAlgBI,IAkgBJ,EA0CaA,CA1Cb;AAlgB0B,IAkgB1B,EA0CaA,CA1Cb,EAjgBI,IAigBJ,EA0CaA,CA1Cb,EAjgB0B,IAigB1B,EA0CaA,CA1Cb,EAhgBI,IAggBJ,EA0CaA,CA1Cb,EAhgB0B,IAggB1B,EA0CaA,CA1Cb,EA/fI,IA+fJ,EA0CaA,CA1Cb,EA/f0B,IA+f1B,EA0CaA,CA1Cb,EA9fI,IA8fJ,EA0CaA,CA1Cb,EA9f0B,IA8f1B,EA0CaA,CA1Cb,EA7fI,IA6fJ,EA0CaA,CA1Cb,EA7f0B,IA6f1B,EA0CaA,CA1Cb,EA5fI,IA4fJ,EA0CaA,CA1Cb,EA5f0B,IA4f1B,EA0CaA,CA1Cb,EA3fI,IA2fJ,EA0CaA,CA1Cb,EA3f0B,IA2f1B,EA0CaA,CA1Cb,EA1fI,IA0fJ,EA0CaA,CA1Cb,EA1f0B,IA0f1B,EA0CaA,CA1Cb,EAzfI,IAyfJ,EA0CaA,CA1Cb,EAzf0B,IAyf1B,EA0CaA,CA1Cb,EAxfI,IAwfJ,EA0CaA,CA1Cb,EAxf0B,IAwf1B,EA0CaA,CA1Cb,EAvfI,IAufJ,EA0CaA,CA1Cb,EAvf0B,IAuf1B,EA0CaA,CA1Cb,EAtfI,IAsfJ,EA0CaA,CA1Cb,EAtf0B,IAsf1B,EA0CaA,CA1Cb,EArfW,IAqfX,GA0CaA,CA1Cb,EApfI,IAofJ,EA0CaA,CA1Cb,EApf0B,IAof1B,EA0CaA,CA1Cb,EAnfI,IAmfJ,EA0CaA,CA1Cb,EAnf0B,IAmf1B,EA0CaA,CA1Cb,EAlfI,IAkfJ,EA0CaA,CA1Cb,EAlf0B,IAkf1B,EA0CaA,CA1Cb,EAjfI,IAifJ,EA0CaA,CA1Cb,EAjf0B,IAif1B,EA0CaA,CA1Cb,EAhfI,IAgfJ,EA0CaA,CA1Cb,EAhf0B,IAgf1B,EA0CaA,CA1Cb,EA/eI,IA+eJ,EA0CaA,CA1Cb,EA/e0B,IA+e1B,EA0CaA,CA1Cb,EA9eI,IA8eJ,EA0CaA,CA1Cb,EA9e0B,IA8e1B,EA0CaA,CA1Cb,EA7eI,IA6eJ,EA0CaA,CA1Cb,EA7e0B,IA6e1B,EA0CaA,CA1Cb,EA5eI,IA4eJ,EA0CaA,CA1Cb,EA5e0B,IA4e1B,EA0CaA,CA1Cb,EA3eI,IA2eJ,EA0CaA,CA1Cb,EA3e0B,IA2e1B,EA0CaA,CA1Cb,EA1eW,IA0eX,GA0CaA,CA1Cb,EAzeI,IAyeJ,EA0CaA,CA1Cb,EAze0B,IAye1B,EA0CaA,CA1Cb,EAxeI,IAweJ,EA0CaA,CA1Cb,EAxe0B,IAwe1B,EA0CaA,CA1Cb,EAveI,IAueJ,EA0CaA,CA1Cb,EAve0B,IAue1B,EA0CaA,CA1Cb,EAteI,IAseJ,EA0CaA,CA1Cb,EAte0B,IAse1B,EA0CaA,CA1Cb,EAreI,IAqeJ;AA0CaA,CA1Cb,EAre0B,IAqe1B,EA0CaA,CA1Cb,EApeI,IAoeJ,EA0CaA,CA1Cb,EApe0B,IAoe1B,EA0CaA,CA1Cb,EAneI,IAmeJ,EA0CaA,CA1Cb,EAne0B,IAme1B,EA0CaA,CA1Cb,EAleW,IAkeX,GA0CaA,CA1Cb,EAjeI,IAieJ,EA0CaA,CA1Cb,EAje0B,IAie1B,EA0CaA,CA1Cb,EAheW,IAgeX,GA0CaA,CA1Cb,EA/dI,IA+dJ,EA0CaA,CA1Cb,EA/d0B,IA+d1B,EA0CaA,CA1Cb,EA9dW,IA8dX,GA0CaA,CA1Cb,EA7dI,IA6dJ,EA0CaA,CA1Cb,EA7d0B,IA6d1B,EA0CaA,CA1Cb,EA5dI,IA4dJ,EA0CaA,CA1Cb,EA5d0B,IA4d1B,EA0CaA,CA1Cb,EA3dI,IA2dJ,EA0CaA,CA1Cb,EA3d0B,IA2d1B,EA0CaA,CA1Cb,EA1dI,IA0dJ,EA0CaA,CA1Cb,EA1d0B,IA0d1B,EA0CaA,CA1Cb,EAzdI,IAydJ,EA0CaA,CA1Cb,EAzd0B,IAyd1B,EA0CaA,CA1Cb,EAxdI,IAwdJ,EA0CaA,CA1Cb,EAxd0B,IAwd1B,EA0CaA,CA1Cb,EAvdI,IAudJ,EA0CaA,CA1Cb,EAvd0B,IAud1B,EA0CaA,CA1Cb,EAtdW,IAsdX,GA0CaA,CA1Cb,EArdI,IAqdJ,EA0CaA,CA1Cb,EArd0B,IAqd1B,EA0CaA,CA1Cb,EApdW,IAodX,GA0CaA,CA1Cb,EAndW,IAmdX,GA0CaA,CA1Cb,EAldI,IAkdJ,EA0CaA,CA1Cb,EAld0B,IAkd1B,EA0CaA,CA1Cb,EAjdI,IAidJ,EA0CaA,CA1Cb,EAjd0B,IAid1B,EA0CaA,CA1Cb,EAhdI,IAgdJ,EA0CaA,CA1Cb,EAhd0B,IAgd1B,EA0CaA,CA1Cb,EA/cW,IA+cX,GA0CaA,CA1Cb,EA9cW,IA8cX,GA0CaA,CA1Cb,EA7cI,IA6cJ,EA0CaA,CA1Cb,EA7c0B,IA6c1B,EA0CaA,CA1Cb,EA5cI,IA4cJ,EA0CaA,CA1Cb,EA5c0B,IA4c1B,EA0CaA,CA1Cb,EA3cI,IA2cJ,EA0CaA,CA1Cb,EA3c0B,IA2c1B,EA0CaA,CA1Cb,EA1cI,IA0cJ,EA0CaA,CA1Cb,EA1c0B,IA0c1B,EA0CaA,CA1Cb,EAzcW,IAycX,GA0CaA,CA1Cb,EAxcI,IAwcJ,EA0CaA,CA1Cb,EAxc0B,IAwc1B,EA0CaA,CA1Cb,EAvcI,IAucJ,EA0CaA,CA1Cb,EAvc0B,IAuc1B,EA0CaA,CA1Cb,EAtcI,IAscJ,EA0CaA,CA1Cb,EAtc0B,IAsc1B,EA0CaA,CA1Cb,EArcW,IAqcX;AA0CaA,CA1Cb,EApcI,IAocJ,EA0CaA,CA1Cb,EApc0B,IAoc1B,EA0CaA,CA1Cb,EAncI,IAmcJ,EA0CaA,CA1Cb,EAnc0B,IAmc1B,EA0CaA,CA1Cb,EAlcW,IAkcX,GA0CaA,CA1Cb,EAjcW,IAicX,GA0CaA,CA1Cb,EAhcW,IAgcX,GA0CaA,CA1Cb,EA/bI,IA+bJ,EA0CaA,CA1Cb,EA/b0B,IA+b1B,EA0CaA,CA1Cb,EA9bI,IA8bJ,EA0CaA,CA1Cb,EA9b0B,IA8b1B,EA0CaA,CA1Cb,EA7bI,IA6bJ,EA0CaA,CA1Cb,EA7b0B,IA6b1B,EA0CaA,CA1Cb,EA5bI,IA4bJ,EA0CaA,CA1Cb,EA5b0B,IA4b1B,EA0CaA,CA1Cb,EA3bI,IA2bJ,EA0CaA,CA1Cb,EA3b0B,IA2b1B,EA0CaA,CA1Cb,EA1bW,IA0bX,GA0CaA,CA1Cb,EAzbI,IAybJ,EA0CaA,CA1Cb,EAzb0B,IAyb1B,EA0CaA,CA1Cb,EAxbI,IAwbJ,EA0CaA,CA1Cb,EAxb0B,IAwb1B,EA0CaA,CA1Cb,EAvbI,IAubJ,EA0CaA,CA1Cb,EAvb0B,IAub1B,EA0CaA,CA1Cb,EAtbW,IAsbX,GA0CaA,CA1Cb,EArbW,IAqbX,GA0CaA,CA1Cb,EApbI,IAobJ,EA0CaA,CA1Cb,EApb0B,IAob1B,EA0CaA,CA1Cb,EAnbI,IAmbJ,EA0CaA,CA1Cb,EAnb0B,IAmb1B,EA0CaA,CA1Cb,EAlbI,IAkbJ,EA0CaA,CA1Cb,EAlb0B,IAkb1B,EA0CaA,CA1Cb,EAjbI,IAibJ,EA0CaA,CA1Cb,EAjb0B,IAib1B,EA0CaA,CA1Cb,EAhbW,IAgbX,GA0CaA,CA1Cb,EA/aI,IA+aJ,EA0CaA,CA1Cb,EA/a0B,IA+a1B,EA0CaA,CA1Cb,EA9aI,IA8aJ,EA0CaA,CA1Cb,EA9a0B,IA8a1B,EA0CaA,CA1Cb,EA7aI,IA6aJ,EA0CaA,CA1Cb,EA7a0B,IA6a1B,EA0CaA,CA1Cb,EA5aI,IA4aJ,EA0CaA,CA1Cb,EA5a0B,IA4a1B,EA0CaA,CA1Cb,EA3aI,IA2aJ,EA0CaA,CA1Cb,EA3a0B,IA2a1B,EA0CaA,CA1Cb,EA1aI,IA0aJ,EA0CaA,CA1Cb,EA1a0B,IA0a1B,EA0CaA,CA1Cb,EAzaW,IAyaX,GA0CaA,CA1Cb,EAxaI,IAwaJ,EA0CaA,CA1Cb,EAxa0B,IAwa1B,EA0CaA,CA1Cb,EAvaI,IAuaJ,EA0CaA,CA1Cb,EAva0B,IAua1B,EA0CaA,CA1Cb,EAtaI,IAsaJ,EA0CaA,CA1Cb,EAta0B,IAsa1B,EA0CaA,CA1Cb,EAraI,IAqaJ;AA0CaA,CA1Cb,EAra0B,IAqa1B,EA0CaA,CA1Cb,EApaI,IAoaJ,EA0CaA,CA1Cb,EApa0B,IAoa1B,EA0CaA,CA1Cb,EAnaI,IAmaJ,EA0CaA,CA1Cb,EAna0B,IAma1B,EA0CaA,CA1Cb,EAlaI,IAkaJ,EA0CaA,CA1Cb,EAla0B,IAka1B,EA0CaA,CA1Cb,EAjaI,IAiaJ,EA0CaA,CA1Cb,EAja0B,IAia1B,EA0CaA,CA1Cb,EAhaI,IAgaJ,EA0CaA,CA1Cb,EAha0B,IAga1B,EA0CaA,CA1Cb,EA/ZI,IA+ZJ,EA0CaA,CA1Cb,EA/Z0B,IA+Z1B,EA0CaA,CA1Cb,EA9ZI,IA8ZJ,EA0CaA,CA1Cb,EA9Z0B,IA8Z1B,EA0CaA,CA1Cb,EA7ZI,IA6ZJ,EA0CaA,CA1Cb,EA7Z0B,IA6Z1B,EA0CaA,CA1Cb,EA5ZI,IA4ZJ,EA0CaA,CA1Cb,EA5Z0B,IA4Z1B,EA0CaA,CA1Cb,EA3ZI,IA2ZJ,EA0CaA,CA1Cb,EA3Z0B,IA2Z1B,EA0CaA,CA1Cb,EA1ZI,IA0ZJ,EA0CaA,CA1Cb,EA1Z0B,IA0Z1B,EA0CaA,CA1Cb,EAzZI,IAyZJ,EA0CaA,CA1Cb,EAzZ0B,IAyZ1B,EA0CaA,CA1Cb,EAxZI,IAwZJ,EA0CaA,CA1Cb,EAxZ0B,IAwZ1B,EA0CaA,CA1Cb,EAvZI,IAuZJ,EA0CaA,CA1Cb,EAvZ0B,IAuZ1B,EA0CaA,CA1Cb,EAtZI,IAsZJ,EA0CaA,CA1Cb,EAtZ0B,IAsZ1B,EA0CaA,CA1Cb,EArZI,IAqZJ,EA0CaA,CA1Cb,EArZ0B,IAqZ1B,EA0CaA,CA1Cb,EApZI,IAoZJ,EA0CaA,CA1Cb,EApZ0B,GAoZ1B,EA0CaA,CA1Cb,EAnZI,IAmZJ,EA0CaA,CA1Cb,EAnZ0B,IAmZ1B,EA0CaA,CA1Cb,EAlZI,IAkZJ,EA0CaA,CA1Cb,EAlZ0B,IAkZ1B,EA0CaA,CA1Cb,EAjZW,IAiZX,GA0CaA,CA1Cb,EAhZI,IAgZJ,EA0CaA,CA1Cb,EAhZ0B,IAgZ1B,EA0CaA,CA1Cb,EA/YI,IA+YJ,EA0CaA,CA1Cb,EA/Y0B,IA+Y1B,EA0CaA,CA1Cb,EA9YI,IA8YJ,EA0CaA,CA1Cb,EA9Y0B,IA8Y1B,EA0CaA,CA1Cb,EA7YI,IA6YJ,EA0CaA,CA1Cb,EA7Y0B,IA6Y1B,EA0CaA,CA1Cb,EA5YI,IA4YJ,EA0CaA,CA1Cb,EA5Y0B,IA4Y1B,EA0CaA,CA1Cb,EA3YI,IA2YJ,EA0CaA,CA1Cb,EA3Y0B,IA2Y1B,EA0CaA,CA1Cb,EA1YI,IA0YJ,EA0CaA,CA1Cb,EA1Y0B,IA0Y1B,EA0CaA,CA1Cb,EAzYI,IAyYJ,EA0CaA,CA1Cb,EAzY0B,IAyY1B;AA0CaA,CA1Cb,EAxYI,IAwYJ,EA0CaA,CA1Cb,EAxY0B,IAwY1B,EA0CaA,CA1Cb,EAvYI,IAuYJ,EA0CaA,CA1Cb,EAvY0B,IAuY1B,EA0CaA,CA1Cb,EAtYI,IAsYJ,EA0CaA,CA1Cb,EAtY0B,IAsY1B,EA0CaA,CA1Cb,EArYI,IAqYJ,EA0CaA,CA1Cb,EArY0B,IAqY1B,EA0CaA,CA1Cb,EApYI,IAoYJ,EA0CaA,CA1Cb,EApY0B,IAoY1B,EA0CaA,CA1Cb,EAnYI,IAmYJ,EA0CaA,CA1Cb,EAnY0B,IAmY1B,EA0CaA,CA1Cb,EAlYI,IAkYJ,EA0CaA,CA1Cb,EAlY0B,IAkY1B,EA0CaA,CA1Cb,EAjYI,IAiYJ,EA0CaA,CA1Cb,EAjY0B,IAiY1B,EA0CaA,CA1Cb,EAhYI,IAgYJ,EA0CaA,CA1Cb,EAhY0B,IAgY1B,EA0CaA,CA1Cb,EA/XI,IA+XJ,EA0CaA,CA1Cb,EA/X0B,IA+X1B,EA0CaA,CA1Cb,EA9XI,IA8XJ,EA0CaA,CA1Cb,EA9X0B,IA8X1B,EA0CaA,CA1Cb,EA7XI,IA6XJ,EA0CaA,CA1Cb,EA7X0B,IA6X1B,EA0CaA,CA1Cb,EA5XW,IA4XX,GA0CaA,CA1Cb,EA3XI,IA2XJ,EA0CaA,CA1Cb,EA3X0B,IA2X1B,EA0CaA,CA1Cb,EA1XI,IA0XJ,EA0CaA,CA1Cb,EA1X0B,IA0X1B,EA0CaA,CA1Cb,EAzXI,IAyXJ,EA0CaA,CA1Cb,EAzX0B,IAyX1B,EA0CaA,CA1Cb,EAxXI,IAwXJ,EA0CaA,CA1Cb,EAxX0B,IAwX1B,EA0CaA,CA1Cb,EAvXI,IAuXJ,EA0CaA,CA1Cb,EAvX0B,IAuX1B,EA0CaA,CA1Cb,EAtXI,IAsXJ,EA0CaA,CA1Cb,EAtX0B,IAsX1B,EA0CaA,CA1Cb,EArXI,IAqXJ,EA0CaA,CA1Cb,EArX0B,IAqX1B,EA0CaA,CA1Cb,EApXI,IAoXJ,EA0CaA,CA1Cb,EApX0B,IAoX1B,EA0CaA,CA1Cb,EAnXI,IAmXJ,EA0CaA,CA1Cb,EAnX0B,IAmX1B,EA0CaA,CA1Cb,EAlXI,IAkXJ,EA0CaA,CA1Cb,EAlX0B,IAkX1B,EA0CaA,CA1Cb,EAjXI,IAiXJ,EA0CaA,CA1Cb,EAjX0B,IAiX1B,EA0CaA,CA1Cb,EAhXI,IAgXJ,EA0CaA,CA1Cb,EAhX0B,IAgX1B,EA0CaA,CA1Cb,EA/WI,IA+WJ,EA0CaA,CA1Cb,EA/W0B,IA+W1B,EA0CaA,CA1Cb,EA9WI,IA8WJ,EA0CaA,CA1Cb,EA9W0B,IA8W1B,EA0CaA,CA1Cb,EA7WI,IA6WJ,EA0CaA,CA1Cb,EA7W0B,IA6W1B,EA0CaA,CA1Cb,EA5WI,IA4WJ;AA0CaA,CA1Cb,EA5W0B,IA4W1B,EA0CaA,CA1Cb,EA3WI,IA2WJ,EA0CaA,CA1Cb,EA3W0B,IA2W1B,EA0CaA,CA1Cb,EA1WW,IA0WX,GA0CaA,CA1Cb,EAzWW,IAyWX,GA0CaA,CA1Cb,EAxWW,IAwWX,GA0CaA,CA1Cb,EAvWI,IAuWJ,EA0CaA,CA1Cb,EAvW0B,IAuW1B,EA0CaA,CA1Cb,EAtWI,IAsWJ,EA0CaA,CA1Cb,EAtW0B,IAsW1B,EA0CaA,CA1Cb,EArWI,IAqWJ,EA0CaA,CA1Cb,EArW0B,IAqW1B,EA0CaA,CA1Cb,EApWW,IAoWX,GA0CaA,CA1Cb,EAnWI,IAmWJ,EA0CaA,CA1Cb,EAnW0B,IAmW1B,EA0CaA,CA1Cb,EAlWI,IAkWJ,EA0CaA,CA1Cb,EAlW0B,IAkW1B,EA0CaA,CA1Cb,EAjWI,IAiWJ,EA0CaA,CA1Cb,EAjW0B,IAiW1B,EA0CaA,CA1Cb,EAhWI,IAgWJ,EA0CaA,CA1Cb,EAhW0B,IAgW1B,EA0CaA,CA1Cb,EA/VI,IA+VJ,EA0CaA,CA1Cb,EA/V0B,IA+V1B,EA0CaA,CA1Cb,EA9VI,IA8VJ,EA0CaA,CA1Cb,EA9V0B,IA8V1B,EA0CaA,CA1Cb,EA7VI,IA6VJ,EA0CaA,CA1Cb,EA7V0B,IA6V1B,EA0CaA,CA1Cb,EA5VI,IA4VJ,EA0CaA,CA1Cb,EA5V0B,IA4V1B,EA0CaA,CA1Cb,EA3VW,IA2VX,GA0CaA,CA1Cb,EA1VW,IA0VX,GA0CaA,CA1Cb,EAzVW,IAyVX,GA0CaA,CA1Cb,EAxVI,IAwVJ,EA0CaA,CA1Cb,EAxV0B,IAwV1B,EA0CaA,CA1Cb,EAvVI,IAuVJ,EA0CaA,CA1Cb,EAvV0B,IAuV1B,EA0CaA,CA1Cb,EAtVW,IAsVX,GA0CaA,CA1Cb,EArVI,IAqVJ,EA0CaA,CA1Cb,EArV0B,IAqV1B,EA0CaA,CA1Cb,EApVW,IAoVX,GA0CaA,CA1Cb,EAnVW,IAmVX,GA0CaA,CA1Cb,EAlVI,IAkVJ,EA0CaA,CA1Cb,EAlV0B,IAkV1B,EA0CaA,CA1Cb,EAjVW,IAiVX,GA0CaA,CA1Cb,EAhVI,IAgVJ,EA0CaA,CA1Cb,EAhV0B,IAgV1B,EA0CaA,CA1Cb,EA/UW,IA+UX,GA0CaA,CA1Cb,EA9UW,IA8UX,GA0CaA,CA1Cb,EA7UW,IA6UX,GA0CaA,CA1Cb,EA5UI,IA4UJ,EA0CaA,CA1Cb,EA5U0B,IA4U1B,EA0CaA,CA1Cb,EA3UI,IA2UJ,EA0CaA,CA1Cb,EA3U0B,IA2U1B,EA0CaA,CA1Cb,EA1UI,IA0UJ,EA0CaA,CA1Cb;AA1U0B,IA0U1B,EA0CaA,CA1Cb,EAzUW,IAyUX,GA0CaA,CA1Cb,EAxUI,IAwUJ,EA0CaA,CA1Cb,EAxU0B,IAwU1B,EA0CaA,CA1Cb,EAvUI,KAuUJ,EA0CaA,CA1Cb,EAvU0B,KAuU1B,EA0CaA,CA1Cb,EAtUI,KAsUJ,EA0CaA,CA1Cb,EAtU0B,KAsU1B,EA0CaA,CA1Cb,EArUI,KAqUJ,EA0CaA,CA1Cb,EArU0B,KAqU1B,EA0CaA,CA1Cb,EApUI,KAoUJ,EA0CaA,CA1Cb,EApU0B,KAoU1B,EA0CaA,CA1Cb,EAnUI,KAmUJ,EA0CaA,CA1Cb,EAnU0B,KAmU1B,EA0CaA,CA1Cb,EAlUW,KAkUX,GA0CaA,CA1Cb,EAjUW,KAiUX,GA0CaA,CA1Cb,EAhUI,KAgUJ,EA0CaA,CA1Cb,EAhU0B,KAgU1B,EA0CaA,CA1Cb,EA/TW,KA+TX,GA0CaA,CA1Cb,EA9TI,KA8TJ,EA0CaA,CA1Cb,EA9T0B,KA8T1B,EA0CaA,CA1Cb,EA7TI,KA6TJ,EA0CaA,CA1Cb,EA7T0B,KA6T1B,EA0CaA,CA1Cb,EA5TI,KA4TJ,EA0CaA,CA1Cb,EA5T0B,KA4T1B,EA0CaA,CA1Cb,EA3TI,KA2TJ,EA0CaA,CA1Cb,EA3T0B,KA2T1B,EA0CaA,CA1Cb,EA1TI,KA0TJ,EA0CaA,CA1Cb,EA1T0B,KA0T1B,EA0CaA,CA1Cb,EAzTI,KAyTJ,EA0CaA,CA1Cb,EAzT0B,KAyT1B,EA0CaA,CA1Cb,EAxTI,KAwTJ,EA0CaA,CA1Cb,EAxT0B,KAwT1B,EA0CaA,CA1Cb,EAvTI,KAuTJ,EA0CaA,CA1Cb,EAvT0B,KAuT1B,EA0CaA,CA1Cb,EAtTI,KAsTJ,EA0CaA,CA1Cb,EAtT0B,KAsT1B,EA0CaA,CA1Cb,EArTI,KAqTJ,EA0CaA,CA1Cb,EArT0B,KAqT1B,EA0CaA,CA1Cb,EApTI,KAoTJ,EA0CaA,CA1Cb,EApT0B,KAoT1B,EA0CaA,CA1Cb,EAnTI,KAmTJ,EA0CaA,CA1Cb,EAnT0B,KAmT1B,EA0CaA,CA1Cb,EAlTI,KAkTJ,EA0CaA,CA1Cb,EAlT0B,KAkT1B,EA0CaA,CA1Cb,EAjTI,KAiTJ,EA0CaA,CA1Cb,EAjT0B,KAiT1B,EA0CaA,CA1Cb,EAhTI,KAgTJ,EA0CaA,CA1Cb,EAhT0B,KAgT1B,EA0CaA,CA1Cb,EA/SI,KA+SJ,EA0CaA,CA1Cb,EA/S0B,KA+S1B;AA0CaA,CA1Cb,EA9SI,KA8SJ,EA0CaA,CA1Cb,EA9S0B,KA8S1B,EA0CaA,CA1Cb,EA7SI,KA6SJ,EA0CaA,CA1Cb,EA7S0B,KA6S1B,EA0CaA,CA1Cb,EA5SI,KA4SJ,EA0CaA,CA1Cb,EA5S0B,KA4S1B,EA0CaA,CA1Cb,EA3SI,KA2SJ,EA0CaA,CA1Cb,EA3S0B,KA2S1B,EA0CaA,CA1Cb,EA1SI,KA0SJ,EA0CaA,CA1Cb,EA1S0B,KA0S1B,EA0CaA,CA1Cb,EAzSI,KAySJ,EA0CaA,CA1Cb,EAzS0B,KAyS1B,EA0CaA,CA1Cb,EAxSI,KAwSJ,EA0CaA,CA1Cb,EAxS0B,KAwS1B,EA0CaA,CA1Cb,EAvSI,KAuSJ,EA0CaA,CA1Cb,EAvS0B,KAuS1B,EA0CaA,CA1Cb,EAtSI,KAsSJ,EA0CaA,CA1Cb,EAtS0B,KAsS1B,EA0CaA,CA1Cb,EArSI,KAqSJ,EA0CaA,CA1Cb,EArS0B,KAqS1B,EA0CaA,CA1Cb,EApSI,KAoSJ,EA0CaA,CA1Cb,EApS0B,KAoS1B,EA0CaA,CA1Cb,EAnSI,KAmSJ,EA0CaA,CA1Cb,EAnS0B,KAmS1B,EA0CaA,CA1Cb,EAlSI,KAkSJ,EA0CaA,CA1Cb,EAlS0B,KAkS1B,EA0CaA,CA1Cb,EAjSI,KAiSJ,EA0CaA,CA1Cb,EAjS0B,KAiS1B,EA0CaA,CA1Cb,EAhSI,KAgSJ,EA0CaA,CA1Cb,EAhS0B,KAgS1B,EA0CaA,CA1Cb,EA/RI,KA+RJ,EA0CaA,CA1Cb,EA/R0B,KA+R1B,EA0CaA,CA1Cb,EA9RI,KA8RJ,EA0CaA,CA1Cb,EA9R0B,KA8R1B,EA0CaA,CA1Cb,EA7RI,KA6RJ,EA0CaA,CA1Cb,EA7R0B,KA6R1B,EA0CaA,CA1Cb,EA5RI,KA4RJ,EA0CaA,CA1Cb,EA5R0B,KA4R1B,EA0CaA,CA1Cb,EA3RI,KA2RJ,EA0CaA,CA1Cb,EA3R0B,KA2R1B,EA0CaA,CA1Cb,EA1RI,KA0RJ,EA0CaA,CA1Cb,EA1R0B,KA0R1B,EA0CaA,CA1Cb,EAzRI,KAyRJ,EA0CaA,CA1Cb,EAzR0B,KAyR1B,EA0CaA,CA1Cb,EAxRI,KAwRJ,EA0CaA,CA1Cb,EAxR0B,KAwR1B,EA0CaA,CA1Cb,EAvRI,KAuRJ,EA0CaA,CA1Cb,EAvR0B,KAuR1B,EA0CaA,CA1Cb,EAtRW,KAsRX,GA0CaA,CA1Cb,EArRW,KAqRX;AA0CaA,CA1Cb,EApRI,KAoRJ,EA0CaA,CA1Cb,EApR0B,KAoR1B,EA0CaA,CA1Cb,EAnRI,KAmRJ,EA0CaA,CA1Cb,EAnR0B,KAmR1B,EA0CaA,CA1Cb,EAlRI,KAkRJ,EA0CaA,CA1Cb,EAlR0B,KAkR1B,EA0CaA,CA1Cb,EAjRI,KAiRJ,EA0CaA,CA1Cb,EAjR0B,KAiR1B,EA0CaA,CA1Cb,EAhRI,KAgRJ,EA0CaA,CA1Cb,EAhR0B,KAgR1B,EA0CaA,CA1Cb,EA/QI,KA+QJ,EA0CaA,CA1Cb,EA/Q0B,KA+Q1B,EA0CaA,CA1Cb,EA9QI,KA8QJ,EA0CaA,CA1Cb,EA9Q0B,KA8Q1B,EA0CaA,CA1Cb,EA7QI,KA6QJ,EA0CaA,CA1Cb,EA7Q0B,KA6Q1B,EA0CaA,CA1Cb,EA5QI,KA4QJ,EA0CaA,CA1Cb,EA5Q0B,KA4Q1B,EA0CaA,CA1Cb,EA3QI,KA2QJ,EA0CaA,CA1Cb,EA3Q0B,KA2Q1B,EA0CaA,CA1Cb,EA1QI,KA0QJ,EA0CaA,CA1Cb,EA1Q0B,KA0Q1B,EA0CaA,CA1Cb,EAzQI,KAyQJ,EA0CaA,CA1Cb,EAzQ0B,KAyQ1B,EA0CaA,CA1Cb,EAxQI,KAwQJ,EA0CaA,CA1Cb,EAxQ0B,KAwQ1B,EA0CaA,CA1Cb,EAvQI,KAuQJ,EA0CaA,CA1Cb,EAvQ0B,KAuQ1B,EA0CaA,CA1Cb,EAtQI,KAsQJ,EA0CaA,CA1Cb,EAtQ0B,KAsQ1B,EA0CaA,CA1Cb,EArQI,KAqQJ,EA0CaA,CA1Cb,EArQ0B,KAqQ1B,EA0CaA,CA1Cb,EApQI,KAoQJ,EA0CaA,CA1Cb,EApQ0B,KAoQ1B,EA0CaA,CA1Cb,EAnQI,KAmQJ,EA0CaA,CA1Cb,EAnQ0B,KAmQ1B,EA0CaA,CA1Cb,EAlQI,KAkQJ,EA0CaA,CA1Cb,EAlQ0B,KAkQ1B,EA0CaA,CA1Cb,EAjQI,KAiQJ,EA0CaA,CA1Cb,EAjQ0B,KAiQ1B,EA0CaA,CA1Cb,EAhQI,KAgQJ,EA0CaA,CA1Cb,EAhQ0B,KAgQ1B,EA0CaA,CA1Cb,EA/PI,KA+PJ,EA0CaA,CA1Cb,EA/P0B,KA+P1B,EA0CaA,CA1Cb,EA9PI,KA8PJ,EA0CaA,CA1Cb,EA9P0B,KA8P1B,EA0CaA,CA1Cb,EA7PI,KA6PJ,EA0CaA,CA1Cb,EA7P0B,KA6P1B,EA0CaA,CA1Cb,EA5PI,KA4PJ,EA0CaA,CA1Cb,EA5P0B,KA4P1B,EA0CaA,CA1Cb;AA3PI,KA2PJ,EA0CaA,CA1Cb,EA3P0B,KA2P1B,EA0CaA,CA1Cb,EA1PI,KA0PJ,EA0CaA,CA1Cb,EA1P0B,KA0P1B,EA0CaA,CA1Cb,EAzPI,KAyPJ,EA0CaA,CA1Cb,EAzP0B,KAyP1B,EA0CaA,CA1Cb,EAxPI,KAwPJ,EA0CaA,CA1Cb,EAxP0B,KAwP1B,EA0CaA,CA1Cb,EAvPI,KAuPJ,EA0CaA,CA1Cb,EAvP0B,KAuP1B,EA0CaA,CA1Cb,EAtPI,KAsPJ,EA0CaA,CA1Cb,EAtP0B,KAsP1B,EA0CaA,CA1Cb,EArPI,KAqPJ,EA0CaA,CA1Cb,EArP0B,KAqP1B,EA0CaA,CA1Cb,EApPI,KAoPJ,EA0CaA,CA1Cb,EApP0B,KAoP1B,EA0CaA,CA1Cb,EAnPI,KAmPJ,EA0CaA,CA1Cb,EAnP0B,KAmP1B,EA0CaA,CA1Cb,EAlPW,KAkPX,GA0CaA,CA1Cb,EAjPI,KAiPJ,EA0CaA,CA1Cb,EAjP0B,KAiP1B,EA0CaA,CA1Cb,EAhPI,KAgPJ,EA0CaA,CA1Cb,EAhP0B,KAgP1B,EA0CaA,CA1Cb,EA/OI,KA+OJ,EA0CaA,CA1Cb,EA/O0B,KA+O1B,EA0CaA,CA1Cb,EA9OI,KA8OJ,EA0CaA,CA1Cb,EA9O0B,KA8O1B,EA0CaA,CA1Cb,EA7OI,KA6OJ,EA0CaA,CA1Cb,EA7O0B,KA6O1B,EA0CaA,CA1Cb,EA5OI,KA4OJ,EA0CaA,CA1Cb,EA5O0B,KA4O1B,EA0CaA,CA1Cb,EA3OI,KA2OJ,EA0CaA,CA1Cb,EA3O0B,KA2O1B,EA0CaA,CA1Cb,EA1OI,KA0OJ,EA0CaA,CA1Cb,EA1O0B,KA0O1B,EA0CaA,CA1Cb,EAzOI,KAyOJ,EA0CaA,CA1Cb,EAzO0B,KAyO1B,EA0CaA,CA1Cb,EAxOI,KAwOJ,EA0CaA,CA1Cb,EAxO0B,KAwO1B,EA0CaA,CA1Cb,EAvOI,KAuOJ,EA0CaA,CA1Cb,EAvO0B,KAuO1B,EA0CaA,CA1Cb,EAtOI,KAsOJ,EA0CaA,CA1Cb,EAtO0B,KAsO1B,EA0CaA,CA1Cb,EArOI,KAqOJ,EA0CaA,CA1Cb,EArO0B,KAqO1B,EA0CaA,CA1Cb,EApOI,KAoOJ,EA0CaA,CA1Cb,EApO0B,KAoO1B,EA0CaA,CA1Cb,EAnOI,KAmOJ,EA0CaA,CA1Cb,EAnO0B,KAmO1B,EA0CaA,CA1Cb,EAlOW,KAkOX,GA0CaA,CA1Cb;AAjOI,KAiOJ,EA0CaA,CA1Cb,EAjO0B,KAiO1B,EA0CaA,CA1Cb,EAhOI,KAgOJ,EA0CaA,CA1Cb,EAhO0B,KAgO1B,EA0CaA,CA1Cb,EA/NI,KA+NJ,EA0CaA,CA1Cb,EA/N0B,KA+N1B,EA0CaA,CA1Cb,EA9NI,KA8NJ,EA0CaA,CA1Cb,EA9N0B,KA8N1B,EA0CaA,CA1Cb,EA7NI,KA6NJ,EA0CaA,CA1Cb,EA7N0B,KA6N1B,EA0CaA,CA1Cb,EA5NI,KA4NJ,EA0CaA,CA1Cb,EA5N0B,KA4N1B,EA0CaA,CA1Cb,EA3NI,KA2NJ,EA0CaA,CA1Cb,EA3N2B,KA2N3B,EA0CaA,CA1Cb,EA1NI,KA0NJ,EA0CaA,CA1Cb,EA1N2B,KA0N3B,EA0CaA,CA1Cb,EAzNI,KAyNJ,EA0CaA,CA1Cb,EAzN2B,KAyN3B,EA0CaA,CA1Cb,EAxNI,KAwNJ,EA0CaA,CA1Cb,EAxN2B,KAwN3B,EA0CaA,CA1Cb,EAvNI,KAuNJ,EA0CaA,CA1Cb,EAvN2B,KAuN3B,EA0CaA,CA1Cb,EAtNI,KAsNJ,EA0CaA,CA1Cb,EAtN2B,KAsN3B,EA0CaA,CA1Cb,EArNI,KAqNJ,EA0CaA,CA1Cb,EArN2B,KAqN3B,EA0CaA,CA1Cb,EApNI,KAoNJ,EA0CaA,CA1Cb,EApN2B,KAoN3B,EA0CaA,CA1Cb,EAnNW,KAmNX,GA0CaA,CA1Cb,EAlNI,KAkNJ,EA0CaA,CA1Cb,EAlN2B,KAkN3B,EA0CaA,CA1Cb,EAjNI,KAiNJ,EA0CaA,CA1Cb,EAjN2B,KAiN3B,EA0CaA,CA1Cb,EAhNW,KAgNX,GA0CaA,CA1Cb,EA/MI,KA+MJ,EA0CaA,CA1Cb,EA/M2B,KA+M3B,EA0CaA,CA1Cb,EA9MI,KA8MJ,EA0CaA,CA1Cb,EA9M2B,KA8M3B,EA0CaA,CA1Cb,EA7MI,KA6MJ,EA0CaA,CA1Cb,EA7M2B,KA6M3B,EA0CaA,CA1Cb,EA5MI,KA4MJ,EA0CaA,CA1Cb,EA5M2B,KA4M3B,EA0CaA,CA1Cb,EA3MI,KA2MJ,EA0CaA,CA1Cb,EA3M2B,KA2M3B,EA0CaA,CA1Cb,EA1MI,KA0MJ,EA0CaA,CA1Cb,EA1M2B,KA0M3B,EA0CaA,CA1Cb,EAzMI,KAyMJ,EA0CaA,CA1Cb,EAzM2B,KAyM3B,EA0CaA,CA1Cb,EAxMI,KAwMJ,EA0CaA,CA1Cb,EAxM2B,KAwM3B,EA0CaA,CA1Cb;AAvMI,KAuMJ,EA0CaA,CA1Cb,EAvM2B,KAuM3B,EA0CaA,CA1Cb,EAtMI,KAsMJ,EA0CaA,CA1Cb,EAtM2B,KAsM3B,EA0CaA,CA1Cb,EArMI,KAqMJ,EA0CaA,CA1Cb,EArM2B,KAqM3B,EA0CaA,CA1Cb,EApMI,KAoMJ,EA0CaA,CA1Cb,EApM2B,KAoM3B,EA0CaA,CA1Cb,EAnMI,KAmMJ,EA0CaA,CA1Cb,EAnM2B,KAmM3B,EA0CaA,CA1Cb,EAlMI,KAkMJ,EA0CaA,CA1Cb,EAlM2B,KAkM3B,EA0CaA,CA1Cb,EAjMI,KAiMJ,EA0CaA,CA1Cb,EAjM2B,KAiM3B,EA0CaA,CA1Cb,EAhMW,KAgMX,GA0CaA,CA1Cb,EA/LI,KA+LJ,EA0CaA,CA1Cb,EA/L2B,KA+L3B,EA0CaA,CA1Cb,EA9LI,KA8LJ,EA0CaA,CA1Cb,EA9L2B,KA8L3B,EA0CaA,CA1Cb,EA7LW,KA6LX,GA0CaA,CA1Cb,EA5LI,KA4LJ,EA0CaA,CA1Cb,EA5L2B,KA4L3B,EA0CaA,CA1Cb,EA3LI,KA2LJ,EA0CaA,CA1Cb,EA3L2B,KA2L3B,EA0CaA,CA1Cb,EA1LI,KA0LJ,EA0CaA,CA1Cb,EA1L2B,KA0L3B,EA0CaA,CA1Cb,EAzLI,KAyLJ,EA0CaA,CA1Cb,EAzL2B,KAyL3B,EA0CaA,CA1Cb,EAxLI,KAwLJ,EA0CaA,CA1Cb,EAxL2B,KAwL3B,EA0CaA,CA1Cb,EAvLI,KAuLJ,EA0CaA,CA1Cb,EAvL2B,KAuL3B,EA0CaA,CA1Cb,EAtLI,KAsLJ,EA0CaA,CA1Cb,EAtL2B,KAsL3B,EA0CaA,CA1Cb,EArLI,KAqLJ,EA0CaA,CA1Cb,EArL2B,KAqL3B,EA0CaA,CA1Cb,EApLI,KAoLJ,EA0CaA,CA1Cb,EApL2B,KAoL3B,EA0CaA,CA1Cb,EAnLI,KAmLJ,EA0CaA,CA1Cb,EAnL2B,KAmL3B,EA0CaA,CA1Cb,EAlLI,KAkLJ,EA0CaA,CA1Cb,EAlL2B,KAkL3B,EA0CaA,CA1Cb,EAjLI,KAiLJ,EA0CaA,CA1Cb,EAjL2B,KAiL3B,EA0CaA,CA1Cb,EAhLI,KAgLJ,EA0CaA,CA1Cb,EAhL2B,KAgL3B,EA0CaA,CA1Cb,EA/KI,KA+KJ,EA0CaA,CA1Cb,EA/K2B,KA+K3B,EA0CaA,CA1Cb,EA9KI,KA8KJ,EA0CaA,CA1Cb,EA9K2B,KA8K3B,EA0CaA,CA1Cb;AA7KW,KA6KX,GA0CaA,CA1Cb,EA5KI,KA4KJ,EA0CaA,CA1Cb,EA5K2B,KA4K3B,EA0CaA,CA1Cb,EA3KI,KA2KJ,EA0CaA,CA1Cb,EA3K2B,KA2K3B,EA0CaA,CA1Cb,EA1KI,KA0KJ,EA0CaA,CA1Cb,EA1K2B,KA0K3B,EA0CaA,CA1Cb,EAzKI,KAyKJ,EA0CaA,CA1Cb,EAzK2B,KAyK3B,EA0CaA,CA1Cb,EAxKI,KAwKJ,EA0CaA,CA1Cb,EAxK2B,KAwK3B,EA0CaA,CA1Cb,EAvKI,KAuKJ,EA0CaA,CA1Cb,EAvK2B,KAuK3B,EA0CaA,CA1Cb,EAtKI,KAsKJ,EA0CaA,CA1Cb,EAtK2B,KAsK3B,EA0CaA,CA1Cb,EArKI,KAqKJ,EA0CaA,CA1Cb,EArK2B,KAqK3B,EA0CaA,CA1Cb,EApKI,KAoKJ,EA0CaA,CA1Cb,EApK2B,KAoK3B,EA0CaA,CA1Cb,EAnKI,KAmKJ,EA0CaA,CA1Cb,EAnK2B,KAmK3B,EA0CaA,CA1Cb,EAlKI,KAkKJ,EA0CaA,CA1Cb,EAlK2B,KAkK3B,EA0CaA,CA1Cb,EAjKI,KAiKJ,EA0CaA,CA1Cb,EAjK2B,KAiK3B,EA0CaA,CA1Cb,EAhKI,KAgKJ,EA0CaA,CA1Cb,EAhK2B,KAgK3B,EA0CaA,CA1Cb,EA/JI,KA+JJ,EA0CaA,CA1Cb,EA/J2B,KA+J3B,EA0CaA,CA1Cb,EA9JI,KA8JJ,EA0CaA,CA1Cb,EA9J2B,KA8J3B,EA0CaA,CA1Cb,EA7JI,KA6JJ,EA0CaA,CA1Cb,EA7J2B,KA6J3B,EA0CaA,CA1Cb,EA5JI,KA4JJ,EA0CaA,CA1Cb,EA5J2B,KA4J3B,EA0CaA,CA1Cb,EA3JI,KA2JJ,EA0CaA,CA1Cb,EA3J2B,KA2J3B,EA0CaA,CA1Cb,EA1JI,KA0JJ,EA0CaA,CA1Cb,EA1J2B,KA0J3B,EA0CaA,CA1Cb,EAzJW,KAyJX,GA0CaA,CA1Cb,EAxJI,KAwJJ,EA0CaA,CA1Cb,EAxJ2B,KAwJ3B,EA0CaA,CA1Cb,EAvJI,KAuJJ,EA0CaA,CA1Cb,EAvJ2B,KAuJ3B,EA0CaA,CA1Cb,EAtJI,KAsJJ,EA0CaA,CA1Cb,EAtJ2B,KAsJ3B,EA0CaA,CA1Cb,EArJW,KAqJX,GA0CaA,CA1Cb,EApJI,KAoJJ,EA0CaA,CA1Cb,EApJ2B,KAoJ3B,EA0CaA,CA1Cb,EAnJI,KAmJJ,EA0CaA,CA1Cb;AAnJ2B,KAmJ3B,EA0CaA,CA1Cb,EAlJI,KAkJJ,EA0CaA,CA1Cb,EAlJ2B,KAkJ3B,EA0CaA,CA1Cb,EAjJW,KAiJX,GA0CaA,CA1Cb,EAhJI,KAgJJ,EA0CaA,CA1Cb,EAhJ2B,KAgJ3B,EA0CaA,CA1Cb,EA/II,KA+IJ,EA0CaA,CA1Cb,EA/I2B,KA+I3B,EA0CaA,CA1Cb,EA9II,KA8IJ,EA0CaA,CA1Cb,EA9I2B,KA8I3B,EA0CaA,CA1Cb,EA7II,KA6IJ,EA0CaA,CA1Cb,EA7I2B,KA6I3B,EA0CaA,CA1Cb,EA5II,KA4IJ,EA0CaA,CA1Cb,EA5I2B,KA4I3B,EA0CaA,CA1Cb,EA3II,KA2IJ,EA0CaA,CA1Cb,EA3I2B,KA2I3B,EA0CaA,CA1Cb,EA1II,KA0IJ,EA0CaA,CA1Cb,EA1I2B,KA0I3B,EA0CaA,CA1Cb,EAzII,KAyIJ,EA0CaA,CA1Cb,EAzI2B,KAyI3B,EA0CaA,CA1Cb,EAxII,KAwIJ,EA0CaA,CA1Cb,EAxI2B,KAwI3B,EA0CaA,CA1Cb,EAvII,KAuIJ,EA0CaA,CA1Cb,EAvI2B,KAuI3B,EA0CaA,CA1Cb,EAtII,KAsIJ,EA0CaA,CA1Cb,EAtI2B,KAsI3B,EA0CaA,CA1Cb,EArII,KAqIJ,EA0CaA,CA1Cb,EArI2B,KAqI3B,EA0CaA,CA1Cb,EApII,KAoIJ,EA0CaA,CA1Cb,EApI2B,KAoI3B,EA0CaA,CA1Cb,EAnII,KAmIJ,EA0CaA,CA1Cb,EAnI2B,KAmI3B,EA0CaA,CA1Cb,EAlII,KAkIJ,EA0CaA,CA1Cb,EAlI2B,KAkI3B,EA0CaA,CA1Cb,EAjIW,KAiIX,GA0CaA,CA1Cb,EAhIW,KAgIX,GA0CaA,CA1Cb,EA/HI,KA+HJ,EA0CaA,CA1Cb,EA/H2B,KA+H3B,EA0CaA,CA1Cb,EA9HI,KA8HJ,EA0CaA,CA1Cb,EA9H2B,KA8H3B,EA0CaA,CA1Cb,EA7HI,KA6HJ,EA0CaA,CA1Cb,EA7H2B,KA6H3B,EA0CaA,CA1Cb,EA5HI,KA4HJ,EA0CaA,CA1Cb,EA5H2B,KA4H3B,EA0CaA,CA1Cb,EA3HW,KA2HX,GA0CaA,CA1Cb,EA1HI,KA0HJ,EA0CaA,CA1Cb,EA1H2B,KA0H3B,EA0CaA,CA1Cb,EAzHI,KAyHJ,EA0CaA,CA1Cb,EAzH2B,KAyH3B,EA0CaA,CA1Cb,EAxHI,KAwHJ;AA0CaA,CA1Cb,EAxH2B,KAwH3B,EA0CaA,CA1Cb,EAvHI,KAuHJ,EA0CaA,CA1Cb,EAvH2B,KAuH3B,EA0CaA,CA1Cb,EAtHI,KAsHJ,EA0CaA,CA1Cb,EAtH2B,KAsH3B,EA0CaA,CA1Cb,EArHW,KAqHX,GA0CaA,CA1Cb,EApHI,KAoHJ,EA0CaA,CA1Cb,EApH2B,KAoH3B,EA0CaA,CA1Cb,EAnHI,KAmHJ,EA0CaA,CA1Cb,EAnH2B,KAmH3B,EA0CaA,CA1Cb,EAlHI,KAkHJ,EA0CaA,CA1Cb,EAlH2B,KAkH3B,EA0CaA,CA1Cb,EAjHI,KAiHJ,EA0CaA,CA1Cb,EAjH2B,KAiH3B,EA0CaA,CA1Cb,EAhHI,KAgHJ,EA0CaA,CA1Cb,EAhH2B,KAgH3B,EA0CaA,CA1Cb,EA/GI,KA+GJ,EA0CaA,CA1Cb,EA/G2B,KA+G3B,EA0CaA,CA1Cb,EA9GI,KA8GJ,EA0CaA,CA1Cb,EA9G2B,KA8G3B,EA0CaA,CA1Cb,EA7GW,KA6GX,GA0CaA,CA1Cb,EA5GI,KA4GJ,EA0CaA,CA1Cb,EA5G2B,KA4G3B,EA0CaA,CA1Cb,EA3GI,KA2GJ,EA0CaA,CA1Cb,EA3G2B,KA2G3B,EA0CaA,CA1Cb,EA1GI,KA0GJ,EA0CaA,CA1Cb,EA1G2B,KA0G3B,EA0CaA,CA1Cb,EAzGI,KAyGJ,EA0CaA,CA1Cb,EAzG2B,KAyG3B,EA0CaA,CA1Cb,EAxGI,KAwGJ,EA0CaA,CA1Cb,EAxG2B,KAwG3B,EA0CaA,CA1Cb,EAvGI,KAuGJ,EA0CaA,CA1Cb,EAvG2B,KAuG3B,EA0CaA,CA1Cb,EAtGI,KAsGJ,EA0CaA,CA1Cb,EAtG2B,KAsG3B,EA0CaA,CA1Cb,EArGI,KAqGJ,EA0CaA,CA1Cb,EArG2B,KAqG3B,EA0CaA,CA1Cb,EApGI,KAoGJ,EA0CaA,CA1Cb,EApG2B,KAoG3B,EA0CaA,CA1Cb,EAnGI,KAmGJ,EA0CaA,CA1Cb,EAnG2B,KAmG3B,EA0CaA,CA1Cb,EAlGI,KAkGJ,EA0CaA,CA1Cb,EAlG2B,KAkG3B,EA0CaA,CA1Cb,EAjGI,KAiGJ,EA0CaA,CA1Cb,EAjG2B,KAiG3B,EA0CaA,CA1Cb,EAhGI,KAgGJ,EA0CaA,CA1Cb,EAhG2B,KAgG3B,EA0CaA,CA1Cb,EA/FI,KA+FJ,EA0CaA,CA1Cb,EA/F2B,KA+F3B,EA0CaA,CA1Cb,EA9FI,KA8FJ;AA0CaA,CA1Cb,EA9F2B,KA8F3B,EA0CaA,CA1Cb,EA7FI,KA6FJ,EA0CaA,CA1Cb,EA7F2B,KA6F3B,EA0CaA,CA1Cb,EA5FI,KA4FJ,EA0CaA,CA1Cb,EA5F2B,KA4F3B,EA0CaA,CA1Cb,EA3FI,KA2FJ,EA0CaA,CA1Cb,EA3F2B,KA2F3B,EA0CaA,CA1Cb,EA1FI,KA0FJ,EA0CaA,CA1Cb,EA1F2B,KA0F3B,EA0CaA,CA1Cb,EAzFI,MAyFJ,EA0CaA,CA1Cb,EAzF2B,MAyF3B,EA0CaA,CA1Cb,EAxFI,MAwFJ,EA0CaA,CA1Cb,EAxF2B,MAwF3B,EA0CaA,CA1Cb,EAvFI,MAuFJ,EA0CaA,CA1Cb,EAvF2B,MAuF3B,EA0CaA,CA1Cb,EAtFI,MAsFJ,EA0CaA,CA1Cb,EAtF2B,MAsF3B,EA0CaA,CA1Cb,EArFI,MAqFJ,EA0CaA,CA1Cb,EArF2B,MAqF3B,EA0CaA,CA1Cb,EApFI,MAoFJ,EA0CaA,CA1Cb,EApF2B,MAoF3B,EA0CaA,CA1Cb,EAnFI,MAmFJ,EA0CaA,CA1Cb,EAnF2B,MAmF3B,EA0CaA,CA1Cb,EAlFI,MAkFJ,EA0CaA,CA1Cb,EAlF2B,MAkF3B,EA0CaA,CA1Cb,EAjFI,MAiFJ,EA0CaA,CA1Cb,EAjF2B,MAiF3B,EA0CaA,CA1Cb,EAhFI,MAgFJ,EA0CaA,CA1Cb,EAhF2B,MAgF3B,EA0CaA,CA1Cb,EA/EI,MA+EJ,EA0CaA,CA1Cb,EA/E2B,MA+E3B,EA0CaA,CA1Cb,EA9EI,MA8EJ,EA0CaA,CA1Cb,EA9E2B,MA8E3B,EA0CaA,CA1Cb,EA7EI,MA6EJ,EA0CaA,CA1Cb,EA7E2B,MA6E3B,EA0CaA,CA1Cb,EA5EI,MA4EJ,EA0CaA,CA1Cb,EA5E2B,MA4E3B,EA0CaA,CA1Cb,EA3EI,MA2EJ,EA0CaA,CA1Cb,EA3E2B,MA2E3B,EA0CaA,CA1Cb,EA1EW,MA0EX,GA0CaA,CA1Cb,EAzEI,MAyEJ,EA0CaA,CA1Cb,EAzE2B,MAyE3B,EA0CaA,CA1Cb,EAxEI,MAwEJ,EA0CaA,CA1Cb,EAxE2B,MAwE3B,EA0CaA,CA1Cb,EAvEI,MAuEJ,EA0CaA,CA1Cb,EAvE2B,MAuE3B,EA0CaA,CA1Cb;AAtEW,MAsEX,GA0CaA,CA1Cb,EArEI,MAqEJ,EA0CaA,CA1Cb,EArE2B,MAqE3B,EA0CaA,CA1Cb,EApEI,MAoEJ,EA0CaA,CA1Cb,EApE2B,MAoE3B,EA0CaA,CA1Cb,EAnEI,MAmEJ,EA0CaA,CA1Cb,EAnE2B,MAmE3B,EA0CaA,CA1Cb,EAlEI,MAkEJ,EA0CaA,CA1Cb,EAlE2B,MAkE3B,EA0CaA,CA1Cb,EAjEI,MAiEJ,EA0CaA,CA1Cb,EAjE2B,MAiE3B,EA0CaA,CA1Cb,EAhEI,MAgEJ,EA0CaA,CA1Cb,EAhE2B,MAgE3B,EA0CaA,CA1Cb,EA/DI,MA+DJ,EA0CaA,CA1Cb,EA/D2B,MA+D3B,EA0CaA,CA1Cb,EA9DI,MA8DJ,EA0CaA,CA1Cb,EA9D2B,MA8D3B,EA0CaA,CA1Cb,EA7DW,MA6DX,GA0CaA,CA1Cb,EA5DI,MA4DJ,EA0CaA,CA1Cb,EA5D2B,MA4D3B,EA0CaA,CA1Cb,EA3DI,MA2DJ,EA0CaA,CA1Cb,EA3D2B,MA2D3B,EA0CaA,CA1Cb,EA1DI,MA0DJ,EA0CaA,CA1Cb,EA1D2B,MA0D3B,EA0CaA,CA1Cb,EAzDI,MAyDJ,EA0CaA,CA1Cb,EAzD2B,MAyD3B,EA0CaA,CA1Cb,EAxDI,MAwDJ,EA0CaA,CA1Cb,EAxD2B,MAwD3B,EA0CaA,CA1Cb,EAvDI,MAuDJ,EA0CaA,CA1Cb,EAvD2B,MAuD3B,EA0CaA,CA1Cb,EAtDI,MAsDJ,EA0CaA,CA1Cb,EAtD2B,MAsD3B,EA0CaA,CA1Cb,EArDI,MAqDJ,EA0CaA,CA1Cb,EArD2B,MAqD3B,EA0CaA,CA1Cb,EApDI,MAoDJ,EA0CaA,CA1Cb,EApD2B,MAoD3B,EA0CaA,CA1Cb,EAnDI,MAmDJ,EA0CaA,CA1Cb,EAnD2B,MAmD3B,EA0CaA,CA1Cb,EAlDI,MAkDJ,EA0CaA,CA1Cb,EAlD2B,MAkD3B,EA0CaA,CA1Cb,EAjDI,MAiDJ,EA0CaA,CA1Cb,EAjD2B,MAiD3B,EA0CaA,CA1Cb,EAhDI,MAgDJ,EA0CaA,CA1Cb,EAhD2B,MAgD3B,EA0CaA,CA1Cb,EA/CI,MA+CJ,EA0CaA,CA1Cb,EA/C2B,MA+C3B;AA0CaA,CA1Cb,EA9CI,MA8CJ,EA0CaA,CA1Cb,EA9C2B,MA8C3B,EA0CaA,CA1Cb,EA7CI,MA6CJ,EA0CaA,CA1Cb,EA7C2B,MA6C3B,EA0CaA,CA1Cb,EA5CW,MA4CX,GA0CaA,CA1Cb,EA3CW,MA2CX,GA0CaA,CA1Cb,EA1CI,MA0CJ,EA0CaA,CA1Cb,EA1C2B,MA0C3B,EA0CaA,CA1Cb,EAzCI,MAyCJ,EA0CaA,CA1Cb,EAzC2B,MAyC3B,EA0CaA,CA1Cb,EAxCI,MAwCJ,EA0CaA,CA1Cb,EAxC2B,MAwC3B,EA0CaA,CA1Cb,EAvCI,MAuCJ,EA0CaA,CA1Cb,EAvC2B,MAuC3B,EA0CaA,CA1Cb,EAtCI,MAsCJ,EA0CaA,CA1Cb,EAtC2B,MAsC3B,EA0CaA,CA1Cb,EArCI,MAqCJ,EA0CaA,CA1Cb,EArC2B,MAqC3B,EA0CaA,CA1Cb,EApCI,MAoCJ,EA0CaA,CA1Cb,EApC2B,MAoC3B,EA0CaA,CA1Cb,EAnCW,MAmCX,GA0CaA,CA1Cb,EAlCW,MAkCX,GA0CaA,CA1Cb,EAjCI,MAiCJ,EA0CaA,CA1Cb,EAjC2B,MAiC3B,EA0CaA,CA1Cb,EAhCI,MAgCJ,EA0CaA,CA1Cb,EAhC2B,MAgC3B,EA0CaA,CA1Cb,EA/BW,MA+BX,GA0CaA,CA1Cb,EA9BW,MA8BX,GA0CaA,CA1Cb,EA7BW,MA6BX,GA0CaA,CA1Cb,EA5BW,MA4BX,GA0CaA,CA1Cb,EA3BW,MA2BX,GA0CaA,CA1Cb,EA1BW,MA0BX,GA0CaA,CA1Cb,EAzBI,MAyBJ,EA0CaA,CA1Cb,EAzB2B,MAyB3B,EA0CaA,CA1Cb,EAxBI,MAwBJ,EA0CaA,CA1Cb,EAxB2B,MAwB3B,EA0CaA,CA1Cb,EAvBW,MAuBX,GA0CaA,CA1Cb,EAtBW,MAsBX,GA0CaA,CA1Cb,EArBW,MAqBX,GA0CaA,CA1Cb,EApBW,MAoBX,GA0CaA,CA1Cb,EAnBW,MAmBX,GA0CaA,CA1Cb,EAlBW,MAkBX,GA0CaA,CA1Cb,EAjBI,MAiBJ,EA0CaA,CA1Cb,EAjB2B,MAiB3B,EA0CaA,CA1Cb;AAhBW,MAgBX,GA0CaA,CA1Cb,EAfI,MAeJ,EA0CaA,CA1Cb,EAf2B,MAe3B,EA0CaA,CA1Cb,EAdI,MAcJ,EA0CaA,CA1Cb,EAd2B,MAc3B,EA0CaA,CA1Cb,EAbI,MAaJ,EA0CaA,CA1Cb,EAb2B,MAa3B,EA0CaA,CA1Cb,EAZI,MAYJ,EA0CaA,CA1Cb,EAZ2B,MAY3B,EA0CaA,CA1Cb,EAXW,MAWX,GA0CaA,CA1Cb,EAVI,MAUJ,EA0CaA,CA1Cb,EAV2B,MAU3B,EA0CaA,CA1Cb,EATI,MASJ,EA0CaA,CA1Cb,EAT2B,MAS3B,EA0CaA,CA1Cb,EARI,MAQJ,EA0CaA,CA1Cb,EAR2B,MAQ3B,EA0CaA,CA1Cb,EAPI,MAOJ,EA0CaA,CA1Cb,EAP2B,MAO3B,EA0CaA,CA1Cb,EANI,MAMJ,EA0CaA,CA1Cb,EAN2B,MAM3B,EA0CaA,CA1Cb,EALI,MAKJ,EA0CaA,CA1Cb,EAL2B,MAK3B,EA0CaA,CA1Cb,EAJI,MAIJ,EA0CaA,CA1Cb,EAJ2B,MAI3B,EA0CaA,CA1Cb,EAHI,MAGJ,EA0CaA,CA1Cb,EAH2B,MAG3B,EA0CaA,CA1Cb,EAFI,MAEJ,EA0CaA,CA1Cb,EAF2B,MAE3B,EA0CaA,CA1Cb,EADI,MACJ,EA0CaA,CA1Cb,EAD2B,MAC3B,EA0CaA,CA1Cb,EAAI,MAAJ,EA0CaA,CA1Cb,EAA2B,MAA3B,EA0CaA,CA1Cb,CAA2C,CAAA,CAA3C,CACO,CAAA,CAqCP,CADyC,CAQ3CH,CAAAK,OAAA,CAAe,YAAf,CAA6B,EAA7B,CAAAC,OAAA,CACU,CAAC,gBAAD,CAAmB,QAAQ,CAACC,CAAD,CAAiB,CAClDA,CAAAC,iBAAA,CAAgCP,CAAhC,CAAwDG,CAAxD,CADkD,CAA5C,CADV,CAAAK,KAAA,CAIQ,CAAEC,eAAgB,OAAlB,CAJR,CA7uC2B,CAA1B,CAAD,CAovCGX,MApvCH,CAovCWA,MAAAC,QApvCX;", +"sources":["angular-parse-ext.js"], +"names":["window","angular","isValidIdentifierStart","ch","cp","isValidIdentifierContinue","module","config","$parseProvider","setIdentifierFns","info","angularVersion"] +} diff --git a/1.6.6/angular-resource.js b/1.6.6/angular-resource.js new file mode 100644 index 000000000..21753ebed --- /dev/null +++ b/1.6.6/angular-resource.js @@ -0,0 +1,867 @@ +/** + * @license AngularJS v1.6.6 + * (c) 2010-2017 Google, Inc. http://angularjs.org + * License: MIT + */ +(function(window, angular) {'use strict'; + +var $resourceMinErr = angular.$$minErr('$resource'); + +// Helper functions and regex to lookup a dotted path on an object +// stopping at undefined/null. The path must be composed of ASCII +// identifiers (just like $parse) +var MEMBER_NAME_REGEX = /^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/; + +function isValidDottedPath(path) { + return (path != null && path !== '' && path !== 'hasOwnProperty' && + MEMBER_NAME_REGEX.test('.' + path)); +} + +function lookupDottedPath(obj, path) { + if (!isValidDottedPath(path)) { + throw $resourceMinErr('badmember', 'Dotted member path "@{0}" is invalid.', path); + } + var keys = path.split('.'); + for (var i = 0, ii = keys.length; i < ii && angular.isDefined(obj); i++) { + var key = keys[i]; + obj = (obj !== null) ? obj[key] : undefined; + } + return obj; +} + +/** + * Create a shallow copy of an object and clear other fields from the destination + */ +function shallowClearAndCopy(src, dst) { + dst = dst || {}; + + angular.forEach(dst, function(value, key) { + delete dst[key]; + }); + + for (var key in src) { + if (src.hasOwnProperty(key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) { + dst[key] = src[key]; + } + } + + return dst; +} + +/** + * @ngdoc module + * @name ngResource + * @description + * + * # ngResource + * + * The `ngResource` module provides interaction support with RESTful services + * via the $resource service. + * + * + *
+ * + * See {@link ngResource.$resourceProvider} and {@link ngResource.$resource} for usage. + */ + +/** + * @ngdoc provider + * @name $resourceProvider + * + * @description + * + * Use `$resourceProvider` to change the default behavior of the {@link ngResource.$resource} + * service. + * + * ## Dependencies + * Requires the {@link ngResource } module to be installed. + * + */ + +/** + * @ngdoc service + * @name $resource + * @requires $http + * @requires ng.$log + * @requires $q + * @requires ng.$timeout + * + * @description + * A factory which creates a resource object that lets you interact with + * [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources. + * + * The returned resource object has action methods which provide high-level behaviors without + * the need to interact with the low level {@link ng.$http $http} service. + * + * Requires the {@link ngResource `ngResource`} module to be installed. + * + * By default, trailing slashes will be stripped from the calculated URLs, + * which can pose problems with server backends that do not expect that + * behavior. This can be disabled by configuring the `$resourceProvider` like + * this: + * + * ```js + app.config(['$resourceProvider', function($resourceProvider) { + // Don't strip trailing slashes from calculated URLs + $resourceProvider.defaults.stripTrailingSlashes = false; + }]); + * ``` + * + * @param {string} url A parameterized URL template with parameters prefixed by `:` as in + * `/user/:username`. If you are using a URL with a port number (e.g. + * `http://example.com:8080/api`), it will be respected. + * + * If you are using a url with a suffix, just add the suffix, like this: + * `$resource('http://example.com/resource.json')` or `$resource('http://example.com/:id.json')` + * or even `$resource('http://example.com/resource/:resource_id.:format')` + * If the parameter before the suffix is empty, :resource_id in this case, then the `/.` will be + * collapsed down to a single `.`. If you need this sequence to appear and not collapse then you + * can escape it with `/\.`. + * + * @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in + * `actions` methods. If a parameter value is a function, it will be called every time + * a param value needs to be obtained for a request (unless the param was overridden). The function + * will be passed the current data value as an argument. + * + * Each key value in the parameter object is first bound to url template if present and then any + * excess keys are appended to the url search query after the `?`. + * + * Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in + * URL `/path/greet?salutation=Hello`. + * + * If the parameter value is prefixed with `@`, then the value for that parameter will be + * extracted from the corresponding property on the `data` object (provided when calling actions + * with a request body). + * For example, if the `defaultParam` object is `{someParam: '@someProp'}` then the value of + * `someParam` will be `data.someProp`. + * Note that the parameter will be ignored, when calling a "GET" action method (i.e. an action + * method that does not accept a request body) + * + * @param {Object.=} actions Hash with declaration of custom actions that will be available + * in addition to the default set of resource actions (see below). If a custom action has the same + * key as a default action (e.g. `save`), then the default action will be *overwritten*, and not + * extended. + * + * The declaration should be created in the format of {@link ng.$http#usage $http.config}: + * + * {action1: {method:?, params:?, isArray:?, headers:?, ...}, + * action2: {method:?, params:?, isArray:?, headers:?, ...}, + * ...} + * + * Where: + * + * - **`action`** – {string} – The name of action. This name becomes the name of the method on + * your resource object. + * - **`method`** – {string} – Case insensitive HTTP method (e.g. `GET`, `POST`, `PUT`, + * `DELETE`, `JSONP`, etc). + * - **`params`** – {Object=} – Optional set of pre-bound parameters for this action. If any of + * the parameter value is a function, it will be called every time when a param value needs to + * be obtained for a request (unless the param was overridden). The function will be passed the + * current data value as an argument. + * - **`url`** – {string} – action specific `url` override. The url templating is supported just + * like for the resource-level urls. + * - **`isArray`** – {boolean=} – If true then the returned object for this action is an array, + * see `returns` section. + * - **`transformRequest`** – + * `{function(data, headersGetter)|Array.}` – + * transform function or an array of such functions. The transform function takes the http + * request body and headers and returns its transformed (typically serialized) version. + * By default, transformRequest will contain one function that checks if the request data is + * an object and serializes it using `angular.toJson`. To prevent this behavior, set + * `transformRequest` to an empty array: `transformRequest: []` + * - **`transformResponse`** – + * `{function(data, headersGetter, status)|Array.}` – + * transform function or an array of such functions. The transform function takes the http + * response body, headers and status and returns its transformed (typically deserialized) + * version. + * By default, transformResponse will contain one function that checks if the response looks + * like a JSON string and deserializes it using `angular.fromJson`. To prevent this behavior, + * set `transformResponse` to an empty array: `transformResponse: []` + * - **`cache`** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the + * GET request, otherwise if a cache instance built with + * {@link ng.$cacheFactory $cacheFactory} is supplied, this cache will be used for + * caching. + * - **`timeout`** – `{number}` – timeout in milliseconds.
+ * **Note:** In contrast to {@link ng.$http#usage $http.config}, {@link ng.$q promises} are + * **not** supported in $resource, because the same value would be used for multiple requests. + * If you are looking for a way to cancel requests, you should use the `cancellable` option. + * - **`cancellable`** – `{boolean}` – if set to true, the request made by a "non-instance" call + * will be cancelled (if not already completed) by calling `$cancelRequest()` on the call's + * return value. Calling `$cancelRequest()` for a non-cancellable or an already + * completed/cancelled request will have no effect.
+ * - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the + * XHR object. See + * [requests with credentials](https://developer.mozilla.org/en/http_access_control#section_5) + * for more information. + * - **`responseType`** - `{string}` - see + * [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType). + * - **`interceptor`** - `{Object=}` - The interceptor object has two optional methods - + * `response` and `responseError`. Both `response` and `responseError` interceptors get called + * with `http response` object. See {@link ng.$http $http interceptors}. In addition, the + * resource instance or array object is accessible by the `resource` property of the + * `http response` object. + * Keep in mind that the associated promise will be resolved with the value returned by the + * response interceptor, if one is specified. The default response interceptor returns + * `response.resource` (i.e. the resource instance or array). + * - **`hasBody`** - `{boolean}` - allows to specify if a request body should be included or not. + * If not specified only POST, PUT and PATCH requests will have a body. + * + * @param {Object} options Hash with custom settings that should extend the + * default `$resourceProvider` behavior. The supported options are: + * + * - **`stripTrailingSlashes`** – {boolean} – If true then the trailing + * slashes from any calculated URL will be stripped. (Defaults to true.) + * - **`cancellable`** – {boolean} – If true, the request made by a "non-instance" call will be + * cancelled (if not already completed) by calling `$cancelRequest()` on the call's return value. + * This can be overwritten per action. (Defaults to false.) + * + * @returns {Object} A resource "class" object with methods for the default set of resource actions + * optionally extended with custom `actions`. The default set contains these actions: + * ```js + * { 'get': {method:'GET'}, + * 'save': {method:'POST'}, + * 'query': {method:'GET', isArray:true}, + * 'remove': {method:'DELETE'}, + * 'delete': {method:'DELETE'} }; + * ``` + * + * Calling these methods invoke an {@link ng.$http} with the specified http method, + * destination and parameters. When the data is returned from the server then the object is an + * instance of the resource class. The actions `save`, `remove` and `delete` are available on it + * as methods with the `$` prefix. This allows you to easily perform CRUD operations (create, + * read, update, delete) on server-side data like this: + * ```js + * var User = $resource('/user/:userId', {userId:'@id'}); + * var user = User.get({userId:123}, function() { + * user.abc = true; + * user.$save(); + * }); + * ``` + * + * It is important to realize that invoking a $resource object method immediately returns an + * empty reference (object or array depending on `isArray`). Once the data is returned from the + * server the existing reference is populated with the actual data. This is a useful trick since + * usually the resource is assigned to a model which is then rendered by the view. Having an empty + * object results in no rendering, once the data arrives from the server then the object is + * populated with the data and the view automatically re-renders itself showing the new data. This + * means that in most cases one never has to write a callback function for the action methods. + * + * The action methods on the class object or instance object can be invoked with the following + * parameters: + * + * - "class" actions without a body: `Resource.action([parameters], [success], [error])` + * - "class" actions with a body: `Resource.action([parameters], postData, [success], [error])` + * - instance actions: `instance.$action([parameters], [success], [error])` + * + * + * When calling instance methods, the instance itself is used as the request body (if the action + * should have a body). By default, only actions using `POST`, `PUT` or `PATCH` have request + * bodies, but you can use the `hasBody` configuration option to specify whether an action + * should have a body or not (regardless of its HTTP method). + * + * + * Success callback is called with (value (Object|Array), responseHeaders (Function), + * status (number), statusText (string)) arguments, where the value is the populated resource + * instance or collection object. The error callback is called with (httpResponse) argument. + * + * Class actions return empty instance (with additional properties below). + * Instance actions return promise of the action. + * + * The Resource instances and collections have these additional properties: + * + * - `$promise`: the {@link ng.$q promise} of the original server interaction that created this + * instance or collection. + * + * On success, the promise is resolved with the same resource instance or collection object, + * updated with data from server. This makes it easy to use in + * {@link ngRoute.$routeProvider resolve section of $routeProvider.when()} to defer view + * rendering until the resource(s) are loaded. + * + * On failure, the promise is rejected with the {@link ng.$http http response} object. + * + * If an interceptor object was provided, the promise will instead be resolved with the value + * returned by the interceptor. + * + * - `$resolved`: `true` after first server interaction is completed (either with success or + * rejection), `false` before that. Knowing if the Resource has been resolved is useful in + * data-binding. + * + * The Resource instances and collections have these additional methods: + * + * - `$cancelRequest`: If there is a cancellable, pending request related to the instance or + * collection, calling this method will abort the request. + * + * The Resource instances have these additional methods: + * + * - `toJSON`: It returns a simple object without any of the extra properties added as part of + * the Resource API. This object can be serialized through {@link angular.toJson} safely + * without attaching Angular-specific fields. Notice that `JSON.stringify` (and + * `angular.toJson`) automatically use this method when serializing a Resource instance + * (see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON%28%29_behavior)). + * + * @example + * + * # Credit card resource + * + * ```js + // Define CreditCard class + var CreditCard = $resource('/user/:userId/card/:cardId', + {userId:123, cardId:'@id'}, { + charge: {method:'POST', params:{charge:true}} + }); + + // We can retrieve a collection from the server + var cards = CreditCard.query(function() { + // GET: /user/123/card + // server returns: [ {id:456, number:'1234', name:'Smith'} ]; + + var card = cards[0]; + // each item is an instance of CreditCard + expect(card instanceof CreditCard).toEqual(true); + card.name = "J. Smith"; + // non GET methods are mapped onto the instances + card.$save(); + // POST: /user/123/card/456 {id:456, number:'1234', name:'J. Smith'} + // server returns: {id:456, number:'1234', name: 'J. Smith'}; + + // our custom method is mapped as well. + card.$charge({amount:9.99}); + // POST: /user/123/card/456?amount=9.99&charge=true {id:456, number:'1234', name:'J. Smith'} + }); + + // we can create an instance as well + var newCard = new CreditCard({number:'0123'}); + newCard.name = "Mike Smith"; + newCard.$save(); + // POST: /user/123/card {number:'0123', name:'Mike Smith'} + // server returns: {id:789, number:'0123', name: 'Mike Smith'}; + expect(newCard.id).toEqual(789); + * ``` + * + * The object returned from this function execution is a resource "class" which has "static" method + * for each action in the definition. + * + * Calling these methods invoke `$http` on the `url` template with the given `method`, `params` and + * `headers`. + * + * @example + * + * # User resource + * + * When the data is returned from the server then the object is an instance of the resource type and + * all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD + * operations (create, read, update, delete) on server-side data. + + ```js + var User = $resource('/user/:userId', {userId:'@id'}); + User.get({userId:123}, function(user) { + user.abc = true; + user.$save(); + }); + ``` + * + * It's worth noting that the success callback for `get`, `query` and other methods gets passed + * in the response that came from the server as well as $http header getter function, so one + * could rewrite the above example and get access to http headers as: + * + ```js + var User = $resource('/user/:userId', {userId:'@id'}); + User.get({userId:123}, function(user, getResponseHeaders){ + user.abc = true; + user.$save(function(user, putResponseHeaders) { + //user => saved user object + //putResponseHeaders => $http header getter + }); + }); + ``` + * + * You can also access the raw `$http` promise via the `$promise` property on the object returned + * + ``` + var User = $resource('/user/:userId', {userId:'@id'}); + User.get({userId:123}) + .$promise.then(function(user) { + $scope.user = user; + }); + ``` + * + * @example + * + * # Creating a custom 'PUT' request + * + * In this example we create a custom method on our resource to make a PUT request + * ```js + * var app = angular.module('app', ['ngResource', 'ngRoute']); + * + * // Some APIs expect a PUT request in the format URL/object/ID + * // Here we are creating an 'update' method + * app.factory('Notes', ['$resource', function($resource) { + * return $resource('/notes/:id', null, + * { + * 'update': { method:'PUT' } + * }); + * }]); + * + * // In our controller we get the ID from the URL using ngRoute and $routeParams + * // We pass in $routeParams and our Notes factory along with $scope + * app.controller('NotesCtrl', ['$scope', '$routeParams', 'Notes', + function($scope, $routeParams, Notes) { + * // First get a note object from the factory + * var note = Notes.get({ id:$routeParams.id }); + * $id = note.id; + * + * // Now call update passing in the ID first then the object you are updating + * Notes.update({ id:$id }, note); + * + * // This will PUT /notes/ID with the note object in the request payload + * }]); + * ``` + * + * @example + * + * # Cancelling requests + * + * If an action's configuration specifies that it is cancellable, you can cancel the request related + * to an instance or collection (as long as it is a result of a "non-instance" call): + * + ```js + // ...defining the `Hotel` resource... + var Hotel = $resource('/api/hotel/:id', {id: '@id'}, { + // Let's make the `query()` method cancellable + query: {method: 'get', isArray: true, cancellable: true} + }); + + // ...somewhere in the PlanVacationController... + ... + this.onDestinationChanged = function onDestinationChanged(destination) { + // We don't care about any pending request for hotels + // in a different destination any more + this.availableHotels.$cancelRequest(); + + // Let's query for hotels in '' + // (calls: /api/hotel?location=) + this.availableHotels = Hotel.query({location: destination}); + }; + ``` + * + */ +angular.module('ngResource', ['ng']). + info({ angularVersion: '1.6.6' }). + provider('$resource', function ResourceProvider() { + var PROTOCOL_AND_IPV6_REGEX = /^https?:\/\/\[[^\]]*][^/]*/; + + var provider = this; + + /** + * @ngdoc property + * @name $resourceProvider#defaults + * @description + * Object containing default options used when creating `$resource` instances. + * + * The default values satisfy a wide range of usecases, but you may choose to overwrite any of + * them to further customize your instances. The available properties are: + * + * - **stripTrailingSlashes** – `{boolean}` – If true, then the trailing slashes from any + * calculated URL will be stripped.
+ * (Defaults to true.) + * - **cancellable** – `{boolean}` – If true, the request made by a "non-instance" call will be + * cancelled (if not already completed) by calling `$cancelRequest()` on the call's return + * value. For more details, see {@link ngResource.$resource}. This can be overwritten per + * resource class or action.
+ * (Defaults to false.) + * - **actions** - `{Object.}` - A hash with default actions declarations. Actions are + * high-level methods corresponding to RESTful actions/methods on resources. An action may + * specify what HTTP method to use, what URL to hit, if the return value will be a single + * object or a collection (array) of objects etc. For more details, see + * {@link ngResource.$resource}. The actions can also be enhanced or overwritten per resource + * class.
+ * The default actions are: + * ```js + * { + * get: {method: 'GET'}, + * save: {method: 'POST'}, + * query: {method: 'GET', isArray: true}, + * remove: {method: 'DELETE'}, + * delete: {method: 'DELETE'} + * } + * ``` + * + * #### Example + * + * For example, you can specify a new `update` action that uses the `PUT` HTTP verb: + * + * ```js + * angular. + * module('myApp'). + * config(['$resourceProvider', function ($resourceProvider) { + * $resourceProvider.defaults.actions.update = { + * method: 'PUT' + * }; + * }]); + * ``` + * + * Or you can even overwrite the whole `actions` list and specify your own: + * + * ```js + * angular. + * module('myApp'). + * config(['$resourceProvider', function ($resourceProvider) { + * $resourceProvider.defaults.actions = { + * create: {method: 'POST'}, + * get: {method: 'GET'}, + * getAll: {method: 'GET', isArray:true}, + * update: {method: 'PUT'}, + * delete: {method: 'DELETE'} + * }; + * }); + * ``` + * + */ + this.defaults = { + // Strip slashes by default + stripTrailingSlashes: true, + + // Make non-instance requests cancellable (via `$cancelRequest()`) + cancellable: false, + + // Default actions configuration + actions: { + 'get': {method: 'GET'}, + 'save': {method: 'POST'}, + 'query': {method: 'GET', isArray: true}, + 'remove': {method: 'DELETE'}, + 'delete': {method: 'DELETE'} + } + }; + + this.$get = ['$http', '$log', '$q', '$timeout', function($http, $log, $q, $timeout) { + + var noop = angular.noop, + forEach = angular.forEach, + extend = angular.extend, + copy = angular.copy, + isArray = angular.isArray, + isDefined = angular.isDefined, + isFunction = angular.isFunction, + isNumber = angular.isNumber, + encodeUriQuery = angular.$$encodeUriQuery, + encodeUriSegment = angular.$$encodeUriSegment; + + function Route(template, defaults) { + this.template = template; + this.defaults = extend({}, provider.defaults, defaults); + this.urlParams = {}; + } + + Route.prototype = { + setUrlParams: function(config, params, actionUrl) { + var self = this, + url = actionUrl || self.template, + val, + encodedVal, + protocolAndIpv6 = ''; + + var urlParams = self.urlParams = Object.create(null); + forEach(url.split(/\W/), function(param) { + if (param === 'hasOwnProperty') { + throw $resourceMinErr('badname', 'hasOwnProperty is not a valid parameter name.'); + } + if (!(new RegExp('^\\d+$').test(param)) && param && + (new RegExp('(^|[^\\\\]):' + param + '(\\W|$)').test(url))) { + urlParams[param] = { + isQueryParamValue: (new RegExp('\\?.*=:' + param + '(?:\\W|$)')).test(url) + }; + } + }); + url = url.replace(/\\:/g, ':'); + url = url.replace(PROTOCOL_AND_IPV6_REGEX, function(match) { + protocolAndIpv6 = match; + return ''; + }); + + params = params || {}; + forEach(self.urlParams, function(paramInfo, urlParam) { + val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam]; + if (isDefined(val) && val !== null) { + if (paramInfo.isQueryParamValue) { + encodedVal = encodeUriQuery(val, true); + } else { + encodedVal = encodeUriSegment(val); + } + url = url.replace(new RegExp(':' + urlParam + '(\\W|$)', 'g'), function(match, p1) { + return encodedVal + p1; + }); + } else { + url = url.replace(new RegExp('(/?):' + urlParam + '(\\W|$)', 'g'), function(match, + leadingSlashes, tail) { + if (tail.charAt(0) === '/') { + return tail; + } else { + return leadingSlashes + tail; + } + }); + } + }); + + // strip trailing slashes and set the url (unless this behavior is specifically disabled) + if (self.defaults.stripTrailingSlashes) { + url = url.replace(/\/+$/, '') || '/'; + } + + // Collapse `/.` if found in the last URL path segment before the query. + // E.g. `http://url.com/id/.format?q=x` becomes `http://url.com/id.format?q=x`. + url = url.replace(/\/\.(?=\w+($|\?))/, '.'); + // Replace escaped `/\.` with `/.`. + // (If `\.` comes from a param value, it will be encoded as `%5C.`.) + config.url = protocolAndIpv6 + url.replace(/\/(\\|%5C)\./, '/.'); + + + // set params - delegate param encoding to $http + forEach(params, function(value, key) { + if (!self.urlParams[key]) { + config.params = config.params || {}; + config.params[key] = value; + } + }); + } + }; + + + function resourceFactory(url, paramDefaults, actions, options) { + var route = new Route(url, options); + + actions = extend({}, provider.defaults.actions, actions); + + function extractParams(data, actionParams) { + var ids = {}; + actionParams = extend({}, paramDefaults, actionParams); + forEach(actionParams, function(value, key) { + if (isFunction(value)) { value = value(data); } + ids[key] = value && value.charAt && value.charAt(0) === '@' ? + lookupDottedPath(data, value.substr(1)) : value; + }); + return ids; + } + + function defaultResponseInterceptor(response) { + return response.resource; + } + + function Resource(value) { + shallowClearAndCopy(value || {}, this); + } + + Resource.prototype.toJSON = function() { + var data = extend({}, this); + delete data.$promise; + delete data.$resolved; + delete data.$cancelRequest; + return data; + }; + + forEach(actions, function(action, name) { + var hasBody = action.hasBody === true || (action.hasBody !== false && /^(POST|PUT|PATCH)$/i.test(action.method)); + var numericTimeout = action.timeout; + var cancellable = isDefined(action.cancellable) ? + action.cancellable : route.defaults.cancellable; + + if (numericTimeout && !isNumber(numericTimeout)) { + $log.debug('ngResource:\n' + + ' Only numeric values are allowed as `timeout`.\n' + + ' Promises are not supported in $resource, because the same value would ' + + 'be used for multiple requests. If you are looking for a way to cancel ' + + 'requests, you should use the `cancellable` option.'); + delete action.timeout; + numericTimeout = null; + } + + Resource[name] = function(a1, a2, a3, a4) { + var params = {}, data, success, error; + + switch (arguments.length) { + case 4: + error = a4; + success = a3; + // falls through + case 3: + case 2: + if (isFunction(a2)) { + if (isFunction(a1)) { + success = a1; + error = a2; + break; + } + + success = a2; + error = a3; + // falls through + } else { + params = a1; + data = a2; + success = a3; + break; + } + // falls through + case 1: + if (isFunction(a1)) success = a1; + else if (hasBody) data = a1; + else params = a1; + break; + case 0: break; + default: + throw $resourceMinErr('badargs', + 'Expected up to 4 arguments [params, data, success, error], got {0} arguments', + arguments.length); + } + + var isInstanceCall = this instanceof Resource; + var value = isInstanceCall ? data : (action.isArray ? [] : new Resource(data)); + var httpConfig = {}; + var responseInterceptor = action.interceptor && action.interceptor.response || + defaultResponseInterceptor; + var responseErrorInterceptor = action.interceptor && action.interceptor.responseError || + undefined; + var hasError = !!error; + var hasResponseErrorInterceptor = !!responseErrorInterceptor; + var timeoutDeferred; + var numericTimeoutPromise; + + forEach(action, function(value, key) { + switch (key) { + default: + httpConfig[key] = copy(value); + break; + case 'params': + case 'isArray': + case 'interceptor': + case 'cancellable': + break; + } + }); + + if (!isInstanceCall && cancellable) { + timeoutDeferred = $q.defer(); + httpConfig.timeout = timeoutDeferred.promise; + + if (numericTimeout) { + numericTimeoutPromise = $timeout(timeoutDeferred.resolve, numericTimeout); + } + } + + if (hasBody) httpConfig.data = data; + route.setUrlParams(httpConfig, + extend({}, extractParams(data, action.params || {}), params), + action.url); + + var promise = $http(httpConfig).then(function(response) { + var data = response.data; + + if (data) { + // Need to convert action.isArray to boolean in case it is undefined + if (isArray(data) !== (!!action.isArray)) { + throw $resourceMinErr('badcfg', + 'Error in resource configuration for action `{0}`. Expected response to ' + + 'contain an {1} but got an {2} (Request: {3} {4})', name, action.isArray ? 'array' : 'object', + isArray(data) ? 'array' : 'object', httpConfig.method, httpConfig.url); + } + if (action.isArray) { + value.length = 0; + forEach(data, function(item) { + if (typeof item === 'object') { + value.push(new Resource(item)); + } else { + // Valid JSON values may be string literals, and these should not be converted + // into objects. These items will not have access to the Resource prototype + // methods, but unfortunately there + value.push(item); + } + }); + } else { + var promise = value.$promise; // Save the promise + shallowClearAndCopy(data, value); + value.$promise = promise; // Restore the promise + } + } + response.resource = value; + + return response; + }, function(response) { + response.resource = value; + return $q.reject(response); + }); + + promise = promise['finally'](function() { + value.$resolved = true; + if (!isInstanceCall && cancellable) { + value.$cancelRequest = noop; + $timeout.cancel(numericTimeoutPromise); + timeoutDeferred = numericTimeoutPromise = httpConfig.timeout = null; + } + }); + + promise = promise.then( + function(response) { + var value = responseInterceptor(response); + (success || noop)(value, response.headers, response.status, response.statusText); + return value; + }, + (hasError || hasResponseErrorInterceptor) ? + function(response) { + if (hasError && !hasResponseErrorInterceptor) { + // Avoid `Possibly Unhandled Rejection` error, + // but still fulfill the returned promise with a rejection + promise.catch(noop); + } + if (hasError) error(response); + return hasResponseErrorInterceptor ? + responseErrorInterceptor(response) : + $q.reject(response); + } : + undefined); + + if (!isInstanceCall) { + // we are creating instance / collection + // - set the initial promise + // - return the instance / collection + value.$promise = promise; + value.$resolved = false; + if (cancellable) value.$cancelRequest = cancelRequest; + + return value; + } + + // instance call + return promise; + + function cancelRequest(value) { + promise.catch(noop); + if (timeoutDeferred !== null) { + timeoutDeferred.resolve(value); + } + } + }; + + + Resource.prototype['$' + name] = function(params, success, error) { + if (isFunction(params)) { + error = success; success = params; params = {}; + } + var result = Resource[name].call(this, params, this, success, error); + return result.$promise || result; + }; + }); + + Resource.bind = function(additionalParamDefaults) { + var extendedParamDefaults = extend({}, paramDefaults, additionalParamDefaults); + return resourceFactory(url, extendedParamDefaults, actions, options); + }; + + return Resource; + } + + return resourceFactory; + }]; + }); + + +})(window, window.angular); diff --git a/1.6.6/angular-resource.min.js b/1.6.6/angular-resource.min.js new file mode 100644 index 000000000..39095c9fb --- /dev/null +++ b/1.6.6/angular-resource.min.js @@ -0,0 +1,15 @@ +/* + AngularJS v1.6.6 + (c) 2010-2017 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(W,b){'use strict';function L(q,g){g=g||{};b.forEach(g,function(b,h){delete g[h]});for(var h in q)!q.hasOwnProperty(h)||"$"===h.charAt(0)&&"$"===h.charAt(1)||(g[h]=q[h]);return g}var B=b.$$minErr("$resource"),Q=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;b.module("ngResource",["ng"]).info({angularVersion:"1.6.6"}).provider("$resource",function(){var q=/^https?:\/\/\[[^\]]*][^/]*/,g=this;this.defaults={stripTrailingSlashes:!0,cancellable:!1,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET", +isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}};this.$get=["$http","$log","$q","$timeout",function(h,P,G,M){function C(b,e){this.template=b;this.defaults=p({},g.defaults,e);this.urlParams={}}function y(D,e,u,n){function c(a,d){var c={};d=p({},e,d);t(d,function(d,l){z(d)&&(d=d(a));var f;if(d&&d.charAt&&"@"===d.charAt(0)){f=a;var k=d.substr(1);if(null==k||""===k||"hasOwnProperty"===k||!Q.test("."+k))throw B("badmember",k);for(var k=k.split("."),e=0,g=k.length;e + */ +/* global -ngRouteModule */ +var ngRouteModule = angular. + module('ngRoute', []). + info({ angularVersion: '1.6.6' }). + provider('$route', $RouteProvider). + // Ensure `$route` will be instantiated in time to capture the initial `$locationChangeSuccess` + // event (unless explicitly disabled). This is necessary in case `ngView` is included in an + // asynchronously loaded template. + run(instantiateRoute); +var $routeMinErr = angular.$$minErr('ngRoute'); +var isEagerInstantiationEnabled; + + +/** + * @ngdoc provider + * @name $routeProvider + * @this + * + * @description + * + * Used for configuring routes. + * + * ## Example + * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`. + * + * ## Dependencies + * Requires the {@link ngRoute `ngRoute`} module to be installed. + */ +function $RouteProvider() { + isArray = angular.isArray; + isObject = angular.isObject; + isDefined = angular.isDefined; + noop = angular.noop; + + function inherit(parent, extra) { + return angular.extend(Object.create(parent), extra); + } + + var routes = {}; + + /** + * @ngdoc method + * @name $routeProvider#when + * + * @param {string} path Route path (matched against `$location.path`). If `$location.path` + * contains redundant trailing slash or is missing one, the route will still match and the + * `$location.path` will be updated to add or drop the trailing slash to exactly match the + * route definition. + * + * * `path` can contain named groups starting with a colon: e.g. `:name`. All characters up + * to the next slash are matched and stored in `$routeParams` under the given `name` + * when the route matches. + * * `path` can contain named groups starting with a colon and ending with a star: + * e.g.`:name*`. All characters are eagerly stored in `$routeParams` under the given `name` + * when the route matches. + * * `path` can contain optional named groups with a question mark: e.g.`:name?`. + * + * For example, routes like `/color/:color/largecode/:largecode*\/edit` will match + * `/color/brown/largecode/code/with/slashes/edit` and extract: + * + * * `color: brown` + * * `largecode: code/with/slashes`. + * + * + * @param {Object} route Mapping information to be assigned to `$route.current` on route + * match. + * + * Object properties: + * + * - `controller` – `{(string|Function)=}` – Controller fn that should be associated with + * newly created scope or the name of a {@link angular.Module#controller registered + * controller} if passed as a string. + * - `controllerAs` – `{string=}` – An identifier name for a reference to the controller. + * If present, the controller will be published to scope under the `controllerAs` name. + * - `template` – `{(string|Function)=}` – html template as a string or a function that + * returns an html template as a string which should be used by {@link + * ngRoute.directive:ngView ngView} or {@link ng.directive:ngInclude ngInclude} directives. + * This property takes precedence over `templateUrl`. + * + * If `template` is a function, it will be called with the following parameters: + * + * - `{Array.}` - route parameters extracted from the current + * `$location.path()` by applying the current route + * + * One of `template` or `templateUrl` is required. + * + * - `templateUrl` – `{(string|Function)=}` – path or function that returns a path to an html + * template that should be used by {@link ngRoute.directive:ngView ngView}. + * + * If `templateUrl` is a function, it will be called with the following parameters: + * + * - `{Array.}` - route parameters extracted from the current + * `$location.path()` by applying the current route + * + * One of `templateUrl` or `template` is required. + * + * - `resolve` - `{Object.=}` - An optional map of dependencies which should + * be injected into the controller. If any of these dependencies are promises, the router + * will wait for them all to be resolved or one to be rejected before the controller is + * instantiated. + * If all the promises are resolved successfully, the values of the resolved promises are + * injected and {@link ngRoute.$route#$routeChangeSuccess $routeChangeSuccess} event is + * fired. If any of the promises are rejected the + * {@link ngRoute.$route#$routeChangeError $routeChangeError} event is fired. + * For easier access to the resolved dependencies from the template, the `resolve` map will + * be available on the scope of the route, under `$resolve` (by default) or a custom name + * specified by the `resolveAs` property (see below). This can be particularly useful, when + * working with {@link angular.Module#component components} as route templates.
+ *
+ * **Note:** If your scope already contains a property with this name, it will be hidden + * or overwritten. Make sure, you specify an appropriate name for this property, that + * does not collide with other properties on the scope. + *
+ * The map object is: + * + * - `key` – `{string}`: a name of a dependency to be injected into the controller. + * - `factory` - `{string|Function}`: If `string` then it is an alias for a service. + * Otherwise if function, then it is {@link auto.$injector#invoke injected} + * and the return value is treated as the dependency. If the result is a promise, it is + * resolved before its value is injected into the controller. Be aware that + * `ngRoute.$routeParams` will still refer to the previous route within these resolve + * functions. Use `$route.current.params` to access the new route parameters, instead. + * + * - `resolveAs` - `{string=}` - The name under which the `resolve` map will be available on + * the scope of the route. If omitted, defaults to `$resolve`. + * + * - `redirectTo` – `{(string|Function)=}` – value to update + * {@link ng.$location $location} path with and trigger route redirection. + * + * If `redirectTo` is a function, it will be called with the following parameters: + * + * - `{Object.}` - route parameters extracted from the current + * `$location.path()` by applying the current route templateUrl. + * - `{string}` - current `$location.path()` + * - `{Object}` - current `$location.search()` + * + * The custom `redirectTo` function is expected to return a string which will be used + * to update `$location.url()`. If the function throws an error, no further processing will + * take place and the {@link ngRoute.$route#$routeChangeError $routeChangeError} event will + * be fired. + * + * Routes that specify `redirectTo` will not have their controllers, template functions + * or resolves called, the `$location` will be changed to the redirect url and route + * processing will stop. The exception to this is if the `redirectTo` is a function that + * returns `undefined`. In this case the route transition occurs as though there was no + * redirection. + * + * - `resolveRedirectTo` – `{Function=}` – a function that will (eventually) return the value + * to update {@link ng.$location $location} URL with and trigger route redirection. In + * contrast to `redirectTo`, dependencies can be injected into `resolveRedirectTo` and the + * return value can be either a string or a promise that will be resolved to a string. + * + * Similar to `redirectTo`, if the return value is `undefined` (or a promise that gets + * resolved to `undefined`), no redirection takes place and the route transition occurs as + * though there was no redirection. + * + * If the function throws an error or the returned promise gets rejected, no further + * processing will take place and the + * {@link ngRoute.$route#$routeChangeError $routeChangeError} event will be fired. + * + * `redirectTo` takes precedence over `resolveRedirectTo`, so specifying both on the same + * route definition, will cause the latter to be ignored. + * + * - `[reloadOnSearch=true]` - `{boolean=}` - reload route when only `$location.search()` + * or `$location.hash()` changes. + * + * If the option is set to `false` and url in the browser changes, then + * `$routeUpdate` event is broadcasted on the root scope. + * + * - `[caseInsensitiveMatch=false]` - `{boolean=}` - match routes without being case sensitive + * + * If the option is set to `true`, then the particular route can be matched without being + * case sensitive + * + * @returns {Object} self + * + * @description + * Adds a new route definition to the `$route` service. + */ + this.when = function(path, route) { + //copy original route object to preserve params inherited from proto chain + var routeCopy = shallowCopy(route); + if (angular.isUndefined(routeCopy.reloadOnSearch)) { + routeCopy.reloadOnSearch = true; + } + if (angular.isUndefined(routeCopy.caseInsensitiveMatch)) { + routeCopy.caseInsensitiveMatch = this.caseInsensitiveMatch; + } + routes[path] = angular.extend( + routeCopy, + path && pathRegExp(path, routeCopy) + ); + + // create redirection for trailing slashes + if (path) { + var redirectPath = (path[path.length - 1] === '/') + ? path.substr(0, path.length - 1) + : path + '/'; + + routes[redirectPath] = angular.extend( + {redirectTo: path}, + pathRegExp(redirectPath, routeCopy) + ); + } + + return this; + }; + + /** + * @ngdoc property + * @name $routeProvider#caseInsensitiveMatch + * @description + * + * A boolean property indicating if routes defined + * using this provider should be matched using a case insensitive + * algorithm. Defaults to `false`. + */ + this.caseInsensitiveMatch = false; + + /** + * @param path {string} path + * @param opts {Object} options + * @return {?Object} + * + * @description + * Normalizes the given path, returning a regular expression + * and the original path. + * + * Inspired by pathRexp in visionmedia/express/lib/utils.js. + */ + function pathRegExp(path, opts) { + var insensitive = opts.caseInsensitiveMatch, + ret = { + originalPath: path, + regexp: path + }, + keys = ret.keys = []; + + path = path + .replace(/([().])/g, '\\$1') + .replace(/(\/)?:(\w+)(\*\?|[?*])?/g, function(_, slash, key, option) { + var optional = (option === '?' || option === '*?') ? '?' : null; + var star = (option === '*' || option === '*?') ? '*' : null; + keys.push({ name: key, optional: !!optional }); + slash = slash || ''; + return '' + + (optional ? '' : slash) + + '(?:' + + (optional ? slash : '') + + (star && '(.+?)' || '([^/]+)') + + (optional || '') + + ')' + + (optional || ''); + }) + .replace(/([/$*])/g, '\\$1'); + + ret.regexp = new RegExp('^' + path + '$', insensitive ? 'i' : ''); + return ret; + } + + /** + * @ngdoc method + * @name $routeProvider#otherwise + * + * @description + * Sets route definition that will be used on route change when no other route definition + * is matched. + * + * @param {Object|string} params Mapping information to be assigned to `$route.current`. + * If called with a string, the value maps to `redirectTo`. + * @returns {Object} self + */ + this.otherwise = function(params) { + if (typeof params === 'string') { + params = {redirectTo: params}; + } + this.when(null, params); + return this; + }; + + /** + * @ngdoc method + * @name $routeProvider#eagerInstantiationEnabled + * @kind function + * + * @description + * Call this method as a setter to enable/disable eager instantiation of the + * {@link ngRoute.$route $route} service upon application bootstrap. You can also call it as a + * getter (i.e. without any arguments) to get the current value of the + * `eagerInstantiationEnabled` flag. + * + * Instantiating `$route` early is necessary for capturing the initial + * {@link ng.$location#$locationChangeStart $locationChangeStart} event and navigating to the + * appropriate route. Usually, `$route` is instantiated in time by the + * {@link ngRoute.ngView ngView} directive. Yet, in cases where `ngView` is included in an + * asynchronously loaded template (e.g. in another directive's template), the directive factory + * might not be called soon enough for `$route` to be instantiated _before_ the initial + * `$locationChangeSuccess` event is fired. Eager instantiation ensures that `$route` is always + * instantiated in time, regardless of when `ngView` will be loaded. + * + * The default value is true. + * + * **Note**:
+ * You may want to disable the default behavior when unit-testing modules that depend on + * `ngRoute`, in order to avoid an unexpected request for the default route's template. + * + * @param {boolean=} enabled - If provided, update the internal `eagerInstantiationEnabled` flag. + * + * @returns {*} The current value of the `eagerInstantiationEnabled` flag if used as a getter or + * itself (for chaining) if used as a setter. + */ + isEagerInstantiationEnabled = true; + this.eagerInstantiationEnabled = function eagerInstantiationEnabled(enabled) { + if (isDefined(enabled)) { + isEagerInstantiationEnabled = enabled; + return this; + } + + return isEagerInstantiationEnabled; + }; + + + this.$get = ['$rootScope', + '$location', + '$routeParams', + '$q', + '$injector', + '$templateRequest', + '$sce', + '$browser', + function($rootScope, $location, $routeParams, $q, $injector, $templateRequest, $sce, $browser) { + + /** + * @ngdoc service + * @name $route + * @requires $location + * @requires $routeParams + * + * @property {Object} current Reference to the current route definition. + * The route definition contains: + * + * - `controller`: The controller constructor as defined in the route definition. + * - `locals`: A map of locals which is used by {@link ng.$controller $controller} service for + * controller instantiation. The `locals` contain + * the resolved values of the `resolve` map. Additionally the `locals` also contain: + * + * - `$scope` - The current route scope. + * - `$template` - The current route template HTML. + * + * The `locals` will be assigned to the route scope's `$resolve` property. You can override + * the property name, using `resolveAs` in the route definition. See + * {@link ngRoute.$routeProvider $routeProvider} for more info. + * + * @property {Object} routes Object with all route configuration Objects as its properties. + * + * @description + * `$route` is used for deep-linking URLs to controllers and views (HTML partials). + * It watches `$location.url()` and tries to map the path to an existing route definition. + * + * Requires the {@link ngRoute `ngRoute`} module to be installed. + * + * You can define routes through {@link ngRoute.$routeProvider $routeProvider}'s API. + * + * The `$route` service is typically used in conjunction with the + * {@link ngRoute.directive:ngView `ngView`} directive and the + * {@link ngRoute.$routeParams `$routeParams`} service. + * + * @example + * This example shows how changing the URL hash causes the `$route` to match a route against the + * URL, and the `ngView` pulls in the partial. + * + * + * + *
+ * Choose: + * Moby | + * Moby: Ch1 | + * Gatsby | + * Gatsby: Ch4 | + * Scarlet Letter
+ * + *
+ * + *
+ * + *
$location.path() = {{$location.path()}}
+ *
$route.current.templateUrl = {{$route.current.templateUrl}}
+ *
$route.current.params = {{$route.current.params}}
+ *
$route.current.scope.name = {{$route.current.scope.name}}
+ *
$routeParams = {{$routeParams}}
+ *
+ *
+ * + * + * controller: {{name}}
+ * Book Id: {{params.bookId}}
+ *
+ * + * + * controller: {{name}}
+ * Book Id: {{params.bookId}}
+ * Chapter Id: {{params.chapterId}} + *
+ * + * + * angular.module('ngRouteExample', ['ngRoute']) + * + * .controller('MainController', function($scope, $route, $routeParams, $location) { + * $scope.$route = $route; + * $scope.$location = $location; + * $scope.$routeParams = $routeParams; + * }) + * + * .controller('BookController', function($scope, $routeParams) { + * $scope.name = 'BookController'; + * $scope.params = $routeParams; + * }) + * + * .controller('ChapterController', function($scope, $routeParams) { + * $scope.name = 'ChapterController'; + * $scope.params = $routeParams; + * }) + * + * .config(function($routeProvider, $locationProvider) { + * $routeProvider + * .when('/Book/:bookId', { + * templateUrl: 'book.html', + * controller: 'BookController', + * resolve: { + * // I will cause a 1 second delay + * delay: function($q, $timeout) { + * var delay = $q.defer(); + * $timeout(delay.resolve, 1000); + * return delay.promise; + * } + * } + * }) + * .when('/Book/:bookId/ch/:chapterId', { + * templateUrl: 'chapter.html', + * controller: 'ChapterController' + * }); + * + * // configure html5 to get links working on jsfiddle + * $locationProvider.html5Mode(true); + * }); + * + * + * + * + * it('should load and compile correct template', function() { + * element(by.linkText('Moby: Ch1')).click(); + * var content = element(by.css('[ng-view]')).getText(); + * expect(content).toMatch(/controller: ChapterController/); + * expect(content).toMatch(/Book Id: Moby/); + * expect(content).toMatch(/Chapter Id: 1/); + * + * element(by.partialLinkText('Scarlet')).click(); + * + * content = element(by.css('[ng-view]')).getText(); + * expect(content).toMatch(/controller: BookController/); + * expect(content).toMatch(/Book Id: Scarlet/); + * }); + * + *
+ */ + + /** + * @ngdoc event + * @name $route#$routeChangeStart + * @eventType broadcast on root scope + * @description + * Broadcasted before a route change. At this point the route services starts + * resolving all of the dependencies needed for the route change to occur. + * Typically this involves fetching the view template as well as any dependencies + * defined in `resolve` route property. Once all of the dependencies are resolved + * `$routeChangeSuccess` is fired. + * + * The route change (and the `$location` change that triggered it) can be prevented + * by calling `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} + * for more details about event object. + * + * @param {Object} angularEvent Synthetic event object. + * @param {Route} next Future route information. + * @param {Route} current Current route information. + */ + + /** + * @ngdoc event + * @name $route#$routeChangeSuccess + * @eventType broadcast on root scope + * @description + * Broadcasted after a route change has happened successfully. + * The `resolve` dependencies are now available in the `current.locals` property. + * + * {@link ngRoute.directive:ngView ngView} listens for the directive + * to instantiate the controller and render the view. + * + * @param {Object} angularEvent Synthetic event object. + * @param {Route} current Current route information. + * @param {Route|Undefined} previous Previous route information, or undefined if current is + * first route entered. + */ + + /** + * @ngdoc event + * @name $route#$routeChangeError + * @eventType broadcast on root scope + * @description + * Broadcasted if a redirection function fails or any redirection or resolve promises are + * rejected. + * + * @param {Object} angularEvent Synthetic event object + * @param {Route} current Current route information. + * @param {Route} previous Previous route information. + * @param {Route} rejection The thrown error or the rejection reason of the promise. Usually + * the rejection reason is the error that caused the promise to get rejected. + */ + + /** + * @ngdoc event + * @name $route#$routeUpdate + * @eventType broadcast on root scope + * @description + * The `reloadOnSearch` property has been set to false, and we are reusing the same + * instance of the Controller. + * + * @param {Object} angularEvent Synthetic event object + * @param {Route} current Current/previous route information. + */ + + var forceReload = false, + preparedRoute, + preparedRouteIsUpdateOnly, + $route = { + routes: routes, + + /** + * @ngdoc method + * @name $route#reload + * + * @description + * Causes `$route` service to reload the current route even if + * {@link ng.$location $location} hasn't changed. + * + * As a result of that, {@link ngRoute.directive:ngView ngView} + * creates new scope and reinstantiates the controller. + */ + reload: function() { + forceReload = true; + + var fakeLocationEvent = { + defaultPrevented: false, + preventDefault: function fakePreventDefault() { + this.defaultPrevented = true; + forceReload = false; + } + }; + + $rootScope.$evalAsync(function() { + prepareRoute(fakeLocationEvent); + if (!fakeLocationEvent.defaultPrevented) commitRoute(); + }); + }, + + /** + * @ngdoc method + * @name $route#updateParams + * + * @description + * Causes `$route` service to update the current URL, replacing + * current route parameters with those specified in `newParams`. + * Provided property names that match the route's path segment + * definitions will be interpolated into the location's path, while + * remaining properties will be treated as query params. + * + * @param {!Object} newParams mapping of URL parameter names to values + */ + updateParams: function(newParams) { + if (this.current && this.current.$$route) { + newParams = angular.extend({}, this.current.params, newParams); + $location.path(interpolate(this.current.$$route.originalPath, newParams)); + // interpolate modifies newParams, only query params are left + $location.search(newParams); + } else { + throw $routeMinErr('norout', 'Tried updating route when with no current route'); + } + } + }; + + $rootScope.$on('$locationChangeStart', prepareRoute); + $rootScope.$on('$locationChangeSuccess', commitRoute); + + return $route; + + ///////////////////////////////////////////////////// + + /** + * @param on {string} current url + * @param route {Object} route regexp to match the url against + * @return {?Object} + * + * @description + * Check if the route matches the current url. + * + * Inspired by match in + * visionmedia/express/lib/router/router.js. + */ + function switchRouteMatcher(on, route) { + var keys = route.keys, + params = {}; + + if (!route.regexp) return null; + + var m = route.regexp.exec(on); + if (!m) return null; + + for (var i = 1, len = m.length; i < len; ++i) { + var key = keys[i - 1]; + + var val = m[i]; + + if (key && val) { + params[key.name] = val; + } + } + return params; + } + + function prepareRoute($locationEvent) { + var lastRoute = $route.current; + + preparedRoute = parseRoute(); + preparedRouteIsUpdateOnly = preparedRoute && lastRoute && preparedRoute.$$route === lastRoute.$$route + && angular.equals(preparedRoute.pathParams, lastRoute.pathParams) + && !preparedRoute.reloadOnSearch && !forceReload; + + if (!preparedRouteIsUpdateOnly && (lastRoute || preparedRoute)) { + if ($rootScope.$broadcast('$routeChangeStart', preparedRoute, lastRoute).defaultPrevented) { + if ($locationEvent) { + $locationEvent.preventDefault(); + } + } + } + } + + function commitRoute() { + var lastRoute = $route.current; + var nextRoute = preparedRoute; + + if (preparedRouteIsUpdateOnly) { + lastRoute.params = nextRoute.params; + angular.copy(lastRoute.params, $routeParams); + $rootScope.$broadcast('$routeUpdate', lastRoute); + } else if (nextRoute || lastRoute) { + forceReload = false; + $route.current = nextRoute; + + var nextRoutePromise = $q.resolve(nextRoute); + + $browser.$$incOutstandingRequestCount(); + + nextRoutePromise. + then(getRedirectionData). + then(handlePossibleRedirection). + then(function(keepProcessingRoute) { + return keepProcessingRoute && nextRoutePromise. + then(resolveLocals). + then(function(locals) { + // after route change + if (nextRoute === $route.current) { + if (nextRoute) { + nextRoute.locals = locals; + angular.copy(nextRoute.params, $routeParams); + } + $rootScope.$broadcast('$routeChangeSuccess', nextRoute, lastRoute); + } + }); + }).catch(function(error) { + if (nextRoute === $route.current) { + $rootScope.$broadcast('$routeChangeError', nextRoute, lastRoute, error); + } + }).finally(function() { + // Because `commitRoute()` is called from a `$rootScope.$evalAsync` block (see + // `$locationWatch`), this `$$completeOutstandingRequest()` call will not cause + // `outstandingRequestCount` to hit zero. This is important in case we are redirecting + // to a new route which also requires some asynchronous work. + + $browser.$$completeOutstandingRequest(noop); + }); + } + } + + function getRedirectionData(route) { + var data = { + route: route, + hasRedirection: false + }; + + if (route) { + if (route.redirectTo) { + if (angular.isString(route.redirectTo)) { + data.path = interpolate(route.redirectTo, route.params); + data.search = route.params; + data.hasRedirection = true; + } else { + var oldPath = $location.path(); + var oldSearch = $location.search(); + var newUrl = route.redirectTo(route.pathParams, oldPath, oldSearch); + + if (angular.isDefined(newUrl)) { + data.url = newUrl; + data.hasRedirection = true; + } + } + } else if (route.resolveRedirectTo) { + return $q. + resolve($injector.invoke(route.resolveRedirectTo)). + then(function(newUrl) { + if (angular.isDefined(newUrl)) { + data.url = newUrl; + data.hasRedirection = true; + } + + return data; + }); + } + } + + return data; + } + + function handlePossibleRedirection(data) { + var keepProcessingRoute = true; + + if (data.route !== $route.current) { + keepProcessingRoute = false; + } else if (data.hasRedirection) { + var oldUrl = $location.url(); + var newUrl = data.url; + + if (newUrl) { + $location. + url(newUrl). + replace(); + } else { + newUrl = $location. + path(data.path). + search(data.search). + replace(). + url(); + } + + if (newUrl !== oldUrl) { + // Exit out and don't process current next value, + // wait for next location change from redirect + keepProcessingRoute = false; + } + } + + return keepProcessingRoute; + } + + function resolveLocals(route) { + if (route) { + var locals = angular.extend({}, route.resolve); + angular.forEach(locals, function(value, key) { + locals[key] = angular.isString(value) ? + $injector.get(value) : + $injector.invoke(value, null, null, key); + }); + var template = getTemplateFor(route); + if (angular.isDefined(template)) { + locals['$template'] = template; + } + return $q.all(locals); + } + } + + function getTemplateFor(route) { + var template, templateUrl; + if (angular.isDefined(template = route.template)) { + if (angular.isFunction(template)) { + template = template(route.params); + } + } else if (angular.isDefined(templateUrl = route.templateUrl)) { + if (angular.isFunction(templateUrl)) { + templateUrl = templateUrl(route.params); + } + if (angular.isDefined(templateUrl)) { + route.loadedTemplateUrl = $sce.valueOf(templateUrl); + template = $templateRequest(templateUrl); + } + } + return template; + } + + /** + * @returns {Object} the current active route, by matching it against the URL + */ + function parseRoute() { + // Match a route + var params, match; + angular.forEach(routes, function(route, path) { + if (!match && (params = switchRouteMatcher($location.path(), route))) { + match = inherit(route, { + params: angular.extend({}, $location.search(), params), + pathParams: params}); + match.$$route = route; + } + }); + // No route matched; fallback to "otherwise" route + return match || routes[null] && inherit(routes[null], {params: {}, pathParams:{}}); + } + + /** + * @returns {string} interpolation of the redirect path with the parameters + */ + function interpolate(string, params) { + var result = []; + angular.forEach((string || '').split(':'), function(segment, i) { + if (i === 0) { + result.push(segment); + } else { + var segmentMatch = segment.match(/(\w+)(?:[?*])?(.*)/); + var key = segmentMatch[1]; + result.push(params[key]); + result.push(segmentMatch[2] || ''); + delete params[key]; + } + }); + return result.join(''); + } + }]; +} + +instantiateRoute.$inject = ['$injector']; +function instantiateRoute($injector) { + if (isEagerInstantiationEnabled) { + // Instantiate `$route` + $injector.get('$route'); + } +} + +ngRouteModule.provider('$routeParams', $RouteParamsProvider); + + +/** + * @ngdoc service + * @name $routeParams + * @requires $route + * @this + * + * @description + * The `$routeParams` service allows you to retrieve the current set of route parameters. + * + * Requires the {@link ngRoute `ngRoute`} module to be installed. + * + * The route parameters are a combination of {@link ng.$location `$location`}'s + * {@link ng.$location#search `search()`} and {@link ng.$location#path `path()`}. + * The `path` parameters are extracted when the {@link ngRoute.$route `$route`} path is matched. + * + * In case of parameter name collision, `path` params take precedence over `search` params. + * + * The service guarantees that the identity of the `$routeParams` object will remain unchanged + * (but its properties will likely change) even when a route change occurs. + * + * Note that the `$routeParams` are only updated *after* a route change completes successfully. + * This means that you cannot rely on `$routeParams` being correct in route resolve functions. + * Instead you can use `$route.current.params` to access the new route's parameters. + * + * @example + * ```js + * // Given: + * // URL: http://server.com/index.html#/Chapter/1/Section/2?search=moby + * // Route: /Chapter/:chapterId/Section/:sectionId + * // + * // Then + * $routeParams ==> {chapterId:'1', sectionId:'2', search:'moby'} + * ``` + */ +function $RouteParamsProvider() { + this.$get = function() { return {}; }; +} + +ngRouteModule.directive('ngView', ngViewFactory); +ngRouteModule.directive('ngView', ngViewFillContentFactory); + + +/** + * @ngdoc directive + * @name ngView + * @restrict ECA + * + * @description + * # Overview + * `ngView` is a directive that complements the {@link ngRoute.$route $route} service by + * including the rendered template of the current route into the main layout (`index.html`) file. + * Every time the current route changes, the included view changes with it according to the + * configuration of the `$route` service. + * + * Requires the {@link ngRoute `ngRoute`} module to be installed. + * + * @animations + * | Animation | Occurs | + * |----------------------------------|-------------------------------------| + * | {@link ng.$animate#enter enter} | when the new element is inserted to the DOM | + * | {@link ng.$animate#leave leave} | when the old element is removed from to the DOM | + * + * The enter and leave animation occur concurrently. + * + * @scope + * @priority 400 + * @param {string=} onload Expression to evaluate whenever the view updates. + * + * @param {string=} autoscroll Whether `ngView` should call {@link ng.$anchorScroll + * $anchorScroll} to scroll the viewport after the view is updated. + * + * - If the attribute is not set, disable scrolling. + * - If the attribute is set without value, enable scrolling. + * - Otherwise enable scrolling only if the `autoscroll` attribute value evaluated + * as an expression yields a truthy value. + * @example + + +
+ Choose: + Moby | + Moby: Ch1 | + Gatsby | + Gatsby: Ch4 | + Scarlet Letter
+ +
+
+
+
+ +
$location.path() = {{main.$location.path()}}
+
$route.current.templateUrl = {{main.$route.current.templateUrl}}
+
$route.current.params = {{main.$route.current.params}}
+
$routeParams = {{main.$routeParams}}
+
+
+ + +
+ controller: {{book.name}}
+ Book Id: {{book.params.bookId}}
+
+
+ + +
+ controller: {{chapter.name}}
+ Book Id: {{chapter.params.bookId}}
+ Chapter Id: {{chapter.params.chapterId}} +
+
+ + + .view-animate-container { + position:relative; + height:100px!important; + background:white; + border:1px solid black; + height:40px; + overflow:hidden; + } + + .view-animate { + padding:10px; + } + + .view-animate.ng-enter, .view-animate.ng-leave { + transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s; + + display:block; + width:100%; + border-left:1px solid black; + + position:absolute; + top:0; + left:0; + right:0; + bottom:0; + padding:10px; + } + + .view-animate.ng-enter { + left:100%; + } + .view-animate.ng-enter.ng-enter-active { + left:0; + } + .view-animate.ng-leave.ng-leave-active { + left:-100%; + } + + + + angular.module('ngViewExample', ['ngRoute', 'ngAnimate']) + .config(['$routeProvider', '$locationProvider', + function($routeProvider, $locationProvider) { + $routeProvider + .when('/Book/:bookId', { + templateUrl: 'book.html', + controller: 'BookCtrl', + controllerAs: 'book' + }) + .when('/Book/:bookId/ch/:chapterId', { + templateUrl: 'chapter.html', + controller: 'ChapterCtrl', + controllerAs: 'chapter' + }); + + $locationProvider.html5Mode(true); + }]) + .controller('MainCtrl', ['$route', '$routeParams', '$location', + function MainCtrl($route, $routeParams, $location) { + this.$route = $route; + this.$location = $location; + this.$routeParams = $routeParams; + }]) + .controller('BookCtrl', ['$routeParams', function BookCtrl($routeParams) { + this.name = 'BookCtrl'; + this.params = $routeParams; + }]) + .controller('ChapterCtrl', ['$routeParams', function ChapterCtrl($routeParams) { + this.name = 'ChapterCtrl'; + this.params = $routeParams; + }]); + + + + + it('should load and compile correct template', function() { + element(by.linkText('Moby: Ch1')).click(); + var content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller: ChapterCtrl/); + expect(content).toMatch(/Book Id: Moby/); + expect(content).toMatch(/Chapter Id: 1/); + + element(by.partialLinkText('Scarlet')).click(); + + content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller: BookCtrl/); + expect(content).toMatch(/Book Id: Scarlet/); + }); + +
+ */ + + +/** + * @ngdoc event + * @name ngView#$viewContentLoaded + * @eventType emit on the current ngView scope + * @description + * Emitted every time the ngView content is reloaded. + */ +ngViewFactory.$inject = ['$route', '$anchorScroll', '$animate']; +function ngViewFactory($route, $anchorScroll, $animate) { + return { + restrict: 'ECA', + terminal: true, + priority: 400, + transclude: 'element', + link: function(scope, $element, attr, ctrl, $transclude) { + var currentScope, + currentElement, + previousLeaveAnimation, + autoScrollExp = attr.autoscroll, + onloadExp = attr.onload || ''; + + scope.$on('$routeChangeSuccess', update); + update(); + + function cleanupLastView() { + if (previousLeaveAnimation) { + $animate.cancel(previousLeaveAnimation); + previousLeaveAnimation = null; + } + + if (currentScope) { + currentScope.$destroy(); + currentScope = null; + } + if (currentElement) { + previousLeaveAnimation = $animate.leave(currentElement); + previousLeaveAnimation.done(function(response) { + if (response !== false) previousLeaveAnimation = null; + }); + currentElement = null; + } + } + + function update() { + var locals = $route.current && $route.current.locals, + template = locals && locals.$template; + + if (angular.isDefined(template)) { + var newScope = scope.$new(); + var current = $route.current; + + // Note: This will also link all children of ng-view that were contained in the original + // html. If that content contains controllers, ... they could pollute/change the scope. + // However, using ng-view on an element with additional content does not make sense... + // Note: We can't remove them in the cloneAttchFn of $transclude as that + // function is called before linking the content, which would apply child + // directives to non existing elements. + var clone = $transclude(newScope, function(clone) { + $animate.enter(clone, null, currentElement || $element).done(function onNgViewEnter(response) { + if (response !== false && angular.isDefined(autoScrollExp) + && (!autoScrollExp || scope.$eval(autoScrollExp))) { + $anchorScroll(); + } + }); + cleanupLastView(); + }); + + currentElement = clone; + currentScope = current.scope = newScope; + currentScope.$emit('$viewContentLoaded'); + currentScope.$eval(onloadExp); + } else { + cleanupLastView(); + } + } + } + }; +} + +// This directive is called during the $transclude call of the first `ngView` directive. +// It will replace and compile the content of the element with the loaded template. +// We need this directive so that the element content is already filled when +// the link function of another directive on the same element as ngView +// is called. +ngViewFillContentFactory.$inject = ['$compile', '$controller', '$route']; +function ngViewFillContentFactory($compile, $controller, $route) { + return { + restrict: 'ECA', + priority: -400, + link: function(scope, $element) { + var current = $route.current, + locals = current.locals; + + $element.html(locals.$template); + + var link = $compile($element.contents()); + + if (current.controller) { + locals.$scope = scope; + var controller = $controller(current.controller, locals); + if (current.controllerAs) { + scope[current.controllerAs] = controller; + } + $element.data('$ngControllerController', controller); + $element.children().data('$ngControllerController', controller); + } + scope[current.resolveAs || '$resolve'] = locals; + + link(scope); + } + }; +} + + +})(window, window.angular); diff --git a/1.6.6/angular-route.min.js b/1.6.6/angular-route.min.js new file mode 100644 index 000000000..8b42b72de --- /dev/null +++ b/1.6.6/angular-route.min.js @@ -0,0 +1,17 @@ +/* + AngularJS v1.6.6 + (c) 2010-2017 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(J,d){'use strict';function A(d){k&&d.get("$route")}function B(t,u,g){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,f,b,c,m){function v(){l&&(g.cancel(l),l=null);n&&(n.$destroy(),n=null);p&&(l=g.leave(p),l.done(function(a){!1!==a&&(l=null)}),p=null)}function E(){var b=t.current&&t.current.locals;if(d.isDefined(b&&b.$template)){var b=a.$new(),c=t.current;p=m(b,function(b){g.enter(b,null,p||f).done(function(b){!1===b||!d.isDefined(w)||w&&!a.$eval(w)||u()}); +v()});n=c.scope=b;n.$emit("$viewContentLoaded");n.$eval(k)}else v()}var n,p,l,w=b.autoscroll,k=b.onload||"";a.$on("$routeChangeSuccess",E);E()}}}function C(d,k,g){return{restrict:"ECA",priority:-400,link:function(a,f){var b=g.current,c=b.locals;f.html(c.$template);var m=d(f.contents());if(b.controller){c.$scope=a;var v=k(b.controller,c);b.controllerAs&&(a[b.controllerAs]=v);f.data("$ngControllerController",v);f.children().data("$ngControllerController",v)}a[b.resolveAs||"$resolve"]=c;m(a)}}}var x, +y,F,G,z=d.module("ngRoute",[]).info({angularVersion:"1.6.6"}).provider("$route",function(){function t(a,f){return d.extend(Object.create(a),f)}function u(a,d){var b=d.caseInsensitiveMatch,c={originalPath:a,regexp:a},g=c.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[?*])?/g,function(a,b,d,c){a="?"===c||"*?"===c?"?":null;c="*"===c||"*?"===c?"*":null;g.push({name:d,optional:!!a});b=b||"";return""+(a?"":b)+"(?:"+(a?b:"")+(c&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([/$*])/g, +"\\$1");c.regexp=new RegExp("^"+a+"$",b?"i":"");return c}x=d.isArray;y=d.isObject;F=d.isDefined;G=d.noop;var g={};this.when=function(a,f){var b;b=void 0;if(x(f)){b=b||[];for(var c=0,m=f.length;c + * + * See {@link ngSanitize.$sanitize `$sanitize`} for usage. + */ + +/** + * @ngdoc service + * @name $sanitize + * @kind function + * + * @description + * Sanitizes an html string by stripping all potentially dangerous tokens. + * + * The input is sanitized by parsing the HTML into tokens. All safe tokens (from a whitelist) are + * then serialized back to properly escaped html string. This means that no unsafe input can make + * it into the returned string. + * + * The whitelist for URL sanitization of attribute values is configured using the functions + * `aHrefSanitizationWhitelist` and `imgSrcSanitizationWhitelist` of {@link ng.$compileProvider + * `$compileProvider`}. + * + * The input may also contain SVG markup if this is enabled via {@link $sanitizeProvider}. + * + * @param {string} html HTML input. + * @returns {string} Sanitized HTML. + * + * @example + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectiveHowSourceRendered
ng-bind-htmlAutomatically uses $sanitize
<div ng-bind-html="snippet">
</div>
ng-bind-htmlBypass $sanitize by explicitly trusting the dangerous value +
<div ng-bind-html="deliberatelyTrustDangerousSnippet()">
+</div>
+
ng-bindAutomatically escapes
<div ng-bind="snippet">
</div>
+
+
+ + it('should sanitize the html snippet by default', function() { + expect(element(by.css('#bind-html-with-sanitize div')).getAttribute('innerHTML')). + toBe('

an html\nclick here\nsnippet

'); + }); + + it('should inline raw snippet if bound to a trusted value', function() { + expect(element(by.css('#bind-html-with-trust div')).getAttribute('innerHTML')). + toBe("

an html\n" + + "click here\n" + + "snippet

"); + }); + + it('should escape snippet without any filter', function() { + expect(element(by.css('#bind-default div')).getAttribute('innerHTML')). + toBe("<p style=\"color:blue\">an html\n" + + "<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" + + "snippet</p>"); + }); + + it('should update', function() { + element(by.model('snippet')).clear(); + element(by.model('snippet')).sendKeys('new text'); + expect(element(by.css('#bind-html-with-sanitize div')).getAttribute('innerHTML')). + toBe('new text'); + expect(element(by.css('#bind-html-with-trust div')).getAttribute('innerHTML')).toBe( + 'new text'); + expect(element(by.css('#bind-default div')).getAttribute('innerHTML')).toBe( + "new <b onclick=\"alert(1)\">text</b>"); + }); +
+
+ */ + + +/** + * @ngdoc provider + * @name $sanitizeProvider + * @this + * + * @description + * Creates and configures {@link $sanitize} instance. + */ +function $SanitizeProvider() { + var svgEnabled = false; + + this.$get = ['$$sanitizeUri', function($$sanitizeUri) { + if (svgEnabled) { + extend(validElements, svgElements); + } + return function(html) { + var buf = []; + htmlParser(html, htmlSanitizeWriter(buf, function(uri, isImage) { + return !/^unsafe:/.test($$sanitizeUri(uri, isImage)); + })); + return buf.join(''); + }; + }]; + + + /** + * @ngdoc method + * @name $sanitizeProvider#enableSvg + * @kind function + * + * @description + * Enables a subset of svg to be supported by the sanitizer. + * + *
+ *

By enabling this setting without taking other precautions, you might expose your + * application to click-hijacking attacks. In these attacks, sanitized svg elements could be positioned + * outside of the containing element and be rendered over other elements on the page (e.g. a login + * link). Such behavior can then result in phishing incidents.

+ * + *

To protect against these, explicitly setup `overflow: hidden` css rule for all potential svg + * tags within the sanitized content:

+ * + *
+ * + *

+   *   .rootOfTheIncludedContent svg {
+   *     overflow: hidden !important;
+   *   }
+   *   
+ *
+ * + * @param {boolean=} flag Enable or disable SVG support in the sanitizer. + * @returns {boolean|ng.$sanitizeProvider} Returns the currently configured value if called + * without an argument or self for chaining otherwise. + */ + this.enableSvg = function(enableSvg) { + if (isDefined(enableSvg)) { + svgEnabled = enableSvg; + return this; + } else { + return svgEnabled; + } + }; + + ////////////////////////////////////////////////////////////////////////////////////////////////// + // Private stuff + ////////////////////////////////////////////////////////////////////////////////////////////////// + + bind = angular.bind; + extend = angular.extend; + forEach = angular.forEach; + isDefined = angular.isDefined; + lowercase = angular.lowercase; + noop = angular.noop; + + htmlParser = htmlParserImpl; + htmlSanitizeWriter = htmlSanitizeWriterImpl; + + nodeContains = window.Node.prototype.contains || /** @this */ function(arg) { + // eslint-disable-next-line no-bitwise + return !!(this.compareDocumentPosition(arg) & 16); + }; + + // Regular Expressions for parsing tags and attributes + var SURROGATE_PAIR_REGEXP = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, + // Match everything outside of normal chars and " (quote character) + NON_ALPHANUMERIC_REGEXP = /([^#-~ |!])/g; + + + // Good source of info about elements and attributes + // http://dev.w3.org/html5/spec/Overview.html#semantics + // http://simon.html5.org/html-elements + + // Safe Void Elements - HTML5 + // http://dev.w3.org/html5/spec/Overview.html#void-elements + var voidElements = toMap('area,br,col,hr,img,wbr'); + + // Elements that you can, intentionally, leave open (and which close themselves) + // http://dev.w3.org/html5/spec/Overview.html#optional-tags + var optionalEndTagBlockElements = toMap('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr'), + optionalEndTagInlineElements = toMap('rp,rt'), + optionalEndTagElements = extend({}, + optionalEndTagInlineElements, + optionalEndTagBlockElements); + + // Safe Block Elements - HTML5 + var blockElements = extend({}, optionalEndTagBlockElements, toMap('address,article,' + + 'aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' + + 'h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul')); + + // Inline Elements - HTML5 + var inlineElements = extend({}, optionalEndTagInlineElements, toMap('a,abbr,acronym,b,' + + 'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,' + + 'samp,small,span,strike,strong,sub,sup,time,tt,u,var')); + + // SVG Elements + // https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Elements + // Note: the elements animate,animateColor,animateMotion,animateTransform,set are intentionally omitted. + // They can potentially allow for arbitrary javascript to be executed. See #11290 + var svgElements = toMap('circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,' + + 'hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,' + + 'radialGradient,rect,stop,svg,switch,text,title,tspan'); + + // Blocked Elements (will be stripped) + var blockedElements = toMap('script,style'); + + var validElements = extend({}, + voidElements, + blockElements, + inlineElements, + optionalEndTagElements); + + //Attributes that have href and hence need to be sanitized + var uriAttrs = toMap('background,cite,href,longdesc,src,xlink:href'); + + var htmlAttrs = toMap('abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,' + + 'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,' + + 'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,' + + 'scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,' + + 'valign,value,vspace,width'); + + // SVG attributes (without "id" and "name" attributes) + // https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Attributes + var svgAttrs = toMap('accent-height,accumulate,additive,alphabetic,arabic-form,ascent,' + + 'baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,' + + 'cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,' + + 'font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,' + + 'height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,' + + 'marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,' + + 'max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,' + + 'path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,' + + 'requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,' + + 'stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,' + + 'stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,' + + 'stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,' + + 'underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,' + + 'width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,' + + 'xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan', true); + + var validAttrs = extend({}, + uriAttrs, + svgAttrs, + htmlAttrs); + + function toMap(str, lowercaseKeys) { + var obj = {}, items = str.split(','), i; + for (i = 0; i < items.length; i++) { + obj[lowercaseKeys ? lowercase(items[i]) : items[i]] = true; + } + return obj; + } + + /** + * Create an inert document that contains the dirty HTML that needs sanitizing + * Depending upon browser support we use one of three strategies for doing this. + * Support: Safari 10.x -> XHR strategy + * Support: Firefox -> DomParser strategy + */ + var getInertBodyElement /* function(html: string): HTMLBodyElement */ = (function(window, document) { + var inertDocument; + if (document && document.implementation) { + inertDocument = document.implementation.createHTMLDocument('inert'); + } else { + throw $sanitizeMinErr('noinert', 'Can\'t create an inert html document'); + } + var inertBodyElement = (inertDocument.documentElement || inertDocument.getDocumentElement()).querySelector('body'); + + // Check for the Safari 10.1 bug - which allows JS to run inside the SVG G element + inertBodyElement.innerHTML = ''; + if (!inertBodyElement.querySelector('svg')) { + return getInertBodyElement_XHR; + } else { + // Check for the Firefox bug - which prevents the inner img JS from being sanitized + inertBodyElement.innerHTML = '

'; + if (inertBodyElement.querySelector('svg img')) { + return getInertBodyElement_DOMParser; + } else { + return getInertBodyElement_InertDocument; + } + } + + function getInertBodyElement_XHR(html) { + // We add this dummy element to ensure that the rest of the content is parsed as expected + // e.g. leading whitespace is maintained and tags like `` do not get hoisted to the `` tag. + html = '' + html; + try { + html = encodeURI(html); + } catch (e) { + return undefined; + } + var xhr = new window.XMLHttpRequest(); + xhr.responseType = 'document'; + xhr.open('GET', 'data:text/html;charset=utf-8,' + html, false); + xhr.send(null); + var body = xhr.response.body; + body.firstChild.remove(); + return body; + } + + function getInertBodyElement_DOMParser(html) { + // We add this dummy element to ensure that the rest of the content is parsed as expected + // e.g. leading whitespace is maintained and tags like `` do not get hoisted to the `` tag. + html = '' + html; + try { + var body = new window.DOMParser().parseFromString(html, 'text/html').body; + body.firstChild.remove(); + return body; + } catch (e) { + return undefined; + } + } + + function getInertBodyElement_InertDocument(html) { + inertBodyElement.innerHTML = html; + + // Support: IE 9-11 only + // strip custom-namespaced attributes on IE<=11 + if (document.documentMode) { + stripCustomNsAttrs(inertBodyElement); + } + + return inertBodyElement; + } + })(window, window.document); + + /** + * @example + * htmlParser(htmlString, { + * start: function(tag, attrs) {}, + * end: function(tag) {}, + * chars: function(text) {}, + * comment: function(text) {} + * }); + * + * @param {string} html string + * @param {object} handler + */ + function htmlParserImpl(html, handler) { + if (html === null || html === undefined) { + html = ''; + } else if (typeof html !== 'string') { + html = '' + html; + } + + var inertBodyElement = getInertBodyElement(html); + if (!inertBodyElement) return ''; + + //mXSS protection + var mXSSAttempts = 5; + do { + if (mXSSAttempts === 0) { + throw $sanitizeMinErr('uinput', 'Failed to sanitize html because the input is unstable'); + } + mXSSAttempts--; + + // trigger mXSS if it is going to happen by reading and writing the innerHTML + html = inertBodyElement.innerHTML; + inertBodyElement = getInertBodyElement(html); + } while (html !== inertBodyElement.innerHTML); + + var node = inertBodyElement.firstChild; + while (node) { + switch (node.nodeType) { + case 1: // ELEMENT_NODE + handler.start(node.nodeName.toLowerCase(), attrToMap(node.attributes)); + break; + case 3: // TEXT NODE + handler.chars(node.textContent); + break; + } + + var nextNode; + if (!(nextNode = node.firstChild)) { + if (node.nodeType === 1) { + handler.end(node.nodeName.toLowerCase()); + } + nextNode = getNonDescendant('nextSibling', node); + if (!nextNode) { + while (nextNode == null) { + node = getNonDescendant('parentNode', node); + if (node === inertBodyElement) break; + nextNode = getNonDescendant('nextSibling', node); + if (node.nodeType === 1) { + handler.end(node.nodeName.toLowerCase()); + } + } + } + } + node = nextNode; + } + + while ((node = inertBodyElement.firstChild)) { + inertBodyElement.removeChild(node); + } + } + + function attrToMap(attrs) { + var map = {}; + for (var i = 0, ii = attrs.length; i < ii; i++) { + var attr = attrs[i]; + map[attr.name] = attr.value; + } + return map; + } + + + /** + * Escapes all potentially dangerous characters, so that the + * resulting string can be safely inserted into attribute or + * element text. + * @param value + * @returns {string} escaped text + */ + function encodeEntities(value) { + return value. + replace(/&/g, '&'). + replace(SURROGATE_PAIR_REGEXP, function(value) { + var hi = value.charCodeAt(0); + var low = value.charCodeAt(1); + return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';'; + }). + replace(NON_ALPHANUMERIC_REGEXP, function(value) { + return '&#' + value.charCodeAt(0) + ';'; + }). + replace(//g, '>'); + } + + /** + * create an HTML/XML writer which writes to buffer + * @param {Array} buf use buf.join('') to get out sanitized html string + * @returns {object} in the form of { + * start: function(tag, attrs) {}, + * end: function(tag) {}, + * chars: function(text) {}, + * comment: function(text) {} + * } + */ + function htmlSanitizeWriterImpl(buf, uriValidator) { + var ignoreCurrentElement = false; + var out = bind(buf, buf.push); + return { + start: function(tag, attrs) { + tag = lowercase(tag); + if (!ignoreCurrentElement && blockedElements[tag]) { + ignoreCurrentElement = tag; + } + if (!ignoreCurrentElement && validElements[tag] === true) { + out('<'); + out(tag); + forEach(attrs, function(value, key) { + var lkey = lowercase(key); + var isImage = (tag === 'img' && lkey === 'src') || (lkey === 'background'); + if (validAttrs[lkey] === true && + (uriAttrs[lkey] !== true || uriValidator(value, isImage))) { + out(' '); + out(key); + out('="'); + out(encodeEntities(value)); + out('"'); + } + }); + out('>'); + } + }, + end: function(tag) { + tag = lowercase(tag); + if (!ignoreCurrentElement && validElements[tag] === true && voidElements[tag] !== true) { + out(''); + } + // eslint-disable-next-line eqeqeq + if (tag == ignoreCurrentElement) { + ignoreCurrentElement = false; + } + }, + chars: function(chars) { + if (!ignoreCurrentElement) { + out(encodeEntities(chars)); + } + } + }; + } + + + /** + * When IE9-11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1' attribute to declare + * ns1 namespace and prefixes the attribute with 'ns1' (e.g. 'ns1:xlink:foo'). This is undesirable since we don't want + * to allow any of these custom attributes. This method strips them all. + * + * @param node Root element to process + */ + function stripCustomNsAttrs(node) { + while (node) { + if (node.nodeType === window.Node.ELEMENT_NODE) { + var attrs = node.attributes; + for (var i = 0, l = attrs.length; i < l; i++) { + var attrNode = attrs[i]; + var attrName = attrNode.name.toLowerCase(); + if (attrName === 'xmlns:ns1' || attrName.lastIndexOf('ns1:', 0) === 0) { + node.removeAttributeNode(attrNode); + i--; + l--; + } + } + } + + var nextNode = node.firstChild; + if (nextNode) { + stripCustomNsAttrs(nextNode); + } + + node = getNonDescendant('nextSibling', node); + } + } + + function getNonDescendant(propName, node) { + // An element is clobbered if its `propName` property points to one of its descendants + var nextNode = node[propName]; + if (nextNode && nodeContains.call(node, nextNode)) { + throw $sanitizeMinErr('elclob', 'Failed to sanitize html because the element is clobbered: {0}', node.outerHTML || node.outerText); + } + return nextNode; + } +} + +function sanitizeText(chars) { + var buf = []; + var writer = htmlSanitizeWriter(buf, noop); + writer.chars(chars); + return buf.join(''); +} + + +// define ngSanitize module and register $sanitize service +angular.module('ngSanitize', []) + .provider('$sanitize', $SanitizeProvider) + .info({ angularVersion: '1.6.6' }); + +/** + * @ngdoc filter + * @name linky + * @kind function + * + * @description + * Finds links in text input and turns them into html links. Supports `http/https/ftp/mailto` and + * plain email address links. + * + * Requires the {@link ngSanitize `ngSanitize`} module to be installed. + * + * @param {string} text Input text. + * @param {string} target Window (`_blank|_self|_parent|_top`) or named frame to open links in. + * @param {object|function(url)} [attributes] Add custom attributes to the link element. + * + * Can be one of: + * + * - `object`: A map of attributes + * - `function`: Takes the url as a parameter and returns a map of attributes + * + * If the map of attributes contains a value for `target`, it overrides the value of + * the target parameter. + * + * + * @returns {string} Html-linkified and {@link $sanitize sanitized} text. + * + * @usage + + * + * @example + + +

+ Snippet: + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilterSourceRendered
linky filter +
<div ng-bind-html="snippet | linky">
</div>
+
+
+
linky target +
<div ng-bind-html="snippetWithSingleURL | linky:'_blank'">
</div>
+
+
+
linky custom attributes +
<div ng-bind-html="snippetWithSingleURL | linky:'_self':{rel: 'nofollow'}">
</div>
+
+
+
no filter
<div ng-bind="snippet">
</div>
+ + + angular.module('linkyExample', ['ngSanitize']) + .controller('ExampleController', ['$scope', function($scope) { + $scope.snippet = + 'Pretty text with some links:\n' + + 'http://angularjs.org/,\n' + + 'mailto:us@somewhere.org,\n' + + 'another@somewhere.org,\n' + + 'and one more: ftp://127.0.0.1/.'; + $scope.snippetWithSingleURL = 'http://angularjs.org/'; + }]); + + + it('should linkify the snippet with urls', function() { + expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). + toBe('Pretty text with some links: http://angularjs.org/, us@somewhere.org, ' + + 'another@somewhere.org, and one more: ftp://127.0.0.1/.'); + expect(element.all(by.css('#linky-filter a')).count()).toEqual(4); + }); + + it('should not linkify snippet without the linky filter', function() { + expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()). + toBe('Pretty text with some links: http://angularjs.org/, mailto:us@somewhere.org, ' + + 'another@somewhere.org, and one more: ftp://127.0.0.1/.'); + expect(element.all(by.css('#escaped-html a')).count()).toEqual(0); + }); + + it('should update', function() { + element(by.model('snippet')).clear(); + element(by.model('snippet')).sendKeys('new http://link.'); + expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). + toBe('new http://link.'); + expect(element.all(by.css('#linky-filter a')).count()).toEqual(1); + expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()) + .toBe('new http://link.'); + }); + + it('should work with the target property', function() { + expect(element(by.id('linky-target')). + element(by.binding("snippetWithSingleURL | linky:'_blank'")).getText()). + toBe('http://angularjs.org/'); + expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank'); + }); + + it('should optionally add custom attributes', function() { + expect(element(by.id('linky-custom-attributes')). + element(by.binding("snippetWithSingleURL | linky:'_self':{rel: 'nofollow'}")).getText()). + toBe('http://angularjs.org/'); + expect(element(by.css('#linky-custom-attributes a')).getAttribute('rel')).toEqual('nofollow'); + }); + + + */ +angular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) { + var LINKY_URL_REGEXP = + /((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i, + MAILTO_REGEXP = /^mailto:/i; + + var linkyMinErr = angular.$$minErr('linky'); + var isDefined = angular.isDefined; + var isFunction = angular.isFunction; + var isObject = angular.isObject; + var isString = angular.isString; + + return function(text, target, attributes) { + if (text == null || text === '') return text; + if (!isString(text)) throw linkyMinErr('notstring', 'Expected string but received: {0}', text); + + var attributesFn = + isFunction(attributes) ? attributes : + isObject(attributes) ? function getAttributesObject() {return attributes;} : + function getEmptyAttributesObject() {return {};}; + + var match; + var raw = text; + var html = []; + var url; + var i; + while ((match = raw.match(LINKY_URL_REGEXP))) { + // We can not end in these as they are sometimes found at the end of the sentence + url = match[0]; + // if we did not match ftp/http/www/mailto then assume mailto + if (!match[2] && !match[4]) { + url = (match[3] ? 'http://' : 'mailto:') + url; + } + i = match.index; + addText(raw.substr(0, i)); + addLink(url, match[0].replace(MAILTO_REGEXP, '')); + raw = raw.substring(i + match[0].length); + } + addText(raw); + return $sanitize(html.join('')); + + function addText(text) { + if (!text) { + return; + } + html.push(sanitizeText(text)); + } + + function addLink(url, text) { + var key, linkAttributes = attributesFn(url); + html.push(''); + addText(text); + html.push(''); + } + }; +}]); + + +})(window, window.angular); diff --git a/1.6.6/angular-sanitize.min.js b/1.6.6/angular-sanitize.min.js new file mode 100644 index 000000000..e92ccbf10 --- /dev/null +++ b/1.6.6/angular-sanitize.min.js @@ -0,0 +1,17 @@ +/* + AngularJS v1.6.6 + (c) 2010-2017 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(s,d){'use strict';function J(d){var k=[];w(k,B).chars(d);return k.join("")}var x=d.$$minErr("$sanitize"),C,k,D,E,p,B,F,G,w;d.module("ngSanitize",[]).provider("$sanitize",function(){function g(a,e){var c={},b=a.split(","),f;for(f=0;f/g,">")}function I(a){for(;a;){if(a.nodeType===s.Node.ELEMENT_NODE)for(var e=a.attributes,c=0,b=e.length;c"))},end:function(a){a=p(a);c||!0!==n[a]||!0===h[a]||(b(""));a==c&&(c=!1)},chars:function(a){c||b(H(a))}}};F=s.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)};var L=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,M=/([^#-~ |!])/g,h=g("area,br,col,hr,img,wbr"),q=g("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),l=g("rp,rt"),r=k({},l,q),q=k({},q,g("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")), +l=k({},l,g("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),z=g("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),A=g("script,style"),n=k({},h,q,l,r),m=g("background,cite,href,longdesc,src,xlink:href"),r=g("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"), +l=g("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan", +!0),v=k({},m,l,r),u=function(a,e){function c(b){b=""+b;try{var c=(new a.DOMParser).parseFromString(b,"text/html").body;c.firstChild.remove();return c}catch(e){}}function b(a){d.innerHTML=a;e.documentMode&&I(d);return d}var h;if(e&&e.implementation)h=e.implementation.createHTMLDocument("inert");else throw x("noinert");var d=(h.documentElement||h.getDocumentElement()).querySelector("body");d.innerHTML='';return d.querySelector("svg")? +(d.innerHTML='

',d.querySelector("svg img")?c:b):function(b){b=""+b;try{b=encodeURI(b)}catch(c){return}var e=new a.XMLHttpRequest;e.responseType="document";e.open("GET","data:text/html;charset=utf-8,"+b,!1);e.send(null);b=e.response.body;b.firstChild.remove();return b}}(s,s.document)}).info({angularVersion:"1.6.6"});d.module("ngSanitize").filter("linky",["$sanitize",function(g){var k=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i, +p=/^mailto:/i,s=d.$$minErr("linky"),t=d.isDefined,y=d.isFunction,w=d.isObject,x=d.isString;return function(d,q,l){function r(a){a&&m.push(J(a))}function z(a,d){var c,b=A(a);m.push("');r(d);m.push("")}if(null==d||""===d)return d;if(!x(d))throw s("notstring",d);for(var A=y(l)?l:w(l)?function(){return l}:function(){return{}},n=d,m=[],v,u;d=n.match(k);)v=d[0],d[2]|| +d[4]||(v=(d[3]?"http://":"mailto:")+v),u=d.index,r(n.substr(0,u)),z(v,d[0].replace(p,"")),n=n.substring(u+d[0].length);r(n);return g(m.join(""))}}])})(window,window.angular); +//# sourceMappingURL=angular-sanitize.min.js.map diff --git a/1.6.6/angular-sanitize.min.js.map b/1.6.6/angular-sanitize.min.js.map new file mode 100644 index 000000000..475690d12 --- /dev/null +++ b/1.6.6/angular-sanitize.min.js.map @@ -0,0 +1,8 @@ +{ +"version":3, +"file":"angular-sanitize.min.js", +"lineCount":16, +"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkB,CA8kB3BC,QAASA,EAAY,CAACC,CAAD,CAAQ,CAC3B,IAAIC,EAAM,EACGC,EAAAC,CAAmBF,CAAnBE,CAAwBC,CAAxBD,CACbH,MAAA,CAAaA,CAAb,CACA,OAAOC,EAAAI,KAAA,CAAS,EAAT,CAJoB,CAjkB7B,IAAIC,EAAkBR,CAAAS,SAAA,CAAiB,WAAjB,CAAtB,CACIC,CADJ,CAEIC,CAFJ,CAGIC,CAHJ,CAIIC,CAJJ,CAKIC,CALJ,CAMIR,CANJ,CAOIS,CAPJ,CAQIC,CARJ,CASIZ,CAikBJJ,EAAAiB,OAAA,CAAe,YAAf,CAA6B,EAA7B,CAAAC,SAAA,CACY,WADZ,CAhcAC,QAA0B,EAAG,CA4J3BC,QAASA,EAAK,CAACC,CAAD,CAAMC,CAAN,CAAqB,CAAA,IAC7BC,EAAM,EADuB,CACnBC,EAAQH,CAAAI,MAAA,CAAU,GAAV,CADW,CACKC,CACtC,KAAKA,CAAL,CAAS,CAAT,CAAYA,CAAZ,CAAgBF,CAAAG,OAAhB,CAA8BD,CAAA,EAA9B,CACEH,CAAA,CAAID,CAAA,CAAgBR,CAAA,CAAUU,CAAA,CAAME,CAAN,CAAV,CAAhB,CAAsCF,CAAA,CAAME,CAAN,CAA1C,CAAA,CAAsD,CAAA,CAExD,OAAOH,EAL0B,CAwJnCK,QAASA,EAAS,CAACC,CAAD,CAAQ,CAExB,IADA,IAAIC,EAAM,EAAV,CACSJ,EAAI,CADb,CACgBK,EAAKF,CAAAF,OAArB,CAAmCD,CAAnC,CAAuCK,CAAvC,CAA2CL,CAAA,EAA3C,CAAgD,CAC9C,IAAIM,EAAOH,CAAA,CAAMH,CAAN,CACXI,EAAA,CAAIE,CAAAC,KAAJ,CAAA,CAAiBD,CAAAE,MAF6B,CAIhD,MAAOJ,EANiB,CAiB1BK,QAASA,EAAc,CAACD,CAAD,CAAQ,CAC7B,MAAOA,EAAAE,QAAA,CACG,IADH,CACS,OADT,CAAAA,QAAA,CAEGC,CAFH,CAE0B,QAAQ,CAACH,CAAD,CAAQ,CAC7C,IAAII,EAAKJ,CAAAK,WAAA,CAAiB,CAAjB,CACLC,EAAAA,CAAMN,CAAAK,WAAA,CAAiB,CAAjB,CACV,OAAO,IAAP,EAAgC,IAAhC,EAAiBD,CAAjB;AAAsB,KAAtB,GAA0CE,CAA1C,CAAgD,KAAhD,EAA0D,KAA1D,EAAqE,GAHxB,CAF1C,CAAAJ,QAAA,CAOGK,CAPH,CAO4B,QAAQ,CAACP,CAAD,CAAQ,CAC/C,MAAO,IAAP,CAAcA,CAAAK,WAAA,CAAiB,CAAjB,CAAd,CAAoC,GADW,CAP5C,CAAAH,QAAA,CAUG,IAVH,CAUS,MAVT,CAAAA,QAAA,CAWG,IAXH,CAWS,MAXT,CADsB,CAgF/BM,QAASA,EAAkB,CAACC,CAAD,CAAO,CAChC,IAAA,CAAOA,CAAP,CAAA,CAAa,CACX,GAAIA,CAAAC,SAAJ,GAAsB7C,CAAA8C,KAAAC,aAAtB,CAEE,IADA,IAAIjB,EAAQc,CAAAI,WAAZ,CACSrB,EAAI,CADb,CACgBsB,EAAInB,CAAAF,OAApB,CAAkCD,CAAlC,CAAsCsB,CAAtC,CAAyCtB,CAAA,EAAzC,CAA8C,CAC5C,IAAIuB,EAAWpB,CAAA,CAAMH,CAAN,CAAf,CACIwB,EAAWD,CAAAhB,KAAAkB,YAAA,EACf,IAAiB,WAAjB,GAAID,CAAJ,EAAoE,CAApE,GAAgCA,CAAAE,YAAA,CAAqB,MAArB,CAA6B,CAA7B,CAAhC,CACET,CAAAU,oBAAA,CAAyBJ,CAAzB,CAEA,CADAvB,CAAA,EACA,CAAAsB,CAAA,EAN0C,CAYhD,CADIM,CACJ,CADeX,CAAAY,WACf,GACEb,CAAA,CAAmBY,CAAnB,CAGFX,EAAA,CAAOa,CAAA,CAAiB,aAAjB,CAAgCb,CAAhC,CAnBI,CADmB,CAwBlCa,QAASA,EAAgB,CAACC,CAAD,CAAWd,CAAX,CAAiB,CAExC,IAAIW,EAAWX,CAAA,CAAKc,CAAL,CACf,IAAIH,CAAJ,EAAgBvC,CAAA2C,KAAA,CAAkBf,CAAlB,CAAwBW,CAAxB,CAAhB,CACE,KAAM9C,EAAA,CAAgB,QAAhB,CAA2FmC,CAAAgB,UAA3F,EAA6GhB,CAAAiB,UAA7G,CAAN,CAEF,MAAON,EANiC,CA5a1C,IAAIO,EAAa,CAAA,CAEjB,KAAAC,KAAA;AAAY,CAAC,eAAD,CAAkB,QAAQ,CAACC,CAAD,CAAgB,CAChDF,CAAJ,EACElD,CAAA,CAAOqD,CAAP,CAAsBC,CAAtB,CAEF,OAAO,SAAQ,CAACC,CAAD,CAAO,CACpB,IAAI/D,EAAM,EACVa,EAAA,CAAWkD,CAAX,CAAiB9D,CAAA,CAAmBD,CAAnB,CAAwB,QAAQ,CAACgE,CAAD,CAAMC,CAAN,CAAe,CAC9D,MAAO,CAAC,UAAAC,KAAA,CAAgBN,CAAA,CAAcI,CAAd,CAAmBC,CAAnB,CAAhB,CADsD,CAA/C,CAAjB,CAGA,OAAOjE,EAAAI,KAAA,CAAS,EAAT,CALa,CAJ8B,CAA1C,CA4CZ,KAAA+D,UAAA,CAAiBC,QAAQ,CAACD,CAAD,CAAY,CACnC,MAAIzD,EAAA,CAAUyD,CAAV,CAAJ,EACET,CACO,CADMS,CACN,CAAA,IAFT,EAIST,CAL0B,CAarCnD,EAAA,CAAOV,CAAAU,KACPC,EAAA,CAASX,CAAAW,OACTC,EAAA,CAAUZ,CAAAY,QACVC,EAAA,CAAYb,CAAAa,UACZC,EAAA,CAAYd,CAAAc,UACZR,EAAA,CAAON,CAAAM,KAEPU,EAAA,CAsLAwD,QAAuB,CAACN,CAAD,CAAOO,CAAP,CAAgB,CACxB,IAAb,GAAIP,CAAJ,EAA8BQ,IAAAA,EAA9B,GAAqBR,CAArB,CACEA,CADF,CACS,EADT,CAE2B,QAF3B,GAEW,MAAOA,EAFlB,GAGEA,CAHF,CAGS,EAHT,CAGcA,CAHd,CAMA,KAAIS,EAAmBC,CAAA,CAAoBV,CAApB,CACvB,IAAKS,CAAAA,CAAL,CAAuB,MAAO,EAG9B,KAAIE,EAAe,CACnB,GAAG,CACD,GAAqB,CAArB,GAAIA,CAAJ,CACE,KAAMrE,EAAA,CAAgB,QAAhB,CAAN,CAEFqE,CAAA,EAGAX,EAAA,CAAOS,CAAAG,UACPH,EAAA,CAAmBC,CAAA,CAAoBV,CAApB,CARlB,CAAH,MASSA,CATT,GASkBS,CAAAG,UATlB,CAYA,KADInC,CACJ,CADWgC,CAAApB,WACX,CAAOZ,CAAP,CAAA,CAAa,CACX,OAAQA,CAAAC,SAAR,EACE,KAAK,CAAL,CACE6B,CAAAM,MAAA,CAAcpC,CAAAqC,SAAA7B,YAAA,EAAd;AAA2CvB,CAAA,CAAUe,CAAAI,WAAV,CAA3C,CACA,MACF,MAAK,CAAL,CACE0B,CAAAvE,MAAA,CAAcyC,CAAAsC,YAAd,CALJ,CASA,IAAI3B,CACJ,IAAM,EAAAA,CAAA,CAAWX,CAAAY,WAAX,CAAN,GACwB,CAIjBD,GAJDX,CAAAC,SAICU,EAHHmB,CAAAS,IAAA,CAAYvC,CAAAqC,SAAA7B,YAAA,EAAZ,CAGGG,CADLA,CACKA,CADME,CAAA,CAAiB,aAAjB,CAAgCb,CAAhC,CACNW,CAAAA,CAAAA,CALP,EAMI,IAAA,CAAmB,IAAnB,EAAOA,CAAP,CAAA,CAAyB,CACvBX,CAAA,CAAOa,CAAA,CAAiB,YAAjB,CAA+Bb,CAA/B,CACP,IAAIA,CAAJ,GAAagC,CAAb,CAA+B,KAC/BrB,EAAA,CAAWE,CAAA,CAAiB,aAAjB,CAAgCb,CAAhC,CACW,EAAtB,GAAIA,CAAAC,SAAJ,EACE6B,CAAAS,IAAA,CAAYvC,CAAAqC,SAAA7B,YAAA,EAAZ,CALqB,CAU7BR,CAAA,CAAOW,CA3BI,CA8Bb,IAAA,CAAQX,CAAR,CAAegC,CAAApB,WAAf,CAAA,CACEoB,CAAAQ,YAAA,CAA6BxC,CAA7B,CAvDmC,CArLvCvC,EAAA,CA0RAgF,QAA+B,CAACjF,CAAD,CAAMkF,CAAN,CAAoB,CACjD,IAAIC,EAAuB,CAAA,CAA3B,CACIC,EAAM7E,CAAA,CAAKP,CAAL,CAAUA,CAAAqF,KAAV,CACV,OAAO,CACLT,MAAOA,QAAQ,CAACU,CAAD,CAAM5D,CAAN,CAAa,CAC1B4D,CAAA,CAAM3E,CAAA,CAAU2E,CAAV,CACDH,EAAAA,CAAL,EAA6BI,CAAA,CAAgBD,CAAhB,CAA7B,GACEH,CADF,CACyBG,CADzB,CAGKH,EAAL,EAAoD,CAAA,CAApD,GAA6BtB,CAAA,CAAcyB,CAAd,CAA7B,GACEF,CAAA,CAAI,GAAJ,CAcA,CAbAA,CAAA,CAAIE,CAAJ,CAaA,CAZA7E,CAAA,CAAQiB,CAAR,CAAe,QAAQ,CAACK,CAAD,CAAQyD,CAAR,CAAa,CAClC,IAAIC,EAAO9E,CAAA,CAAU6E,CAAV,CAAX,CACIvB,EAAmB,KAAnBA,GAAWqB,CAAXrB,EAAqC,KAArCA,GAA4BwB,CAA5BxB,EAAyD,YAAzDA;AAAgDwB,CAC3B,EAAA,CAAzB,GAAIC,CAAA,CAAWD,CAAX,CAAJ,EACsB,CAAA,CADtB,GACGE,CAAA,CAASF,CAAT,CADH,EAC8B,CAAAP,CAAA,CAAanD,CAAb,CAAoBkC,CAApB,CAD9B,GAEEmB,CAAA,CAAI,GAAJ,CAIA,CAHAA,CAAA,CAAII,CAAJ,CAGA,CAFAJ,CAAA,CAAI,IAAJ,CAEA,CADAA,CAAA,CAAIpD,CAAA,CAAeD,CAAf,CAAJ,CACA,CAAAqD,CAAA,CAAI,GAAJ,CANF,CAHkC,CAApC,CAYA,CAAAA,CAAA,CAAI,GAAJ,CAfF,CAL0B,CADvB,CAwBLL,IAAKA,QAAQ,CAACO,CAAD,CAAM,CACjBA,CAAA,CAAM3E,CAAA,CAAU2E,CAAV,CACDH,EAAL,EAAoD,CAAA,CAApD,GAA6BtB,CAAA,CAAcyB,CAAd,CAA7B,EAAkF,CAAA,CAAlF,GAA4DM,CAAA,CAAaN,CAAb,CAA5D,GACEF,CAAA,CAAI,IAAJ,CAEA,CADAA,CAAA,CAAIE,CAAJ,CACA,CAAAF,CAAA,CAAI,GAAJ,CAHF,CAMIE,EAAJ,EAAWH,CAAX,GACEA,CADF,CACyB,CAAA,CADzB,CARiB,CAxBd,CAoCLpF,MAAOA,QAAQ,CAACA,CAAD,CAAQ,CAChBoF,CAAL,EACEC,CAAA,CAAIpD,CAAA,CAAejC,CAAf,CAAJ,CAFmB,CApClB,CAH0C,CAxRnDa,EAAA,CAAehB,CAAA8C,KAAAmD,UAAAC,SAAf,EAA8D,QAAQ,CAACC,CAAD,CAAM,CAE1E,MAAO,CAAG,EAAA,IAAAC,wBAAA,CAA6BD,CAA7B,CAAA,CAAoC,EAApC,CAFgE,CAtEjD,KA4EvB7D,EAAwB,iCA5ED,CA8EzBI,EAA0B,cA9ED,CAuFvBsD,EAAe3E,CAAA,CAAM,wBAAN,CAvFQ,CA2FvBgF,EAA8BhF,CAAA,CAAM,gDAAN,CA3FP,CA4FvBiF,EAA+BjF,CAAA,CAAM,OAAN,CA5FR,CA6FvBkF,EAAyB3F,CAAA,CAAO,EAAP,CACe0F,CADf,CAEeD,CAFf,CA7FF,CAkGvBG,EAAgB5F,CAAA,CAAO,EAAP,CAAWyF,CAAX,CAAwChF,CAAA,CAAM,qKAAN,CAAxC,CAlGO;AAuGvBoF,EAAiB7F,CAAA,CAAO,EAAP,CAAW0F,CAAX,CAAyCjF,CAAA,CAAM,2JAAN,CAAzC,CAvGM,CA+GvB6C,EAAc7C,CAAA,CAAM,wNAAN,CA/GS,CAoHvBsE,EAAkBtE,CAAA,CAAM,cAAN,CApHK,CAsHvB4C,EAAgBrD,CAAA,CAAO,EAAP,CACeoF,CADf,CAEeQ,CAFf,CAGeC,CAHf,CAIeF,CAJf,CAtHO,CA6HvBR,EAAW1E,CAAA,CAAM,8CAAN,CA7HY,CA+HvBqF,EAAYrF,CAAA,CAAM,kTAAN,CA/HW;AAuIvBsF,EAAWtF,CAAA,CAAM,guCAAN;AAcoE,CAAA,CAdpE,CAvIY,CAuJvByE,EAAalF,CAAA,CAAO,EAAP,CACemF,CADf,CAEeY,CAFf,CAGeD,CAHf,CAvJU,CA0KvB7B,EAAqE,QAAQ,CAAC7E,CAAD,CAAS4G,CAAT,CAAmB,CAyClGC,QAASA,EAA6B,CAAC1C,CAAD,CAAO,CAG3CA,CAAA,CAAO,mBAAP,CAA6BA,CAC7B,IAAI,CACF,IAAI2C,EAAOC,CAAA,IAAI/G,CAAAgH,UAAJD,iBAAA,CAAuC5C,CAAvC,CAA6C,WAA7C,CAAA2C,KACXA,EAAAtD,WAAAyD,OAAA,EACA,OAAOH,EAHL,CAIF,MAAOI,CAAP,CAAU,EAR+B,CAa7CC,QAASA,EAAiC,CAAChD,CAAD,CAAO,CAC/CS,CAAAG,UAAA,CAA6BZ,CAIzByC,EAAAQ,aAAJ,EACEzE,CAAA,CAAmBiC,CAAnB,CAGF,OAAOA,EATwC,CArDjD,IAAIyC,CACJ,IAAIT,CAAJ,EAAgBA,CAAAU,eAAhB,CACED,CAAA,CAAgBT,CAAAU,eAAAC,mBAAA,CAA2C,OAA3C,CADlB,KAGE,MAAM9G,EAAA,CAAgB,SAAhB,CAAN,CAEF,IAAImE,EAAmB4C,CAACH,CAAAI,gBAADD,EAAkCH,CAAAK,mBAAA,EAAlCF,eAAA,CAAoF,MAApF,CAGvB5C,EAAAG,UAAA,CAA6B,sDAC7B,OAAKH,EAAA4C,cAAA,CAA+B,KAA/B,CAAL;CAIE5C,CAAAG,UACA,CAD6B,kEAC7B,CAAIH,CAAA4C,cAAA,CAA+B,SAA/B,CAAJ,CACSX,CADT,CAGSM,CARX,EAYAQ,QAAgC,CAACxD,CAAD,CAAO,CAGrCA,CAAA,CAAO,mBAAP,CAA6BA,CAC7B,IAAI,CACFA,CAAA,CAAOyD,SAAA,CAAUzD,CAAV,CADL,CAEF,MAAO+C,CAAP,CAAU,CACV,MADU,CAGZ,IAAIW,EAAM,IAAI7H,CAAA8H,eACdD,EAAAE,aAAA,CAAmB,UACnBF,EAAAG,KAAA,CAAS,KAAT,CAAgB,+BAAhB,CAAkD7D,CAAlD,CAAwD,CAAA,CAAxD,CACA0D,EAAAI,KAAA,CAAS,IAAT,CACInB,EAAAA,CAAOe,CAAAK,SAAApB,KACXA,EAAAtD,WAAAyD,OAAA,EACA,OAAOH,EAf8B,CAvB2D,CAA5B,CAiErE9G,CAjEqE,CAiE7DA,CAAA4G,SAjE6D,CA1K7C,CAgc7B,CAAAuB,KAAA,CAEQ,CAAEC,eAAgB,OAAlB,CAFR,CAmIAnI,EAAAiB,OAAA,CAAe,YAAf,CAAAmH,OAAA,CAAoC,OAApC,CAA6C,CAAC,WAAD,CAAc,QAAQ,CAACC,CAAD,CAAY,CAAA,IACzEC,EACE,yFAFuE;AAGzEC,EAAgB,WAHyD,CAKzEC,EAAcxI,CAAAS,SAAA,CAAiB,OAAjB,CAL2D,CAMzEI,EAAYb,CAAAa,UAN6D,CAOzE4H,EAAazI,CAAAyI,WAP4D,CAQzEC,EAAW1I,CAAA0I,SAR8D,CASzEC,EAAW3I,CAAA2I,SAEf,OAAO,SAAQ,CAACC,CAAD,CAAOC,CAAP,CAAe9F,CAAf,CAA2B,CA6BxC+F,QAASA,EAAO,CAACF,CAAD,CAAO,CAChBA,CAAL,EAGA1E,CAAAsB,KAAA,CAAUvF,CAAA,CAAa2I,CAAb,CAAV,CAJqB,CAOvBG,QAASA,EAAO,CAACC,CAAD,CAAMJ,CAAN,CAAY,CAAA,IACtBjD,CADsB,CACjBsD,EAAiBC,CAAA,CAAaF,CAAb,CAC1B9E,EAAAsB,KAAA,CAAU,KAAV,CAEA,KAAKG,CAAL,GAAYsD,EAAZ,CACE/E,CAAAsB,KAAA,CAAUG,CAAV,CAAgB,IAAhB,CAAuBsD,CAAA,CAAetD,CAAf,CAAvB,CAA6C,IAA7C,CAGE,EAAA9E,CAAA,CAAUgI,CAAV,CAAJ,EAA2B,QAA3B,EAAuCI,EAAvC,EACE/E,CAAAsB,KAAA,CAAU,UAAV,CACUqD,CADV,CAEU,IAFV,CAIF3E,EAAAsB,KAAA,CAAU,QAAV,CACUwD,CAAA5G,QAAA,CAAY,IAAZ,CAAkB,QAAlB,CADV,CAEU,IAFV,CAGA0G,EAAA,CAAQF,CAAR,CACA1E,EAAAsB,KAAA,CAAU,MAAV,CAjB0B,CAnC5B,GAAY,IAAZ,EAAIoD,CAAJ,EAA6B,EAA7B,GAAoBA,CAApB,CAAiC,MAAOA,EACxC,IAAK,CAAAD,CAAA,CAASC,CAAT,CAAL,CAAqB,KAAMJ,EAAA,CAAY,WAAZ,CAA8DI,CAA9D,CAAN,CAYrB,IAVA,IAAIM,EACFT,CAAA,CAAW1F,CAAX,CAAA,CAAyBA,CAAzB,CACA2F,CAAA,CAAS3F,CAAT,CAAA,CAAuBoG,QAA4B,EAAG,CAAC,MAAOpG,EAAR,CAAtD,CACAqG,QAAiC,EAAG,CAAC,MAAO,EAAR,CAHtC,CAMIC,EAAMT,CANV,CAOI1E,EAAO,EAPX,CAQI8E,CARJ,CASItH,CACJ,CAAQ4H,CAAR,CAAgBD,CAAAC,MAAA,CAAUhB,CAAV,CAAhB,CAAA,CAEEU,CAQA,CARMM,CAAA,CAAM,CAAN,CAQN,CANKA,CAAA,CAAM,CAAN,CAML;AANkBA,CAAA,CAAM,CAAN,CAMlB,GALEN,CAKF,EALSM,CAAA,CAAM,CAAN,CAAA,CAAW,SAAX,CAAuB,SAKhC,EAL6CN,CAK7C,EAHAtH,CAGA,CAHI4H,CAAAC,MAGJ,CAFAT,CAAA,CAAQO,CAAAG,OAAA,CAAW,CAAX,CAAc9H,CAAd,CAAR,CAEA,CADAqH,CAAA,CAAQC,CAAR,CAAaM,CAAA,CAAM,CAAN,CAAAlH,QAAA,CAAiBmG,CAAjB,CAAgC,EAAhC,CAAb,CACA,CAAAc,CAAA,CAAMA,CAAAI,UAAA,CAAc/H,CAAd,CAAkB4H,CAAA,CAAM,CAAN,CAAA3H,OAAlB,CAERmH,EAAA,CAAQO,CAAR,CACA,OAAOhB,EAAA,CAAUnE,CAAA3D,KAAA,CAAU,EAAV,CAAV,CA3BiC,CAXmC,CAAlC,CAA7C,CA1tB2B,CAA1B,CAAD,CAgyBGR,MAhyBH,CAgyBWA,MAAAC,QAhyBX;", +"sources":["angular-sanitize.js"], +"names":["window","angular","sanitizeText","chars","buf","htmlSanitizeWriter","writer","noop","join","$sanitizeMinErr","$$minErr","bind","extend","forEach","isDefined","lowercase","nodeContains","htmlParser","module","provider","$SanitizeProvider","toMap","str","lowercaseKeys","obj","items","split","i","length","attrToMap","attrs","map","ii","attr","name","value","encodeEntities","replace","SURROGATE_PAIR_REGEXP","hi","charCodeAt","low","NON_ALPHANUMERIC_REGEXP","stripCustomNsAttrs","node","nodeType","Node","ELEMENT_NODE","attributes","l","attrNode","attrName","toLowerCase","lastIndexOf","removeAttributeNode","nextNode","firstChild","getNonDescendant","propName","call","outerHTML","outerText","svgEnabled","$get","$$sanitizeUri","validElements","svgElements","html","uri","isImage","test","enableSvg","this.enableSvg","htmlParserImpl","handler","undefined","inertBodyElement","getInertBodyElement","mXSSAttempts","innerHTML","start","nodeName","textContent","end","removeChild","htmlSanitizeWriterImpl","uriValidator","ignoreCurrentElement","out","push","tag","blockedElements","key","lkey","validAttrs","uriAttrs","voidElements","prototype","contains","arg","compareDocumentPosition","optionalEndTagBlockElements","optionalEndTagInlineElements","optionalEndTagElements","blockElements","inlineElements","htmlAttrs","svgAttrs","document","getInertBodyElement_DOMParser","body","parseFromString","DOMParser","remove","e","getInertBodyElement_InertDocument","documentMode","inertDocument","implementation","createHTMLDocument","querySelector","documentElement","getDocumentElement","getInertBodyElement_XHR","encodeURI","xhr","XMLHttpRequest","responseType","open","send","response","info","angularVersion","filter","$sanitize","LINKY_URL_REGEXP","MAILTO_REGEXP","linkyMinErr","isFunction","isObject","isString","text","target","addText","addLink","url","linkAttributes","attributesFn","getAttributesObject","getEmptyAttributesObject","raw","match","index","substr","substring"] +} diff --git a/1.6.6/angular-scenario.js b/1.6.6/angular-scenario.js new file mode 100644 index 000000000..89b0a728b --- /dev/null +++ b/1.6.6/angular-scenario.js @@ -0,0 +1,46237 @@ +/*! + * jQuery JavaScript Library v3.2.1 + * https://jquery.com/ + * + * Includes Sizzle.js + * https://sizzlejs.com/ + * + * Copyright JS Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2017-03-20T18:59Z + */ +( function( global, factory ) { + +if ( typeof module === "object" && typeof module.exports === "object" ) { + + // For CommonJS and CommonJS-like environments where a proper `window` + // is present, execute the factory and get jQuery. + // For environments that do not have a `window` with a `document` + // (such as Node.js), expose a factory as module.exports. + // This accentuates the need for the creation of a real `window`. + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info. + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 +// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode +// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common +// enough that all such attempts are guarded in a try block. + +var arr = []; + +var document = window.document; + +var getProto = Object.getPrototypeOf; + +var slice = arr.slice; + +var concat = arr.concat; + +var push = arr.push; + +var indexOf = arr.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var fnToString = hasOwn.toString; + +var ObjectFunctionString = fnToString.call( Object ); + +var support = {}; + + + + function DOMEval( code, doc ) { + doc = doc || document; + + var script = doc.createElement( "script" ); + + script.text = code; + doc.head.appendChild( script ).parentNode.removeChild( script ); + } +/* global Symbol */ +// Defining this global in .eslintrc.json would create a danger of using the global +// unguarded in another place, it seems safer to define global only for this module + + + +var + version = "3.2.1", + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }, + + // Support: Android <=4.0 only + // Make sure we trim BOM and NBSP + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([a-z])/g, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }; + +jQuery.fn = jQuery.prototype = { + + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + + // Return all the elements in a clean array + if ( num == null ) { + return slice.call( this ); + } + + // Return just the one element from the set + return num < 0 ? this[ num + this.length ] : this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + each: function( callback ) { + return jQuery.each( this, callback ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map( this, function( elem, i ) { + return callback.call( elem, i, elem ); + } ) ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: arr.sort, + splice: arr.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[ 0 ] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // Skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { + target = {}; + } + + // Extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + + // Only deal with non-null/undefined values + if ( ( options = arguments[ i ] ) != null ) { + + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject( copy ) || + ( copyIsArray = Array.isArray( copy ) ) ) ) { + + if ( copyIsArray ) { + copyIsArray = false; + clone = src && Array.isArray( src ) ? src : []; + + } else { + clone = src && jQuery.isPlainObject( src ) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend( { + + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + isFunction: function( obj ) { + return jQuery.type( obj ) === "function"; + }, + + isWindow: function( obj ) { + return obj != null && obj === obj.window; + }, + + isNumeric: function( obj ) { + + // As of jQuery 3.0, isNumeric is limited to + // strings and numbers (primitives or objects) + // that can be coerced to finite numbers (gh-2662) + var type = jQuery.type( obj ); + return ( type === "number" || type === "string" ) && + + // parseFloat NaNs numeric-cast false positives ("") + // ...but misinterprets leading-number strings, particularly hex literals ("0x...") + // subtraction forces infinities to NaN + !isNaN( obj - parseFloat( obj ) ); + }, + + isPlainObject: function( obj ) { + var proto, Ctor; + + // Detect obvious negatives + // Use toString instead of jQuery.type to catch host objects + if ( !obj || toString.call( obj ) !== "[object Object]" ) { + return false; + } + + proto = getProto( obj ); + + // Objects with no prototype (e.g., `Object.create( null )`) are plain + if ( !proto ) { + return true; + } + + // Objects with prototype are plain iff they were constructed by a global Object function + Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; + return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; + }, + + isEmptyObject: function( obj ) { + + /* eslint-disable no-unused-vars */ + // See https://github.com/eslint/eslint/issues/6125 + var name; + + for ( name in obj ) { + return false; + } + return true; + }, + + type: function( obj ) { + if ( obj == null ) { + return obj + ""; + } + + // Support: Android <=2.3 only (functionish RegExp) + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call( obj ) ] || "object" : + typeof obj; + }, + + // Evaluates a script in a global context + globalEval: function( code ) { + DOMEval( code ); + }, + + // Convert dashed to camelCase; used by the css and data modules + // Support: IE <=9 - 11, Edge 12 - 13 + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + each: function( obj, callback ) { + var length, i = 0; + + if ( isArrayLike( obj ) ) { + length = obj.length; + for ( ; i < length; i++ ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } else { + for ( i in obj ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } + + return obj; + }, + + // Support: Android <=4.0 only + trim: function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArrayLike( Object( arr ) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + return arr == null ? -1 : indexOf.call( arr, elem, i ); + }, + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + for ( ; j < len; j++ ) { + first[ i++ ] = second[ j ]; + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var length, value, + i = 0, + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArrayLike( elems ) ) { + length = elems.length; + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var tmp, args, proxy; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + now: Date.now, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +} ); + +if ( typeof Symbol === "function" ) { + jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; +} + +// Populate the class2type map +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), +function( i, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +} ); + +function isArrayLike( obj ) { + + // Support: real iOS 8.2 only (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = !!obj && "length" in obj && obj.length, + type = jQuery.type( obj ); + + if ( type === "function" || jQuery.isWindow( obj ) ) { + return false; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v2.3.3 + * https://sizzlejs.com/ + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2016-08-08 + */ +(function( window ) {'use strict'; + +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + 1 * new Date(), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf as it's faster than native + // https://jsperf.com/thor-indexof-vs-for/5 + indexOf = function( list, elem ) { + var i = 0, + len = list.length; + for ( ; i < len; i++ ) { + if ( list[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + + // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + + "*\\]", + + pseudos = ":(" + identifier + ")(?:\\((" + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + identifier + ")" ), + "CLASS": new RegExp( "^\\.(" + identifier + ")" ), + "TAG": new RegExp( "^(" + identifier + "|[*])" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + + // CSS escapes + // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox<24 + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + high < 0 ? + // BMP codepoint + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }, + + // CSS string/identifier serialization + // https://drafts.csswg.org/cssom/#common-serializing-idioms + rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, + fcssescape = function( ch, asCodePoint ) { + if ( asCodePoint ) { + + // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER + if ( ch === "\0" ) { + return "\uFFFD"; + } + + // Control characters and (dependent upon position) numbers get escaped as code points + return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; + } + + // Other potentially-special ASCII characters get backslash-escaped + return "\\" + ch; + }, + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + unloadHandler = function() { + setDocument(); + }, + + disabledAncestor = addCombinator( + function( elem ) { + return elem.disabled === true && ("form" in elem || "label" in elem); + }, + { dir: "parentNode", next: "legend" } + ); + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var m, i, elem, nid, match, groups, newSelector, + newContext = context && context.ownerDocument, + + // nodeType defaults to 9, since context defaults to document + nodeType = context ? context.nodeType : 9; + + results = results || []; + + // Return early from calls with invalid selector or context + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { + + return results; + } + + // Try to shortcut find operations (as opposed to filters) in HTML documents + if ( !seed ) { + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + context = context || document; + + if ( documentIsHTML ) { + + // If the selector is sufficiently simple, try using a "get*By*" DOM method + // (excepting DocumentFragment context, where the methods don't exist) + if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { + + // ID selector + if ( (m = match[1]) ) { + + // Document context + if ( nodeType === 9 ) { + if ( (elem = context.getElementById( m )) ) { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + + // Element context + } else { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( newContext && (elem = newContext.getElementById( m )) && + contains( context, elem ) && + elem.id === m ) { + + results.push( elem ); + return results; + } + } + + // Type selector + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Class selector + } else if ( (m = match[3]) && support.getElementsByClassName && + context.getElementsByClassName ) { + + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // Take advantage of querySelectorAll + if ( support.qsa && + !compilerCache[ selector + " " ] && + (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + + if ( nodeType !== 1 ) { + newContext = context; + newSelector = selector; + + // qSA looks outside Element context, which is not what we want + // Thanks to Andrew Dupont for this workaround technique + // Support: IE <=8 + // Exclude object elements + } else if ( context.nodeName.toLowerCase() !== "object" ) { + + // Capture the context ID, setting it first if necessary + if ( (nid = context.getAttribute( "id" )) ) { + nid = nid.replace( rcssescape, fcssescape ); + } else { + context.setAttribute( "id", (nid = expando) ); + } + + // Prefix every selector in the list + groups = tokenize( selector ); + i = groups.length; + while ( i-- ) { + groups[i] = "#" + nid + " " + toSelector( groups[i] ); + } + newSelector = groups.join( "," ); + + // Expand context for sibling selectors + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || + context; + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch ( qsaError ) { + } finally { + if ( nid === expando ) { + context.removeAttribute( "id" ); + } + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {function(string, object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key + " " ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created element and returns a boolean result + */ +function assert( fn ) { + var el = document.createElement("fieldset"); + + try { + return !!fn( el ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( el.parentNode ) { + el.parentNode.removeChild( el ); + } + // release memory in IE + el = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = arr.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + a.sourceIndex - b.sourceIndex; + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for :enabled/:disabled + * @param {Boolean} disabled true for :disabled; false for :enabled + */ +function createDisabledPseudo( disabled ) { + + // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable + return function( elem ) { + + // Only certain elements can match :enabled or :disabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled + if ( "form" in elem ) { + + // Check for inherited disabledness on relevant non-disabled elements: + // * listed form-associated elements in a disabled fieldset + // https://html.spec.whatwg.org/multipage/forms.html#category-listed + // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled + // * option elements in a disabled optgroup + // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled + // All such elements have a "form" property. + if ( elem.parentNode && elem.disabled === false ) { + + // Option elements defer to a parent optgroup if present + if ( "label" in elem ) { + if ( "label" in elem.parentNode ) { + return elem.parentNode.disabled === disabled; + } else { + return elem.disabled === disabled; + } + } + + // Support: IE 6 - 11 + // Use the isDisabled shortcut property to check for disabled fieldset ancestors + return elem.isDisabled === disabled || + + // Where there is no isDisabled, check manually + /* jshint -W018 */ + elem.isDisabled !== !disabled && + disabledAncestor( elem ) === disabled; + } + + return elem.disabled === disabled; + + // Try to winnow out elements that can't be disabled before trusting the disabled property. + // Some victims get caught in our net (label, legend, menu, track), but it shouldn't + // even exist on them, let alone have a boolean value. + } else if ( "label" in elem ) { + return elem.disabled === disabled; + } + + // Remaining elements are neither :enabled nor :disabled + return false; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== "undefined" && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var hasCompare, subWindow, + doc = node ? node.ownerDocument || node : preferredDoc; + + // Return early if doc is invalid or already selected + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Update global variables + document = doc; + docElem = document.documentElement; + documentIsHTML = !isXML( document ); + + // Support: IE 9-11, Edge + // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) + if ( preferredDoc !== document && + (subWindow = document.defaultView) && subWindow.top !== subWindow ) { + + // Support: IE 11, Edge + if ( subWindow.addEventListener ) { + subWindow.addEventListener( "unload", unloadHandler, false ); + + // Support: IE 9 - 10 only + } else if ( subWindow.attachEvent ) { + subWindow.attachEvent( "onunload", unloadHandler ); + } + } + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties + // (excepting IE8 booleans) + support.attributes = assert(function( el ) { + el.className = "i"; + return !el.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( el ) { + el.appendChild( document.createComment("") ); + return !el.getElementsByTagName("*").length; + }); + + // Support: IE<9 + support.getElementsByClassName = rnative.test( document.getElementsByClassName ); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programmatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( el ) { + docElem.appendChild( el ).id = expando; + return !document.getElementsByName || !document.getElementsByName( expando ).length; + }); + + // ID filter and find + if ( support.getById ) { + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var elem = context.getElementById( id ); + return elem ? [ elem ] : []; + } + }; + } else { + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== "undefined" && + elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + + // Support: IE 6 - 7 only + // getElementById is not reliable as a find shortcut + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var node, i, elems, + elem = context.getElementById( id ); + + if ( elem ) { + + // Verify the id attribute + node = elem.getAttributeNode("id"); + if ( node && node.value === id ) { + return [ elem ]; + } + + // Fall back on getElementsByName + elems = context.getElementsByName( id ); + i = 0; + while ( (elem = elems[i++]) ) { + node = elem.getAttributeNode("id"); + if ( node && node.value === id ) { + return [ elem ]; + } + } + } + + return []; + } + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( tag ); + + // DocumentFragment nodes don't have gEBTN + } else if ( support.qsa ) { + return context.querySelectorAll( tag ); + } + } : + + function( tag, context ) { + var elem, + tmp = [], + i = 0, + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See https://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( el ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // https://bugs.jquery.com/ticket/12359 + docElem.appendChild( el ).innerHTML = "" + + ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( el.querySelectorAll("[msallowcapture^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !el.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ + if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push("~="); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !el.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + + // Support: Safari 8+, iOS 8+ + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibling-combinator selector` fails + if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push(".#.+[+~]"); + } + }); + + assert(function( el ) { + el.innerHTML = "" + + ""; + + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = document.createElement("input"); + input.setAttribute( "type", "hidden" ); + el.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( el.querySelectorAll("[name=d]").length ) { + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( el.querySelectorAll(":enabled").length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: IE9-11+ + // IE's :disabled selector does not pick up the children of disabled fieldsets + docElem.appendChild( el ).disabled = true; + if ( el.querySelectorAll(":disabled").length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + el.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( el ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( el, "*" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( el, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully self-exclusive + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.contains ) ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { + return -1; + } + if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + return a === document ? -1 : + b === document ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return document; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + if ( support.matchesSelector && documentIsHTML && + !compilerCache[ expr + " " ] && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch (e) {} + } + + return Sizzle( expr, document, null, [ elem ] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null; +}; + +Sizzle.escape = function( sel ) { + return (sel + "").replace( rcssescape, fcssescape ); +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + while ( (node = elem[i++]) ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[6] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] ) { + match[2] = match[4] || match[5] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, uniqueCache, outerCache, node, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType, + diff = false; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) { + + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + + // Seek `elem` from a previously-cached index + + // ...in a gzip-friendly way + node = parent; + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex && cache[ 2 ]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + } else { + // Use previously-cached element index if available + if ( useCache ) { + // ...in a gzip-friendly way + node = elem; + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex; + } + + // xml :nth-child(...) + // or :nth-last-child(...) or :nth(-last)?-of-type(...) + if ( diff === false ) { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) && + ++diff ) { + + // Cache the index of each encountered element + if ( useCache ) { + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + uniqueCache[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + // Don't keep the element (issue #299) + input[0] = null; + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + text = text.replace( runescape, funescape ); + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": createDisabledPseudo( false ), + "disabled": createDisabledPseudo( true ), + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( (tokens = []) ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + }); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +}; + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + skip = combinator.next, + key = skip || dir, + checkNonElements = base && key === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + return false; + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, uniqueCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); + + if ( skip && skip === elem.nodeName.toLowerCase() ) { + elem = elem[ dir ] || elem; + } else if ( (oldCache = uniqueCache[ key ]) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return (newCache[ 2 ] = oldCache[ 2 ]); + } else { + // Reuse newcache so results back-propagate to previous elements + uniqueCache[ key ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { + return true; + } + } + } + } + } + return false; + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + // Avoid hanging onto element (issue #299) + checkContext = null; + return ret; + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), + len = elems.length; + + if ( outermost ) { + outermostContext = context === document || context || outermost; + } + + // Add elements passing elementMatchers directly to results + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for ( ; i !== len && (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + if ( !context && elem.ownerDocument !== document ) { + setDocument( elem ); + xml = !documentIsHTML; + } + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context || document, xml) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // `i` is now the count of elements visited above, and adding it to `matchedCount` + // makes the latter nonnegative. + matchedCount += i; + + // Apply set filters to unmatched elements + // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` + // equals `i`), unless we didn't visit _any_ elements in the above loop because we have + // no element matchers and no seed. + // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that + // case, which will result in a "00" `matchedCount` that differs from `i` but is also + // numerically zero. + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +}; + +/** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +select = Sizzle.select = function( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( (selector = compiled.selector || selector) ); + + results = results || []; + + // Try to minimize operations if there is only one selector in the list and no seed + // (the latter of which guarantees us context) + if ( match.length === 1 ) { + + // Reduce context if the leading compound selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + !context || rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +}; + +// One-time assignments + +// Sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Support: Chrome 14-35+ +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert(function( el ) { + // Should return 1, but returns 4 (following) + return el.compareDocumentPosition( document.createElement("fieldset") ) & 1; +}); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( el ) { + el.innerHTML = ""; + return el.firstChild.getAttribute("href") === "#" ; +}) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + }); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert(function( el ) { + el.innerHTML = ""; + el.firstChild.setAttribute( "value", "" ); + return el.firstChild.getAttribute( "value" ) === ""; +}) ) { + addHandle( "value", function( elem, name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + }); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert(function( el ) { + return el.getAttribute("disabled") == null; +}) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return elem[ name ] === true ? name.toLowerCase() : + (val = elem.getAttributeNode( name )) && val.specified ? + val.value : + null; + } + }); +} + +return Sizzle; + +})( window ); + + + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; + +// Deprecated +jQuery.expr[ ":" ] = jQuery.expr.pseudos; +jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; +jQuery.escapeSelector = Sizzle.escape; + + + + +var dir = function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; +}; + + +var siblings = function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; +}; + + +var rneedsContext = jQuery.expr.match.needsContext; + + + +function nodeName( elem, name ) { + + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + +}; +var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); + + + +var risSimple = /^.[^:#\[\.,]*$/; + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + return !!qualifier.call( elem, i, elem ) !== not; + } ); + } + + // Single element + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + } ); + } + + // Arraylike of elements (jQuery, arguments, Array) + if ( typeof qualifier !== "string" ) { + return jQuery.grep( elements, function( elem ) { + return ( indexOf.call( qualifier, elem ) > -1 ) !== not; + } ); + } + + // Simple selector that can be filtered directly, removing non-Elements + if ( risSimple.test( qualifier ) ) { + return jQuery.filter( qualifier, elements, not ); + } + + // Complex selector, compare the two sets, removing non-Elements + qualifier = jQuery.filter( qualifier, elements ); + return jQuery.grep( elements, function( elem ) { + return ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1; + } ); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + if ( elems.length === 1 && elem.nodeType === 1 ) { + return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; + } + + return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + } ) ); +}; + +jQuery.fn.extend( { + find: function( selector ) { + var i, ret, + len = this.length, + self = this; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter( function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + } ) ); + } + + ret = this.pushStack( [] ); + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + return len > 1 ? jQuery.uniqueSort( ret ) : ret; + }, + filter: function( selector ) { + return this.pushStack( winnow( this, selector || [], false ) ); + }, + not: function( selector ) { + return this.pushStack( winnow( this, selector || [], true ) ); + }, + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + } +} ); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + // Shortcut simple #id case for speed + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, + + init = jQuery.fn.init = function( selector, context, root ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Method init() accepts an alternate rootjQuery + // so migrate can support jQuery.sub (gh-2101) + root = root || rootjQuery; + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector[ 0 ] === "<" && + selector[ selector.length - 1 ] === ">" && + selector.length >= 3 ) { + + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && ( match[ 1 ] || !context ) ) { + + // HANDLE: $(html) -> $(array) + if ( match[ 1 ] ) { + context = context instanceof jQuery ? context[ 0 ] : context; + + // Option to run scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[ 1 ], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[ 2 ] ); + + if ( elem ) { + + // Inject the element directly into the jQuery object + this[ 0 ] = elem; + this.length = 1; + } + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || root ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this[ 0 ] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return root.ready !== undefined ? + root.ready( selector ) : + + // Execute immediately if ready is not present + selector( jQuery ); + } + + return jQuery.makeArray( selector, this ); + }; + +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; + +// Initialize central reference +rootjQuery = jQuery( document ); + + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + + // Methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend( { + has: function( target ) { + var targets = jQuery( target, this ), + l = targets.length; + + return this.filter( function() { + var i = 0; + for ( ; i < l; i++ ) { + if ( jQuery.contains( this, targets[ i ] ) ) { + return true; + } + } + } ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + targets = typeof selectors !== "string" && jQuery( selectors ); + + // Positional selectors never match, since there's no _selection_ context + if ( !rneedsContext.test( selectors ) ) { + for ( ; i < l; i++ ) { + for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { + + // Always skip document fragments + if ( cur.nodeType < 11 && ( targets ? + targets.index( cur ) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector( cur, selectors ) ) ) { + + matched.push( cur ); + break; + } + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); + }, + + // Determine the position of an element within the set + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; + } + + // Index in selector + if ( typeof elem === "string" ) { + return indexOf.call( jQuery( elem ), this[ 0 ] ); + } + + // Locate the position of the desired element + return indexOf.call( this, + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[ 0 ] : elem + ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.uniqueSort( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + } +} ); + +function sibling( cur, dir ) { + while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} + return cur; +} + +jQuery.each( { + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return siblings( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return siblings( elem.firstChild ); + }, + contents: function( elem ) { + if ( nodeName( elem, "iframe" ) ) { + return elem.contentDocument; + } + + // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only + // Treat the template element as a regular one in browsers that + // don't support it. + if ( nodeName( elem, "template" ) ) { + elem = elem.content || elem; + } + + return jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var matched = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + matched = jQuery.filter( selector, matched ); + } + + if ( this.length > 1 ) { + + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + jQuery.uniqueSort( matched ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + matched.reverse(); + } + } + + return this.pushStack( matched ); + }; +} ); +var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); + + + +// Convert String-formatted options into Object-formatted ones +function createOptions( options ) { + var object = {}; + jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { + object[ flag ] = true; + } ); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + createOptions( options ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + + // Last fire value for non-forgettable lists + memory, + + // Flag to know if list was already fired + fired, + + // Flag to prevent firing + locked, + + // Actual callback list + list = [], + + // Queue of execution data for repeatable lists + queue = [], + + // Index of currently firing callback (modified by add/remove as needed) + firingIndex = -1, + + // Fire callbacks + fire = function() { + + // Enforce single-firing + locked = locked || options.once; + + // Execute callbacks for all pending executions, + // respecting firingIndex overrides and runtime changes + fired = firing = true; + for ( ; queue.length; firingIndex = -1 ) { + memory = queue.shift(); + while ( ++firingIndex < list.length ) { + + // Run callback and check for early termination + if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && + options.stopOnFalse ) { + + // Jump to end and forget the data so .add doesn't re-fire + firingIndex = list.length; + memory = false; + } + } + } + + // Forget the data if we're done with it + if ( !options.memory ) { + memory = false; + } + + firing = false; + + // Clean up if we're done firing for good + if ( locked ) { + + // Keep an empty list if we have data for future add calls + if ( memory ) { + list = []; + + // Otherwise, this object is spent + } else { + list = ""; + } + } + }, + + // Actual Callbacks object + self = { + + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + + // If we have memory from a past run, we should fire after adding + if ( memory && !firing ) { + firingIndex = list.length - 1; + queue.push( memory ); + } + + ( function add( args ) { + jQuery.each( args, function( _, arg ) { + if ( jQuery.isFunction( arg ) ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) { + + // Inspect recursively + add( arg ); + } + } ); + } )( arguments ); + + if ( memory && !firing ) { + fire(); + } + } + return this; + }, + + // Remove a callback from the list + remove: function() { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + + // Handle firing indexes + if ( index <= firingIndex ) { + firingIndex--; + } + } + } ); + return this; + }, + + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? + jQuery.inArray( fn, list ) > -1 : + list.length > 0; + }, + + // Remove all callbacks from the list + empty: function() { + if ( list ) { + list = []; + } + return this; + }, + + // Disable .fire and .add + // Abort any current/pending executions + // Clear all callbacks and values + disable: function() { + locked = queue = []; + list = memory = ""; + return this; + }, + disabled: function() { + return !list; + }, + + // Disable .fire + // Also disable .add unless we have memory (since it would have no effect) + // Abort any pending executions + lock: function() { + locked = queue = []; + if ( !memory && !firing ) { + list = memory = ""; + } + return this; + }, + locked: function() { + return !!locked; + }, + + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( !locked ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + queue.push( args ); + if ( !firing ) { + fire(); + } + } + return this; + }, + + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + +function Identity( v ) { + return v; +} +function Thrower( ex ) { + throw ex; +} + +function adoptValue( value, resolve, reject, noValue ) { + var method; + + try { + + // Check for promise aspect first to privilege synchronous behavior + if ( value && jQuery.isFunction( ( method = value.promise ) ) ) { + method.call( value ).done( resolve ).fail( reject ); + + // Other thenables + } else if ( value && jQuery.isFunction( ( method = value.then ) ) ) { + method.call( value, resolve, reject ); + + // Other non-thenables + } else { + + // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: + // * false: [ value ].slice( 0 ) => resolve( value ) + // * true: [ value ].slice( 1 ) => resolve() + resolve.apply( undefined, [ value ].slice( noValue ) ); + } + + // For Promises/A+, convert exceptions into rejections + // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in + // Deferred#then to conditionally suppress rejection. + } catch ( value ) { + + // Support: Android 4.0 only + // Strict mode functions invoked without .call/.apply get global-object context + reject.apply( undefined, [ value ] ); + } +} + +jQuery.extend( { + + Deferred: function( func ) { + var tuples = [ + + // action, add listener, callbacks, + // ... .then handlers, argument index, [final state] + [ "notify", "progress", jQuery.Callbacks( "memory" ), + jQuery.Callbacks( "memory" ), 2 ], + [ "resolve", "done", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 0, "resolved" ], + [ "reject", "fail", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 1, "rejected" ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + "catch": function( fn ) { + return promise.then( null, fn ); + }, + + // Keep pipe for back-compat + pipe: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + + return jQuery.Deferred( function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + + // Map tuples (progress, done, fail) to arguments (done, fail, progress) + var fn = jQuery.isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; + + // deferred.progress(function() { bind to newDefer or newDefer.notify }) + // deferred.done(function() { bind to newDefer or newDefer.resolve }) + // deferred.fail(function() { bind to newDefer or newDefer.reject }) + deferred[ tuple[ 1 ] ]( function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .progress( newDefer.notify ) + .done( newDefer.resolve ) + .fail( newDefer.reject ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( + this, + fn ? [ returned ] : arguments + ); + } + } ); + } ); + fns = null; + } ).promise(); + }, + then: function( onFulfilled, onRejected, onProgress ) { + var maxDepth = 0; + function resolve( depth, deferred, handler, special ) { + return function() { + var that = this, + args = arguments, + mightThrow = function() { + var returned, then; + + // Support: Promises/A+ section 2.3.3.3.3 + // https://promisesaplus.com/#point-59 + // Ignore double-resolution attempts + if ( depth < maxDepth ) { + return; + } + + returned = handler.apply( that, args ); + + // Support: Promises/A+ section 2.3.1 + // https://promisesaplus.com/#point-48 + if ( returned === deferred.promise() ) { + throw new TypeError( "Thenable self-resolution" ); + } + + // Support: Promises/A+ sections 2.3.3.1, 3.5 + // https://promisesaplus.com/#point-54 + // https://promisesaplus.com/#point-75 + // Retrieve `then` only once + then = returned && + + // Support: Promises/A+ section 2.3.4 + // https://promisesaplus.com/#point-64 + // Only check objects and functions for thenability + ( typeof returned === "object" || + typeof returned === "function" ) && + returned.then; + + // Handle a returned thenable + if ( jQuery.isFunction( then ) ) { + + // Special processors (notify) just wait for resolution + if ( special ) { + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ) + ); + + // Normal processors (resolve) also hook into progress + } else { + + // ...and disregard older resolution values + maxDepth++; + + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ), + resolve( maxDepth, deferred, Identity, + deferred.notifyWith ) + ); + } + + // Handle all other returned values + } else { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Identity ) { + that = undefined; + args = [ returned ]; + } + + // Process the value(s) + // Default process is resolve + ( special || deferred.resolveWith )( that, args ); + } + }, + + // Only normal processors (resolve) catch and reject exceptions + process = special ? + mightThrow : + function() { + try { + mightThrow(); + } catch ( e ) { + + if ( jQuery.Deferred.exceptionHook ) { + jQuery.Deferred.exceptionHook( e, + process.stackTrace ); + } + + // Support: Promises/A+ section 2.3.3.3.4.1 + // https://promisesaplus.com/#point-61 + // Ignore post-resolution exceptions + if ( depth + 1 >= maxDepth ) { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Thrower ) { + that = undefined; + args = [ e ]; + } + + deferred.rejectWith( that, args ); + } + } + }; + + // Support: Promises/A+ section 2.3.3.3.1 + // https://promisesaplus.com/#point-57 + // Re-resolve promises immediately to dodge false rejection from + // subsequent errors + if ( depth ) { + process(); + } else { + + // Call an optional hook to record the stack, in case of exception + // since it's otherwise lost when execution goes async + if ( jQuery.Deferred.getStackHook ) { + process.stackTrace = jQuery.Deferred.getStackHook(); + } + window.setTimeout( process ); + } + }; + } + + return jQuery.Deferred( function( newDefer ) { + + // progress_handlers.add( ... ) + tuples[ 0 ][ 3 ].add( + resolve( + 0, + newDefer, + jQuery.isFunction( onProgress ) ? + onProgress : + Identity, + newDefer.notifyWith + ) + ); + + // fulfilled_handlers.add( ... ) + tuples[ 1 ][ 3 ].add( + resolve( + 0, + newDefer, + jQuery.isFunction( onFulfilled ) ? + onFulfilled : + Identity + ) + ); + + // rejected_handlers.add( ... ) + tuples[ 2 ][ 3 ].add( + resolve( + 0, + newDefer, + jQuery.isFunction( onRejected ) ? + onRejected : + Thrower + ) + ); + } ).promise(); + }, + + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 5 ]; + + // promise.progress = list.add + // promise.done = list.add + // promise.fail = list.add + promise[ tuple[ 1 ] ] = list.add; + + // Handle state + if ( stateString ) { + list.add( + function() { + + // state = "resolved" (i.e., fulfilled) + // state = "rejected" + state = stateString; + }, + + // rejected_callbacks.disable + // fulfilled_callbacks.disable + tuples[ 3 - i ][ 2 ].disable, + + // progress_callbacks.lock + tuples[ 0 ][ 2 ].lock + ); + } + + // progress_handlers.fire + // fulfilled_handlers.fire + // rejected_handlers.fire + list.add( tuple[ 3 ].fire ); + + // deferred.notify = function() { deferred.notifyWith(...) } + // deferred.resolve = function() { deferred.resolveWith(...) } + // deferred.reject = function() { deferred.rejectWith(...) } + deferred[ tuple[ 0 ] ] = function() { + deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); + return this; + }; + + // deferred.notifyWith = list.fireWith + // deferred.resolveWith = list.fireWith + // deferred.rejectWith = list.fireWith + deferred[ tuple[ 0 ] + "With" ] = list.fireWith; + } ); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( singleValue ) { + var + + // count of uncompleted subordinates + remaining = arguments.length, + + // count of unprocessed arguments + i = remaining, + + // subordinate fulfillment data + resolveContexts = Array( i ), + resolveValues = slice.call( arguments ), + + // the master Deferred + master = jQuery.Deferred(), + + // subordinate callback factory + updateFunc = function( i ) { + return function( value ) { + resolveContexts[ i ] = this; + resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( !( --remaining ) ) { + master.resolveWith( resolveContexts, resolveValues ); + } + }; + }; + + // Single- and empty arguments are adopted like Promise.resolve + if ( remaining <= 1 ) { + adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, + !remaining ); + + // Use .then() to unwrap secondary thenables (cf. gh-3000) + if ( master.state() === "pending" || + jQuery.isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { + + return master.then(); + } + } + + // Multiple arguments are aggregated like Promise.all array elements + while ( i-- ) { + adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); + } + + return master.promise(); + } +} ); + + +// These usually indicate a programmer mistake during development, +// warn about them ASAP rather than swallowing them by default. +var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; + +jQuery.Deferred.exceptionHook = function( error, stack ) { + + // Support: IE 8 - 9 only + // Console exists when dev tools are open, which can happen at any time + if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { + window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); + } +}; + + + + +jQuery.readyException = function( error ) { + window.setTimeout( function() { + throw error; + } ); +}; + + + + +// The deferred used on DOM ready +var readyList = jQuery.Deferred(); + +jQuery.fn.ready = function( fn ) { + + readyList + .then( fn ) + + // Wrap jQuery.readyException in a function so that the lookup + // happens at the time of error handling instead of callback + // registration. + .catch( function( error ) { + jQuery.readyException( error ); + } ); + + return this; +}; + +jQuery.extend( { + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + } +} ); + +jQuery.ready.then = readyList.then; + +// The ready event handler and self cleanup method +function completed() { + document.removeEventListener( "DOMContentLoaded", completed ); + window.removeEventListener( "load", completed ); + jQuery.ready(); +} + +// Catch cases where $(document).ready() is called +// after the browser event has already occurred. +// Support: IE <=9 - 10 only +// Older IE sometimes signals "interactive" too soon +if ( document.readyState === "complete" || + ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { + + // Handle it asynchronously to allow scripts the opportunity to delay ready + window.setTimeout( jQuery.ready ); + +} else { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed ); +} + + + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + len = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + access( elems, fn, i, key[ i ], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < len; i++ ) { + fn( + elems[ i ], key, raw ? + value : + value.call( elems[ i ], i, fn( elems[ i ], key ) ) + ); + } + } + } + + if ( chainable ) { + return elems; + } + + // Gets + if ( bulk ) { + return fn.call( elems ); + } + + return len ? fn( elems[ 0 ], key ) : emptyGet; +}; +var acceptData = function( owner ) { + + // Accepts only: + // - Node + // - Node.ELEMENT_NODE + // - Node.DOCUMENT_NODE + // - Object + // - Any + return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); +}; + + + + +function Data() { + this.expando = jQuery.expando + Data.uid++; +} + +Data.uid = 1; + +Data.prototype = { + + cache: function( owner ) { + + // Check if the owner object already has a cache + var value = owner[ this.expando ]; + + // If not, create one + if ( !value ) { + value = {}; + + // We can accept data for non-element nodes in modern browsers, + // but we should not, see #8335. + // Always return an empty object. + if ( acceptData( owner ) ) { + + // If it is a node unlikely to be stringify-ed or looped over + // use plain assignment + if ( owner.nodeType ) { + owner[ this.expando ] = value; + + // Otherwise secure it in a non-enumerable property + // configurable must be true to allow the property to be + // deleted when data is removed + } else { + Object.defineProperty( owner, this.expando, { + value: value, + configurable: true + } ); + } + } + } + + return value; + }, + set: function( owner, data, value ) { + var prop, + cache = this.cache( owner ); + + // Handle: [ owner, key, value ] args + // Always use camelCase key (gh-2257) + if ( typeof data === "string" ) { + cache[ jQuery.camelCase( data ) ] = value; + + // Handle: [ owner, { properties } ] args + } else { + + // Copy the properties one-by-one to the cache object + for ( prop in data ) { + cache[ jQuery.camelCase( prop ) ] = data[ prop ]; + } + } + return cache; + }, + get: function( owner, key ) { + return key === undefined ? + this.cache( owner ) : + + // Always use camelCase key (gh-2257) + owner[ this.expando ] && owner[ this.expando ][ jQuery.camelCase( key ) ]; + }, + access: function( owner, key, value ) { + + // In cases where either: + // + // 1. No key was specified + // 2. A string key was specified, but no value provided + // + // Take the "read" path and allow the get method to determine + // which value to return, respectively either: + // + // 1. The entire cache object + // 2. The data stored at the key + // + if ( key === undefined || + ( ( key && typeof key === "string" ) && value === undefined ) ) { + + return this.get( owner, key ); + } + + // When the key is not a string, or both a key and value + // are specified, set or extend (existing objects) with either: + // + // 1. An object of properties + // 2. A key and value + // + this.set( owner, key, value ); + + // Since the "set" path can have two possible entry points + // return the expected data based on which path was taken[*] + return value !== undefined ? value : key; + }, + remove: function( owner, key ) { + var i, + cache = owner[ this.expando ]; + + if ( cache === undefined ) { + return; + } + + if ( key !== undefined ) { + + // Support array or space separated string of keys + if ( Array.isArray( key ) ) { + + // If key is an array of keys... + // We always set camelCase keys, so remove that. + key = key.map( jQuery.camelCase ); + } else { + key = jQuery.camelCase( key ); + + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + key = key in cache ? + [ key ] : + ( key.match( rnothtmlwhite ) || [] ); + } + + i = key.length; + + while ( i-- ) { + delete cache[ key[ i ] ]; + } + } + + // Remove the expando if there's no more data + if ( key === undefined || jQuery.isEmptyObject( cache ) ) { + + // Support: Chrome <=35 - 45 + // Webkit & Blink performance suffers when deleting properties + // from DOM nodes, so set to undefined instead + // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) + if ( owner.nodeType ) { + owner[ this.expando ] = undefined; + } else { + delete owner[ this.expando ]; + } + } + }, + hasData: function( owner ) { + var cache = owner[ this.expando ]; + return cache !== undefined && !jQuery.isEmptyObject( cache ); + } +}; +var dataPriv = new Data(); + +var dataUser = new Data(); + + + +// Implementation Summary +// +// 1. Enforce API surface and semantic compatibility with 1.9.x branch +// 2. Improve the module's maintainability by reducing the storage +// paths to a single mechanism. +// 3. Use the same single mechanism to support "private" and "user" data. +// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) +// 5. Avoid exposing implementation details on user objects (eg. expando properties) +// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 + +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /[A-Z]/g; + +function getData( data ) { + if ( data === "true" ) { + return true; + } + + if ( data === "false" ) { + return false; + } + + if ( data === "null" ) { + return null; + } + + // Only convert to a number if it doesn't change the string + if ( data === +data + "" ) { + return +data; + } + + if ( rbrace.test( data ) ) { + return JSON.parse( data ); + } + + return data; +} + +function dataAttr( elem, key, data ) { + var name; + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = getData( data ); + } catch ( e ) {} + + // Make sure we set the data so it isn't changed later + dataUser.set( elem, key, data ); + } else { + data = undefined; + } + } + return data; +} + +jQuery.extend( { + hasData: function( elem ) { + return dataUser.hasData( elem ) || dataPriv.hasData( elem ); + }, + + data: function( elem, name, data ) { + return dataUser.access( elem, name, data ); + }, + + removeData: function( elem, name ) { + dataUser.remove( elem, name ); + }, + + // TODO: Now that all calls to _data and _removeData have been replaced + // with direct calls to dataPriv methods, these can be deprecated. + _data: function( elem, name, data ) { + return dataPriv.access( elem, name, data ); + }, + + _removeData: function( elem, name ) { + dataPriv.remove( elem, name ); + } +} ); + +jQuery.fn.extend( { + data: function( key, value ) { + var i, name, data, + elem = this[ 0 ], + attrs = elem && elem.attributes; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = dataUser.get( elem ); + + if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { + i = attrs.length; + while ( i-- ) { + + // Support: IE 11 only + // The attrs elements can be null (#14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.slice( 5 ) ); + dataAttr( elem, name, data[ name ] ); + } + } + } + dataPriv.set( elem, "hasDataAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each( function() { + dataUser.set( this, key ); + } ); + } + + return access( this, function( value ) { + var data; + + // The calling jQuery object (element matches) is not empty + // (and therefore has an element appears at this[ 0 ]) and the + // `value` parameter was not undefined. An empty jQuery object + // will result in `undefined` for elem = this[ 0 ] which will + // throw an exception if an attempt to read a data cache is made. + if ( elem && value === undefined ) { + + // Attempt to get data from the cache + // The key will always be camelCased in Data + data = dataUser.get( elem, key ); + if ( data !== undefined ) { + return data; + } + + // Attempt to "discover" the data in + // HTML5 custom data-* attrs + data = dataAttr( elem, key ); + if ( data !== undefined ) { + return data; + } + + // We tried really hard, but the data doesn't exist. + return; + } + + // Set the data... + this.each( function() { + + // We always store the camelCased key + dataUser.set( this, key, value ); + } ); + }, null, value, arguments.length > 1, null, true ); + }, + + removeData: function( key ) { + return this.each( function() { + dataUser.remove( this, key ); + } ); + } +} ); + + +jQuery.extend( { + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = dataPriv.get( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || Array.isArray( data ) ) { + queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // Clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // Not public - generate a queueHooks object, or return the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { + empty: jQuery.Callbacks( "once memory" ).add( function() { + dataPriv.remove( elem, [ type + "queue", key ] ); + } ) + } ); + } +} ); + +jQuery.fn.extend( { + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[ 0 ], type ); + } + + return data === undefined ? + this : + this.each( function() { + var queue = jQuery.queue( this, type, data ); + + // Ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + } ); + }, + dequeue: function( type ) { + return this.each( function() { + jQuery.dequeue( this, type ); + } ); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while ( i-- ) { + tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +} ); +var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; + +var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); + + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var isHiddenWithinTree = function( elem, el ) { + + // isHiddenWithinTree might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + + // Inline style trumps all + return elem.style.display === "none" || + elem.style.display === "" && + + // Otherwise, check computed style + // Support: Firefox <=43 - 45 + // Disconnected elements can have computed display: none, so first confirm that elem is + // in the document. + jQuery.contains( elem.ownerDocument, elem ) && + + jQuery.css( elem, "display" ) === "none"; + }; + +var swap = function( elem, options, callback, args ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.apply( elem, args || [] ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; +}; + + + + +function adjustCSS( elem, prop, valueParts, tween ) { + var adjusted, + scale = 1, + maxIterations = 20, + currentValue = tween ? + function() { + return tween.cur(); + } : + function() { + return jQuery.css( elem, prop, "" ); + }, + initial = currentValue(), + unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && + rcssNum.exec( jQuery.css( elem, prop ) ); + + if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { + + // Trust units reported by jQuery.css + unit = unit || initialInUnit[ 3 ]; + + // Make sure we update the tween properties later on + valueParts = valueParts || []; + + // Iteratively approximate from a nonzero starting point + initialInUnit = +initial || 1; + + do { + + // If previous iteration zeroed out, double until we get *something*. + // Use string for doubling so we don't accidentally see scale as unchanged below + scale = scale || ".5"; + + // Adjust and apply + initialInUnit = initialInUnit / scale; + jQuery.style( elem, prop, initialInUnit + unit ); + + // Update scale, tolerating zero or NaN from tween.cur() + // Break the loop if scale is unchanged or perfect, or if we've just had enough. + } while ( + scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations + ); + } + + if ( valueParts ) { + initialInUnit = +initialInUnit || +initial || 0; + + // Apply relative offset (+=/-=) if specified + adjusted = valueParts[ 1 ] ? + initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : + +valueParts[ 2 ]; + if ( tween ) { + tween.unit = unit; + tween.start = initialInUnit; + tween.end = adjusted; + } + } + return adjusted; +} + + +var defaultDisplayMap = {}; + +function getDefaultDisplay( elem ) { + var temp, + doc = elem.ownerDocument, + nodeName = elem.nodeName, + display = defaultDisplayMap[ nodeName ]; + + if ( display ) { + return display; + } + + temp = doc.body.appendChild( doc.createElement( nodeName ) ); + display = jQuery.css( temp, "display" ); + + temp.parentNode.removeChild( temp ); + + if ( display === "none" ) { + display = "block"; + } + defaultDisplayMap[ nodeName ] = display; + + return display; +} + +function showHide( elements, show ) { + var display, elem, + values = [], + index = 0, + length = elements.length; + + // Determine new display value for elements that need to change + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + display = elem.style.display; + if ( show ) { + + // Since we force visibility upon cascade-hidden elements, an immediate (and slow) + // check is required in this first loop unless we have a nonempty display value (either + // inline or about-to-be-restored) + if ( display === "none" ) { + values[ index ] = dataPriv.get( elem, "display" ) || null; + if ( !values[ index ] ) { + elem.style.display = ""; + } + } + if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { + values[ index ] = getDefaultDisplay( elem ); + } + } else { + if ( display !== "none" ) { + values[ index ] = "none"; + + // Remember what we're overwriting + dataPriv.set( elem, "display", display ); + } + } + } + + // Set the display of the elements in a second loop to avoid constant reflow + for ( index = 0; index < length; index++ ) { + if ( values[ index ] != null ) { + elements[ index ].style.display = values[ index ]; + } + } + + return elements; +} + +jQuery.fn.extend( { + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each( function() { + if ( isHiddenWithinTree( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + } ); + } +} ); +var rcheckableType = ( /^(?:checkbox|radio)$/i ); + +var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i ); + +var rscriptType = ( /^$|\/(?:java|ecma)script/i ); + + + +// We have to close these tags to support XHTML (#13200) +var wrapMap = { + + // Support: IE <=9 only + option: [ 1, "" ], + + // XHTML parsers do not magically insert elements in the + // same way that tag soup parsers do. So we cannot shorten + // this by omitting or other required elements. + thead: [ 1, "", "
" ], + col: [ 2, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + + _default: [ 0, "", "" ] +}; + +// Support: IE <=9 only +wrapMap.optgroup = wrapMap.option; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + + +function getAll( context, tag ) { + + // Support: IE <=9 - 11 only + // Use typeof to avoid zero-argument method invocation on host objects (#15151) + var ret; + + if ( typeof context.getElementsByTagName !== "undefined" ) { + ret = context.getElementsByTagName( tag || "*" ); + + } else if ( typeof context.querySelectorAll !== "undefined" ) { + ret = context.querySelectorAll( tag || "*" ); + + } else { + ret = []; + } + + if ( tag === undefined || tag && nodeName( context, tag ) ) { + return jQuery.merge( [ context ], ret ); + } + + return ret; +} + + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + dataPriv.set( + elems[ i ], + "globalEval", + !refElements || dataPriv.get( refElements[ i ], "globalEval" ) + ); + } +} + + +var rhtml = /<|&#?\w+;/; + +function buildFragment( elems, context, scripts, selection, ignored ) { + var elem, tmp, tag, wrap, contains, j, + fragment = context.createDocumentFragment(), + nodes = [], + i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; + + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, tmp.childNodes ); + + // Remember the top-level container + tmp = fragment.firstChild; + + // Ensure the created nodes are orphaned (#12392) + tmp.textContent = ""; + } + } + } + + // Remove wrapper from fragment + fragment.textContent = ""; + + i = 0; + while ( ( elem = nodes[ i++ ] ) ) { + + // Skip elements already in the context collection (trac-4087) + if ( selection && jQuery.inArray( elem, selection ) > -1 ) { + if ( ignored ) { + ignored.push( elem ); + } + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( fragment.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( ( elem = tmp[ j++ ] ) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + return fragment; +} + + +( function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); + + // Support: Android 4.0 - 4.3 only + // Check state lost if the name is set (#11217) + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Android <=4.1 only + // Older WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE <=11 only + // Make sure textarea (and checkbox) defaultValue is properly cloned + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; +} )(); +var documentElement = document.documentElement; + + + +var + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +// Support: IE <=9 only +// See #13393 for more info +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +function on( elem, types, selector, data, fn, one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + on( elem, type, selector, data, types[ type ], one ); + } + return elem; + } + + if ( data == null && fn == null ) { + + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return elem; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return elem.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + } ); +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + + var handleObjIn, eventHandle, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.get( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Ensure that invalid selectors throw exceptions at attach time + // Evaluate against documentElement in case elem is a non-element node (e.g., document) + if ( selector ) { + jQuery.find.matchesSelector( documentElement, selector ); + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !( events = elemData.events ) ) { + events = elemData.events = {}; + } + if ( !( eventHandle = elemData.handle ) ) { + eventHandle = elemData.handle = function( e ) { + + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? + jQuery.event.dispatch.apply( elem, arguments ) : undefined; + }; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend( { + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join( "." ) + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !( handlers = events[ type ] ) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener if the special events handler returns false + if ( !special.setup || + special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var j, origCount, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); + + if ( !elemData || !( events = elemData.events ) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[ 2 ] && + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || + selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || + special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove data and the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + dataPriv.remove( elem, "handle events" ); + } + }, + + dispatch: function( nativeEvent ) { + + // Make a writable jQuery.Event from the native event object + var event = jQuery.event.fix( nativeEvent ); + + var i, j, ret, matched, handleObj, handlerQueue, + args = new Array( arguments.length ), + handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[ 0 ] = event; + + for ( i = 1; i < arguments.length; i++ ) { + args[ i ] = arguments[ i ]; + } + + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( ( handleObj = matched.handlers[ j++ ] ) && + !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or 2) have namespace(s) + // a subset or equal to those in the bound event (both can have no namespace). + if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || + handleObj.handler ).apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( ( event.result = ret ) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, handleObj, sel, matchedHandlers, matchedSelectors, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + if ( delegateCount && + + // Support: IE <=9 + // Black-hole SVG instance trees (trac-13180) + cur.nodeType && + + // Support: Firefox <=42 + // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) + // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click + // Support: IE 11 only + // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) + !( event.type === "click" && event.button >= 1 ) ) { + + for ( ; cur !== this; cur = cur.parentNode || this ) { + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { + matchedHandlers = []; + matchedSelectors = {}; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matchedSelectors[ sel ] === undefined ) { + matchedSelectors[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) > -1 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matchedSelectors[ sel ] ) { + matchedHandlers.push( handleObj ); + } + } + if ( matchedHandlers.length ) { + handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); + } + } + } + } + + // Add the remaining (directly-bound) handlers + cur = this; + if ( delegateCount < handlers.length ) { + handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); + } + + return handlerQueue; + }, + + addProp: function( name, hook ) { + Object.defineProperty( jQuery.Event.prototype, name, { + enumerable: true, + configurable: true, + + get: jQuery.isFunction( hook ) ? + function() { + if ( this.originalEvent ) { + return hook( this.originalEvent ); + } + } : + function() { + if ( this.originalEvent ) { + return this.originalEvent[ name ]; + } + }, + + set: function( value ) { + Object.defineProperty( this, name, { + enumerable: true, + configurable: true, + writable: true, + value: value + } ); + } + } ); + }, + + fix: function( originalEvent ) { + return originalEvent[ jQuery.expando ] ? + originalEvent : + new jQuery.Event( originalEvent ); + }, + + special: { + load: { + + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + this.focus(); + return false; + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + } +}; + +jQuery.removeEvent = function( elem, type, handle ) { + + // This "if" is needed for plain objects + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle ); + } +}; + +jQuery.Event = function( src, props ) { + + // Allow instantiation without the 'new' keyword + if ( !( this instanceof jQuery.Event ) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + + // Support: Android <=2.3 only + src.returnValue === false ? + returnTrue : + returnFalse; + + // Create target properties + // Support: Safari <=6 - 7 only + // Target should not be a text node (#504, #13143) + this.target = ( src.target && src.target.nodeType === 3 ) ? + src.target.parentNode : + src.target; + + this.currentTarget = src.currentTarget; + this.relatedTarget = src.relatedTarget; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + constructor: jQuery.Event, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + isSimulated: false, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + + if ( e && !this.isSimulated ) { + e.preventDefault(); + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Includes all common event props including KeyEvent and MouseEvent specific props +jQuery.each( { + altKey: true, + bubbles: true, + cancelable: true, + changedTouches: true, + ctrlKey: true, + detail: true, + eventPhase: true, + metaKey: true, + pageX: true, + pageY: true, + shiftKey: true, + view: true, + "char": true, + charCode: true, + key: true, + keyCode: true, + button: true, + buttons: true, + clientX: true, + clientY: true, + offsetX: true, + offsetY: true, + pointerId: true, + pointerType: true, + screenX: true, + screenY: true, + targetTouches: true, + toElement: true, + touches: true, + + which: function( event ) { + var button = event.button; + + // Add which for key events + if ( event.which == null && rkeyEvent.test( event.type ) ) { + return event.charCode != null ? event.charCode : event.keyCode; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { + if ( button & 1 ) { + return 1; + } + + if ( button & 2 ) { + return 3; + } + + if ( button & 4 ) { + return 2; + } + + return 0; + } + + return event.which; + } +}, jQuery.event.addProp ); + +// Create mouseenter/leave events using mouseover/out and event-time checks +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// +// Support: Safari 7 only +// Safari sends mouseenter too often; see: +// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 +// for the description of the bug (it existed in older Chrome versions as well). +jQuery.each( { + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mouseenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +} ); + +jQuery.fn.extend( { + + on: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn ); + }, + one: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? + handleObj.origType + "." + handleObj.namespace : + handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each( function() { + jQuery.event.remove( this, types, fn, selector ); + } ); + } +} ); + + +var + + /* eslint-disable max-len */ + + // See https://github.com/eslint/eslint/issues/3229 + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, + + /* eslint-enable */ + + // Support: IE <=10 - 11, Edge 12 - 13 + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /\s*$/g; + +// Prefer a tbody over its parent table for containing new rows +function manipulationTarget( elem, content ) { + if ( nodeName( elem, "table" ) && + nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { + + return jQuery( ">tbody", elem )[ 0 ] || elem; + } + + return elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + + if ( match ) { + elem.type = match[ 1 ]; + } else { + elem.removeAttribute( "type" ); + } + + return elem; +} + +function cloneCopyEvent( src, dest ) { + var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; + + if ( dest.nodeType !== 1 ) { + return; + } + + // 1. Copy private data: events, handlers, etc. + if ( dataPriv.hasData( src ) ) { + pdataOld = dataPriv.access( src ); + pdataCur = dataPriv.set( dest, pdataOld ); + events = pdataOld.events; + + if ( events ) { + delete pdataCur.handle; + pdataCur.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + } + + // 2. Copy user data + if ( dataUser.hasData( src ) ) { + udataOld = dataUser.access( src ); + udataCur = jQuery.extend( {}, udataOld ); + + dataUser.set( dest, udataCur ); + } +} + +// Fix IE bugs, see support tests +function fixInput( src, dest ) { + var nodeName = dest.nodeName.toLowerCase(); + + // Fails to persist the checked state of a cloned checkbox or radio button. + if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + dest.checked = src.checked; + + // Fails to return the selected option to the default selected state when cloning options + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +function domManip( collection, args, callback, ignored ) { + + // Flatten any nested arrays + args = concat.apply( [], args ); + + var fragment, first, scripts, hasScripts, node, doc, + i = 0, + l = collection.length, + iNoClone = l - 1, + value = args[ 0 ], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return collection.each( function( index ) { + var self = collection.eq( index ); + if ( isFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + domManip( self, args, callback, ignored ); + } ); + } + + if ( l ) { + fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + // Require either new content or an interest in ignored elements to invoke the callback + if ( first || ignored ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item + // instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( collection[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !dataPriv.access( node, "globalEval" ) && + jQuery.contains( doc, node ) ) { + + if ( node.src ) { + + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl ) { + jQuery._evalUrl( node.src ); + } + } else { + DOMEval( node.textContent.replace( rcleanScript, "" ), doc ); + } + } + } + } + } + } + + return collection; +} + +function remove( elem, selector, keepData ) { + var node, + nodes = selector ? jQuery.filter( selector, elem ) : elem, + i = 0; + + for ( ; ( node = nodes[ i ] ) != null; i++ ) { + if ( !keepData && node.nodeType === 1 ) { + jQuery.cleanData( getAll( node ) ); + } + + if ( node.parentNode ) { + if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { + setGlobalEval( getAll( node, "script" ) ); + } + node.parentNode.removeChild( node ); + } + } + + return elem; +} + +jQuery.extend( { + htmlPrefilter: function( html ) { + return html.replace( rxhtmlTag, "<$1>" ); + }, + + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var i, l, srcElements, destElements, + clone = elem.cloneNode( true ), + inPage = jQuery.contains( elem.ownerDocument, elem ); + + // Fix IE cloning issues + if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && + !jQuery.isXMLDoc( elem ) ) { + + // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + fixInput( srcElements[ i ], destElements[ i ] ); + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + // Return the cloned set + return clone; + }, + + cleanData: function( elems ) { + var data, elem, type, + special = jQuery.event.special, + i = 0; + + for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { + if ( acceptData( elem ) ) { + if ( ( data = elem[ dataPriv.expando ] ) ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataPriv.expando ] = undefined; + } + if ( elem[ dataUser.expando ] ) { + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataUser.expando ] = undefined; + } + } + } + } +} ); + +jQuery.fn.extend( { + detach: function( selector ) { + return remove( this, selector, true ); + }, + + remove: function( selector ) { + return remove( this, selector ); + }, + + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().each( function() { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.textContent = value; + } + } ); + }, null, value, arguments.length ); + }, + + append: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + } ); + }, + + prepend: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + } ); + }, + + before: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + } ); + }, + + after: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + } ); + }, + + empty: function() { + var elem, + i = 0; + + for ( ; ( elem = this[ i ] ) != null; i++ ) { + if ( elem.nodeType === 1 ) { + + // Prevent memory leaks + jQuery.cleanData( getAll( elem, false ) ); + + // Remove any remaining nodes + elem.textContent = ""; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + } ); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = jQuery.htmlPrefilter( value ); + + try { + for ( ; i < l; i++ ) { + elem = this[ i ] || {}; + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch ( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var ignored = []; + + // Make the changes, replacing each non-ignored context element with the new content + return domManip( this, arguments, function( elem ) { + var parent = this.parentNode; + + if ( jQuery.inArray( this, ignored ) < 0 ) { + jQuery.cleanData( getAll( this ) ); + if ( parent ) { + parent.replaceChild( elem, this ); + } + } + + // Force callback invocation + }, ignored ); + } +} ); + +jQuery.each( { + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1, + i = 0; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Support: Android <=4.0 only, PhantomJS 1 only + // .get() because push.apply(_, arraylike) throws on ancient WebKit + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +} ); +var rmargin = ( /^margin/ ); + +var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); + +var getStyles = function( elem ) { + + // Support: IE <=11 only, Firefox <=30 (#15098, #14150) + // IE throws on elements created in popups + // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" + var view = elem.ownerDocument.defaultView; + + if ( !view || !view.opener ) { + view = window; + } + + return view.getComputedStyle( elem ); + }; + + + +( function() { + + // Executing both pixelPosition & boxSizingReliable tests require only one layout + // so they're executed at the same time to save the second computation. + function computeStyleTests() { + + // This is a singleton, we need to execute it only once + if ( !div ) { + return; + } + + div.style.cssText = + "box-sizing:border-box;" + + "position:relative;display:block;" + + "margin:auto;border:1px;padding:1px;" + + "top:1%;width:50%"; + div.innerHTML = ""; + documentElement.appendChild( container ); + + var divStyle = window.getComputedStyle( div ); + pixelPositionVal = divStyle.top !== "1%"; + + // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 + reliableMarginLeftVal = divStyle.marginLeft === "2px"; + boxSizingReliableVal = divStyle.width === "4px"; + + // Support: Android 4.0 - 4.3 only + // Some styles come back with percentage values, even though they shouldn't + div.style.marginRight = "50%"; + pixelMarginRightVal = divStyle.marginRight === "4px"; + + documentElement.removeChild( container ); + + // Nullify the div so it wouldn't be stored in the memory and + // it will also be a sign that checks already performed + div = null; + } + + var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal, + container = document.createElement( "div" ), + div = document.createElement( "div" ); + + // Finish early in limited (non-browser) environments + if ( !div.style ) { + return; + } + + // Support: IE <=9 - 11 only + // Style of cloned element affects source element cloned (#8908) + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" + + "padding:0;margin-top:1px;position:absolute"; + container.appendChild( div ); + + jQuery.extend( support, { + pixelPosition: function() { + computeStyleTests(); + return pixelPositionVal; + }, + boxSizingReliable: function() { + computeStyleTests(); + return boxSizingReliableVal; + }, + pixelMarginRight: function() { + computeStyleTests(); + return pixelMarginRightVal; + }, + reliableMarginLeft: function() { + computeStyleTests(); + return reliableMarginLeftVal; + } + } ); +} )(); + + +function curCSS( elem, name, computed ) { + var width, minWidth, maxWidth, ret, + + // Support: Firefox 51+ + // Retrieving style before computed somehow + // fixes an issue with getting wrong values + // on detached elements + style = elem.style; + + computed = computed || getStyles( elem ); + + // getPropertyValue is needed for: + // .css('filter') (IE 9 only, #12537) + // .css('--customProperty) (#3144) + if ( computed ) { + ret = computed.getPropertyValue( name ) || computed[ name ]; + + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Android Browser returns percentage for some values, + // but width seems to be reliably pixels. + // This is against the CSSOM draft spec: + // https://drafts.csswg.org/cssom/#resolved-values + if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret !== undefined ? + + // Support: IE <=9 - 11 only + // IE returns zIndex value as an integer. + ret + "" : + ret; +} + + +function addGetHookIf( conditionFn, hookFn ) { + + // Define the hook, we'll check on the first run if it's really needed. + return { + get: function() { + if ( conditionFn() ) { + + // Hook not needed (or it's not possible to use it due + // to missing dependency), remove it. + delete this.get; + return; + } + + // Hook needed; redefine it so that the support test is not executed again. + return ( this.get = hookFn ).apply( this, arguments ); + } + }; +} + + +var + + // Swappable if display is none or starts with table + // except "table", "table-cell", or "table-caption" + // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rcustomProp = /^--/, + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: "0", + fontWeight: "400" + }, + + cssPrefixes = [ "Webkit", "Moz", "ms" ], + emptyStyle = document.createElement( "div" ).style; + +// Return a css property mapped to a potentially vendor prefixed property +function vendorPropName( name ) { + + // Shortcut for names that are not vendor prefixed + if ( name in emptyStyle ) { + return name; + } + + // Check for vendor prefixed names + var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in emptyStyle ) { + return name; + } + } +} + +// Return a property mapped along what jQuery.cssProps suggests or to +// a vendor prefixed property. +function finalPropName( name ) { + var ret = jQuery.cssProps[ name ]; + if ( !ret ) { + ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name; + } + return ret; +} + +function setPositiveNumber( elem, value, subtract ) { + + // Any relative (+/-) values have already been + // normalized at this point + var matches = rcssNum.exec( value ); + return matches ? + + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : + value; +} + +function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { + var i, + val = 0; + + // If we already have the right measurement, avoid augmentation + if ( extra === ( isBorderBox ? "border" : "content" ) ) { + i = 4; + + // Otherwise initialize for horizontal or vertical properties + } else { + i = name === "width" ? 1 : 0; + } + + for ( ; i < 4; i += 2 ) { + + // Both box models exclude margin, so add it if we want it + if ( extra === "margin" ) { + val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); + } + + if ( isBorderBox ) { + + // border-box includes padding, so remove it if we want content + if ( extra === "content" ) { + val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // At this point, extra isn't border nor margin, so remove border + if ( extra !== "margin" ) { + val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } else { + + // At this point, extra isn't content, so add padding + val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // At this point, extra isn't content nor padding, so add border + if ( extra !== "padding" ) { + val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + return val; +} + +function getWidthOrHeight( elem, name, extra ) { + + // Start with computed style + var valueIsBorderBox, + styles = getStyles( elem ), + val = curCSS( elem, name, styles ), + isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // Computed unit is not pixels. Stop here and return. + if ( rnumnonpx.test( val ) ) { + return val; + } + + // Check for style in case a browser which returns unreliable values + // for getComputedStyle silently falls back to the reliable elem.style + valueIsBorderBox = isBorderBox && + ( support.boxSizingReliable() || val === elem.style[ name ] ); + + // Fall back to offsetWidth/Height when value is "auto" + // This happens for inline elements with no explicit setting (gh-3571) + if ( val === "auto" ) { + val = elem[ "offset" + name[ 0 ].toUpperCase() + name.slice( 1 ) ]; + } + + // Normalize "", auto, and prepare for extra + val = parseFloat( val ) || 0; + + // Use the active box-sizing model to add/subtract irrelevant styles + return ( val + + augmentWidthOrHeight( + elem, + name, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles + ) + ) + "px"; +} + +jQuery.extend( { + + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + "animationIterationCount": true, + "columnCount": true, + "fillOpacity": true, + "flexGrow": true, + "flexShrink": true, + "fontWeight": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: { + "float": "cssFloat" + }, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = jQuery.camelCase( name ), + isCustomProp = rcustomProp.test( name ), + style = elem.style; + + // Make sure that we're working with the right name. We don't + // want to query the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Gets hook for the prefixed version, then unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // Convert "+=" or "-=" to relative numbers (#7345) + if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { + value = adjustCSS( elem, name, ret ); + + // Fixes bug #9237 + type = "number"; + } + + // Make sure that null and NaN values aren't set (#7116) + if ( value == null || value !== value ) { + return; + } + + // If a number was passed in, add the unit (except for certain CSS properties) + if ( type === "number" ) { + value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); + } + + // background-* props affect original clone's values + if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !( "set" in hooks ) || + ( value = hooks.set( elem, value, extra ) ) !== undefined ) { + + if ( isCustomProp ) { + style.setProperty( name, value ); + } else { + style[ name ] = value; + } + } + + } else { + + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && + ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { + + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var val, num, hooks, + origName = jQuery.camelCase( name ), + isCustomProp = rcustomProp.test( name ); + + // Make sure that we're working with the right name. We don't + // want to modify the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Try prefixed name followed by the unprefixed name + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + // Convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Make numeric if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || isFinite( num ) ? num || 0 : val; + } + + return val; + } +} ); + +jQuery.each( [ "height", "width" ], function( i, name ) { + jQuery.cssHooks[ name ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + + // Certain elements can have dimension info if we invisibly show them + // but it must have a current display style that would benefit + return rdisplayswap.test( jQuery.css( elem, "display" ) ) && + + // Support: Safari 8+ + // Table columns in Safari have non-zero offsetWidth & zero + // getBoundingClientRect().width unless display is changed. + // Support: IE <=11 only + // Running getBoundingClientRect on a disconnected node + // in IE throws an error. + ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? + swap( elem, cssShow, function() { + return getWidthOrHeight( elem, name, extra ); + } ) : + getWidthOrHeight( elem, name, extra ); + } + }, + + set: function( elem, value, extra ) { + var matches, + styles = extra && getStyles( elem ), + subtract = extra && augmentWidthOrHeight( + elem, + name, + extra, + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + styles + ); + + // Convert to pixels if value adjustment is needed + if ( subtract && ( matches = rcssNum.exec( value ) ) && + ( matches[ 3 ] || "px" ) !== "px" ) { + + elem.style[ name ] = value; + value = jQuery.css( elem, name ); + } + + return setPositiveNumber( elem, value, subtract ); + } + }; +} ); + +jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, + function( elem, computed ) { + if ( computed ) { + return ( parseFloat( curCSS( elem, "marginLeft" ) ) || + elem.getBoundingClientRect().left - + swap( elem, { marginLeft: 0 }, function() { + return elem.getBoundingClientRect().left; + } ) + ) + "px"; + } + } +); + +// These hooks are used by animate to expand properties +jQuery.each( { + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i = 0, + expanded = {}, + + // Assumes a single number if not a string + parts = typeof value === "string" ? value.split( " " ) : [ value ]; + + for ( ; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + } + + return expanded; + } + }; + + if ( !rmargin.test( prefix ) ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +} ); + +jQuery.fn.extend( { + css: function( name, value ) { + return access( this, function( elem, name, value ) { + var styles, len, + map = {}, + i = 0; + + if ( Array.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + } +} ); + + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || jQuery.easing._default; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + // Use a property on the element directly when it is not a DOM element, + // or when there is no matching style property that exists. + if ( tween.elem.nodeType !== 1 || + tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { + return tween.elem[ tween.prop ]; + } + + // Passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails. + // Simple values such as "10px" are parsed to Float; + // complex values such as "rotate(1rad)" are returned as-is. + result = jQuery.css( tween.elem, tween.prop, "" ); + + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + + // Use step hook for back compat. + // Use cssHook if its there. + // Use .style if available and use plain properties where available. + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.nodeType === 1 && + ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || + jQuery.cssHooks[ tween.prop ] ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Support: IE <=9 only +// Panic based approach to setting things on disconnected nodes +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p * Math.PI ) / 2; + }, + _default: "swing" +}; + +jQuery.fx = Tween.prototype.init; + +// Back compat <1.8 extension point +jQuery.fx.step = {}; + + + + +var + fxNow, inProgress, + rfxtypes = /^(?:toggle|show|hide)$/, + rrun = /queueHooks$/; + +function schedule() { + if ( inProgress ) { + if ( document.hidden === false && window.requestAnimationFrame ) { + window.requestAnimationFrame( schedule ); + } else { + window.setTimeout( schedule, jQuery.fx.interval ); + } + + jQuery.fx.tick(); + } +} + +// Animations created synchronously will run synchronously +function createFxNow() { + window.setTimeout( function() { + fxNow = undefined; + } ); + return ( fxNow = jQuery.now() ); +} + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + i = 0, + attrs = { height: type }; + + // If we include width, step value is 1 to do all cssExpand values, + // otherwise step value is 2 to skip over Left and Right + includeWidth = includeWidth ? 1 : 0; + for ( ; i < 4; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +function createTween( value, prop, animation ) { + var tween, + collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { + + // We're done with this property + return tween; + } + } +} + +function defaultPrefilter( elem, props, opts ) { + var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, + isBox = "width" in props || "height" in props, + anim = this, + orig = {}, + style = elem.style, + hidden = elem.nodeType && isHiddenWithinTree( elem ), + dataShow = dataPriv.get( elem, "fxshow" ); + + // Queue-skipping animations hijack the fx hooks + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always( function() { + + // Ensure the complete handler is called before this completes + anim.always( function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + } ); + } ); + } + + // Detect show/hide animations + for ( prop in props ) { + value = props[ prop ]; + if ( rfxtypes.test( value ) ) { + delete props[ prop ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + + // Pretend to be hidden if this is a "show" and + // there is still data from a stopped show/hide + if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { + hidden = true; + + // Ignore all other no-op show/hide data + } else { + continue; + } + } + orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); + } + } + + // Bail out if this is a no-op like .hide().hide() + propTween = !jQuery.isEmptyObject( props ); + if ( !propTween && jQuery.isEmptyObject( orig ) ) { + return; + } + + // Restrict "overflow" and "display" styles during box animations + if ( isBox && elem.nodeType === 1 ) { + + // Support: IE <=9 - 11, Edge 12 - 13 + // Record all 3 overflow attributes because IE does not infer the shorthand + // from identically-valued overflowX and overflowY + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Identify a display type, preferring old show/hide data over the CSS cascade + restoreDisplay = dataShow && dataShow.display; + if ( restoreDisplay == null ) { + restoreDisplay = dataPriv.get( elem, "display" ); + } + display = jQuery.css( elem, "display" ); + if ( display === "none" ) { + if ( restoreDisplay ) { + display = restoreDisplay; + } else { + + // Get nonempty value(s) by temporarily forcing visibility + showHide( [ elem ], true ); + restoreDisplay = elem.style.display || restoreDisplay; + display = jQuery.css( elem, "display" ); + showHide( [ elem ] ); + } + } + + // Animate inline elements as inline-block + if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { + if ( jQuery.css( elem, "float" ) === "none" ) { + + // Restore the original display value at the end of pure show/hide animations + if ( !propTween ) { + anim.done( function() { + style.display = restoreDisplay; + } ); + if ( restoreDisplay == null ) { + display = style.display; + restoreDisplay = display === "none" ? "" : display; + } + } + style.display = "inline-block"; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + anim.always( function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + } ); + } + + // Implement show/hide animations + propTween = false; + for ( prop in orig ) { + + // General show/hide setup for this element animation + if ( !propTween ) { + if ( dataShow ) { + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + } else { + dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); + } + + // Store hidden/visible for toggle so `.stop().toggle()` "reverses" + if ( toggle ) { + dataShow.hidden = !hidden; + } + + // Show elements before animating them + if ( hidden ) { + showHide( [ elem ], true ); + } + + /* eslint-disable no-loop-func */ + + anim.done( function() { + + /* eslint-enable no-loop-func */ + + // The final step of a "hide" animation is actually hiding the element + if ( !hidden ) { + showHide( [ elem ] ); + } + dataPriv.remove( elem, "fxshow" ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + } ); + } + + // Per-property setup + propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = propTween.start; + if ( hidden ) { + propTween.end = propTween.start; + propTween.start = 0; + } + } + } +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = jQuery.camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( Array.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // Not quite $.extend, this won't overwrite existing keys. + // Reusing 'index' because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +function Animation( elem, properties, options ) { + var result, + stopped, + index = 0, + length = Animation.prefilters.length, + deferred = jQuery.Deferred().always( function() { + + // Don't match elem in the :animated selector + delete tick.elem; + } ), + tick = function() { + if ( stopped ) { + return false; + } + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + + // Support: Android 2.3 only + // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ] ); + + // If there's more to do, yield + if ( percent < 1 && length ) { + return remaining; + } + + // If this was an empty animation, synthesize a final progress notification + if ( !length ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + } + + // Resolve the animation and report its conclusion + deferred.resolveWith( elem, [ animation ] ); + return false; + }, + animation = deferred.promise( { + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { + specialEasing: {}, + easing: jQuery.easing._default + }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + + // If we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + if ( stopped ) { + return this; + } + stopped = true; + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // Resolve when we played the last frame; otherwise, reject + if ( gotoEnd ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + } ), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length; index++ ) { + result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + if ( jQuery.isFunction( result.stop ) ) { + jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = + jQuery.proxy( result.stop, result ); + } + return result; + } + } + + jQuery.map( props, createTween, animation ); + + if ( jQuery.isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + // Attach callbacks from options + animation + .progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); + + jQuery.fx.timer( + jQuery.extend( tick, { + elem: elem, + anim: animation, + queue: animation.opts.queue + } ) + ); + + return animation; +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweeners: { + "*": [ function( prop, value ) { + var tween = this.createTween( prop, value ); + adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); + return tween; + } ] + }, + + tweener: function( props, callback ) { + if ( jQuery.isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.match( rnothtmlwhite ); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length; index++ ) { + prop = props[ index ]; + Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; + Animation.tweeners[ prop ].unshift( callback ); + } + }, + + prefilters: [ defaultPrefilter ], + + prefilter: function( callback, prepend ) { + if ( prepend ) { + Animation.prefilters.unshift( callback ); + } else { + Animation.prefilters.push( callback ); + } + } +} ); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + jQuery.isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing + }; + + // Go to the end state if fx are off + if ( jQuery.fx.off ) { + opt.duration = 0; + + } else { + if ( typeof opt.duration !== "number" ) { + if ( opt.duration in jQuery.fx.speeds ) { + opt.duration = jQuery.fx.speeds[ opt.duration ]; + + } else { + opt.duration = jQuery.fx.speeds._default; + } + } + } + + // Normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( jQuery.isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.fn.extend( { + fadeTo: function( speed, to, easing, callback ) { + + // Show any hidden elements after setting opacity to 0 + return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() + + // Animate to the value specified + .end().animate( { opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations, or finishing resolves immediately + if ( empty || dataPriv.get( this, "finish" ) ) { + anim.stop( true ); + } + }; + doAnimation.finish = doAnimation; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue && type !== false ) { + this.queue( type || "fx", [] ); + } + + return this.each( function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = dataPriv.get( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && + ( type == null || timers[ index ].queue === type ) ) { + + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // Start the next in the queue if the last step wasn't forced. + // Timers currently will call their complete callbacks, which + // will dequeue but only if they were gotoEnd. + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + } ); + }, + finish: function( type ) { + if ( type !== false ) { + type = type || "fx"; + } + return this.each( function() { + var index, + data = dataPriv.get( this ), + queue = data[ type + "queue" ], + hooks = data[ type + "queueHooks" ], + timers = jQuery.timers, + length = queue ? queue.length : 0; + + // Enable finishing flag on private data + data.finish = true; + + // Empty the queue first + jQuery.queue( this, type, [] ); + + if ( hooks && hooks.stop ) { + hooks.stop.call( this, true ); + } + + // Look for any active animations, and finish them + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && timers[ index ].queue === type ) { + timers[ index ].anim.stop( true ); + timers.splice( index, 1 ); + } + } + + // Look for any animations in the old queue and finish them + for ( index = 0; index < length; index++ ) { + if ( queue[ index ] && queue[ index ].finish ) { + queue[ index ].finish.call( this ); + } + } + + // Turn off finishing flag + delete data.finish; + } ); + } +} ); + +jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +} ); + +// Generate shortcuts for custom animations +jQuery.each( { + slideDown: genFx( "show" ), + slideUp: genFx( "hide" ), + slideToggle: genFx( "toggle" ), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +} ); + +jQuery.timers = []; +jQuery.fx.tick = function() { + var timer, + i = 0, + timers = jQuery.timers; + + fxNow = jQuery.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + + // Run the timer and safely remove it when done (allowing for external removal) + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + jQuery.timers.push( timer ); + jQuery.fx.start(); +}; + +jQuery.fx.interval = 13; +jQuery.fx.start = function() { + if ( inProgress ) { + return; + } + + inProgress = true; + schedule(); +}; + +jQuery.fx.stop = function() { + inProgress = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + + // Default speed + _default: 400 +}; + + +// Based off of the plugin by Clint Helfers, with permission. +// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ +jQuery.fn.delay = function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = window.setTimeout( next, time ); + hooks.stop = function() { + window.clearTimeout( timeout ); + }; + } ); +}; + + +( function() { + var input = document.createElement( "input" ), + select = document.createElement( "select" ), + opt = select.appendChild( document.createElement( "option" ) ); + + input.type = "checkbox"; + + // Support: Android <=4.3 only + // Default value for a checkbox should be "on" + support.checkOn = input.value !== ""; + + // Support: IE <=11 only + // Must access selectedIndex to make default options select + support.optSelected = opt.selected; + + // Support: IE <=11 only + // An input loses its value after becoming a radio + input = document.createElement( "input" ); + input.value = "t"; + input.type = "radio"; + support.radioValue = input.value === "t"; +} )(); + + +var boolHook, + attrHandle = jQuery.expr.attrHandle; + +jQuery.fn.extend( { + attr: function( name, value ) { + return access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each( function() { + jQuery.removeAttr( this, name ); + } ); + } +} ); + +jQuery.extend( { + attr: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set attributes on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + // Attribute hooks are determined by the lowercase version + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + hooks = jQuery.attrHooks[ name.toLowerCase() ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); + } + + if ( value !== undefined ) { + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + } + + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + elem.setAttribute( name, value + "" ); + return value; + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? undefined : ret; + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !support.radioValue && value === "radio" && + nodeName( elem, "input" ) ) { + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + removeAttr: function( elem, value ) { + var name, + i = 0, + + // Attribute names can contain non-HTML whitespace characters + // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 + attrNames = value && value.match( rnothtmlwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( ( name = attrNames[ i++ ] ) ) { + elem.removeAttribute( name ); + } + } + } +} ); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + elem.setAttribute( name, name ); + } + return name; + } +}; + +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { + var getter = attrHandle[ name ] || jQuery.find.attr; + + attrHandle[ name ] = function( elem, name, isXML ) { + var ret, handle, + lowercaseName = name.toLowerCase(); + + if ( !isXML ) { + + // Avoid an infinite loop by temporarily removing this function from the getter + handle = attrHandle[ lowercaseName ]; + attrHandle[ lowercaseName ] = ret; + ret = getter( elem, name, isXML ) != null ? + lowercaseName : + null; + attrHandle[ lowercaseName ] = handle; + } + return ret; + }; +} ); + + + + +var rfocusable = /^(?:input|select|textarea|button)$/i, + rclickable = /^(?:a|area)$/i; + +jQuery.fn.extend( { + prop: function( name, value ) { + return access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + return this.each( function() { + delete this[ jQuery.propFix[ name ] || name ]; + } ); + } +} ); + +jQuery.extend( { + prop: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set properties on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + return ( elem[ name ] = value ); + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + return elem[ name ]; + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + + // Support: IE <=9 - 11 only + // elem.tabIndex doesn't always return the + // correct value when it hasn't been explicitly set + // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + // Use proper attribute retrieval(#12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); + + if ( tabindex ) { + return parseInt( tabindex, 10 ); + } + + if ( + rfocusable.test( elem.nodeName ) || + rclickable.test( elem.nodeName ) && + elem.href + ) { + return 0; + } + + return -1; + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + } +} ); + +// Support: IE <=11 only +// Accessing the selectedIndex property +// forces the browser to respect setting selected +// on the option +// The getter ensures a default option is selected +// when in an optgroup +// eslint rule "no-unused-expressions" is disabled for this code +// since it considers such accessions noop +if ( !support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent && parent.parentNode ) { + parent.parentNode.selectedIndex; + } + return null; + }, + set: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; + + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + } + }; +} + +jQuery.each( [ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +} ); + + + + + // Strip and collapse whitespace according to HTML spec + // https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace + function stripAndCollapse( value ) { + var tokens = value.match( rnothtmlwhite ) || []; + return tokens.join( " " ); + } + + +function getClass( elem ) { + return elem.getAttribute && elem.getAttribute( "class" ) || ""; +} + +jQuery.fn.extend( { + addClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( jQuery.isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + if ( typeof value === "string" && value ) { + classes = value.match( rnothtmlwhite ) || []; + + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( jQuery.isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + if ( !arguments.length ) { + return this.attr( "class", "" ); + } + + if ( typeof value === "string" && value ) { + classes = value.match( rnothtmlwhite ) || []; + + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) > -1 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value; + + if ( typeof stateVal === "boolean" && type === "string" ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + if ( jQuery.isFunction( value ) ) { + return this.each( function( i ) { + jQuery( this ).toggleClass( + value.call( this, i, getClass( this ), stateVal ), + stateVal + ); + } ); + } + + return this.each( function() { + var className, i, self, classNames; + + if ( type === "string" ) { + + // Toggle individual class names + i = 0; + self = jQuery( this ); + classNames = value.match( rnothtmlwhite ) || []; + + while ( ( className = classNames[ i++ ] ) ) { + + // Check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( value === undefined || type === "boolean" ) { + className = getClass( this ); + if ( className ) { + + // Store className if set + dataPriv.set( this, "__className__", className ); + } + + // If the element has a class name or if we're passed `false`, + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + if ( this.setAttribute ) { + this.setAttribute( "class", + className || value === false ? + "" : + dataPriv.get( this, "__className__" ) || "" + ); + } + } + } ); + }, + + hasClass: function( selector ) { + var className, elem, + i = 0; + + className = " " + selector + " "; + while ( ( elem = this[ i++ ] ) ) { + if ( elem.nodeType === 1 && + ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { + return true; + } + } + + return false; + } +} ); + + + + +var rreturn = /\r/g; + +jQuery.fn.extend( { + val: function( value ) { + var hooks, ret, isFunction, + elem = this[ 0 ]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || + jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && + "get" in hooks && + ( ret = hooks.get( elem, "value" ) ) !== undefined + ) { + return ret; + } + + ret = elem.value; + + // Handle most common string cases + if ( typeof ret === "string" ) { + return ret.replace( rreturn, "" ); + } + + // Handle cases where value is null/undef or number + return ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each( function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + + } else if ( typeof val === "number" ) { + val += ""; + + } else if ( Array.isArray( val ) ) { + val = jQuery.map( val, function( value ) { + return value == null ? "" : value + ""; + } ); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + } ); + } +} ); + +jQuery.extend( { + valHooks: { + option: { + get: function( elem ) { + + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : + + // Support: IE <=10 - 11 only + // option.text throws exceptions (#14686, #14858) + // Strip and collapse whitespace + // https://html.spec.whatwg.org/#strip-and-collapse-whitespace + stripAndCollapse( jQuery.text( elem ) ); + } + }, + select: { + get: function( elem ) { + var value, option, i, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one", + values = one ? null : [], + max = one ? index + 1 : options.length; + + if ( index < 0 ) { + i = max; + + } else { + i = one ? index : 0; + } + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Support: IE <=9 only + // IE8-9 doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + + // Don't return options that are disabled or in a disabled optgroup + !option.disabled && + ( !option.parentNode.disabled || + !nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + + /* eslint-disable no-cond-assign */ + + if ( option.selected = + jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 + ) { + optionSet = true; + } + + /* eslint-enable no-cond-assign */ + } + + // Force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + } +} ); + +// Radios and checkboxes getter/setter +jQuery.each( [ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( Array.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); + } + } + }; + if ( !support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + return elem.getAttribute( "value" ) === null ? "on" : elem.value; + }; + } +} ); + + + + +// Return jQuery for attributes-only inclusion + + +var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/; + +jQuery.extend( jQuery.event, { + + trigger: function( event, data, elem, onlyHandlers ) { + + var i, cur, tmp, bubbleType, ontype, handle, special, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "." ) > -1 ) { + + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split( "." ); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf( ":" ) < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join( "." ); + event.rnamespace = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === ( elem.ownerDocument || document ) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] && + dataPriv.get( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( ( !special._default || + special._default.apply( eventPath.pop(), data ) === false ) && + acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name as the event. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + elem[ type ](); + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + // Piggyback on a donor event to simulate a different one + // Used only for `focus(in | out)` events + simulate: function( type, elem, event ) { + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true + } + ); + + jQuery.event.trigger( e, null, elem ); + } + +} ); + +jQuery.fn.extend( { + + trigger: function( type, data ) { + return this.each( function() { + jQuery.event.trigger( type, data, this ); + } ); + }, + triggerHandler: function( type, data ) { + var elem = this[ 0 ]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +} ); + + +jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup contextmenu" ).split( " " ), + function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + return arguments.length > 0 ? + this.on( name, null, data, fn ) : + this.trigger( name ); + }; +} ); + +jQuery.fn.extend( { + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +} ); + + + + +support.focusin = "onfocusin" in window; + + +// Support: Firefox <=44 +// Firefox doesn't have focus(in | out) events +// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 +// +// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 +// focus(in | out) events fire after focus & blur events, +// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order +// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 +if ( !support.focusin ) { + jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + var doc = this.ownerDocument || this, + attaches = dataPriv.access( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this, + attaches = dataPriv.access( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + dataPriv.remove( doc, fix ); + + } else { + dataPriv.access( doc, fix, attaches ); + } + } + }; + } ); +} +var location = window.location; + +var nonce = jQuery.now(); + +var rquery = ( /\?/ ); + + + +// Cross-browser xml parsing +jQuery.parseXML = function( data ) { + var xml; + if ( !data || typeof data !== "string" ) { + return null; + } + + // Support: IE 9 - 11 only + // IE throws on parseFromString with invalid input. + try { + xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); + } catch ( e ) { + xml = undefined; + } + + if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; +}; + + +var + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, + rsubmittable = /^(?:input|select|textarea|keygen)/i; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( Array.isArray( obj ) ) { + + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + + // Item is non-scalar (array or object), encode its numeric index. + buildParams( + prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", + v, + traditional, + add + ); + } + } ); + + } else if ( !traditional && jQuery.type( obj ) === "object" ) { + + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + + // Serialize scalar item. + add( prefix, obj ); + } +} + +// Serialize an array of form elements or a set of +// key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, valueOrFunction ) { + + // If value is a function, invoke it and use its return value + var value = jQuery.isFunction( valueOrFunction ) ? + valueOrFunction() : + valueOrFunction; + + s[ s.length ] = encodeURIComponent( key ) + "=" + + encodeURIComponent( value == null ? "" : value ); + }; + + // If an array was passed in, assume that it is an array of form elements. + if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + } ); + + } else { + + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ); +}; + +jQuery.fn.extend( { + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map( function() { + + // Can add propHook for "elements" to filter or add form elements + var elements = jQuery.prop( this, "elements" ); + return elements ? jQuery.makeArray( elements ) : this; + } ) + .filter( function() { + var type = this.type; + + // Use .is( ":disabled" ) so that fieldset[disabled] works + return this.name && !jQuery( this ).is( ":disabled" ) && + rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && + ( this.checked || !rcheckableType.test( type ) ); + } ) + .map( function( i, elem ) { + var val = jQuery( this ).val(); + + if ( val == null ) { + return null; + } + + if ( Array.isArray( val ) ) { + return jQuery.map( val, function( val ) { + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ); + } + + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ).get(); + } +} ); + + +var + r20 = /%20/g, + rhash = /#.*$/, + rantiCache = /([?&])_=[^&]*/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, + + // #7653, #8125, #8152: local protocol detection + rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = "*/".concat( "*" ), + + // Anchor tag for parsing the document origin + originAnchor = document.createElement( "a" ); + originAnchor.href = location.href; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, + i = 0, + dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; + + if ( jQuery.isFunction( func ) ) { + + // For each dataType in the dataTypeExpression + while ( ( dataType = dataTypes[ i++ ] ) ) { + + // Prepend if requested + if ( dataType[ 0 ] === "+" ) { + dataType = dataType.slice( 1 ) || "*"; + ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); + + // Otherwise append + } else { + ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); + } + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { + + var inspected = {}, + seekingTransport = ( structure === transports ); + + function inspect( dataType ) { + var selected; + inspected[ dataType ] = true; + jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { + var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); + if ( typeof dataTypeOrTransport === "string" && + !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + + options.dataTypes.unshift( dataTypeOrTransport ); + inspect( dataTypeOrTransport ); + return false; + } else if ( seekingTransport ) { + return !( selected = dataTypeOrTransport ); + } + } ); + return selected; + } + + return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } + + return target; +} + +/* Handles responses to an ajax request: + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes; + + // Remove auto dataType and get content-type in the process + while ( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +/* Chain conversions given the request and the original response + * Also sets the responseXXX fields on the jqXHR instance + */ +function ajaxConvert( s, response, jqXHR, isSuccess ) { + var conv2, current, conv, tmp, prev, + converters = {}, + + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(); + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + current = dataTypes.shift(); + + // Convert to each sequential dataType + while ( current ) { + + if ( s.responseFields[ current ] ) { + jqXHR[ s.responseFields[ current ] ] = response; + } + + // Apply the dataFilter if provided + if ( !prev && isSuccess && s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + prev = current; + current = dataTypes.shift(); + + if ( current ) { + + // There's only work to do if current dataType is non-auto + if ( current === "*" ) { + + current = prev; + + // Convert response if prev dataType is non-auto and differs from current + } else if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split( " " ); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.unshift( tmp[ 1 ] ); + } + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s.throws ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { + state: "parsererror", + error: conv ? e : "No conversion from " + prev + " to " + current + }; + } + } + } + } + } + } + + return { state: "success", data: response }; +} + +jQuery.extend( { + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {}, + + ajaxSettings: { + url: location.href, + type: "GET", + isLocal: rlocalProtocol.test( location.protocol ), + global: true, + processData: true, + async: true, + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + "*": allTypes, + text: "text/plain", + html: "text/html", + xml: "application/xml, text/xml", + json: "application/json, text/javascript" + }, + + contents: { + xml: /\bxml\b/, + html: /\bhtml/, + json: /\bjson\b/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText", + json: "responseJSON" + }, + + // Data converters + // Keys separate source (or catchall "*") and destination types with a single space + converters: { + + // Convert anything to text + "* text": String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": JSON.parse, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + url: true, + context: true + } + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + return settings ? + + // Building a settings object + ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : + + // Extending ajaxSettings + ajaxExtend( jQuery.ajaxSettings, target ); + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var transport, + + // URL without anti-cache param + cacheURL, + + // Response headers + responseHeadersString, + responseHeaders, + + // timeout handle + timeoutTimer, + + // Url cleanup var + urlAnchor, + + // Request state (becomes false upon send and true upon completion) + completed, + + // To know if global events are to be dispatched + fireGlobals, + + // Loop variable + i, + + // uncached part of the url + uncached, + + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + + // Callbacks context + callbackContext = s.context || s, + + // Context for global events is callbackContext if it is a DOM node or jQuery collection + globalEventContext = s.context && + ( callbackContext.nodeType || callbackContext.jquery ) ? + jQuery( callbackContext ) : + jQuery.event, + + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks( "once memory" ), + + // Status-dependent callbacks + statusCode = s.statusCode || {}, + + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + + // Default abort message + strAbort = "canceled", + + // Fake xhr + jqXHR = { + readyState: 0, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( completed ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while ( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ]; + } + } + match = responseHeaders[ key.toLowerCase() ]; + } + return match == null ? null : match; + }, + + // Raw string + getAllResponseHeaders: function() { + return completed ? responseHeadersString : null; + }, + + // Caches the header + setRequestHeader: function( name, value ) { + if ( completed == null ) { + name = requestHeadersNames[ name.toLowerCase() ] = + requestHeadersNames[ name.toLowerCase() ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( completed == null ) { + s.mimeType = type; + } + return this; + }, + + // Status-dependent callbacks + statusCode: function( map ) { + var code; + if ( map ) { + if ( completed ) { + + // Execute the appropriate callbacks + jqXHR.always( map[ jqXHR.status ] ); + } else { + + // Lazy-add the new callbacks in a way that preserves old ones + for ( code in map ) { + statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; + } + } + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + var finalText = statusText || strAbort; + if ( transport ) { + transport.abort( finalText ); + } + done( 0, finalText ); + return this; + } + }; + + // Attach deferreds + deferred.promise( jqXHR ); + + // Add protocol if not provided (prefilters might expect it) + // Handle falsy url in the settings object (#10093: consistency with old signature) + // We also use the url parameter if available + s.url = ( ( url || s.url || location.href ) + "" ) + .replace( rprotocol, location.protocol + "//" ); + + // Alias method option to type as per ticket #12004 + s.type = options.method || options.type || s.method || s.type; + + // Extract dataTypes list + s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; + + // A cross-domain request is in order when the origin doesn't match the current origin. + if ( s.crossDomain == null ) { + urlAnchor = document.createElement( "a" ); + + // Support: IE <=8 - 11, Edge 12 - 13 + // IE throws exception on accessing the href property if url is malformed, + // e.g. http://example.com:80x/ + try { + urlAnchor.href = s.url; + + // Support: IE <=8 - 11 only + // Anchor's host property isn't correctly set when s.url is relative + urlAnchor.href = urlAnchor.href; + s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== + urlAnchor.protocol + "//" + urlAnchor.host; + } catch ( e ) { + + // If there is an error parsing the URL, assume it is crossDomain, + // it can be rejected by the transport if it is invalid + s.crossDomain = true; + } + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( completed ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) + fireGlobals = jQuery.event && s.global; + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Save the URL in case we're toying with the If-Modified-Since + // and/or If-None-Match header later on + // Remove hash to simplify url manipulation + cacheURL = s.url.replace( rhash, "" ); + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // Remember the hash so we can put it back + uncached = s.url.slice( cacheURL.length ); + + // If data is available, append data to url + if ( s.data ) { + cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; + + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Add or update anti-cache param if needed + if ( s.cache === false ) { + cacheURL = cacheURL.replace( rantiCache, "$1" ); + uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached; + } + + // Put hash and anti-cache on the URL that will be requested (gh-1732) + s.url = cacheURL + uncached; + + // Change '%20' to '+' if this is encoded form body content (gh-2658) + } else if ( s.data && s.processData && + ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { + s.data = s.data.replace( r20, "+" ); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + if ( jQuery.lastModified[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); + } + if ( jQuery.etag[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? + s.accepts[ s.dataTypes[ 0 ] ] + + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && + ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { + + // Abort if not done already and return + return jqXHR.abort(); + } + + // Aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + completeDeferred.add( s.complete ); + jqXHR.done( s.success ); + jqXHR.fail( s.error ); + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + + // If request was aborted inside ajaxSend, stop there + if ( completed ) { + return jqXHR; + } + + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = window.setTimeout( function() { + jqXHR.abort( "timeout" ); + }, s.timeout ); + } + + try { + completed = false; + transport.send( requestHeaders, done ); + } catch ( e ) { + + // Rethrow post-completion exceptions + if ( completed ) { + throw e; + } + + // Propagate others as results + done( -1, e ); + } + } + + // Callback for when everything is done + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Ignore repeat invocations + if ( completed ) { + return; + } + + completed = true; + + // Clear timeout if it exists + if ( timeoutTimer ) { + window.clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Determine if successful + isSuccess = status >= 200 && status < 300 || status === 304; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // Convert no matter what (that way responseXXX fields are always set) + response = ajaxConvert( s, response, jqXHR, isSuccess ); + + // If successful, handle type chaining + if ( isSuccess ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + modified = jqXHR.getResponseHeader( "Last-Modified" ); + if ( modified ) { + jQuery.lastModified[ cacheURL ] = modified; + } + modified = jqXHR.getResponseHeader( "etag" ); + if ( modified ) { + jQuery.etag[ cacheURL ] = modified; + } + } + + // if no content + if ( status === 204 || s.type === "HEAD" ) { + statusText = "nocontent"; + + // if not modified + } else if ( status === 304 ) { + statusText = "notmodified"; + + // If we have data, let's convert it + } else { + statusText = response.state; + success = response.data; + error = response.error; + isSuccess = !error; + } + } else { + + // Extract error from statusText and normalize for non-aborts + error = statusText; + if ( status || !statusText ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + } + + return jqXHR; + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + } +} ); + +jQuery.each( [ "get", "post" ], function( i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + + // Shift arguments if data argument was omitted + if ( jQuery.isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + // The url can be an options object (which then must have .url) + return jQuery.ajax( jQuery.extend( { + url: url, + type: method, + dataType: type, + data: data, + success: callback + }, jQuery.isPlainObject( url ) && url ) ); + }; +} ); + + +jQuery._evalUrl = function( url ) { + return jQuery.ajax( { + url: url, + + // Make this explicit, since user can override this through ajaxSetup (#11264) + type: "GET", + dataType: "script", + cache: true, + async: false, + global: false, + "throws": true + } ); +}; + + +jQuery.fn.extend( { + wrapAll: function( html ) { + var wrap; + + if ( this[ 0 ] ) { + if ( jQuery.isFunction( html ) ) { + html = html.call( this[ 0 ] ); + } + + // The elements to wrap the target around + wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); + + if ( this[ 0 ].parentNode ) { + wrap.insertBefore( this[ 0 ] ); + } + + wrap.map( function() { + var elem = this; + + while ( elem.firstElementChild ) { + elem = elem.firstElementChild; + } + + return elem; + } ).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each( function( i ) { + jQuery( this ).wrapInner( html.call( this, i ) ); + } ); + } + + return this.each( function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + } ); + }, + + wrap: function( html ) { + var isFunction = jQuery.isFunction( html ); + + return this.each( function( i ) { + jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html ); + } ); + }, + + unwrap: function( selector ) { + this.parent( selector ).not( "body" ).each( function() { + jQuery( this ).replaceWith( this.childNodes ); + } ); + return this; + } +} ); + + +jQuery.expr.pseudos.hidden = function( elem ) { + return !jQuery.expr.pseudos.visible( elem ); +}; +jQuery.expr.pseudos.visible = function( elem ) { + return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); +}; + + + + +jQuery.ajaxSettings.xhr = function() { + try { + return new window.XMLHttpRequest(); + } catch ( e ) {} +}; + +var xhrSuccessStatus = { + + // File protocol always yields status code 0, assume 200 + 0: 200, + + // Support: IE <=9 only + // #1450: sometimes IE returns 1223 when it should be 204 + 1223: 204 + }, + xhrSupported = jQuery.ajaxSettings.xhr(); + +support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); +support.ajax = xhrSupported = !!xhrSupported; + +jQuery.ajaxTransport( function( options ) { + var callback, errorCallback; + + // Cross domain only allowed if supported through XMLHttpRequest + if ( support.cors || xhrSupported && !options.crossDomain ) { + return { + send: function( headers, complete ) { + var i, + xhr = options.xhr(); + + xhr.open( + options.type, + options.url, + options.async, + options.username, + options.password + ); + + // Apply custom fields if provided + if ( options.xhrFields ) { + for ( i in options.xhrFields ) { + xhr[ i ] = options.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( options.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( options.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Set headers + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + + // Callback + callback = function( type ) { + return function() { + if ( callback ) { + callback = errorCallback = xhr.onload = + xhr.onerror = xhr.onabort = xhr.onreadystatechange = null; + + if ( type === "abort" ) { + xhr.abort(); + } else if ( type === "error" ) { + + // Support: IE <=9 only + // On a manual native abort, IE9 throws + // errors on any property access that is not readyState + if ( typeof xhr.status !== "number" ) { + complete( 0, "error" ); + } else { + complete( + + // File: protocol always yields status 0; see #8605, #14207 + xhr.status, + xhr.statusText + ); + } + } else { + complete( + xhrSuccessStatus[ xhr.status ] || xhr.status, + xhr.statusText, + + // Support: IE <=9 only + // IE9 has no XHR2 but throws on binary (trac-11426) + // For XHR2 non-text, let the caller handle it (gh-2498) + ( xhr.responseType || "text" ) !== "text" || + typeof xhr.responseText !== "string" ? + { binary: xhr.response } : + { text: xhr.responseText }, + xhr.getAllResponseHeaders() + ); + } + } + }; + }; + + // Listen to events + xhr.onload = callback(); + errorCallback = xhr.onerror = callback( "error" ); + + // Support: IE 9 only + // Use onreadystatechange to replace onabort + // to handle uncaught aborts + if ( xhr.onabort !== undefined ) { + xhr.onabort = errorCallback; + } else { + xhr.onreadystatechange = function() { + + // Check readyState before timeout as it changes + if ( xhr.readyState === 4 ) { + + // Allow onerror to be called first, + // but that will not handle a native abort + // Also, save errorCallback to a variable + // as xhr.onerror cannot be accessed + window.setTimeout( function() { + if ( callback ) { + errorCallback(); + } + } ); + } + }; + } + + // Create the abort callback + callback = callback( "abort" ); + + try { + + // Do send the request (this may raise an exception) + xhr.send( options.hasContent && options.data || null ); + } catch ( e ) { + + // #14683: Only rethrow if this hasn't been notified as an error yet + if ( callback ) { + throw e; + } + } + }, + + abort: function() { + if ( callback ) { + callback(); + } + } + }; + } +} ); + + + + +// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) +jQuery.ajaxPrefilter( function( s ) { + if ( s.crossDomain ) { + s.contents.script = false; + } +} ); + +// Install script dataType +jQuery.ajaxSetup( { + accepts: { + script: "text/javascript, application/javascript, " + + "application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /\b(?:java|ecma)script\b/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +} ); + +// Handle cache's special case and crossDomain +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + } +} ); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function( s ) { + + // This transport only deals with cross domain requests + if ( s.crossDomain ) { + var script, callback; + return { + send: function( _, complete ) { + script = jQuery( " + * + * + * + * ``` + * + * @param {DOMElement} element DOM element which is the root of angular application. + * @param {Array=} modules an array of modules to load into the application. + * Each item in the array should be the name of a predefined module or a (DI annotated) + * function that will be invoked by the injector as a `config` block. + * See: {@link angular.module modules} + * @param {Object=} config an object for defining configuration options for the application. The + * following keys are supported: + * + * * `strictDi` - disable automatic function annotation for the application. This is meant to + * assist in finding bugs which break minified code. Defaults to `false`. + * + * @returns {auto.$injector} Returns the newly created injector for this app. + */ +function bootstrap(element, modules, config) { + if (!isObject(config)) config = {}; + var defaultConfig = { + strictDi: false + }; + config = extend(defaultConfig, config); + var doBootstrap = function() { + element = jqLite(element); + + if (element.injector()) { + var tag = (element[0] === window.document) ? 'document' : startingTag(element); + // Encode angle brackets to prevent input from being sanitized to empty string #8683. + throw ngMinErr( + 'btstrpd', + 'App already bootstrapped with this element \'{0}\'', + tag.replace(//,'>')); + } + + modules = modules || []; + modules.unshift(['$provide', function($provide) { + $provide.value('$rootElement', element); + }]); + + if (config.debugInfoEnabled) { + // Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`. + modules.push(['$compileProvider', function($compileProvider) { + $compileProvider.debugInfoEnabled(true); + }]); + } + + modules.unshift('ng'); + var injector = createInjector(modules, config.strictDi); + injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector', + function bootstrapApply(scope, element, compile, injector) { + scope.$apply(function() { + element.data('$injector', injector); + compile(element)(scope); + }); + }] + ); + return injector; + }; + + var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/; + var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/; + + if (window && NG_ENABLE_DEBUG_INFO.test(window.name)) { + config.debugInfoEnabled = true; + window.name = window.name.replace(NG_ENABLE_DEBUG_INFO, ''); + } + + if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) { + return doBootstrap(); + } + + window.name = window.name.replace(NG_DEFER_BOOTSTRAP, ''); + angular.resumeBootstrap = function(extraModules) { + forEach(extraModules, function(module) { + modules.push(module); + }); + return doBootstrap(); + }; + + if (isFunction(angular.resumeDeferredBootstrap)) { + angular.resumeDeferredBootstrap(); + } +} + +/** + * @ngdoc function + * @name angular.reloadWithDebugInfo + * @module ng + * @description + * Use this function to reload the current application with debug information turned on. + * This takes precedence over a call to `$compileProvider.debugInfoEnabled(false)`. + * + * See {@link ng.$compileProvider#debugInfoEnabled} for more. + */ +function reloadWithDebugInfo() { + window.name = 'NG_ENABLE_DEBUG_INFO!' + window.name; + window.location.reload(); +} + +/** + * @name angular.getTestability + * @module ng + * @description + * Get the testability service for the instance of Angular on the given + * element. + * @param {DOMElement} element DOM element which is the root of angular application. + */ +function getTestability(rootElement) { + var injector = angular.element(rootElement).injector(); + if (!injector) { + throw ngMinErr('test', + 'no injector found for element argument to getTestability'); + } + return injector.get('$$testability'); +} + +var SNAKE_CASE_REGEXP = /[A-Z]/g; +function snake_case(name, separator) { + separator = separator || '_'; + return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) { + return (pos ? separator : '') + letter.toLowerCase(); + }); +} + +var bindJQueryFired = false; +function bindJQuery() { + var originalCleanData; + + if (bindJQueryFired) { + return; + } + + // bind to jQuery if present; + var jqName = jq(); + jQuery = isUndefined(jqName) ? window.jQuery : // use jQuery (if present) + !jqName ? undefined : // use jqLite + window[jqName]; // use jQuery specified by `ngJq` + + // Use jQuery if it exists with proper functionality, otherwise default to us. + // Angular 1.2+ requires jQuery 1.7+ for on()/off() support. + // Angular 1.3+ technically requires at least jQuery 2.1+ but it may work with older + // versions. It will not work for sure with jQuery <1.7, though. + if (jQuery && jQuery.fn.on) { + jqLite = jQuery; + extend(jQuery.fn, { + scope: JQLitePrototype.scope, + isolateScope: JQLitePrototype.isolateScope, + controller: /** @type {?} */ (JQLitePrototype).controller, + injector: JQLitePrototype.injector, + inheritedData: JQLitePrototype.inheritedData + }); + + // All nodes removed from the DOM via various jQuery APIs like .remove() + // are passed through jQuery.cleanData. Monkey-patch this method to fire + // the $destroy event on all removed nodes. + originalCleanData = jQuery.cleanData; + jQuery.cleanData = function(elems) { + var events; + for (var i = 0, elem; (elem = elems[i]) != null; i++) { + events = jQuery._data(elem, 'events'); + if (events && events.$destroy) { + jQuery(elem).triggerHandler('$destroy'); + } + } + originalCleanData(elems); + }; + } else { + jqLite = JQLite; + } + + angular.element = jqLite; + + // Prevent double-proxying. + bindJQueryFired = true; +} + +/** + * throw error if the argument is falsy. + */ +function assertArg(arg, name, reason) { + if (!arg) { + throw ngMinErr('areq', 'Argument \'{0}\' is {1}', (name || '?'), (reason || 'required')); + } + return arg; +} + +function assertArgFn(arg, name, acceptArrayAnnotation) { + if (acceptArrayAnnotation && isArray(arg)) { + arg = arg[arg.length - 1]; + } + + assertArg(isFunction(arg), name, 'not a function, got ' + + (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg)); + return arg; +} + +/** + * throw error if the name given is hasOwnProperty + * @param {String} name the name to test + * @param {String} context the context in which the name is used, such as module or directive + */ +function assertNotHasOwnProperty(name, context) { + if (name === 'hasOwnProperty') { + throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context); + } +} + +/** + * Return the value accessible from the object by path. Any undefined traversals are ignored + * @param {Object} obj starting object + * @param {String} path path to traverse + * @param {boolean} [bindFnToScope=true] + * @returns {Object} value as accessible by path + */ +//TODO(misko): this function needs to be removed +function getter(obj, path, bindFnToScope) { + if (!path) return obj; + var keys = path.split('.'); + var key; + var lastInstance = obj; + var len = keys.length; + + for (var i = 0; i < len; i++) { + key = keys[i]; + if (obj) { + obj = (lastInstance = obj)[key]; + } + } + if (!bindFnToScope && isFunction(obj)) { + return bind(lastInstance, obj); + } + return obj; +} + +/** + * Return the DOM siblings between the first and last node in the given array. + * @param {Array} array like object + * @returns {Array} the inputted object or a jqLite collection containing the nodes + */ +function getBlockNodes(nodes) { + // TODO(perf): update `nodes` instead of creating a new object? + var node = nodes[0]; + var endNode = nodes[nodes.length - 1]; + var blockNodes; + + for (var i = 1; node !== endNode && (node = node.nextSibling); i++) { + if (blockNodes || nodes[i] !== node) { + if (!blockNodes) { + blockNodes = jqLite(slice.call(nodes, 0, i)); + } + blockNodes.push(node); + } + } + + return blockNodes || nodes; +} + + +/** + * Creates a new object without a prototype. This object is useful for lookup without having to + * guard against prototypically inherited properties via hasOwnProperty. + * + * Related micro-benchmarks: + * - http://jsperf.com/object-create2 + * - http://jsperf.com/proto-map-lookup/2 + * - http://jsperf.com/for-in-vs-object-keys2 + * + * @returns {Object} + */ +function createMap() { + return Object.create(null); +} + +function stringify(value) { + if (value == null) { // null || undefined + return ''; + } + switch (typeof value) { + case 'string': + break; + case 'number': + value = '' + value; + break; + default: + if (hasCustomToString(value) && !isArray(value) && !isDate(value)) { + value = value.toString(); + } else { + value = toJson(value); + } + } + + return value; +} + +var NODE_TYPE_ELEMENT = 1; +var NODE_TYPE_ATTRIBUTE = 2; +var NODE_TYPE_TEXT = 3; +var NODE_TYPE_COMMENT = 8; +var NODE_TYPE_DOCUMENT = 9; +var NODE_TYPE_DOCUMENT_FRAGMENT = 11; + +/** + * @ngdoc type + * @name angular.Module + * @module ng + * @description + * + * Interface for configuring angular {@link angular.module modules}. + */ + +function setupModuleLoader(window) { + + var $injectorMinErr = minErr('$injector'); + var ngMinErr = minErr('ng'); + + function ensure(obj, name, factory) { + return obj[name] || (obj[name] = factory()); + } + + var angular = ensure(window, 'angular', Object); + + // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap + angular.$$minErr = angular.$$minErr || minErr; + + return ensure(angular, 'module', function() { + /** @type {Object.} */ + var modules = {}; + + /** + * @ngdoc function + * @name angular.module + * @module ng + * @description + * + * The `angular.module` is a global place for creating, registering and retrieving Angular + * modules. + * All modules (angular core or 3rd party) that should be available to an application must be + * registered using this mechanism. + * + * Passing one argument retrieves an existing {@link angular.Module}, + * whereas passing more than one argument creates a new {@link angular.Module} + * + * + * # Module + * + * A module is a collection of services, directives, controllers, filters, and configuration information. + * `angular.module` is used to configure the {@link auto.$injector $injector}. + * + * ```js + * // Create a new module + * var myModule = angular.module('myModule', []); + * + * // register a new service + * myModule.value('appName', 'MyCoolApp'); + * + * // configure existing services inside initialization blocks. + * myModule.config(['$locationProvider', function($locationProvider) { + * // Configure existing providers + * $locationProvider.hashPrefix('!'); + * }]); + * ``` + * + * Then you can create an injector and load your modules like this: + * + * ```js + * var injector = angular.injector(['ng', 'myModule']) + * ``` + * + * However it's more likely that you'll just use + * {@link ng.directive:ngApp ngApp} or + * {@link angular.bootstrap} to simplify this process for you. + * + * @param {!string} name The name of the module to create or retrieve. + * @param {!Array.=} requires If specified then new module is being created. If + * unspecified then the module is being retrieved for further configuration. + * @param {Function=} configFn Optional configuration function for the module. Same as + * {@link angular.Module#config Module#config()}. + * @returns {angular.Module} new module with the {@link angular.Module} api. + */ + return function module(name, requires, configFn) { + + var info = {}; + + var assertNotHasOwnProperty = function(name, context) { + if (name === 'hasOwnProperty') { + throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context); + } + }; + + assertNotHasOwnProperty(name, 'module'); + if (requires && modules.hasOwnProperty(name)) { + modules[name] = null; + } + return ensure(modules, name, function() { + if (!requires) { + throw $injectorMinErr('nomod', 'Module \'{0}\' is not available! You either misspelled ' + + 'the module name or forgot to load it. If registering a module ensure that you ' + + 'specify the dependencies as the second argument.', name); + } + + /** @type {!Array.>} */ + var invokeQueue = []; + + /** @type {!Array.} */ + var configBlocks = []; + + /** @type {!Array.} */ + var runBlocks = []; + + var config = invokeLater('$injector', 'invoke', 'push', configBlocks); + + /** @type {angular.Module} */ + var moduleInstance = { + // Private state + _invokeQueue: invokeQueue, + _configBlocks: configBlocks, + _runBlocks: runBlocks, + + /** + * @ngdoc method + * @name angular.Module#info + * @module ng + * + * @param {Object=} info Information about the module + * @returns {Object|Module} The current info object for this module if called as a getter, + * or `this` if called as a setter. + * + * @description + * Read and write custom information about this module. + * For example you could put the version of the module in here. + * + * ```js + * angular.module('myModule', []).info({ version: '1.0.0' }); + * ``` + * + * The version could then be read back out by accessing the module elsewhere: + * + * ``` + * var version = angular.module('myModule').info().version; + * ``` + * + * You can also retrieve this information during runtime via the + * {@link $injector#modules `$injector.modules`} property: + * + * ```js + * var version = $injector.modules['myModule'].info().version; + * ``` + */ + info: function(value) { + if (isDefined(value)) { + if (!isObject(value)) throw ngMinErr('aobj', 'Argument \'{0}\' must be an object', 'value'); + info = value; + return this; + } + return info; + }, + + /** + * @ngdoc property + * @name angular.Module#requires + * @module ng + * + * @description + * Holds the list of modules which the injector will load before the current module is + * loaded. + */ + requires: requires, + + /** + * @ngdoc property + * @name angular.Module#name + * @module ng + * + * @description + * Name of the module. + */ + name: name, + + + /** + * @ngdoc method + * @name angular.Module#provider + * @module ng + * @param {string} name service name + * @param {Function} providerType Construction function for creating new instance of the + * service. + * @description + * See {@link auto.$provide#provider $provide.provider()}. + */ + provider: invokeLaterAndSetModuleName('$provide', 'provider'), + + /** + * @ngdoc method + * @name angular.Module#factory + * @module ng + * @param {string} name service name + * @param {Function} providerFunction Function for creating new instance of the service. + * @description + * See {@link auto.$provide#factory $provide.factory()}. + */ + factory: invokeLaterAndSetModuleName('$provide', 'factory'), + + /** + * @ngdoc method + * @name angular.Module#service + * @module ng + * @param {string} name service name + * @param {Function} constructor A constructor function that will be instantiated. + * @description + * See {@link auto.$provide#service $provide.service()}. + */ + service: invokeLaterAndSetModuleName('$provide', 'service'), + + /** + * @ngdoc method + * @name angular.Module#value + * @module ng + * @param {string} name service name + * @param {*} object Service instance object. + * @description + * See {@link auto.$provide#value $provide.value()}. + */ + value: invokeLater('$provide', 'value'), + + /** + * @ngdoc method + * @name angular.Module#constant + * @module ng + * @param {string} name constant name + * @param {*} object Constant value. + * @description + * Because the constants are fixed, they get applied before other provide methods. + * See {@link auto.$provide#constant $provide.constant()}. + */ + constant: invokeLater('$provide', 'constant', 'unshift'), + + /** + * @ngdoc method + * @name angular.Module#decorator + * @module ng + * @param {string} name The name of the service to decorate. + * @param {Function} decorFn This function will be invoked when the service needs to be + * instantiated and should return the decorated service instance. + * @description + * See {@link auto.$provide#decorator $provide.decorator()}. + */ + decorator: invokeLaterAndSetModuleName('$provide', 'decorator', configBlocks), + + /** + * @ngdoc method + * @name angular.Module#animation + * @module ng + * @param {string} name animation name + * @param {Function} animationFactory Factory function for creating new instance of an + * animation. + * @description + * + * **NOTE**: animations take effect only if the **ngAnimate** module is loaded. + * + * + * Defines an animation hook that can be later used with + * {@link $animate $animate} service and directives that use this service. + * + * ```js + * module.animation('.animation-name', function($inject1, $inject2) { + * return { + * eventName : function(element, done) { + * //code to run the animation + * //once complete, then run done() + * return function cancellationFunction(element) { + * //code to cancel the animation + * } + * } + * } + * }) + * ``` + * + * See {@link ng.$animateProvider#register $animateProvider.register()} and + * {@link ngAnimate ngAnimate module} for more information. + */ + animation: invokeLaterAndSetModuleName('$animateProvider', 'register'), + + /** + * @ngdoc method + * @name angular.Module#filter + * @module ng + * @param {string} name Filter name - this must be a valid angular expression identifier + * @param {Function} filterFactory Factory function for creating new instance of filter. + * @description + * See {@link ng.$filterProvider#register $filterProvider.register()}. + * + *

+ * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`. + * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace + * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores + * (`myapp_subsection_filterx`). + *
+ */ + filter: invokeLaterAndSetModuleName('$filterProvider', 'register'), + + /** + * @ngdoc method + * @name angular.Module#controller + * @module ng + * @param {string|Object} name Controller name, or an object map of controllers where the + * keys are the names and the values are the constructors. + * @param {Function} constructor Controller constructor function. + * @description + * See {@link ng.$controllerProvider#register $controllerProvider.register()}. + */ + controller: invokeLaterAndSetModuleName('$controllerProvider', 'register'), + + /** + * @ngdoc method + * @name angular.Module#directive + * @module ng + * @param {string|Object} name Directive name, or an object map of directives where the + * keys are the names and the values are the factories. + * @param {Function} directiveFactory Factory function for creating new instance of + * directives. + * @description + * See {@link ng.$compileProvider#directive $compileProvider.directive()}. + */ + directive: invokeLaterAndSetModuleName('$compileProvider', 'directive'), + + /** + * @ngdoc method + * @name angular.Module#component + * @module ng + * @param {string} name Name of the component in camel-case (i.e. myComp which will match as my-comp) + * @param {Object} options Component definition object (a simplified + * {@link ng.$compile#directive-definition-object directive definition object}) + * + * @description + * See {@link ng.$compileProvider#component $compileProvider.component()}. + */ + component: invokeLaterAndSetModuleName('$compileProvider', 'component'), + + /** + * @ngdoc method + * @name angular.Module#config + * @module ng + * @param {Function} configFn Execute this function on module load. Useful for service + * configuration. + * @description + * Use this method to register work which needs to be performed on module loading. + * For more about how to configure services, see + * {@link providers#provider-recipe Provider Recipe}. + */ + config: config, + + /** + * @ngdoc method + * @name angular.Module#run + * @module ng + * @param {Function} initializationFn Execute this function after injector creation. + * Useful for application initialization. + * @description + * Use this method to register work which should be performed when the injector is done + * loading all modules. + */ + run: function(block) { + runBlocks.push(block); + return this; + } + }; + + if (configFn) { + config(configFn); + } + + return moduleInstance; + + /** + * @param {string} provider + * @param {string} method + * @param {String=} insertMethod + * @returns {angular.Module} + */ + function invokeLater(provider, method, insertMethod, queue) { + if (!queue) queue = invokeQueue; + return function() { + queue[insertMethod || 'push']([provider, method, arguments]); + return moduleInstance; + }; + } + + /** + * @param {string} provider + * @param {string} method + * @returns {angular.Module} + */ + function invokeLaterAndSetModuleName(provider, method, queue) { + if (!queue) queue = invokeQueue; + return function(recipeName, factoryFunction) { + if (factoryFunction && isFunction(factoryFunction)) factoryFunction.$$moduleName = name; + queue.push([provider, method, arguments]); + return moduleInstance; + }; + } + }); + }; + }); + +} + +/* global shallowCopy: true */ + +/** + * Creates a shallow copy of an object, an array or a primitive. + * + * Assumes that there are no proto properties for objects. + */ +function shallowCopy(src, dst) { + if (isArray(src)) { + dst = dst || []; + + for (var i = 0, ii = src.length; i < ii; i++) { + dst[i] = src[i]; + } + } else if (isObject(src)) { + dst = dst || {}; + + for (var key in src) { + if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) { + dst[key] = src[key]; + } + } + } + + return dst || src; +} + +/* exported toDebugString */ + +function serializeObject(obj, maxDepth) { + var seen = []; + + // There is no direct way to stringify object until reaching a specific depth + // and a very deep object can cause a performance issue, so we copy the object + // based on this specific depth and then stringify it. + if (isValidObjectMaxDepth(maxDepth)) { + // This file is also included in `angular-loader`, so `copy()` might not always be available in + // the closure. Therefore, it is lazily retrieved as `angular.copy()` when needed. + obj = angular.copy(obj, null, maxDepth); + } + return JSON.stringify(obj, function(key, val) { + val = toJsonReplacer(key, val); + if (isObject(val)) { + + if (seen.indexOf(val) >= 0) return '...'; + + seen.push(val); + } + return val; + }); +} + +function toDebugString(obj, maxDepth) { + if (typeof obj === 'function') { + return obj.toString().replace(/ \{[\s\S]*$/, ''); + } else if (isUndefined(obj)) { + return 'undefined'; + } else if (typeof obj !== 'string') { + return serializeObject(obj, maxDepth); + } + return obj; +} + +/* global angularModule: true, + version: true, + + $CompileProvider, + + htmlAnchorDirective, + inputDirective, + inputDirective, + formDirective, + scriptDirective, + selectDirective, + optionDirective, + ngBindDirective, + ngBindHtmlDirective, + ngBindTemplateDirective, + ngClassDirective, + ngClassEvenDirective, + ngClassOddDirective, + ngCloakDirective, + ngControllerDirective, + ngFormDirective, + ngHideDirective, + ngIfDirective, + ngIncludeDirective, + ngIncludeFillContentDirective, + ngInitDirective, + ngNonBindableDirective, + ngPluralizeDirective, + ngRepeatDirective, + ngShowDirective, + ngStyleDirective, + ngSwitchDirective, + ngSwitchWhenDirective, + ngSwitchDefaultDirective, + ngOptionsDirective, + ngTranscludeDirective, + ngModelDirective, + ngListDirective, + ngChangeDirective, + patternDirective, + patternDirective, + requiredDirective, + requiredDirective, + minlengthDirective, + minlengthDirective, + maxlengthDirective, + maxlengthDirective, + ngValueDirective, + ngModelOptionsDirective, + ngAttributeAliasDirectives, + ngEventDirectives, + + $AnchorScrollProvider, + $AnimateProvider, + $CoreAnimateCssProvider, + $$CoreAnimateJsProvider, + $$CoreAnimateQueueProvider, + $$AnimateRunnerFactoryProvider, + $$AnimateAsyncRunFactoryProvider, + $BrowserProvider, + $CacheFactoryProvider, + $ControllerProvider, + $DateProvider, + $DocumentProvider, + $$IsDocumentHiddenProvider, + $ExceptionHandlerProvider, + $FilterProvider, + $$ForceReflowProvider, + $InterpolateProvider, + $IntervalProvider, + $HttpProvider, + $HttpParamSerializerProvider, + $HttpParamSerializerJQLikeProvider, + $HttpBackendProvider, + $xhrFactoryProvider, + $jsonpCallbacksProvider, + $LocationProvider, + $LogProvider, + $$MapProvider, + $ParseProvider, + $RootScopeProvider, + $QProvider, + $$QProvider, + $$SanitizeUriProvider, + $SceProvider, + $SceDelegateProvider, + $SnifferProvider, + $TemplateCacheProvider, + $TemplateRequestProvider, + $$TestabilityProvider, + $TimeoutProvider, + $$RAFProvider, + $WindowProvider, + $$jqLiteProvider, + $$CookieReaderProvider +*/ + + +/** + * @ngdoc object + * @name angular.version + * @module ng + * @description + * An object that contains information about the current AngularJS version. + * + * This object has the following properties: + * + * - `full` – `{string}` – Full version string, such as "0.9.18". + * - `major` – `{number}` – Major version number, such as "0". + * - `minor` – `{number}` – Minor version number, such as "9". + * - `dot` – `{number}` – Dot version number, such as "18". + * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat". + */ +var version = { + // These placeholder strings will be replaced by grunt's `build` task. + // They need to be double- or single-quoted. + full: '1.6.6', + major: 1, + minor: 6, + dot: 6, + codeName: 'interdimensional-cable' +}; + + +function publishExternalAPI(angular) { + extend(angular, { + 'errorHandlingConfig': errorHandlingConfig, + 'bootstrap': bootstrap, + 'copy': copy, + 'extend': extend, + 'merge': merge, + 'equals': equals, + 'element': jqLite, + 'forEach': forEach, + 'injector': createInjector, + 'noop': noop, + 'bind': bind, + 'toJson': toJson, + 'fromJson': fromJson, + 'identity': identity, + 'isUndefined': isUndefined, + 'isDefined': isDefined, + 'isString': isString, + 'isFunction': isFunction, + 'isObject': isObject, + 'isNumber': isNumber, + 'isElement': isElement, + 'isArray': isArray, + 'version': version, + 'isDate': isDate, + 'lowercase': lowercase, + 'uppercase': uppercase, + 'callbacks': {$$counter: 0}, + 'getTestability': getTestability, + 'reloadWithDebugInfo': reloadWithDebugInfo, + '$$minErr': minErr, + '$$csp': csp, + '$$encodeUriSegment': encodeUriSegment, + '$$encodeUriQuery': encodeUriQuery, + '$$stringify': stringify + }); + + angularModule = setupModuleLoader(window); + + angularModule('ng', ['ngLocale'], ['$provide', + function ngModule($provide) { + // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it. + $provide.provider({ + $$sanitizeUri: $$SanitizeUriProvider + }); + $provide.provider('$compile', $CompileProvider). + directive({ + a: htmlAnchorDirective, + input: inputDirective, + textarea: inputDirective, + form: formDirective, + script: scriptDirective, + select: selectDirective, + option: optionDirective, + ngBind: ngBindDirective, + ngBindHtml: ngBindHtmlDirective, + ngBindTemplate: ngBindTemplateDirective, + ngClass: ngClassDirective, + ngClassEven: ngClassEvenDirective, + ngClassOdd: ngClassOddDirective, + ngCloak: ngCloakDirective, + ngController: ngControllerDirective, + ngForm: ngFormDirective, + ngHide: ngHideDirective, + ngIf: ngIfDirective, + ngInclude: ngIncludeDirective, + ngInit: ngInitDirective, + ngNonBindable: ngNonBindableDirective, + ngPluralize: ngPluralizeDirective, + ngRepeat: ngRepeatDirective, + ngShow: ngShowDirective, + ngStyle: ngStyleDirective, + ngSwitch: ngSwitchDirective, + ngSwitchWhen: ngSwitchWhenDirective, + ngSwitchDefault: ngSwitchDefaultDirective, + ngOptions: ngOptionsDirective, + ngTransclude: ngTranscludeDirective, + ngModel: ngModelDirective, + ngList: ngListDirective, + ngChange: ngChangeDirective, + pattern: patternDirective, + ngPattern: patternDirective, + required: requiredDirective, + ngRequired: requiredDirective, + minlength: minlengthDirective, + ngMinlength: minlengthDirective, + maxlength: maxlengthDirective, + ngMaxlength: maxlengthDirective, + ngValue: ngValueDirective, + ngModelOptions: ngModelOptionsDirective + }). + directive({ + ngInclude: ngIncludeFillContentDirective + }). + directive(ngAttributeAliasDirectives). + directive(ngEventDirectives); + $provide.provider({ + $anchorScroll: $AnchorScrollProvider, + $animate: $AnimateProvider, + $animateCss: $CoreAnimateCssProvider, + $$animateJs: $$CoreAnimateJsProvider, + $$animateQueue: $$CoreAnimateQueueProvider, + $$AnimateRunner: $$AnimateRunnerFactoryProvider, + $$animateAsyncRun: $$AnimateAsyncRunFactoryProvider, + $browser: $BrowserProvider, + $cacheFactory: $CacheFactoryProvider, + $controller: $ControllerProvider, + $document: $DocumentProvider, + $$isDocumentHidden: $$IsDocumentHiddenProvider, + $exceptionHandler: $ExceptionHandlerProvider, + $filter: $FilterProvider, + $$forceReflow: $$ForceReflowProvider, + $interpolate: $InterpolateProvider, + $interval: $IntervalProvider, + $http: $HttpProvider, + $httpParamSerializer: $HttpParamSerializerProvider, + $httpParamSerializerJQLike: $HttpParamSerializerJQLikeProvider, + $httpBackend: $HttpBackendProvider, + $xhrFactory: $xhrFactoryProvider, + $jsonpCallbacks: $jsonpCallbacksProvider, + $location: $LocationProvider, + $log: $LogProvider, + $parse: $ParseProvider, + $rootScope: $RootScopeProvider, + $q: $QProvider, + $$q: $$QProvider, + $sce: $SceProvider, + $sceDelegate: $SceDelegateProvider, + $sniffer: $SnifferProvider, + $templateCache: $TemplateCacheProvider, + $templateRequest: $TemplateRequestProvider, + $$testability: $$TestabilityProvider, + $timeout: $TimeoutProvider, + $window: $WindowProvider, + $$rAF: $$RAFProvider, + $$jqLite: $$jqLiteProvider, + $$Map: $$MapProvider, + $$cookieReader: $$CookieReaderProvider + }); + } + ]) + .info({ angularVersion: '1.6.6' }); +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Any commits to this file should be reviewed with security in mind. * + * Changes to this file can potentially create security vulnerabilities. * + * An approval from 2 Core members with history of modifying * + * this file is required. * + * * + * Does the change somehow allow for arbitrary javascript to be executed? * + * Or allows for someone to change the prototype of built-in objects? * + * Or gives undesired access to variables likes document or window? * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* global + JQLitePrototype: true, + BOOLEAN_ATTR: true, + ALIASED_ATTR: true +*/ + +////////////////////////////////// +//JQLite +////////////////////////////////// + +/** + * @ngdoc function + * @name angular.element + * @module ng + * @kind function + * + * @description + * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element. + * + * If jQuery is available, `angular.element` is an alias for the + * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element` + * delegates to Angular's built-in subset of jQuery, called "jQuery lite" or **jqLite**. + * + * jqLite is a tiny, API-compatible subset of jQuery that allows + * Angular to manipulate the DOM in a cross-browser compatible way. jqLite implements only the most + * commonly needed functionality with the goal of having a very small footprint. + * + * To use `jQuery`, simply ensure it is loaded before the `angular.js` file. You can also use the + * {@link ngJq `ngJq`} directive to specify that jqlite should be used over jQuery, or to use a + * specific version of jQuery if multiple versions exist on the page. + * + *
**Note:** All element references in Angular are always wrapped with jQuery or + * jqLite (such as the element argument in a directive's compile / link function). They are never raw DOM references.
+ * + *
**Note:** Keep in mind that this function will not find elements + * by tag name / CSS selector. For lookups by tag name, try instead `angular.element(document).find(...)` + * or `$document.find()`, or use the standard DOM APIs, e.g. `document.querySelectorAll()`.
+ * + * ## Angular's jqLite + * jqLite provides only the following jQuery methods: + * + * - [`addClass()`](http://api.jquery.com/addClass/) - Does not support a function as first argument + * - [`after()`](http://api.jquery.com/after/) + * - [`append()`](http://api.jquery.com/append/) + * - [`attr()`](http://api.jquery.com/attr/) - Does not support functions as parameters + * - [`bind()`](http://api.jquery.com/bind/) (_deprecated_, use [`on()`](http://api.jquery.com/on/)) - Does not support namespaces, selectors or eventData + * - [`children()`](http://api.jquery.com/children/) - Does not support selectors + * - [`clone()`](http://api.jquery.com/clone/) + * - [`contents()`](http://api.jquery.com/contents/) + * - [`css()`](http://api.jquery.com/css/) - Only retrieves inline-styles, does not call `getComputedStyle()`. + * As a setter, does not convert numbers to strings or append 'px', and also does not have automatic property prefixing. + * - [`data()`](http://api.jquery.com/data/) + * - [`detach()`](http://api.jquery.com/detach/) + * - [`empty()`](http://api.jquery.com/empty/) + * - [`eq()`](http://api.jquery.com/eq/) + * - [`find()`](http://api.jquery.com/find/) - Limited to lookups by tag name + * - [`hasClass()`](http://api.jquery.com/hasClass/) + * - [`html()`](http://api.jquery.com/html/) + * - [`next()`](http://api.jquery.com/next/) - Does not support selectors + * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData + * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces, selectors or event object as parameter + * - [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors + * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors + * - [`prepend()`](http://api.jquery.com/prepend/) + * - [`prop()`](http://api.jquery.com/prop/) + * - [`ready()`](http://api.jquery.com/ready/) (_deprecated_, use `angular.element(callback)` instead of `angular.element(document).ready(callback)`) + * - [`remove()`](http://api.jquery.com/remove/) + * - [`removeAttr()`](http://api.jquery.com/removeAttr/) - Does not support multiple attributes + * - [`removeClass()`](http://api.jquery.com/removeClass/) - Does not support a function as first argument + * - [`removeData()`](http://api.jquery.com/removeData/) + * - [`replaceWith()`](http://api.jquery.com/replaceWith/) + * - [`text()`](http://api.jquery.com/text/) + * - [`toggleClass()`](http://api.jquery.com/toggleClass/) - Does not support a function as first argument + * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers + * - [`unbind()`](http://api.jquery.com/unbind/) (_deprecated_, use [`off()`](http://api.jquery.com/off/)) - Does not support namespaces or event object as parameter + * - [`val()`](http://api.jquery.com/val/) + * - [`wrap()`](http://api.jquery.com/wrap/) + * + * ## jQuery/jqLite Extras + * Angular also provides the following additional methods and events to both jQuery and jqLite: + * + * ### Events + * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event + * on all DOM nodes being removed. This can be used to clean up any 3rd party bindings to the DOM + * element before it is removed. + * + * ### Methods + * - `controller(name)` - retrieves the controller of the current element or its parent. By default + * retrieves controller associated with the `ngController` directive. If `name` is provided as + * camelCase directive name, then the controller for this directive will be retrieved (e.g. + * `'ngModel'`). + * - `injector()` - retrieves the injector of the current element or its parent. + * - `scope()` - retrieves the {@link ng.$rootScope.Scope scope} of the current + * element or its parent. Requires {@link guide/production#disabling-debug-data Debug Data} to + * be enabled. + * - `isolateScope()` - retrieves an isolate {@link ng.$rootScope.Scope scope} if one is attached directly to the + * current element. This getter should be used only on elements that contain a directive which starts a new isolate + * scope. Calling `scope()` on this element always returns the original non-isolate scope. + * Requires {@link guide/production#disabling-debug-data Debug Data} to be enabled. + * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top + * parent element is reached. + * + * @knownIssue You cannot spy on `angular.element` if you are using Jasmine version 1.x. See + * https://github.com/angular/angular.js/issues/14251 for more information. + * + * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery. + * @returns {Object} jQuery object. + */ + +JQLite.expando = 'ng339'; + +var jqCache = JQLite.cache = {}, + jqId = 1; + +/* + * !!! This is an undocumented "private" function !!! + */ +JQLite._data = function(node) { + //jQuery always returns an object on cache miss + return this.cache[node[this.expando]] || {}; +}; + +function jqNextId() { return ++jqId; } + + +var DASH_LOWERCASE_REGEXP = /-([a-z])/g; +var MS_HACK_REGEXP = /^-ms-/; +var MOUSE_EVENT_MAP = { mouseleave: 'mouseout', mouseenter: 'mouseover' }; +var jqLiteMinErr = minErr('jqLite'); + +/** + * Converts kebab-case to camelCase. + * There is also a special case for the ms prefix starting with a lowercase letter. + * @param name Name to normalize + */ +function cssKebabToCamel(name) { + return kebabToCamel(name.replace(MS_HACK_REGEXP, 'ms-')); +} + +function fnCamelCaseReplace(all, letter) { + return letter.toUpperCase(); +} + +/** + * Converts kebab-case to camelCase. + * @param name Name to normalize + */ +function kebabToCamel(name) { + return name + .replace(DASH_LOWERCASE_REGEXP, fnCamelCaseReplace); +} + +var SINGLE_TAG_REGEXP = /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/; +var HTML_REGEXP = /<|&#?\w+;/; +var TAG_NAME_REGEXP = /<([\w:-]+)/; +var XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi; + +var wrapMap = { + 'option': [1, ''], + + 'thead': [1, '', '
'], + 'col': [2, '', '
'], + 'tr': [2, '', '
'], + 'td': [3, '', '
'], + '_default': [0, '', ''] +}; + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + + +function jqLiteIsTextNode(html) { + return !HTML_REGEXP.test(html); +} + +function jqLiteAcceptsData(node) { + // The window object can accept data but has no nodeType + // Otherwise we are only interested in elements (1) and documents (9) + var nodeType = node.nodeType; + return nodeType === NODE_TYPE_ELEMENT || !nodeType || nodeType === NODE_TYPE_DOCUMENT; +} + +function jqLiteHasData(node) { + for (var key in jqCache[node.ng339]) { + return true; + } + return false; +} + +function jqLiteBuildFragment(html, context) { + var tmp, tag, wrap, + fragment = context.createDocumentFragment(), + nodes = [], i; + + if (jqLiteIsTextNode(html)) { + // Convert non-html into a text node + nodes.push(context.createTextNode(html)); + } else { + // Convert html into DOM nodes + tmp = fragment.appendChild(context.createElement('div')); + tag = (TAG_NAME_REGEXP.exec(html) || ['', ''])[1].toLowerCase(); + wrap = wrapMap[tag] || wrapMap._default; + tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, '<$1>') + wrap[2]; + + // Descend through wrappers to the right content + i = wrap[0]; + while (i--) { + tmp = tmp.lastChild; + } + + nodes = concat(nodes, tmp.childNodes); + + tmp = fragment.firstChild; + tmp.textContent = ''; + } + + // Remove wrapper from fragment + fragment.textContent = ''; + fragment.innerHTML = ''; // Clear inner HTML + forEach(nodes, function(node) { + fragment.appendChild(node); + }); + + return fragment; +} + +function jqLiteParseHTML(html, context) { + context = context || window.document; + var parsed; + + if ((parsed = SINGLE_TAG_REGEXP.exec(html))) { + return [context.createElement(parsed[1])]; + } + + if ((parsed = jqLiteBuildFragment(html, context))) { + return parsed.childNodes; + } + + return []; +} + +function jqLiteWrapNode(node, wrapper) { + var parent = node.parentNode; + + if (parent) { + parent.replaceChild(wrapper, node); + } + + wrapper.appendChild(node); +} + + +// IE9-11 has no method "contains" in SVG element and in Node.prototype. Bug #10259. +var jqLiteContains = window.Node.prototype.contains || /** @this */ function(arg) { + // eslint-disable-next-line no-bitwise + return !!(this.compareDocumentPosition(arg) & 16); +}; + +///////////////////////////////////////////// +function JQLite(element) { + if (element instanceof JQLite) { + return element; + } + + var argIsString; + + if (isString(element)) { + element = trim(element); + argIsString = true; + } + if (!(this instanceof JQLite)) { + if (argIsString && element.charAt(0) !== '<') { + throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element'); + } + return new JQLite(element); + } + + if (argIsString) { + jqLiteAddNodes(this, jqLiteParseHTML(element)); + } else if (isFunction(element)) { + jqLiteReady(element); + } else { + jqLiteAddNodes(this, element); + } +} + +function jqLiteClone(element) { + return element.cloneNode(true); +} + +function jqLiteDealoc(element, onlyDescendants) { + if (!onlyDescendants && jqLiteAcceptsData(element)) jqLite.cleanData([element]); + + if (element.querySelectorAll) { + jqLite.cleanData(element.querySelectorAll('*')); + } +} + +function jqLiteOff(element, type, fn, unsupported) { + if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument'); + + var expandoStore = jqLiteExpandoStore(element); + var events = expandoStore && expandoStore.events; + var handle = expandoStore && expandoStore.handle; + + if (!handle) return; //no listeners registered + + if (!type) { + for (type in events) { + if (type !== '$destroy') { + element.removeEventListener(type, handle); + } + delete events[type]; + } + } else { + + var removeHandler = function(type) { + var listenerFns = events[type]; + if (isDefined(fn)) { + arrayRemove(listenerFns || [], fn); + } + if (!(isDefined(fn) && listenerFns && listenerFns.length > 0)) { + element.removeEventListener(type, handle); + delete events[type]; + } + }; + + forEach(type.split(' '), function(type) { + removeHandler(type); + if (MOUSE_EVENT_MAP[type]) { + removeHandler(MOUSE_EVENT_MAP[type]); + } + }); + } +} + +function jqLiteRemoveData(element, name) { + var expandoId = element.ng339; + var expandoStore = expandoId && jqCache[expandoId]; + + if (expandoStore) { + if (name) { + delete expandoStore.data[name]; + return; + } + + if (expandoStore.handle) { + if (expandoStore.events.$destroy) { + expandoStore.handle({}, '$destroy'); + } + jqLiteOff(element); + } + delete jqCache[expandoId]; + element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it + } +} + + +function jqLiteExpandoStore(element, createIfNecessary) { + var expandoId = element.ng339, + expandoStore = expandoId && jqCache[expandoId]; + + if (createIfNecessary && !expandoStore) { + element.ng339 = expandoId = jqNextId(); + expandoStore = jqCache[expandoId] = {events: {}, data: {}, handle: undefined}; + } + + return expandoStore; +} + + +function jqLiteData(element, key, value) { + if (jqLiteAcceptsData(element)) { + var prop; + + var isSimpleSetter = isDefined(value); + var isSimpleGetter = !isSimpleSetter && key && !isObject(key); + var massGetter = !key; + var expandoStore = jqLiteExpandoStore(element, !isSimpleGetter); + var data = expandoStore && expandoStore.data; + + if (isSimpleSetter) { // data('key', value) + data[kebabToCamel(key)] = value; + } else { + if (massGetter) { // data() + return data; + } else { + if (isSimpleGetter) { // data('key') + // don't force creation of expandoStore if it doesn't exist yet + return data && data[kebabToCamel(key)]; + } else { // mass-setter: data({key1: val1, key2: val2}) + for (prop in key) { + data[kebabToCamel(prop)] = key[prop]; + } + } + } + } + } +} + +function jqLiteHasClass(element, selector) { + if (!element.getAttribute) return false; + return ((' ' + (element.getAttribute('class') || '') + ' ').replace(/[\n\t]/g, ' '). + indexOf(' ' + selector + ' ') > -1); +} + +function jqLiteRemoveClass(element, cssClasses) { + if (cssClasses && element.setAttribute) { + forEach(cssClasses.split(' '), function(cssClass) { + element.setAttribute('class', trim( + (' ' + (element.getAttribute('class') || '') + ' ') + .replace(/[\n\t]/g, ' ') + .replace(' ' + trim(cssClass) + ' ', ' ')) + ); + }); + } +} + +function jqLiteAddClass(element, cssClasses) { + if (cssClasses && element.setAttribute) { + var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ') + .replace(/[\n\t]/g, ' '); + + forEach(cssClasses.split(' '), function(cssClass) { + cssClass = trim(cssClass); + if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) { + existingClasses += cssClass + ' '; + } + }); + + element.setAttribute('class', trim(existingClasses)); + } +} + + +function jqLiteAddNodes(root, elements) { + // THIS CODE IS VERY HOT. Don't make changes without benchmarking. + + if (elements) { + + // if a Node (the most common case) + if (elements.nodeType) { + root[root.length++] = elements; + } else { + var length = elements.length; + + // if an Array or NodeList and not a Window + if (typeof length === 'number' && elements.window !== elements) { + if (length) { + for (var i = 0; i < length; i++) { + root[root.length++] = elements[i]; + } + } + } else { + root[root.length++] = elements; + } + } + } +} + + +function jqLiteController(element, name) { + return jqLiteInheritedData(element, '$' + (name || 'ngController') + 'Controller'); +} + +function jqLiteInheritedData(element, name, value) { + // if element is the document object work with the html element instead + // this makes $(document).scope() possible + if (element.nodeType === NODE_TYPE_DOCUMENT) { + element = element.documentElement; + } + var names = isArray(name) ? name : [name]; + + while (element) { + for (var i = 0, ii = names.length; i < ii; i++) { + if (isDefined(value = jqLite.data(element, names[i]))) return value; + } + + // If dealing with a document fragment node with a host element, and no parent, use the host + // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM + // to lookup parent controllers. + element = element.parentNode || (element.nodeType === NODE_TYPE_DOCUMENT_FRAGMENT && element.host); + } +} + +function jqLiteEmpty(element) { + jqLiteDealoc(element, true); + while (element.firstChild) { + element.removeChild(element.firstChild); + } +} + +function jqLiteRemove(element, keepData) { + if (!keepData) jqLiteDealoc(element); + var parent = element.parentNode; + if (parent) parent.removeChild(element); +} + + +function jqLiteDocumentLoaded(action, win) { + win = win || window; + if (win.document.readyState === 'complete') { + // Force the action to be run async for consistent behavior + // from the action's point of view + // i.e. it will definitely not be in a $apply + win.setTimeout(action); + } else { + // No need to unbind this handler as load is only ever called once + jqLite(win).on('load', action); + } +} + +function jqLiteReady(fn) { + function trigger() { + window.document.removeEventListener('DOMContentLoaded', trigger); + window.removeEventListener('load', trigger); + fn(); + } + + // check if document is already loaded + if (window.document.readyState === 'complete') { + window.setTimeout(fn); + } else { + // We can not use jqLite since we are not done loading and jQuery could be loaded later. + + // Works for modern browsers and IE9 + window.document.addEventListener('DOMContentLoaded', trigger); + + // Fallback to window.onload for others + window.addEventListener('load', trigger); + } +} + +////////////////////////////////////////// +// Functions which are declared directly. +////////////////////////////////////////// +var JQLitePrototype = JQLite.prototype = { + ready: jqLiteReady, + toString: function() { + var value = []; + forEach(this, function(e) { value.push('' + e);}); + return '[' + value.join(', ') + ']'; + }, + + eq: function(index) { + return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]); + }, + + length: 0, + push: push, + sort: [].sort, + splice: [].splice +}; + +////////////////////////////////////////// +// Functions iterating getter/setters. +// these functions return self on setter and +// value on get. +////////////////////////////////////////// +var BOOLEAN_ATTR = {}; +forEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) { + BOOLEAN_ATTR[lowercase(value)] = value; +}); +var BOOLEAN_ELEMENTS = {}; +forEach('input,select,option,textarea,button,form,details'.split(','), function(value) { + BOOLEAN_ELEMENTS[value] = true; +}); +var ALIASED_ATTR = { + 'ngMinlength': 'minlength', + 'ngMaxlength': 'maxlength', + 'ngMin': 'min', + 'ngMax': 'max', + 'ngPattern': 'pattern', + 'ngStep': 'step' +}; + +function getBooleanAttrName(element, name) { + // check dom last since we will most likely fail on name + var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()]; + + // booleanAttr is here twice to minimize DOM access + return booleanAttr && BOOLEAN_ELEMENTS[nodeName_(element)] && booleanAttr; +} + +function getAliasedAttrName(name) { + return ALIASED_ATTR[name]; +} + +forEach({ + data: jqLiteData, + removeData: jqLiteRemoveData, + hasData: jqLiteHasData, + cleanData: function jqLiteCleanData(nodes) { + for (var i = 0, ii = nodes.length; i < ii; i++) { + jqLiteRemoveData(nodes[i]); + } + } +}, function(fn, name) { + JQLite[name] = fn; +}); + +forEach({ + data: jqLiteData, + inheritedData: jqLiteInheritedData, + + scope: function(element) { + // Can't use jqLiteData here directly so we stay compatible with jQuery! + return jqLite.data(element, '$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']); + }, + + isolateScope: function(element) { + // Can't use jqLiteData here directly so we stay compatible with jQuery! + return jqLite.data(element, '$isolateScope') || jqLite.data(element, '$isolateScopeNoTemplate'); + }, + + controller: jqLiteController, + + injector: function(element) { + return jqLiteInheritedData(element, '$injector'); + }, + + removeAttr: function(element, name) { + element.removeAttribute(name); + }, + + hasClass: jqLiteHasClass, + + css: function(element, name, value) { + name = cssKebabToCamel(name); + + if (isDefined(value)) { + element.style[name] = value; + } else { + return element.style[name]; + } + }, + + attr: function(element, name, value) { + var ret; + var nodeType = element.nodeType; + if (nodeType === NODE_TYPE_TEXT || nodeType === NODE_TYPE_ATTRIBUTE || nodeType === NODE_TYPE_COMMENT || + !element.getAttribute) { + return; + } + + var lowercasedName = lowercase(name); + var isBooleanAttr = BOOLEAN_ATTR[lowercasedName]; + + if (isDefined(value)) { + // setter + + if (value === null || (value === false && isBooleanAttr)) { + element.removeAttribute(name); + } else { + element.setAttribute(name, isBooleanAttr ? lowercasedName : value); + } + } else { + // getter + + ret = element.getAttribute(name); + + if (isBooleanAttr && ret !== null) { + ret = lowercasedName; + } + // Normalize non-existing attributes to undefined (as jQuery). + return ret === null ? undefined : ret; + } + }, + + prop: function(element, name, value) { + if (isDefined(value)) { + element[name] = value; + } else { + return element[name]; + } + }, + + text: (function() { + getText.$dv = ''; + return getText; + + function getText(element, value) { + if (isUndefined(value)) { + var nodeType = element.nodeType; + return (nodeType === NODE_TYPE_ELEMENT || nodeType === NODE_TYPE_TEXT) ? element.textContent : ''; + } + element.textContent = value; + } + })(), + + val: function(element, value) { + if (isUndefined(value)) { + if (element.multiple && nodeName_(element) === 'select') { + var result = []; + forEach(element.options, function(option) { + if (option.selected) { + result.push(option.value || option.text); + } + }); + return result; + } + return element.value; + } + element.value = value; + }, + + html: function(element, value) { + if (isUndefined(value)) { + return element.innerHTML; + } + jqLiteDealoc(element, true); + element.innerHTML = value; + }, + + empty: jqLiteEmpty +}, function(fn, name) { + /** + * Properties: writes return selection, reads return first value + */ + JQLite.prototype[name] = function(arg1, arg2) { + var i, key; + var nodeCount = this.length; + + // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it + // in a way that survives minification. + // jqLiteEmpty takes no arguments but is a setter. + if (fn !== jqLiteEmpty && + (isUndefined((fn.length === 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2))) { + if (isObject(arg1)) { + + // we are a write, but the object properties are the key/values + for (i = 0; i < nodeCount; i++) { + if (fn === jqLiteData) { + // data() takes the whole object in jQuery + fn(this[i], arg1); + } else { + for (key in arg1) { + fn(this[i], key, arg1[key]); + } + } + } + // return self for chaining + return this; + } else { + // we are a read, so read the first child. + // TODO: do we still need this? + var value = fn.$dv; + // Only if we have $dv do we iterate over all, otherwise it is just the first element. + var jj = (isUndefined(value)) ? Math.min(nodeCount, 1) : nodeCount; + for (var j = 0; j < jj; j++) { + var nodeValue = fn(this[j], arg1, arg2); + value = value ? value + nodeValue : nodeValue; + } + return value; + } + } else { + // we are a write, so apply to all children + for (i = 0; i < nodeCount; i++) { + fn(this[i], arg1, arg2); + } + // return self for chaining + return this; + } + }; +}); + +function createEventHandler(element, events) { + var eventHandler = function(event, type) { + // jQuery specific api + event.isDefaultPrevented = function() { + return event.defaultPrevented; + }; + + var eventFns = events[type || event.type]; + var eventFnsLength = eventFns ? eventFns.length : 0; + + if (!eventFnsLength) return; + + if (isUndefined(event.immediatePropagationStopped)) { + var originalStopImmediatePropagation = event.stopImmediatePropagation; + event.stopImmediatePropagation = function() { + event.immediatePropagationStopped = true; + + if (event.stopPropagation) { + event.stopPropagation(); + } + + if (originalStopImmediatePropagation) { + originalStopImmediatePropagation.call(event); + } + }; + } + + event.isImmediatePropagationStopped = function() { + return event.immediatePropagationStopped === true; + }; + + // Some events have special handlers that wrap the real handler + var handlerWrapper = eventFns.specialHandlerWrapper || defaultHandlerWrapper; + + // Copy event handlers in case event handlers array is modified during execution. + if ((eventFnsLength > 1)) { + eventFns = shallowCopy(eventFns); + } + + for (var i = 0; i < eventFnsLength; i++) { + if (!event.isImmediatePropagationStopped()) { + handlerWrapper(element, event, eventFns[i]); + } + } + }; + + // TODO: this is a hack for angularMocks/clearDataCache that makes it possible to deregister all + // events on `element` + eventHandler.elem = element; + return eventHandler; +} + +function defaultHandlerWrapper(element, event, handler) { + handler.call(element, event); +} + +function specialMouseHandlerWrapper(target, event, handler) { + // Refer to jQuery's implementation of mouseenter & mouseleave + // Read about mouseenter and mouseleave: + // http://www.quirksmode.org/js/events_mouse.html#link8 + var related = event.relatedTarget; + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if (!related || (related !== target && !jqLiteContains.call(target, related))) { + handler.call(target, event); + } +} + +////////////////////////////////////////// +// Functions iterating traversal. +// These functions chain results into a single +// selector. +////////////////////////////////////////// +forEach({ + removeData: jqLiteRemoveData, + + on: function jqLiteOn(element, type, fn, unsupported) { + if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters'); + + // Do not add event handlers to non-elements because they will not be cleaned up. + if (!jqLiteAcceptsData(element)) { + return; + } + + var expandoStore = jqLiteExpandoStore(element, true); + var events = expandoStore.events; + var handle = expandoStore.handle; + + if (!handle) { + handle = expandoStore.handle = createEventHandler(element, events); + } + + // http://jsperf.com/string-indexof-vs-split + var types = type.indexOf(' ') >= 0 ? type.split(' ') : [type]; + var i = types.length; + + var addHandler = function(type, specialHandlerWrapper, noEventListener) { + var eventFns = events[type]; + + if (!eventFns) { + eventFns = events[type] = []; + eventFns.specialHandlerWrapper = specialHandlerWrapper; + if (type !== '$destroy' && !noEventListener) { + element.addEventListener(type, handle); + } + } + + eventFns.push(fn); + }; + + while (i--) { + type = types[i]; + if (MOUSE_EVENT_MAP[type]) { + addHandler(MOUSE_EVENT_MAP[type], specialMouseHandlerWrapper); + addHandler(type, undefined, true); + } else { + addHandler(type); + } + } + }, + + off: jqLiteOff, + + one: function(element, type, fn) { + element = jqLite(element); + + //add the listener twice so that when it is called + //you can remove the original function and still be + //able to call element.off(ev, fn) normally + element.on(type, function onFn() { + element.off(type, fn); + element.off(type, onFn); + }); + element.on(type, fn); + }, + + replaceWith: function(element, replaceNode) { + var index, parent = element.parentNode; + jqLiteDealoc(element); + forEach(new JQLite(replaceNode), function(node) { + if (index) { + parent.insertBefore(node, index.nextSibling); + } else { + parent.replaceChild(node, element); + } + index = node; + }); + }, + + children: function(element) { + var children = []; + forEach(element.childNodes, function(element) { + if (element.nodeType === NODE_TYPE_ELEMENT) { + children.push(element); + } + }); + return children; + }, + + contents: function(element) { + return element.contentDocument || element.childNodes || []; + }, + + append: function(element, node) { + var nodeType = element.nodeType; + if (nodeType !== NODE_TYPE_ELEMENT && nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT) return; + + node = new JQLite(node); + + for (var i = 0, ii = node.length; i < ii; i++) { + var child = node[i]; + element.appendChild(child); + } + }, + + prepend: function(element, node) { + if (element.nodeType === NODE_TYPE_ELEMENT) { + var index = element.firstChild; + forEach(new JQLite(node), function(child) { + element.insertBefore(child, index); + }); + } + }, + + wrap: function(element, wrapNode) { + jqLiteWrapNode(element, jqLite(wrapNode).eq(0).clone()[0]); + }, + + remove: jqLiteRemove, + + detach: function(element) { + jqLiteRemove(element, true); + }, + + after: function(element, newElement) { + var index = element, parent = element.parentNode; + + if (parent) { + newElement = new JQLite(newElement); + + for (var i = 0, ii = newElement.length; i < ii; i++) { + var node = newElement[i]; + parent.insertBefore(node, index.nextSibling); + index = node; + } + } + }, + + addClass: jqLiteAddClass, + removeClass: jqLiteRemoveClass, + + toggleClass: function(element, selector, condition) { + if (selector) { + forEach(selector.split(' '), function(className) { + var classCondition = condition; + if (isUndefined(classCondition)) { + classCondition = !jqLiteHasClass(element, className); + } + (classCondition ? jqLiteAddClass : jqLiteRemoveClass)(element, className); + }); + } + }, + + parent: function(element) { + var parent = element.parentNode; + return parent && parent.nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT ? parent : null; + }, + + next: function(element) { + return element.nextElementSibling; + }, + + find: function(element, selector) { + if (element.getElementsByTagName) { + return element.getElementsByTagName(selector); + } else { + return []; + } + }, + + clone: jqLiteClone, + + triggerHandler: function(element, event, extraParameters) { + + var dummyEvent, eventFnsCopy, handlerArgs; + var eventName = event.type || event; + var expandoStore = jqLiteExpandoStore(element); + var events = expandoStore && expandoStore.events; + var eventFns = events && events[eventName]; + + if (eventFns) { + // Create a dummy event to pass to the handlers + dummyEvent = { + preventDefault: function() { this.defaultPrevented = true; }, + isDefaultPrevented: function() { return this.defaultPrevented === true; }, + stopImmediatePropagation: function() { this.immediatePropagationStopped = true; }, + isImmediatePropagationStopped: function() { return this.immediatePropagationStopped === true; }, + stopPropagation: noop, + type: eventName, + target: element + }; + + // If a custom event was provided then extend our dummy event with it + if (event.type) { + dummyEvent = extend(dummyEvent, event); + } + + // Copy event handlers in case event handlers array is modified during execution. + eventFnsCopy = shallowCopy(eventFns); + handlerArgs = extraParameters ? [dummyEvent].concat(extraParameters) : [dummyEvent]; + + forEach(eventFnsCopy, function(fn) { + if (!dummyEvent.isImmediatePropagationStopped()) { + fn.apply(element, handlerArgs); + } + }); + } + } +}, function(fn, name) { + /** + * chaining functions + */ + JQLite.prototype[name] = function(arg1, arg2, arg3) { + var value; + + for (var i = 0, ii = this.length; i < ii; i++) { + if (isUndefined(value)) { + value = fn(this[i], arg1, arg2, arg3); + if (isDefined(value)) { + // any function which returns a value needs to be wrapped + value = jqLite(value); + } + } else { + jqLiteAddNodes(value, fn(this[i], arg1, arg2, arg3)); + } + } + return isDefined(value) ? value : this; + }; +}); + +// bind legacy bind/unbind to on/off +JQLite.prototype.bind = JQLite.prototype.on; +JQLite.prototype.unbind = JQLite.prototype.off; + + +// Provider for private $$jqLite service +/** @this */ +function $$jqLiteProvider() { + this.$get = function $$jqLite() { + return extend(JQLite, { + hasClass: function(node, classes) { + if (node.attr) node = node[0]; + return jqLiteHasClass(node, classes); + }, + addClass: function(node, classes) { + if (node.attr) node = node[0]; + return jqLiteAddClass(node, classes); + }, + removeClass: function(node, classes) { + if (node.attr) node = node[0]; + return jqLiteRemoveClass(node, classes); + } + }); + }; +} + +/** + * Computes a hash of an 'obj'. + * Hash of a: + * string is string + * number is number as string + * object is either result of calling $$hashKey function on the object or uniquely generated id, + * that is also assigned to the $$hashKey property of the object. + * + * @param obj + * @returns {string} hash string such that the same input will have the same hash string. + * The resulting string key is in 'type:hashKey' format. + */ +function hashKey(obj, nextUidFn) { + var key = obj && obj.$$hashKey; + + if (key) { + if (typeof key === 'function') { + key = obj.$$hashKey(); + } + return key; + } + + var objType = typeof obj; + if (objType === 'function' || (objType === 'object' && obj !== null)) { + key = obj.$$hashKey = objType + ':' + (nextUidFn || nextUid)(); + } else { + key = objType + ':' + obj; + } + + return key; +} + +// A minimal ES2015 Map implementation. +// Should be bug/feature equivalent to the native implementations of supported browsers +// (for the features required in Angular). +// See https://kangax.github.io/compat-table/es6/#test-Map +var nanKey = Object.create(null); +function NgMapShim() { + this._keys = []; + this._values = []; + this._lastKey = NaN; + this._lastIndex = -1; +} +NgMapShim.prototype = { + _idx: function(key) { + if (key === this._lastKey) { + return this._lastIndex; + } + this._lastKey = key; + this._lastIndex = this._keys.indexOf(key); + return this._lastIndex; + }, + _transformKey: function(key) { + return isNumberNaN(key) ? nanKey : key; + }, + get: function(key) { + key = this._transformKey(key); + var idx = this._idx(key); + if (idx !== -1) { + return this._values[idx]; + } + }, + set: function(key, value) { + key = this._transformKey(key); + var idx = this._idx(key); + if (idx === -1) { + idx = this._lastIndex = this._keys.length; + } + this._keys[idx] = key; + this._values[idx] = value; + + // Support: IE11 + // Do not `return this` to simulate the partial IE11 implementation + }, + delete: function(key) { + key = this._transformKey(key); + var idx = this._idx(key); + if (idx === -1) { + return false; + } + this._keys.splice(idx, 1); + this._values.splice(idx, 1); + this._lastKey = NaN; + this._lastIndex = -1; + return true; + } +}; + +// For now, always use `NgMapShim`, even if `window.Map` is available. Some native implementations +// are still buggy (often in subtle ways) and can cause hard-to-debug failures. When native `Map` +// implementations get more stable, we can reconsider switching to `window.Map` (when available). +var NgMap = NgMapShim; + +var $$MapProvider = [/** @this */function() { + this.$get = [function() { + return NgMap; + }]; +}]; + +/** + * @ngdoc function + * @module ng + * @name angular.injector + * @kind function + * + * @description + * Creates an injector object that can be used for retrieving services as well as for + * dependency injection (see {@link guide/di dependency injection}). + * + * @param {Array.} modules A list of module functions or their aliases. See + * {@link angular.module}. The `ng` module must be explicitly added. + * @param {boolean=} [strictDi=false] Whether the injector should be in strict mode, which + * disallows argument name annotation inference. + * @returns {injector} Injector object. See {@link auto.$injector $injector}. + * + * @example + * Typical usage + * ```js + * // create an injector + * var $injector = angular.injector(['ng']); + * + * // use the injector to kick off your application + * // use the type inference to auto inject arguments, or use implicit injection + * $injector.invoke(function($rootScope, $compile, $document) { + * $compile($document)($rootScope); + * $rootScope.$digest(); + * }); + * ``` + * + * Sometimes you want to get access to the injector of a currently running Angular app + * from outside Angular. Perhaps, you want to inject and compile some markup after the + * application has been bootstrapped. You can do this using the extra `injector()` added + * to JQuery/jqLite elements. See {@link angular.element}. + * + * *This is fairly rare but could be the case if a third party library is injecting the + * markup.* + * + * In the following example a new block of HTML containing a `ng-controller` + * directive is added to the end of the document body by JQuery. We then compile and link + * it into the current AngularJS scope. + * + * ```js + * var $div = $('
{{content.label}}
'); + * $(document.body).append($div); + * + * angular.element(document).injector().invoke(function($compile) { + * var scope = angular.element($div).scope(); + * $compile($div)(scope); + * }); + * ``` + */ + + +/** + * @ngdoc module + * @name auto + * @installation + * @description + * + * Implicit module which gets automatically added to each {@link auto.$injector $injector}. + */ + +var ARROW_ARG = /^([^(]+?)=>/; +var FN_ARGS = /^[^(]*\(\s*([^)]*)\)/m; +var FN_ARG_SPLIT = /,/; +var FN_ARG = /^\s*(_?)(\S+?)\1\s*$/; +var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg; +var $injectorMinErr = minErr('$injector'); + +function stringifyFn(fn) { + return Function.prototype.toString.call(fn); +} + +function extractArgs(fn) { + var fnText = stringifyFn(fn).replace(STRIP_COMMENTS, ''), + args = fnText.match(ARROW_ARG) || fnText.match(FN_ARGS); + return args; +} + +function anonFn(fn) { + // For anonymous functions, showing at the very least the function signature can help in + // debugging. + var args = extractArgs(fn); + if (args) { + return 'function(' + (args[1] || '').replace(/[\s\r\n]+/, ' ') + ')'; + } + return 'fn'; +} + +function annotate(fn, strictDi, name) { + var $inject, + argDecl, + last; + + if (typeof fn === 'function') { + if (!($inject = fn.$inject)) { + $inject = []; + if (fn.length) { + if (strictDi) { + if (!isString(name) || !name) { + name = fn.name || anonFn(fn); + } + throw $injectorMinErr('strictdi', + '{0} is not using explicit annotation and cannot be invoked in strict mode', name); + } + argDecl = extractArgs(fn); + forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg) { + arg.replace(FN_ARG, function(all, underscore, name) { + $inject.push(name); + }); + }); + } + fn.$inject = $inject; + } + } else if (isArray(fn)) { + last = fn.length - 1; + assertArgFn(fn[last], 'fn'); + $inject = fn.slice(0, last); + } else { + assertArgFn(fn, 'fn', true); + } + return $inject; +} + +/////////////////////////////////////// + +/** + * @ngdoc service + * @name $injector + * + * @description + * + * `$injector` is used to retrieve object instances as defined by + * {@link auto.$provide provider}, instantiate types, invoke methods, + * and load modules. + * + * The following always holds true: + * + * ```js + * var $injector = angular.injector(); + * expect($injector.get('$injector')).toBe($injector); + * expect($injector.invoke(function($injector) { + * return $injector; + * })).toBe($injector); + * ``` + * + * # Injection Function Annotation + * + * JavaScript does not have annotations, and annotations are needed for dependency injection. The + * following are all valid ways of annotating function with injection arguments and are equivalent. + * + * ```js + * // inferred (only works if code not minified/obfuscated) + * $injector.invoke(function(serviceA){}); + * + * // annotated + * function explicit(serviceA) {}; + * explicit.$inject = ['serviceA']; + * $injector.invoke(explicit); + * + * // inline + * $injector.invoke(['serviceA', function(serviceA){}]); + * ``` + * + * ## Inference + * + * In JavaScript calling `toString()` on a function returns the function definition. The definition + * can then be parsed and the function arguments can be extracted. This method of discovering + * annotations is disallowed when the injector is in strict mode. + * *NOTE:* This does not work with minification, and obfuscation tools since these tools change the + * argument names. + * + * ## `$inject` Annotation + * By adding an `$inject` property onto a function the injection parameters can be specified. + * + * ## Inline + * As an array of injection names, where the last item in the array is the function to call. + */ + +/** + * @ngdoc property + * @name $injector#modules + * @type {Object} + * @description + * A hash containing all the modules that have been loaded into the + * $injector. + * + * You can use this property to find out information about a module via the + * {@link angular.Module#info `myModule.info(...)`} method. + * + * For example: + * + * ``` + * var info = $injector.modules['ngAnimate'].info(); + * ``` + * + * **Do not use this property to attempt to modify the modules after the application + * has been bootstrapped.** + */ + + +/** + * @ngdoc method + * @name $injector#get + * + * @description + * Return an instance of the service. + * + * @param {string} name The name of the instance to retrieve. + * @param {string=} caller An optional string to provide the origin of the function call for error messages. + * @return {*} The instance. + */ + +/** + * @ngdoc method + * @name $injector#invoke + * + * @description + * Invoke the method and supply the method arguments from the `$injector`. + * + * @param {Function|Array.} fn The injectable function to invoke. Function parameters are + * injected according to the {@link guide/di $inject Annotation} rules. + * @param {Object=} self The `this` for the invoked method. + * @param {Object=} locals Optional object. If preset then any argument names are read from this + * object first, before the `$injector` is consulted. + * @returns {*} the value returned by the invoked `fn` function. + */ + +/** + * @ngdoc method + * @name $injector#has + * + * @description + * Allows the user to query if the particular service exists. + * + * @param {string} name Name of the service to query. + * @returns {boolean} `true` if injector has given service. + */ + +/** + * @ngdoc method + * @name $injector#instantiate + * @description + * Create a new instance of JS type. The method takes a constructor function, invokes the new + * operator, and supplies all of the arguments to the constructor function as specified by the + * constructor annotation. + * + * @param {Function} Type Annotated constructor function. + * @param {Object=} locals Optional object. If preset then any argument names are read from this + * object first, before the `$injector` is consulted. + * @returns {Object} new instance of `Type`. + */ + +/** + * @ngdoc method + * @name $injector#annotate + * + * @description + * Returns an array of service names which the function is requesting for injection. This API is + * used by the injector to determine which services need to be injected into the function when the + * function is invoked. There are three ways in which the function can be annotated with the needed + * dependencies. + * + * # Argument names + * + * The simplest form is to extract the dependencies from the arguments of the function. This is done + * by converting the function into a string using `toString()` method and extracting the argument + * names. + * ```js + * // Given + * function MyController($scope, $route) { + * // ... + * } + * + * // Then + * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']); + * ``` + * + * You can disallow this method by using strict injection mode. + * + * This method does not work with code minification / obfuscation. For this reason the following + * annotation strategies are supported. + * + * # The `$inject` property + * + * If a function has an `$inject` property and its value is an array of strings, then the strings + * represent names of services to be injected into the function. + * ```js + * // Given + * var MyController = function(obfuscatedScope, obfuscatedRoute) { + * // ... + * } + * // Define function dependencies + * MyController['$inject'] = ['$scope', '$route']; + * + * // Then + * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']); + * ``` + * + * # The array notation + * + * It is often desirable to inline Injected functions and that's when setting the `$inject` property + * is very inconvenient. In these situations using the array notation to specify the dependencies in + * a way that survives minification is a better choice: + * + * ```js + * // We wish to write this (not minification / obfuscation safe) + * injector.invoke(function($compile, $rootScope) { + * // ... + * }); + * + * // We are forced to write break inlining + * var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) { + * // ... + * }; + * tmpFn.$inject = ['$compile', '$rootScope']; + * injector.invoke(tmpFn); + * + * // To better support inline function the inline annotation is supported + * injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) { + * // ... + * }]); + * + * // Therefore + * expect(injector.annotate( + * ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}]) + * ).toEqual(['$compile', '$rootScope']); + * ``` + * + * @param {Function|Array.} fn Function for which dependent service names need to + * be retrieved as described above. + * + * @param {boolean=} [strictDi=false] Disallow argument name annotation inference. + * + * @returns {Array.} The names of the services which the function requires. + */ + + + +/** + * @ngdoc service + * @name $provide + * + * @description + * + * The {@link auto.$provide $provide} service has a number of methods for registering components + * with the {@link auto.$injector $injector}. Many of these functions are also exposed on + * {@link angular.Module}. + * + * An Angular **service** is a singleton object created by a **service factory**. These **service + * factories** are functions which, in turn, are created by a **service provider**. + * The **service providers** are constructor functions. When instantiated they must contain a + * property called `$get`, which holds the **service factory** function. + * + * When you request a service, the {@link auto.$injector $injector} is responsible for finding the + * correct **service provider**, instantiating it and then calling its `$get` **service factory** + * function to get the instance of the **service**. + * + * Often services have no configuration options and there is no need to add methods to the service + * provider. The provider will be no more than a constructor function with a `$get` property. For + * these cases the {@link auto.$provide $provide} service has additional helper methods to register + * services without specifying a provider. + * + * * {@link auto.$provide#provider provider(name, provider)} - registers a **service provider** with the + * {@link auto.$injector $injector} + * * {@link auto.$provide#constant constant(name, obj)} - registers a value/object that can be accessed by + * providers and services. + * * {@link auto.$provide#value value(name, obj)} - registers a value/object that can only be accessed by + * services, not providers. + * * {@link auto.$provide#factory factory(name, fn)} - registers a service **factory function** + * that will be wrapped in a **service provider** object, whose `$get` property will contain the + * given factory function. + * * {@link auto.$provide#service service(name, Fn)} - registers a **constructor function** + * that will be wrapped in a **service provider** object, whose `$get` property will instantiate + * a new object using the given constructor function. + * * {@link auto.$provide#decorator decorator(name, decorFn)} - registers a **decorator function** that + * will be able to modify or replace the implementation of another service. + * + * See the individual methods for more information and examples. + */ + +/** + * @ngdoc method + * @name $provide#provider + * @description + * + * Register a **provider function** with the {@link auto.$injector $injector}. Provider functions + * are constructor functions, whose instances are responsible for "providing" a factory for a + * service. + * + * Service provider names start with the name of the service they provide followed by `Provider`. + * For example, the {@link ng.$log $log} service has a provider called + * {@link ng.$logProvider $logProvider}. + * + * Service provider objects can have additional methods which allow configuration of the provider + * and its service. Importantly, you can configure what kind of service is created by the `$get` + * method, or how that service will act. For example, the {@link ng.$logProvider $logProvider} has a + * method {@link ng.$logProvider#debugEnabled debugEnabled} + * which lets you specify whether the {@link ng.$log $log} service will log debug messages to the + * console or not. + * + * @param {string} name The name of the instance. NOTE: the provider will be available under `name + + 'Provider'` key. + * @param {(Object|function())} provider If the provider is: + * + * - `Object`: then it should have a `$get` method. The `$get` method will be invoked using + * {@link auto.$injector#invoke $injector.invoke()} when an instance needs to be created. + * - `Constructor`: a new instance of the provider will be created using + * {@link auto.$injector#instantiate $injector.instantiate()}, then treated as `object`. + * + * @returns {Object} registered provider instance + + * @example + * + * The following example shows how to create a simple event tracking service and register it using + * {@link auto.$provide#provider $provide.provider()}. + * + * ```js + * // Define the eventTracker provider + * function EventTrackerProvider() { + * var trackingUrl = '/track'; + * + * // A provider method for configuring where the tracked events should been saved + * this.setTrackingUrl = function(url) { + * trackingUrl = url; + * }; + * + * // The service factory function + * this.$get = ['$http', function($http) { + * var trackedEvents = {}; + * return { + * // Call this to track an event + * event: function(event) { + * var count = trackedEvents[event] || 0; + * count += 1; + * trackedEvents[event] = count; + * return count; + * }, + * // Call this to save the tracked events to the trackingUrl + * save: function() { + * $http.post(trackingUrl, trackedEvents); + * } + * }; + * }]; + * } + * + * describe('eventTracker', function() { + * var postSpy; + * + * beforeEach(module(function($provide) { + * // Register the eventTracker provider + * $provide.provider('eventTracker', EventTrackerProvider); + * })); + * + * beforeEach(module(function(eventTrackerProvider) { + * // Configure eventTracker provider + * eventTrackerProvider.setTrackingUrl('/custom-track'); + * })); + * + * it('tracks events', inject(function(eventTracker) { + * expect(eventTracker.event('login')).toEqual(1); + * expect(eventTracker.event('login')).toEqual(2); + * })); + * + * it('saves to the tracking url', inject(function(eventTracker, $http) { + * postSpy = spyOn($http, 'post'); + * eventTracker.event('login'); + * eventTracker.save(); + * expect(postSpy).toHaveBeenCalled(); + * expect(postSpy.mostRecentCall.args[0]).not.toEqual('/track'); + * expect(postSpy.mostRecentCall.args[0]).toEqual('/custom-track'); + * expect(postSpy.mostRecentCall.args[1]).toEqual({ 'login': 1 }); + * })); + * }); + * ``` + */ + +/** + * @ngdoc method + * @name $provide#factory + * @description + * + * Register a **service factory**, which will be called to return the service instance. + * This is short for registering a service where its provider consists of only a `$get` property, + * which is the given service factory function. + * You should use {@link auto.$provide#factory $provide.factory(getFn)} if you do not need to + * configure your service in a provider. + * + * @param {string} name The name of the instance. + * @param {Function|Array.} $getFn The injectable $getFn for the instance creation. + * Internally this is a short hand for `$provide.provider(name, {$get: $getFn})`. + * @returns {Object} registered provider instance + * + * @example + * Here is an example of registering a service + * ```js + * $provide.factory('ping', ['$http', function($http) { + * return function ping() { + * return $http.send('/ping'); + * }; + * }]); + * ``` + * You would then inject and use this service like this: + * ```js + * someModule.controller('Ctrl', ['ping', function(ping) { + * ping(); + * }]); + * ``` + */ + + +/** + * @ngdoc method + * @name $provide#service + * @description + * + * Register a **service constructor**, which will be invoked with `new` to create the service + * instance. + * This is short for registering a service where its provider's `$get` property is a factory + * function that returns an instance instantiated by the injector from the service constructor + * function. + * + * Internally it looks a bit like this: + * + * ``` + * { + * $get: function() { + * return $injector.instantiate(constructor); + * } + * } + * ``` + * + * + * You should use {@link auto.$provide#service $provide.service(class)} if you define your service + * as a type/class. + * + * @param {string} name The name of the instance. + * @param {Function|Array.} constructor An injectable class (constructor function) + * that will be instantiated. + * @returns {Object} registered provider instance + * + * @example + * Here is an example of registering a service using + * {@link auto.$provide#service $provide.service(class)}. + * ```js + * var Ping = function($http) { + * this.$http = $http; + * }; + * + * Ping.$inject = ['$http']; + * + * Ping.prototype.send = function() { + * return this.$http.get('/ping'); + * }; + * $provide.service('ping', Ping); + * ``` + * You would then inject and use this service like this: + * ```js + * someModule.controller('Ctrl', ['ping', function(ping) { + * ping.send(); + * }]); + * ``` + */ + + +/** + * @ngdoc method + * @name $provide#value + * @description + * + * Register a **value service** with the {@link auto.$injector $injector}, such as a string, a + * number, an array, an object or a function. This is short for registering a service where its + * provider's `$get` property is a factory function that takes no arguments and returns the **value + * service**. That also means it is not possible to inject other services into a value service. + * + * Value services are similar to constant services, except that they cannot be injected into a + * module configuration function (see {@link angular.Module#config}) but they can be overridden by + * an Angular {@link auto.$provide#decorator decorator}. + * + * @param {string} name The name of the instance. + * @param {*} value The value. + * @returns {Object} registered provider instance + * + * @example + * Here are some examples of creating value services. + * ```js + * $provide.value('ADMIN_USER', 'admin'); + * + * $provide.value('RoleLookup', { admin: 0, writer: 1, reader: 2 }); + * + * $provide.value('halfOf', function(value) { + * return value / 2; + * }); + * ``` + */ + + +/** + * @ngdoc method + * @name $provide#constant + * @description + * + * Register a **constant service** with the {@link auto.$injector $injector}, such as a string, + * a number, an array, an object or a function. Like the {@link auto.$provide#value value}, it is not + * possible to inject other services into a constant. + * + * But unlike {@link auto.$provide#value value}, a constant can be + * injected into a module configuration function (see {@link angular.Module#config}) and it cannot + * be overridden by an Angular {@link auto.$provide#decorator decorator}. + * + * @param {string} name The name of the constant. + * @param {*} value The constant value. + * @returns {Object} registered instance + * + * @example + * Here a some examples of creating constants: + * ```js + * $provide.constant('SHARD_HEIGHT', 306); + * + * $provide.constant('MY_COLOURS', ['red', 'blue', 'grey']); + * + * $provide.constant('double', function(value) { + * return value * 2; + * }); + * ``` + */ + + +/** + * @ngdoc method + * @name $provide#decorator + * @description + * + * Register a **decorator function** with the {@link auto.$injector $injector}. A decorator function + * intercepts the creation of a service, allowing it to override or modify the behavior of the + * service. The return value of the decorator function may be the original service, or a new service + * that replaces (or wraps and delegates to) the original service. + * + * You can find out more about using decorators in the {@link guide/decorators} guide. + * + * @param {string} name The name of the service to decorate. + * @param {Function|Array.} decorator This function will be invoked when the service needs to be + * provided and should return the decorated service instance. The function is called using + * the {@link auto.$injector#invoke injector.invoke} method and is therefore fully injectable. + * Local injection arguments: + * + * * `$delegate` - The original service instance, which can be replaced, monkey patched, configured, + * decorated or delegated to. + * + * @example + * Here we decorate the {@link ng.$log $log} service to convert warnings to errors by intercepting + * calls to {@link ng.$log#error $log.warn()}. + * ```js + * $provide.decorator('$log', ['$delegate', function($delegate) { + * $delegate.warn = $delegate.error; + * return $delegate; + * }]); + * ``` + */ + + +function createInjector(modulesToLoad, strictDi) { + strictDi = (strictDi === true); + var INSTANTIATING = {}, + providerSuffix = 'Provider', + path = [], + loadedModules = new NgMap(), + providerCache = { + $provide: { + provider: supportObject(provider), + factory: supportObject(factory), + service: supportObject(service), + value: supportObject(value), + constant: supportObject(constant), + decorator: decorator + } + }, + providerInjector = (providerCache.$injector = + createInternalInjector(providerCache, function(serviceName, caller) { + if (angular.isString(caller)) { + path.push(caller); + } + throw $injectorMinErr('unpr', 'Unknown provider: {0}', path.join(' <- ')); + })), + instanceCache = {}, + protoInstanceInjector = + createInternalInjector(instanceCache, function(serviceName, caller) { + var provider = providerInjector.get(serviceName + providerSuffix, caller); + return instanceInjector.invoke( + provider.$get, provider, undefined, serviceName); + }), + instanceInjector = protoInstanceInjector; + + providerCache['$injector' + providerSuffix] = { $get: valueFn(protoInstanceInjector) }; + instanceInjector.modules = providerInjector.modules = createMap(); + var runBlocks = loadModules(modulesToLoad); + instanceInjector = protoInstanceInjector.get('$injector'); + instanceInjector.strictDi = strictDi; + forEach(runBlocks, function(fn) { if (fn) instanceInjector.invoke(fn); }); + + return instanceInjector; + + //////////////////////////////////// + // $provider + //////////////////////////////////// + + function supportObject(delegate) { + return function(key, value) { + if (isObject(key)) { + forEach(key, reverseParams(delegate)); + } else { + return delegate(key, value); + } + }; + } + + function provider(name, provider_) { + assertNotHasOwnProperty(name, 'service'); + if (isFunction(provider_) || isArray(provider_)) { + provider_ = providerInjector.instantiate(provider_); + } + if (!provider_.$get) { + throw $injectorMinErr('pget', 'Provider \'{0}\' must define $get factory method.', name); + } + return (providerCache[name + providerSuffix] = provider_); + } + + function enforceReturnValue(name, factory) { + return /** @this */ function enforcedReturnValue() { + var result = instanceInjector.invoke(factory, this); + if (isUndefined(result)) { + throw $injectorMinErr('undef', 'Provider \'{0}\' must return a value from $get factory method.', name); + } + return result; + }; + } + + function factory(name, factoryFn, enforce) { + return provider(name, { + $get: enforce !== false ? enforceReturnValue(name, factoryFn) : factoryFn + }); + } + + function service(name, constructor) { + return factory(name, ['$injector', function($injector) { + return $injector.instantiate(constructor); + }]); + } + + function value(name, val) { return factory(name, valueFn(val), false); } + + function constant(name, value) { + assertNotHasOwnProperty(name, 'constant'); + providerCache[name] = value; + instanceCache[name] = value; + } + + function decorator(serviceName, decorFn) { + var origProvider = providerInjector.get(serviceName + providerSuffix), + orig$get = origProvider.$get; + + origProvider.$get = function() { + var origInstance = instanceInjector.invoke(orig$get, origProvider); + return instanceInjector.invoke(decorFn, null, {$delegate: origInstance}); + }; + } + + //////////////////////////////////// + // Module Loading + //////////////////////////////////// + function loadModules(modulesToLoad) { + assertArg(isUndefined(modulesToLoad) || isArray(modulesToLoad), 'modulesToLoad', 'not an array'); + var runBlocks = [], moduleFn; + forEach(modulesToLoad, function(module) { + if (loadedModules.get(module)) return; + loadedModules.set(module, true); + + function runInvokeQueue(queue) { + var i, ii; + for (i = 0, ii = queue.length; i < ii; i++) { + var invokeArgs = queue[i], + provider = providerInjector.get(invokeArgs[0]); + + provider[invokeArgs[1]].apply(provider, invokeArgs[2]); + } + } + + try { + if (isString(module)) { + moduleFn = angularModule(module); + instanceInjector.modules[module] = moduleFn; + runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks); + runInvokeQueue(moduleFn._invokeQueue); + runInvokeQueue(moduleFn._configBlocks); + } else if (isFunction(module)) { + runBlocks.push(providerInjector.invoke(module)); + } else if (isArray(module)) { + runBlocks.push(providerInjector.invoke(module)); + } else { + assertArgFn(module, 'module'); + } + } catch (e) { + if (isArray(module)) { + module = module[module.length - 1]; + } + if (e.message && e.stack && e.stack.indexOf(e.message) === -1) { + // Safari & FF's stack traces don't contain error.message content + // unlike those of Chrome and IE + // So if stack doesn't contain message, we create a new string that contains both. + // Since error.stack is read-only in Safari, I'm overriding e and not e.stack here. + // eslint-disable-next-line no-ex-assign + e = e.message + '\n' + e.stack; + } + throw $injectorMinErr('modulerr', 'Failed to instantiate module {0} due to:\n{1}', + module, e.stack || e.message || e); + } + }); + return runBlocks; + } + + //////////////////////////////////// + // internal Injector + //////////////////////////////////// + + function createInternalInjector(cache, factory) { + + function getService(serviceName, caller) { + if (cache.hasOwnProperty(serviceName)) { + if (cache[serviceName] === INSTANTIATING) { + throw $injectorMinErr('cdep', 'Circular dependency found: {0}', + serviceName + ' <- ' + path.join(' <- ')); + } + return cache[serviceName]; + } else { + try { + path.unshift(serviceName); + cache[serviceName] = INSTANTIATING; + cache[serviceName] = factory(serviceName, caller); + return cache[serviceName]; + } catch (err) { + if (cache[serviceName] === INSTANTIATING) { + delete cache[serviceName]; + } + throw err; + } finally { + path.shift(); + } + } + } + + + function injectionArgs(fn, locals, serviceName) { + var args = [], + $inject = createInjector.$$annotate(fn, strictDi, serviceName); + + for (var i = 0, length = $inject.length; i < length; i++) { + var key = $inject[i]; + if (typeof key !== 'string') { + throw $injectorMinErr('itkn', + 'Incorrect injection token! Expected service name as string, got {0}', key); + } + args.push(locals && locals.hasOwnProperty(key) ? locals[key] : + getService(key, serviceName)); + } + return args; + } + + function isClass(func) { + // Support: IE 9-11 only + // IE 9-11 do not support classes and IE9 leaks with the code below. + if (msie || typeof func !== 'function') { + return false; + } + var result = func.$$ngIsClass; + if (!isBoolean(result)) { + // Support: Edge 12-13 only + // See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/6156135/ + result = func.$$ngIsClass = /^(?:class\b|constructor\()/.test(stringifyFn(func)); + } + return result; + } + + function invoke(fn, self, locals, serviceName) { + if (typeof locals === 'string') { + serviceName = locals; + locals = null; + } + + var args = injectionArgs(fn, locals, serviceName); + if (isArray(fn)) { + fn = fn[fn.length - 1]; + } + + if (!isClass(fn)) { + // http://jsperf.com/angularjs-invoke-apply-vs-switch + // #5388 + return fn.apply(self, args); + } else { + args.unshift(null); + return new (Function.prototype.bind.apply(fn, args))(); + } + } + + + function instantiate(Type, locals, serviceName) { + // Check if Type is annotated and use just the given function at n-1 as parameter + // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]); + var ctor = (isArray(Type) ? Type[Type.length - 1] : Type); + var args = injectionArgs(Type, locals, serviceName); + // Empty object at position 0 is ignored for invocation with `new`, but required. + args.unshift(null); + return new (Function.prototype.bind.apply(ctor, args))(); + } + + + return { + invoke: invoke, + instantiate: instantiate, + get: getService, + annotate: createInjector.$$annotate, + has: function(name) { + return providerCache.hasOwnProperty(name + providerSuffix) || cache.hasOwnProperty(name); + } + }; + } +} + +createInjector.$$annotate = annotate; + +/** + * @ngdoc provider + * @name $anchorScrollProvider + * @this + * + * @description + * Use `$anchorScrollProvider` to disable automatic scrolling whenever + * {@link ng.$location#hash $location.hash()} changes. + */ +function $AnchorScrollProvider() { + + var autoScrollingEnabled = true; + + /** + * @ngdoc method + * @name $anchorScrollProvider#disableAutoScrolling + * + * @description + * By default, {@link ng.$anchorScroll $anchorScroll()} will automatically detect changes to + * {@link ng.$location#hash $location.hash()} and scroll to the element matching the new hash.
+ * Use this method to disable automatic scrolling. + * + * If automatic scrolling is disabled, one must explicitly call + * {@link ng.$anchorScroll $anchorScroll()} in order to scroll to the element related to the + * current hash. + */ + this.disableAutoScrolling = function() { + autoScrollingEnabled = false; + }; + + /** + * @ngdoc service + * @name $anchorScroll + * @kind function + * @requires $window + * @requires $location + * @requires $rootScope + * + * @description + * When called, it scrolls to the element related to the specified `hash` or (if omitted) to the + * current value of {@link ng.$location#hash $location.hash()}, according to the rules specified + * in the + * [HTML5 spec](http://www.w3.org/html/wg/drafts/html/master/browsers.html#an-indicated-part-of-the-document). + * + * It also watches the {@link ng.$location#hash $location.hash()} and automatically scrolls to + * match any anchor whenever it changes. This can be disabled by calling + * {@link ng.$anchorScrollProvider#disableAutoScrolling $anchorScrollProvider.disableAutoScrolling()}. + * + * Additionally, you can use its {@link ng.$anchorScroll#yOffset yOffset} property to specify a + * vertical scroll-offset (either fixed or dynamic). + * + * @param {string=} hash The hash specifying the element to scroll to. If omitted, the value of + * {@link ng.$location#hash $location.hash()} will be used. + * + * @property {(number|function|jqLite)} yOffset + * If set, specifies a vertical scroll-offset. This is often useful when there are fixed + * positioned elements at the top of the page, such as navbars, headers etc. + * + * `yOffset` can be specified in various ways: + * - **number**: A fixed number of pixels to be used as offset.

+ * - **function**: A getter function called everytime `$anchorScroll()` is executed. Must return + * a number representing the offset (in pixels).

+ * - **jqLite**: A jqLite/jQuery element to be used for specifying the offset. The distance from + * the top of the page to the element's bottom will be used as offset.
+ * **Note**: The element will be taken into account only as long as its `position` is set to + * `fixed`. This option is useful, when dealing with responsive navbars/headers that adjust + * their height and/or positioning according to the viewport's size. + * + *
+ *
+ * In order for `yOffset` to work properly, scrolling should take place on the document's root and + * not some child element. + *
+ * + * @example + + +
+ Go to bottom + You're at the bottom! +
+
+ + angular.module('anchorScrollExample', []) + .controller('ScrollController', ['$scope', '$location', '$anchorScroll', + function($scope, $location, $anchorScroll) { + $scope.gotoBottom = function() { + // set the location.hash to the id of + // the element you wish to scroll to. + $location.hash('bottom'); + + // call $anchorScroll() + $anchorScroll(); + }; + }]); + + + #scrollArea { + height: 280px; + overflow: auto; + } + + #bottom { + display: block; + margin-top: 2000px; + } + +
+ * + *
+ * The example below illustrates the use of a vertical scroll-offset (specified as a fixed value). + * See {@link ng.$anchorScroll#yOffset $anchorScroll.yOffset} for more details. + * + * @example + + + +
+ Anchor {{x}} of 5 +
+
+ + angular.module('anchorScrollOffsetExample', []) + .run(['$anchorScroll', function($anchorScroll) { + $anchorScroll.yOffset = 50; // always scroll by 50 extra pixels + }]) + .controller('headerCtrl', ['$anchorScroll', '$location', '$scope', + function($anchorScroll, $location, $scope) { + $scope.gotoAnchor = function(x) { + var newHash = 'anchor' + x; + if ($location.hash() !== newHash) { + // set the $location.hash to `newHash` and + // $anchorScroll will automatically scroll to it + $location.hash('anchor' + x); + } else { + // call $anchorScroll() explicitly, + // since $location.hash hasn't changed + $anchorScroll(); + } + }; + } + ]); + + + body { + padding-top: 50px; + } + + .anchor { + border: 2px dashed DarkOrchid; + padding: 10px 10px 200px 10px; + } + + .fixed-header { + background-color: rgba(0, 0, 0, 0.2); + height: 50px; + position: fixed; + top: 0; left: 0; right: 0; + } + + .fixed-header > a { + display: inline-block; + margin: 5px 15px; + } + +
+ */ + this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) { + var document = $window.document; + + // Helper function to get first anchor from a NodeList + // (using `Array#some()` instead of `angular#forEach()` since it's more performant + // and working in all supported browsers.) + function getFirstAnchor(list) { + var result = null; + Array.prototype.some.call(list, function(element) { + if (nodeName_(element) === 'a') { + result = element; + return true; + } + }); + return result; + } + + function getYOffset() { + + var offset = scroll.yOffset; + + if (isFunction(offset)) { + offset = offset(); + } else if (isElement(offset)) { + var elem = offset[0]; + var style = $window.getComputedStyle(elem); + if (style.position !== 'fixed') { + offset = 0; + } else { + offset = elem.getBoundingClientRect().bottom; + } + } else if (!isNumber(offset)) { + offset = 0; + } + + return offset; + } + + function scrollTo(elem) { + if (elem) { + elem.scrollIntoView(); + + var offset = getYOffset(); + + if (offset) { + // `offset` is the number of pixels we should scroll UP in order to align `elem` properly. + // This is true ONLY if the call to `elem.scrollIntoView()` initially aligns `elem` at the + // top of the viewport. + // + // IF the number of pixels from the top of `elem` to the end of the page's content is less + // than the height of the viewport, then `elem.scrollIntoView()` will align the `elem` some + // way down the page. + // + // This is often the case for elements near the bottom of the page. + // + // In such cases we do not need to scroll the whole `offset` up, just the difference between + // the top of the element and the offset, which is enough to align the top of `elem` at the + // desired position. + var elemTop = elem.getBoundingClientRect().top; + $window.scrollBy(0, elemTop - offset); + } + } else { + $window.scrollTo(0, 0); + } + } + + function scroll(hash) { + // Allow numeric hashes + hash = isString(hash) ? hash : isNumber(hash) ? hash.toString() : $location.hash(); + var elm; + + // empty hash, scroll to the top of the page + if (!hash) scrollTo(null); + + // element with given id + else if ((elm = document.getElementById(hash))) scrollTo(elm); + + // first anchor with given name :-D + else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) scrollTo(elm); + + // no element and hash === 'top', scroll to the top of the page + else if (hash === 'top') scrollTo(null); + } + + // does not scroll when user clicks on anchor link that is currently on + // (no url change, no $location.hash() change), browser native does scroll + if (autoScrollingEnabled) { + $rootScope.$watch(function autoScrollWatch() {return $location.hash();}, + function autoScrollWatchAction(newVal, oldVal) { + // skip the initial scroll if $location.hash is empty + if (newVal === oldVal && newVal === '') return; + + jqLiteDocumentLoaded(function() { + $rootScope.$evalAsync(scroll); + }); + }); + } + + return scroll; + }]; +} + +var $animateMinErr = minErr('$animate'); +var ELEMENT_NODE = 1; +var NG_ANIMATE_CLASSNAME = 'ng-animate'; + +function mergeClasses(a,b) { + if (!a && !b) return ''; + if (!a) return b; + if (!b) return a; + if (isArray(a)) a = a.join(' '); + if (isArray(b)) b = b.join(' '); + return a + ' ' + b; +} + +function extractElementNode(element) { + for (var i = 0; i < element.length; i++) { + var elm = element[i]; + if (elm.nodeType === ELEMENT_NODE) { + return elm; + } + } +} + +function splitClasses(classes) { + if (isString(classes)) { + classes = classes.split(' '); + } + + // Use createMap() to prevent class assumptions involving property names in + // Object.prototype + var obj = createMap(); + forEach(classes, function(klass) { + // sometimes the split leaves empty string values + // incase extra spaces were applied to the options + if (klass.length) { + obj[klass] = true; + } + }); + return obj; +} + +// if any other type of options value besides an Object value is +// passed into the $animate.method() animation then this helper code +// will be run which will ignore it. While this patch is not the +// greatest solution to this, a lot of existing plugins depend on +// $animate to either call the callback (< 1.2) or return a promise +// that can be changed. This helper function ensures that the options +// are wiped clean incase a callback function is provided. +function prepareAnimateOptions(options) { + return isObject(options) + ? options + : {}; +} + +var $$CoreAnimateJsProvider = /** @this */ function() { + this.$get = noop; +}; + +// this is prefixed with Core since it conflicts with +// the animateQueueProvider defined in ngAnimate/animateQueue.js +var $$CoreAnimateQueueProvider = /** @this */ function() { + var postDigestQueue = new NgMap(); + var postDigestElements = []; + + this.$get = ['$$AnimateRunner', '$rootScope', + function($$AnimateRunner, $rootScope) { + return { + enabled: noop, + on: noop, + off: noop, + pin: noop, + + push: function(element, event, options, domOperation) { + if (domOperation) { + domOperation(); + } + + options = options || {}; + if (options.from) { + element.css(options.from); + } + if (options.to) { + element.css(options.to); + } + + if (options.addClass || options.removeClass) { + addRemoveClassesPostDigest(element, options.addClass, options.removeClass); + } + + var runner = new $$AnimateRunner(); + + // since there are no animations to run the runner needs to be + // notified that the animation call is complete. + runner.complete(); + return runner; + } + }; + + + function updateData(data, classes, value) { + var changed = false; + if (classes) { + classes = isString(classes) ? classes.split(' ') : + isArray(classes) ? classes : []; + forEach(classes, function(className) { + if (className) { + changed = true; + data[className] = value; + } + }); + } + return changed; + } + + function handleCSSClassChanges() { + forEach(postDigestElements, function(element) { + var data = postDigestQueue.get(element); + if (data) { + var existing = splitClasses(element.attr('class')); + var toAdd = ''; + var toRemove = ''; + forEach(data, function(status, className) { + var hasClass = !!existing[className]; + if (status !== hasClass) { + if (status) { + toAdd += (toAdd.length ? ' ' : '') + className; + } else { + toRemove += (toRemove.length ? ' ' : '') + className; + } + } + }); + + forEach(element, function(elm) { + if (toAdd) { + jqLiteAddClass(elm, toAdd); + } + if (toRemove) { + jqLiteRemoveClass(elm, toRemove); + } + }); + postDigestQueue.delete(element); + } + }); + postDigestElements.length = 0; + } + + + function addRemoveClassesPostDigest(element, add, remove) { + var data = postDigestQueue.get(element) || {}; + + var classesAdded = updateData(data, add, true); + var classesRemoved = updateData(data, remove, false); + + if (classesAdded || classesRemoved) { + + postDigestQueue.set(element, data); + postDigestElements.push(element); + + if (postDigestElements.length === 1) { + $rootScope.$$postDigest(handleCSSClassChanges); + } + } + } + }]; +}; + +/** + * @ngdoc provider + * @name $animateProvider + * + * @description + * Default implementation of $animate that doesn't perform any animations, instead just + * synchronously performs DOM updates and resolves the returned runner promise. + * + * In order to enable animations the `ngAnimate` module has to be loaded. + * + * To see the functional implementation check out `src/ngAnimate/animate.js`. + */ +var $AnimateProvider = ['$provide', /** @this */ function($provide) { + var provider = this; + var classNameFilter = null; + var customFilter = null; + + this.$$registeredAnimations = Object.create(null); + + /** + * @ngdoc method + * @name $animateProvider#register + * + * @description + * Registers a new injectable animation factory function. The factory function produces the + * animation object which contains callback functions for each event that is expected to be + * animated. + * + * * `eventFn`: `function(element, ... , doneFunction, options)` + * The element to animate, the `doneFunction` and the options fed into the animation. Depending + * on the type of animation additional arguments will be injected into the animation function. The + * list below explains the function signatures for the different animation methods: + * + * - setClass: function(element, addedClasses, removedClasses, doneFunction, options) + * - addClass: function(element, addedClasses, doneFunction, options) + * - removeClass: function(element, removedClasses, doneFunction, options) + * - enter, leave, move: function(element, doneFunction, options) + * - animate: function(element, fromStyles, toStyles, doneFunction, options) + * + * Make sure to trigger the `doneFunction` once the animation is fully complete. + * + * ```js + * return { + * //enter, leave, move signature + * eventFn : function(element, done, options) { + * //code to run the animation + * //once complete, then run done() + * return function endFunction(wasCancelled) { + * //code to cancel the animation + * } + * } + * } + * ``` + * + * @param {string} name The name of the animation (this is what the class-based CSS value will be compared to). + * @param {Function} factory The factory function that will be executed to return the animation + * object. + */ + this.register = function(name, factory) { + if (name && name.charAt(0) !== '.') { + throw $animateMinErr('notcsel', 'Expecting class selector starting with \'.\' got \'{0}\'.', name); + } + + var key = name + '-animation'; + provider.$$registeredAnimations[name.substr(1)] = key; + $provide.factory(key, factory); + }; + + /** + * @ngdoc method + * @name $animateProvider#customFilter + * + * @description + * Sets and/or returns the custom filter function that is used to "filter" animations, i.e. + * determine if an animation is allowed or not. When no filter is specified (the default), no + * animation will be blocked. Setting the `customFilter` value will only allow animations for + * which the filter function's return value is truthy. + * + * This allows to easily create arbitrarily complex rules for filtering animations, such as + * allowing specific events only, or enabling animations on specific subtrees of the DOM, etc. + * Filtering animations can also boost performance for low-powered devices, as well as + * applications containing a lot of structural operations. + * + *
+ * **Best Practice:** + * Keep the filtering function as lean as possible, because it will be called for each DOM + * action (e.g. insertion, removal, class change) performed by "animation-aware" directives. + * See {@link guide/animations#which-directives-support-animations- here} for a list of built-in + * directives that support animations. + * Performing computationally expensive or time-consuming operations on each call of the + * filtering function can make your animations sluggish. + *
+ * + * **Note:** If present, `customFilter` will be checked before + * {@link $animateProvider#classNameFilter classNameFilter}. + * + * @param {Function=} filterFn - The filter function which will be used to filter all animations. + * If a falsy value is returned, no animation will be performed. The function will be called + * with the following arguments: + * - **node** `{DOMElement}` - The DOM element to be animated. + * - **event** `{String}` - The name of the animation event (e.g. `enter`, `leave`, `addClass` + * etc). + * - **options** `{Object}` - A collection of options/styles used for the animation. + * @return {Function} The current filter function or `null` if there is none set. + */ + this.customFilter = function(filterFn) { + if (arguments.length === 1) { + customFilter = isFunction(filterFn) ? filterFn : null; + } + + return customFilter; + }; + + /** + * @ngdoc method + * @name $animateProvider#classNameFilter + * + * @description + * Sets and/or returns the CSS class regular expression that is checked when performing + * an animation. Upon bootstrap the classNameFilter value is not set at all and will + * therefore enable $animate to attempt to perform an animation on any element that is triggered. + * When setting the `classNameFilter` value, animations will only be performed on elements + * that successfully match the filter expression. This in turn can boost performance + * for low-powered devices as well as applications containing a lot of structural operations. + * + * **Note:** If present, `classNameFilter` will be checked after + * {@link $animateProvider#customFilter customFilter}. If `customFilter` is present and returns + * false, `classNameFilter` will not be checked. + * + * @param {RegExp=} expression The className expression which will be checked against all animations + * @return {RegExp} The current CSS className expression value. If null then there is no expression value + */ + this.classNameFilter = function(expression) { + if (arguments.length === 1) { + classNameFilter = (expression instanceof RegExp) ? expression : null; + if (classNameFilter) { + var reservedRegex = new RegExp('[(\\s|\\/)]' + NG_ANIMATE_CLASSNAME + '[(\\s|\\/)]'); + if (reservedRegex.test(classNameFilter.toString())) { + classNameFilter = null; + throw $animateMinErr('nongcls', '$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.', NG_ANIMATE_CLASSNAME); + } + } + } + return classNameFilter; + }; + + this.$get = ['$$animateQueue', function($$animateQueue) { + function domInsert(element, parentElement, afterElement) { + // if for some reason the previous element was removed + // from the dom sometime before this code runs then let's + // just stick to using the parent element as the anchor + if (afterElement) { + var afterNode = extractElementNode(afterElement); + if (afterNode && !afterNode.parentNode && !afterNode.previousElementSibling) { + afterElement = null; + } + } + if (afterElement) { + afterElement.after(element); + } else { + parentElement.prepend(element); + } + } + + /** + * @ngdoc service + * @name $animate + * @description The $animate service exposes a series of DOM utility methods that provide support + * for animation hooks. The default behavior is the application of DOM operations, however, + * when an animation is detected (and animations are enabled), $animate will do the heavy lifting + * to ensure that animation runs with the triggered DOM operation. + * + * By default $animate doesn't trigger any animations. This is because the `ngAnimate` module isn't + * included and only when it is active then the animation hooks that `$animate` triggers will be + * functional. Once active then all structural `ng-` directives will trigger animations as they perform + * their DOM-related operations (enter, leave and move). Other directives such as `ngClass`, + * `ngShow`, `ngHide` and `ngMessages` also provide support for animations. + * + * It is recommended that the`$animate` service is always used when executing DOM-related procedures within directives. + * + * To learn more about enabling animation support, click here to visit the + * {@link ngAnimate ngAnimate module page}. + */ + return { + // we don't call it directly since non-existant arguments may + // be interpreted as null within the sub enabled function + + /** + * + * @ngdoc method + * @name $animate#on + * @kind function + * @description Sets up an event listener to fire whenever the animation event (enter, leave, move, etc...) + * has fired on the given element or among any of its children. Once the listener is fired, the provided callback + * is fired with the following params: + * + * ```js + * $animate.on('enter', container, + * function callback(element, phase) { + * // cool we detected an enter animation within the container + * } + * ); + * ``` + * + * @param {string} event the animation event that will be captured (e.g. enter, leave, move, addClass, removeClass, etc...) + * @param {DOMElement} container the container element that will capture each of the animation events that are fired on itself + * as well as among its children + * @param {Function} callback the callback function that will be fired when the listener is triggered + * + * The arguments present in the callback function are: + * * `element` - The captured DOM element that the animation was fired on. + * * `phase` - The phase of the animation. The two possible phases are **start** (when the animation starts) and **close** (when it ends). + */ + on: $$animateQueue.on, + + /** + * + * @ngdoc method + * @name $animate#off + * @kind function + * @description Deregisters an event listener based on the event which has been associated with the provided element. This method + * can be used in three different ways depending on the arguments: + * + * ```js + * // remove all the animation event listeners listening for `enter` + * $animate.off('enter'); + * + * // remove listeners for all animation events from the container element + * $animate.off(container); + * + * // remove all the animation event listeners listening for `enter` on the given element and its children + * $animate.off('enter', container); + * + * // remove the event listener function provided by `callback` that is set + * // to listen for `enter` on the given `container` as well as its children + * $animate.off('enter', container, callback); + * ``` + * + * @param {string|DOMElement} event|container the animation event (e.g. enter, leave, move, + * addClass, removeClass, etc...), or the container element. If it is the element, all other + * arguments are ignored. + * @param {DOMElement=} container the container element the event listener was placed on + * @param {Function=} callback the callback function that was registered as the listener + */ + off: $$animateQueue.off, + + /** + * @ngdoc method + * @name $animate#pin + * @kind function + * @description Associates the provided element with a host parent element to allow the element to be animated even if it exists + * outside of the DOM structure of the Angular application. By doing so, any animation triggered via `$animate` can be issued on the + * element despite being outside the realm of the application or within another application. Say for example if the application + * was bootstrapped on an element that is somewhere inside of the `` tag, but we wanted to allow for an element to be situated + * as a direct child of `document.body`, then this can be achieved by pinning the element via `$animate.pin(element)`. Keep in mind + * that calling `$animate.pin(element, parentElement)` will not actually insert into the DOM anywhere; it will just create the association. + * + * Note that this feature is only active when the `ngAnimate` module is used. + * + * @param {DOMElement} element the external element that will be pinned + * @param {DOMElement} parentElement the host parent element that will be associated with the external element + */ + pin: $$animateQueue.pin, + + /** + * + * @ngdoc method + * @name $animate#enabled + * @kind function + * @description Used to get and set whether animations are enabled or not on the entire application or on an element and its children. This + * function can be called in four ways: + * + * ```js + * // returns true or false + * $animate.enabled(); + * + * // changes the enabled state for all animations + * $animate.enabled(false); + * $animate.enabled(true); + * + * // returns true or false if animations are enabled for an element + * $animate.enabled(element); + * + * // changes the enabled state for an element and its children + * $animate.enabled(element, true); + * $animate.enabled(element, false); + * ``` + * + * @param {DOMElement=} element the element that will be considered for checking/setting the enabled state + * @param {boolean=} enabled whether or not the animations will be enabled for the element + * + * @return {boolean} whether or not animations are enabled + */ + enabled: $$animateQueue.enabled, + + /** + * @ngdoc method + * @name $animate#cancel + * @kind function + * @description Cancels the provided animation. + * + * @param {Promise} animationPromise The animation promise that is returned when an animation is started. + */ + cancel: function(runner) { + if (runner.end) { + runner.end(); + } + }, + + /** + * + * @ngdoc method + * @name $animate#enter + * @kind function + * @description Inserts the element into the DOM either after the `after` element (if provided) or + * as the first child within the `parent` element and then triggers an animation. + * A promise is returned that will be resolved during the next digest once the animation + * has completed. + * + * @param {DOMElement} element the element which will be inserted into the DOM + * @param {DOMElement} parent the parent element which will append the element as + * a child (so long as the after element is not present) + * @param {DOMElement=} after the sibling element after which the element will be appended + * @param {object=} options an optional collection of options/styles that will be applied to the element. + * The object can have the following properties: + * + * - **addClass** - `{string}` - space-separated CSS classes to add to element + * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to` + * - **removeClass** - `{string}` - space-separated CSS classes to remove from element + * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from` + * + * @return {Promise} the animation callback promise + */ + enter: function(element, parent, after, options) { + parent = parent && jqLite(parent); + after = after && jqLite(after); + parent = parent || after.parent(); + domInsert(element, parent, after); + return $$animateQueue.push(element, 'enter', prepareAnimateOptions(options)); + }, + + /** + * + * @ngdoc method + * @name $animate#move + * @kind function + * @description Inserts (moves) the element into its new position in the DOM either after + * the `after` element (if provided) or as the first child within the `parent` element + * and then triggers an animation. A promise is returned that will be resolved + * during the next digest once the animation has completed. + * + * @param {DOMElement} element the element which will be moved into the new DOM position + * @param {DOMElement} parent the parent element which will append the element as + * a child (so long as the after element is not present) + * @param {DOMElement=} after the sibling element after which the element will be appended + * @param {object=} options an optional collection of options/styles that will be applied to the element. + * The object can have the following properties: + * + * - **addClass** - `{string}` - space-separated CSS classes to add to element + * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to` + * - **removeClass** - `{string}` - space-separated CSS classes to remove from element + * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from` + * + * @return {Promise} the animation callback promise + */ + move: function(element, parent, after, options) { + parent = parent && jqLite(parent); + after = after && jqLite(after); + parent = parent || after.parent(); + domInsert(element, parent, after); + return $$animateQueue.push(element, 'move', prepareAnimateOptions(options)); + }, + + /** + * @ngdoc method + * @name $animate#leave + * @kind function + * @description Triggers an animation and then removes the element from the DOM. + * When the function is called a promise is returned that will be resolved during the next + * digest once the animation has completed. + * + * @param {DOMElement} element the element which will be removed from the DOM + * @param {object=} options an optional collection of options/styles that will be applied to the element. + * The object can have the following properties: + * + * - **addClass** - `{string}` - space-separated CSS classes to add to element + * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to` + * - **removeClass** - `{string}` - space-separated CSS classes to remove from element + * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from` + * + * @return {Promise} the animation callback promise + */ + leave: function(element, options) { + return $$animateQueue.push(element, 'leave', prepareAnimateOptions(options), function() { + element.remove(); + }); + }, + + /** + * @ngdoc method + * @name $animate#addClass + * @kind function + * + * @description Triggers an addClass animation surrounding the addition of the provided CSS class(es). Upon + * execution, the addClass operation will only be handled after the next digest and it will not trigger an + * animation if element already contains the CSS class or if the class is removed at a later step. + * Note that class-based animations are treated differently compared to structural animations + * (like enter, move and leave) since the CSS classes may be added/removed at different points + * depending if CSS or JavaScript animations are used. + * + * @param {DOMElement} element the element which the CSS classes will be applied to + * @param {string} className the CSS class(es) that will be added (multiple classes are separated via spaces) + * @param {object=} options an optional collection of options/styles that will be applied to the element. + * The object can have the following properties: + * + * - **addClass** - `{string}` - space-separated CSS classes to add to element + * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to` + * - **removeClass** - `{string}` - space-separated CSS classes to remove from element + * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from` + * + * @return {Promise} the animation callback promise + */ + addClass: function(element, className, options) { + options = prepareAnimateOptions(options); + options.addClass = mergeClasses(options.addclass, className); + return $$animateQueue.push(element, 'addClass', options); + }, + + /** + * @ngdoc method + * @name $animate#removeClass + * @kind function + * + * @description Triggers a removeClass animation surrounding the removal of the provided CSS class(es). Upon + * execution, the removeClass operation will only be handled after the next digest and it will not trigger an + * animation if element does not contain the CSS class or if the class is added at a later step. + * Note that class-based animations are treated differently compared to structural animations + * (like enter, move and leave) since the CSS classes may be added/removed at different points + * depending if CSS or JavaScript animations are used. + * + * @param {DOMElement} element the element which the CSS classes will be applied to + * @param {string} className the CSS class(es) that will be removed (multiple classes are separated via spaces) + * @param {object=} options an optional collection of options/styles that will be applied to the element. + * The object can have the following properties: + * + * - **addClass** - `{string}` - space-separated CSS classes to add to element + * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to` + * - **removeClass** - `{string}` - space-separated CSS classes to remove from element + * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from` + * + * @return {Promise} the animation callback promise + */ + removeClass: function(element, className, options) { + options = prepareAnimateOptions(options); + options.removeClass = mergeClasses(options.removeClass, className); + return $$animateQueue.push(element, 'removeClass', options); + }, + + /** + * @ngdoc method + * @name $animate#setClass + * @kind function + * + * @description Performs both the addition and removal of a CSS classes on an element and (during the process) + * triggers an animation surrounding the class addition/removal. Much like `$animate.addClass` and + * `$animate.removeClass`, `setClass` will only evaluate the classes being added/removed once a digest has + * passed. Note that class-based animations are treated differently compared to structural animations + * (like enter, move and leave) since the CSS classes may be added/removed at different points + * depending if CSS or JavaScript animations are used. + * + * @param {DOMElement} element the element which the CSS classes will be applied to + * @param {string} add the CSS class(es) that will be added (multiple classes are separated via spaces) + * @param {string} remove the CSS class(es) that will be removed (multiple classes are separated via spaces) + * @param {object=} options an optional collection of options/styles that will be applied to the element. + * The object can have the following properties: + * + * - **addClass** - `{string}` - space-separated CSS classes to add to element + * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to` + * - **removeClass** - `{string}` - space-separated CSS classes to remove from element + * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from` + * + * @return {Promise} the animation callback promise + */ + setClass: function(element, add, remove, options) { + options = prepareAnimateOptions(options); + options.addClass = mergeClasses(options.addClass, add); + options.removeClass = mergeClasses(options.removeClass, remove); + return $$animateQueue.push(element, 'setClass', options); + }, + + /** + * @ngdoc method + * @name $animate#animate + * @kind function + * + * @description Performs an inline animation on the element which applies the provided to and from CSS styles to the element. + * If any detected CSS transition, keyframe or JavaScript matches the provided className value, then the animation will take + * on the provided styles. For example, if a transition animation is set for the given className, then the provided `from` and + * `to` styles will be applied alongside the given transition. If the CSS style provided in `from` does not have a corresponding + * style in `to`, the style in `from` is applied immediately, and no animation is run. + * If a JavaScript animation is detected then the provided styles will be given in as function parameters into the `animate` + * method (or as part of the `options` parameter): + * + * ```js + * ngModule.animation('.my-inline-animation', function() { + * return { + * animate : function(element, from, to, done, options) { + * //animation + * done(); + * } + * } + * }); + * ``` + * + * @param {DOMElement} element the element which the CSS styles will be applied to + * @param {object} from the from (starting) CSS styles that will be applied to the element and across the animation. + * @param {object} to the to (destination) CSS styles that will be applied to the element and across the animation. + * @param {string=} className an optional CSS class that will be applied to the element for the duration of the animation. If + * this value is left as empty then a CSS class of `ng-inline-animate` will be applied to the element. + * (Note that if no animation is detected then this value will not be applied to the element.) + * @param {object=} options an optional collection of options/styles that will be applied to the element. + * The object can have the following properties: + * + * - **addClass** - `{string}` - space-separated CSS classes to add to element + * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to` + * - **removeClass** - `{string}` - space-separated CSS classes to remove from element + * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from` + * + * @return {Promise} the animation callback promise + */ + animate: function(element, from, to, className, options) { + options = prepareAnimateOptions(options); + options.from = options.from ? extend(options.from, from) : from; + options.to = options.to ? extend(options.to, to) : to; + + className = className || 'ng-inline-animate'; + options.tempClasses = mergeClasses(options.tempClasses, className); + return $$animateQueue.push(element, 'animate', options); + } + }; + }]; +}]; + +var $$AnimateAsyncRunFactoryProvider = /** @this */ function() { + this.$get = ['$$rAF', function($$rAF) { + var waitQueue = []; + + function waitForTick(fn) { + waitQueue.push(fn); + if (waitQueue.length > 1) return; + $$rAF(function() { + for (var i = 0; i < waitQueue.length; i++) { + waitQueue[i](); + } + waitQueue = []; + }); + } + + return function() { + var passed = false; + waitForTick(function() { + passed = true; + }); + return function(callback) { + if (passed) { + callback(); + } else { + waitForTick(callback); + } + }; + }; + }]; +}; + +var $$AnimateRunnerFactoryProvider = /** @this */ function() { + this.$get = ['$q', '$sniffer', '$$animateAsyncRun', '$$isDocumentHidden', '$timeout', + function($q, $sniffer, $$animateAsyncRun, $$isDocumentHidden, $timeout) { + + var INITIAL_STATE = 0; + var DONE_PENDING_STATE = 1; + var DONE_COMPLETE_STATE = 2; + + AnimateRunner.chain = function(chain, callback) { + var index = 0; + + next(); + function next() { + if (index === chain.length) { + callback(true); + return; + } + + chain[index](function(response) { + if (response === false) { + callback(false); + return; + } + index++; + next(); + }); + } + }; + + AnimateRunner.all = function(runners, callback) { + var count = 0; + var status = true; + forEach(runners, function(runner) { + runner.done(onProgress); + }); + + function onProgress(response) { + status = status && response; + if (++count === runners.length) { + callback(status); + } + } + }; + + function AnimateRunner(host) { + this.setHost(host); + + var rafTick = $$animateAsyncRun(); + var timeoutTick = function(fn) { + $timeout(fn, 0, false); + }; + + this._doneCallbacks = []; + this._tick = function(fn) { + if ($$isDocumentHidden()) { + timeoutTick(fn); + } else { + rafTick(fn); + } + }; + this._state = 0; + } + + AnimateRunner.prototype = { + setHost: function(host) { + this.host = host || {}; + }, + + done: function(fn) { + if (this._state === DONE_COMPLETE_STATE) { + fn(); + } else { + this._doneCallbacks.push(fn); + } + }, + + progress: noop, + + getPromise: function() { + if (!this.promise) { + var self = this; + this.promise = $q(function(resolve, reject) { + self.done(function(status) { + if (status === false) { + reject(); + } else { + resolve(); + } + }); + }); + } + return this.promise; + }, + + then: function(resolveHandler, rejectHandler) { + return this.getPromise().then(resolveHandler, rejectHandler); + }, + + 'catch': function(handler) { + return this.getPromise()['catch'](handler); + }, + + 'finally': function(handler) { + return this.getPromise()['finally'](handler); + }, + + pause: function() { + if (this.host.pause) { + this.host.pause(); + } + }, + + resume: function() { + if (this.host.resume) { + this.host.resume(); + } + }, + + end: function() { + if (this.host.end) { + this.host.end(); + } + this._resolve(true); + }, + + cancel: function() { + if (this.host.cancel) { + this.host.cancel(); + } + this._resolve(false); + }, + + complete: function(response) { + var self = this; + if (self._state === INITIAL_STATE) { + self._state = DONE_PENDING_STATE; + self._tick(function() { + self._resolve(response); + }); + } + }, + + _resolve: function(response) { + if (this._state !== DONE_COMPLETE_STATE) { + forEach(this._doneCallbacks, function(fn) { + fn(response); + }); + this._doneCallbacks.length = 0; + this._state = DONE_COMPLETE_STATE; + } + } + }; + + return AnimateRunner; + }]; +}; + +/* exported $CoreAnimateCssProvider */ + +/** + * @ngdoc service + * @name $animateCss + * @kind object + * @this + * + * @description + * This is the core version of `$animateCss`. By default, only when the `ngAnimate` is included, + * then the `$animateCss` service will actually perform animations. + * + * Click here {@link ngAnimate.$animateCss to read the documentation for $animateCss}. + */ +var $CoreAnimateCssProvider = function() { + this.$get = ['$$rAF', '$q', '$$AnimateRunner', function($$rAF, $q, $$AnimateRunner) { + + return function(element, initialOptions) { + // all of the animation functions should create + // a copy of the options data, however, if a + // parent service has already created a copy then + // we should stick to using that + var options = initialOptions || {}; + if (!options.$$prepared) { + options = copy(options); + } + + // there is no point in applying the styles since + // there is no animation that goes on at all in + // this version of $animateCss. + if (options.cleanupStyles) { + options.from = options.to = null; + } + + if (options.from) { + element.css(options.from); + options.from = null; + } + + var closed, runner = new $$AnimateRunner(); + return { + start: run, + end: run + }; + + function run() { + $$rAF(function() { + applyAnimationContents(); + if (!closed) { + runner.complete(); + } + closed = true; + }); + return runner; + } + + function applyAnimationContents() { + if (options.addClass) { + element.addClass(options.addClass); + options.addClass = null; + } + if (options.removeClass) { + element.removeClass(options.removeClass); + options.removeClass = null; + } + if (options.to) { + element.css(options.to); + options.to = null; + } + } + }; + }]; +}; + +/* global stripHash: true */ + +/** + * ! This is a private undocumented service ! + * + * @name $browser + * @requires $log + * @description + * This object has two goals: + * + * - hide all the global state in the browser caused by the window object + * - abstract away all the browser specific features and inconsistencies + * + * For tests we provide {@link ngMock.$browser mock implementation} of the `$browser` + * service, which can be used for convenient testing of the application without the interaction with + * the real browser apis. + */ +/** + * @param {object} window The global window object. + * @param {object} document jQuery wrapped document. + * @param {object} $log window.console or an object with the same interface. + * @param {object} $sniffer $sniffer service + */ +function Browser(window, document, $log, $sniffer) { + var self = this, + location = window.location, + history = window.history, + setTimeout = window.setTimeout, + clearTimeout = window.clearTimeout, + pendingDeferIds = {}; + + self.isMock = false; + + var outstandingRequestCount = 0; + var outstandingRequestCallbacks = []; + + // TODO(vojta): remove this temporary api + self.$$completeOutstandingRequest = completeOutstandingRequest; + self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; }; + + /** + * Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks` + * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed. + */ + function completeOutstandingRequest(fn) { + try { + fn.apply(null, sliceArgs(arguments, 1)); + } finally { + outstandingRequestCount--; + if (outstandingRequestCount === 0) { + while (outstandingRequestCallbacks.length) { + try { + outstandingRequestCallbacks.pop()(); + } catch (e) { + $log.error(e); + } + } + } + } + } + + function getHash(url) { + var index = url.indexOf('#'); + return index === -1 ? '' : url.substr(index); + } + + /** + * @private + * Note: this method is used only by scenario runner + * TODO(vojta): prefix this method with $$ ? + * @param {function()} callback Function that will be called when no outstanding request + */ + self.notifyWhenNoOutstandingRequests = function(callback) { + if (outstandingRequestCount === 0) { + callback(); + } else { + outstandingRequestCallbacks.push(callback); + } + }; + + ////////////////////////////////////////////////////////////// + // URL API + ////////////////////////////////////////////////////////////// + + var cachedState, lastHistoryState, + lastBrowserUrl = location.href, + baseElement = document.find('base'), + pendingLocation = null, + getCurrentState = !$sniffer.history ? noop : function getCurrentState() { + try { + return history.state; + } catch (e) { + // MSIE can reportedly throw when there is no state (UNCONFIRMED). + } + }; + + cacheState(); + + /** + * @name $browser#url + * + * @description + * GETTER: + * Without any argument, this method just returns current value of location.href. + * + * SETTER: + * With at least one argument, this method sets url to new value. + * If html5 history api supported, pushState/replaceState is used, otherwise + * location.href/location.replace is used. + * Returns its own instance to allow chaining + * + * NOTE: this api is intended for use only by the $location service. Please use the + * {@link ng.$location $location service} to change url. + * + * @param {string} url New url (when used as setter) + * @param {boolean=} replace Should new url replace current history record? + * @param {object=} state object to use with pushState/replaceState + */ + self.url = function(url, replace, state) { + // In modern browsers `history.state` is `null` by default; treating it separately + // from `undefined` would cause `$browser.url('/foo')` to change `history.state` + // to undefined via `pushState`. Instead, let's change `undefined` to `null` here. + if (isUndefined(state)) { + state = null; + } + + // Android Browser BFCache causes location, history reference to become stale. + if (location !== window.location) location = window.location; + if (history !== window.history) history = window.history; + + // setter + if (url) { + var sameState = lastHistoryState === state; + + // Don't change anything if previous and current URLs and states match. This also prevents + // IE<10 from getting into redirect loop when in LocationHashbangInHtml5Url mode. + // See https://github.com/angular/angular.js/commit/ffb2701 + if (lastBrowserUrl === url && (!$sniffer.history || sameState)) { + return self; + } + var sameBase = lastBrowserUrl && stripHash(lastBrowserUrl) === stripHash(url); + lastBrowserUrl = url; + lastHistoryState = state; + // Don't use history API if only the hash changed + // due to a bug in IE10/IE11 which leads + // to not firing a `hashchange` nor `popstate` event + // in some cases (see #9143). + if ($sniffer.history && (!sameBase || !sameState)) { + history[replace ? 'replaceState' : 'pushState'](state, '', url); + cacheState(); + } else { + if (!sameBase) { + pendingLocation = url; + } + if (replace) { + location.replace(url); + } else if (!sameBase) { + location.href = url; + } else { + location.hash = getHash(url); + } + if (location.href !== url) { + pendingLocation = url; + } + } + if (pendingLocation) { + pendingLocation = url; + } + return self; + // getter + } else { + // - pendingLocation is needed as browsers don't allow to read out + // the new location.href if a reload happened or if there is a bug like in iOS 9 (see + // https://openradar.appspot.com/22186109). + // - the replacement is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=407172 + return pendingLocation || location.href.replace(/%27/g,'\''); + } + }; + + /** + * @name $browser#state + * + * @description + * This method is a getter. + * + * Return history.state or null if history.state is undefined. + * + * @returns {object} state + */ + self.state = function() { + return cachedState; + }; + + var urlChangeListeners = [], + urlChangeInit = false; + + function cacheStateAndFireUrlChange() { + pendingLocation = null; + fireStateOrUrlChange(); + } + + // This variable should be used *only* inside the cacheState function. + var lastCachedState = null; + function cacheState() { + // This should be the only place in $browser where `history.state` is read. + cachedState = getCurrentState(); + cachedState = isUndefined(cachedState) ? null : cachedState; + + // Prevent callbacks fo fire twice if both hashchange & popstate were fired. + if (equals(cachedState, lastCachedState)) { + cachedState = lastCachedState; + } + + lastCachedState = cachedState; + lastHistoryState = cachedState; + } + + function fireStateOrUrlChange() { + var prevLastHistoryState = lastHistoryState; + cacheState(); + + if (lastBrowserUrl === self.url() && prevLastHistoryState === cachedState) { + return; + } + + lastBrowserUrl = self.url(); + lastHistoryState = cachedState; + forEach(urlChangeListeners, function(listener) { + listener(self.url(), cachedState); + }); + } + + /** + * @name $browser#onUrlChange + * + * @description + * Register callback function that will be called, when url changes. + * + * It's only called when the url is changed from outside of angular: + * - user types different url into address bar + * - user clicks on history (forward/back) button + * - user clicks on a link + * + * It's not called when url is changed by $browser.url() method + * + * The listener gets called with new url as parameter. + * + * NOTE: this api is intended for use only by the $location service. Please use the + * {@link ng.$location $location service} to monitor url changes in angular apps. + * + * @param {function(string)} listener Listener function to be called when url changes. + * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous. + */ + self.onUrlChange = function(callback) { + // TODO(vojta): refactor to use node's syntax for events + if (!urlChangeInit) { + // We listen on both (hashchange/popstate) when available, as some browsers don't + // fire popstate when user changes the address bar and don't fire hashchange when url + // changed by push/replaceState + + // html5 history api - popstate event + if ($sniffer.history) jqLite(window).on('popstate', cacheStateAndFireUrlChange); + // hashchange event + jqLite(window).on('hashchange', cacheStateAndFireUrlChange); + + urlChangeInit = true; + } + + urlChangeListeners.push(callback); + return callback; + }; + + /** + * @private + * Remove popstate and hashchange handler from window. + * + * NOTE: this api is intended for use only by $rootScope. + */ + self.$$applicationDestroyed = function() { + jqLite(window).off('hashchange popstate', cacheStateAndFireUrlChange); + }; + + /** + * Checks whether the url has changed outside of Angular. + * Needs to be exported to be able to check for changes that have been done in sync, + * as hashchange/popstate events fire in async. + */ + self.$$checkUrlChange = fireStateOrUrlChange; + + ////////////////////////////////////////////////////////////// + // Misc API + ////////////////////////////////////////////////////////////// + + /** + * @name $browser#baseHref + * + * @description + * Returns current + * (always relative - without domain) + * + * @returns {string} The current base href + */ + self.baseHref = function() { + var href = baseElement.attr('href'); + return href ? href.replace(/^(https?:)?\/\/[^/]*/, '') : ''; + }; + + /** + * @name $browser#defer + * @param {function()} fn A function, who's execution should be deferred. + * @param {number=} [delay=0] of milliseconds to defer the function execution. + * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`. + * + * @description + * Executes a fn asynchronously via `setTimeout(fn, delay)`. + * + * Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using + * `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed + * via `$browser.defer.flush()`. + * + */ + self.defer = function(fn, delay) { + var timeoutId; + outstandingRequestCount++; + timeoutId = setTimeout(function() { + delete pendingDeferIds[timeoutId]; + completeOutstandingRequest(fn); + }, delay || 0); + pendingDeferIds[timeoutId] = true; + return timeoutId; + }; + + + /** + * @name $browser#defer.cancel + * + * @description + * Cancels a deferred task identified with `deferId`. + * + * @param {*} deferId Token returned by the `$browser.defer` function. + * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully + * canceled. + */ + self.defer.cancel = function(deferId) { + if (pendingDeferIds[deferId]) { + delete pendingDeferIds[deferId]; + clearTimeout(deferId); + completeOutstandingRequest(noop); + return true; + } + return false; + }; + +} + +/** @this */ +function $BrowserProvider() { + this.$get = ['$window', '$log', '$sniffer', '$document', + function($window, $log, $sniffer, $document) { + return new Browser($window, $document, $log, $sniffer); + }]; +} + +/** + * @ngdoc service + * @name $cacheFactory + * @this + * + * @description + * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to + * them. + * + * ```js + * + * var cache = $cacheFactory('cacheId'); + * expect($cacheFactory.get('cacheId')).toBe(cache); + * expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined(); + * + * cache.put("key", "value"); + * cache.put("another key", "another value"); + * + * // We've specified no options on creation + * expect(cache.info()).toEqual({id: 'cacheId', size: 2}); + * + * ``` + * + * + * @param {string} cacheId Name or id of the newly created cache. + * @param {object=} options Options object that specifies the cache behavior. Properties: + * + * - `{number=}` `capacity` — turns the cache into LRU cache. + * + * @returns {object} Newly created cache object with the following set of methods: + * + * - `{object}` `info()` — Returns id, size, and options of cache. + * - `{{*}}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache and returns + * it. + * - `{{*}}` `get({string} key)` — Returns cached value for `key` or undefined for cache miss. + * - `{void}` `remove({string} key)` — Removes a key-value pair from the cache. + * - `{void}` `removeAll()` — Removes all cached values. + * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory. + * + * @example + + +
+ + + + +

Cached Values

+
+ + : + +
+ +

Cache Info

+
+ + : + +
+
+
+ + angular.module('cacheExampleApp', []). + controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) { + $scope.keys = []; + $scope.cache = $cacheFactory('cacheId'); + $scope.put = function(key, value) { + if (angular.isUndefined($scope.cache.get(key))) { + $scope.keys.push(key); + } + $scope.cache.put(key, angular.isUndefined(value) ? null : value); + }; + }]); + + + p { + margin: 10px 0 3px; + } + +
+ */ +function $CacheFactoryProvider() { + + this.$get = function() { + var caches = {}; + + function cacheFactory(cacheId, options) { + if (cacheId in caches) { + throw minErr('$cacheFactory')('iid', 'CacheId \'{0}\' is already taken!', cacheId); + } + + var size = 0, + stats = extend({}, options, {id: cacheId}), + data = createMap(), + capacity = (options && options.capacity) || Number.MAX_VALUE, + lruHash = createMap(), + freshEnd = null, + staleEnd = null; + + /** + * @ngdoc type + * @name $cacheFactory.Cache + * + * @description + * A cache object used to store and retrieve data, primarily used by + * {@link $http $http} and the {@link ng.directive:script script} directive to cache + * templates and other data. + * + * ```js + * angular.module('superCache') + * .factory('superCache', ['$cacheFactory', function($cacheFactory) { + * return $cacheFactory('super-cache'); + * }]); + * ``` + * + * Example test: + * + * ```js + * it('should behave like a cache', inject(function(superCache) { + * superCache.put('key', 'value'); + * superCache.put('another key', 'another value'); + * + * expect(superCache.info()).toEqual({ + * id: 'super-cache', + * size: 2 + * }); + * + * superCache.remove('another key'); + * expect(superCache.get('another key')).toBeUndefined(); + * + * superCache.removeAll(); + * expect(superCache.info()).toEqual({ + * id: 'super-cache', + * size: 0 + * }); + * })); + * ``` + */ + return (caches[cacheId] = { + + /** + * @ngdoc method + * @name $cacheFactory.Cache#put + * @kind function + * + * @description + * Inserts a named entry into the {@link $cacheFactory.Cache Cache} object to be + * retrieved later, and incrementing the size of the cache if the key was not already + * present in the cache. If behaving like an LRU cache, it will also remove stale + * entries from the set. + * + * It will not insert undefined values into the cache. + * + * @param {string} key the key under which the cached data is stored. + * @param {*} value the value to store alongside the key. If it is undefined, the key + * will not be stored. + * @returns {*} the value stored. + */ + put: function(key, value) { + if (isUndefined(value)) return; + if (capacity < Number.MAX_VALUE) { + var lruEntry = lruHash[key] || (lruHash[key] = {key: key}); + + refresh(lruEntry); + } + + if (!(key in data)) size++; + data[key] = value; + + if (size > capacity) { + this.remove(staleEnd.key); + } + + return value; + }, + + /** + * @ngdoc method + * @name $cacheFactory.Cache#get + * @kind function + * + * @description + * Retrieves named data stored in the {@link $cacheFactory.Cache Cache} object. + * + * @param {string} key the key of the data to be retrieved + * @returns {*} the value stored. + */ + get: function(key) { + if (capacity < Number.MAX_VALUE) { + var lruEntry = lruHash[key]; + + if (!lruEntry) return; + + refresh(lruEntry); + } + + return data[key]; + }, + + + /** + * @ngdoc method + * @name $cacheFactory.Cache#remove + * @kind function + * + * @description + * Removes an entry from the {@link $cacheFactory.Cache Cache} object. + * + * @param {string} key the key of the entry to be removed + */ + remove: function(key) { + if (capacity < Number.MAX_VALUE) { + var lruEntry = lruHash[key]; + + if (!lruEntry) return; + + if (lruEntry === freshEnd) freshEnd = lruEntry.p; + if (lruEntry === staleEnd) staleEnd = lruEntry.n; + link(lruEntry.n,lruEntry.p); + + delete lruHash[key]; + } + + if (!(key in data)) return; + + delete data[key]; + size--; + }, + + + /** + * @ngdoc method + * @name $cacheFactory.Cache#removeAll + * @kind function + * + * @description + * Clears the cache object of any entries. + */ + removeAll: function() { + data = createMap(); + size = 0; + lruHash = createMap(); + freshEnd = staleEnd = null; + }, + + + /** + * @ngdoc method + * @name $cacheFactory.Cache#destroy + * @kind function + * + * @description + * Destroys the {@link $cacheFactory.Cache Cache} object entirely, + * removing it from the {@link $cacheFactory $cacheFactory} set. + */ + destroy: function() { + data = null; + stats = null; + lruHash = null; + delete caches[cacheId]; + }, + + + /** + * @ngdoc method + * @name $cacheFactory.Cache#info + * @kind function + * + * @description + * Retrieve information regarding a particular {@link $cacheFactory.Cache Cache}. + * + * @returns {object} an object with the following properties: + *
    + *
  • **id**: the id of the cache instance
  • + *
  • **size**: the number of entries kept in the cache instance
  • + *
  • **...**: any additional properties from the options object when creating the + * cache.
  • + *
+ */ + info: function() { + return extend({}, stats, {size: size}); + } + }); + + + /** + * makes the `entry` the freshEnd of the LRU linked list + */ + function refresh(entry) { + if (entry !== freshEnd) { + if (!staleEnd) { + staleEnd = entry; + } else if (staleEnd === entry) { + staleEnd = entry.n; + } + + link(entry.n, entry.p); + link(entry, freshEnd); + freshEnd = entry; + freshEnd.n = null; + } + } + + + /** + * bidirectionally links two entries of the LRU linked list + */ + function link(nextEntry, prevEntry) { + if (nextEntry !== prevEntry) { + if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify + if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify + } + } + } + + + /** + * @ngdoc method + * @name $cacheFactory#info + * + * @description + * Get information about all the caches that have been created + * + * @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info` + */ + cacheFactory.info = function() { + var info = {}; + forEach(caches, function(cache, cacheId) { + info[cacheId] = cache.info(); + }); + return info; + }; + + + /** + * @ngdoc method + * @name $cacheFactory#get + * + * @description + * Get access to a cache object by the `cacheId` used when it was created. + * + * @param {string} cacheId Name or id of a cache to access. + * @returns {object} Cache object identified by the cacheId or undefined if no such cache. + */ + cacheFactory.get = function(cacheId) { + return caches[cacheId]; + }; + + + return cacheFactory; + }; +} + +/** + * @ngdoc service + * @name $templateCache + * @this + * + * @description + * The first time a template is used, it is loaded in the template cache for quick retrieval. You + * can load templates directly into the cache in a `script` tag, or by consuming the + * `$templateCache` service directly. + * + * Adding via the `script` tag: + * + * ```html + * + * ``` + * + * **Note:** the `script` tag containing the template does not need to be included in the `head` of + * the document, but it must be a descendent of the {@link ng.$rootElement $rootElement} (IE, + * element with ng-app attribute), otherwise the template will be ignored. + * + * Adding via the `$templateCache` service: + * + * ```js + * var myApp = angular.module('myApp', []); + * myApp.run(function($templateCache) { + * $templateCache.put('templateId.html', 'This is the content of the template'); + * }); + * ``` + * + * To retrieve the template later, simply use it in your component: + * ```js + * myApp.component('myComponent', { + * templateUrl: 'templateId.html' + * }); + * ``` + * + * or get it via the `$templateCache` service: + * ```js + * $templateCache.get('templateId.html') + * ``` + * + * See {@link ng.$cacheFactory $cacheFactory}. + * + */ +function $TemplateCacheProvider() { + this.$get = ['$cacheFactory', function($cacheFactory) { + return $cacheFactory('templates'); + }]; +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Any commits to this file should be reviewed with security in mind. * + * Changes to this file can potentially create security vulnerabilities. * + * An approval from 2 Core members with history of modifying * + * this file is required. * + * * + * Does the change somehow allow for arbitrary javascript to be executed? * + * Or allows for someone to change the prototype of built-in objects? * + * Or gives undesired access to variables like document or window? * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE! + * + * DOM-related variables: + * + * - "node" - DOM Node + * - "element" - DOM Element or Node + * - "$node" or "$element" - jqLite-wrapped node or element + * + * + * Compiler related stuff: + * + * - "linkFn" - linking fn of a single directive + * - "nodeLinkFn" - function that aggregates all linking fns for a particular node + * - "childLinkFn" - function that aggregates all linking fns for child nodes of a particular node + * - "compositeLinkFn" - function that aggregates all linking fns for a compilation root (nodeList) + */ + + +/** + * @ngdoc service + * @name $compile + * @kind function + * + * @description + * Compiles an HTML string or DOM into a template and produces a template function, which + * can then be used to link {@link ng.$rootScope.Scope `scope`} and the template together. + * + * The compilation is a process of walking the DOM tree and matching DOM elements to + * {@link ng.$compileProvider#directive directives}. + * + *
+ * **Note:** This document is an in-depth reference of all directive options. + * For a gentle introduction to directives with examples of common use cases, + * see the {@link guide/directive directive guide}. + *
+ * + * ## Comprehensive Directive API + * + * There are many different options for a directive. + * + * The difference resides in the return value of the factory function. + * You can either return a {@link $compile#directive-definition-object Directive Definition Object (see below)} + * that defines the directive properties, or just the `postLink` function (all other properties will have + * the default values). + * + *
+ * **Best Practice:** It's recommended to use the "directive definition object" form. + *
+ * + * Here's an example directive declared with a Directive Definition Object: + * + * ```js + * var myModule = angular.module(...); + * + * myModule.directive('directiveName', function factory(injectables) { + * var directiveDefinitionObject = { + * {@link $compile#-priority- priority}: 0, + * {@link $compile#-template- template}: '
', // or // function(tElement, tAttrs) { ... }, + * // or + * // {@link $compile#-templateurl- templateUrl}: 'directive.html', // or // function(tElement, tAttrs) { ... }, + * {@link $compile#-transclude- transclude}: false, + * {@link $compile#-restrict- restrict}: 'A', + * {@link $compile#-templatenamespace- templateNamespace}: 'html', + * {@link $compile#-scope- scope}: false, + * {@link $compile#-controller- controller}: function($scope, $element, $attrs, $transclude, otherInjectables) { ... }, + * {@link $compile#-controlleras- controllerAs}: 'stringIdentifier', + * {@link $compile#-bindtocontroller- bindToController}: false, + * {@link $compile#-require- require}: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'], + * {@link $compile#-multielement- multiElement}: false, + * {@link $compile#-compile- compile}: function compile(tElement, tAttrs, transclude) { + * return { + * {@link $compile#pre-linking-function pre}: function preLink(scope, iElement, iAttrs, controller) { ... }, + * {@link $compile#post-linking-function post}: function postLink(scope, iElement, iAttrs, controller) { ... } + * } + * // or + * // return function postLink( ... ) { ... } + * }, + * // or + * // {@link $compile#-link- link}: { + * // {@link $compile#pre-linking-function pre}: function preLink(scope, iElement, iAttrs, controller) { ... }, + * // {@link $compile#post-linking-function post}: function postLink(scope, iElement, iAttrs, controller) { ... } + * // } + * // or + * // {@link $compile#-link- link}: function postLink( ... ) { ... } + * }; + * return directiveDefinitionObject; + * }); + * ``` + * + *
+ * **Note:** Any unspecified options will use the default value. You can see the default values below. + *
+ * + * Therefore the above can be simplified as: + * + * ```js + * var myModule = angular.module(...); + * + * myModule.directive('directiveName', function factory(injectables) { + * var directiveDefinitionObject = { + * link: function postLink(scope, iElement, iAttrs) { ... } + * }; + * return directiveDefinitionObject; + * // or + * // return function postLink(scope, iElement, iAttrs) { ... } + * }); + * ``` + * + * ### Life-cycle hooks + * Directive controllers can provide the following methods that are called by Angular at points in the life-cycle of the + * directive: + * * `$onInit()` - Called on each controller after all the controllers on an element have been constructed and + * had their bindings initialized (and before the pre & post linking functions for the directives on + * this element). This is a good place to put initialization code for your controller. + * * `$onChanges(changesObj)` - Called whenever one-way (`<`) or interpolation (`@`) bindings are updated. The + * `changesObj` is a hash whose keys are the names of the bound properties that have changed, and the values are an + * object of the form `{ currentValue, previousValue, isFirstChange() }`. Use this hook to trigger updates within a + * component such as cloning the bound value to prevent accidental mutation of the outer value. Note that this will + * also be called when your bindings are initialized. + * * `$doCheck()` - Called on each turn of the digest cycle. Provides an opportunity to detect and act on + * changes. Any actions that you wish to take in response to the changes that you detect must be + * invoked from this hook; implementing this has no effect on when `$onChanges` is called. For example, this hook + * could be useful if you wish to perform a deep equality check, or to check a Date object, changes to which would not + * be detected by Angular's change detector and thus not trigger `$onChanges`. This hook is invoked with no arguments; + * if detecting changes, you must store the previous value(s) for comparison to the current values. + * * `$onDestroy()` - Called on a controller when its containing scope is destroyed. Use this hook for releasing + * external resources, watches and event handlers. Note that components have their `$onDestroy()` hooks called in + * the same order as the `$scope.$broadcast` events are triggered, which is top down. This means that parent + * components will have their `$onDestroy()` hook called before child components. + * * `$postLink()` - Called after this controller's element and its children have been linked. Similar to the post-link + * function this hook can be used to set up DOM event handlers and do direct DOM manipulation. + * Note that child elements that contain `templateUrl` directives will not have been compiled and linked since + * they are waiting for their template to load asynchronously and their own compilation and linking has been + * suspended until that occurs. + * + * #### Comparison with Angular 2 life-cycle hooks + * Angular 2 also uses life-cycle hooks for its components. While the Angular 1 life-cycle hooks are similar there are + * some differences that you should be aware of, especially when it comes to moving your code from Angular 1 to Angular 2: + * + * * Angular 1 hooks are prefixed with `$`, such as `$onInit`. Angular 2 hooks are prefixed with `ng`, such as `ngOnInit`. + * * Angular 1 hooks can be defined on the controller prototype or added to the controller inside its constructor. + * In Angular 2 you can only define hooks on the prototype of the Component class. + * * Due to the differences in change-detection, you may get many more calls to `$doCheck` in Angular 1 than you would to + * `ngDoCheck` in Angular 2 + * * Changes to the model inside `$doCheck` will trigger new turns of the digest loop, which will cause the changes to be + * propagated throughout the application. + * Angular 2 does not allow the `ngDoCheck` hook to trigger a change outside of the component. It will either throw an + * error or do nothing depending upon the state of `enableProdMode()`. + * + * #### Life-cycle hook examples + * + * This example shows how you can check for mutations to a Date object even though the identity of the object + * has not changed. + * + * + * + * angular.module('do-check-module', []) + * .component('app', { + * template: + * 'Month: ' + + * 'Date: {{ $ctrl.date }}' + + * '', + * controller: function() { + * this.date = new Date(); + * this.month = this.date.getMonth(); + * this.updateDate = function() { + * this.date.setMonth(this.month); + * }; + * } + * }) + * .component('test', { + * bindings: { date: '<' }, + * template: + * '
{{ $ctrl.log | json }}
', + * controller: function() { + * var previousValue; + * this.log = []; + * this.$doCheck = function() { + * var currentValue = this.date && this.date.valueOf(); + * if (previousValue !== currentValue) { + * this.log.push('doCheck: date mutated: ' + this.date); + * previousValue = currentValue; + * } + * }; + * } + * }); + *
+ * + * + * + *
+ * + * This example show how you might use `$doCheck` to trigger changes in your component's inputs even if the + * actual identity of the component doesn't change. (Be aware that cloning and deep equality checks on large + * arrays or objects can have a negative impact on your application performance) + * + * + * + *
+ * + * + *
{{ items }}
+ * + *
+ *
+ * + * angular.module('do-check-module', []) + * .component('test', { + * bindings: { items: '<' }, + * template: + * '
{{ $ctrl.log | json }}
', + * controller: function() { + * this.log = []; + * + * this.$doCheck = function() { + * if (this.items_ref !== this.items) { + * this.log.push('doCheck: items changed'); + * this.items_ref = this.items; + * } + * if (!angular.equals(this.items_clone, this.items)) { + * this.log.push('doCheck: items mutated'); + * this.items_clone = angular.copy(this.items); + * } + * }; + * } + * }); + *
+ *
+ * + * + * ### Directive Definition Object + * + * The directive definition object provides instructions to the {@link ng.$compile + * compiler}. The attributes are: + * + * #### `multiElement` + * When this property is set to true (default is `false`), the HTML compiler will collect DOM nodes between + * nodes with the attributes `directive-name-start` and `directive-name-end`, and group them + * together as the directive elements. It is recommended that this feature be used on directives + * which are not strictly behavioral (such as {@link ngClick}), and which + * do not manipulate or replace child nodes (such as {@link ngInclude}). + * + * #### `priority` + * When there are multiple directives defined on a single DOM element, sometimes it + * is necessary to specify the order in which the directives are applied. The `priority` is used + * to sort the directives before their `compile` functions get called. Priority is defined as a + * number. Directives with greater numerical `priority` are compiled first. Pre-link functions + * are also run in priority order, but post-link functions are run in reverse order. The order + * of directives with the same priority is undefined. The default priority is `0`. + * + * #### `terminal` + * If set to true then the current `priority` will be the last set of directives + * which will execute (any directives at the current priority will still execute + * as the order of execution on same `priority` is undefined). Note that expressions + * and other directives used in the directive's template will also be excluded from execution. + * + * #### `scope` + * The scope property can be `false`, `true`, or an object: + * + * * **`false` (default):** No scope will be created for the directive. The directive will use its + * parent's scope. + * + * * **`true`:** A new child scope that prototypically inherits from its parent will be created for + * the directive's element. If multiple directives on the same element request a new scope, + * only one new scope is created. + * + * * **`{...}` (an object hash):** A new "isolate" scope is created for the directive's template. + * The 'isolate' scope differs from normal scope in that it does not prototypically + * inherit from its parent scope. This is useful when creating reusable components, which should not + * accidentally read or modify data in the parent scope. Note that an isolate scope + * directive without a `template` or `templateUrl` will not apply the isolate scope + * to its children elements. + * + * The 'isolate' scope object hash defines a set of local scope properties derived from attributes on the + * directive's element. These local properties are useful for aliasing values for templates. The keys in + * the object hash map to the name of the property on the isolate scope; the values define how the property + * is bound to the parent scope, via matching attributes on the directive's element: + * + * * `@` or `@attr` - bind a local scope property to the value of DOM attribute. The result is + * always a string since DOM attributes are strings. If no `attr` name is specified then the + * attribute name is assumed to be the same as the local name. Given `` and the isolate scope definition `scope: { localName:'@myAttr' }`, + * the directive's scope property `localName` will reflect the interpolated value of `hello + * {{name}}`. As the `name` attribute changes so will the `localName` property on the directive's + * scope. The `name` is read from the parent scope (not the directive's scope). + * + * * `=` or `=attr` - set up a bidirectional binding between a local scope property and an expression + * passed via the attribute `attr`. The expression is evaluated in the context of the parent scope. + * If no `attr` name is specified then the attribute name is assumed to be the same as the local + * name. Given `` and the isolate scope definition `scope: { + * localModel: '=myAttr' }`, the property `localModel` on the directive's scope will reflect the + * value of `parentModel` on the parent scope. Changes to `parentModel` will be reflected in + * `localModel` and vice versa. Optional attributes should be marked as such with a question mark: + * `=?` or `=?attr`. If the binding expression is non-assignable, or if the attribute isn't + * optional and doesn't exist, an exception ({@link error/$compile/nonassign `$compile:nonassign`}) + * will be thrown upon discovering changes to the local value, since it will be impossible to sync + * them back to the parent scope. By default, the {@link ng.$rootScope.Scope#$watch `$watch`} + * method is used for tracking changes, and the equality check is based on object identity. + * However, if an object literal or an array literal is passed as the binding expression, the + * equality check is done by value (using the {@link angular.equals} function). It's also possible + * to watch the evaluated value shallowly with {@link ng.$rootScope.Scope#$watchCollection + * `$watchCollection`}: use `=*` or `=*attr` (`=*?` or `=*?attr` if the attribute is optional). + * + * * `<` or `` and directive definition of + * `scope: { localModel:'` and the isolate scope definition `scope: { + * localFn:'&myAttr' }`, the isolate scope property `localFn` will point to a function wrapper for + * the `count = count + value` expression. Often it's desirable to pass data from the isolated scope + * via an expression to the parent scope. This can be done by passing a map of local variable names + * and values into the expression wrapper fn. For example, if the expression is `increment(amount)` + * then we can specify the amount value by calling the `localFn` as `localFn({amount: 22})`. + * + * In general it's possible to apply more than one directive to one element, but there might be limitations + * depending on the type of scope required by the directives. The following points will help explain these limitations. + * For simplicity only two directives are taken into account, but it is also applicable for several directives: + * + * * **no scope** + **no scope** => Two directives which don't require their own scope will use their parent's scope + * * **child scope** + **no scope** => Both directives will share one single child scope + * * **child scope** + **child scope** => Both directives will share one single child scope + * * **isolated scope** + **no scope** => The isolated directive will use it's own created isolated scope. The other directive will use + * its parent's scope + * * **isolated scope** + **child scope** => **Won't work!** Only one scope can be related to one element. Therefore these directives cannot + * be applied to the same element. + * * **isolated scope** + **isolated scope** => **Won't work!** Only one scope can be related to one element. Therefore these directives + * cannot be applied to the same element. + * + * + * #### `bindToController` + * This property is used to bind scope properties directly to the controller. It can be either + * `true` or an object hash with the same format as the `scope` property. + * + * When an isolate scope is used for a directive (see above), `bindToController: true` will + * allow a component to have its properties bound to the controller, rather than to scope. + * + * After the controller is instantiated, the initial values of the isolate scope bindings will be bound to the controller + * properties. You can access these bindings once they have been initialized by providing a controller method called + * `$onInit`, which is called after all the controllers on an element have been constructed and had their bindings + * initialized. + * + *
+ * **Deprecation warning:** if `$compileProcvider.preAssignBindingsEnabled(true)` was called, bindings for non-ES6 class + * controllers are bound to `this` before the controller constructor is called but this use is now deprecated. Please + * place initialization code that relies upon bindings inside a `$onInit` method on the controller, instead. + *
+ * + * It is also possible to set `bindToController` to an object hash with the same format as the `scope` property. + * This will set up the scope bindings to the controller directly. Note that `scope` can still be used + * to define which kind of scope is created. By default, no scope is created. Use `scope: {}` to create an isolate + * scope (useful for component directives). + * + * If both `bindToController` and `scope` are defined and have object hashes, `bindToController` overrides `scope`. + * + * + * #### `controller` + * Controller constructor function. The controller is instantiated before the + * pre-linking phase and can be accessed by other directives (see + * `require` attribute). This allows the directives to communicate with each other and augment + * each other's behavior. The controller is injectable (and supports bracket notation) with the following locals: + * + * * `$scope` - Current scope associated with the element + * * `$element` - Current element + * * `$attrs` - Current attributes object for the element + * * `$transclude` - A transclude linking function pre-bound to the correct transclusion scope: + * `function([scope], cloneLinkingFn, futureParentElement, slotName)`: + * * `scope`: (optional) override the scope. + * * `cloneLinkingFn`: (optional) argument to create clones of the original transcluded content. + * * `futureParentElement` (optional): + * * defines the parent to which the `cloneLinkingFn` will add the cloned elements. + * * default: `$element.parent()` resp. `$element` for `transclude:'element'` resp. `transclude:true`. + * * only needed for transcludes that are allowed to contain non html elements (e.g. SVG elements) + * and when the `cloneLinkingFn` is passed, + * as those elements need to created and cloned in a special way when they are defined outside their + * usual containers (e.g. like ``). + * * See also the `directive.templateNamespace` property. + * * `slotName`: (optional) the name of the slot to transclude. If falsy (e.g. `null`, `undefined` or `''`) + * then the default transclusion is provided. + * The `$transclude` function also has a method on it, `$transclude.isSlotFilled(slotName)`, which returns + * `true` if the specified slot contains content (i.e. one or more DOM nodes). + * + * #### `require` + * Require another directive and inject its controller as the fourth argument to the linking function. The + * `require` property can be a string, an array or an object: + * * a **string** containing the name of the directive to pass to the linking function + * * an **array** containing the names of directives to pass to the linking function. The argument passed to the + * linking function will be an array of controllers in the same order as the names in the `require` property + * * an **object** whose property values are the names of the directives to pass to the linking function. The argument + * passed to the linking function will also be an object with matching keys, whose values will hold the corresponding + * controllers. + * + * If the `require` property is an object and `bindToController` is truthy, then the required controllers are + * bound to the controller using the keys of the `require` property. This binding occurs after all the controllers + * have been constructed but before `$onInit` is called. + * If the name of the required controller is the same as the local name (the key), the name can be + * omitted. For example, `{parentDir: '^^'}` is equivalent to `{parentDir: '^^parentDir'}`. + * See the {@link $compileProvider#component} helper for an example of how this can be used. + * If no such required directive(s) can be found, or if the directive does not have a controller, then an error is + * raised (unless no link function is specified and the required controllers are not being bound to the directive + * controller, in which case error checking is skipped). The name can be prefixed with: + * + * * (no prefix) - Locate the required controller on the current element. Throw an error if not found. + * * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found. + * * `^` - Locate the required controller by searching the element and its parents. Throw an error if not found. + * * `^^` - Locate the required controller by searching the element's parents. Throw an error if not found. + * * `?^` - Attempt to locate the required controller by searching the element and its parents or pass + * `null` to the `link` fn if not found. + * * `?^^` - Attempt to locate the required controller by searching the element's parents, or pass + * `null` to the `link` fn if not found. + * + * + * #### `controllerAs` + * Identifier name for a reference to the controller in the directive's scope. + * This allows the controller to be referenced from the directive template. This is especially + * useful when a directive is used as component, i.e. with an `isolate` scope. It's also possible + * to use it in a directive without an `isolate` / `new` scope, but you need to be aware that the + * `controllerAs` reference might overwrite a property that already exists on the parent scope. + * + * + * #### `restrict` + * String of subset of `EACM` which restricts the directive to a specific directive + * declaration style. If omitted, the defaults (elements and attributes) are used. + * + * * `E` - Element name (default): `` + * * `A` - Attribute (default): `
` + * * `C` - Class: `
` + * * `M` - Comment: `` + * + * + * #### `templateNamespace` + * String representing the document type used by the markup in the template. + * AngularJS needs this information as those elements need to be created and cloned + * in a special way when they are defined outside their usual containers like `` and ``. + * + * * `html` - All root nodes in the template are HTML. Root nodes may also be + * top-level elements such as `` or ``. + * * `svg` - The root nodes in the template are SVG elements (excluding ``). + * * `math` - The root nodes in the template are MathML elements (excluding ``). + * + * If no `templateNamespace` is specified, then the namespace is considered to be `html`. + * + * #### `template` + * HTML markup that may: + * * Replace the contents of the directive's element (default). + * * Replace the directive's element itself (if `replace` is true - DEPRECATED). + * * Wrap the contents of the directive's element (if `transclude` is true). + * + * Value may be: + * + * * A string. For example `
{{delete_str}}
`. + * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile` + * function api below) and returns a string value. + * + * + * #### `templateUrl` + * This is similar to `template` but the template is loaded from the specified URL, asynchronously. + * + * Because template loading is asynchronous the compiler will suspend compilation of directives on that element + * for later when the template has been resolved. In the meantime it will continue to compile and link + * sibling and parent elements as though this element had not contained any directives. + * + * The compiler does not suspend the entire compilation to wait for templates to be loaded because this + * would result in the whole app "stalling" until all templates are loaded asynchronously - even in the + * case when only one deeply nested directive has `templateUrl`. + * + * Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache} + * + * You can specify `templateUrl` as a string representing the URL or as a function which takes two + * arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns + * a string value representing the url. In either case, the template URL is passed through {@link + * $sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}. + * + * + * #### `replace` ([*DEPRECATED*!], will be removed in next major release - i.e. v2.0) + * specify what the template should replace. Defaults to `false`. + * + * * `true` - the template will replace the directive's element. + * * `false` - the template will replace the contents of the directive's element. + * + * The replacement process migrates all of the attributes / classes from the old element to the new + * one. See the {@link guide/directive#template-expanding-directive + * Directives Guide} for an example. + * + * There are very few scenarios where element replacement is required for the application function, + * the main one being reusable custom components that are used within SVG contexts + * (because SVG doesn't work with custom elements in the DOM tree). + * + * #### `transclude` + * Extract the contents of the element where the directive appears and make it available to the directive. + * The contents are compiled and provided to the directive as a **transclusion function**. See the + * {@link $compile#transclusion Transclusion} section below. + * + * + * #### `compile` + * + * ```js + * function compile(tElement, tAttrs, transclude) { ... } + * ``` + * + * The compile function deals with transforming the template DOM. Since most directives do not do + * template transformation, it is not used often. The compile function takes the following arguments: + * + * * `tElement` - template element - The element where the directive has been declared. It is + * safe to do template transformation on the element and child elements only. + * + * * `tAttrs` - template attributes - Normalized list of attributes declared on this element shared + * between all directive compile functions. + * + * * `transclude` - [*DEPRECATED*!] A transclude linking function: `function(scope, cloneLinkingFn)` + * + *
+ * **Note:** The template instance and the link instance may be different objects if the template has + * been cloned. For this reason it is **not** safe to do anything other than DOM transformations that + * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration + * should be done in a linking function rather than in a compile function. + *
+ + *
+ * **Note:** The compile function cannot handle directives that recursively use themselves in their + * own templates or compile functions. Compiling these directives results in an infinite loop and + * stack overflow errors. + * + * This can be avoided by manually using $compile in the postLink function to imperatively compile + * a directive's template instead of relying on automatic template compilation via `template` or + * `templateUrl` declaration or manual compilation inside the compile function. + *
+ * + *
+ * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it + * e.g. does not know about the right outer scope. Please use the transclude function that is passed + * to the link function instead. + *
+ + * A compile function can have a return value which can be either a function or an object. + * + * * returning a (post-link) function - is equivalent to registering the linking function via the + * `link` property of the config object when the compile function is empty. + * + * * returning an object with function(s) registered via `pre` and `post` properties - allows you to + * control when a linking function should be called during the linking phase. See info about + * pre-linking and post-linking functions below. + * + * + * #### `link` + * This property is used only if the `compile` property is not defined. + * + * ```js + * function link(scope, iElement, iAttrs, controller, transcludeFn) { ... } + * ``` + * + * The link function is responsible for registering DOM listeners as well as updating the DOM. It is + * executed after the template has been cloned. This is where most of the directive logic will be + * put. + * + * * `scope` - {@link ng.$rootScope.Scope Scope} - The scope to be used by the + * directive for registering {@link ng.$rootScope.Scope#$watch watches}. + * + * * `iElement` - instance element - The element where the directive is to be used. It is safe to + * manipulate the children of the element only in `postLink` function since the children have + * already been linked. + * + * * `iAttrs` - instance attributes - Normalized list of attributes declared on this element shared + * between all directive linking functions. + * + * * `controller` - the directive's required controller instance(s) - Instances are shared + * among all directives, which allows the directives to use the controllers as a communication + * channel. The exact value depends on the directive's `require` property: + * * no controller(s) required: the directive's own controller, or `undefined` if it doesn't have one + * * `string`: the controller instance + * * `array`: array of controller instances + * + * If a required controller cannot be found, and it is optional, the instance is `null`, + * otherwise the {@link error:$compile:ctreq Missing Required Controller} error is thrown. + * + * Note that you can also require the directive's own controller - it will be made available like + * any other controller. + * + * * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope. + * This is the same as the `$transclude` parameter of directive controllers, + * see {@link ng.$compile#-controller- the controller section for details}. + * `function([scope], cloneLinkingFn, futureParentElement)`. + * + * #### Pre-linking function + * + * Executed before the child elements are linked. Not safe to do DOM transformation since the + * compiler linking function will fail to locate the correct elements for linking. + * + * #### Post-linking function + * + * Executed after the child elements are linked. + * + * Note that child elements that contain `templateUrl` directives will not have been compiled + * and linked since they are waiting for their template to load asynchronously and their own + * compilation and linking has been suspended until that occurs. + * + * It is safe to do DOM transformation in the post-linking function on elements that are not waiting + * for their async templates to be resolved. + * + * + * ### Transclusion + * + * Transclusion is the process of extracting a collection of DOM elements from one part of the DOM and + * copying them to another part of the DOM, while maintaining their connection to the original AngularJS + * scope from where they were taken. + * + * Transclusion is used (often with {@link ngTransclude}) to insert the + * original contents of a directive's element into a specified place in the template of the directive. + * The benefit of transclusion, over simply moving the DOM elements manually, is that the transcluded + * content has access to the properties on the scope from which it was taken, even if the directive + * has isolated scope. + * See the {@link guide/directive#creating-a-directive-that-wraps-other-elements Directives Guide}. + * + * This makes it possible for the widget to have private state for its template, while the transcluded + * content has access to its originating scope. + * + *
+ * **Note:** When testing an element transclude directive you must not place the directive at the root of the + * DOM fragment that is being compiled. See {@link guide/unit-testing#testing-transclusion-directives + * Testing Transclusion Directives}. + *
+ * + * There are three kinds of transclusion depending upon whether you want to transclude just the contents of the + * directive's element, the entire element or multiple parts of the element contents: + * + * * `true` - transclude the content (i.e. the child nodes) of the directive's element. + * * `'element'` - transclude the whole of the directive's element including any directives on this + * element that defined at a lower priority than this directive. When used, the `template` + * property is ignored. + * * **`{...}` (an object hash):** - map elements of the content onto transclusion "slots" in the template. + * + * **Mult-slot transclusion** is declared by providing an object for the `transclude` property. + * + * This object is a map where the keys are the name of the slot to fill and the value is an element selector + * used to match the HTML to the slot. The element selector should be in normalized form (e.g. `myElement`) + * and will match the standard element variants (e.g. `my-element`, `my:element`, `data-my-element`, etc). + * + * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives} + * + * If the element selector is prefixed with a `?` then that slot is optional. + * + * For example, the transclude object `{ slotA: '?myCustomElement' }` maps `` elements to + * the `slotA` slot, which can be accessed via the `$transclude` function or via the {@link ngTransclude} directive. + * + * Slots that are not marked as optional (`?`) will trigger a compile time error if there are no matching elements + * in the transclude content. If you wish to know if an optional slot was filled with content, then you can call + * `$transclude.isSlotFilled(slotName)` on the transclude function passed to the directive's link function and + * injectable into the directive's controller. + * + * + * #### Transclusion Functions + * + * When a directive requests transclusion, the compiler extracts its contents and provides a **transclusion + * function** to the directive's `link` function and `controller`. This transclusion function is a special + * **linking function** that will return the compiled contents linked to a new transclusion scope. + * + *
+ * If you are just using {@link ngTransclude} then you don't need to worry about this function, since + * ngTransclude will deal with it for us. + *
+ * + * If you want to manually control the insertion and removal of the transcluded content in your directive + * then you must use this transclude function. When you call a transclude function it returns a a jqLite/JQuery + * object that contains the compiled DOM, which is linked to the correct transclusion scope. + * + * When you call a transclusion function you can pass in a **clone attach function**. This function accepts + * two parameters, `function(clone, scope) { ... }`, where the `clone` is a fresh compiled copy of your transcluded + * content and the `scope` is the newly created transclusion scope, which the clone will be linked to. + * + *
+ * **Best Practice**: Always provide a `cloneFn` (clone attach function) when you call a transclude function + * since you then get a fresh clone of the original DOM and also have access to the new transclusion scope. + *
+ * + * It is normal practice to attach your transcluded content (`clone`) to the DOM inside your **clone + * attach function**: + * + * ```js + * var transcludedContent, transclusionScope; + * + * $transclude(function(clone, scope) { + * element.append(clone); + * transcludedContent = clone; + * transclusionScope = scope; + * }); + * ``` + * + * Later, if you want to remove the transcluded content from your DOM then you should also destroy the + * associated transclusion scope: + * + * ```js + * transcludedContent.remove(); + * transclusionScope.$destroy(); + * ``` + * + *
+ * **Best Practice**: if you intend to add and remove transcluded content manually in your directive + * (by calling the transclude function to get the DOM and calling `element.remove()` to remove it), + * then you are also responsible for calling `$destroy` on the transclusion scope. + *
+ * + * The built-in DOM manipulation directives, such as {@link ngIf}, {@link ngSwitch} and {@link ngRepeat} + * automatically destroy their transcluded clones as necessary so you do not need to worry about this if + * you are simply using {@link ngTransclude} to inject the transclusion into your directive. + * + * + * #### Transclusion Scopes + * + * When you call a transclude function it returns a DOM fragment that is pre-bound to a **transclusion + * scope**. This scope is special, in that it is a child of the directive's scope (and so gets destroyed + * when the directive's scope gets destroyed) but it inherits the properties of the scope from which it + * was taken. + * + * For example consider a directive that uses transclusion and isolated scope. The DOM hierarchy might look + * like this: + * + * ```html + *
+ *
+ *
+ *
+ *
+ *
+ * ``` + * + * The `$parent` scope hierarchy will look like this: + * + ``` + - $rootScope + - isolate + - transclusion + ``` + * + * but the scopes will inherit prototypically from different scopes to their `$parent`. + * + ``` + - $rootScope + - transclusion + - isolate + ``` + * + * + * ### Attributes + * + * The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the + * `link()` or `compile()` functions. It has a variety of uses. + * + * * *Accessing normalized attribute names:* Directives like 'ngBind' can be expressed in many ways: + * 'ng:bind', `data-ng-bind`, or 'x-ng-bind'. The attributes object allows for normalized access + * to the attributes. + * + * * *Directive inter-communication:* All directives share the same instance of the attributes + * object which allows the directives to use the attributes object as inter directive + * communication. + * + * * *Supports interpolation:* Interpolation attributes are assigned to the attribute object + * allowing other directives to read the interpolated value. + * + * * *Observing interpolated attributes:* Use `$observe` to observe the value changes of attributes + * that contain interpolation (e.g. `src="{{bar}}"`). Not only is this very efficient but it's also + * the only way to easily get the actual value because during the linking phase the interpolation + * hasn't been evaluated yet and so the value is at this time set to `undefined`. + * + * ```js + * function linkingFn(scope, elm, attrs, ctrl) { + * // get the attribute value + * console.log(attrs.ngModel); + * + * // change the attribute + * attrs.$set('ngModel', 'new value'); + * + * // observe changes to interpolated attribute + * attrs.$observe('ngModel', function(value) { + * console.log('ngModel has changed value to ' + value); + * }); + * } + * ``` + * + * ## Example + * + *
+ * **Note**: Typically directives are registered with `module.directive`. The example below is + * to illustrate how `$compile` works. + *
+ * + + + +
+
+
+
+
+
+ + it('should auto compile', function() { + var textarea = $('textarea'); + var output = $('div[compile]'); + // The initial state reads 'Hello Angular'. + expect(output.getText()).toBe('Hello Angular'); + textarea.clear(); + textarea.sendKeys('{{name}}!'); + expect(output.getText()).toBe('Angular!'); + }); + +
+ + * + * + * @param {string|DOMElement} element Element or HTML string to compile into a template function. + * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives - DEPRECATED. + * + *
+ * **Note:** Passing a `transclude` function to the $compile function is deprecated, as it + * e.g. will not use the right outer scope. Please pass the transclude function as a + * `parentBoundTranscludeFn` to the link function instead. + *
+ * + * @param {number} maxPriority only apply directives lower than given priority (Only effects the + * root element(s), not their children) + * @returns {function(scope, cloneAttachFn=, options=)} a link function which is used to bind template + * (a DOM element/tree) to a scope. Where: + * + * * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to. + * * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the + * `template` and call the `cloneAttachFn` function allowing the caller to attach the + * cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is + * called as:
`cloneAttachFn(clonedElement, scope)` where: + * + * * `clonedElement` - is a clone of the original `element` passed into the compiler. + * * `scope` - is the current scope with which the linking function is working with. + * + * * `options` - An optional object hash with linking options. If `options` is provided, then the following + * keys may be used to control linking behavior: + * + * * `parentBoundTranscludeFn` - the transclude function made available to + * directives; if given, it will be passed through to the link functions of + * directives found in `element` during compilation. + * * `transcludeControllers` - an object hash with keys that map controller names + * to a hash with the key `instance`, which maps to the controller instance; + * if given, it will make the controllers available to directives on the compileNode: + * ``` + * { + * parent: { + * instance: parentControllerInstance + * } + * } + * ``` + * * `futureParentElement` - defines the parent to which the `cloneAttachFn` will add + * the cloned elements; only needed for transcludes that are allowed to contain non html + * elements (e.g. SVG elements). See also the directive.controller property. + * + * Calling the linking function returns the element of the template. It is either the original + * element passed in, or the clone of the element if the `cloneAttachFn` is provided. + * + * After linking the view is not updated until after a call to $digest which typically is done by + * Angular automatically. + * + * If you need access to the bound view, there are two ways to do it: + * + * - If you are not asking the linking function to clone the template, create the DOM element(s) + * before you send them to the compiler and keep this reference around. + * ```js + * var element = $compile('

{{total}}

')(scope); + * ``` + * + * - if on the other hand, you need the element to be cloned, the view reference from the original + * example would not point to the clone, but rather to the original template that was cloned. In + * this case, you can access the clone via the cloneAttachFn: + * ```js + * var templateElement = angular.element('

{{total}}

'), + * scope = ....; + * + * var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) { + * //attach the clone to DOM document at the right place + * }); + * + * //now we have reference to the cloned DOM via `clonedElement` + * ``` + * + * + * For information on how the compiler works, see the + * {@link guide/compiler Angular HTML Compiler} section of the Developer Guide. + * + * @knownIssue + * + * ### Double Compilation + * + Double compilation occurs when an already compiled part of the DOM gets + compiled again. This is an undesired effect and can lead to misbehaving directives, performance issues, + and memory leaks. Refer to the Compiler Guide {@link guide/compiler#double-compilation-and-how-to-avoid-it + section on double compilation} for an in-depth explanation and ways to avoid it. + * + */ + +var $compileMinErr = minErr('$compile'); + +function UNINITIALIZED_VALUE() {} +var _UNINITIALIZED_VALUE = new UNINITIALIZED_VALUE(); + +/** + * @ngdoc provider + * @name $compileProvider + * + * @description + */ +$CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider']; +/** @this */ +function $CompileProvider($provide, $$sanitizeUriProvider) { + var hasDirectives = {}, + Suffix = 'Directive', + COMMENT_DIRECTIVE_REGEXP = /^\s*directive:\s*([\w-]+)\s+(.*)$/, + CLASS_DIRECTIVE_REGEXP = /(([\w-]+)(?::([^;]+))?;?)/, + ALL_OR_NOTHING_ATTRS = makeMap('ngSrc,ngSrcset,src,srcset'), + REQUIRE_PREFIX_REGEXP = /^(?:(\^\^?)?(\?)?(\^\^?)?)?/; + + // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes + // The assumption is that future DOM event attribute names will begin with + // 'on' and be composed of only English letters. + var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/; + var bindingCache = createMap(); + + function parseIsolateBindings(scope, directiveName, isController) { + var LOCAL_REGEXP = /^\s*([@&<]|=(\*?))(\??)\s*([\w$]*)\s*$/; + + var bindings = createMap(); + + forEach(scope, function(definition, scopeName) { + if (definition in bindingCache) { + bindings[scopeName] = bindingCache[definition]; + return; + } + var match = definition.match(LOCAL_REGEXP); + + if (!match) { + throw $compileMinErr('iscp', + 'Invalid {3} for directive \'{0}\'.' + + ' Definition: {... {1}: \'{2}\' ...}', + directiveName, scopeName, definition, + (isController ? 'controller bindings definition' : + 'isolate scope definition')); + } + + bindings[scopeName] = { + mode: match[1][0], + collection: match[2] === '*', + optional: match[3] === '?', + attrName: match[4] || scopeName + }; + if (match[4]) { + bindingCache[definition] = bindings[scopeName]; + } + }); + + return bindings; + } + + function parseDirectiveBindings(directive, directiveName) { + var bindings = { + isolateScope: null, + bindToController: null + }; + if (isObject(directive.scope)) { + if (directive.bindToController === true) { + bindings.bindToController = parseIsolateBindings(directive.scope, + directiveName, true); + bindings.isolateScope = {}; + } else { + bindings.isolateScope = parseIsolateBindings(directive.scope, + directiveName, false); + } + } + if (isObject(directive.bindToController)) { + bindings.bindToController = + parseIsolateBindings(directive.bindToController, directiveName, true); + } + if (bindings.bindToController && !directive.controller) { + // There is no controller + throw $compileMinErr('noctrl', + 'Cannot bind to controller without directive \'{0}\'s controller.', + directiveName); + } + return bindings; + } + + function assertValidDirectiveName(name) { + var letter = name.charAt(0); + if (!letter || letter !== lowercase(letter)) { + throw $compileMinErr('baddir', 'Directive/Component name \'{0}\' is invalid. The first character must be a lowercase letter', name); + } + if (name !== name.trim()) { + throw $compileMinErr('baddir', + 'Directive/Component name \'{0}\' is invalid. The name should not contain leading or trailing whitespaces', + name); + } + } + + function getDirectiveRequire(directive) { + var require = directive.require || (directive.controller && directive.name); + + if (!isArray(require) && isObject(require)) { + forEach(require, function(value, key) { + var match = value.match(REQUIRE_PREFIX_REGEXP); + var name = value.substring(match[0].length); + if (!name) require[key] = match[0] + key; + }); + } + + return require; + } + + function getDirectiveRestrict(restrict, name) { + if (restrict && !(isString(restrict) && /[EACM]/.test(restrict))) { + throw $compileMinErr('badrestrict', + 'Restrict property \'{0}\' of directive \'{1}\' is invalid', + restrict, + name); + } + + return restrict || 'EA'; + } + + /** + * @ngdoc method + * @name $compileProvider#directive + * @kind function + * + * @description + * Register a new directive with the compiler. + * + * @param {string|Object} name Name of the directive in camel-case (i.e. ngBind which + * will match as ng-bind), or an object map of directives where the keys are the + * names and the values are the factories. + * @param {Function|Array} directiveFactory An injectable directive factory function. See the + * {@link guide/directive directive guide} and the {@link $compile compile API} for more info. + * @returns {ng.$compileProvider} Self for chaining. + */ + this.directive = function registerDirective(name, directiveFactory) { + assertArg(name, 'name'); + assertNotHasOwnProperty(name, 'directive'); + if (isString(name)) { + assertValidDirectiveName(name); + assertArg(directiveFactory, 'directiveFactory'); + if (!hasDirectives.hasOwnProperty(name)) { + hasDirectives[name] = []; + $provide.factory(name + Suffix, ['$injector', '$exceptionHandler', + function($injector, $exceptionHandler) { + var directives = []; + forEach(hasDirectives[name], function(directiveFactory, index) { + try { + var directive = $injector.invoke(directiveFactory); + if (isFunction(directive)) { + directive = { compile: valueFn(directive) }; + } else if (!directive.compile && directive.link) { + directive.compile = valueFn(directive.link); + } + directive.priority = directive.priority || 0; + directive.index = index; + directive.name = directive.name || name; + directive.require = getDirectiveRequire(directive); + directive.restrict = getDirectiveRestrict(directive.restrict, name); + directive.$$moduleName = directiveFactory.$$moduleName; + directives.push(directive); + } catch (e) { + $exceptionHandler(e); + } + }); + return directives; + }]); + } + hasDirectives[name].push(directiveFactory); + } else { + forEach(name, reverseParams(registerDirective)); + } + return this; + }; + + /** + * @ngdoc method + * @name $compileProvider#component + * @module ng + * @param {string|Object} name Name of the component in camelCase (i.e. `myComp` which will match ``), + * or an object map of components where the keys are the names and the values are the component definition objects. + * @param {Object} options Component definition object (a simplified + * {@link ng.$compile#directive-definition-object directive definition object}), + * with the following properties (all optional): + * + * - `controller` – `{(string|function()=}` – controller constructor function that should be + * associated with newly created scope or the name of a {@link ng.$compile#-controller- + * registered controller} if passed as a string. An empty `noop` function by default. + * - `controllerAs` – `{string=}` – identifier name for to reference the controller in the component's scope. + * If present, the controller will be published to scope under the `controllerAs` name. + * If not present, this will default to be `$ctrl`. + * - `template` – `{string=|function()=}` – html template as a string or a function that + * returns an html template as a string which should be used as the contents of this component. + * Empty string by default. + * + * If `template` is a function, then it is {@link auto.$injector#invoke injected} with + * the following locals: + * + * - `$element` - Current element + * - `$attrs` - Current attributes object for the element + * + * - `templateUrl` – `{string=|function()=}` – path or function that returns a path to an html + * template that should be used as the contents of this component. + * + * If `templateUrl` is a function, then it is {@link auto.$injector#invoke injected} with + * the following locals: + * + * - `$element` - Current element + * - `$attrs` - Current attributes object for the element + * + * - `bindings` – `{object=}` – defines bindings between DOM attributes and component properties. + * Component properties are always bound to the component controller and not to the scope. + * See {@link ng.$compile#-bindtocontroller- `bindToController`}. + * - `transclude` – `{boolean=}` – whether {@link $compile#transclusion content transclusion} is enabled. + * Disabled by default. + * - `require` - `{Object=}` - requires the controllers of other directives and binds them to + * this component's controller. The object keys specify the property names under which the required + * controllers (object values) will be bound. See {@link ng.$compile#-require- `require`}. + * - `$...` – additional properties to attach to the directive factory function and the controller + * constructor function. (This is used by the component router to annotate) + * + * @returns {ng.$compileProvider} the compile provider itself, for chaining of function calls. + * @description + * Register a **component definition** with the compiler. This is a shorthand for registering a special + * type of directive, which represents a self-contained UI component in your application. Such components + * are always isolated (i.e. `scope: {}`) and are always restricted to elements (i.e. `restrict: 'E'`). + * + * Component definitions are very simple and do not require as much configuration as defining general + * directives. Component definitions usually consist only of a template and a controller backing it. + * + * In order to make the definition easier, components enforce best practices like use of `controllerAs`, + * `bindToController`. They always have **isolate scope** and are restricted to elements. + * + * Here are a few examples of how you would usually define components: + * + * ```js + * var myMod = angular.module(...); + * myMod.component('myComp', { + * template: '
My name is {{$ctrl.name}}
', + * controller: function() { + * this.name = 'shahar'; + * } + * }); + * + * myMod.component('myComp', { + * template: '
My name is {{$ctrl.name}}
', + * bindings: {name: '@'} + * }); + * + * myMod.component('myComp', { + * templateUrl: 'views/my-comp.html', + * controller: 'MyCtrl', + * controllerAs: 'ctrl', + * bindings: {name: '@'} + * }); + * + * ``` + * For more examples, and an in-depth guide, see the {@link guide/component component guide}. + * + *
+ * See also {@link ng.$compileProvider#directive $compileProvider.directive()}. + */ + this.component = function registerComponent(name, options) { + if (!isString(name)) { + forEach(name, reverseParams(bind(this, registerComponent))); + return this; + } + + var controller = options.controller || function() {}; + + function factory($injector) { + function makeInjectable(fn) { + if (isFunction(fn) || isArray(fn)) { + return /** @this */ function(tElement, tAttrs) { + return $injector.invoke(fn, this, {$element: tElement, $attrs: tAttrs}); + }; + } else { + return fn; + } + } + + var template = (!options.template && !options.templateUrl ? '' : options.template); + var ddo = { + controller: controller, + controllerAs: identifierForController(options.controller) || options.controllerAs || '$ctrl', + template: makeInjectable(template), + templateUrl: makeInjectable(options.templateUrl), + transclude: options.transclude, + scope: {}, + bindToController: options.bindings || {}, + restrict: 'E', + require: options.require + }; + + // Copy annotations (starting with $) over to the DDO + forEach(options, function(val, key) { + if (key.charAt(0) === '$') ddo[key] = val; + }); + + return ddo; + } + + // TODO(pete) remove the following `forEach` before we release 1.6.0 + // The component-router@0.2.0 looks for the annotations on the controller constructor + // Nothing in Angular looks for annotations on the factory function but we can't remove + // it from 1.5.x yet. + + // Copy any annotation properties (starting with $) over to the factory and controller constructor functions + // These could be used by libraries such as the new component router + forEach(options, function(val, key) { + if (key.charAt(0) === '$') { + factory[key] = val; + // Don't try to copy over annotations to named controller + if (isFunction(controller)) controller[key] = val; + } + }); + + factory.$inject = ['$injector']; + + return this.directive(name, factory); + }; + + + /** + * @ngdoc method + * @name $compileProvider#aHrefSanitizationWhitelist + * @kind function + * + * @description + * Retrieves or overrides the default regular expression that is used for whitelisting of safe + * urls during a[href] sanitization. + * + * The sanitization is a security measure aimed at preventing XSS attacks via html links. + * + * Any url about to be assigned to a[href] via data-binding is first normalized and turned into + * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist` + * regular expression. If a match is found, the original url is written into the dom. Otherwise, + * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM. + * + * @param {RegExp=} regexp New regexp to whitelist urls with. + * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for + * chaining otherwise. + */ + this.aHrefSanitizationWhitelist = function(regexp) { + if (isDefined(regexp)) { + $$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp); + return this; + } else { + return $$sanitizeUriProvider.aHrefSanitizationWhitelist(); + } + }; + + + /** + * @ngdoc method + * @name $compileProvider#imgSrcSanitizationWhitelist + * @kind function + * + * @description + * Retrieves or overrides the default regular expression that is used for whitelisting of safe + * urls during img[src] sanitization. + * + * The sanitization is a security measure aimed at prevent XSS attacks via html links. + * + * Any url about to be assigned to img[src] via data-binding is first normalized and turned into + * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist` + * regular expression. If a match is found, the original url is written into the dom. Otherwise, + * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM. + * + * @param {RegExp=} regexp New regexp to whitelist urls with. + * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for + * chaining otherwise. + */ + this.imgSrcSanitizationWhitelist = function(regexp) { + if (isDefined(regexp)) { + $$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp); + return this; + } else { + return $$sanitizeUriProvider.imgSrcSanitizationWhitelist(); + } + }; + + /** + * @ngdoc method + * @name $compileProvider#debugInfoEnabled + * + * @param {boolean=} enabled update the debugInfoEnabled state if provided, otherwise just return the + * current debugInfoEnabled state + * @returns {*} current value if used as getter or itself (chaining) if used as setter + * + * @kind function + * + * @description + * Call this method to enable/disable various debug runtime information in the compiler such as adding + * binding information and a reference to the current scope on to DOM elements. + * If enabled, the compiler will add the following to DOM elements that have been bound to the scope + * * `ng-binding` CSS class + * * `$binding` data property containing an array of the binding expressions + * + * You may want to disable this in production for a significant performance boost. See + * {@link guide/production#disabling-debug-data Disabling Debug Data} for more. + * + * The default value is true. + */ + var debugInfoEnabled = true; + this.debugInfoEnabled = function(enabled) { + if (isDefined(enabled)) { + debugInfoEnabled = enabled; + return this; + } + return debugInfoEnabled; + }; + + /** + * @ngdoc method + * @name $compileProvider#preAssignBindingsEnabled + * + * @param {boolean=} enabled update the preAssignBindingsEnabled state if provided, otherwise just return the + * current preAssignBindingsEnabled state + * @returns {*} current value if used as getter or itself (chaining) if used as setter + * + * @kind function + * + * @description + * Call this method to enable/disable whether directive controllers are assigned bindings before + * calling the controller's constructor. + * If enabled (true), the compiler assigns the value of each of the bindings to the + * properties of the controller object before the constructor of this object is called. + * + * If disabled (false), the compiler calls the constructor first before assigning bindings. + * + * The default value is false. + * + * @deprecated + * sinceVersion="1.6.0" + * removeVersion="1.7.0" + * + * This method and the option to assign the bindings before calling the controller's constructor + * will be removed in v1.7.0. + */ + var preAssignBindingsEnabled = false; + this.preAssignBindingsEnabled = function(enabled) { + if (isDefined(enabled)) { + preAssignBindingsEnabled = enabled; + return this; + } + return preAssignBindingsEnabled; + }; + + /** + * @ngdoc method + * @name $compileProvider#strictComponentBindingsEnabled + * + * @param {boolean=} enabled update the strictComponentBindingsEnabled state if provided, otherwise just return the + * current strictComponentBindingsEnabled state + * @returns {*} current value if used as getter or itself (chaining) if used as setter + * + * @kind function + * + * @description + * Call this method to enable/disable strict component bindings check. If enabled, the compiler will enforce that + * for all bindings of a component that are not set as optional with `?`, an attribute needs to be provided + * on the component's HTML tag. + * + * The default value is false. + */ + var strictComponentBindingsEnabled = false; + this.strictComponentBindingsEnabled = function(enabled) { + if (isDefined(enabled)) { + strictComponentBindingsEnabled = enabled; + return this; + } + return strictComponentBindingsEnabled; + }; + + var TTL = 10; + /** + * @ngdoc method + * @name $compileProvider#onChangesTtl + * @description + * + * Sets the number of times `$onChanges` hooks can trigger new changes before giving up and + * assuming that the model is unstable. + * + * The current default is 10 iterations. + * + * In complex applications it's possible that dependencies between `$onChanges` hooks and bindings will result + * in several iterations of calls to these hooks. However if an application needs more than the default 10 + * iterations to stabilize then you should investigate what is causing the model to continuously change during + * the `$onChanges` hook execution. + * + * Increasing the TTL could have performance implications, so you should not change it without proper justification. + * + * @param {number} limit The number of `$onChanges` hook iterations. + * @returns {number|object} the current limit (or `this` if called as a setter for chaining) + */ + this.onChangesTtl = function(value) { + if (arguments.length) { + TTL = value; + return this; + } + return TTL; + }; + + var commentDirectivesEnabledConfig = true; + /** + * @ngdoc method + * @name $compileProvider#commentDirectivesEnabled + * @description + * + * It indicates to the compiler + * whether or not directives on comments should be compiled. + * Defaults to `true`. + * + * Calling this function with false disables the compilation of directives + * on comments for the whole application. + * This results in a compilation performance gain, + * as the compiler doesn't have to check comments when looking for directives. + * This should however only be used if you are sure that no comment directives are used in + * the application (including any 3rd party directives). + * + * @param {boolean} enabled `false` if the compiler may ignore directives on comments + * @returns {boolean|object} the current value (or `this` if called as a setter for chaining) + */ + this.commentDirectivesEnabled = function(value) { + if (arguments.length) { + commentDirectivesEnabledConfig = value; + return this; + } + return commentDirectivesEnabledConfig; + }; + + + var cssClassDirectivesEnabledConfig = true; + /** + * @ngdoc method + * @name $compileProvider#cssClassDirectivesEnabled + * @description + * + * It indicates to the compiler + * whether or not directives on element classes should be compiled. + * Defaults to `true`. + * + * Calling this function with false disables the compilation of directives + * on element classes for the whole application. + * This results in a compilation performance gain, + * as the compiler doesn't have to check element classes when looking for directives. + * This should however only be used if you are sure that no class directives are used in + * the application (including any 3rd party directives). + * + * @param {boolean} enabled `false` if the compiler may ignore directives on element classes + * @returns {boolean|object} the current value (or `this` if called as a setter for chaining) + */ + this.cssClassDirectivesEnabled = function(value) { + if (arguments.length) { + cssClassDirectivesEnabledConfig = value; + return this; + } + return cssClassDirectivesEnabledConfig; + }; + + this.$get = [ + '$injector', '$interpolate', '$exceptionHandler', '$templateRequest', '$parse', + '$controller', '$rootScope', '$sce', '$animate', '$$sanitizeUri', + function($injector, $interpolate, $exceptionHandler, $templateRequest, $parse, + $controller, $rootScope, $sce, $animate, $$sanitizeUri) { + + var SIMPLE_ATTR_NAME = /^\w/; + var specialAttrHolder = window.document.createElement('div'); + + + var commentDirectivesEnabled = commentDirectivesEnabledConfig; + var cssClassDirectivesEnabled = cssClassDirectivesEnabledConfig; + + + var onChangesTtl = TTL; + // The onChanges hooks should all be run together in a single digest + // When changes occur, the call to trigger their hooks will be added to this queue + var onChangesQueue; + + // This function is called in a $$postDigest to trigger all the onChanges hooks in a single digest + function flushOnChangesQueue() { + try { + if (!(--onChangesTtl)) { + // We have hit the TTL limit so reset everything + onChangesQueue = undefined; + throw $compileMinErr('infchng', '{0} $onChanges() iterations reached. Aborting!\n', TTL); + } + // We must run this hook in an apply since the $$postDigest runs outside apply + $rootScope.$apply(function() { + var errors = []; + for (var i = 0, ii = onChangesQueue.length; i < ii; ++i) { + try { + onChangesQueue[i](); + } catch (e) { + errors.push(e); + } + } + // Reset the queue to trigger a new schedule next time there is a change + onChangesQueue = undefined; + if (errors.length) { + throw errors; + } + }); + } finally { + onChangesTtl++; + } + } + + + function Attributes(element, attributesToCopy) { + if (attributesToCopy) { + var keys = Object.keys(attributesToCopy); + var i, l, key; + + for (i = 0, l = keys.length; i < l; i++) { + key = keys[i]; + this[key] = attributesToCopy[key]; + } + } else { + this.$attr = {}; + } + + this.$$element = element; + } + + Attributes.prototype = { + /** + * @ngdoc method + * @name $compile.directive.Attributes#$normalize + * @kind function + * + * @description + * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with `x-` or + * `data-`) to its normalized, camelCase form. + * + * Also there is special case for Moz prefix starting with upper case letter. + * + * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives} + * + * @param {string} name Name to normalize + */ + $normalize: directiveNormalize, + + + /** + * @ngdoc method + * @name $compile.directive.Attributes#$addClass + * @kind function + * + * @description + * Adds the CSS class value specified by the classVal parameter to the element. If animations + * are enabled then an animation will be triggered for the class addition. + * + * @param {string} classVal The className value that will be added to the element + */ + $addClass: function(classVal) { + if (classVal && classVal.length > 0) { + $animate.addClass(this.$$element, classVal); + } + }, + + /** + * @ngdoc method + * @name $compile.directive.Attributes#$removeClass + * @kind function + * + * @description + * Removes the CSS class value specified by the classVal parameter from the element. If + * animations are enabled then an animation will be triggered for the class removal. + * + * @param {string} classVal The className value that will be removed from the element + */ + $removeClass: function(classVal) { + if (classVal && classVal.length > 0) { + $animate.removeClass(this.$$element, classVal); + } + }, + + /** + * @ngdoc method + * @name $compile.directive.Attributes#$updateClass + * @kind function + * + * @description + * Adds and removes the appropriate CSS class values to the element based on the difference + * between the new and old CSS class values (specified as newClasses and oldClasses). + * + * @param {string} newClasses The current CSS className value + * @param {string} oldClasses The former CSS className value + */ + $updateClass: function(newClasses, oldClasses) { + var toAdd = tokenDifference(newClasses, oldClasses); + if (toAdd && toAdd.length) { + $animate.addClass(this.$$element, toAdd); + } + + var toRemove = tokenDifference(oldClasses, newClasses); + if (toRemove && toRemove.length) { + $animate.removeClass(this.$$element, toRemove); + } + }, + + /** + * Set a normalized attribute on the element in a way such that all directives + * can share the attribute. This function properly handles boolean attributes. + * @param {string} key Normalized key. (ie ngAttribute) + * @param {string|boolean} value The value to set. If `null` attribute will be deleted. + * @param {boolean=} writeAttr If false, does not write the value to DOM element attribute. + * Defaults to true. + * @param {string=} attrName Optional none normalized name. Defaults to key. + */ + $set: function(key, value, writeAttr, attrName) { + // TODO: decide whether or not to throw an error if "class" + //is set through this function since it may cause $updateClass to + //become unstable. + + var node = this.$$element[0], + booleanKey = getBooleanAttrName(node, key), + aliasedKey = getAliasedAttrName(key), + observer = key, + nodeName; + + if (booleanKey) { + this.$$element.prop(key, value); + attrName = booleanKey; + } else if (aliasedKey) { + this[aliasedKey] = value; + observer = aliasedKey; + } + + this[key] = value; + + // translate normalized key to actual key + if (attrName) { + this.$attr[key] = attrName; + } else { + attrName = this.$attr[key]; + if (!attrName) { + this.$attr[key] = attrName = snake_case(key, '-'); + } + } + + nodeName = nodeName_(this.$$element); + + if ((nodeName === 'a' && (key === 'href' || key === 'xlinkHref')) || + (nodeName === 'img' && key === 'src')) { + // sanitize a[href] and img[src] values + this[key] = value = $$sanitizeUri(value, key === 'src'); + } else if (nodeName === 'img' && key === 'srcset' && isDefined(value)) { + // sanitize img[srcset] values + var result = ''; + + // first check if there are spaces because it's not the same pattern + var trimmedSrcset = trim(value); + // ( 999x ,| 999w ,| ,|, ) + var srcPattern = /(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/; + var pattern = /\s/.test(trimmedSrcset) ? srcPattern : /(,)/; + + // split srcset into tuple of uri and descriptor except for the last item + var rawUris = trimmedSrcset.split(pattern); + + // for each tuples + var nbrUrisWith2parts = Math.floor(rawUris.length / 2); + for (var i = 0; i < nbrUrisWith2parts; i++) { + var innerIdx = i * 2; + // sanitize the uri + result += $$sanitizeUri(trim(rawUris[innerIdx]), true); + // add the descriptor + result += (' ' + trim(rawUris[innerIdx + 1])); + } + + // split the last item into uri and descriptor + var lastTuple = trim(rawUris[i * 2]).split(/\s/); + + // sanitize the last uri + result += $$sanitizeUri(trim(lastTuple[0]), true); + + // and add the last descriptor if any + if (lastTuple.length === 2) { + result += (' ' + trim(lastTuple[1])); + } + this[key] = value = result; + } + + if (writeAttr !== false) { + if (value === null || isUndefined(value)) { + this.$$element.removeAttr(attrName); + } else { + if (SIMPLE_ATTR_NAME.test(attrName)) { + this.$$element.attr(attrName, value); + } else { + setSpecialAttr(this.$$element[0], attrName, value); + } + } + } + + // fire observers + var $$observers = this.$$observers; + if ($$observers) { + forEach($$observers[observer], function(fn) { + try { + fn(value); + } catch (e) { + $exceptionHandler(e); + } + }); + } + }, + + + /** + * @ngdoc method + * @name $compile.directive.Attributes#$observe + * @kind function + * + * @description + * Observes an interpolated attribute. + * + * The observer function will be invoked once during the next `$digest` following + * compilation. The observer is then invoked whenever the interpolated value + * changes. + * + * @param {string} key Normalized key. (ie ngAttribute) . + * @param {function(interpolatedValue)} fn Function that will be called whenever + the interpolated value of the attribute changes. + * See the {@link guide/interpolation#how-text-and-attribute-bindings-work Interpolation + * guide} for more info. + * @returns {function()} Returns a deregistration function for this observer. + */ + $observe: function(key, fn) { + var attrs = this, + $$observers = (attrs.$$observers || (attrs.$$observers = createMap())), + listeners = ($$observers[key] || ($$observers[key] = [])); + + listeners.push(fn); + $rootScope.$evalAsync(function() { + if (!listeners.$$inter && attrs.hasOwnProperty(key) && !isUndefined(attrs[key])) { + // no one registered attribute interpolation function, so lets call it manually + fn(attrs[key]); + } + }); + + return function() { + arrayRemove(listeners, fn); + }; + } + }; + + function setSpecialAttr(element, attrName, value) { + // Attributes names that do not start with letters (such as `(click)`) cannot be set using `setAttribute` + // so we have to jump through some hoops to get such an attribute + // https://github.com/angular/angular.js/pull/13318 + specialAttrHolder.innerHTML = ''; + var attributes = specialAttrHolder.firstChild.attributes; + var attribute = attributes[0]; + // We have to remove the attribute from its container element before we can add it to the destination element + attributes.removeNamedItem(attribute.name); + attribute.value = value; + element.attributes.setNamedItem(attribute); + } + + function safeAddClass($element, className) { + try { + $element.addClass(className); + } catch (e) { + // ignore, since it means that we are trying to set class on + // SVG element, where class name is read-only. + } + } + + + var startSymbol = $interpolate.startSymbol(), + endSymbol = $interpolate.endSymbol(), + denormalizeTemplate = (startSymbol === '{{' && endSymbol === '}}') + ? identity + : function denormalizeTemplate(template) { + return template.replace(/\{\{/g, startSymbol).replace(/}}/g, endSymbol); + }, + NG_ATTR_BINDING = /^ngAttr[A-Z]/; + var MULTI_ELEMENT_DIR_RE = /^(.+)Start$/; + + compile.$$addBindingInfo = debugInfoEnabled ? function $$addBindingInfo($element, binding) { + var bindings = $element.data('$binding') || []; + + if (isArray(binding)) { + bindings = bindings.concat(binding); + } else { + bindings.push(binding); + } + + $element.data('$binding', bindings); + } : noop; + + compile.$$addBindingClass = debugInfoEnabled ? function $$addBindingClass($element) { + safeAddClass($element, 'ng-binding'); + } : noop; + + compile.$$addScopeInfo = debugInfoEnabled ? function $$addScopeInfo($element, scope, isolated, noTemplate) { + var dataName = isolated ? (noTemplate ? '$isolateScopeNoTemplate' : '$isolateScope') : '$scope'; + $element.data(dataName, scope); + } : noop; + + compile.$$addScopeClass = debugInfoEnabled ? function $$addScopeClass($element, isolated) { + safeAddClass($element, isolated ? 'ng-isolate-scope' : 'ng-scope'); + } : noop; + + compile.$$createComment = function(directiveName, comment) { + var content = ''; + if (debugInfoEnabled) { + content = ' ' + (directiveName || '') + ': '; + if (comment) content += comment + ' '; + } + return window.document.createComment(content); + }; + + return compile; + + //================================ + + function compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, + previousCompileContext) { + if (!($compileNodes instanceof jqLite)) { + // jquery always rewraps, whereas we need to preserve the original selector so that we can + // modify it. + $compileNodes = jqLite($compileNodes); + } + var compositeLinkFn = + compileNodes($compileNodes, transcludeFn, $compileNodes, + maxPriority, ignoreDirective, previousCompileContext); + compile.$$addScopeClass($compileNodes); + var namespace = null; + return function publicLinkFn(scope, cloneConnectFn, options) { + if (!$compileNodes) { + throw $compileMinErr('multilink', 'This element has already been linked.'); + } + assertArg(scope, 'scope'); + + if (previousCompileContext && previousCompileContext.needsNewScope) { + // A parent directive did a replace and a directive on this element asked + // for transclusion, which caused us to lose a layer of element on which + // we could hold the new transclusion scope, so we will create it manually + // here. + scope = scope.$parent.$new(); + } + + options = options || {}; + var parentBoundTranscludeFn = options.parentBoundTranscludeFn, + transcludeControllers = options.transcludeControllers, + futureParentElement = options.futureParentElement; + + // When `parentBoundTranscludeFn` is passed, it is a + // `controllersBoundTransclude` function (it was previously passed + // as `transclude` to directive.link) so we must unwrap it to get + // its `boundTranscludeFn` + if (parentBoundTranscludeFn && parentBoundTranscludeFn.$$boundTransclude) { + parentBoundTranscludeFn = parentBoundTranscludeFn.$$boundTransclude; + } + + if (!namespace) { + namespace = detectNamespaceForChildElements(futureParentElement); + } + var $linkNode; + if (namespace !== 'html') { + // When using a directive with replace:true and templateUrl the $compileNodes + // (or a child element inside of them) + // might change, so we need to recreate the namespace adapted compileNodes + // for call to the link function. + // Note: This will already clone the nodes... + $linkNode = jqLite( + wrapTemplate(namespace, jqLite('
').append($compileNodes).html()) + ); + } else if (cloneConnectFn) { + // important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart + // and sometimes changes the structure of the DOM. + $linkNode = JQLitePrototype.clone.call($compileNodes); + } else { + $linkNode = $compileNodes; + } + + if (transcludeControllers) { + for (var controllerName in transcludeControllers) { + $linkNode.data('$' + controllerName + 'Controller', transcludeControllers[controllerName].instance); + } + } + + compile.$$addScopeInfo($linkNode, scope); + + if (cloneConnectFn) cloneConnectFn($linkNode, scope); + if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode, parentBoundTranscludeFn); + + if (!cloneConnectFn) { + $compileNodes = compositeLinkFn = null; + } + return $linkNode; + }; + } + + function detectNamespaceForChildElements(parentElement) { + // TODO: Make this detect MathML as well... + var node = parentElement && parentElement[0]; + if (!node) { + return 'html'; + } else { + return nodeName_(node) !== 'foreignobject' && toString.call(node).match(/SVG/) ? 'svg' : 'html'; + } + } + + /** + * Compile function matches each node in nodeList against the directives. Once all directives + * for a particular node are collected their compile functions are executed. The compile + * functions return values - the linking functions - are combined into a composite linking + * function, which is the a linking function for the node. + * + * @param {NodeList} nodeList an array of nodes or NodeList to compile + * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the + * scope argument is auto-generated to the new child of the transcluded parent scope. + * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then + * the rootElement must be set the jqLite collection of the compile root. This is + * needed so that the jqLite collection items can be replaced with widgets. + * @param {number=} maxPriority Max directive priority. + * @returns {Function} A composite linking function of all of the matched directives or null. + */ + function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective, + previousCompileContext) { + var linkFns = [], + // `nodeList` can be either an element's `.childNodes` (live NodeList) + // or a jqLite/jQuery collection or an array + notLiveList = isArray(nodeList) || (nodeList instanceof jqLite), + attrs, directives, nodeLinkFn, childNodes, childLinkFn, linkFnFound, nodeLinkFnFound; + + + for (var i = 0; i < nodeList.length; i++) { + attrs = new Attributes(); + + // Support: IE 11 only + // Workaround for #11781 and #14924 + if (msie === 11) { + mergeConsecutiveTextNodes(nodeList, i, notLiveList); + } + + // We must always refer to `nodeList[i]` hereafter, + // since the nodes can be replaced underneath us. + directives = collectDirectives(nodeList[i], [], attrs, i === 0 ? maxPriority : undefined, + ignoreDirective); + + nodeLinkFn = (directives.length) + ? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement, + null, [], [], previousCompileContext) + : null; + + if (nodeLinkFn && nodeLinkFn.scope) { + compile.$$addScopeClass(attrs.$$element); + } + + childLinkFn = (nodeLinkFn && nodeLinkFn.terminal || + !(childNodes = nodeList[i].childNodes) || + !childNodes.length) + ? null + : compileNodes(childNodes, + nodeLinkFn ? ( + (nodeLinkFn.transcludeOnThisElement || !nodeLinkFn.templateOnThisElement) + && nodeLinkFn.transclude) : transcludeFn); + + if (nodeLinkFn || childLinkFn) { + linkFns.push(i, nodeLinkFn, childLinkFn); + linkFnFound = true; + nodeLinkFnFound = nodeLinkFnFound || nodeLinkFn; + } + + //use the previous context only for the first element in the virtual group + previousCompileContext = null; + } + + // return a linking function if we have found anything, null otherwise + return linkFnFound ? compositeLinkFn : null; + + function compositeLinkFn(scope, nodeList, $rootElement, parentBoundTranscludeFn) { + var nodeLinkFn, childLinkFn, node, childScope, i, ii, idx, childBoundTranscludeFn; + var stableNodeList; + + + if (nodeLinkFnFound) { + // copy nodeList so that if a nodeLinkFn removes or adds an element at this DOM level our + // offsets don't get screwed up + var nodeListLength = nodeList.length; + stableNodeList = new Array(nodeListLength); + + // create a sparse array by only copying the elements which have a linkFn + for (i = 0; i < linkFns.length; i += 3) { + idx = linkFns[i]; + stableNodeList[idx] = nodeList[idx]; + } + } else { + stableNodeList = nodeList; + } + + for (i = 0, ii = linkFns.length; i < ii;) { + node = stableNodeList[linkFns[i++]]; + nodeLinkFn = linkFns[i++]; + childLinkFn = linkFns[i++]; + + if (nodeLinkFn) { + if (nodeLinkFn.scope) { + childScope = scope.$new(); + compile.$$addScopeInfo(jqLite(node), childScope); + } else { + childScope = scope; + } + + if (nodeLinkFn.transcludeOnThisElement) { + childBoundTranscludeFn = createBoundTranscludeFn( + scope, nodeLinkFn.transclude, parentBoundTranscludeFn); + + } else if (!nodeLinkFn.templateOnThisElement && parentBoundTranscludeFn) { + childBoundTranscludeFn = parentBoundTranscludeFn; + + } else if (!parentBoundTranscludeFn && transcludeFn) { + childBoundTranscludeFn = createBoundTranscludeFn(scope, transcludeFn); + + } else { + childBoundTranscludeFn = null; + } + + nodeLinkFn(childLinkFn, childScope, node, $rootElement, childBoundTranscludeFn); + + } else if (childLinkFn) { + childLinkFn(scope, node.childNodes, undefined, parentBoundTranscludeFn); + } + } + } + } + + function mergeConsecutiveTextNodes(nodeList, idx, notLiveList) { + var node = nodeList[idx]; + var parent = node.parentNode; + var sibling; + + if (node.nodeType !== NODE_TYPE_TEXT) { + return; + } + + while (true) { + sibling = parent ? node.nextSibling : nodeList[idx + 1]; + if (!sibling || sibling.nodeType !== NODE_TYPE_TEXT) { + break; + } + + node.nodeValue = node.nodeValue + sibling.nodeValue; + + if (sibling.parentNode) { + sibling.parentNode.removeChild(sibling); + } + if (notLiveList && sibling === nodeList[idx + 1]) { + nodeList.splice(idx + 1, 1); + } + } + } + + function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) { + function boundTranscludeFn(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) { + + if (!transcludedScope) { + transcludedScope = scope.$new(false, containingScope); + transcludedScope.$$transcluded = true; + } + + return transcludeFn(transcludedScope, cloneFn, { + parentBoundTranscludeFn: previousBoundTranscludeFn, + transcludeControllers: controllers, + futureParentElement: futureParentElement + }); + } + + // We need to attach the transclusion slots onto the `boundTranscludeFn` + // so that they are available inside the `controllersBoundTransclude` function + var boundSlots = boundTranscludeFn.$$slots = createMap(); + for (var slotName in transcludeFn.$$slots) { + if (transcludeFn.$$slots[slotName]) { + boundSlots[slotName] = createBoundTranscludeFn(scope, transcludeFn.$$slots[slotName], previousBoundTranscludeFn); + } else { + boundSlots[slotName] = null; + } + } + + return boundTranscludeFn; + } + + /** + * Looks for directives on the given node and adds them to the directive collection which is + * sorted. + * + * @param node Node to search. + * @param directives An array to which the directives are added to. This array is sorted before + * the function returns. + * @param attrs The shared attrs object which is used to populate the normalized attributes. + * @param {number=} maxPriority Max directive priority. + */ + function collectDirectives(node, directives, attrs, maxPriority, ignoreDirective) { + var nodeType = node.nodeType, + attrsMap = attrs.$attr, + match, + nodeName, + className; + + switch (nodeType) { + case NODE_TYPE_ELEMENT: /* Element */ + + nodeName = nodeName_(node); + + // use the node name: + addDirective(directives, + directiveNormalize(nodeName), 'E', maxPriority, ignoreDirective); + + // iterate over the attributes + for (var attr, name, nName, ngAttrName, value, isNgAttr, nAttrs = node.attributes, + j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) { + var attrStartName = false; + var attrEndName = false; + + attr = nAttrs[j]; + name = attr.name; + value = attr.value; + + // support ngAttr attribute binding + ngAttrName = directiveNormalize(name); + isNgAttr = NG_ATTR_BINDING.test(ngAttrName); + if (isNgAttr) { + name = name.replace(PREFIX_REGEXP, '') + .substr(8).replace(/_(.)/g, function(match, letter) { + return letter.toUpperCase(); + }); + } + + var multiElementMatch = ngAttrName.match(MULTI_ELEMENT_DIR_RE); + if (multiElementMatch && directiveIsMultiElement(multiElementMatch[1])) { + attrStartName = name; + attrEndName = name.substr(0, name.length - 5) + 'end'; + name = name.substr(0, name.length - 6); + } + + nName = directiveNormalize(name.toLowerCase()); + attrsMap[nName] = name; + if (isNgAttr || !attrs.hasOwnProperty(nName)) { + attrs[nName] = value; + if (getBooleanAttrName(node, nName)) { + attrs[nName] = true; // presence means true + } + } + addAttrInterpolateDirective(node, directives, value, nName, isNgAttr); + addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName, + attrEndName); + } + + if (nodeName === 'input' && node.getAttribute('type') === 'hidden') { + // Hidden input elements can have strange behaviour when navigating back to the page + // This tells the browser not to try to cache and reinstate previous values + node.setAttribute('autocomplete', 'off'); + } + + // use class as directive + if (!cssClassDirectivesEnabled) break; + className = node.className; + if (isObject(className)) { + // Maybe SVGAnimatedString + className = className.animVal; + } + if (isString(className) && className !== '') { + while ((match = CLASS_DIRECTIVE_REGEXP.exec(className))) { + nName = directiveNormalize(match[2]); + if (addDirective(directives, nName, 'C', maxPriority, ignoreDirective)) { + attrs[nName] = trim(match[3]); + } + className = className.substr(match.index + match[0].length); + } + } + break; + case NODE_TYPE_TEXT: /* Text Node */ + addTextInterpolateDirective(directives, node.nodeValue); + break; + case NODE_TYPE_COMMENT: /* Comment */ + if (!commentDirectivesEnabled) break; + collectCommentDirectives(node, directives, attrs, maxPriority, ignoreDirective); + break; + } + + directives.sort(byPriority); + return directives; + } + + function collectCommentDirectives(node, directives, attrs, maxPriority, ignoreDirective) { + // function created because of performance, try/catch disables + // the optimization of the whole function #14848 + try { + var match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue); + if (match) { + var nName = directiveNormalize(match[1]); + if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) { + attrs[nName] = trim(match[2]); + } + } + } catch (e) { + // turns out that under some circumstances IE9 throws errors when one attempts to read + // comment's node value. + // Just ignore it and continue. (Can't seem to reproduce in test case.) + } + } + + /** + * Given a node with a directive-start it collects all of the siblings until it finds + * directive-end. + * @param node + * @param attrStart + * @param attrEnd + * @returns {*} + */ + function groupScan(node, attrStart, attrEnd) { + var nodes = []; + var depth = 0; + if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) { + do { + if (!node) { + throw $compileMinErr('uterdir', + 'Unterminated attribute, found \'{0}\' but no matching \'{1}\' found.', + attrStart, attrEnd); + } + if (node.nodeType === NODE_TYPE_ELEMENT) { + if (node.hasAttribute(attrStart)) depth++; + if (node.hasAttribute(attrEnd)) depth--; + } + nodes.push(node); + node = node.nextSibling; + } while (depth > 0); + } else { + nodes.push(node); + } + + return jqLite(nodes); + } + + /** + * Wrapper for linking function which converts normal linking function into a grouped + * linking function. + * @param linkFn + * @param attrStart + * @param attrEnd + * @returns {Function} + */ + function groupElementsLinkFnWrapper(linkFn, attrStart, attrEnd) { + return function groupedElementsLink(scope, element, attrs, controllers, transcludeFn) { + element = groupScan(element[0], attrStart, attrEnd); + return linkFn(scope, element, attrs, controllers, transcludeFn); + }; + } + + /** + * A function generator that is used to support both eager and lazy compilation + * linking function. + * @param eager + * @param $compileNodes + * @param transcludeFn + * @param maxPriority + * @param ignoreDirective + * @param previousCompileContext + * @returns {Function} + */ + function compilationGenerator(eager, $compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext) { + var compiled; + + if (eager) { + return compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext); + } + return /** @this */ function lazyCompilation() { + if (!compiled) { + compiled = compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext); + + // Null out all of these references in order to make them eligible for garbage collection + // since this is a potentially long lived closure + $compileNodes = transcludeFn = previousCompileContext = null; + } + return compiled.apply(this, arguments); + }; + } + + /** + * Once the directives have been collected, their compile functions are executed. This method + * is responsible for inlining directive templates as well as terminating the application + * of the directives if the terminal directive has been reached. + * + * @param {Array} directives Array of collected directives to execute their compile function. + * this needs to be pre-sorted by priority order. + * @param {Node} compileNode The raw DOM node to apply the compile functions to + * @param {Object} templateAttrs The shared attribute function + * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the + * scope argument is auto-generated to the new + * child of the transcluded parent scope. + * @param {JQLite} jqCollection If we are working on the root of the compile tree then this + * argument has the root jqLite array so that we can replace nodes + * on it. + * @param {Object=} originalReplaceDirective An optional directive that will be ignored when + * compiling the transclusion. + * @param {Array.} preLinkFns + * @param {Array.} postLinkFns + * @param {Object} previousCompileContext Context used for previous compilation of the current + * node + * @returns {Function} linkFn + */ + function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn, + jqCollection, originalReplaceDirective, preLinkFns, postLinkFns, + previousCompileContext) { + previousCompileContext = previousCompileContext || {}; + + var terminalPriority = -Number.MAX_VALUE, + newScopeDirective = previousCompileContext.newScopeDirective, + controllerDirectives = previousCompileContext.controllerDirectives, + newIsolateScopeDirective = previousCompileContext.newIsolateScopeDirective, + templateDirective = previousCompileContext.templateDirective, + nonTlbTranscludeDirective = previousCompileContext.nonTlbTranscludeDirective, + hasTranscludeDirective = false, + hasTemplate = false, + hasElementTranscludeDirective = previousCompileContext.hasElementTranscludeDirective, + $compileNode = templateAttrs.$$element = jqLite(compileNode), + directive, + directiveName, + $template, + replaceDirective = originalReplaceDirective, + childTranscludeFn = transcludeFn, + linkFn, + didScanForMultipleTransclusion = false, + mightHaveMultipleTransclusionError = false, + directiveValue; + + // executes all directives on the current element + for (var i = 0, ii = directives.length; i < ii; i++) { + directive = directives[i]; + var attrStart = directive.$$start; + var attrEnd = directive.$$end; + + // collect multiblock sections + if (attrStart) { + $compileNode = groupScan(compileNode, attrStart, attrEnd); + } + $template = undefined; + + if (terminalPriority > directive.priority) { + break; // prevent further processing of directives + } + + directiveValue = directive.scope; + + if (directiveValue) { + + // skip the check for directives with async templates, we'll check the derived sync + // directive when the template arrives + if (!directive.templateUrl) { + if (isObject(directiveValue)) { + // This directive is trying to add an isolated scope. + // Check that there is no scope of any kind already + assertNoDuplicate('new/isolated scope', newIsolateScopeDirective || newScopeDirective, + directive, $compileNode); + newIsolateScopeDirective = directive; + } else { + // This directive is trying to add a child scope. + // Check that there is no isolated scope already + assertNoDuplicate('new/isolated scope', newIsolateScopeDirective, directive, + $compileNode); + } + } + + newScopeDirective = newScopeDirective || directive; + } + + directiveName = directive.name; + + // If we encounter a condition that can result in transclusion on the directive, + // then scan ahead in the remaining directives for others that may cause a multiple + // transclusion error to be thrown during the compilation process. If a matching directive + // is found, then we know that when we encounter a transcluded directive, we need to eagerly + // compile the `transclude` function rather than doing it lazily in order to throw + // exceptions at the correct time + if (!didScanForMultipleTransclusion && ((directive.replace && (directive.templateUrl || directive.template)) + || (directive.transclude && !directive.$$tlb))) { + var candidateDirective; + + for (var scanningIndex = i + 1; (candidateDirective = directives[scanningIndex++]);) { + if ((candidateDirective.transclude && !candidateDirective.$$tlb) + || (candidateDirective.replace && (candidateDirective.templateUrl || candidateDirective.template))) { + mightHaveMultipleTransclusionError = true; + break; + } + } + + didScanForMultipleTransclusion = true; + } + + if (!directive.templateUrl && directive.controller) { + controllerDirectives = controllerDirectives || createMap(); + assertNoDuplicate('\'' + directiveName + '\' controller', + controllerDirectives[directiveName], directive, $compileNode); + controllerDirectives[directiveName] = directive; + } + + directiveValue = directive.transclude; + + if (directiveValue) { + hasTranscludeDirective = true; + + // Special case ngIf and ngRepeat so that we don't complain about duplicate transclusion. + // This option should only be used by directives that know how to safely handle element transclusion, + // where the transcluded nodes are added or replaced after linking. + if (!directive.$$tlb) { + assertNoDuplicate('transclusion', nonTlbTranscludeDirective, directive, $compileNode); + nonTlbTranscludeDirective = directive; + } + + if (directiveValue === 'element') { + hasElementTranscludeDirective = true; + terminalPriority = directive.priority; + $template = $compileNode; + $compileNode = templateAttrs.$$element = + jqLite(compile.$$createComment(directiveName, templateAttrs[directiveName])); + compileNode = $compileNode[0]; + replaceWith(jqCollection, sliceArgs($template), compileNode); + + // Support: Chrome < 50 + // https://github.com/angular/angular.js/issues/14041 + + // In the versions of V8 prior to Chrome 50, the document fragment that is created + // in the `replaceWith` function is improperly garbage collected despite still + // being referenced by the `parentNode` property of all of the child nodes. By adding + // a reference to the fragment via a different property, we can avoid that incorrect + // behavior. + // TODO: remove this line after Chrome 50 has been released + $template[0].$$parentNode = $template[0].parentNode; + + childTranscludeFn = compilationGenerator(mightHaveMultipleTransclusionError, $template, transcludeFn, terminalPriority, + replaceDirective && replaceDirective.name, { + // Don't pass in: + // - controllerDirectives - otherwise we'll create duplicates controllers + // - newIsolateScopeDirective or templateDirective - combining templates with + // element transclusion doesn't make sense. + // + // We need only nonTlbTranscludeDirective so that we prevent putting transclusion + // on the same element more than once. + nonTlbTranscludeDirective: nonTlbTranscludeDirective + }); + } else { + + var slots = createMap(); + + if (!isObject(directiveValue)) { + $template = jqLite(jqLiteClone(compileNode)).contents(); + } else { + + // We have transclusion slots, + // collect them up, compile them and store their transclusion functions + $template = []; + + var slotMap = createMap(); + var filledSlots = createMap(); + + // Parse the element selectors + forEach(directiveValue, function(elementSelector, slotName) { + // If an element selector starts with a ? then it is optional + var optional = (elementSelector.charAt(0) === '?'); + elementSelector = optional ? elementSelector.substring(1) : elementSelector; + + slotMap[elementSelector] = slotName; + + // We explicitly assign `null` since this implies that a slot was defined but not filled. + // Later when calling boundTransclusion functions with a slot name we only error if the + // slot is `undefined` + slots[slotName] = null; + + // filledSlots contains `true` for all slots that are either optional or have been + // filled. This is used to check that we have not missed any required slots + filledSlots[slotName] = optional; + }); + + // Add the matching elements into their slot + forEach($compileNode.contents(), function(node) { + var slotName = slotMap[directiveNormalize(nodeName_(node))]; + if (slotName) { + filledSlots[slotName] = true; + slots[slotName] = slots[slotName] || []; + slots[slotName].push(node); + } else { + $template.push(node); + } + }); + + // Check for required slots that were not filled + forEach(filledSlots, function(filled, slotName) { + if (!filled) { + throw $compileMinErr('reqslot', 'Required transclusion slot `{0}` was not filled.', slotName); + } + }); + + for (var slotName in slots) { + if (slots[slotName]) { + // Only define a transclusion function if the slot was filled + slots[slotName] = compilationGenerator(mightHaveMultipleTransclusionError, slots[slotName], transcludeFn); + } + } + } + + $compileNode.empty(); // clear contents + childTranscludeFn = compilationGenerator(mightHaveMultipleTransclusionError, $template, transcludeFn, undefined, + undefined, { needsNewScope: directive.$$isolateScope || directive.$$newScope}); + childTranscludeFn.$$slots = slots; + } + } + + if (directive.template) { + hasTemplate = true; + assertNoDuplicate('template', templateDirective, directive, $compileNode); + templateDirective = directive; + + directiveValue = (isFunction(directive.template)) + ? directive.template($compileNode, templateAttrs) + : directive.template; + + directiveValue = denormalizeTemplate(directiveValue); + + if (directive.replace) { + replaceDirective = directive; + if (jqLiteIsTextNode(directiveValue)) { + $template = []; + } else { + $template = removeComments(wrapTemplate(directive.templateNamespace, trim(directiveValue))); + } + compileNode = $template[0]; + + if ($template.length !== 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) { + throw $compileMinErr('tplrt', + 'Template for directive \'{0}\' must have exactly one root element. {1}', + directiveName, ''); + } + + replaceWith(jqCollection, $compileNode, compileNode); + + var newTemplateAttrs = {$attr: {}}; + + // combine directives from the original node and from the template: + // - take the array of directives for this element + // - split it into two parts, those that already applied (processed) and those that weren't (unprocessed) + // - collect directives from the template and sort them by priority + // - combine directives as: processed + template + unprocessed + var templateDirectives = collectDirectives(compileNode, [], newTemplateAttrs); + var unprocessedDirectives = directives.splice(i + 1, directives.length - (i + 1)); + + if (newIsolateScopeDirective || newScopeDirective) { + // The original directive caused the current element to be replaced but this element + // also needs to have a new scope, so we need to tell the template directives + // that they would need to get their scope from further up, if they require transclusion + markDirectiveScope(templateDirectives, newIsolateScopeDirective, newScopeDirective); + } + directives = directives.concat(templateDirectives).concat(unprocessedDirectives); + mergeTemplateAttributes(templateAttrs, newTemplateAttrs); + + ii = directives.length; + } else { + $compileNode.html(directiveValue); + } + } + + if (directive.templateUrl) { + hasTemplate = true; + assertNoDuplicate('template', templateDirective, directive, $compileNode); + templateDirective = directive; + + if (directive.replace) { + replaceDirective = directive; + } + + // eslint-disable-next-line no-func-assign + nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), $compileNode, + templateAttrs, jqCollection, hasTranscludeDirective && childTranscludeFn, preLinkFns, postLinkFns, { + controllerDirectives: controllerDirectives, + newScopeDirective: (newScopeDirective !== directive) && newScopeDirective, + newIsolateScopeDirective: newIsolateScopeDirective, + templateDirective: templateDirective, + nonTlbTranscludeDirective: nonTlbTranscludeDirective + }); + ii = directives.length; + } else if (directive.compile) { + try { + linkFn = directive.compile($compileNode, templateAttrs, childTranscludeFn); + var context = directive.$$originalDirective || directive; + if (isFunction(linkFn)) { + addLinkFns(null, bind(context, linkFn), attrStart, attrEnd); + } else if (linkFn) { + addLinkFns(bind(context, linkFn.pre), bind(context, linkFn.post), attrStart, attrEnd); + } + } catch (e) { + $exceptionHandler(e, startingTag($compileNode)); + } + } + + if (directive.terminal) { + nodeLinkFn.terminal = true; + terminalPriority = Math.max(terminalPriority, directive.priority); + } + + } + + nodeLinkFn.scope = newScopeDirective && newScopeDirective.scope === true; + nodeLinkFn.transcludeOnThisElement = hasTranscludeDirective; + nodeLinkFn.templateOnThisElement = hasTemplate; + nodeLinkFn.transclude = childTranscludeFn; + + previousCompileContext.hasElementTranscludeDirective = hasElementTranscludeDirective; + + // might be normal or delayed nodeLinkFn depending on if templateUrl is present + return nodeLinkFn; + + //////////////////// + + function addLinkFns(pre, post, attrStart, attrEnd) { + if (pre) { + if (attrStart) pre = groupElementsLinkFnWrapper(pre, attrStart, attrEnd); + pre.require = directive.require; + pre.directiveName = directiveName; + if (newIsolateScopeDirective === directive || directive.$$isolateScope) { + pre = cloneAndAnnotateFn(pre, {isolateScope: true}); + } + preLinkFns.push(pre); + } + if (post) { + if (attrStart) post = groupElementsLinkFnWrapper(post, attrStart, attrEnd); + post.require = directive.require; + post.directiveName = directiveName; + if (newIsolateScopeDirective === directive || directive.$$isolateScope) { + post = cloneAndAnnotateFn(post, {isolateScope: true}); + } + postLinkFns.push(post); + } + } + + function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) { + var i, ii, linkFn, isolateScope, controllerScope, elementControllers, transcludeFn, $element, + attrs, scopeBindingInfo; + + if (compileNode === linkNode) { + attrs = templateAttrs; + $element = templateAttrs.$$element; + } else { + $element = jqLite(linkNode); + attrs = new Attributes($element, templateAttrs); + } + + controllerScope = scope; + if (newIsolateScopeDirective) { + isolateScope = scope.$new(true); + } else if (newScopeDirective) { + controllerScope = scope.$parent; + } + + if (boundTranscludeFn) { + // track `boundTranscludeFn` so it can be unwrapped if `transcludeFn` + // is later passed as `parentBoundTranscludeFn` to `publicLinkFn` + transcludeFn = controllersBoundTransclude; + transcludeFn.$$boundTransclude = boundTranscludeFn; + // expose the slots on the `$transclude` function + transcludeFn.isSlotFilled = function(slotName) { + return !!boundTranscludeFn.$$slots[slotName]; + }; + } + + if (controllerDirectives) { + elementControllers = setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope, newIsolateScopeDirective); + } + + if (newIsolateScopeDirective) { + // Initialize isolate scope bindings for new isolate scope directive. + compile.$$addScopeInfo($element, isolateScope, true, !(templateDirective && (templateDirective === newIsolateScopeDirective || + templateDirective === newIsolateScopeDirective.$$originalDirective))); + compile.$$addScopeClass($element, true); + isolateScope.$$isolateBindings = + newIsolateScopeDirective.$$isolateBindings; + scopeBindingInfo = initializeDirectiveBindings(scope, attrs, isolateScope, + isolateScope.$$isolateBindings, + newIsolateScopeDirective); + if (scopeBindingInfo.removeWatches) { + isolateScope.$on('$destroy', scopeBindingInfo.removeWatches); + } + } + + // Initialize bindToController bindings + for (var name in elementControllers) { + var controllerDirective = controllerDirectives[name]; + var controller = elementControllers[name]; + var bindings = controllerDirective.$$bindings.bindToController; + + if (preAssignBindingsEnabled) { + if (bindings) { + controller.bindingInfo = + initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective); + } else { + controller.bindingInfo = {}; + } + + var controllerResult = controller(); + if (controllerResult !== controller.instance) { + // If the controller constructor has a return value, overwrite the instance + // from setupControllers + controller.instance = controllerResult; + $element.data('$' + controllerDirective.name + 'Controller', controllerResult); + if (controller.bindingInfo.removeWatches) { + controller.bindingInfo.removeWatches(); + } + controller.bindingInfo = + initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective); + } + } else { + controller.instance = controller(); + $element.data('$' + controllerDirective.name + 'Controller', controller.instance); + controller.bindingInfo = + initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective); + } + } + + // Bind the required controllers to the controller, if `require` is an object and `bindToController` is truthy + forEach(controllerDirectives, function(controllerDirective, name) { + var require = controllerDirective.require; + if (controllerDirective.bindToController && !isArray(require) && isObject(require)) { + extend(elementControllers[name].instance, getControllers(name, require, $element, elementControllers)); + } + }); + + // Handle the init and destroy lifecycle hooks on all controllers that have them + forEach(elementControllers, function(controller) { + var controllerInstance = controller.instance; + if (isFunction(controllerInstance.$onChanges)) { + try { + controllerInstance.$onChanges(controller.bindingInfo.initialChanges); + } catch (e) { + $exceptionHandler(e); + } + } + if (isFunction(controllerInstance.$onInit)) { + try { + controllerInstance.$onInit(); + } catch (e) { + $exceptionHandler(e); + } + } + if (isFunction(controllerInstance.$doCheck)) { + controllerScope.$watch(function() { controllerInstance.$doCheck(); }); + controllerInstance.$doCheck(); + } + if (isFunction(controllerInstance.$onDestroy)) { + controllerScope.$on('$destroy', function callOnDestroyHook() { + controllerInstance.$onDestroy(); + }); + } + }); + + // PRELINKING + for (i = 0, ii = preLinkFns.length; i < ii; i++) { + linkFn = preLinkFns[i]; + invokeLinkFn(linkFn, + linkFn.isolateScope ? isolateScope : scope, + $element, + attrs, + linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers), + transcludeFn + ); + } + + // RECURSION + // We only pass the isolate scope, if the isolate directive has a template, + // otherwise the child elements do not belong to the isolate directive. + var scopeToChild = scope; + if (newIsolateScopeDirective && (newIsolateScopeDirective.template || newIsolateScopeDirective.templateUrl === null)) { + scopeToChild = isolateScope; + } + if (childLinkFn) { + childLinkFn(scopeToChild, linkNode.childNodes, undefined, boundTranscludeFn); + } + + // POSTLINKING + for (i = postLinkFns.length - 1; i >= 0; i--) { + linkFn = postLinkFns[i]; + invokeLinkFn(linkFn, + linkFn.isolateScope ? isolateScope : scope, + $element, + attrs, + linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers), + transcludeFn + ); + } + + // Trigger $postLink lifecycle hooks + forEach(elementControllers, function(controller) { + var controllerInstance = controller.instance; + if (isFunction(controllerInstance.$postLink)) { + controllerInstance.$postLink(); + } + }); + + // This is the function that is injected as `$transclude`. + // Note: all arguments are optional! + function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement, slotName) { + var transcludeControllers; + // No scope passed in: + if (!isScope(scope)) { + slotName = futureParentElement; + futureParentElement = cloneAttachFn; + cloneAttachFn = scope; + scope = undefined; + } + + if (hasElementTranscludeDirective) { + transcludeControllers = elementControllers; + } + if (!futureParentElement) { + futureParentElement = hasElementTranscludeDirective ? $element.parent() : $element; + } + if (slotName) { + // slotTranscludeFn can be one of three things: + // * a transclude function - a filled slot + // * `null` - an optional slot that was not filled + // * `undefined` - a slot that was not declared (i.e. invalid) + var slotTranscludeFn = boundTranscludeFn.$$slots[slotName]; + if (slotTranscludeFn) { + return slotTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild); + } else if (isUndefined(slotTranscludeFn)) { + throw $compileMinErr('noslot', + 'No parent directive that requires a transclusion with slot name "{0}". ' + + 'Element: {1}', + slotName, startingTag($element)); + } + } else { + return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild); + } + } + } + } + + function getControllers(directiveName, require, $element, elementControllers) { + var value; + + if (isString(require)) { + var match = require.match(REQUIRE_PREFIX_REGEXP); + var name = require.substring(match[0].length); + var inheritType = match[1] || match[3]; + var optional = match[2] === '?'; + + //If only parents then start at the parent element + if (inheritType === '^^') { + $element = $element.parent(); + //Otherwise attempt getting the controller from elementControllers in case + //the element is transcluded (and has no data) and to avoid .data if possible + } else { + value = elementControllers && elementControllers[name]; + value = value && value.instance; + } + + if (!value) { + var dataName = '$' + name + 'Controller'; + value = inheritType ? $element.inheritedData(dataName) : $element.data(dataName); + } + + if (!value && !optional) { + throw $compileMinErr('ctreq', + 'Controller \'{0}\', required by directive \'{1}\', can\'t be found!', + name, directiveName); + } + } else if (isArray(require)) { + value = []; + for (var i = 0, ii = require.length; i < ii; i++) { + value[i] = getControllers(directiveName, require[i], $element, elementControllers); + } + } else if (isObject(require)) { + value = {}; + forEach(require, function(controller, property) { + value[property] = getControllers(directiveName, controller, $element, elementControllers); + }); + } + + return value || null; + } + + function setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope, newIsolateScopeDirective) { + var elementControllers = createMap(); + for (var controllerKey in controllerDirectives) { + var directive = controllerDirectives[controllerKey]; + var locals = { + $scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope, + $element: $element, + $attrs: attrs, + $transclude: transcludeFn + }; + + var controller = directive.controller; + if (controller === '@') { + controller = attrs[directive.name]; + } + + var controllerInstance = $controller(controller, locals, true, directive.controllerAs); + + // For directives with element transclusion the element is a comment. + // In this case .data will not attach any data. + // Instead, we save the controllers for the element in a local hash and attach to .data + // later, once we have the actual element. + elementControllers[directive.name] = controllerInstance; + $element.data('$' + directive.name + 'Controller', controllerInstance.instance); + } + return elementControllers; + } + + // Depending upon the context in which a directive finds itself it might need to have a new isolated + // or child scope created. For instance: + // * if the directive has been pulled into a template because another directive with a higher priority + // asked for element transclusion + // * if the directive itself asks for transclusion but it is at the root of a template and the original + // element was replaced. See https://github.com/angular/angular.js/issues/12936 + function markDirectiveScope(directives, isolateScope, newScope) { + for (var j = 0, jj = directives.length; j < jj; j++) { + directives[j] = inherit(directives[j], {$$isolateScope: isolateScope, $$newScope: newScope}); + } + } + + /** + * looks up the directive and decorates it with exception handling and proper parameters. We + * call this the boundDirective. + * + * @param {string} name name of the directive to look up. + * @param {string} location The directive must be found in specific format. + * String containing any of theses characters: + * + * * `E`: element name + * * `A': attribute + * * `C`: class + * * `M`: comment + * @returns {boolean} true if directive was added. + */ + function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName, + endAttrName) { + if (name === ignoreDirective) return null; + var match = null; + if (hasDirectives.hasOwnProperty(name)) { + for (var directive, directives = $injector.get(name + Suffix), + i = 0, ii = directives.length; i < ii; i++) { + directive = directives[i]; + if ((isUndefined(maxPriority) || maxPriority > directive.priority) && + directive.restrict.indexOf(location) !== -1) { + if (startAttrName) { + directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName}); + } + if (!directive.$$bindings) { + var bindings = directive.$$bindings = + parseDirectiveBindings(directive, directive.name); + if (isObject(bindings.isolateScope)) { + directive.$$isolateBindings = bindings.isolateScope; + } + } + tDirectives.push(directive); + match = directive; + } + } + } + return match; + } + + + /** + * looks up the directive and returns true if it is a multi-element directive, + * and therefore requires DOM nodes between -start and -end markers to be grouped + * together. + * + * @param {string} name name of the directive to look up. + * @returns true if directive was registered as multi-element. + */ + function directiveIsMultiElement(name) { + if (hasDirectives.hasOwnProperty(name)) { + for (var directive, directives = $injector.get(name + Suffix), + i = 0, ii = directives.length; i < ii; i++) { + directive = directives[i]; + if (directive.multiElement) { + return true; + } + } + } + return false; + } + + /** + * When the element is replaced with HTML template then the new attributes + * on the template need to be merged with the existing attributes in the DOM. + * The desired effect is to have both of the attributes present. + * + * @param {object} dst destination attributes (original DOM) + * @param {object} src source attributes (from the directive template) + */ + function mergeTemplateAttributes(dst, src) { + var srcAttr = src.$attr, + dstAttr = dst.$attr; + + // reapply the old attributes to the new element + forEach(dst, function(value, key) { + if (key.charAt(0) !== '$') { + if (src[key] && src[key] !== value) { + if (value.length) { + value += (key === 'style' ? ';' : ' ') + src[key]; + } else { + value = src[key]; + } + } + dst.$set(key, value, true, srcAttr[key]); + } + }); + + // copy the new attributes on the old attrs object + forEach(src, function(value, key) { + // Check if we already set this attribute in the loop above. + // `dst` will never contain hasOwnProperty as DOM parser won't let it. + // You will get an "InvalidCharacterError: DOM Exception 5" error if you + // have an attribute like "has-own-property" or "data-has-own-property", etc. + if (!dst.hasOwnProperty(key) && key.charAt(0) !== '$') { + dst[key] = value; + + if (key !== 'class' && key !== 'style') { + dstAttr[key] = srcAttr[key]; + } + } + }); + } + + + function compileTemplateUrl(directives, $compileNode, tAttrs, + $rootElement, childTranscludeFn, preLinkFns, postLinkFns, previousCompileContext) { + var linkQueue = [], + afterTemplateNodeLinkFn, + afterTemplateChildLinkFn, + beforeTemplateCompileNode = $compileNode[0], + origAsyncDirective = directives.shift(), + derivedSyncDirective = inherit(origAsyncDirective, { + templateUrl: null, transclude: null, replace: null, $$originalDirective: origAsyncDirective + }), + templateUrl = (isFunction(origAsyncDirective.templateUrl)) + ? origAsyncDirective.templateUrl($compileNode, tAttrs) + : origAsyncDirective.templateUrl, + templateNamespace = origAsyncDirective.templateNamespace; + + $compileNode.empty(); + + $templateRequest(templateUrl) + .then(function(content) { + var compileNode, tempTemplateAttrs, $template, childBoundTranscludeFn; + + content = denormalizeTemplate(content); + + if (origAsyncDirective.replace) { + if (jqLiteIsTextNode(content)) { + $template = []; + } else { + $template = removeComments(wrapTemplate(templateNamespace, trim(content))); + } + compileNode = $template[0]; + + if ($template.length !== 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) { + throw $compileMinErr('tplrt', + 'Template for directive \'{0}\' must have exactly one root element. {1}', + origAsyncDirective.name, templateUrl); + } + + tempTemplateAttrs = {$attr: {}}; + replaceWith($rootElement, $compileNode, compileNode); + var templateDirectives = collectDirectives(compileNode, [], tempTemplateAttrs); + + if (isObject(origAsyncDirective.scope)) { + // the original directive that caused the template to be loaded async required + // an isolate scope + markDirectiveScope(templateDirectives, true); + } + directives = templateDirectives.concat(directives); + mergeTemplateAttributes(tAttrs, tempTemplateAttrs); + } else { + compileNode = beforeTemplateCompileNode; + $compileNode.html(content); + } + + directives.unshift(derivedSyncDirective); + + afterTemplateNodeLinkFn = applyDirectivesToNode(directives, compileNode, tAttrs, + childTranscludeFn, $compileNode, origAsyncDirective, preLinkFns, postLinkFns, + previousCompileContext); + forEach($rootElement, function(node, i) { + if (node === compileNode) { + $rootElement[i] = $compileNode[0]; + } + }); + afterTemplateChildLinkFn = compileNodes($compileNode[0].childNodes, childTranscludeFn); + + while (linkQueue.length) { + var scope = linkQueue.shift(), + beforeTemplateLinkNode = linkQueue.shift(), + linkRootElement = linkQueue.shift(), + boundTranscludeFn = linkQueue.shift(), + linkNode = $compileNode[0]; + + if (scope.$$destroyed) continue; + + if (beforeTemplateLinkNode !== beforeTemplateCompileNode) { + var oldClasses = beforeTemplateLinkNode.className; + + if (!(previousCompileContext.hasElementTranscludeDirective && + origAsyncDirective.replace)) { + // it was cloned therefore we have to clone as well. + linkNode = jqLiteClone(compileNode); + } + replaceWith(linkRootElement, jqLite(beforeTemplateLinkNode), linkNode); + + // Copy in CSS classes from original node + safeAddClass(jqLite(linkNode), oldClasses); + } + if (afterTemplateNodeLinkFn.transcludeOnThisElement) { + childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn); + } else { + childBoundTranscludeFn = boundTranscludeFn; + } + afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, linkNode, $rootElement, + childBoundTranscludeFn); + } + linkQueue = null; + }).catch(function(error) { + if (isError(error)) { + $exceptionHandler(error); + } + }); + + return function delayedNodeLinkFn(ignoreChildLinkFn, scope, node, rootElement, boundTranscludeFn) { + var childBoundTranscludeFn = boundTranscludeFn; + if (scope.$$destroyed) return; + if (linkQueue) { + linkQueue.push(scope, + node, + rootElement, + childBoundTranscludeFn); + } else { + if (afterTemplateNodeLinkFn.transcludeOnThisElement) { + childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn); + } + afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, node, rootElement, childBoundTranscludeFn); + } + }; + } + + + /** + * Sorting function for bound directives. + */ + function byPriority(a, b) { + var diff = b.priority - a.priority; + if (diff !== 0) return diff; + if (a.name !== b.name) return (a.name < b.name) ? -1 : 1; + return a.index - b.index; + } + + function assertNoDuplicate(what, previousDirective, directive, element) { + + function wrapModuleNameIfDefined(moduleName) { + return moduleName ? + (' (module: ' + moduleName + ')') : + ''; + } + + if (previousDirective) { + throw $compileMinErr('multidir', 'Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}', + previousDirective.name, wrapModuleNameIfDefined(previousDirective.$$moduleName), + directive.name, wrapModuleNameIfDefined(directive.$$moduleName), what, startingTag(element)); + } + } + + + function addTextInterpolateDirective(directives, text) { + var interpolateFn = $interpolate(text, true); + if (interpolateFn) { + directives.push({ + priority: 0, + compile: function textInterpolateCompileFn(templateNode) { + var templateNodeParent = templateNode.parent(), + hasCompileParent = !!templateNodeParent.length; + + // When transcluding a template that has bindings in the root + // we don't have a parent and thus need to add the class during linking fn. + if (hasCompileParent) compile.$$addBindingClass(templateNodeParent); + + return function textInterpolateLinkFn(scope, node) { + var parent = node.parent(); + if (!hasCompileParent) compile.$$addBindingClass(parent); + compile.$$addBindingInfo(parent, interpolateFn.expressions); + scope.$watch(interpolateFn, function interpolateFnWatchAction(value) { + node[0].nodeValue = value; + }); + }; + } + }); + } + } + + + function wrapTemplate(type, template) { + type = lowercase(type || 'html'); + switch (type) { + case 'svg': + case 'math': + var wrapper = window.document.createElement('div'); + wrapper.innerHTML = '<' + type + '>' + template + ''; + return wrapper.childNodes[0].childNodes; + default: + return template; + } + } + + + function getTrustedContext(node, attrNormalizedName) { + if (attrNormalizedName === 'srcdoc') { + return $sce.HTML; + } + var tag = nodeName_(node); + // All tags with src attributes require a RESOURCE_URL value, except for + // img and various html5 media tags. + if (attrNormalizedName === 'src' || attrNormalizedName === 'ngSrc') { + if (['img', 'video', 'audio', 'source', 'track'].indexOf(tag) === -1) { + return $sce.RESOURCE_URL; + } + // maction[xlink:href] can source SVG. It's not limited to . + } else if (attrNormalizedName === 'xlinkHref' || + (tag === 'form' && attrNormalizedName === 'action') || + // links can be stylesheets or imports, which can run script in the current origin + (tag === 'link' && attrNormalizedName === 'href') + ) { + return $sce.RESOURCE_URL; + } + } + + + function addAttrInterpolateDirective(node, directives, value, name, isNgAttr) { + var trustedContext = getTrustedContext(node, name); + var mustHaveExpression = !isNgAttr; + var allOrNothing = ALL_OR_NOTHING_ATTRS[name] || isNgAttr; + + var interpolateFn = $interpolate(value, mustHaveExpression, trustedContext, allOrNothing); + + // no interpolation found -> ignore + if (!interpolateFn) return; + + if (name === 'multiple' && nodeName_(node) === 'select') { + throw $compileMinErr('selmulti', + 'Binding to the \'multiple\' attribute is not supported. Element: {0}', + startingTag(node)); + } + + if (EVENT_HANDLER_ATTR_REGEXP.test(name)) { + throw $compileMinErr('nodomevents', + 'Interpolations for HTML DOM event attributes are disallowed. Please use the ' + + 'ng- versions (such as ng-click instead of onclick) instead.'); + } + + directives.push({ + priority: 100, + compile: function() { + return { + pre: function attrInterpolatePreLinkFn(scope, element, attr) { + var $$observers = (attr.$$observers || (attr.$$observers = createMap())); + + // If the attribute has changed since last $interpolate()ed + var newValue = attr[name]; + if (newValue !== value) { + // we need to interpolate again since the attribute value has been updated + // (e.g. by another directive's compile function) + // ensure unset/empty values make interpolateFn falsy + interpolateFn = newValue && $interpolate(newValue, true, trustedContext, allOrNothing); + value = newValue; + } + + // if attribute was updated so that there is no interpolation going on we don't want to + // register any observers + if (!interpolateFn) return; + + // initialize attr object so that it's ready in case we need the value for isolate + // scope initialization, otherwise the value would not be available from isolate + // directive's linking fn during linking phase + attr[name] = interpolateFn(scope); + + ($$observers[name] || ($$observers[name] = [])).$$inter = true; + (attr.$$observers && attr.$$observers[name].$$scope || scope). + $watch(interpolateFn, function interpolateFnWatchAction(newValue, oldValue) { + //special case for class attribute addition + removal + //so that class changes can tap into the animation + //hooks provided by the $animate service. Be sure to + //skip animations when the first digest occurs (when + //both the new and the old values are the same) since + //the CSS classes are the non-interpolated values + if (name === 'class' && newValue !== oldValue) { + attr.$updateClass(newValue, oldValue); + } else { + attr.$set(name, newValue); + } + }); + } + }; + } + }); + } + + + /** + * This is a special jqLite.replaceWith, which can replace items which + * have no parents, provided that the containing jqLite collection is provided. + * + * @param {JqLite=} $rootElement The root of the compile tree. Used so that we can replace nodes + * in the root of the tree. + * @param {JqLite} elementsToRemove The jqLite element which we are going to replace. We keep + * the shell, but replace its DOM node reference. + * @param {Node} newNode The new DOM node. + */ + function replaceWith($rootElement, elementsToRemove, newNode) { + var firstElementToRemove = elementsToRemove[0], + removeCount = elementsToRemove.length, + parent = firstElementToRemove.parentNode, + i, ii; + + if ($rootElement) { + for (i = 0, ii = $rootElement.length; i < ii; i++) { + if ($rootElement[i] === firstElementToRemove) { + $rootElement[i++] = newNode; + for (var j = i, j2 = j + removeCount - 1, + jj = $rootElement.length; + j < jj; j++, j2++) { + if (j2 < jj) { + $rootElement[j] = $rootElement[j2]; + } else { + delete $rootElement[j]; + } + } + $rootElement.length -= removeCount - 1; + + // If the replaced element is also the jQuery .context then replace it + // .context is a deprecated jQuery api, so we should set it only when jQuery set it + // http://api.jquery.com/context/ + if ($rootElement.context === firstElementToRemove) { + $rootElement.context = newNode; + } + break; + } + } + } + + if (parent) { + parent.replaceChild(newNode, firstElementToRemove); + } + + // Append all the `elementsToRemove` to a fragment. This will... + // - remove them from the DOM + // - allow them to still be traversed with .nextSibling + // - allow a single fragment.qSA to fetch all elements being removed + var fragment = window.document.createDocumentFragment(); + for (i = 0; i < removeCount; i++) { + fragment.appendChild(elementsToRemove[i]); + } + + if (jqLite.hasData(firstElementToRemove)) { + // Copy over user data (that includes Angular's $scope etc.). Don't copy private + // data here because there's no public interface in jQuery to do that and copying over + // event listeners (which is the main use of private data) wouldn't work anyway. + jqLite.data(newNode, jqLite.data(firstElementToRemove)); + + // Remove $destroy event listeners from `firstElementToRemove` + jqLite(firstElementToRemove).off('$destroy'); + } + + // Cleanup any data/listeners on the elements and children. + // This includes invoking the $destroy event on any elements with listeners. + jqLite.cleanData(fragment.querySelectorAll('*')); + + // Update the jqLite collection to only contain the `newNode` + for (i = 1; i < removeCount; i++) { + delete elementsToRemove[i]; + } + elementsToRemove[0] = newNode; + elementsToRemove.length = 1; + } + + + function cloneAndAnnotateFn(fn, annotation) { + return extend(function() { return fn.apply(null, arguments); }, fn, annotation); + } + + + function invokeLinkFn(linkFn, scope, $element, attrs, controllers, transcludeFn) { + try { + linkFn(scope, $element, attrs, controllers, transcludeFn); + } catch (e) { + $exceptionHandler(e, startingTag($element)); + } + } + + function strictBindingsCheck(attrName, directiveName) { + if (strictComponentBindingsEnabled) { + throw $compileMinErr('missingattr', + 'Attribute \'{0}\' of \'{1}\' is non-optional and must be set!', + attrName, directiveName); + } + } + + // Set up $watches for isolate scope and controller bindings. + function initializeDirectiveBindings(scope, attrs, destination, bindings, directive) { + var removeWatchCollection = []; + var initialChanges = {}; + var changes; + + forEach(bindings, function initializeBinding(definition, scopeName) { + var attrName = definition.attrName, + optional = definition.optional, + mode = definition.mode, // @, =, <, or & + lastValue, + parentGet, parentSet, compare, removeWatch; + + switch (mode) { + + case '@': + if (!optional && !hasOwnProperty.call(attrs, attrName)) { + strictBindingsCheck(attrName, directive.name); + destination[scopeName] = attrs[attrName] = undefined; + + } + removeWatch = attrs.$observe(attrName, function(value) { + if (isString(value) || isBoolean(value)) { + var oldValue = destination[scopeName]; + recordChanges(scopeName, value, oldValue); + destination[scopeName] = value; + } + }); + attrs.$$observers[attrName].$$scope = scope; + lastValue = attrs[attrName]; + if (isString(lastValue)) { + // If the attribute has been provided then we trigger an interpolation to ensure + // the value is there for use in the link fn + destination[scopeName] = $interpolate(lastValue)(scope); + } else if (isBoolean(lastValue)) { + // If the attributes is one of the BOOLEAN_ATTR then Angular will have converted + // the value to boolean rather than a string, so we special case this situation + destination[scopeName] = lastValue; + } + initialChanges[scopeName] = new SimpleChange(_UNINITIALIZED_VALUE, destination[scopeName]); + removeWatchCollection.push(removeWatch); + break; + + case '=': + if (!hasOwnProperty.call(attrs, attrName)) { + if (optional) break; + strictBindingsCheck(attrName, directive.name); + attrs[attrName] = undefined; + } + if (optional && !attrs[attrName]) break; + + parentGet = $parse(attrs[attrName]); + if (parentGet.literal) { + compare = equals; + } else { + compare = simpleCompare; + } + parentSet = parentGet.assign || function() { + // reset the change, or we will throw this exception on every $digest + lastValue = destination[scopeName] = parentGet(scope); + throw $compileMinErr('nonassign', + 'Expression \'{0}\' in attribute \'{1}\' used with directive \'{2}\' is non-assignable!', + attrs[attrName], attrName, directive.name); + }; + lastValue = destination[scopeName] = parentGet(scope); + var parentValueWatch = function parentValueWatch(parentValue) { + if (!compare(parentValue, destination[scopeName])) { + // we are out of sync and need to copy + if (!compare(parentValue, lastValue)) { + // parent changed and it has precedence + destination[scopeName] = parentValue; + } else { + // if the parent can be assigned then do so + parentSet(scope, parentValue = destination[scopeName]); + } + } + lastValue = parentValue; + return lastValue; + }; + parentValueWatch.$stateful = true; + if (definition.collection) { + removeWatch = scope.$watchCollection(attrs[attrName], parentValueWatch); + } else { + removeWatch = scope.$watch($parse(attrs[attrName], parentValueWatch), null, parentGet.literal); + } + removeWatchCollection.push(removeWatch); + break; + + case '<': + if (!hasOwnProperty.call(attrs, attrName)) { + if (optional) break; + strictBindingsCheck(attrName, directive.name); + attrs[attrName] = undefined; + } + if (optional && !attrs[attrName]) break; + + parentGet = $parse(attrs[attrName]); + var deepWatch = parentGet.literal; + + var initialValue = destination[scopeName] = parentGet(scope); + initialChanges[scopeName] = new SimpleChange(_UNINITIALIZED_VALUE, destination[scopeName]); + + removeWatch = scope.$watch(parentGet, function parentValueWatchAction(newValue, oldValue) { + if (oldValue === newValue) { + if (oldValue === initialValue || (deepWatch && equals(oldValue, initialValue))) { + return; + } + oldValue = initialValue; + } + recordChanges(scopeName, newValue, oldValue); + destination[scopeName] = newValue; + }, deepWatch); + + removeWatchCollection.push(removeWatch); + break; + + case '&': + if (!optional && !hasOwnProperty.call(attrs, attrName)) { + strictBindingsCheck(attrName, directive.name); + } + // Don't assign Object.prototype method to scope + parentGet = attrs.hasOwnProperty(attrName) ? $parse(attrs[attrName]) : noop; + + // Don't assign noop to destination if expression is not valid + if (parentGet === noop && optional) break; + + destination[scopeName] = function(locals) { + return parentGet(scope, locals); + }; + break; + } + }); + + function recordChanges(key, currentValue, previousValue) { + if (isFunction(destination.$onChanges) && !simpleCompare(currentValue, previousValue)) { + // If we have not already scheduled the top level onChangesQueue handler then do so now + if (!onChangesQueue) { + scope.$$postDigest(flushOnChangesQueue); + onChangesQueue = []; + } + // If we have not already queued a trigger of onChanges for this controller then do so now + if (!changes) { + changes = {}; + onChangesQueue.push(triggerOnChangesHook); + } + // If the has been a change on this property already then we need to reuse the previous value + if (changes[key]) { + previousValue = changes[key].previousValue; + } + // Store this change + changes[key] = new SimpleChange(previousValue, currentValue); + } + } + + function triggerOnChangesHook() { + destination.$onChanges(changes); + // Now clear the changes so that we schedule onChanges when more changes arrive + changes = undefined; + } + + return { + initialChanges: initialChanges, + removeWatches: removeWatchCollection.length && function removeWatches() { + for (var i = 0, ii = removeWatchCollection.length; i < ii; ++i) { + removeWatchCollection[i](); + } + } + }; + } + }]; +} + +function SimpleChange(previous, current) { + this.previousValue = previous; + this.currentValue = current; +} +SimpleChange.prototype.isFirstChange = function() { return this.previousValue === _UNINITIALIZED_VALUE; }; + + +var PREFIX_REGEXP = /^((?:x|data)[:\-_])/i; +var SPECIAL_CHARS_REGEXP = /[:\-_]+(.)/g; + +/** + * Converts all accepted directives format into proper directive name. + * @param name Name to normalize + */ +function directiveNormalize(name) { + return name + .replace(PREFIX_REGEXP, '') + .replace(SPECIAL_CHARS_REGEXP, fnCamelCaseReplace); +} + +/** + * @ngdoc type + * @name $compile.directive.Attributes + * + * @description + * A shared object between directive compile / linking functions which contains normalized DOM + * element attributes. The values reflect current binding state `{{ }}`. The normalization is + * needed since all of these are treated as equivalent in Angular: + * + * ``` + * + * ``` + */ + +/** + * @ngdoc property + * @name $compile.directive.Attributes#$attr + * + * @description + * A map of DOM element attribute names to the normalized name. This is + * needed to do reverse lookup from normalized name back to actual name. + */ + + +/** + * @ngdoc method + * @name $compile.directive.Attributes#$set + * @kind function + * + * @description + * Set DOM element attribute value. + * + * + * @param {string} name Normalized element attribute name of the property to modify. The name is + * reverse-translated using the {@link ng.$compile.directive.Attributes#$attr $attr} + * property to the original name. + * @param {string} value Value to set the attribute to. The value can be an interpolated string. + */ + + + +/** + * Closure compiler type information + */ + +function nodesetLinkingFn( + /* angular.Scope */ scope, + /* NodeList */ nodeList, + /* Element */ rootElement, + /* function(Function) */ boundTranscludeFn +) {} + +function directiveLinkingFn( + /* nodesetLinkingFn */ nodesetLinkingFn, + /* angular.Scope */ scope, + /* Node */ node, + /* Element */ rootElement, + /* function(Function) */ boundTranscludeFn +) {} + +function tokenDifference(str1, str2) { + var values = '', + tokens1 = str1.split(/\s+/), + tokens2 = str2.split(/\s+/); + + outer: + for (var i = 0; i < tokens1.length; i++) { + var token = tokens1[i]; + for (var j = 0; j < tokens2.length; j++) { + if (token === tokens2[j]) continue outer; + } + values += (values.length > 0 ? ' ' : '') + token; + } + return values; +} + +function removeComments(jqNodes) { + jqNodes = jqLite(jqNodes); + var i = jqNodes.length; + + if (i <= 1) { + return jqNodes; + } + + while (i--) { + var node = jqNodes[i]; + if (node.nodeType === NODE_TYPE_COMMENT || + (node.nodeType === NODE_TYPE_TEXT && node.nodeValue.trim() === '')) { + splice.call(jqNodes, i, 1); + } + } + return jqNodes; +} + +var $controllerMinErr = minErr('$controller'); + + +var CNTRL_REG = /^(\S+)(\s+as\s+([\w$]+))?$/; +function identifierForController(controller, ident) { + if (ident && isString(ident)) return ident; + if (isString(controller)) { + var match = CNTRL_REG.exec(controller); + if (match) return match[3]; + } +} + + +/** + * @ngdoc provider + * @name $controllerProvider + * @this + * + * @description + * The {@link ng.$controller $controller service} is used by Angular to create new + * controllers. + * + * This provider allows controller registration via the + * {@link ng.$controllerProvider#register register} method. + */ +function $ControllerProvider() { + var controllers = {}, + globals = false; + + /** + * @ngdoc method + * @name $controllerProvider#has + * @param {string} name Controller name to check. + */ + this.has = function(name) { + return controllers.hasOwnProperty(name); + }; + + /** + * @ngdoc method + * @name $controllerProvider#register + * @param {string|Object} name Controller name, or an object map of controllers where the keys are + * the names and the values are the constructors. + * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI + * annotations in the array notation). + */ + this.register = function(name, constructor) { + assertNotHasOwnProperty(name, 'controller'); + if (isObject(name)) { + extend(controllers, name); + } else { + controllers[name] = constructor; + } + }; + + /** + * @ngdoc method + * @name $controllerProvider#allowGlobals + * @description If called, allows `$controller` to find controller constructors on `window` + * + * @deprecated + * sinceVersion="v1.3.0" + * removeVersion="v1.7.0" + * This method of finding controllers has been deprecated. + */ + this.allowGlobals = function() { + globals = true; + }; + + + this.$get = ['$injector', '$window', function($injector, $window) { + + /** + * @ngdoc service + * @name $controller + * @requires $injector + * + * @param {Function|string} constructor If called with a function then it's considered to be the + * controller constructor function. Otherwise it's considered to be a string which is used + * to retrieve the controller constructor using the following steps: + * + * * check if a controller with given name is registered via `$controllerProvider` + * * check if evaluating the string on the current scope returns a constructor + * * if $controllerProvider#allowGlobals, check `window[constructor]` on the global + * `window` object (deprecated, not recommended) + * + * The string can use the `controller as property` syntax, where the controller instance is published + * as the specified property on the `scope`; the `scope` must be injected into `locals` param for this + * to work correctly. + * + * @param {Object} locals Injection locals for Controller. + * @return {Object} Instance of given controller. + * + * @description + * `$controller` service is responsible for instantiating controllers. + * + * It's just a simple call to {@link auto.$injector $injector}, but extracted into + * a service, so that one can override this service with [BC version](https://gist.github.com/1649788). + */ + return function $controller(expression, locals, later, ident) { + // PRIVATE API: + // param `later` --- indicates that the controller's constructor is invoked at a later time. + // If true, $controller will allocate the object with the correct + // prototype chain, but will not invoke the controller until a returned + // callback is invoked. + // param `ident` --- An optional label which overrides the label parsed from the controller + // expression, if any. + var instance, match, constructor, identifier; + later = later === true; + if (ident && isString(ident)) { + identifier = ident; + } + + if (isString(expression)) { + match = expression.match(CNTRL_REG); + if (!match) { + throw $controllerMinErr('ctrlfmt', + 'Badly formed controller string \'{0}\'. ' + + 'Must match `__name__ as __id__` or `__name__`.', expression); + } + constructor = match[1]; + identifier = identifier || match[3]; + expression = controllers.hasOwnProperty(constructor) + ? controllers[constructor] + : getter(locals.$scope, constructor, true) || + (globals ? getter($window, constructor, true) : undefined); + + if (!expression) { + throw $controllerMinErr('ctrlreg', + 'The controller with the name \'{0}\' is not registered.', constructor); + } + + assertArgFn(expression, constructor, true); + } + + if (later) { + // Instantiate controller later: + // This machinery is used to create an instance of the object before calling the + // controller's constructor itself. + // + // This allows properties to be added to the controller before the constructor is + // invoked. Primarily, this is used for isolate scope bindings in $compile. + // + // This feature is not intended for use by applications, and is thus not documented + // publicly. + // Object creation: http://jsperf.com/create-constructor/2 + var controllerPrototype = (isArray(expression) ? + expression[expression.length - 1] : expression).prototype; + instance = Object.create(controllerPrototype || null); + + if (identifier) { + addIdentifier(locals, identifier, instance, constructor || expression.name); + } + + return extend(function $controllerInit() { + var result = $injector.invoke(expression, instance, locals, constructor); + if (result !== instance && (isObject(result) || isFunction(result))) { + instance = result; + if (identifier) { + // If result changed, re-assign controllerAs value to scope. + addIdentifier(locals, identifier, instance, constructor || expression.name); + } + } + return instance; + }, { + instance: instance, + identifier: identifier + }); + } + + instance = $injector.instantiate(expression, locals, constructor); + + if (identifier) { + addIdentifier(locals, identifier, instance, constructor || expression.name); + } + + return instance; + }; + + function addIdentifier(locals, identifier, instance, name) { + if (!(locals && isObject(locals.$scope))) { + throw minErr('$controller')('noscp', + 'Cannot export controller \'{0}\' as \'{1}\'! No $scope object provided via `locals`.', + name, identifier); + } + + locals.$scope[identifier] = instance; + } + }]; +} + +/** + * @ngdoc service + * @name $document + * @requires $window + * @this + * + * @description + * A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object. + * + * @example + + +
+

$document title:

+

window.document title:

+
+
+ + angular.module('documentExample', []) + .controller('ExampleController', ['$scope', '$document', function($scope, $document) { + $scope.title = $document[0].title; + $scope.windowTitle = angular.element(window.document)[0].title; + }]); + +
+ */ +function $DocumentProvider() { + this.$get = ['$window', function(window) { + return jqLite(window.document); + }]; +} + + +/** + * @private + * @this + * Listens for document visibility change and makes the current status accessible. + */ +function $$IsDocumentHiddenProvider() { + this.$get = ['$document', '$rootScope', function($document, $rootScope) { + var doc = $document[0]; + var hidden = doc && doc.hidden; + + $document.on('visibilitychange', changeListener); + + $rootScope.$on('$destroy', function() { + $document.off('visibilitychange', changeListener); + }); + + function changeListener() { + hidden = doc.hidden; + } + + return function() { + return hidden; + }; + }]; +} + +/** + * @ngdoc service + * @name $exceptionHandler + * @requires ng.$log + * @this + * + * @description + * Any uncaught exception in angular expressions is delegated to this service. + * The default implementation simply delegates to `$log.error` which logs it into + * the browser console. + * + * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by + * {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing. + * + * ## Example: + * + * The example below will overwrite the default `$exceptionHandler` in order to (a) log uncaught + * errors to the backend for later inspection by the developers and (b) to use `$log.warn()` instead + * of `$log.error()`. + * + * ```js + * angular. + * module('exceptionOverwrite', []). + * factory('$exceptionHandler', ['$log', 'logErrorsToBackend', function($log, logErrorsToBackend) { + * return function myExceptionHandler(exception, cause) { + * logErrorsToBackend(exception, cause); + * $log.warn(exception, cause); + * }; + * }]); + * ``` + * + *
+ * Note, that code executed in event-listeners (even those registered using jqLite's `on`/`bind` + * methods) does not delegate exceptions to the {@link ng.$exceptionHandler $exceptionHandler} + * (unless executed during a digest). + * + * If you wish, you can manually delegate exceptions, e.g. + * `try { ... } catch(e) { $exceptionHandler(e); }` + * + * @param {Error} exception Exception associated with the error. + * @param {string=} cause Optional information about the context in which + * the error was thrown. + * + */ +function $ExceptionHandlerProvider() { + this.$get = ['$log', function($log) { + return function(exception, cause) { + $log.error.apply($log, arguments); + }; + }]; +} + +var $$ForceReflowProvider = /** @this */ function() { + this.$get = ['$document', function($document) { + return function(domNode) { + //the line below will force the browser to perform a repaint so + //that all the animated elements within the animation frame will + //be properly updated and drawn on screen. This is required to + //ensure that the preparation animation is properly flushed so that + //the active state picks up from there. DO NOT REMOVE THIS LINE. + //DO NOT OPTIMIZE THIS LINE. THE MINIFIER WILL REMOVE IT OTHERWISE WHICH + //WILL RESULT IN AN UNPREDICTABLE BUG THAT IS VERY HARD TO TRACK DOWN AND + //WILL TAKE YEARS AWAY FROM YOUR LIFE. + if (domNode) { + if (!domNode.nodeType && domNode instanceof jqLite) { + domNode = domNode[0]; + } + } else { + domNode = $document[0].body; + } + return domNode.offsetWidth + 1; + }; + }]; +}; + +var APPLICATION_JSON = 'application/json'; +var CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': APPLICATION_JSON + ';charset=utf-8'}; +var JSON_START = /^\[|^\{(?!\{)/; +var JSON_ENDS = { + '[': /]$/, + '{': /}$/ +}; +var JSON_PROTECTION_PREFIX = /^\)]\}',?\n/; +var $httpMinErr = minErr('$http'); + +function serializeValue(v) { + if (isObject(v)) { + return isDate(v) ? v.toISOString() : toJson(v); + } + return v; +} + + +/** @this */ +function $HttpParamSerializerProvider() { + /** + * @ngdoc service + * @name $httpParamSerializer + * @description + * + * Default {@link $http `$http`} params serializer that converts objects to strings + * according to the following rules: + * + * * `{'foo': 'bar'}` results in `foo=bar` + * * `{'foo': Date.now()}` results in `foo=2015-04-01T09%3A50%3A49.262Z` (`toISOString()` and encoded representation of a Date object) + * * `{'foo': ['bar', 'baz']}` results in `foo=bar&foo=baz` (repeated key for each array element) + * * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D` (stringified and encoded representation of an object) + * + * Note that serializer will sort the request parameters alphabetically. + * */ + + this.$get = function() { + return function ngParamSerializer(params) { + if (!params) return ''; + var parts = []; + forEachSorted(params, function(value, key) { + if (value === null || isUndefined(value) || isFunction(value)) return; + if (isArray(value)) { + forEach(value, function(v) { + parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(v))); + }); + } else { + parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(value))); + } + }); + + return parts.join('&'); + }; + }; +} + +/** @this */ +function $HttpParamSerializerJQLikeProvider() { + /** + * @ngdoc service + * @name $httpParamSerializerJQLike + * + * @description + * + * Alternative {@link $http `$http`} params serializer that follows + * jQuery's [`param()`](http://api.jquery.com/jquery.param/) method logic. + * The serializer will also sort the params alphabetically. + * + * To use it for serializing `$http` request parameters, set it as the `paramSerializer` property: + * + * ```js + * $http({ + * url: myUrl, + * method: 'GET', + * params: myParams, + * paramSerializer: '$httpParamSerializerJQLike' + * }); + * ``` + * + * It is also possible to set it as the default `paramSerializer` in the + * {@link $httpProvider#defaults `$httpProvider`}. + * + * Additionally, you can inject the serializer and use it explicitly, for example to serialize + * form data for submission: + * + * ```js + * .controller(function($http, $httpParamSerializerJQLike) { + * //... + * + * $http({ + * url: myUrl, + * method: 'POST', + * data: $httpParamSerializerJQLike(myData), + * headers: { + * 'Content-Type': 'application/x-www-form-urlencoded' + * } + * }); + * + * }); + * ``` + * + * */ + this.$get = function() { + return function jQueryLikeParamSerializer(params) { + if (!params) return ''; + var parts = []; + serialize(params, '', true); + return parts.join('&'); + + function serialize(toSerialize, prefix, topLevel) { + if (toSerialize === null || isUndefined(toSerialize)) return; + if (isArray(toSerialize)) { + forEach(toSerialize, function(value, index) { + serialize(value, prefix + '[' + (isObject(value) ? index : '') + ']'); + }); + } else if (isObject(toSerialize) && !isDate(toSerialize)) { + forEachSorted(toSerialize, function(value, key) { + serialize(value, prefix + + (topLevel ? '' : '[') + + key + + (topLevel ? '' : ']')); + }); + } else { + parts.push(encodeUriQuery(prefix) + '=' + encodeUriQuery(serializeValue(toSerialize))); + } + } + }; + }; +} + +function defaultHttpResponseTransform(data, headers) { + if (isString(data)) { + // Strip json vulnerability protection prefix and trim whitespace + var tempData = data.replace(JSON_PROTECTION_PREFIX, '').trim(); + + if (tempData) { + var contentType = headers('Content-Type'); + var hasJsonContentType = contentType && (contentType.indexOf(APPLICATION_JSON) === 0); + + if (hasJsonContentType || isJsonLike(tempData)) { + try { + data = fromJson(tempData); + } catch (e) { + if (!hasJsonContentType) { + return data; + } + throw $httpMinErr('baddata', 'Data must be a valid JSON object. Received: "{0}". ' + + 'Parse error: "{1}"', data, e); + } + } + } + } + + return data; +} + +function isJsonLike(str) { + var jsonStart = str.match(JSON_START); + return jsonStart && JSON_ENDS[jsonStart[0]].test(str); +} + +/** + * Parse headers into key value object + * + * @param {string} headers Raw headers as a string + * @returns {Object} Parsed headers as key value object + */ +function parseHeaders(headers) { + var parsed = createMap(), i; + + function fillInParsed(key, val) { + if (key) { + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; + } + } + + if (isString(headers)) { + forEach(headers.split('\n'), function(line) { + i = line.indexOf(':'); + fillInParsed(lowercase(trim(line.substr(0, i))), trim(line.substr(i + 1))); + }); + } else if (isObject(headers)) { + forEach(headers, function(headerVal, headerKey) { + fillInParsed(lowercase(headerKey), trim(headerVal)); + }); + } + + return parsed; +} + + +/** + * Returns a function that provides access to parsed headers. + * + * Headers are lazy parsed when first requested. + * @see parseHeaders + * + * @param {(string|Object)} headers Headers to provide access to. + * @returns {function(string=)} Returns a getter function which if called with: + * + * - if called with an argument returns a single header value or null + * - if called with no arguments returns an object containing all headers. + */ +function headersGetter(headers) { + var headersObj; + + return function(name) { + if (!headersObj) headersObj = parseHeaders(headers); + + if (name) { + var value = headersObj[lowercase(name)]; + if (value === undefined) { + value = null; + } + return value; + } + + return headersObj; + }; +} + + +/** + * Chain all given functions + * + * This function is used for both request and response transforming + * + * @param {*} data Data to transform. + * @param {function(string=)} headers HTTP headers getter fn. + * @param {number} status HTTP status code of the response. + * @param {(Function|Array.)} fns Function or an array of functions. + * @returns {*} Transformed data. + */ +function transformData(data, headers, status, fns) { + if (isFunction(fns)) { + return fns(data, headers, status); + } + + forEach(fns, function(fn) { + data = fn(data, headers, status); + }); + + return data; +} + + +function isSuccess(status) { + return 200 <= status && status < 300; +} + + +/** + * @ngdoc provider + * @name $httpProvider + * @this + * + * @description + * Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service. + * */ +function $HttpProvider() { + /** + * @ngdoc property + * @name $httpProvider#defaults + * @description + * + * Object containing default values for all {@link ng.$http $http} requests. + * + * - **`defaults.cache`** - {boolean|Object} - A boolean value or object created with + * {@link ng.$cacheFactory `$cacheFactory`} to enable or disable caching of HTTP responses + * by default. See {@link $http#caching $http Caching} for more information. + * + * - **`defaults.headers`** - {Object} - Default headers for all $http requests. + * Refer to {@link ng.$http#setting-http-headers $http} for documentation on + * setting default headers. + * - **`defaults.headers.common`** + * - **`defaults.headers.post`** + * - **`defaults.headers.put`** + * - **`defaults.headers.patch`** + * + * - **`defaults.jsonpCallbackParam`** - `{string}` - the name of the query parameter that passes the name of the + * callback in a JSONP request. The value of this parameter will be replaced with the expression generated by the + * {@link $jsonpCallbacks} service. Defaults to `'callback'`. + * + * - **`defaults.paramSerializer`** - `{string|function(Object):string}` - A function + * used to the prepare string representation of request parameters (specified as an object). + * If specified as string, it is interpreted as a function registered with the {@link auto.$injector $injector}. + * Defaults to {@link ng.$httpParamSerializer $httpParamSerializer}. + * + * - **`defaults.transformRequest`** - + * `{Array|function(data, headersGetter)}` - + * An array of functions (or a single function) which are applied to the request data. + * By default, this is an array with one request transformation function: + * + * - If the `data` property of the request configuration object contains an object, serialize it + * into JSON format. + * + * - **`defaults.transformResponse`** - + * `{Array|function(data, headersGetter, status)}` - + * An array of functions (or a single function) which are applied to the response data. By default, + * this is an array which applies one response transformation function that does two things: + * + * - If XSRF prefix is detected, strip it + * (see {@link ng.$http#security-considerations Security Considerations in the $http docs}). + * - If the `Content-Type` is `application/json` or the response looks like JSON, + * deserialize it using a JSON parser. + * + * - **`defaults.xsrfCookieName`** - {string} - Name of cookie containing the XSRF token. + * Defaults value is `'XSRF-TOKEN'`. + * + * - **`defaults.xsrfHeaderName`** - {string} - Name of HTTP header to populate with the + * XSRF token. Defaults value is `'X-XSRF-TOKEN'`. + * + **/ + var defaults = this.defaults = { + // transform incoming response data + transformResponse: [defaultHttpResponseTransform], + + // transform outgoing request data + transformRequest: [function(d) { + return isObject(d) && !isFile(d) && !isBlob(d) && !isFormData(d) ? toJson(d) : d; + }], + + // default headers + headers: { + common: { + 'Accept': 'application/json, text/plain, */*' + }, + post: shallowCopy(CONTENT_TYPE_APPLICATION_JSON), + put: shallowCopy(CONTENT_TYPE_APPLICATION_JSON), + patch: shallowCopy(CONTENT_TYPE_APPLICATION_JSON) + }, + + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', + + paramSerializer: '$httpParamSerializer', + + jsonpCallbackParam: 'callback' + }; + + var useApplyAsync = false; + /** + * @ngdoc method + * @name $httpProvider#useApplyAsync + * @description + * + * Configure $http service to combine processing of multiple http responses received at around + * the same time via {@link ng.$rootScope.Scope#$applyAsync $rootScope.$applyAsync}. This can result in + * significant performance improvement for bigger applications that make many HTTP requests + * concurrently (common during application bootstrap). + * + * Defaults to false. If no value is specified, returns the current configured value. + * + * @param {boolean=} value If true, when requests are loaded, they will schedule a deferred + * "apply" on the next tick, giving time for subsequent requests in a roughly ~10ms window + * to load and share the same digest cycle. + * + * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining. + * otherwise, returns the current configured value. + **/ + this.useApplyAsync = function(value) { + if (isDefined(value)) { + useApplyAsync = !!value; + return this; + } + return useApplyAsync; + }; + + /** + * @ngdoc property + * @name $httpProvider#interceptors + * @description + * + * Array containing service factories for all synchronous or asynchronous {@link ng.$http $http} + * pre-processing of request or postprocessing of responses. + * + * These service factories are ordered by request, i.e. they are applied in the same order as the + * array, on request, but reverse order, on response. + * + * {@link ng.$http#interceptors Interceptors detailed info} + **/ + var interceptorFactories = this.interceptors = []; + + this.$get = ['$browser', '$httpBackend', '$$cookieReader', '$cacheFactory', '$rootScope', '$q', '$injector', '$sce', + function($browser, $httpBackend, $$cookieReader, $cacheFactory, $rootScope, $q, $injector, $sce) { + + var defaultCache = $cacheFactory('$http'); + + /** + * Make sure that default param serializer is exposed as a function + */ + defaults.paramSerializer = isString(defaults.paramSerializer) ? + $injector.get(defaults.paramSerializer) : defaults.paramSerializer; + + /** + * Interceptors stored in reverse order. Inner interceptors before outer interceptors. + * The reversal is needed so that we can build up the interception chain around the + * server request. + */ + var reversedInterceptors = []; + + forEach(interceptorFactories, function(interceptorFactory) { + reversedInterceptors.unshift(isString(interceptorFactory) + ? $injector.get(interceptorFactory) : $injector.invoke(interceptorFactory)); + }); + + /** + * @ngdoc service + * @kind function + * @name $http + * @requires ng.$httpBackend + * @requires $cacheFactory + * @requires $rootScope + * @requires $q + * @requires $injector + * + * @description + * The `$http` service is a core Angular service that facilitates communication with the remote + * HTTP servers via the browser's [XMLHttpRequest](https://developer.mozilla.org/en/xmlhttprequest) + * object or via [JSONP](http://en.wikipedia.org/wiki/JSONP). + * + * For unit testing applications that use `$http` service, see + * {@link ngMock.$httpBackend $httpBackend mock}. + * + * For a higher level of abstraction, please check out the {@link ngResource.$resource + * $resource} service. + * + * The $http API is based on the {@link ng.$q deferred/promise APIs} exposed by + * the $q service. While for simple usage patterns this doesn't matter much, for advanced usage + * it is important to familiarize yourself with these APIs and the guarantees they provide. + * + * + * ## General usage + * The `$http` service is a function which takes a single argument — a {@link $http#usage configuration object} — + * that is used to generate an HTTP request and returns a {@link ng.$q promise}. + * + * ```js + * // Simple GET request example: + * $http({ + * method: 'GET', + * url: '/someUrl' + * }).then(function successCallback(response) { + * // this callback will be called asynchronously + * // when the response is available + * }, function errorCallback(response) { + * // called asynchronously if an error occurs + * // or server returns response with an error status. + * }); + * ``` + * + * The response object has these properties: + * + * - **data** – `{string|Object}` – The response body transformed with the transform + * functions. + * - **status** – `{number}` – HTTP status code of the response. + * - **headers** – `{function([headerName])}` – Header getter function. + * - **config** – `{Object}` – The configuration object that was used to generate the request. + * - **statusText** – `{string}` – HTTP status text of the response. + * - **xhrStatus** – `{string}` – Status of the XMLHttpRequest (`complete`, `error`, `timeout` or `abort`). + * + * A response status code between 200 and 299 is considered a success status and will result in + * the success callback being called. Any response status code outside of that range is + * considered an error status and will result in the error callback being called. + * Also, status codes less than -1 are normalized to zero. -1 usually means the request was + * aborted, e.g. using a `config.timeout`. + * Note that if the response is a redirect, XMLHttpRequest will transparently follow it, meaning + * that the outcome (success or error) will be determined by the final response status code. + * + * + * ## Shortcut methods + * + * Shortcut methods are also available. All shortcut methods require passing in the URL, and + * request data must be passed in for POST/PUT requests. An optional config can be passed as the + * last argument. + * + * ```js + * $http.get('/someUrl', config).then(successCallback, errorCallback); + * $http.post('/someUrl', data, config).then(successCallback, errorCallback); + * ``` + * + * Complete list of shortcut methods: + * + * - {@link ng.$http#get $http.get} + * - {@link ng.$http#head $http.head} + * - {@link ng.$http#post $http.post} + * - {@link ng.$http#put $http.put} + * - {@link ng.$http#delete $http.delete} + * - {@link ng.$http#jsonp $http.jsonp} + * - {@link ng.$http#patch $http.patch} + * + * + * ## Writing Unit Tests that use $http + * When unit testing (using {@link ngMock ngMock}), it is necessary to call + * {@link ngMock.$httpBackend#flush $httpBackend.flush()} to flush each pending + * request using trained responses. + * + * ``` + * $httpBackend.expectGET(...); + * $http.get(...); + * $httpBackend.flush(); + * ``` + * + * ## Setting HTTP Headers + * + * The $http service will automatically add certain HTTP headers to all requests. These defaults + * can be fully configured by accessing the `$httpProvider.defaults.headers` configuration + * object, which currently contains this default configuration: + * + * - `$httpProvider.defaults.headers.common` (headers that are common for all requests): + * - Accept: application/json, text/plain, \*/\* + * - `$httpProvider.defaults.headers.post`: (header defaults for POST requests) + * - `Content-Type: application/json` + * - `$httpProvider.defaults.headers.put` (header defaults for PUT requests) + * - `Content-Type: application/json` + * + * To add or overwrite these defaults, simply add or remove a property from these configuration + * objects. To add headers for an HTTP method other than POST or PUT, simply add a new object + * with the lowercased HTTP method name as the key, e.g. + * `$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }`. + * + * The defaults can also be set at runtime via the `$http.defaults` object in the same + * fashion. For example: + * + * ``` + * module.run(function($http) { + * $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w'; + * }); + * ``` + * + * In addition, you can supply a `headers` property in the config object passed when + * calling `$http(config)`, which overrides the defaults without changing them globally. + * + * To explicitly remove a header automatically added via $httpProvider.defaults.headers on a per request basis, + * Use the `headers` property, setting the desired header to `undefined`. For example: + * + * ```js + * var req = { + * method: 'POST', + * url: 'http://example.com', + * headers: { + * 'Content-Type': undefined + * }, + * data: { test: 'test' } + * } + * + * $http(req).then(function(){...}, function(){...}); + * ``` + * + * ## Transforming Requests and Responses + * + * Both requests and responses can be transformed using transformation functions: `transformRequest` + * and `transformResponse`. These properties can be a single function that returns + * the transformed value (`function(data, headersGetter, status)`) or an array of such transformation functions, + * which allows you to `push` or `unshift` a new transformation function into the transformation chain. + * + *
+ * **Note:** Angular does not make a copy of the `data` parameter before it is passed into the `transformRequest` pipeline. + * That means changes to the properties of `data` are not local to the transform function (since Javascript passes objects by reference). + * For example, when calling `$http.get(url, $scope.myObject)`, modifications to the object's properties in a transformRequest + * function will be reflected on the scope and in any templates where the object is data-bound. + * To prevent this, transform functions should have no side-effects. + * If you need to modify properties, it is recommended to make a copy of the data, or create new object to return. + *
+ * + * ### Default Transformations + * + * The `$httpProvider` provider and `$http` service expose `defaults.transformRequest` and + * `defaults.transformResponse` properties. If a request does not provide its own transformations + * then these will be applied. + * + * You can augment or replace the default transformations by modifying these properties by adding to or + * replacing the array. + * + * Angular provides the following default transformations: + * + * Request transformations (`$httpProvider.defaults.transformRequest` and `$http.defaults.transformRequest`) is + * an array with one function that does the following: + * + * - If the `data` property of the request configuration object contains an object, serialize it + * into JSON format. + * + * Response transformations (`$httpProvider.defaults.transformResponse` and `$http.defaults.transformResponse`) is + * an array with one function that does the following: + * + * - If XSRF prefix is detected, strip it (see Security Considerations section below). + * - If the `Content-Type` is `application/json` or the response looks like JSON, + * deserialize it using a JSON parser. + * + * + * ### Overriding the Default Transformations Per Request + * + * If you wish to override the request/response transformations only for a single request then provide + * `transformRequest` and/or `transformResponse` properties on the configuration object passed + * into `$http`. + * + * Note that if you provide these properties on the config object the default transformations will be + * overwritten. If you wish to augment the default transformations then you must include them in your + * local transformation array. + * + * The following code demonstrates adding a new response transformation to be run after the default response + * transformations have been run. + * + * ```js + * function appendTransform(defaults, transform) { + * + * // We can't guarantee that the default transformation is an array + * defaults = angular.isArray(defaults) ? defaults : [defaults]; + * + * // Append the new transformation to the defaults + * return defaults.concat(transform); + * } + * + * $http({ + * url: '...', + * method: 'GET', + * transformResponse: appendTransform($http.defaults.transformResponse, function(value) { + * return doTransform(value); + * }) + * }); + * ``` + * + * + * ## Caching + * + * {@link ng.$http `$http`} responses are not cached by default. To enable caching, you must + * set the config.cache value or the default cache value to TRUE or to a cache object (created + * with {@link ng.$cacheFactory `$cacheFactory`}). If defined, the value of config.cache takes + * precedence over the default cache value. + * + * In order to: + * * cache all responses - set the default cache value to TRUE or to a cache object + * * cache a specific response - set config.cache value to TRUE or to a cache object + * + * If caching is enabled, but neither the default cache nor config.cache are set to a cache object, + * then the default `$cacheFactory("$http")` object is used. + * + * The default cache value can be set by updating the + * {@link ng.$http#defaults `$http.defaults.cache`} property or the + * {@link $httpProvider#defaults `$httpProvider.defaults.cache`} property. + * + * When caching is enabled, {@link ng.$http `$http`} stores the response from the server using + * the relevant cache object. The next time the same request is made, the response is returned + * from the cache without sending a request to the server. + * + * Take note that: + * + * * Only GET and JSONP requests are cached. + * * The cache key is the request URL including search parameters; headers are not considered. + * * Cached responses are returned asynchronously, in the same way as responses from the server. + * * If multiple identical requests are made using the same cache, which is not yet populated, + * one request will be made to the server and remaining requests will return the same response. + * * A cache-control header on the response does not affect if or how responses are cached. + * + * + * ## Interceptors + * + * Before you start creating interceptors, be sure to understand the + * {@link ng.$q $q and deferred/promise APIs}. + * + * For purposes of global error handling, authentication, or any kind of synchronous or + * asynchronous pre-processing of request or postprocessing of responses, it is desirable to be + * able to intercept requests before they are handed to the server and + * responses before they are handed over to the application code that + * initiated these requests. The interceptors leverage the {@link ng.$q + * promise APIs} to fulfill this need for both synchronous and asynchronous pre-processing. + * + * The interceptors are service factories that are registered with the `$httpProvider` by + * adding them to the `$httpProvider.interceptors` array. The factory is called and + * injected with dependencies (if specified) and returns the interceptor. + * + * There are two kinds of interceptors (and two kinds of rejection interceptors): + * + * * `request`: interceptors get called with a http {@link $http#usage config} object. The function is free to + * modify the `config` object or create a new one. The function needs to return the `config` + * object directly, or a promise containing the `config` or a new `config` object. + * * `requestError`: interceptor gets called when a previous interceptor threw an error or + * resolved with a rejection. + * * `response`: interceptors get called with http `response` object. The function is free to + * modify the `response` object or create a new one. The function needs to return the `response` + * object directly, or as a promise containing the `response` or a new `response` object. + * * `responseError`: interceptor gets called when a previous interceptor threw an error or + * resolved with a rejection. + * + * + * ```js + * // register the interceptor as a service + * $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) { + * return { + * // optional method + * 'request': function(config) { + * // do something on success + * return config; + * }, + * + * // optional method + * 'requestError': function(rejection) { + * // do something on error + * if (canRecover(rejection)) { + * return responseOrNewPromise + * } + * return $q.reject(rejection); + * }, + * + * + * + * // optional method + * 'response': function(response) { + * // do something on success + * return response; + * }, + * + * // optional method + * 'responseError': function(rejection) { + * // do something on error + * if (canRecover(rejection)) { + * return responseOrNewPromise + * } + * return $q.reject(rejection); + * } + * }; + * }); + * + * $httpProvider.interceptors.push('myHttpInterceptor'); + * + * + * // alternatively, register the interceptor via an anonymous factory + * $httpProvider.interceptors.push(function($q, dependency1, dependency2) { + * return { + * 'request': function(config) { + * // same as above + * }, + * + * 'response': function(response) { + * // same as above + * } + * }; + * }); + * ``` + * + * ## Security Considerations + * + * When designing web applications, consider security threats from: + * + * - [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx) + * - [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) + * + * Both server and the client must cooperate in order to eliminate these threats. Angular comes + * pre-configured with strategies that address these issues, but for this to work backend server + * cooperation is required. + * + * ### JSON Vulnerability Protection + * + * A [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx) + * allows third party website to turn your JSON resource URL into + * [JSONP](http://en.wikipedia.org/wiki/JSONP) request under some conditions. To + * counter this your server can prefix all JSON requests with following string `")]}',\n"`. + * Angular will automatically strip the prefix before processing it as JSON. + * + * For example if your server needs to return: + * ```js + * ['one','two'] + * ``` + * + * which is vulnerable to attack, your server can return: + * ```js + * )]}', + * ['one','two'] + * ``` + * + * Angular will strip the prefix, before processing the JSON. + * + * + * ### Cross Site Request Forgery (XSRF) Protection + * + * [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) is an attack technique by + * which the attacker can trick an authenticated user into unknowingly executing actions on your + * website. Angular provides a mechanism to counter XSRF. When performing XHR requests, the + * $http service reads a token from a cookie (by default, `XSRF-TOKEN`) and sets it as an HTTP + * header (`X-XSRF-TOKEN`). Since only JavaScript that runs on your domain could read the + * cookie, your server can be assured that the XHR came from JavaScript running on your domain. + * The header will not be set for cross-domain requests. + * + * To take advantage of this, your server needs to set a token in a JavaScript readable session + * cookie called `XSRF-TOKEN` on the first HTTP GET request. On subsequent XHR requests the + * server can verify that the cookie matches `X-XSRF-TOKEN` HTTP header, and therefore be sure + * that only JavaScript running on your domain could have sent the request. The token must be + * unique for each user and must be verifiable by the server (to prevent the JavaScript from + * making up its own tokens). We recommend that the token is a digest of your site's + * authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography)) + * for added security. + * + * The name of the headers can be specified using the xsrfHeaderName and xsrfCookieName + * properties of either $httpProvider.defaults at config-time, $http.defaults at run-time, + * or the per-request config object. + * + * In order to prevent collisions in environments where multiple Angular apps share the + * same domain or subdomain, we recommend that each application uses unique cookie name. + * + * @param {object} config Object describing the request to be made and how it should be + * processed. The object has following properties: + * + * - **method** – `{string}` – HTTP method (e.g. 'GET', 'POST', etc) + * - **url** – `{string|TrustedObject}` – Absolute or relative URL of the resource that is being requested; + * or an object created by a call to `$sce.trustAsResourceUrl(url)`. + * - **params** – `{Object.}` – Map of strings or objects which will be serialized + * with the `paramSerializer` and appended as GET parameters. + * - **data** – `{string|Object}` – Data to be sent as the request message data. + * - **headers** – `{Object}` – Map of strings or functions which return strings representing + * HTTP headers to send to the server. If the return value of a function is null, the + * header will not be sent. Functions accept a config object as an argument. + * - **eventHandlers** - `{Object}` - Event listeners to be bound to the XMLHttpRequest object. + * To bind events to the XMLHttpRequest upload object, use `uploadEventHandlers`. + * The handler will be called in the context of a `$apply` block. + * - **uploadEventHandlers** - `{Object}` - Event listeners to be bound to the XMLHttpRequest upload + * object. To bind events to the XMLHttpRequest object, use `eventHandlers`. + * The handler will be called in the context of a `$apply` block. + * - **xsrfHeaderName** – `{string}` – Name of HTTP header to populate with the XSRF token. + * - **xsrfCookieName** – `{string}` – Name of cookie containing the XSRF token. + * - **transformRequest** – + * `{function(data, headersGetter)|Array.}` – + * transform function or an array of such functions. The transform function takes the http + * request body and headers and returns its transformed (typically serialized) version. + * See {@link ng.$http#overriding-the-default-transformations-per-request + * Overriding the Default Transformations} + * - **transformResponse** – + * `{function(data, headersGetter, status)|Array.}` – + * transform function or an array of such functions. The transform function takes the http + * response body, headers and status and returns its transformed (typically deserialized) version. + * See {@link ng.$http#overriding-the-default-transformations-per-request + * Overriding the Default Transformations} + * - **paramSerializer** - `{string|function(Object):string}` - A function used to + * prepare the string representation of request parameters (specified as an object). + * If specified as string, it is interpreted as function registered with the + * {@link $injector $injector}, which means you can create your own serializer + * by registering it as a {@link auto.$provide#service service}. + * The default serializer is the {@link $httpParamSerializer $httpParamSerializer}; + * alternatively, you can use the {@link $httpParamSerializerJQLike $httpParamSerializerJQLike} + * - **cache** – `{boolean|Object}` – A boolean value or object created with + * {@link ng.$cacheFactory `$cacheFactory`} to enable or disable caching of the HTTP response. + * See {@link $http#caching $http Caching} for more information. + * - **timeout** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise} + * that should abort the request when resolved. + * - **withCredentials** - `{boolean}` - whether to set the `withCredentials` flag on the + * XHR object. See [requests with credentials](https://developer.mozilla.org/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials) + * for more information. + * - **responseType** - `{string}` - see + * [XMLHttpRequest.responseType](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#xmlhttprequest-responsetype). + * + * @returns {HttpPromise} Returns a {@link ng.$q `Promise}` that will be resolved to a response object + * when the request succeeds or fails. + * + * + * @property {Array.} pendingRequests Array of config objects for currently pending + * requests. This is primarily meant to be used for debugging purposes. + * + * + * @example + + +
+ + +
+ + + +
http status code: {{status}}
+
http response data: {{data}}
+
+
+ + angular.module('httpExample', []) + .config(['$sceDelegateProvider', function($sceDelegateProvider) { + // We must whitelist the JSONP endpoint that we are using to show that we trust it + $sceDelegateProvider.resourceUrlWhitelist([ + 'self', + 'https://angularjs.org/**' + ]); + }]) + .controller('FetchController', ['$scope', '$http', '$templateCache', + function($scope, $http, $templateCache) { + $scope.method = 'GET'; + $scope.url = 'http-hello.html'; + + $scope.fetch = function() { + $scope.code = null; + $scope.response = null; + + $http({method: $scope.method, url: $scope.url, cache: $templateCache}). + then(function(response) { + $scope.status = response.status; + $scope.data = response.data; + }, function(response) { + $scope.data = response.data || 'Request failed'; + $scope.status = response.status; + }); + }; + + $scope.updateModel = function(method, url) { + $scope.method = method; + $scope.url = url; + }; + }]); + + + Hello, $http! + + + var status = element(by.binding('status')); + var data = element(by.binding('data')); + var fetchBtn = element(by.id('fetchbtn')); + var sampleGetBtn = element(by.id('samplegetbtn')); + var invalidJsonpBtn = element(by.id('invalidjsonpbtn')); + + it('should make an xhr GET request', function() { + sampleGetBtn.click(); + fetchBtn.click(); + expect(status.getText()).toMatch('200'); + expect(data.getText()).toMatch(/Hello, \$http!/); + }); + +// Commented out due to flakes. See https://github.com/angular/angular.js/issues/9185 +// it('should make a JSONP request to angularjs.org', function() { +// var sampleJsonpBtn = element(by.id('samplejsonpbtn')); +// sampleJsonpBtn.click(); +// fetchBtn.click(); +// expect(status.getText()).toMatch('200'); +// expect(data.getText()).toMatch(/Super Hero!/); +// }); + + it('should make JSONP request to invalid URL and invoke the error handler', + function() { + invalidJsonpBtn.click(); + fetchBtn.click(); + expect(status.getText()).toMatch('0'); + expect(data.getText()).toMatch('Request failed'); + }); + +
+ */ + function $http(requestConfig) { + + if (!isObject(requestConfig)) { + throw minErr('$http')('badreq', 'Http request configuration must be an object. Received: {0}', requestConfig); + } + + if (!isString($sce.valueOf(requestConfig.url))) { + throw minErr('$http')('badreq', 'Http request configuration url must be a string or a $sce trusted object. Received: {0}', requestConfig.url); + } + + var config = extend({ + method: 'get', + transformRequest: defaults.transformRequest, + transformResponse: defaults.transformResponse, + paramSerializer: defaults.paramSerializer, + jsonpCallbackParam: defaults.jsonpCallbackParam + }, requestConfig); + + config.headers = mergeHeaders(requestConfig); + config.method = uppercase(config.method); + config.paramSerializer = isString(config.paramSerializer) ? + $injector.get(config.paramSerializer) : config.paramSerializer; + + $browser.$$incOutstandingRequestCount(); + + var requestInterceptors = []; + var responseInterceptors = []; + var promise = $q.resolve(config); + + // apply interceptors + forEach(reversedInterceptors, function(interceptor) { + if (interceptor.request || interceptor.requestError) { + requestInterceptors.unshift(interceptor.request, interceptor.requestError); + } + if (interceptor.response || interceptor.responseError) { + responseInterceptors.push(interceptor.response, interceptor.responseError); + } + }); + + promise = chainInterceptors(promise, requestInterceptors); + promise = promise.then(serverRequest); + promise = chainInterceptors(promise, responseInterceptors); + promise = promise.finally(completeOutstandingRequest); + + return promise; + + + function chainInterceptors(promise, interceptors) { + for (var i = 0, ii = interceptors.length; i < ii;) { + var thenFn = interceptors[i++]; + var rejectFn = interceptors[i++]; + + promise = promise.then(thenFn, rejectFn); + } + + interceptors.length = 0; + + return promise; + } + + function completeOutstandingRequest() { + $browser.$$completeOutstandingRequest(noop); + } + + function executeHeaderFns(headers, config) { + var headerContent, processedHeaders = {}; + + forEach(headers, function(headerFn, header) { + if (isFunction(headerFn)) { + headerContent = headerFn(config); + if (headerContent != null) { + processedHeaders[header] = headerContent; + } + } else { + processedHeaders[header] = headerFn; + } + }); + + return processedHeaders; + } + + function mergeHeaders(config) { + var defHeaders = defaults.headers, + reqHeaders = extend({}, config.headers), + defHeaderName, lowercaseDefHeaderName, reqHeaderName; + + defHeaders = extend({}, defHeaders.common, defHeaders[lowercase(config.method)]); + + // using for-in instead of forEach to avoid unnecessary iteration after header has been found + defaultHeadersIteration: + for (defHeaderName in defHeaders) { + lowercaseDefHeaderName = lowercase(defHeaderName); + + for (reqHeaderName in reqHeaders) { + if (lowercase(reqHeaderName) === lowercaseDefHeaderName) { + continue defaultHeadersIteration; + } + } + + reqHeaders[defHeaderName] = defHeaders[defHeaderName]; + } + + // execute if header value is a function for merged headers + return executeHeaderFns(reqHeaders, shallowCopy(config)); + } + + function serverRequest(config) { + var headers = config.headers; + var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest); + + // strip content-type if data is undefined + if (isUndefined(reqData)) { + forEach(headers, function(value, header) { + if (lowercase(header) === 'content-type') { + delete headers[header]; + } + }); + } + + if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) { + config.withCredentials = defaults.withCredentials; + } + + // send request + return sendReq(config, reqData).then(transformResponse, transformResponse); + } + + function transformResponse(response) { + // make a copy since the response must be cacheable + var resp = extend({}, response); + resp.data = transformData(response.data, response.headers, response.status, + config.transformResponse); + return (isSuccess(response.status)) + ? resp + : $q.reject(resp); + } + } + + $http.pendingRequests = []; + + /** + * @ngdoc method + * @name $http#get + * + * @description + * Shortcut method to perform `GET` request. + * + * @param {string|TrustedObject} url Absolute or relative URL of the resource that is being requested; + * or an object created by a call to `$sce.trustAsResourceUrl(url)`. + * @param {Object=} config Optional configuration object + * @returns {HttpPromise} Future object + */ + + /** + * @ngdoc method + * @name $http#delete + * + * @description + * Shortcut method to perform `DELETE` request. + * + * @param {string|TrustedObject} url Absolute or relative URL of the resource that is being requested; + * or an object created by a call to `$sce.trustAsResourceUrl(url)`. + * @param {Object=} config Optional configuration object + * @returns {HttpPromise} Future object + */ + + /** + * @ngdoc method + * @name $http#head + * + * @description + * Shortcut method to perform `HEAD` request. + * + * @param {string|TrustedObject} url Absolute or relative URL of the resource that is being requested; + * or an object created by a call to `$sce.trustAsResourceUrl(url)`. + * @param {Object=} config Optional configuration object + * @returns {HttpPromise} Future object + */ + + /** + * @ngdoc method + * @name $http#jsonp + * + * @description + * Shortcut method to perform `JSONP` request. + * + * Note that, since JSONP requests are sensitive because the response is given full access to the browser, + * the url must be declared, via {@link $sce} as a trusted resource URL. + * You can trust a URL by adding it to the whitelist via + * {@link $sceDelegateProvider#resourceUrlWhitelist `$sceDelegateProvider.resourceUrlWhitelist`} or + * by explicitly trusting the URL via {@link $sce#trustAsResourceUrl `$sce.trustAsResourceUrl(url)`}. + * + * JSONP requests must specify a callback to be used in the response from the server. This callback + * is passed as a query parameter in the request. You must specify the name of this parameter by + * setting the `jsonpCallbackParam` property on the request config object. + * + * ``` + * $http.jsonp('some/trusted/url', {jsonpCallbackParam: 'callback'}) + * ``` + * + * You can also specify a default callback parameter name in `$http.defaults.jsonpCallbackParam`. + * Initially this is set to `'callback'`. + * + *
+ * You can no longer use the `JSON_CALLBACK` string as a placeholder for specifying where the callback + * parameter value should go. + *
+ * + * If you would like to customise where and how the callbacks are stored then try overriding + * or decorating the {@link $jsonpCallbacks} service. + * + * @param {string|TrustedObject} url Absolute or relative URL of the resource that is being requested; + * or an object created by a call to `$sce.trustAsResourceUrl(url)`. + * @param {Object=} config Optional configuration object + * @returns {HttpPromise} Future object + */ + createShortMethods('get', 'delete', 'head', 'jsonp'); + + /** + * @ngdoc method + * @name $http#post + * + * @description + * Shortcut method to perform `POST` request. + * + * @param {string} url Relative or absolute URL specifying the destination of the request + * @param {*} data Request content + * @param {Object=} config Optional configuration object + * @returns {HttpPromise} Future object + */ + + /** + * @ngdoc method + * @name $http#put + * + * @description + * Shortcut method to perform `PUT` request. + * + * @param {string} url Relative or absolute URL specifying the destination of the request + * @param {*} data Request content + * @param {Object=} config Optional configuration object + * @returns {HttpPromise} Future object + */ + + /** + * @ngdoc method + * @name $http#patch + * + * @description + * Shortcut method to perform `PATCH` request. + * + * @param {string} url Relative or absolute URL specifying the destination of the request + * @param {*} data Request content + * @param {Object=} config Optional configuration object + * @returns {HttpPromise} Future object + */ + createShortMethodsWithData('post', 'put', 'patch'); + + /** + * @ngdoc property + * @name $http#defaults + * + * @description + * Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of + * default headers, withCredentials as well as request and response transformations. + * + * See "Setting HTTP Headers" and "Transforming Requests and Responses" sections above. + */ + $http.defaults = defaults; + + + return $http; + + + function createShortMethods(names) { + forEach(arguments, function(name) { + $http[name] = function(url, config) { + return $http(extend({}, config || {}, { + method: name, + url: url + })); + }; + }); + } + + + function createShortMethodsWithData(name) { + forEach(arguments, function(name) { + $http[name] = function(url, data, config) { + return $http(extend({}, config || {}, { + method: name, + url: url, + data: data + })); + }; + }); + } + + + /** + * Makes the request. + * + * !!! ACCESSES CLOSURE VARS: + * $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests + */ + function sendReq(config, reqData) { + var deferred = $q.defer(), + promise = deferred.promise, + cache, + cachedResp, + reqHeaders = config.headers, + isJsonp = lowercase(config.method) === 'jsonp', + url = config.url; + + if (isJsonp) { + // JSONP is a pretty sensitive operation where we're allowing a script to have full access to + // our DOM and JS space. So we require that the URL satisfies SCE.RESOURCE_URL. + url = $sce.getTrustedResourceUrl(url); + } else if (!isString(url)) { + // If it is not a string then the URL must be a $sce trusted object + url = $sce.valueOf(url); + } + + url = buildUrl(url, config.paramSerializer(config.params)); + + if (isJsonp) { + // Check the url and add the JSONP callback placeholder + url = sanitizeJsonpCallbackParam(url, config.jsonpCallbackParam); + } + + $http.pendingRequests.push(config); + promise.then(removePendingReq, removePendingReq); + + if ((config.cache || defaults.cache) && config.cache !== false && + (config.method === 'GET' || config.method === 'JSONP')) { + cache = isObject(config.cache) ? config.cache + : isObject(/** @type {?} */ (defaults).cache) + ? /** @type {?} */ (defaults).cache + : defaultCache; + } + + if (cache) { + cachedResp = cache.get(url); + if (isDefined(cachedResp)) { + if (isPromiseLike(cachedResp)) { + // cached request has already been sent, but there is no response yet + cachedResp.then(resolvePromiseWithResult, resolvePromiseWithResult); + } else { + // serving from cache + if (isArray(cachedResp)) { + resolvePromise(cachedResp[1], cachedResp[0], shallowCopy(cachedResp[2]), cachedResp[3], cachedResp[4]); + } else { + resolvePromise(cachedResp, 200, {}, 'OK', 'complete'); + } + } + } else { + // put the promise for the non-transformed response into cache as a placeholder + cache.put(url, promise); + } + } + + + // if we won't have the response in cache, set the xsrf headers and + // send the request to the backend + if (isUndefined(cachedResp)) { + var xsrfValue = urlIsSameOrigin(config.url) + ? $$cookieReader()[config.xsrfCookieName || defaults.xsrfCookieName] + : undefined; + if (xsrfValue) { + reqHeaders[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue; + } + + $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout, + config.withCredentials, config.responseType, + createApplyHandlers(config.eventHandlers), + createApplyHandlers(config.uploadEventHandlers)); + } + + return promise; + + function createApplyHandlers(eventHandlers) { + if (eventHandlers) { + var applyHandlers = {}; + forEach(eventHandlers, function(eventHandler, key) { + applyHandlers[key] = function(event) { + if (useApplyAsync) { + $rootScope.$applyAsync(callEventHandler); + } else if ($rootScope.$$phase) { + callEventHandler(); + } else { + $rootScope.$apply(callEventHandler); + } + + function callEventHandler() { + eventHandler(event); + } + }; + }); + return applyHandlers; + } + } + + + /** + * Callback registered to $httpBackend(): + * - caches the response if desired + * - resolves the raw $http promise + * - calls $apply + */ + function done(status, response, headersString, statusText, xhrStatus) { + if (cache) { + if (isSuccess(status)) { + cache.put(url, [status, response, parseHeaders(headersString), statusText, xhrStatus]); + } else { + // remove promise from the cache + cache.remove(url); + } + } + + function resolveHttpPromise() { + resolvePromise(response, status, headersString, statusText, xhrStatus); + } + + if (useApplyAsync) { + $rootScope.$applyAsync(resolveHttpPromise); + } else { + resolveHttpPromise(); + if (!$rootScope.$$phase) $rootScope.$apply(); + } + } + + + /** + * Resolves the raw $http promise. + */ + function resolvePromise(response, status, headers, statusText, xhrStatus) { + //status: HTTP response status code, 0, -1 (aborted by timeout / promise) + status = status >= -1 ? status : 0; + + (isSuccess(status) ? deferred.resolve : deferred.reject)({ + data: response, + status: status, + headers: headersGetter(headers), + config: config, + statusText: statusText, + xhrStatus: xhrStatus + }); + } + + function resolvePromiseWithResult(result) { + resolvePromise(result.data, result.status, shallowCopy(result.headers()), result.statusText, result.xhrStatus); + } + + function removePendingReq() { + var idx = $http.pendingRequests.indexOf(config); + if (idx !== -1) $http.pendingRequests.splice(idx, 1); + } + } + + + function buildUrl(url, serializedParams) { + if (serializedParams.length > 0) { + url += ((url.indexOf('?') === -1) ? '?' : '&') + serializedParams; + } + return url; + } + + function sanitizeJsonpCallbackParam(url, key) { + if (/[&?][^=]+=JSON_CALLBACK/.test(url)) { + // Throw if the url already contains a reference to JSON_CALLBACK + throw $httpMinErr('badjsonp', 'Illegal use of JSON_CALLBACK in url, "{0}"', url); + } + + var callbackParamRegex = new RegExp('[&?]' + key + '='); + if (callbackParamRegex.test(url)) { + // Throw if the callback param was already provided + throw $httpMinErr('badjsonp', 'Illegal use of callback param, "{0}", in url, "{1}"', key, url); + } + + // Add in the JSON_CALLBACK callback param value + url += ((url.indexOf('?') === -1) ? '?' : '&') + key + '=JSON_CALLBACK'; + + return url; + } + }]; +} + +/** + * @ngdoc service + * @name $xhrFactory + * @this + * + * @description + * Factory function used to create XMLHttpRequest objects. + * + * Replace or decorate this service to create your own custom XMLHttpRequest objects. + * + * ``` + * angular.module('myApp', []) + * .factory('$xhrFactory', function() { + * return function createXhr(method, url) { + * return new window.XMLHttpRequest({mozSystem: true}); + * }; + * }); + * ``` + * + * @param {string} method HTTP method of the request (GET, POST, PUT, ..) + * @param {string} url URL of the request. + */ +function $xhrFactoryProvider() { + this.$get = function() { + return function createXhr() { + return new window.XMLHttpRequest(); + }; + }; +} + +/** + * @ngdoc service + * @name $httpBackend + * @requires $jsonpCallbacks + * @requires $document + * @requires $xhrFactory + * @this + * + * @description + * HTTP backend used by the {@link ng.$http service} that delegates to + * XMLHttpRequest object or JSONP and deals with browser incompatibilities. + * + * You should never need to use this service directly, instead use the higher-level abstractions: + * {@link ng.$http $http} or {@link ngResource.$resource $resource}. + * + * During testing this implementation is swapped with {@link ngMock.$httpBackend mock + * $httpBackend} which can be trained with responses. + */ +function $HttpBackendProvider() { + this.$get = ['$browser', '$jsonpCallbacks', '$document', '$xhrFactory', function($browser, $jsonpCallbacks, $document, $xhrFactory) { + return createHttpBackend($browser, $xhrFactory, $browser.defer, $jsonpCallbacks, $document[0]); + }]; +} + +function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDocument) { + // TODO(vojta): fix the signature + return function(method, url, post, callback, headers, timeout, withCredentials, responseType, eventHandlers, uploadEventHandlers) { + url = url || $browser.url(); + + if (lowercase(method) === 'jsonp') { + var callbackPath = callbacks.createCallback(url); + var jsonpDone = jsonpReq(url, callbackPath, function(status, text) { + // jsonpReq only ever sets status to 200 (OK), 404 (ERROR) or -1 (WAITING) + var response = (status === 200) && callbacks.getResponse(callbackPath); + completeRequest(callback, status, response, '', text, 'complete'); + callbacks.removeCallback(callbackPath); + }); + } else { + + var xhr = createXhr(method, url); + + xhr.open(method, url, true); + forEach(headers, function(value, key) { + if (isDefined(value)) { + xhr.setRequestHeader(key, value); + } + }); + + xhr.onload = function requestLoaded() { + var statusText = xhr.statusText || ''; + + // responseText is the old-school way of retrieving response (supported by IE9) + // response/responseType properties were introduced in XHR Level2 spec (supported by IE10) + var response = ('response' in xhr) ? xhr.response : xhr.responseText; + + // normalize IE9 bug (http://bugs.jquery.com/ticket/1450) + var status = xhr.status === 1223 ? 204 : xhr.status; + + // fix status code when it is 0 (0 status is undocumented). + // Occurs when accessing file resources or on Android 4.1 stock browser + // while retrieving files from application cache. + if (status === 0) { + status = response ? 200 : urlResolve(url).protocol === 'file' ? 404 : 0; + } + + completeRequest(callback, + status, + response, + xhr.getAllResponseHeaders(), + statusText, + 'complete'); + }; + + var requestError = function() { + // The response is always empty + // See https://xhr.spec.whatwg.org/#request-error-steps and https://fetch.spec.whatwg.org/#concept-network-error + completeRequest(callback, -1, null, null, '', 'error'); + }; + + var requestAborted = function() { + completeRequest(callback, -1, null, null, '', 'abort'); + }; + + var requestTimeout = function() { + // The response is always empty + // See https://xhr.spec.whatwg.org/#request-error-steps and https://fetch.spec.whatwg.org/#concept-network-error + completeRequest(callback, -1, null, null, '', 'timeout'); + }; + + xhr.onerror = requestError; + xhr.onabort = requestAborted; + xhr.ontimeout = requestTimeout; + + forEach(eventHandlers, function(value, key) { + xhr.addEventListener(key, value); + }); + + forEach(uploadEventHandlers, function(value, key) { + xhr.upload.addEventListener(key, value); + }); + + if (withCredentials) { + xhr.withCredentials = true; + } + + if (responseType) { + try { + xhr.responseType = responseType; + } catch (e) { + // WebKit added support for the json responseType value on 09/03/2013 + // https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are + // known to throw when setting the value "json" as the response type. Other older + // browsers implementing the responseType + // + // The json response type can be ignored if not supported, because JSON payloads are + // parsed on the client-side regardless. + if (responseType !== 'json') { + throw e; + } + } + } + + xhr.send(isUndefined(post) ? null : post); + } + + if (timeout > 0) { + var timeoutId = $browserDefer(timeoutRequest, timeout); + } else if (isPromiseLike(timeout)) { + timeout.then(timeoutRequest); + } + + + function timeoutRequest() { + if (jsonpDone) { + jsonpDone(); + } + if (xhr) { + xhr.abort(); + } + } + + function completeRequest(callback, status, response, headersString, statusText, xhrStatus) { + // cancel timeout and subsequent timeout promise resolution + if (isDefined(timeoutId)) { + $browserDefer.cancel(timeoutId); + } + jsonpDone = xhr = null; + + callback(status, response, headersString, statusText, xhrStatus); + } + }; + + function jsonpReq(url, callbackPath, done) { + url = url.replace('JSON_CALLBACK', callbackPath); + // we can't use jQuery/jqLite here because jQuery does crazy stuff with script elements, e.g.: + // - fetches local scripts via XHR and evals them + // - adds and immediately removes script elements from the document + var script = rawDocument.createElement('script'), callback = null; + script.type = 'text/javascript'; + script.src = url; + script.async = true; + + callback = function(event) { + script.removeEventListener('load', callback); + script.removeEventListener('error', callback); + rawDocument.body.removeChild(script); + script = null; + var status = -1; + var text = 'unknown'; + + if (event) { + if (event.type === 'load' && !callbacks.wasCalled(callbackPath)) { + event = { type: 'error' }; + } + text = event.type; + status = event.type === 'error' ? 404 : 200; + } + + if (done) { + done(status, text); + } + }; + + script.addEventListener('load', callback); + script.addEventListener('error', callback); + rawDocument.body.appendChild(script); + return callback; + } +} + +var $interpolateMinErr = angular.$interpolateMinErr = minErr('$interpolate'); +$interpolateMinErr.throwNoconcat = function(text) { + throw $interpolateMinErr('noconcat', + 'Error while interpolating: {0}\nStrict Contextual Escaping disallows ' + + 'interpolations that concatenate multiple expressions when a trusted value is ' + + 'required. See http://docs.angularjs.org/api/ng.$sce', text); +}; + +$interpolateMinErr.interr = function(text, err) { + return $interpolateMinErr('interr', 'Can\'t interpolate: {0}\n{1}', text, err.toString()); +}; + +/** + * @ngdoc provider + * @name $interpolateProvider + * @this + * + * @description + * + * Used for configuring the interpolation markup. Defaults to `{{` and `}}`. + * + *
+ * This feature is sometimes used to mix different markup languages, e.g. to wrap an Angular + * template within a Python Jinja template (or any other template language). Mixing templating + * languages is **very dangerous**. The embedding template language will not safely escape Angular + * expressions, so any user-controlled values in the template will cause Cross Site Scripting (XSS) + * security bugs! + *
+ * + * @example + + + +
+ //demo.label// +
+
+ + it('should interpolate binding with custom symbols', function() { + expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.'); + }); + +
+ */ +function $InterpolateProvider() { + var startSymbol = '{{'; + var endSymbol = '}}'; + + /** + * @ngdoc method + * @name $interpolateProvider#startSymbol + * @description + * Symbol to denote start of expression in the interpolated string. Defaults to `{{`. + * + * @param {string=} value new value to set the starting symbol to. + * @returns {string|self} Returns the symbol when used as getter and self if used as setter. + */ + this.startSymbol = function(value) { + if (value) { + startSymbol = value; + return this; + } else { + return startSymbol; + } + }; + + /** + * @ngdoc method + * @name $interpolateProvider#endSymbol + * @description + * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`. + * + * @param {string=} value new value to set the ending symbol to. + * @returns {string|self} Returns the symbol when used as getter and self if used as setter. + */ + this.endSymbol = function(value) { + if (value) { + endSymbol = value; + return this; + } else { + return endSymbol; + } + }; + + + this.$get = ['$parse', '$exceptionHandler', '$sce', function($parse, $exceptionHandler, $sce) { + var startSymbolLength = startSymbol.length, + endSymbolLength = endSymbol.length, + escapedStartRegexp = new RegExp(startSymbol.replace(/./g, escape), 'g'), + escapedEndRegexp = new RegExp(endSymbol.replace(/./g, escape), 'g'); + + function escape(ch) { + return '\\\\\\' + ch; + } + + function unescapeText(text) { + return text.replace(escapedStartRegexp, startSymbol). + replace(escapedEndRegexp, endSymbol); + } + + // TODO: this is the same as the constantWatchDelegate in parse.js + function constantWatchDelegate(scope, listener, objectEquality, constantInterp) { + var unwatch = scope.$watch(function constantInterpolateWatch(scope) { + unwatch(); + return constantInterp(scope); + }, listener, objectEquality); + return unwatch; + } + + /** + * @ngdoc service + * @name $interpolate + * @kind function + * + * @requires $parse + * @requires $sce + * + * @description + * + * Compiles a string with markup into an interpolation function. This service is used by the + * HTML {@link ng.$compile $compile} service for data binding. See + * {@link ng.$interpolateProvider $interpolateProvider} for configuring the + * interpolation markup. + * + * + * ```js + * var $interpolate = ...; // injected + * var exp = $interpolate('Hello {{name | uppercase}}!'); + * expect(exp({name:'Angular'})).toEqual('Hello ANGULAR!'); + * ``` + * + * `$interpolate` takes an optional fourth argument, `allOrNothing`. If `allOrNothing` is + * `true`, the interpolation function will return `undefined` unless all embedded expressions + * evaluate to a value other than `undefined`. + * + * ```js + * var $interpolate = ...; // injected + * var context = {greeting: 'Hello', name: undefined }; + * + * // default "forgiving" mode + * var exp = $interpolate('{{greeting}} {{name}}!'); + * expect(exp(context)).toEqual('Hello !'); + * + * // "allOrNothing" mode + * exp = $interpolate('{{greeting}} {{name}}!', false, null, true); + * expect(exp(context)).toBeUndefined(); + * context.name = 'Angular'; + * expect(exp(context)).toEqual('Hello Angular!'); + * ``` + * + * `allOrNothing` is useful for interpolating URLs. `ngSrc` and `ngSrcset` use this behavior. + * + * #### Escaped Interpolation + * $interpolate provides a mechanism for escaping interpolation markers. Start and end markers + * can be escaped by preceding each of their characters with a REVERSE SOLIDUS U+005C (backslash). + * It will be rendered as a regular start/end marker, and will not be interpreted as an expression + * or binding. + * + * This enables web-servers to prevent script injection attacks and defacing attacks, to some + * degree, while also enabling code examples to work without relying on the + * {@link ng.directive:ngNonBindable ngNonBindable} directive. + * + * **For security purposes, it is strongly encouraged that web servers escape user-supplied data, + * replacing angle brackets (<, >) with &lt; and &gt; respectively, and replacing all + * interpolation start/end markers with their escaped counterparts.** + * + * Escaped interpolation markers are only replaced with the actual interpolation markers in rendered + * output when the $interpolate service processes the text. So, for HTML elements interpolated + * by {@link ng.$compile $compile}, or otherwise interpolated with the `mustHaveExpression` parameter + * set to `true`, the interpolated text must contain an unescaped interpolation expression. As such, + * this is typically useful only when user-data is used in rendering a template from the server, or + * when otherwise untrusted data is used by a directive. + * + * + * + *
+ *

{{apptitle}}: \{\{ username = "defaced value"; \}\} + *

+ *

{{username}} attempts to inject code which will deface the + * application, but fails to accomplish their task, because the server has correctly + * escaped the interpolation start/end markers with REVERSE SOLIDUS U+005C (backslash) + * characters.

+ *

Instead, the result of the attempted script injection is visible, and can be removed + * from the database by an administrator.

+ *
+ *
+ *
+ * + * @knownIssue + * It is currently not possible for an interpolated expression to contain the interpolation end + * symbol. For example, `{{ '}}' }}` will be incorrectly interpreted as `{{ ' }}` + `' }}`, i.e. + * an interpolated expression consisting of a single-quote (`'`) and the `' }}` string. + * + * @knownIssue + * All directives and components must use the standard `{{` `}}` interpolation symbols + * in their templates. If you change the application interpolation symbols the {@link $compile} + * service will attempt to denormalize the standard symbols to the custom symbols. + * The denormalization process is not clever enough to know not to replace instances of the standard + * symbols where they would not normally be treated as interpolation symbols. For example in the following + * code snippet the closing braces of the literal object will get incorrectly denormalized: + * + * ``` + *
+ * ``` + * + * See https://github.com/angular/angular.js/pull/14610#issuecomment-219401099 for more information. + * + * @param {string} text The text with markup to interpolate. + * @param {boolean=} mustHaveExpression if set to true then the interpolation string must have + * embedded expression in order to return an interpolation function. Strings with no + * embedded expression will return null for the interpolation function. + * @param {string=} trustedContext when provided, the returned function passes the interpolated + * result through {@link ng.$sce#getTrusted $sce.getTrusted(interpolatedResult, + * trustedContext)} before returning it. Refer to the {@link ng.$sce $sce} service that + * provides Strict Contextual Escaping for details. + * @param {boolean=} allOrNothing if `true`, then the returned function returns undefined + * unless all embedded expressions evaluate to a value other than `undefined`. + * @returns {function(context)} an interpolation function which is used to compute the + * interpolated string. The function has these parameters: + * + * - `context`: evaluation context for all expressions embedded in the interpolated text + */ + function $interpolate(text, mustHaveExpression, trustedContext, allOrNothing) { + // Provide a quick exit and simplified result function for text with no interpolation + if (!text.length || text.indexOf(startSymbol) === -1) { + var constantInterp; + if (!mustHaveExpression) { + var unescapedText = unescapeText(text); + constantInterp = valueFn(unescapedText); + constantInterp.exp = text; + constantInterp.expressions = []; + constantInterp.$$watchDelegate = constantWatchDelegate; + } + return constantInterp; + } + + allOrNothing = !!allOrNothing; + var startIndex, + endIndex, + index = 0, + expressions = [], + parseFns = [], + textLength = text.length, + exp, + concat = [], + expressionPositions = []; + + while (index < textLength) { + if (((startIndex = text.indexOf(startSymbol, index)) !== -1) && + ((endIndex = text.indexOf(endSymbol, startIndex + startSymbolLength)) !== -1)) { + if (index !== startIndex) { + concat.push(unescapeText(text.substring(index, startIndex))); + } + exp = text.substring(startIndex + startSymbolLength, endIndex); + expressions.push(exp); + parseFns.push($parse(exp, parseStringifyInterceptor)); + index = endIndex + endSymbolLength; + expressionPositions.push(concat.length); + concat.push(''); + } else { + // we did not find an interpolation, so we have to add the remainder to the separators array + if (index !== textLength) { + concat.push(unescapeText(text.substring(index))); + } + break; + } + } + + // Concatenating expressions makes it hard to reason about whether some combination of + // concatenated values are unsafe to use and could easily lead to XSS. By requiring that a + // single expression be used for iframe[src], object[src], etc., we ensure that the value + // that's used is assigned or constructed by some JS code somewhere that is more testable or + // make it obvious that you bound the value to some user controlled value. This helps reduce + // the load when auditing for XSS issues. + if (trustedContext && concat.length > 1) { + $interpolateMinErr.throwNoconcat(text); + } + + if (!mustHaveExpression || expressions.length) { + var compute = function(values) { + for (var i = 0, ii = expressions.length; i < ii; i++) { + if (allOrNothing && isUndefined(values[i])) return; + concat[expressionPositions[i]] = values[i]; + } + return concat.join(''); + }; + + var getValue = function(value) { + return trustedContext ? + $sce.getTrusted(trustedContext, value) : + $sce.valueOf(value); + }; + + return extend(function interpolationFn(context) { + var i = 0; + var ii = expressions.length; + var values = new Array(ii); + + try { + for (; i < ii; i++) { + values[i] = parseFns[i](context); + } + + return compute(values); + } catch (err) { + $exceptionHandler($interpolateMinErr.interr(text, err)); + } + + }, { + // all of these properties are undocumented for now + exp: text, //just for compatibility with regular watchers created via $watch + expressions: expressions, + $$watchDelegate: function(scope, listener) { + var lastValue; + return scope.$watchGroup(parseFns, /** @this */ function interpolateFnWatcher(values, oldValues) { + var currValue = compute(values); + if (isFunction(listener)) { + listener.call(this, currValue, values !== oldValues ? lastValue : currValue, scope); + } + lastValue = currValue; + }); + } + }); + } + + function parseStringifyInterceptor(value) { + try { + value = getValue(value); + return allOrNothing && !isDefined(value) ? value : stringify(value); + } catch (err) { + $exceptionHandler($interpolateMinErr.interr(text, err)); + } + } + } + + + /** + * @ngdoc method + * @name $interpolate#startSymbol + * @description + * Symbol to denote the start of expression in the interpolated string. Defaults to `{{`. + * + * Use {@link ng.$interpolateProvider#startSymbol `$interpolateProvider.startSymbol`} to change + * the symbol. + * + * @returns {string} start symbol. + */ + $interpolate.startSymbol = function() { + return startSymbol; + }; + + + /** + * @ngdoc method + * @name $interpolate#endSymbol + * @description + * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`. + * + * Use {@link ng.$interpolateProvider#endSymbol `$interpolateProvider.endSymbol`} to change + * the symbol. + * + * @returns {string} end symbol. + */ + $interpolate.endSymbol = function() { + return endSymbol; + }; + + return $interpolate; + }]; +} + +/** @this */ +function $IntervalProvider() { + this.$get = ['$rootScope', '$window', '$q', '$$q', '$browser', + function($rootScope, $window, $q, $$q, $browser) { + var intervals = {}; + + + /** + * @ngdoc service + * @name $interval + * + * @description + * Angular's wrapper for `window.setInterval`. The `fn` function is executed every `delay` + * milliseconds. + * + * The return value of registering an interval function is a promise. This promise will be + * notified upon each tick of the interval, and will be resolved after `count` iterations, or + * run indefinitely if `count` is not defined. The value of the notification will be the + * number of iterations that have run. + * To cancel an interval, call `$interval.cancel(promise)`. + * + * In tests you can use {@link ngMock.$interval#flush `$interval.flush(millis)`} to + * move forward by `millis` milliseconds and trigger any functions scheduled to run in that + * time. + * + *
+ * **Note**: Intervals created by this service must be explicitly destroyed when you are finished + * with them. In particular they are not automatically destroyed when a controller's scope or a + * directive's element are destroyed. + * You should take this into consideration and make sure to always cancel the interval at the + * appropriate moment. See the example below for more details on how and when to do this. + *
+ * + * @param {function()} fn A function that should be called repeatedly. If no additional arguments + * are passed (see below), the function is called with the current iteration count. + * @param {number} delay Number of milliseconds between each function call. + * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat + * indefinitely. + * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise + * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block. + * @param {...*=} Pass additional parameters to the executed function. + * @returns {promise} A promise which will be notified on each iteration. It will resolve once all iterations of the interval complete. + * + * @example + * + * + * + * + *
+ *
+ *
+ * Current time is: + *
+ * Blood 1 : {{blood_1}} + * Blood 2 : {{blood_2}} + * + * + * + *
+ *
+ * + *
+ *
+ */ + function interval(fn, delay, count, invokeApply) { + var hasParams = arguments.length > 4, + args = hasParams ? sliceArgs(arguments, 4) : [], + setInterval = $window.setInterval, + clearInterval = $window.clearInterval, + iteration = 0, + skipApply = (isDefined(invokeApply) && !invokeApply), + deferred = (skipApply ? $$q : $q).defer(), + promise = deferred.promise; + + count = isDefined(count) ? count : 0; + + promise.$$intervalId = setInterval(function tick() { + if (skipApply) { + $browser.defer(callback); + } else { + $rootScope.$evalAsync(callback); + } + deferred.notify(iteration++); + + if (count > 0 && iteration >= count) { + deferred.resolve(iteration); + clearInterval(promise.$$intervalId); + delete intervals[promise.$$intervalId]; + } + + if (!skipApply) $rootScope.$apply(); + + }, delay); + + intervals[promise.$$intervalId] = deferred; + + return promise; + + function callback() { + if (!hasParams) { + fn(iteration); + } else { + fn.apply(null, args); + } + } + } + + + /** + * @ngdoc method + * @name $interval#cancel + * + * @description + * Cancels a task associated with the `promise`. + * + * @param {Promise=} promise returned by the `$interval` function. + * @returns {boolean} Returns `true` if the task was successfully canceled. + */ + interval.cancel = function(promise) { + if (promise && promise.$$intervalId in intervals) { + // Interval cancels should not report as unhandled promise. + markQExceptionHandled(intervals[promise.$$intervalId].promise); + intervals[promise.$$intervalId].reject('canceled'); + $window.clearInterval(promise.$$intervalId); + delete intervals[promise.$$intervalId]; + return true; + } + return false; + }; + + return interval; + }]; +} + +/** + * @ngdoc service + * @name $jsonpCallbacks + * @requires $window + * @description + * This service handles the lifecycle of callbacks to handle JSONP requests. + * Override this service if you wish to customise where the callbacks are stored and + * how they vary compared to the requested url. + */ +var $jsonpCallbacksProvider = /** @this */ function() { + this.$get = function() { + var callbacks = angular.callbacks; + var callbackMap = {}; + + function createCallback(callbackId) { + var callback = function(data) { + callback.data = data; + callback.called = true; + }; + callback.id = callbackId; + return callback; + } + + return { + /** + * @ngdoc method + * @name $jsonpCallbacks#createCallback + * @param {string} url the url of the JSONP request + * @returns {string} the callback path to send to the server as part of the JSONP request + * @description + * {@link $httpBackend} calls this method to create a callback and get hold of the path to the callback + * to pass to the server, which will be used to call the callback with its payload in the JSONP response. + */ + createCallback: function(url) { + var callbackId = '_' + (callbacks.$$counter++).toString(36); + var callbackPath = 'angular.callbacks.' + callbackId; + var callback = createCallback(callbackId); + callbackMap[callbackPath] = callbacks[callbackId] = callback; + return callbackPath; + }, + /** + * @ngdoc method + * @name $jsonpCallbacks#wasCalled + * @param {string} callbackPath the path to the callback that was sent in the JSONP request + * @returns {boolean} whether the callback has been called, as a result of the JSONP response + * @description + * {@link $httpBackend} calls this method to find out whether the JSONP response actually called the + * callback that was passed in the request. + */ + wasCalled: function(callbackPath) { + return callbackMap[callbackPath].called; + }, + /** + * @ngdoc method + * @name $jsonpCallbacks#getResponse + * @param {string} callbackPath the path to the callback that was sent in the JSONP request + * @returns {*} the data received from the response via the registered callback + * @description + * {@link $httpBackend} calls this method to get hold of the data that was provided to the callback + * in the JSONP response. + */ + getResponse: function(callbackPath) { + return callbackMap[callbackPath].data; + }, + /** + * @ngdoc method + * @name $jsonpCallbacks#removeCallback + * @param {string} callbackPath the path to the callback that was sent in the JSONP request + * @description + * {@link $httpBackend} calls this method to remove the callback after the JSONP request has + * completed or timed-out. + */ + removeCallback: function(callbackPath) { + var callback = callbackMap[callbackPath]; + delete callbacks[callback.id]; + delete callbackMap[callbackPath]; + } + }; + }; +}; + +/** + * @ngdoc service + * @name $locale + * + * @description + * $locale service provides localization rules for various Angular components. As of right now the + * only public api is: + * + * * `id` – `{string}` – locale id formatted as `languageId-countryId` (e.g. `en-us`) + */ + +var PATH_MATCH = /^([^?#]*)(\?([^#]*))?(#(.*))?$/, + DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21}; +var $locationMinErr = minErr('$location'); + + +/** + * Encode path using encodeUriSegment, ignoring forward slashes + * + * @param {string} path Path to encode + * @returns {string} + */ +function encodePath(path) { + var segments = path.split('/'), + i = segments.length; + + while (i--) { + segments[i] = encodeUriSegment(segments[i]); + } + + return segments.join('/'); +} + +function parseAbsoluteUrl(absoluteUrl, locationObj) { + var parsedUrl = urlResolve(absoluteUrl); + + locationObj.$$protocol = parsedUrl.protocol; + locationObj.$$host = parsedUrl.hostname; + locationObj.$$port = toInt(parsedUrl.port) || DEFAULT_PORTS[parsedUrl.protocol] || null; +} + +var DOUBLE_SLASH_REGEX = /^\s*[\\/]{2,}/; +function parseAppUrl(url, locationObj) { + + if (DOUBLE_SLASH_REGEX.test(url)) { + throw $locationMinErr('badpath', 'Invalid url "{0}".', url); + } + + var prefixed = (url.charAt(0) !== '/'); + if (prefixed) { + url = '/' + url; + } + var match = urlResolve(url); + locationObj.$$path = decodeURIComponent(prefixed && match.pathname.charAt(0) === '/' ? + match.pathname.substring(1) : match.pathname); + locationObj.$$search = parseKeyValue(match.search); + locationObj.$$hash = decodeURIComponent(match.hash); + + // make sure path starts with '/'; + if (locationObj.$$path && locationObj.$$path.charAt(0) !== '/') { + locationObj.$$path = '/' + locationObj.$$path; + } +} + +function startsWith(str, search) { + return str.slice(0, search.length) === search; +} + +/** + * + * @param {string} base + * @param {string} url + * @returns {string} returns text from `url` after `base` or `undefined` if it does not begin with + * the expected string. + */ +function stripBaseUrl(base, url) { + if (startsWith(url, base)) { + return url.substr(base.length); + } +} + + +function stripHash(url) { + var index = url.indexOf('#'); + return index === -1 ? url : url.substr(0, index); +} + +function trimEmptyHash(url) { + return url.replace(/(#.+)|#$/, '$1'); +} + + +function stripFile(url) { + return url.substr(0, stripHash(url).lastIndexOf('/') + 1); +} + +/* return the server only (scheme://host:port) */ +function serverBase(url) { + return url.substring(0, url.indexOf('/', url.indexOf('//') + 2)); +} + + +/** + * LocationHtml5Url represents a URL + * This object is exposed as $location service when HTML5 mode is enabled and supported + * + * @constructor + * @param {string} appBase application base URL + * @param {string} appBaseNoFile application base URL stripped of any filename + * @param {string} basePrefix URL path prefix + */ +function LocationHtml5Url(appBase, appBaseNoFile, basePrefix) { + this.$$html5 = true; + basePrefix = basePrefix || ''; + parseAbsoluteUrl(appBase, this); + + + /** + * Parse given HTML5 (regular) URL string into properties + * @param {string} url HTML5 URL + * @private + */ + this.$$parse = function(url) { + var pathUrl = stripBaseUrl(appBaseNoFile, url); + if (!isString(pathUrl)) { + throw $locationMinErr('ipthprfx', 'Invalid url "{0}", missing path prefix "{1}".', url, + appBaseNoFile); + } + + parseAppUrl(pathUrl, this); + + if (!this.$$path) { + this.$$path = '/'; + } + + this.$$compose(); + }; + + /** + * Compose url and update `absUrl` property + * @private + */ + this.$$compose = function() { + var search = toKeyValue(this.$$search), + hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : ''; + + this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash; + this.$$absUrl = appBaseNoFile + this.$$url.substr(1); // first char is always '/' + + this.$$urlUpdatedByLocation = true; + }; + + this.$$parseLinkUrl = function(url, relHref) { + if (relHref && relHref[0] === '#') { + // special case for links to hash fragments: + // keep the old url and only replace the hash fragment + this.hash(relHref.slice(1)); + return true; + } + var appUrl, prevAppUrl; + var rewrittenUrl; + + + if (isDefined(appUrl = stripBaseUrl(appBase, url))) { + prevAppUrl = appUrl; + if (basePrefix && isDefined(appUrl = stripBaseUrl(basePrefix, appUrl))) { + rewrittenUrl = appBaseNoFile + (stripBaseUrl('/', appUrl) || appUrl); + } else { + rewrittenUrl = appBase + prevAppUrl; + } + } else if (isDefined(appUrl = stripBaseUrl(appBaseNoFile, url))) { + rewrittenUrl = appBaseNoFile + appUrl; + } else if (appBaseNoFile === url + '/') { + rewrittenUrl = appBaseNoFile; + } + if (rewrittenUrl) { + this.$$parse(rewrittenUrl); + } + return !!rewrittenUrl; + }; +} + + +/** + * LocationHashbangUrl represents URL + * This object is exposed as $location service when developer doesn't opt into html5 mode. + * It also serves as the base class for html5 mode fallback on legacy browsers. + * + * @constructor + * @param {string} appBase application base URL + * @param {string} appBaseNoFile application base URL stripped of any filename + * @param {string} hashPrefix hashbang prefix + */ +function LocationHashbangUrl(appBase, appBaseNoFile, hashPrefix) { + + parseAbsoluteUrl(appBase, this); + + + /** + * Parse given hashbang URL into properties + * @param {string} url Hashbang URL + * @private + */ + this.$$parse = function(url) { + var withoutBaseUrl = stripBaseUrl(appBase, url) || stripBaseUrl(appBaseNoFile, url); + var withoutHashUrl; + + if (!isUndefined(withoutBaseUrl) && withoutBaseUrl.charAt(0) === '#') { + + // The rest of the URL starts with a hash so we have + // got either a hashbang path or a plain hash fragment + withoutHashUrl = stripBaseUrl(hashPrefix, withoutBaseUrl); + if (isUndefined(withoutHashUrl)) { + // There was no hashbang prefix so we just have a hash fragment + withoutHashUrl = withoutBaseUrl; + } + + } else { + // There was no hashbang path nor hash fragment: + // If we are in HTML5 mode we use what is left as the path; + // Otherwise we ignore what is left + if (this.$$html5) { + withoutHashUrl = withoutBaseUrl; + } else { + withoutHashUrl = ''; + if (isUndefined(withoutBaseUrl)) { + appBase = url; + /** @type {?} */ (this).replace(); + } + } + } + + parseAppUrl(withoutHashUrl, this); + + this.$$path = removeWindowsDriveName(this.$$path, withoutHashUrl, appBase); + + this.$$compose(); + + /* + * In Windows, on an anchor node on documents loaded from + * the filesystem, the browser will return a pathname + * prefixed with the drive name ('/C:/path') when a + * pathname without a drive is set: + * * a.setAttribute('href', '/foo') + * * a.pathname === '/C:/foo' //true + * + * Inside of Angular, we're always using pathnames that + * do not include drive names for routing. + */ + function removeWindowsDriveName(path, url, base) { + /* + Matches paths for file protocol on windows, + such as /C:/foo/bar, and captures only /foo/bar. + */ + var windowsFilePathExp = /^\/[A-Z]:(\/.*)/; + + var firstPathSegmentMatch; + + //Get the relative path from the input URL. + if (startsWith(url, base)) { + url = url.replace(base, ''); + } + + // The input URL intentionally contains a first path segment that ends with a colon. + if (windowsFilePathExp.exec(url)) { + return path; + } + + firstPathSegmentMatch = windowsFilePathExp.exec(path); + return firstPathSegmentMatch ? firstPathSegmentMatch[1] : path; + } + }; + + /** + * Compose hashbang URL and update `absUrl` property + * @private + */ + this.$$compose = function() { + var search = toKeyValue(this.$$search), + hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : ''; + + this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash; + this.$$absUrl = appBase + (this.$$url ? hashPrefix + this.$$url : ''); + + this.$$urlUpdatedByLocation = true; + }; + + this.$$parseLinkUrl = function(url, relHref) { + if (stripHash(appBase) === stripHash(url)) { + this.$$parse(url); + return true; + } + return false; + }; +} + + +/** + * LocationHashbangUrl represents URL + * This object is exposed as $location service when html5 history api is enabled but the browser + * does not support it. + * + * @constructor + * @param {string} appBase application base URL + * @param {string} appBaseNoFile application base URL stripped of any filename + * @param {string} hashPrefix hashbang prefix + */ +function LocationHashbangInHtml5Url(appBase, appBaseNoFile, hashPrefix) { + this.$$html5 = true; + LocationHashbangUrl.apply(this, arguments); + + this.$$parseLinkUrl = function(url, relHref) { + if (relHref && relHref[0] === '#') { + // special case for links to hash fragments: + // keep the old url and only replace the hash fragment + this.hash(relHref.slice(1)); + return true; + } + + var rewrittenUrl; + var appUrl; + + if (appBase === stripHash(url)) { + rewrittenUrl = url; + } else if ((appUrl = stripBaseUrl(appBaseNoFile, url))) { + rewrittenUrl = appBase + hashPrefix + appUrl; + } else if (appBaseNoFile === url + '/') { + rewrittenUrl = appBaseNoFile; + } + if (rewrittenUrl) { + this.$$parse(rewrittenUrl); + } + return !!rewrittenUrl; + }; + + this.$$compose = function() { + var search = toKeyValue(this.$$search), + hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : ''; + + this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash; + // include hashPrefix in $$absUrl when $$url is empty so IE9 does not reload page because of removal of '#' + this.$$absUrl = appBase + hashPrefix + this.$$url; + + this.$$urlUpdatedByLocation = true; + }; + +} + + +var locationPrototype = { + + /** + * Ensure absolute URL is initialized. + * @private + */ + $$absUrl:'', + + /** + * Are we in html5 mode? + * @private + */ + $$html5: false, + + /** + * Has any change been replacing? + * @private + */ + $$replace: false, + + /** + * @ngdoc method + * @name $location#absUrl + * + * @description + * This method is getter only. + * + * Return full URL representation with all segments encoded according to rules specified in + * [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt). + * + * + * ```js + * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo + * var absUrl = $location.absUrl(); + * // => "http://example.com/#/some/path?foo=bar&baz=xoxo" + * ``` + * + * @return {string} full URL + */ + absUrl: locationGetter('$$absUrl'), + + /** + * @ngdoc method + * @name $location#url + * + * @description + * This method is getter / setter. + * + * Return URL (e.g. `/path?a=b#hash`) when called without any parameter. + * + * Change path, search and hash, when called with parameter and return `$location`. + * + * + * ```js + * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo + * var url = $location.url(); + * // => "/some/path?foo=bar&baz=xoxo" + * ``` + * + * @param {string=} url New URL without base prefix (e.g. `/path?a=b#hash`) + * @return {string} url + */ + url: function(url) { + if (isUndefined(url)) { + return this.$$url; + } + + var match = PATH_MATCH.exec(url); + if (match[1] || url === '') this.path(decodeURIComponent(match[1])); + if (match[2] || match[1] || url === '') this.search(match[3] || ''); + this.hash(match[5] || ''); + + return this; + }, + + /** + * @ngdoc method + * @name $location#protocol + * + * @description + * This method is getter only. + * + * Return protocol of current URL. + * + * + * ```js + * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo + * var protocol = $location.protocol(); + * // => "http" + * ``` + * + * @return {string} protocol of current URL + */ + protocol: locationGetter('$$protocol'), + + /** + * @ngdoc method + * @name $location#host + * + * @description + * This method is getter only. + * + * Return host of current URL. + * + * Note: compared to the non-angular version `location.host` which returns `hostname:port`, this returns the `hostname` portion only. + * + * + * ```js + * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo + * var host = $location.host(); + * // => "example.com" + * + * // given URL http://user:password@example.com:8080/#/some/path?foo=bar&baz=xoxo + * host = $location.host(); + * // => "example.com" + * host = location.host; + * // => "example.com:8080" + * ``` + * + * @return {string} host of current URL. + */ + host: locationGetter('$$host'), + + /** + * @ngdoc method + * @name $location#port + * + * @description + * This method is getter only. + * + * Return port of current URL. + * + * + * ```js + * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo + * var port = $location.port(); + * // => 80 + * ``` + * + * @return {Number} port + */ + port: locationGetter('$$port'), + + /** + * @ngdoc method + * @name $location#path + * + * @description + * This method is getter / setter. + * + * Return path of current URL when called without any parameter. + * + * Change path when called with parameter and return `$location`. + * + * Note: Path should always begin with forward slash (/), this method will add the forward slash + * if it is missing. + * + * + * ```js + * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo + * var path = $location.path(); + * // => "/some/path" + * ``` + * + * @param {(string|number)=} path New path + * @return {(string|object)} path if called with no parameters, or `$location` if called with a parameter + */ + path: locationGetterSetter('$$path', function(path) { + path = path !== null ? path.toString() : ''; + return path.charAt(0) === '/' ? path : '/' + path; + }), + + /** + * @ngdoc method + * @name $location#search + * + * @description + * This method is getter / setter. + * + * Return search part (as object) of current URL when called without any parameter. + * + * Change search part when called with parameter and return `$location`. + * + * + * ```js + * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo + * var searchObject = $location.search(); + * // => {foo: 'bar', baz: 'xoxo'} + * + * // set foo to 'yipee' + * $location.search('foo', 'yipee'); + * // $location.search() => {foo: 'yipee', baz: 'xoxo'} + * ``` + * + * @param {string|Object.|Object.>} search New search params - string or + * hash object. + * + * When called with a single argument the method acts as a setter, setting the `search` component + * of `$location` to the specified value. + * + * If the argument is a hash object containing an array of values, these values will be encoded + * as duplicate search parameters in the URL. + * + * @param {(string|Number|Array|boolean)=} paramValue If `search` is a string or number, then `paramValue` + * will override only a single search property. + * + * If `paramValue` is an array, it will override the property of the `search` component of + * `$location` specified via the first argument. + * + * If `paramValue` is `null`, the property specified via the first argument will be deleted. + * + * If `paramValue` is `true`, the property specified via the first argument will be added with no + * value nor trailing equal sign. + * + * @return {Object} If called with no arguments returns the parsed `search` object. If called with + * one or more arguments returns `$location` object itself. + */ + search: function(search, paramValue) { + switch (arguments.length) { + case 0: + return this.$$search; + case 1: + if (isString(search) || isNumber(search)) { + search = search.toString(); + this.$$search = parseKeyValue(search); + } else if (isObject(search)) { + search = copy(search, {}); + // remove object undefined or null properties + forEach(search, function(value, key) { + if (value == null) delete search[key]; + }); + + this.$$search = search; + } else { + throw $locationMinErr('isrcharg', + 'The first argument of the `$location#search()` call must be a string or an object.'); + } + break; + default: + if (isUndefined(paramValue) || paramValue === null) { + delete this.$$search[search]; + } else { + this.$$search[search] = paramValue; + } + } + + this.$$compose(); + return this; + }, + + /** + * @ngdoc method + * @name $location#hash + * + * @description + * This method is getter / setter. + * + * Returns the hash fragment when called without any parameters. + * + * Changes the hash fragment when called with a parameter and returns `$location`. + * + * + * ```js + * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo#hashValue + * var hash = $location.hash(); + * // => "hashValue" + * ``` + * + * @param {(string|number)=} hash New hash fragment + * @return {string} hash + */ + hash: locationGetterSetter('$$hash', function(hash) { + return hash !== null ? hash.toString() : ''; + }), + + /** + * @ngdoc method + * @name $location#replace + * + * @description + * If called, all changes to $location during the current `$digest` will replace the current history + * record, instead of adding a new one. + */ + replace: function() { + this.$$replace = true; + return this; + } +}; + +forEach([LocationHashbangInHtml5Url, LocationHashbangUrl, LocationHtml5Url], function(Location) { + Location.prototype = Object.create(locationPrototype); + + /** + * @ngdoc method + * @name $location#state + * + * @description + * This method is getter / setter. + * + * Return the history state object when called without any parameter. + * + * Change the history state object when called with one parameter and return `$location`. + * The state object is later passed to `pushState` or `replaceState`. + * + * NOTE: This method is supported only in HTML5 mode and only in browsers supporting + * the HTML5 History API (i.e. methods `pushState` and `replaceState`). If you need to support + * older browsers (like IE9 or Android < 4.0), don't use this method. + * + * @param {object=} state State object for pushState or replaceState + * @return {object} state + */ + Location.prototype.state = function(state) { + if (!arguments.length) { + return this.$$state; + } + + if (Location !== LocationHtml5Url || !this.$$html5) { + throw $locationMinErr('nostate', 'History API state support is available only ' + + 'in HTML5 mode and only in browsers supporting HTML5 History API'); + } + // The user might modify `stateObject` after invoking `$location.state(stateObject)` + // but we're changing the $$state reference to $browser.state() during the $digest + // so the modification window is narrow. + this.$$state = isUndefined(state) ? null : state; + this.$$urlUpdatedByLocation = true; + + return this; + }; +}); + + +function locationGetter(property) { + return /** @this */ function() { + return this[property]; + }; +} + + +function locationGetterSetter(property, preprocess) { + return /** @this */ function(value) { + if (isUndefined(value)) { + return this[property]; + } + + this[property] = preprocess(value); + this.$$compose(); + + return this; + }; +} + + +/** + * @ngdoc service + * @name $location + * + * @requires $rootElement + * + * @description + * The $location service parses the URL in the browser address bar (based on the + * [window.location](https://developer.mozilla.org/en/window.location)) and makes the URL + * available to your application. Changes to the URL in the address bar are reflected into + * $location service and changes to $location are reflected into the browser address bar. + * + * **The $location service:** + * + * - Exposes the current URL in the browser address bar, so you can + * - Watch and observe the URL. + * - Change the URL. + * - Synchronizes the URL with the browser when the user + * - Changes the address bar. + * - Clicks the back or forward button (or clicks a History link). + * - Clicks on a link. + * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash). + * + * For more information see {@link guide/$location Developer Guide: Using $location} + */ + +/** + * @ngdoc provider + * @name $locationProvider + * @this + * + * @description + * Use the `$locationProvider` to configure how the application deep linking paths are stored. + */ +function $LocationProvider() { + var hashPrefix = '!', + html5Mode = { + enabled: false, + requireBase: true, + rewriteLinks: true + }; + + /** + * @ngdoc method + * @name $locationProvider#hashPrefix + * @description + * The default value for the prefix is `'!'`. + * @param {string=} prefix Prefix for hash part (containing path and search) + * @returns {*} current value if used as getter or itself (chaining) if used as setter + */ + this.hashPrefix = function(prefix) { + if (isDefined(prefix)) { + hashPrefix = prefix; + return this; + } else { + return hashPrefix; + } + }; + + /** + * @ngdoc method + * @name $locationProvider#html5Mode + * @description + * @param {(boolean|Object)=} mode If boolean, sets `html5Mode.enabled` to value. + * If object, sets `enabled`, `requireBase` and `rewriteLinks` to respective values. Supported + * properties: + * - **enabled** – `{boolean}` – (default: false) If true, will rely on `history.pushState` to + * change urls where supported. Will fall back to hash-prefixed paths in browsers that do not + * support `pushState`. + * - **requireBase** - `{boolean}` - (default: `true`) When html5Mode is enabled, specifies + * whether or not a tag is required to be present. If `enabled` and `requireBase` are + * true, and a base tag is not present, an error will be thrown when `$location` is injected. + * See the {@link guide/$location $location guide for more information} + * - **rewriteLinks** - `{boolean|string}` - (default: `true`) When html5Mode is enabled, + * enables/disables URL rewriting for relative links. If set to a string, URL rewriting will + * only happen on links with an attribute that matches the given string. For example, if set + * to `'internal-link'`, then the URL will only be rewritten for `` links. + * Note that [attribute name normalization](guide/directive#normalization) does not apply + * here, so `'internalLink'` will **not** match `'internal-link'`. + * + * @returns {Object} html5Mode object if used as getter or itself (chaining) if used as setter + */ + this.html5Mode = function(mode) { + if (isBoolean(mode)) { + html5Mode.enabled = mode; + return this; + } else if (isObject(mode)) { + + if (isBoolean(mode.enabled)) { + html5Mode.enabled = mode.enabled; + } + + if (isBoolean(mode.requireBase)) { + html5Mode.requireBase = mode.requireBase; + } + + if (isBoolean(mode.rewriteLinks) || isString(mode.rewriteLinks)) { + html5Mode.rewriteLinks = mode.rewriteLinks; + } + + return this; + } else { + return html5Mode; + } + }; + + /** + * @ngdoc event + * @name $location#$locationChangeStart + * @eventType broadcast on root scope + * @description + * Broadcasted before a URL will change. + * + * This change can be prevented by calling + * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more + * details about event object. Upon successful change + * {@link ng.$location#$locationChangeSuccess $locationChangeSuccess} is fired. + * + * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when + * the browser supports the HTML5 History API. + * + * @param {Object} angularEvent Synthetic event object. + * @param {string} newUrl New URL + * @param {string=} oldUrl URL that was before it was changed. + * @param {string=} newState New history state object + * @param {string=} oldState History state object that was before it was changed. + */ + + /** + * @ngdoc event + * @name $location#$locationChangeSuccess + * @eventType broadcast on root scope + * @description + * Broadcasted after a URL was changed. + * + * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when + * the browser supports the HTML5 History API. + * + * @param {Object} angularEvent Synthetic event object. + * @param {string} newUrl New URL + * @param {string=} oldUrl URL that was before it was changed. + * @param {string=} newState New history state object + * @param {string=} oldState History state object that was before it was changed. + */ + + this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement', '$window', + function($rootScope, $browser, $sniffer, $rootElement, $window) { + var $location, + LocationMode, + baseHref = $browser.baseHref(), // if base[href] is undefined, it defaults to '' + initialUrl = $browser.url(), + appBase; + + if (html5Mode.enabled) { + if (!baseHref && html5Mode.requireBase) { + throw $locationMinErr('nobase', + '$location in HTML5 mode requires a tag to be present!'); + } + appBase = serverBase(initialUrl) + (baseHref || '/'); + LocationMode = $sniffer.history ? LocationHtml5Url : LocationHashbangInHtml5Url; + } else { + appBase = stripHash(initialUrl); + LocationMode = LocationHashbangUrl; + } + var appBaseNoFile = stripFile(appBase); + + $location = new LocationMode(appBase, appBaseNoFile, '#' + hashPrefix); + $location.$$parseLinkUrl(initialUrl, initialUrl); + + $location.$$state = $browser.state(); + + var IGNORE_URI_REGEXP = /^\s*(javascript|mailto):/i; + + function setBrowserUrlWithFallback(url, replace, state) { + var oldUrl = $location.url(); + var oldState = $location.$$state; + try { + $browser.url(url, replace, state); + + // Make sure $location.state() returns referentially identical (not just deeply equal) + // state object; this makes possible quick checking if the state changed in the digest + // loop. Checking deep equality would be too expensive. + $location.$$state = $browser.state(); + } catch (e) { + // Restore old values if pushState fails + $location.url(oldUrl); + $location.$$state = oldState; + + throw e; + } + } + + $rootElement.on('click', function(event) { + var rewriteLinks = html5Mode.rewriteLinks; + // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser) + // currently we open nice url link and redirect then + + if (!rewriteLinks || event.ctrlKey || event.metaKey || event.shiftKey || event.which === 2 || event.button === 2) return; + + var elm = jqLite(event.target); + + // traverse the DOM up to find first A tag + while (nodeName_(elm[0]) !== 'a') { + // ignore rewriting if no A tag (reached root element, or no parent - removed from document) + if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return; + } + + if (isString(rewriteLinks) && isUndefined(elm.attr(rewriteLinks))) return; + + var absHref = elm.prop('href'); + // get the actual href attribute - see + // http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx + var relHref = elm.attr('href') || elm.attr('xlink:href'); + + if (isObject(absHref) && absHref.toString() === '[object SVGAnimatedString]') { + // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during + // an animation. + absHref = urlResolve(absHref.animVal).href; + } + + // Ignore when url is started with javascript: or mailto: + if (IGNORE_URI_REGEXP.test(absHref)) return; + + if (absHref && !elm.attr('target') && !event.isDefaultPrevented()) { + if ($location.$$parseLinkUrl(absHref, relHref)) { + // We do a preventDefault for all urls that are part of the angular application, + // in html5mode and also without, so that we are able to abort navigation without + // getting double entries in the location history. + event.preventDefault(); + // update location manually + if ($location.absUrl() !== $browser.url()) { + $rootScope.$apply(); + // hack to work around FF6 bug 684208 when scenario runner clicks on links + $window.angular['ff-684208-preventDefault'] = true; + } + } + } + }); + + + // rewrite hashbang url <> html5 url + if (trimEmptyHash($location.absUrl()) !== trimEmptyHash(initialUrl)) { + $browser.url($location.absUrl(), true); + } + + var initializing = true; + + // update $location when $browser url changes + $browser.onUrlChange(function(newUrl, newState) { + + if (!startsWith(newUrl, appBaseNoFile)) { + // If we are navigating outside of the app then force a reload + $window.location.href = newUrl; + return; + } + + $rootScope.$evalAsync(function() { + var oldUrl = $location.absUrl(); + var oldState = $location.$$state; + var defaultPrevented; + newUrl = trimEmptyHash(newUrl); + $location.$$parse(newUrl); + $location.$$state = newState; + + defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl, + newState, oldState).defaultPrevented; + + // if the location was changed by a `$locationChangeStart` handler then stop + // processing this location change + if ($location.absUrl() !== newUrl) return; + + if (defaultPrevented) { + $location.$$parse(oldUrl); + $location.$$state = oldState; + setBrowserUrlWithFallback(oldUrl, false, oldState); + } else { + initializing = false; + afterLocationChange(oldUrl, oldState); + } + }); + if (!$rootScope.$$phase) $rootScope.$digest(); + }); + + // update browser + $rootScope.$watch(function $locationWatch() { + if (initializing || $location.$$urlUpdatedByLocation) { + $location.$$urlUpdatedByLocation = false; + + var oldUrl = trimEmptyHash($browser.url()); + var newUrl = trimEmptyHash($location.absUrl()); + var oldState = $browser.state(); + var currentReplace = $location.$$replace; + var urlOrStateChanged = oldUrl !== newUrl || + ($location.$$html5 && $sniffer.history && oldState !== $location.$$state); + + if (initializing || urlOrStateChanged) { + initializing = false; + + $rootScope.$evalAsync(function() { + var newUrl = $location.absUrl(); + var defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl, + $location.$$state, oldState).defaultPrevented; + + // if the location was changed by a `$locationChangeStart` handler then stop + // processing this location change + if ($location.absUrl() !== newUrl) return; + + if (defaultPrevented) { + $location.$$parse(oldUrl); + $location.$$state = oldState; + } else { + if (urlOrStateChanged) { + setBrowserUrlWithFallback(newUrl, currentReplace, + oldState === $location.$$state ? null : $location.$$state); + } + afterLocationChange(oldUrl, oldState); + } + }); + } + } + + $location.$$replace = false; + + // we don't need to return anything because $evalAsync will make the digest loop dirty when + // there is a change + }); + + return $location; + + function afterLocationChange(oldUrl, oldState) { + $rootScope.$broadcast('$locationChangeSuccess', $location.absUrl(), oldUrl, + $location.$$state, oldState); + } +}]; +} + +/** + * @ngdoc service + * @name $log + * @requires $window + * + * @description + * Simple service for logging. Default implementation safely writes the message + * into the browser's console (if present). + * + * The main purpose of this service is to simplify debugging and troubleshooting. + * + * To reveal the location of the calls to `$log` in the JavaScript console, + * you can "blackbox" the AngularJS source in your browser: + * + * [Mozilla description of blackboxing](https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Black_box_a_source). + * [Chrome description of blackboxing](https://developer.chrome.com/devtools/docs/blackboxing). + * + * Note: Not all browsers support blackboxing. + * + * The default is to log `debug` messages. You can use + * {@link ng.$logProvider ng.$logProvider#debugEnabled} to change this. + * + * @example + + + angular.module('logExample', []) + .controller('LogController', ['$scope', '$log', function($scope, $log) { + $scope.$log = $log; + $scope.message = 'Hello World!'; + }]); + + +
+

Reload this page with open console, enter text and hit the log button...

+ + + + + + +
+
+
+ */ + +/** + * @ngdoc provider + * @name $logProvider + * @this + * + * @description + * Use the `$logProvider` to configure how the application logs messages + */ +function $LogProvider() { + var debug = true, + self = this; + + /** + * @ngdoc method + * @name $logProvider#debugEnabled + * @description + * @param {boolean=} flag enable or disable debug level messages + * @returns {*} current value if used as getter or itself (chaining) if used as setter + */ + this.debugEnabled = function(flag) { + if (isDefined(flag)) { + debug = flag; + return this; + } else { + return debug; + } + }; + + this.$get = ['$window', function($window) { + // Support: IE 9-11, Edge 12-14+ + // IE/Edge display errors in such a way that it requires the user to click in 4 places + // to see the stack trace. There is no way to feature-detect it so there's a chance + // of the user agent sniffing to go wrong but since it's only about logging, this shouldn't + // break apps. Other browsers display errors in a sensible way and some of them map stack + // traces along source maps if available so it makes sense to let browsers display it + // as they want. + var formatStackTrace = msie || /\bEdge\//.test($window.navigator && $window.navigator.userAgent); + + return { + /** + * @ngdoc method + * @name $log#log + * + * @description + * Write a log message + */ + log: consoleLog('log'), + + /** + * @ngdoc method + * @name $log#info + * + * @description + * Write an information message + */ + info: consoleLog('info'), + + /** + * @ngdoc method + * @name $log#warn + * + * @description + * Write a warning message + */ + warn: consoleLog('warn'), + + /** + * @ngdoc method + * @name $log#error + * + * @description + * Write an error message + */ + error: consoleLog('error'), + + /** + * @ngdoc method + * @name $log#debug + * + * @description + * Write a debug message + */ + debug: (function() { + var fn = consoleLog('debug'); + + return function() { + if (debug) { + fn.apply(self, arguments); + } + }; + })() + }; + + function formatError(arg) { + if (isError(arg)) { + if (arg.stack && formatStackTrace) { + arg = (arg.message && arg.stack.indexOf(arg.message) === -1) + ? 'Error: ' + arg.message + '\n' + arg.stack + : arg.stack; + } else if (arg.sourceURL) { + arg = arg.message + '\n' + arg.sourceURL + ':' + arg.line; + } + } + return arg; + } + + function consoleLog(type) { + var console = $window.console || {}, + logFn = console[type] || console.log || noop; + + return function() { + var args = []; + forEach(arguments, function(arg) { + args.push(formatError(arg)); + }); + // Support: IE 9 only + // console methods don't inherit from Function.prototype in IE 9 so we can't + // call `logFn.apply(console, args)` directly. + return Function.prototype.apply.call(logFn, console, args); + }; + } + }]; +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Any commits to this file should be reviewed with security in mind. * + * Changes to this file can potentially create security vulnerabilities. * + * An approval from 2 Core members with history of modifying * + * this file is required. * + * * + * Does the change somehow allow for arbitrary javascript to be executed? * + * Or allows for someone to change the prototype of built-in objects? * + * Or gives undesired access to variables likes document or window? * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +var $parseMinErr = minErr('$parse'); + +var objectValueOf = {}.constructor.prototype.valueOf; + +// Sandboxing Angular Expressions +// ------------------------------ +// Angular expressions are no longer sandboxed. So it is now even easier to access arbitrary JS code by +// various means such as obtaining a reference to native JS functions like the Function constructor. +// +// As an example, consider the following Angular expression: +// +// {}.toString.constructor('alert("evil JS code")') +// +// It is important to realize that if you create an expression from a string that contains user provided +// content then it is possible that your application contains a security vulnerability to an XSS style attack. +// +// See https://docs.angularjs.org/guide/security + + +function getStringValue(name) { + // Property names must be strings. This means that non-string objects cannot be used + // as keys in an object. Any non-string object, including a number, is typecasted + // into a string via the toString method. + // -- MDN, https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Property_accessors#Property_names + // + // So, to ensure that we are checking the same `name` that JavaScript would use, we cast it + // to a string. It's not always possible. If `name` is an object and its `toString` method is + // 'broken' (doesn't return a string, isn't a function, etc.), an error will be thrown: + // + // TypeError: Cannot convert object to primitive value + // + // For performance reasons, we don't catch this error here and allow it to propagate up the call + // stack. Note that you'll get the same error in JavaScript if you try to access a property using + // such a 'broken' object as a key. + return name + ''; +} + + +var OPERATORS = createMap(); +forEach('+ - * / % === !== == != < > <= >= && || ! = |'.split(' '), function(operator) { OPERATORS[operator] = true; }); +var ESCAPE = {'n':'\n', 'f':'\f', 'r':'\r', 't':'\t', 'v':'\v', '\'':'\'', '"':'"'}; + + +///////////////////////////////////////// + + +/** + * @constructor + */ +var Lexer = function Lexer(options) { + this.options = options; +}; + +Lexer.prototype = { + constructor: Lexer, + + lex: function(text) { + this.text = text; + this.index = 0; + this.tokens = []; + + while (this.index < this.text.length) { + var ch = this.text.charAt(this.index); + if (ch === '"' || ch === '\'') { + this.readString(ch); + } else if (this.isNumber(ch) || ch === '.' && this.isNumber(this.peek())) { + this.readNumber(); + } else if (this.isIdentifierStart(this.peekMultichar())) { + this.readIdent(); + } else if (this.is(ch, '(){}[].,;:?')) { + this.tokens.push({index: this.index, text: ch}); + this.index++; + } else if (this.isWhitespace(ch)) { + this.index++; + } else { + var ch2 = ch + this.peek(); + var ch3 = ch2 + this.peek(2); + var op1 = OPERATORS[ch]; + var op2 = OPERATORS[ch2]; + var op3 = OPERATORS[ch3]; + if (op1 || op2 || op3) { + var token = op3 ? ch3 : (op2 ? ch2 : ch); + this.tokens.push({index: this.index, text: token, operator: true}); + this.index += token.length; + } else { + this.throwError('Unexpected next character ', this.index, this.index + 1); + } + } + } + return this.tokens; + }, + + is: function(ch, chars) { + return chars.indexOf(ch) !== -1; + }, + + peek: function(i) { + var num = i || 1; + return (this.index + num < this.text.length) ? this.text.charAt(this.index + num) : false; + }, + + isNumber: function(ch) { + return ('0' <= ch && ch <= '9') && typeof ch === 'string'; + }, + + isWhitespace: function(ch) { + // IE treats non-breaking space as \u00A0 + return (ch === ' ' || ch === '\r' || ch === '\t' || + ch === '\n' || ch === '\v' || ch === '\u00A0'); + }, + + isIdentifierStart: function(ch) { + return this.options.isIdentifierStart ? + this.options.isIdentifierStart(ch, this.codePointAt(ch)) : + this.isValidIdentifierStart(ch); + }, + + isValidIdentifierStart: function(ch) { + return ('a' <= ch && ch <= 'z' || + 'A' <= ch && ch <= 'Z' || + '_' === ch || ch === '$'); + }, + + isIdentifierContinue: function(ch) { + return this.options.isIdentifierContinue ? + this.options.isIdentifierContinue(ch, this.codePointAt(ch)) : + this.isValidIdentifierContinue(ch); + }, + + isValidIdentifierContinue: function(ch, cp) { + return this.isValidIdentifierStart(ch, cp) || this.isNumber(ch); + }, + + codePointAt: function(ch) { + if (ch.length === 1) return ch.charCodeAt(0); + // eslint-disable-next-line no-bitwise + return (ch.charCodeAt(0) << 10) + ch.charCodeAt(1) - 0x35FDC00; + }, + + peekMultichar: function() { + var ch = this.text.charAt(this.index); + var peek = this.peek(); + if (!peek) { + return ch; + } + var cp1 = ch.charCodeAt(0); + var cp2 = peek.charCodeAt(0); + if (cp1 >= 0xD800 && cp1 <= 0xDBFF && cp2 >= 0xDC00 && cp2 <= 0xDFFF) { + return ch + peek; + } + return ch; + }, + + isExpOperator: function(ch) { + return (ch === '-' || ch === '+' || this.isNumber(ch)); + }, + + throwError: function(error, start, end) { + end = end || this.index; + var colStr = (isDefined(start) + ? 's ' + start + '-' + this.index + ' [' + this.text.substring(start, end) + ']' + : ' ' + end); + throw $parseMinErr('lexerr', 'Lexer Error: {0} at column{1} in expression [{2}].', + error, colStr, this.text); + }, + + readNumber: function() { + var number = ''; + var start = this.index; + while (this.index < this.text.length) { + var ch = lowercase(this.text.charAt(this.index)); + if (ch === '.' || this.isNumber(ch)) { + number += ch; + } else { + var peekCh = this.peek(); + if (ch === 'e' && this.isExpOperator(peekCh)) { + number += ch; + } else if (this.isExpOperator(ch) && + peekCh && this.isNumber(peekCh) && + number.charAt(number.length - 1) === 'e') { + number += ch; + } else if (this.isExpOperator(ch) && + (!peekCh || !this.isNumber(peekCh)) && + number.charAt(number.length - 1) === 'e') { + this.throwError('Invalid exponent'); + } else { + break; + } + } + this.index++; + } + this.tokens.push({ + index: start, + text: number, + constant: true, + value: Number(number) + }); + }, + + readIdent: function() { + var start = this.index; + this.index += this.peekMultichar().length; + while (this.index < this.text.length) { + var ch = this.peekMultichar(); + if (!this.isIdentifierContinue(ch)) { + break; + } + this.index += ch.length; + } + this.tokens.push({ + index: start, + text: this.text.slice(start, this.index), + identifier: true + }); + }, + + readString: function(quote) { + var start = this.index; + this.index++; + var string = ''; + var rawString = quote; + var escape = false; + while (this.index < this.text.length) { + var ch = this.text.charAt(this.index); + rawString += ch; + if (escape) { + if (ch === 'u') { + var hex = this.text.substring(this.index + 1, this.index + 5); + if (!hex.match(/[\da-f]{4}/i)) { + this.throwError('Invalid unicode escape [\\u' + hex + ']'); + } + this.index += 4; + string += String.fromCharCode(parseInt(hex, 16)); + } else { + var rep = ESCAPE[ch]; + string = string + (rep || ch); + } + escape = false; + } else if (ch === '\\') { + escape = true; + } else if (ch === quote) { + this.index++; + this.tokens.push({ + index: start, + text: rawString, + constant: true, + value: string + }); + return; + } else { + string += ch; + } + this.index++; + } + this.throwError('Unterminated quote', start); + } +}; + +var AST = function AST(lexer, options) { + this.lexer = lexer; + this.options = options; +}; + +AST.Program = 'Program'; +AST.ExpressionStatement = 'ExpressionStatement'; +AST.AssignmentExpression = 'AssignmentExpression'; +AST.ConditionalExpression = 'ConditionalExpression'; +AST.LogicalExpression = 'LogicalExpression'; +AST.BinaryExpression = 'BinaryExpression'; +AST.UnaryExpression = 'UnaryExpression'; +AST.CallExpression = 'CallExpression'; +AST.MemberExpression = 'MemberExpression'; +AST.Identifier = 'Identifier'; +AST.Literal = 'Literal'; +AST.ArrayExpression = 'ArrayExpression'; +AST.Property = 'Property'; +AST.ObjectExpression = 'ObjectExpression'; +AST.ThisExpression = 'ThisExpression'; +AST.LocalsExpression = 'LocalsExpression'; + +// Internal use only +AST.NGValueParameter = 'NGValueParameter'; + +AST.prototype = { + ast: function(text) { + this.text = text; + this.tokens = this.lexer.lex(text); + + var value = this.program(); + + if (this.tokens.length !== 0) { + this.throwError('is an unexpected token', this.tokens[0]); + } + + return value; + }, + + program: function() { + var body = []; + while (true) { + if (this.tokens.length > 0 && !this.peek('}', ')', ';', ']')) + body.push(this.expressionStatement()); + if (!this.expect(';')) { + return { type: AST.Program, body: body}; + } + } + }, + + expressionStatement: function() { + return { type: AST.ExpressionStatement, expression: this.filterChain() }; + }, + + filterChain: function() { + var left = this.expression(); + while (this.expect('|')) { + left = this.filter(left); + } + return left; + }, + + expression: function() { + return this.assignment(); + }, + + assignment: function() { + var result = this.ternary(); + if (this.expect('=')) { + if (!isAssignable(result)) { + throw $parseMinErr('lval', 'Trying to assign a value to a non l-value'); + } + + result = { type: AST.AssignmentExpression, left: result, right: this.assignment(), operator: '='}; + } + return result; + }, + + ternary: function() { + var test = this.logicalOR(); + var alternate; + var consequent; + if (this.expect('?')) { + alternate = this.expression(); + if (this.consume(':')) { + consequent = this.expression(); + return { type: AST.ConditionalExpression, test: test, alternate: alternate, consequent: consequent}; + } + } + return test; + }, + + logicalOR: function() { + var left = this.logicalAND(); + while (this.expect('||')) { + left = { type: AST.LogicalExpression, operator: '||', left: left, right: this.logicalAND() }; + } + return left; + }, + + logicalAND: function() { + var left = this.equality(); + while (this.expect('&&')) { + left = { type: AST.LogicalExpression, operator: '&&', left: left, right: this.equality()}; + } + return left; + }, + + equality: function() { + var left = this.relational(); + var token; + while ((token = this.expect('==','!=','===','!=='))) { + left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.relational() }; + } + return left; + }, + + relational: function() { + var left = this.additive(); + var token; + while ((token = this.expect('<', '>', '<=', '>='))) { + left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.additive() }; + } + return left; + }, + + additive: function() { + var left = this.multiplicative(); + var token; + while ((token = this.expect('+','-'))) { + left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.multiplicative() }; + } + return left; + }, + + multiplicative: function() { + var left = this.unary(); + var token; + while ((token = this.expect('*','/','%'))) { + left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.unary() }; + } + return left; + }, + + unary: function() { + var token; + if ((token = this.expect('+', '-', '!'))) { + return { type: AST.UnaryExpression, operator: token.text, prefix: true, argument: this.unary() }; + } else { + return this.primary(); + } + }, + + primary: function() { + var primary; + if (this.expect('(')) { + primary = this.filterChain(); + this.consume(')'); + } else if (this.expect('[')) { + primary = this.arrayDeclaration(); + } else if (this.expect('{')) { + primary = this.object(); + } else if (this.selfReferential.hasOwnProperty(this.peek().text)) { + primary = copy(this.selfReferential[this.consume().text]); + } else if (this.options.literals.hasOwnProperty(this.peek().text)) { + primary = { type: AST.Literal, value: this.options.literals[this.consume().text]}; + } else if (this.peek().identifier) { + primary = this.identifier(); + } else if (this.peek().constant) { + primary = this.constant(); + } else { + this.throwError('not a primary expression', this.peek()); + } + + var next; + while ((next = this.expect('(', '[', '.'))) { + if (next.text === '(') { + primary = {type: AST.CallExpression, callee: primary, arguments: this.parseArguments() }; + this.consume(')'); + } else if (next.text === '[') { + primary = { type: AST.MemberExpression, object: primary, property: this.expression(), computed: true }; + this.consume(']'); + } else if (next.text === '.') { + primary = { type: AST.MemberExpression, object: primary, property: this.identifier(), computed: false }; + } else { + this.throwError('IMPOSSIBLE'); + } + } + return primary; + }, + + filter: function(baseExpression) { + var args = [baseExpression]; + var result = {type: AST.CallExpression, callee: this.identifier(), arguments: args, filter: true}; + + while (this.expect(':')) { + args.push(this.expression()); + } + + return result; + }, + + parseArguments: function() { + var args = []; + if (this.peekToken().text !== ')') { + do { + args.push(this.filterChain()); + } while (this.expect(',')); + } + return args; + }, + + identifier: function() { + var token = this.consume(); + if (!token.identifier) { + this.throwError('is not a valid identifier', token); + } + return { type: AST.Identifier, name: token.text }; + }, + + constant: function() { + // TODO check that it is a constant + return { type: AST.Literal, value: this.consume().value }; + }, + + arrayDeclaration: function() { + var elements = []; + if (this.peekToken().text !== ']') { + do { + if (this.peek(']')) { + // Support trailing commas per ES5.1. + break; + } + elements.push(this.expression()); + } while (this.expect(',')); + } + this.consume(']'); + + return { type: AST.ArrayExpression, elements: elements }; + }, + + object: function() { + var properties = [], property; + if (this.peekToken().text !== '}') { + do { + if (this.peek('}')) { + // Support trailing commas per ES5.1. + break; + } + property = {type: AST.Property, kind: 'init'}; + if (this.peek().constant) { + property.key = this.constant(); + property.computed = false; + this.consume(':'); + property.value = this.expression(); + } else if (this.peek().identifier) { + property.key = this.identifier(); + property.computed = false; + if (this.peek(':')) { + this.consume(':'); + property.value = this.expression(); + } else { + property.value = property.key; + } + } else if (this.peek('[')) { + this.consume('['); + property.key = this.expression(); + this.consume(']'); + property.computed = true; + this.consume(':'); + property.value = this.expression(); + } else { + this.throwError('invalid key', this.peek()); + } + properties.push(property); + } while (this.expect(',')); + } + this.consume('}'); + + return {type: AST.ObjectExpression, properties: properties }; + }, + + throwError: function(msg, token) { + throw $parseMinErr('syntax', + 'Syntax Error: Token \'{0}\' {1} at column {2} of the expression [{3}] starting at [{4}].', + token.text, msg, (token.index + 1), this.text, this.text.substring(token.index)); + }, + + consume: function(e1) { + if (this.tokens.length === 0) { + throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text); + } + + var token = this.expect(e1); + if (!token) { + this.throwError('is unexpected, expecting [' + e1 + ']', this.peek()); + } + return token; + }, + + peekToken: function() { + if (this.tokens.length === 0) { + throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text); + } + return this.tokens[0]; + }, + + peek: function(e1, e2, e3, e4) { + return this.peekAhead(0, e1, e2, e3, e4); + }, + + peekAhead: function(i, e1, e2, e3, e4) { + if (this.tokens.length > i) { + var token = this.tokens[i]; + var t = token.text; + if (t === e1 || t === e2 || t === e3 || t === e4 || + (!e1 && !e2 && !e3 && !e4)) { + return token; + } + } + return false; + }, + + expect: function(e1, e2, e3, e4) { + var token = this.peek(e1, e2, e3, e4); + if (token) { + this.tokens.shift(); + return token; + } + return false; + }, + + selfReferential: { + 'this': {type: AST.ThisExpression }, + '$locals': {type: AST.LocalsExpression } + } +}; + +function ifDefined(v, d) { + return typeof v !== 'undefined' ? v : d; +} + +function plusFn(l, r) { + if (typeof l === 'undefined') return r; + if (typeof r === 'undefined') return l; + return l + r; +} + +function isStateless($filter, filterName) { + var fn = $filter(filterName); + return !fn.$stateful; +} + +var PURITY_ABSOLUTE = 1; +var PURITY_RELATIVE = 2; + +// Detect nodes which could depend on non-shallow state of objects +function isPure(node, parentIsPure) { + switch (node.type) { + // Computed members might invoke a stateful toString() + case AST.MemberExpression: + if (node.computed) { + return false; + } + break; + + // Unary always convert to primative + case AST.UnaryExpression: + return PURITY_ABSOLUTE; + + // The binary + operator can invoke a stateful toString(). + case AST.BinaryExpression: + return node.operator !== '+' ? PURITY_ABSOLUTE : false; + + // Functions / filters probably read state from within objects + case AST.CallExpression: + return false; + } + + return (undefined === parentIsPure) ? PURITY_RELATIVE : parentIsPure; +} + +function findConstantAndWatchExpressions(ast, $filter, parentIsPure) { + var allConstants; + var argsToWatch; + var isStatelessFilter; + + var astIsPure = ast.isPure = isPure(ast, parentIsPure); + + switch (ast.type) { + case AST.Program: + allConstants = true; + forEach(ast.body, function(expr) { + findConstantAndWatchExpressions(expr.expression, $filter, astIsPure); + allConstants = allConstants && expr.expression.constant; + }); + ast.constant = allConstants; + break; + case AST.Literal: + ast.constant = true; + ast.toWatch = []; + break; + case AST.UnaryExpression: + findConstantAndWatchExpressions(ast.argument, $filter, astIsPure); + ast.constant = ast.argument.constant; + ast.toWatch = ast.argument.toWatch; + break; + case AST.BinaryExpression: + findConstantAndWatchExpressions(ast.left, $filter, astIsPure); + findConstantAndWatchExpressions(ast.right, $filter, astIsPure); + ast.constant = ast.left.constant && ast.right.constant; + ast.toWatch = ast.left.toWatch.concat(ast.right.toWatch); + break; + case AST.LogicalExpression: + findConstantAndWatchExpressions(ast.left, $filter, astIsPure); + findConstantAndWatchExpressions(ast.right, $filter, astIsPure); + ast.constant = ast.left.constant && ast.right.constant; + ast.toWatch = ast.constant ? [] : [ast]; + break; + case AST.ConditionalExpression: + findConstantAndWatchExpressions(ast.test, $filter, astIsPure); + findConstantAndWatchExpressions(ast.alternate, $filter, astIsPure); + findConstantAndWatchExpressions(ast.consequent, $filter, astIsPure); + ast.constant = ast.test.constant && ast.alternate.constant && ast.consequent.constant; + ast.toWatch = ast.constant ? [] : [ast]; + break; + case AST.Identifier: + ast.constant = false; + ast.toWatch = [ast]; + break; + case AST.MemberExpression: + findConstantAndWatchExpressions(ast.object, $filter, astIsPure); + if (ast.computed) { + findConstantAndWatchExpressions(ast.property, $filter, astIsPure); + } + ast.constant = ast.object.constant && (!ast.computed || ast.property.constant); + ast.toWatch = ast.constant ? [] : [ast]; + break; + case AST.CallExpression: + isStatelessFilter = ast.filter ? isStateless($filter, ast.callee.name) : false; + allConstants = isStatelessFilter; + argsToWatch = []; + forEach(ast.arguments, function(expr) { + findConstantAndWatchExpressions(expr, $filter, astIsPure); + allConstants = allConstants && expr.constant; + argsToWatch.push.apply(argsToWatch, expr.toWatch); + }); + ast.constant = allConstants; + ast.toWatch = isStatelessFilter ? argsToWatch : [ast]; + break; + case AST.AssignmentExpression: + findConstantAndWatchExpressions(ast.left, $filter, astIsPure); + findConstantAndWatchExpressions(ast.right, $filter, astIsPure); + ast.constant = ast.left.constant && ast.right.constant; + ast.toWatch = [ast]; + break; + case AST.ArrayExpression: + allConstants = true; + argsToWatch = []; + forEach(ast.elements, function(expr) { + findConstantAndWatchExpressions(expr, $filter, astIsPure); + allConstants = allConstants && expr.constant; + argsToWatch.push.apply(argsToWatch, expr.toWatch); + }); + ast.constant = allConstants; + ast.toWatch = argsToWatch; + break; + case AST.ObjectExpression: + allConstants = true; + argsToWatch = []; + forEach(ast.properties, function(property) { + findConstantAndWatchExpressions(property.value, $filter, astIsPure); + allConstants = allConstants && property.value.constant; + argsToWatch.push.apply(argsToWatch, property.value.toWatch); + if (property.computed) { + //`{[key]: value}` implicitly does `key.toString()` which may be non-pure + findConstantAndWatchExpressions(property.key, $filter, /*parentIsPure=*/false); + allConstants = allConstants && property.key.constant; + argsToWatch.push.apply(argsToWatch, property.key.toWatch); + } + }); + ast.constant = allConstants; + ast.toWatch = argsToWatch; + break; + case AST.ThisExpression: + ast.constant = false; + ast.toWatch = []; + break; + case AST.LocalsExpression: + ast.constant = false; + ast.toWatch = []; + break; + } +} + +function getInputs(body) { + if (body.length !== 1) return; + var lastExpression = body[0].expression; + var candidate = lastExpression.toWatch; + if (candidate.length !== 1) return candidate; + return candidate[0] !== lastExpression ? candidate : undefined; +} + +function isAssignable(ast) { + return ast.type === AST.Identifier || ast.type === AST.MemberExpression; +} + +function assignableAST(ast) { + if (ast.body.length === 1 && isAssignable(ast.body[0].expression)) { + return {type: AST.AssignmentExpression, left: ast.body[0].expression, right: {type: AST.NGValueParameter}, operator: '='}; + } +} + +function isLiteral(ast) { + return ast.body.length === 0 || + ast.body.length === 1 && ( + ast.body[0].expression.type === AST.Literal || + ast.body[0].expression.type === AST.ArrayExpression || + ast.body[0].expression.type === AST.ObjectExpression); +} + +function isConstant(ast) { + return ast.constant; +} + +function ASTCompiler($filter) { + this.$filter = $filter; +} + +ASTCompiler.prototype = { + compile: function(ast) { + var self = this; + this.state = { + nextId: 0, + filters: {}, + fn: {vars: [], body: [], own: {}}, + assign: {vars: [], body: [], own: {}}, + inputs: [] + }; + findConstantAndWatchExpressions(ast, self.$filter); + var extra = ''; + var assignable; + this.stage = 'assign'; + if ((assignable = assignableAST(ast))) { + this.state.computing = 'assign'; + var result = this.nextId(); + this.recurse(assignable, result); + this.return_(result); + extra = 'fn.assign=' + this.generateFunction('assign', 's,v,l'); + } + var toWatch = getInputs(ast.body); + self.stage = 'inputs'; + forEach(toWatch, function(watch, key) { + var fnKey = 'fn' + key; + self.state[fnKey] = {vars: [], body: [], own: {}}; + self.state.computing = fnKey; + var intoId = self.nextId(); + self.recurse(watch, intoId); + self.return_(intoId); + self.state.inputs.push({name: fnKey, isPure: watch.isPure}); + watch.watchId = key; + }); + this.state.computing = 'fn'; + this.stage = 'main'; + this.recurse(ast); + var fnString = + // The build and minification steps remove the string "use strict" from the code, but this is done using a regex. + // This is a workaround for this until we do a better job at only removing the prefix only when we should. + '"' + this.USE + ' ' + this.STRICT + '";\n' + + this.filterPrefix() + + 'var fn=' + this.generateFunction('fn', 's,l,a,i') + + extra + + this.watchFns() + + 'return fn;'; + + // eslint-disable-next-line no-new-func + var fn = (new Function('$filter', + 'getStringValue', + 'ifDefined', + 'plus', + fnString))( + this.$filter, + getStringValue, + ifDefined, + plusFn); + this.state = this.stage = undefined; + return fn; + }, + + USE: 'use', + + STRICT: 'strict', + + watchFns: function() { + var result = []; + var inputs = this.state.inputs; + var self = this; + forEach(inputs, function(input) { + result.push('var ' + input.name + '=' + self.generateFunction(input.name, 's')); + if (input.isPure) { + result.push(input.name, '.isPure=' + JSON.stringify(input.isPure) + ';'); + } + }); + if (inputs.length) { + result.push('fn.inputs=[' + inputs.map(function(i) { return i.name; }).join(',') + '];'); + } + return result.join(''); + }, + + generateFunction: function(name, params) { + return 'function(' + params + '){' + + this.varsPrefix(name) + + this.body(name) + + '};'; + }, + + filterPrefix: function() { + var parts = []; + var self = this; + forEach(this.state.filters, function(id, filter) { + parts.push(id + '=$filter(' + self.escape(filter) + ')'); + }); + if (parts.length) return 'var ' + parts.join(',') + ';'; + return ''; + }, + + varsPrefix: function(section) { + return this.state[section].vars.length ? 'var ' + this.state[section].vars.join(',') + ';' : ''; + }, + + body: function(section) { + return this.state[section].body.join(''); + }, + + recurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) { + var left, right, self = this, args, expression, computed; + recursionFn = recursionFn || noop; + if (!skipWatchIdCheck && isDefined(ast.watchId)) { + intoId = intoId || this.nextId(); + this.if_('i', + this.lazyAssign(intoId, this.computedMember('i', ast.watchId)), + this.lazyRecurse(ast, intoId, nameId, recursionFn, create, true) + ); + return; + } + switch (ast.type) { + case AST.Program: + forEach(ast.body, function(expression, pos) { + self.recurse(expression.expression, undefined, undefined, function(expr) { right = expr; }); + if (pos !== ast.body.length - 1) { + self.current().body.push(right, ';'); + } else { + self.return_(right); + } + }); + break; + case AST.Literal: + expression = this.escape(ast.value); + this.assign(intoId, expression); + recursionFn(intoId || expression); + break; + case AST.UnaryExpression: + this.recurse(ast.argument, undefined, undefined, function(expr) { right = expr; }); + expression = ast.operator + '(' + this.ifDefined(right, 0) + ')'; + this.assign(intoId, expression); + recursionFn(expression); + break; + case AST.BinaryExpression: + this.recurse(ast.left, undefined, undefined, function(expr) { left = expr; }); + this.recurse(ast.right, undefined, undefined, function(expr) { right = expr; }); + if (ast.operator === '+') { + expression = this.plus(left, right); + } else if (ast.operator === '-') { + expression = this.ifDefined(left, 0) + ast.operator + this.ifDefined(right, 0); + } else { + expression = '(' + left + ')' + ast.operator + '(' + right + ')'; + } + this.assign(intoId, expression); + recursionFn(expression); + break; + case AST.LogicalExpression: + intoId = intoId || this.nextId(); + self.recurse(ast.left, intoId); + self.if_(ast.operator === '&&' ? intoId : self.not(intoId), self.lazyRecurse(ast.right, intoId)); + recursionFn(intoId); + break; + case AST.ConditionalExpression: + intoId = intoId || this.nextId(); + self.recurse(ast.test, intoId); + self.if_(intoId, self.lazyRecurse(ast.alternate, intoId), self.lazyRecurse(ast.consequent, intoId)); + recursionFn(intoId); + break; + case AST.Identifier: + intoId = intoId || this.nextId(); + if (nameId) { + nameId.context = self.stage === 'inputs' ? 's' : this.assign(this.nextId(), this.getHasOwnProperty('l', ast.name) + '?l:s'); + nameId.computed = false; + nameId.name = ast.name; + } + self.if_(self.stage === 'inputs' || self.not(self.getHasOwnProperty('l', ast.name)), + function() { + self.if_(self.stage === 'inputs' || 's', function() { + if (create && create !== 1) { + self.if_( + self.isNull(self.nonComputedMember('s', ast.name)), + self.lazyAssign(self.nonComputedMember('s', ast.name), '{}')); + } + self.assign(intoId, self.nonComputedMember('s', ast.name)); + }); + }, intoId && self.lazyAssign(intoId, self.nonComputedMember('l', ast.name)) + ); + recursionFn(intoId); + break; + case AST.MemberExpression: + left = nameId && (nameId.context = this.nextId()) || this.nextId(); + intoId = intoId || this.nextId(); + self.recurse(ast.object, left, undefined, function() { + self.if_(self.notNull(left), function() { + if (ast.computed) { + right = self.nextId(); + self.recurse(ast.property, right); + self.getStringValue(right); + if (create && create !== 1) { + self.if_(self.not(self.computedMember(left, right)), self.lazyAssign(self.computedMember(left, right), '{}')); + } + expression = self.computedMember(left, right); + self.assign(intoId, expression); + if (nameId) { + nameId.computed = true; + nameId.name = right; + } + } else { + if (create && create !== 1) { + self.if_(self.isNull(self.nonComputedMember(left, ast.property.name)), self.lazyAssign(self.nonComputedMember(left, ast.property.name), '{}')); + } + expression = self.nonComputedMember(left, ast.property.name); + self.assign(intoId, expression); + if (nameId) { + nameId.computed = false; + nameId.name = ast.property.name; + } + } + }, function() { + self.assign(intoId, 'undefined'); + }); + recursionFn(intoId); + }, !!create); + break; + case AST.CallExpression: + intoId = intoId || this.nextId(); + if (ast.filter) { + right = self.filter(ast.callee.name); + args = []; + forEach(ast.arguments, function(expr) { + var argument = self.nextId(); + self.recurse(expr, argument); + args.push(argument); + }); + expression = right + '(' + args.join(',') + ')'; + self.assign(intoId, expression); + recursionFn(intoId); + } else { + right = self.nextId(); + left = {}; + args = []; + self.recurse(ast.callee, right, left, function() { + self.if_(self.notNull(right), function() { + forEach(ast.arguments, function(expr) { + self.recurse(expr, ast.constant ? undefined : self.nextId(), undefined, function(argument) { + args.push(argument); + }); + }); + if (left.name) { + expression = self.member(left.context, left.name, left.computed) + '(' + args.join(',') + ')'; + } else { + expression = right + '(' + args.join(',') + ')'; + } + self.assign(intoId, expression); + }, function() { + self.assign(intoId, 'undefined'); + }); + recursionFn(intoId); + }); + } + break; + case AST.AssignmentExpression: + right = this.nextId(); + left = {}; + this.recurse(ast.left, undefined, left, function() { + self.if_(self.notNull(left.context), function() { + self.recurse(ast.right, right); + expression = self.member(left.context, left.name, left.computed) + ast.operator + right; + self.assign(intoId, expression); + recursionFn(intoId || expression); + }); + }, 1); + break; + case AST.ArrayExpression: + args = []; + forEach(ast.elements, function(expr) { + self.recurse(expr, ast.constant ? undefined : self.nextId(), undefined, function(argument) { + args.push(argument); + }); + }); + expression = '[' + args.join(',') + ']'; + this.assign(intoId, expression); + recursionFn(intoId || expression); + break; + case AST.ObjectExpression: + args = []; + computed = false; + forEach(ast.properties, function(property) { + if (property.computed) { + computed = true; + } + }); + if (computed) { + intoId = intoId || this.nextId(); + this.assign(intoId, '{}'); + forEach(ast.properties, function(property) { + if (property.computed) { + left = self.nextId(); + self.recurse(property.key, left); + } else { + left = property.key.type === AST.Identifier ? + property.key.name : + ('' + property.key.value); + } + right = self.nextId(); + self.recurse(property.value, right); + self.assign(self.member(intoId, left, property.computed), right); + }); + } else { + forEach(ast.properties, function(property) { + self.recurse(property.value, ast.constant ? undefined : self.nextId(), undefined, function(expr) { + args.push(self.escape( + property.key.type === AST.Identifier ? property.key.name : + ('' + property.key.value)) + + ':' + expr); + }); + }); + expression = '{' + args.join(',') + '}'; + this.assign(intoId, expression); + } + recursionFn(intoId || expression); + break; + case AST.ThisExpression: + this.assign(intoId, 's'); + recursionFn(intoId || 's'); + break; + case AST.LocalsExpression: + this.assign(intoId, 'l'); + recursionFn(intoId || 'l'); + break; + case AST.NGValueParameter: + this.assign(intoId, 'v'); + recursionFn(intoId || 'v'); + break; + } + }, + + getHasOwnProperty: function(element, property) { + var key = element + '.' + property; + var own = this.current().own; + if (!own.hasOwnProperty(key)) { + own[key] = this.nextId(false, element + '&&(' + this.escape(property) + ' in ' + element + ')'); + } + return own[key]; + }, + + assign: function(id, value) { + if (!id) return; + this.current().body.push(id, '=', value, ';'); + return id; + }, + + filter: function(filterName) { + if (!this.state.filters.hasOwnProperty(filterName)) { + this.state.filters[filterName] = this.nextId(true); + } + return this.state.filters[filterName]; + }, + + ifDefined: function(id, defaultValue) { + return 'ifDefined(' + id + ',' + this.escape(defaultValue) + ')'; + }, + + plus: function(left, right) { + return 'plus(' + left + ',' + right + ')'; + }, + + return_: function(id) { + this.current().body.push('return ', id, ';'); + }, + + if_: function(test, alternate, consequent) { + if (test === true) { + alternate(); + } else { + var body = this.current().body; + body.push('if(', test, '){'); + alternate(); + body.push('}'); + if (consequent) { + body.push('else{'); + consequent(); + body.push('}'); + } + } + }, + + not: function(expression) { + return '!(' + expression + ')'; + }, + + isNull: function(expression) { + return expression + '==null'; + }, + + notNull: function(expression) { + return expression + '!=null'; + }, + + nonComputedMember: function(left, right) { + var SAFE_IDENTIFIER = /^[$_a-zA-Z][$_a-zA-Z0-9]*$/; + var UNSAFE_CHARACTERS = /[^$_a-zA-Z0-9]/g; + if (SAFE_IDENTIFIER.test(right)) { + return left + '.' + right; + } else { + return left + '["' + right.replace(UNSAFE_CHARACTERS, this.stringEscapeFn) + '"]'; + } + }, + + computedMember: function(left, right) { + return left + '[' + right + ']'; + }, + + member: function(left, right, computed) { + if (computed) return this.computedMember(left, right); + return this.nonComputedMember(left, right); + }, + + getStringValue: function(item) { + this.assign(item, 'getStringValue(' + item + ')'); + }, + + lazyRecurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) { + var self = this; + return function() { + self.recurse(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck); + }; + }, + + lazyAssign: function(id, value) { + var self = this; + return function() { + self.assign(id, value); + }; + }, + + stringEscapeRegex: /[^ a-zA-Z0-9]/g, + + stringEscapeFn: function(c) { + return '\\u' + ('0000' + c.charCodeAt(0).toString(16)).slice(-4); + }, + + escape: function(value) { + if (isString(value)) return '\'' + value.replace(this.stringEscapeRegex, this.stringEscapeFn) + '\''; + if (isNumber(value)) return value.toString(); + if (value === true) return 'true'; + if (value === false) return 'false'; + if (value === null) return 'null'; + if (typeof value === 'undefined') return 'undefined'; + + throw $parseMinErr('esc', 'IMPOSSIBLE'); + }, + + nextId: function(skip, init) { + var id = 'v' + (this.state.nextId++); + if (!skip) { + this.current().vars.push(id + (init ? '=' + init : '')); + } + return id; + }, + + current: function() { + return this.state[this.state.computing]; + } +}; + + +function ASTInterpreter($filter) { + this.$filter = $filter; +} + +ASTInterpreter.prototype = { + compile: function(ast) { + var self = this; + findConstantAndWatchExpressions(ast, self.$filter); + var assignable; + var assign; + if ((assignable = assignableAST(ast))) { + assign = this.recurse(assignable); + } + var toWatch = getInputs(ast.body); + var inputs; + if (toWatch) { + inputs = []; + forEach(toWatch, function(watch, key) { + var input = self.recurse(watch); + input.isPure = watch.isPure; + watch.input = input; + inputs.push(input); + watch.watchId = key; + }); + } + var expressions = []; + forEach(ast.body, function(expression) { + expressions.push(self.recurse(expression.expression)); + }); + var fn = ast.body.length === 0 ? noop : + ast.body.length === 1 ? expressions[0] : + function(scope, locals) { + var lastValue; + forEach(expressions, function(exp) { + lastValue = exp(scope, locals); + }); + return lastValue; + }; + if (assign) { + fn.assign = function(scope, value, locals) { + return assign(scope, locals, value); + }; + } + if (inputs) { + fn.inputs = inputs; + } + return fn; + }, + + recurse: function(ast, context, create) { + var left, right, self = this, args; + if (ast.input) { + return this.inputs(ast.input, ast.watchId); + } + switch (ast.type) { + case AST.Literal: + return this.value(ast.value, context); + case AST.UnaryExpression: + right = this.recurse(ast.argument); + return this['unary' + ast.operator](right, context); + case AST.BinaryExpression: + left = this.recurse(ast.left); + right = this.recurse(ast.right); + return this['binary' + ast.operator](left, right, context); + case AST.LogicalExpression: + left = this.recurse(ast.left); + right = this.recurse(ast.right); + return this['binary' + ast.operator](left, right, context); + case AST.ConditionalExpression: + return this['ternary?:']( + this.recurse(ast.test), + this.recurse(ast.alternate), + this.recurse(ast.consequent), + context + ); + case AST.Identifier: + return self.identifier(ast.name, context, create); + case AST.MemberExpression: + left = this.recurse(ast.object, false, !!create); + if (!ast.computed) { + right = ast.property.name; + } + if (ast.computed) right = this.recurse(ast.property); + return ast.computed ? + this.computedMember(left, right, context, create) : + this.nonComputedMember(left, right, context, create); + case AST.CallExpression: + args = []; + forEach(ast.arguments, function(expr) { + args.push(self.recurse(expr)); + }); + if (ast.filter) right = this.$filter(ast.callee.name); + if (!ast.filter) right = this.recurse(ast.callee, true); + return ast.filter ? + function(scope, locals, assign, inputs) { + var values = []; + for (var i = 0; i < args.length; ++i) { + values.push(args[i](scope, locals, assign, inputs)); + } + var value = right.apply(undefined, values, inputs); + return context ? {context: undefined, name: undefined, value: value} : value; + } : + function(scope, locals, assign, inputs) { + var rhs = right(scope, locals, assign, inputs); + var value; + if (rhs.value != null) { + var values = []; + for (var i = 0; i < args.length; ++i) { + values.push(args[i](scope, locals, assign, inputs)); + } + value = rhs.value.apply(rhs.context, values); + } + return context ? {value: value} : value; + }; + case AST.AssignmentExpression: + left = this.recurse(ast.left, true, 1); + right = this.recurse(ast.right); + return function(scope, locals, assign, inputs) { + var lhs = left(scope, locals, assign, inputs); + var rhs = right(scope, locals, assign, inputs); + lhs.context[lhs.name] = rhs; + return context ? {value: rhs} : rhs; + }; + case AST.ArrayExpression: + args = []; + forEach(ast.elements, function(expr) { + args.push(self.recurse(expr)); + }); + return function(scope, locals, assign, inputs) { + var value = []; + for (var i = 0; i < args.length; ++i) { + value.push(args[i](scope, locals, assign, inputs)); + } + return context ? {value: value} : value; + }; + case AST.ObjectExpression: + args = []; + forEach(ast.properties, function(property) { + if (property.computed) { + args.push({key: self.recurse(property.key), + computed: true, + value: self.recurse(property.value) + }); + } else { + args.push({key: property.key.type === AST.Identifier ? + property.key.name : + ('' + property.key.value), + computed: false, + value: self.recurse(property.value) + }); + } + }); + return function(scope, locals, assign, inputs) { + var value = {}; + for (var i = 0; i < args.length; ++i) { + if (args[i].computed) { + value[args[i].key(scope, locals, assign, inputs)] = args[i].value(scope, locals, assign, inputs); + } else { + value[args[i].key] = args[i].value(scope, locals, assign, inputs); + } + } + return context ? {value: value} : value; + }; + case AST.ThisExpression: + return function(scope) { + return context ? {value: scope} : scope; + }; + case AST.LocalsExpression: + return function(scope, locals) { + return context ? {value: locals} : locals; + }; + case AST.NGValueParameter: + return function(scope, locals, assign) { + return context ? {value: assign} : assign; + }; + } + }, + + 'unary+': function(argument, context) { + return function(scope, locals, assign, inputs) { + var arg = argument(scope, locals, assign, inputs); + if (isDefined(arg)) { + arg = +arg; + } else { + arg = 0; + } + return context ? {value: arg} : arg; + }; + }, + 'unary-': function(argument, context) { + return function(scope, locals, assign, inputs) { + var arg = argument(scope, locals, assign, inputs); + if (isDefined(arg)) { + arg = -arg; + } else { + arg = -0; + } + return context ? {value: arg} : arg; + }; + }, + 'unary!': function(argument, context) { + return function(scope, locals, assign, inputs) { + var arg = !argument(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary+': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var lhs = left(scope, locals, assign, inputs); + var rhs = right(scope, locals, assign, inputs); + var arg = plusFn(lhs, rhs); + return context ? {value: arg} : arg; + }; + }, + 'binary-': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var lhs = left(scope, locals, assign, inputs); + var rhs = right(scope, locals, assign, inputs); + var arg = (isDefined(lhs) ? lhs : 0) - (isDefined(rhs) ? rhs : 0); + return context ? {value: arg} : arg; + }; + }, + 'binary*': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) * right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary/': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) / right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary%': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) % right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary===': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) === right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary!==': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) !== right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary==': function(left, right, context) { + return function(scope, locals, assign, inputs) { + // eslint-disable-next-line eqeqeq + var arg = left(scope, locals, assign, inputs) == right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary!=': function(left, right, context) { + return function(scope, locals, assign, inputs) { + // eslint-disable-next-line eqeqeq + var arg = left(scope, locals, assign, inputs) != right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary<': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) < right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary>': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) > right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary<=': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) <= right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary>=': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) >= right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary&&': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) && right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary||': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) || right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'ternary?:': function(test, alternate, consequent, context) { + return function(scope, locals, assign, inputs) { + var arg = test(scope, locals, assign, inputs) ? alternate(scope, locals, assign, inputs) : consequent(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + value: function(value, context) { + return function() { return context ? {context: undefined, name: undefined, value: value} : value; }; + }, + identifier: function(name, context, create) { + return function(scope, locals, assign, inputs) { + var base = locals && (name in locals) ? locals : scope; + if (create && create !== 1 && base && base[name] == null) { + base[name] = {}; + } + var value = base ? base[name] : undefined; + if (context) { + return {context: base, name: name, value: value}; + } else { + return value; + } + }; + }, + computedMember: function(left, right, context, create) { + return function(scope, locals, assign, inputs) { + var lhs = left(scope, locals, assign, inputs); + var rhs; + var value; + if (lhs != null) { + rhs = right(scope, locals, assign, inputs); + rhs = getStringValue(rhs); + if (create && create !== 1) { + if (lhs && !(lhs[rhs])) { + lhs[rhs] = {}; + } + } + value = lhs[rhs]; + } + if (context) { + return {context: lhs, name: rhs, value: value}; + } else { + return value; + } + }; + }, + nonComputedMember: function(left, right, context, create) { + return function(scope, locals, assign, inputs) { + var lhs = left(scope, locals, assign, inputs); + if (create && create !== 1) { + if (lhs && lhs[right] == null) { + lhs[right] = {}; + } + } + var value = lhs != null ? lhs[right] : undefined; + if (context) { + return {context: lhs, name: right, value: value}; + } else { + return value; + } + }; + }, + inputs: function(input, watchId) { + return function(scope, value, locals, inputs) { + if (inputs) return inputs[watchId]; + return input(scope, value, locals); + }; + } +}; + +/** + * @constructor + */ +function Parser(lexer, $filter, options) { + this.ast = new AST(lexer, options); + this.astCompiler = options.csp ? new ASTInterpreter($filter) : + new ASTCompiler($filter); +} + +Parser.prototype = { + constructor: Parser, + + parse: function(text) { + var ast = this.ast.ast(text); + var fn = this.astCompiler.compile(ast); + fn.literal = isLiteral(ast); + fn.constant = isConstant(ast); + return fn; + } +}; + +function getValueOf(value) { + return isFunction(value.valueOf) ? value.valueOf() : objectValueOf.call(value); +} + +/////////////////////////////////// + +/** + * @ngdoc service + * @name $parse + * @kind function + * + * @description + * + * Converts Angular {@link guide/expression expression} into a function. + * + * ```js + * var getter = $parse('user.name'); + * var setter = getter.assign; + * var context = {user:{name:'angular'}}; + * var locals = {user:{name:'local'}}; + * + * expect(getter(context)).toEqual('angular'); + * setter(context, 'newValue'); + * expect(context.user.name).toEqual('newValue'); + * expect(getter(context, locals)).toEqual('local'); + * ``` + * + * + * @param {string} expression String expression to compile. + * @returns {function(context, locals)} a function which represents the compiled expression: + * + * * `context` – `{object}` – an object against which any expressions embedded in the strings + * are evaluated against (typically a scope object). + * * `locals` – `{object=}` – local variables context object, useful for overriding values in + * `context`. + * + * The returned function also has the following properties: + * * `literal` – `{boolean}` – whether the expression's top-level node is a JavaScript + * literal. + * * `constant` – `{boolean}` – whether the expression is made entirely of JavaScript + * constant literals. + * * `assign` – `{?function(context, value)}` – if the expression is assignable, this will be + * set to a function to change its value on the given context. + * + */ + + +/** + * @ngdoc provider + * @name $parseProvider + * @this + * + * @description + * `$parseProvider` can be used for configuring the default behavior of the {@link ng.$parse $parse} + * service. + */ +function $ParseProvider() { + var cache = createMap(); + var literals = { + 'true': true, + 'false': false, + 'null': null, + 'undefined': undefined + }; + var identStart, identContinue; + + /** + * @ngdoc method + * @name $parseProvider#addLiteral + * @description + * + * Configure $parse service to add literal values that will be present as literal at expressions. + * + * @param {string} literalName Token for the literal value. The literal name value must be a valid literal name. + * @param {*} literalValue Value for this literal. All literal values must be primitives or `undefined`. + * + **/ + this.addLiteral = function(literalName, literalValue) { + literals[literalName] = literalValue; + }; + + /** + * @ngdoc method + * @name $parseProvider#setIdentifierFns + * + * @description + * + * Allows defining the set of characters that are allowed in Angular expressions. The function + * `identifierStart` will get called to know if a given character is a valid character to be the + * first character for an identifier. The function `identifierContinue` will get called to know if + * a given character is a valid character to be a follow-up identifier character. The functions + * `identifierStart` and `identifierContinue` will receive as arguments the single character to be + * identifier and the character code point. These arguments will be `string` and `numeric`. Keep in + * mind that the `string` parameter can be two characters long depending on the character + * representation. It is expected for the function to return `true` or `false`, whether that + * character is allowed or not. + * + * Since this function will be called extensively, keep the implementation of these functions fast, + * as the performance of these functions have a direct impact on the expressions parsing speed. + * + * @param {function=} identifierStart The function that will decide whether the given character is + * a valid identifier start character. + * @param {function=} identifierContinue The function that will decide whether the given character is + * a valid identifier continue character. + */ + this.setIdentifierFns = function(identifierStart, identifierContinue) { + identStart = identifierStart; + identContinue = identifierContinue; + return this; + }; + + this.$get = ['$filter', function($filter) { + var noUnsafeEval = csp().noUnsafeEval; + var $parseOptions = { + csp: noUnsafeEval, + literals: copy(literals), + isIdentifierStart: isFunction(identStart) && identStart, + isIdentifierContinue: isFunction(identContinue) && identContinue + }; + return $parse; + + function $parse(exp, interceptorFn) { + var parsedExpression, oneTime, cacheKey; + + switch (typeof exp) { + case 'string': + exp = exp.trim(); + cacheKey = exp; + + parsedExpression = cache[cacheKey]; + + if (!parsedExpression) { + if (exp.charAt(0) === ':' && exp.charAt(1) === ':') { + oneTime = true; + exp = exp.substring(2); + } + var lexer = new Lexer($parseOptions); + var parser = new Parser(lexer, $filter, $parseOptions); + parsedExpression = parser.parse(exp); + if (parsedExpression.constant) { + parsedExpression.$$watchDelegate = constantWatchDelegate; + } else if (oneTime) { + parsedExpression.$$watchDelegate = parsedExpression.literal ? + oneTimeLiteralWatchDelegate : oneTimeWatchDelegate; + } else if (parsedExpression.inputs) { + parsedExpression.$$watchDelegate = inputsWatchDelegate; + } + cache[cacheKey] = parsedExpression; + } + return addInterceptor(parsedExpression, interceptorFn); + + case 'function': + return addInterceptor(exp, interceptorFn); + + default: + return addInterceptor(noop, interceptorFn); + } + } + + function expressionInputDirtyCheck(newValue, oldValueOfValue, compareObjectIdentity) { + + if (newValue == null || oldValueOfValue == null) { // null/undefined + return newValue === oldValueOfValue; + } + + if (typeof newValue === 'object') { + + // attempt to convert the value to a primitive type + // TODO(docs): add a note to docs that by implementing valueOf even objects and arrays can + // be cheaply dirty-checked + newValue = getValueOf(newValue); + + if (typeof newValue === 'object' && !compareObjectIdentity) { + // objects/arrays are not supported - deep-watching them would be too expensive + return false; + } + + // fall-through to the primitive equality check + } + + //Primitive or NaN + // eslint-disable-next-line no-self-compare + return newValue === oldValueOfValue || (newValue !== newValue && oldValueOfValue !== oldValueOfValue); + } + + function inputsWatchDelegate(scope, listener, objectEquality, parsedExpression, prettyPrintExpression) { + var inputExpressions = parsedExpression.inputs; + var lastResult; + + if (inputExpressions.length === 1) { + var oldInputValueOf = expressionInputDirtyCheck; // init to something unique so that equals check fails + inputExpressions = inputExpressions[0]; + return scope.$watch(function expressionInputWatch(scope) { + var newInputValue = inputExpressions(scope); + if (!expressionInputDirtyCheck(newInputValue, oldInputValueOf, inputExpressions.isPure)) { + lastResult = parsedExpression(scope, undefined, undefined, [newInputValue]); + oldInputValueOf = newInputValue && getValueOf(newInputValue); + } + return lastResult; + }, listener, objectEquality, prettyPrintExpression); + } + + var oldInputValueOfValues = []; + var oldInputValues = []; + for (var i = 0, ii = inputExpressions.length; i < ii; i++) { + oldInputValueOfValues[i] = expressionInputDirtyCheck; // init to something unique so that equals check fails + oldInputValues[i] = null; + } + + return scope.$watch(function expressionInputsWatch(scope) { + var changed = false; + + for (var i = 0, ii = inputExpressions.length; i < ii; i++) { + var newInputValue = inputExpressions[i](scope); + if (changed || (changed = !expressionInputDirtyCheck(newInputValue, oldInputValueOfValues[i], inputExpressions[i].isPure))) { + oldInputValues[i] = newInputValue; + oldInputValueOfValues[i] = newInputValue && getValueOf(newInputValue); + } + } + + if (changed) { + lastResult = parsedExpression(scope, undefined, undefined, oldInputValues); + } + + return lastResult; + }, listener, objectEquality, prettyPrintExpression); + } + + function oneTimeWatchDelegate(scope, listener, objectEquality, parsedExpression, prettyPrintExpression) { + var unwatch, lastValue; + if (parsedExpression.inputs) { + unwatch = inputsWatchDelegate(scope, oneTimeListener, objectEquality, parsedExpression, prettyPrintExpression); + } else { + unwatch = scope.$watch(oneTimeWatch, oneTimeListener, objectEquality); + } + return unwatch; + + function oneTimeWatch(scope) { + return parsedExpression(scope); + } + function oneTimeListener(value, old, scope) { + lastValue = value; + if (isFunction(listener)) { + listener(value, old, scope); + } + if (isDefined(value)) { + scope.$$postDigest(function() { + if (isDefined(lastValue)) { + unwatch(); + } + }); + } + } + } + + function oneTimeLiteralWatchDelegate(scope, listener, objectEquality, parsedExpression) { + var unwatch, lastValue; + unwatch = scope.$watch(function oneTimeWatch(scope) { + return parsedExpression(scope); + }, function oneTimeListener(value, old, scope) { + lastValue = value; + if (isFunction(listener)) { + listener(value, old, scope); + } + if (isAllDefined(value)) { + scope.$$postDigest(function() { + if (isAllDefined(lastValue)) unwatch(); + }); + } + }, objectEquality); + + return unwatch; + + function isAllDefined(value) { + var allDefined = true; + forEach(value, function(val) { + if (!isDefined(val)) allDefined = false; + }); + return allDefined; + } + } + + function constantWatchDelegate(scope, listener, objectEquality, parsedExpression) { + var unwatch = scope.$watch(function constantWatch(scope) { + unwatch(); + return parsedExpression(scope); + }, listener, objectEquality); + return unwatch; + } + + function addInterceptor(parsedExpression, interceptorFn) { + if (!interceptorFn) return parsedExpression; + var watchDelegate = parsedExpression.$$watchDelegate; + var useInputs = false; + + var regularWatch = + watchDelegate !== oneTimeLiteralWatchDelegate && + watchDelegate !== oneTimeWatchDelegate; + + var fn = regularWatch ? function regularInterceptedExpression(scope, locals, assign, inputs) { + var value = useInputs && inputs ? inputs[0] : parsedExpression(scope, locals, assign, inputs); + return interceptorFn(value, scope, locals); + } : function oneTimeInterceptedExpression(scope, locals, assign, inputs) { + var value = parsedExpression(scope, locals, assign, inputs); + var result = interceptorFn(value, scope, locals); + // we only return the interceptor's result if the + // initial value is defined (for bind-once) + return isDefined(value) ? result : value; + }; + + // Propagate $$watchDelegates other then inputsWatchDelegate + useInputs = !parsedExpression.inputs; + if (watchDelegate && watchDelegate !== inputsWatchDelegate) { + fn.$$watchDelegate = watchDelegate; + fn.inputs = parsedExpression.inputs; + } else if (!interceptorFn.$stateful) { + // Treat interceptor like filters - assume non-stateful by default and use the inputsWatchDelegate + fn.$$watchDelegate = inputsWatchDelegate; + fn.inputs = parsedExpression.inputs ? parsedExpression.inputs : [parsedExpression]; + } + + if (fn.inputs) { + fn.inputs = fn.inputs.map(function(e) { + // Remove the isPure flag of inputs when it is not absolute because they are now wrapped in a + // potentially non-pure interceptor function. + if (e.isPure === PURITY_RELATIVE) { + return function depurifier(s) { return e(s); }; + } + return e; + }); + } + + return fn; + } + }]; +} + +/** + * @ngdoc service + * @name $q + * @requires $rootScope + * + * @description + * A service that helps you run functions asynchronously, and use their return values (or exceptions) + * when they are done processing. + * + * This is a [Promises/A+](https://promisesaplus.com/)-compliant implementation of promises/deferred + * objects inspired by [Kris Kowal's Q](https://github.com/kriskowal/q). + * + * $q can be used in two fashions --- one which is more similar to Kris Kowal's Q or jQuery's Deferred + * implementations, and the other which resembles ES6 (ES2015) promises to some degree. + * + * # $q constructor + * + * The streamlined ES6 style promise is essentially just using $q as a constructor which takes a `resolver` + * function as the first argument. This is similar to the native Promise implementation from ES6, + * see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). + * + * While the constructor-style use is supported, not all of the supporting methods from ES6 promises are + * available yet. + * + * It can be used like so: + * + * ```js + * // for the purpose of this example let's assume that variables `$q` and `okToGreet` + * // are available in the current lexical scope (they could have been injected or passed in). + * + * function asyncGreet(name) { + * // perform some asynchronous operation, resolve or reject the promise when appropriate. + * return $q(function(resolve, reject) { + * setTimeout(function() { + * if (okToGreet(name)) { + * resolve('Hello, ' + name + '!'); + * } else { + * reject('Greeting ' + name + ' is not allowed.'); + * } + * }, 1000); + * }); + * } + * + * var promise = asyncGreet('Robin Hood'); + * promise.then(function(greeting) { + * alert('Success: ' + greeting); + * }, function(reason) { + * alert('Failed: ' + reason); + * }); + * ``` + * + * Note: progress/notify callbacks are not currently supported via the ES6-style interface. + * + * Note: unlike ES6 behavior, an exception thrown in the constructor function will NOT implicitly reject the promise. + * + * However, the more traditional CommonJS-style usage is still available, and documented below. + * + * [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an + * interface for interacting with an object that represents the result of an action that is + * performed asynchronously, and may or may not be finished at any given point in time. + * + * From the perspective of dealing with error handling, deferred and promise APIs are to + * asynchronous programming what `try`, `catch` and `throw` keywords are to synchronous programming. + * + * ```js + * // for the purpose of this example let's assume that variables `$q` and `okToGreet` + * // are available in the current lexical scope (they could have been injected or passed in). + * + * function asyncGreet(name) { + * var deferred = $q.defer(); + * + * setTimeout(function() { + * deferred.notify('About to greet ' + name + '.'); + * + * if (okToGreet(name)) { + * deferred.resolve('Hello, ' + name + '!'); + * } else { + * deferred.reject('Greeting ' + name + ' is not allowed.'); + * } + * }, 1000); + * + * return deferred.promise; + * } + * + * var promise = asyncGreet('Robin Hood'); + * promise.then(function(greeting) { + * alert('Success: ' + greeting); + * }, function(reason) { + * alert('Failed: ' + reason); + * }, function(update) { + * alert('Got notification: ' + update); + * }); + * ``` + * + * At first it might not be obvious why this extra complexity is worth the trouble. The payoff + * comes in the way of guarantees that promise and deferred APIs make, see + * https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md. + * + * Additionally the promise api allows for composition that is very hard to do with the + * traditional callback ([CPS](http://en.wikipedia.org/wiki/Continuation-passing_style)) approach. + * For more on this please see the [Q documentation](https://github.com/kriskowal/q) especially the + * section on serial or parallel joining of promises. + * + * # The Deferred API + * + * A new instance of deferred is constructed by calling `$q.defer()`. + * + * The purpose of the deferred object is to expose the associated Promise instance as well as APIs + * that can be used for signaling the successful or unsuccessful completion, as well as the status + * of the task. + * + * **Methods** + * + * - `resolve(value)` – resolves the derived promise with the `value`. If the value is a rejection + * constructed via `$q.reject`, the promise will be rejected instead. + * - `reject(reason)` – rejects the derived promise with the `reason`. This is equivalent to + * resolving it with a rejection constructed via `$q.reject`. + * - `notify(value)` - provides updates on the status of the promise's execution. This may be called + * multiple times before the promise is either resolved or rejected. + * + * **Properties** + * + * - promise – `{Promise}` – promise object associated with this deferred. + * + * + * # The Promise API + * + * A new promise instance is created when a deferred instance is created and can be retrieved by + * calling `deferred.promise`. + * + * The purpose of the promise object is to allow for interested parties to get access to the result + * of the deferred task when it completes. + * + * **Methods** + * + * - `then(successCallback, [errorCallback], [notifyCallback])` – regardless of when the promise was or + * will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously + * as soon as the result is available. The callbacks are called with a single argument: the result + * or rejection reason. Additionally, the notify callback may be called zero or more times to + * provide a progress indication, before the promise is resolved or rejected. + * + * This method *returns a new promise* which is resolved or rejected via the return value of the + * `successCallback`, `errorCallback` (unless that value is a promise, in which case it is resolved + * with the value which is resolved in that promise using + * [promise chaining](http://www.html5rocks.com/en/tutorials/es6/promises/#toc-promises-queues)). + * It also notifies via the return value of the `notifyCallback` method. The promise cannot be + * resolved or rejected from the notifyCallback method. The errorCallback and notifyCallback + * arguments are optional. + * + * - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)` + * + * - `finally(callback, notifyCallback)` – allows you to observe either the fulfillment or rejection of a promise, + * but to do so without modifying the final value. This is useful to release resources or do some + * clean-up that needs to be done whether the promise was rejected or resolved. See the [full + * specification](https://github.com/kriskowal/q/wiki/API-Reference#promisefinallycallback) for + * more information. + * + * # Chaining promises + * + * Because calling the `then` method of a promise returns a new derived promise, it is easily + * possible to create a chain of promises: + * + * ```js + * promiseB = promiseA.then(function(result) { + * return result + 1; + * }); + * + * // promiseB will be resolved immediately after promiseA is resolved and its value + * // will be the result of promiseA incremented by 1 + * ``` + * + * It is possible to create chains of any length and since a promise can be resolved with another + * promise (which will defer its resolution further), it is possible to pause/defer resolution of + * the promises at any point in the chain. This makes it possible to implement powerful APIs like + * $http's response interceptors. + * + * + * # Differences between Kris Kowal's Q and $q + * + * There are two main differences: + * + * - $q is integrated with the {@link ng.$rootScope.Scope} Scope model observation + * mechanism in angular, which means faster propagation of resolution or rejection into your + * models and avoiding unnecessary browser repaints, which would result in flickering UI. + * - Q has many more features than $q, but that comes at a cost of bytes. $q is tiny, but contains + * all the important functionality needed for common async tasks. + * + * # Testing + * + * ```js + * it('should simulate promise', inject(function($q, $rootScope) { + * var deferred = $q.defer(); + * var promise = deferred.promise; + * var resolvedValue; + * + * promise.then(function(value) { resolvedValue = value; }); + * expect(resolvedValue).toBeUndefined(); + * + * // Simulate resolving of promise + * deferred.resolve(123); + * // Note that the 'then' function does not get called synchronously. + * // This is because we want the promise API to always be async, whether or not + * // it got called synchronously or asynchronously. + * expect(resolvedValue).toBeUndefined(); + * + * // Propagate promise resolution to 'then' functions using $apply(). + * $rootScope.$apply(); + * expect(resolvedValue).toEqual(123); + * })); + * ``` + * + * @param {function(function, function)} resolver Function which is responsible for resolving or + * rejecting the newly created promise. The first parameter is a function which resolves the + * promise, the second parameter is a function which rejects the promise. + * + * @returns {Promise} The newly created promise. + */ +/** + * @ngdoc provider + * @name $qProvider + * @this + * + * @description + */ +function $QProvider() { + var errorOnUnhandledRejections = true; + this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) { + return qFactory(function(callback) { + $rootScope.$evalAsync(callback); + }, $exceptionHandler, errorOnUnhandledRejections); + }]; + + /** + * @ngdoc method + * @name $qProvider#errorOnUnhandledRejections + * @kind function + * + * @description + * Retrieves or overrides whether to generate an error when a rejected promise is not handled. + * This feature is enabled by default. + * + * @param {boolean=} value Whether to generate an error when a rejected promise is not handled. + * @returns {boolean|ng.$qProvider} Current value when called without a new value or self for + * chaining otherwise. + */ + this.errorOnUnhandledRejections = function(value) { + if (isDefined(value)) { + errorOnUnhandledRejections = value; + return this; + } else { + return errorOnUnhandledRejections; + } + }; +} + +/** @this */ +function $$QProvider() { + var errorOnUnhandledRejections = true; + this.$get = ['$browser', '$exceptionHandler', function($browser, $exceptionHandler) { + return qFactory(function(callback) { + $browser.defer(callback); + }, $exceptionHandler, errorOnUnhandledRejections); + }]; + + this.errorOnUnhandledRejections = function(value) { + if (isDefined(value)) { + errorOnUnhandledRejections = value; + return this; + } else { + return errorOnUnhandledRejections; + } + }; +} + +/** + * Constructs a promise manager. + * + * @param {function(function)} nextTick Function for executing functions in the next turn. + * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for + * debugging purposes. + * @param {boolean=} errorOnUnhandledRejections Whether an error should be generated on unhandled + * promises rejections. + * @returns {object} Promise manager. + */ +function qFactory(nextTick, exceptionHandler, errorOnUnhandledRejections) { + var $qMinErr = minErr('$q', TypeError); + var queueSize = 0; + var checkQueue = []; + + /** + * @ngdoc method + * @name ng.$q#defer + * @kind function + * + * @description + * Creates a `Deferred` object which represents a task which will finish in the future. + * + * @returns {Deferred} Returns a new instance of deferred. + */ + function defer() { + return new Deferred(); + } + + function Deferred() { + var promise = this.promise = new Promise(); + //Non prototype methods necessary to support unbound execution :/ + this.resolve = function(val) { resolvePromise(promise, val); }; + this.reject = function(reason) { rejectPromise(promise, reason); }; + this.notify = function(progress) { notifyPromise(promise, progress); }; + } + + + function Promise() { + this.$$state = { status: 0 }; + } + + extend(Promise.prototype, { + then: function(onFulfilled, onRejected, progressBack) { + if (isUndefined(onFulfilled) && isUndefined(onRejected) && isUndefined(progressBack)) { + return this; + } + var result = new Promise(); + + this.$$state.pending = this.$$state.pending || []; + this.$$state.pending.push([result, onFulfilled, onRejected, progressBack]); + if (this.$$state.status > 0) scheduleProcessQueue(this.$$state); + + return result; + }, + + 'catch': function(callback) { + return this.then(null, callback); + }, + + 'finally': function(callback, progressBack) { + return this.then(function(value) { + return handleCallback(value, resolve, callback); + }, function(error) { + return handleCallback(error, reject, callback); + }, progressBack); + } + }); + + function processQueue(state) { + var fn, promise, pending; + + pending = state.pending; + state.processScheduled = false; + state.pending = undefined; + try { + for (var i = 0, ii = pending.length; i < ii; ++i) { + markQStateExceptionHandled(state); + promise = pending[i][0]; + fn = pending[i][state.status]; + try { + if (isFunction(fn)) { + resolvePromise(promise, fn(state.value)); + } else if (state.status === 1) { + resolvePromise(promise, state.value); + } else { + rejectPromise(promise, state.value); + } + } catch (e) { + rejectPromise(promise, e); + } + } + } finally { + --queueSize; + if (errorOnUnhandledRejections && queueSize === 0) { + nextTick(processChecks); + } + } + } + + function processChecks() { + // eslint-disable-next-line no-unmodified-loop-condition + while (!queueSize && checkQueue.length) { + var toCheck = checkQueue.shift(); + if (!isStateExceptionHandled(toCheck)) { + markQStateExceptionHandled(toCheck); + var errorMessage = 'Possibly unhandled rejection: ' + toDebugString(toCheck.value); + if (isError(toCheck.value)) { + exceptionHandler(toCheck.value, errorMessage); + } else { + exceptionHandler(errorMessage); + } + } + } + } + + function scheduleProcessQueue(state) { + if (errorOnUnhandledRejections && !state.pending && state.status === 2 && !isStateExceptionHandled(state)) { + if (queueSize === 0 && checkQueue.length === 0) { + nextTick(processChecks); + } + checkQueue.push(state); + } + if (state.processScheduled || !state.pending) return; + state.processScheduled = true; + ++queueSize; + nextTick(function() { processQueue(state); }); + } + + function resolvePromise(promise, val) { + if (promise.$$state.status) return; + if (val === promise) { + $$reject(promise, $qMinErr( + 'qcycle', + 'Expected promise to be resolved with value other than itself \'{0}\'', + val)); + } else { + $$resolve(promise, val); + } + + } + + function $$resolve(promise, val) { + var then; + var done = false; + try { + if (isObject(val) || isFunction(val)) then = val.then; + if (isFunction(then)) { + promise.$$state.status = -1; + then.call(val, doResolve, doReject, doNotify); + } else { + promise.$$state.value = val; + promise.$$state.status = 1; + scheduleProcessQueue(promise.$$state); + } + } catch (e) { + doReject(e); + } + + function doResolve(val) { + if (done) return; + done = true; + $$resolve(promise, val); + } + function doReject(val) { + if (done) return; + done = true; + $$reject(promise, val); + } + function doNotify(progress) { + notifyPromise(promise, progress); + } + } + + function rejectPromise(promise, reason) { + if (promise.$$state.status) return; + $$reject(promise, reason); + } + + function $$reject(promise, reason) { + promise.$$state.value = reason; + promise.$$state.status = 2; + scheduleProcessQueue(promise.$$state); + } + + function notifyPromise(promise, progress) { + var callbacks = promise.$$state.pending; + + if ((promise.$$state.status <= 0) && callbacks && callbacks.length) { + nextTick(function() { + var callback, result; + for (var i = 0, ii = callbacks.length; i < ii; i++) { + result = callbacks[i][0]; + callback = callbacks[i][3]; + try { + notifyPromise(result, isFunction(callback) ? callback(progress) : progress); + } catch (e) { + exceptionHandler(e); + } + } + }); + } + } + + /** + * @ngdoc method + * @name $q#reject + * @kind function + * + * @description + * Creates a promise that is resolved as rejected with the specified `reason`. This api should be + * used to forward rejection in a chain of promises. If you are dealing with the last promise in + * a promise chain, you don't need to worry about it. + * + * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of + * `reject` as the `throw` keyword in JavaScript. This also means that if you "catch" an error via + * a promise error callback and you want to forward the error to the promise derived from the + * current promise, you have to "rethrow" the error by returning a rejection constructed via + * `reject`. + * + * ```js + * promiseB = promiseA.then(function(result) { + * // success: do something and resolve promiseB + * // with the old or a new result + * return result; + * }, function(reason) { + * // error: handle the error if possible and + * // resolve promiseB with newPromiseOrValue, + * // otherwise forward the rejection to promiseB + * if (canHandle(reason)) { + * // handle the error and recover + * return newPromiseOrValue; + * } + * return $q.reject(reason); + * }); + * ``` + * + * @param {*} reason Constant, message, exception or an object representing the rejection reason. + * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`. + */ + function reject(reason) { + var result = new Promise(); + rejectPromise(result, reason); + return result; + } + + function handleCallback(value, resolver, callback) { + var callbackOutput = null; + try { + if (isFunction(callback)) callbackOutput = callback(); + } catch (e) { + return reject(e); + } + if (isPromiseLike(callbackOutput)) { + return callbackOutput.then(function() { + return resolver(value); + }, reject); + } else { + return resolver(value); + } + } + + /** + * @ngdoc method + * @name $q#when + * @kind function + * + * @description + * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. + * This is useful when you are dealing with an object that might or might not be a promise, or if + * the promise comes from a source that can't be trusted. + * + * @param {*} value Value or a promise + * @param {Function=} successCallback + * @param {Function=} errorCallback + * @param {Function=} progressCallback + * @returns {Promise} Returns a promise of the passed value or promise + */ + + + function when(value, callback, errback, progressBack) { + var result = new Promise(); + resolvePromise(result, value); + return result.then(callback, errback, progressBack); + } + + /** + * @ngdoc method + * @name $q#resolve + * @kind function + * + * @description + * Alias of {@link ng.$q#when when} to maintain naming consistency with ES6. + * + * @param {*} value Value or a promise + * @param {Function=} successCallback + * @param {Function=} errorCallback + * @param {Function=} progressCallback + * @returns {Promise} Returns a promise of the passed value or promise + */ + var resolve = when; + + /** + * @ngdoc method + * @name $q#all + * @kind function + * + * @description + * Combines multiple promises into a single promise that is resolved when all of the input + * promises are resolved. + * + * @param {Array.|Object.} promises An array or hash of promises. + * @returns {Promise} Returns a single promise that will be resolved with an array/hash of values, + * each value corresponding to the promise at the same index/key in the `promises` array/hash. + * If any of the promises is resolved with a rejection, this resulting promise will be rejected + * with the same rejection value. + */ + + function all(promises) { + var result = new Promise(), + counter = 0, + results = isArray(promises) ? [] : {}; + + forEach(promises, function(promise, key) { + counter++; + when(promise).then(function(value) { + results[key] = value; + if (!(--counter)) resolvePromise(result, results); + }, function(reason) { + rejectPromise(result, reason); + }); + }); + + if (counter === 0) { + resolvePromise(result, results); + } + + return result; + } + + /** + * @ngdoc method + * @name $q#race + * @kind function + * + * @description + * Returns a promise that resolves or rejects as soon as one of those promises + * resolves or rejects, with the value or reason from that promise. + * + * @param {Array.|Object.} promises An array or hash of promises. + * @returns {Promise} a promise that resolves or rejects as soon as one of the `promises` + * resolves or rejects, with the value or reason from that promise. + */ + + function race(promises) { + var deferred = defer(); + + forEach(promises, function(promise) { + when(promise).then(deferred.resolve, deferred.reject); + }); + + return deferred.promise; + } + + function $Q(resolver) { + if (!isFunction(resolver)) { + throw $qMinErr('norslvr', 'Expected resolverFn, got \'{0}\'', resolver); + } + + var promise = new Promise(); + + function resolveFn(value) { + resolvePromise(promise, value); + } + + function rejectFn(reason) { + rejectPromise(promise, reason); + } + + resolver(resolveFn, rejectFn); + + return promise; + } + + // Let's make the instanceof operator work for promises, so that + // `new $q(fn) instanceof $q` would evaluate to true. + $Q.prototype = Promise.prototype; + + $Q.defer = defer; + $Q.reject = reject; + $Q.when = when; + $Q.resolve = resolve; + $Q.all = all; + $Q.race = race; + + return $Q; +} + +function isStateExceptionHandled(state) { + return !!state.pur; +} +function markQStateExceptionHandled(state) { + state.pur = true; +} +function markQExceptionHandled(q) { + markQStateExceptionHandled(q.$$state); +} + +/** @this */ +function $$RAFProvider() { //rAF + this.$get = ['$window', '$timeout', function($window, $timeout) { + var requestAnimationFrame = $window.requestAnimationFrame || + $window.webkitRequestAnimationFrame; + + var cancelAnimationFrame = $window.cancelAnimationFrame || + $window.webkitCancelAnimationFrame || + $window.webkitCancelRequestAnimationFrame; + + var rafSupported = !!requestAnimationFrame; + var raf = rafSupported + ? function(fn) { + var id = requestAnimationFrame(fn); + return function() { + cancelAnimationFrame(id); + }; + } + : function(fn) { + var timer = $timeout(fn, 16.66, false); // 1000 / 60 = 16.666 + return function() { + $timeout.cancel(timer); + }; + }; + + raf.supported = rafSupported; + + return raf; + }]; +} + +/** + * DESIGN NOTES + * + * The design decisions behind the scope are heavily favored for speed and memory consumption. + * + * The typical use of scope is to watch the expressions, which most of the time return the same + * value as last time so we optimize the operation. + * + * Closures construction is expensive in terms of speed as well as memory: + * - No closures, instead use prototypical inheritance for API + * - Internal state needs to be stored on scope directly, which means that private state is + * exposed as $$____ properties + * + * Loop operations are optimized by using while(count--) { ... } + * - This means that in order to keep the same order of execution as addition we have to add + * items to the array at the beginning (unshift) instead of at the end (push) + * + * Child scopes are created and removed often + * - Using an array would be slow since inserts in the middle are expensive; so we use linked lists + * + * There are fewer watches than observers. This is why you don't want the observer to be implemented + * in the same way as watch. Watch requires return of the initialization function which is expensive + * to construct. + */ + + +/** + * @ngdoc provider + * @name $rootScopeProvider + * @description + * + * Provider for the $rootScope service. + */ + +/** + * @ngdoc method + * @name $rootScopeProvider#digestTtl + * @description + * + * Sets the number of `$digest` iterations the scope should attempt to execute before giving up and + * assuming that the model is unstable. + * + * The current default is 10 iterations. + * + * In complex applications it's possible that the dependencies between `$watch`s will result in + * several digest iterations. However if an application needs more than the default 10 digest + * iterations for its model to stabilize then you should investigate what is causing the model to + * continuously change during the digest. + * + * Increasing the TTL could have performance implications, so you should not change it without + * proper justification. + * + * @param {number} limit The number of digest iterations. + */ + + +/** + * @ngdoc service + * @name $rootScope + * @this + * + * @description + * + * Every application has a single root {@link ng.$rootScope.Scope scope}. + * All other scopes are descendant scopes of the root scope. Scopes provide separation + * between the model and the view, via a mechanism for watching the model for changes. + * They also provide event emission/broadcast and subscription facility. See the + * {@link guide/scope developer guide on scopes}. + */ +function $RootScopeProvider() { + var TTL = 10; + var $rootScopeMinErr = minErr('$rootScope'); + var lastDirtyWatch = null; + var applyAsyncId = null; + + this.digestTtl = function(value) { + if (arguments.length) { + TTL = value; + } + return TTL; + }; + + function createChildScopeClass(parent) { + function ChildScope() { + this.$$watchers = this.$$nextSibling = + this.$$childHead = this.$$childTail = null; + this.$$listeners = {}; + this.$$listenerCount = {}; + this.$$watchersCount = 0; + this.$id = nextUid(); + this.$$ChildScope = null; + } + ChildScope.prototype = parent; + return ChildScope; + } + + this.$get = ['$exceptionHandler', '$parse', '$browser', + function($exceptionHandler, $parse, $browser) { + + function destroyChildScope($event) { + $event.currentScope.$$destroyed = true; + } + + function cleanUpScope($scope) { + + // Support: IE 9 only + if (msie === 9) { + // There is a memory leak in IE9 if all child scopes are not disconnected + // completely when a scope is destroyed. So this code will recurse up through + // all this scopes children + // + // See issue https://github.com/angular/angular.js/issues/10706 + if ($scope.$$childHead) { + cleanUpScope($scope.$$childHead); + } + if ($scope.$$nextSibling) { + cleanUpScope($scope.$$nextSibling); + } + } + + // The code below works around IE9 and V8's memory leaks + // + // See: + // - https://code.google.com/p/v8/issues/detail?id=2073#c26 + // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909 + // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451 + + $scope.$parent = $scope.$$nextSibling = $scope.$$prevSibling = $scope.$$childHead = + $scope.$$childTail = $scope.$root = $scope.$$watchers = null; + } + + /** + * @ngdoc type + * @name $rootScope.Scope + * + * @description + * A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the + * {@link auto.$injector $injector}. Child scopes are created using the + * {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when + * compiled HTML template is executed.) See also the {@link guide/scope Scopes guide} for + * an in-depth introduction and usage examples. + * + * + * # Inheritance + * A scope can inherit from a parent scope, as in this example: + * ```js + var parent = $rootScope; + var child = parent.$new(); + + parent.salutation = "Hello"; + expect(child.salutation).toEqual('Hello'); + + child.salutation = "Welcome"; + expect(child.salutation).toEqual('Welcome'); + expect(parent.salutation).toEqual('Hello'); + * ``` + * + * When interacting with `Scope` in tests, additional helper methods are available on the + * instances of `Scope` type. See {@link ngMock.$rootScope.Scope ngMock Scope} for additional + * details. + * + * + * @param {Object.=} providers Map of service factory which need to be + * provided for the current scope. Defaults to {@link ng}. + * @param {Object.=} instanceCache Provides pre-instantiated services which should + * append/override services provided by `providers`. This is handy + * when unit-testing and having the need to override a default + * service. + * @returns {Object} Newly created scope. + * + */ + function Scope() { + this.$id = nextUid(); + this.$$phase = this.$parent = this.$$watchers = + this.$$nextSibling = this.$$prevSibling = + this.$$childHead = this.$$childTail = null; + this.$root = this; + this.$$destroyed = false; + this.$$listeners = {}; + this.$$listenerCount = {}; + this.$$watchersCount = 0; + this.$$isolateBindings = null; + } + + /** + * @ngdoc property + * @name $rootScope.Scope#$id + * + * @description + * Unique scope ID (monotonically increasing) useful for debugging. + */ + + /** + * @ngdoc property + * @name $rootScope.Scope#$parent + * + * @description + * Reference to the parent scope. + */ + + /** + * @ngdoc property + * @name $rootScope.Scope#$root + * + * @description + * Reference to the root scope. + */ + + Scope.prototype = { + constructor: Scope, + /** + * @ngdoc method + * @name $rootScope.Scope#$new + * @kind function + * + * @description + * Creates a new child {@link ng.$rootScope.Scope scope}. + * + * The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} event. + * The scope can be removed from the scope hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}. + * + * {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is + * desired for the scope and its child scopes to be permanently detached from the parent and + * thus stop participating in model change detection and listener notification by invoking. + * + * @param {boolean} isolate If true, then the scope does not prototypically inherit from the + * parent scope. The scope is isolated, as it can not see parent scope properties. + * When creating widgets, it is useful for the widget to not accidentally read parent + * state. + * + * @param {Scope} [parent=this] The {@link ng.$rootScope.Scope `Scope`} that will be the `$parent` + * of the newly created scope. Defaults to `this` scope if not provided. + * This is used when creating a transclude scope to correctly place it + * in the scope hierarchy while maintaining the correct prototypical + * inheritance. + * + * @returns {Object} The newly created child scope. + * + */ + $new: function(isolate, parent) { + var child; + + parent = parent || this; + + if (isolate) { + child = new Scope(); + child.$root = this.$root; + } else { + // Only create a child scope class if somebody asks for one, + // but cache it to allow the VM to optimize lookups. + if (!this.$$ChildScope) { + this.$$ChildScope = createChildScopeClass(this); + } + child = new this.$$ChildScope(); + } + child.$parent = parent; + child.$$prevSibling = parent.$$childTail; + if (parent.$$childHead) { + parent.$$childTail.$$nextSibling = child; + parent.$$childTail = child; + } else { + parent.$$childHead = parent.$$childTail = child; + } + + // When the new scope is not isolated or we inherit from `this`, and + // the parent scope is destroyed, the property `$$destroyed` is inherited + // prototypically. In all other cases, this property needs to be set + // when the parent scope is destroyed. + // The listener needs to be added after the parent is set + if (isolate || parent !== this) child.$on('$destroy', destroyChildScope); + + return child; + }, + + /** + * @ngdoc method + * @name $rootScope.Scope#$watch + * @kind function + * + * @description + * Registers a `listener` callback to be executed whenever the `watchExpression` changes. + * + * - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#$digest + * $digest()} and should return the value that will be watched. (`watchExpression` should not change + * its value when executed multiple times with the same input because it may be executed multiple + * times by {@link ng.$rootScope.Scope#$digest $digest()}. That is, `watchExpression` should be + * [idempotent](http://en.wikipedia.org/wiki/Idempotence).) + * - The `listener` is called only when the value from the current `watchExpression` and the + * previous call to `watchExpression` are not equal (with the exception of the initial run, + * see below). Inequality is determined according to reference inequality, + * [strict comparison](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators) + * via the `!==` Javascript operator, unless `objectEquality == true` + * (see next point) + * - When `objectEquality == true`, inequality of the `watchExpression` is determined + * according to the {@link angular.equals} function. To save the value of the object for + * later comparison, the {@link angular.copy} function is used. This therefore means that + * watching complex objects will have adverse memory and performance implications. + * - This should not be used to watch for changes in objects that are + * or contain [File](https://developer.mozilla.org/docs/Web/API/File) objects due to limitations with {@link angular.copy `angular.copy`}. + * - The watch `listener` may change the model, which may trigger other `listener`s to fire. + * This is achieved by rerunning the watchers until no changes are detected. The rerun + * iteration limit is 10 to prevent an infinite loop deadlock. + * + * + * If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called, + * you can register a `watchExpression` function with no `listener`. (Be prepared for + * multiple calls to your `watchExpression` because it will execute multiple times in a + * single {@link ng.$rootScope.Scope#$digest $digest} cycle if a change is detected.) + * + * After a watcher is registered with the scope, the `listener` fn is called asynchronously + * (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the + * watcher. In rare cases, this is undesirable because the listener is called when the result + * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you + * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the + * listener was called due to initialization. + * + * + * + * # Example + * ```js + // let's assume that scope was dependency injected as the $rootScope + var scope = $rootScope; + scope.name = 'misko'; + scope.counter = 0; + + expect(scope.counter).toEqual(0); + scope.$watch('name', function(newValue, oldValue) { + scope.counter = scope.counter + 1; + }); + expect(scope.counter).toEqual(0); + + scope.$digest(); + // the listener is always called during the first $digest loop after it was registered + expect(scope.counter).toEqual(1); + + scope.$digest(); + // but now it will not be called unless the value changes + expect(scope.counter).toEqual(1); + + scope.name = 'adam'; + scope.$digest(); + expect(scope.counter).toEqual(2); + + + + // Using a function as a watchExpression + var food; + scope.foodCounter = 0; + expect(scope.foodCounter).toEqual(0); + scope.$watch( + // This function returns the value being watched. It is called for each turn of the $digest loop + function() { return food; }, + // This is the change listener, called when the value returned from the above function changes + function(newValue, oldValue) { + if ( newValue !== oldValue ) { + // Only increment the counter if the value changed + scope.foodCounter = scope.foodCounter + 1; + } + } + ); + // No digest has been run so the counter will be zero + expect(scope.foodCounter).toEqual(0); + + // Run the digest but since food has not changed count will still be zero + scope.$digest(); + expect(scope.foodCounter).toEqual(0); + + // Update food and run digest. Now the counter will increment + food = 'cheeseburger'; + scope.$digest(); + expect(scope.foodCounter).toEqual(1); + + * ``` + * + * + * + * @param {(function()|string)} watchExpression Expression that is evaluated on each + * {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers + * a call to the `listener`. + * + * - `string`: Evaluated as {@link guide/expression expression} + * - `function(scope)`: called with current `scope` as a parameter. + * @param {function(newVal, oldVal, scope)} listener Callback called whenever the value + * of `watchExpression` changes. + * + * - `newVal` contains the current value of the `watchExpression` + * - `oldVal` contains the previous value of the `watchExpression` + * - `scope` refers to the current scope + * @param {boolean=} [objectEquality=false] Compare for object equality using {@link angular.equals} instead of + * comparing for reference equality. + * @returns {function()} Returns a deregistration function for this listener. + */ + $watch: function(watchExp, listener, objectEquality, prettyPrintExpression) { + var get = $parse(watchExp); + + if (get.$$watchDelegate) { + return get.$$watchDelegate(this, listener, objectEquality, get, watchExp); + } + var scope = this, + array = scope.$$watchers, + watcher = { + fn: listener, + last: initWatchVal, + get: get, + exp: prettyPrintExpression || watchExp, + eq: !!objectEquality + }; + + lastDirtyWatch = null; + + if (!isFunction(listener)) { + watcher.fn = noop; + } + + if (!array) { + array = scope.$$watchers = []; + array.$$digestWatchIndex = -1; + } + // we use unshift since we use a while loop in $digest for speed. + // the while loop reads in reverse order. + array.unshift(watcher); + array.$$digestWatchIndex++; + incrementWatchersCount(this, 1); + + return function deregisterWatch() { + var index = arrayRemove(array, watcher); + if (index >= 0) { + incrementWatchersCount(scope, -1); + if (index < array.$$digestWatchIndex) { + array.$$digestWatchIndex--; + } + } + lastDirtyWatch = null; + }; + }, + + /** + * @ngdoc method + * @name $rootScope.Scope#$watchGroup + * @kind function + * + * @description + * A variant of {@link ng.$rootScope.Scope#$watch $watch()} where it watches an array of `watchExpressions`. + * If any one expression in the collection changes the `listener` is executed. + * + * - The items in the `watchExpressions` array are observed via the standard `$watch` operation. Their return + * values are examined for changes on every call to `$digest`. + * - The `listener` is called whenever any expression in the `watchExpressions` array changes. + * + * `$watchGroup` is more performant than watching each expression individually, and should be + * used when the listener does not need to know which expression has changed. + * If the listener needs to know which expression has changed, + * {@link ng.$rootScope.Scope#$watch $watch()} or + * {@link ng.$rootScope.Scope#$watchCollection $watchCollection()} should be used. + * + * @param {Array.} watchExpressions Array of expressions that will be individually + * watched using {@link ng.$rootScope.Scope#$watch $watch()} + * + * @param {function(newValues, oldValues, scope)} listener Callback called whenever the return value of any + * expression in `watchExpressions` changes + * The `newValues` array contains the current values of the `watchExpressions`, with the indexes matching + * those of `watchExpression` + * and the `oldValues` array contains the previous values of the `watchExpressions`, with the indexes matching + * those of `watchExpression`. + * + * Note that `newValues` and `oldValues` reflect the differences in each **individual** + * expression, and not the difference of the values between each call of the listener. + * That means the difference between `newValues` and `oldValues` cannot be used to determine + * which expression has changed / remained stable: + * + * ```js + * + * $scope.$watchGroup(['v1', 'v2'], function(newValues, oldValues) { + * console.log(newValues, oldValues); + * }); + * + * // newValues, oldValues initially + * // [undefined, undefined], [undefined, undefined] + * + * $scope.v1 = 'a'; + * $scope.v2 = 'a'; + * + * // ['a', 'a'], [undefined, undefined] + * + * $scope.v2 = 'b' + * + * // v1 hasn't changed since it became `'a'`, therefore its oldValue is still `undefined` + * // ['a', 'b'], [undefined, 'a'] + * + * ``` + * + * The `scope` refers to the current scope. + * @returns {function()} Returns a de-registration function for all listeners. + */ + $watchGroup: function(watchExpressions, listener) { + var oldValues = new Array(watchExpressions.length); + var newValues = new Array(watchExpressions.length); + var deregisterFns = []; + var self = this; + var changeReactionScheduled = false; + var firstRun = true; + + if (!watchExpressions.length) { + // No expressions means we call the listener ASAP + var shouldCall = true; + self.$evalAsync(function() { + if (shouldCall) listener(newValues, newValues, self); + }); + return function deregisterWatchGroup() { + shouldCall = false; + }; + } + + if (watchExpressions.length === 1) { + // Special case size of one + return this.$watch(watchExpressions[0], function watchGroupAction(value, oldValue, scope) { + newValues[0] = value; + oldValues[0] = oldValue; + listener(newValues, (value === oldValue) ? newValues : oldValues, scope); + }); + } + + forEach(watchExpressions, function(expr, i) { + var unwatchFn = self.$watch(expr, function watchGroupSubAction(value, oldValue) { + newValues[i] = value; + oldValues[i] = oldValue; + if (!changeReactionScheduled) { + changeReactionScheduled = true; + self.$evalAsync(watchGroupAction); + } + }); + deregisterFns.push(unwatchFn); + }); + + function watchGroupAction() { + changeReactionScheduled = false; + + if (firstRun) { + firstRun = false; + listener(newValues, newValues, self); + } else { + listener(newValues, oldValues, self); + } + } + + return function deregisterWatchGroup() { + while (deregisterFns.length) { + deregisterFns.shift()(); + } + }; + }, + + + /** + * @ngdoc method + * @name $rootScope.Scope#$watchCollection + * @kind function + * + * @description + * Shallow watches the properties of an object and fires whenever any of the properties change + * (for arrays, this implies watching the array items; for object maps, this implies watching + * the properties). If a change is detected, the `listener` callback is fired. + * + * - The `obj` collection is observed via standard $watch operation and is examined on every + * call to $digest() to see if any items have been added, removed, or moved. + * - The `listener` is called whenever anything within the `obj` has changed. Examples include + * adding, removing, and moving items belonging to an object or array. + * + * + * # Example + * ```js + $scope.names = ['igor', 'matias', 'misko', 'james']; + $scope.dataCount = 4; + + $scope.$watchCollection('names', function(newNames, oldNames) { + $scope.dataCount = newNames.length; + }); + + expect($scope.dataCount).toEqual(4); + $scope.$digest(); + + //still at 4 ... no changes + expect($scope.dataCount).toEqual(4); + + $scope.names.pop(); + $scope.$digest(); + + //now there's been a change + expect($scope.dataCount).toEqual(3); + * ``` + * + * + * @param {string|function(scope)} obj Evaluated as {@link guide/expression expression}. The + * expression value should evaluate to an object or an array which is observed on each + * {@link ng.$rootScope.Scope#$digest $digest} cycle. Any shallow change within the + * collection will trigger a call to the `listener`. + * + * @param {function(newCollection, oldCollection, scope)} listener a callback function called + * when a change is detected. + * - The `newCollection` object is the newly modified data obtained from the `obj` expression + * - The `oldCollection` object is a copy of the former collection data. + * Due to performance considerations, the`oldCollection` value is computed only if the + * `listener` function declares two or more arguments. + * - The `scope` argument refers to the current scope. + * + * @returns {function()} Returns a de-registration function for this listener. When the + * de-registration function is executed, the internal watch operation is terminated. + */ + $watchCollection: function(obj, listener) { + $watchCollectionInterceptor.$stateful = true; + + var self = this; + // the current value, updated on each dirty-check run + var newValue; + // a shallow copy of the newValue from the last dirty-check run, + // updated to match newValue during dirty-check run + var oldValue; + // a shallow copy of the newValue from when the last change happened + var veryOldValue; + // only track veryOldValue if the listener is asking for it + var trackVeryOldValue = (listener.length > 1); + var changeDetected = 0; + var changeDetector = $parse(obj, $watchCollectionInterceptor); + var internalArray = []; + var internalObject = {}; + var initRun = true; + var oldLength = 0; + + function $watchCollectionInterceptor(_value) { + newValue = _value; + var newLength, key, bothNaN, newItem, oldItem; + + // If the new value is undefined, then return undefined as the watch may be a one-time watch + if (isUndefined(newValue)) return; + + if (!isObject(newValue)) { // if primitive + if (oldValue !== newValue) { + oldValue = newValue; + changeDetected++; + } + } else if (isArrayLike(newValue)) { + if (oldValue !== internalArray) { + // we are transitioning from something which was not an array into array. + oldValue = internalArray; + oldLength = oldValue.length = 0; + changeDetected++; + } + + newLength = newValue.length; + + if (oldLength !== newLength) { + // if lengths do not match we need to trigger change notification + changeDetected++; + oldValue.length = oldLength = newLength; + } + // copy the items to oldValue and look for changes. + for (var i = 0; i < newLength; i++) { + oldItem = oldValue[i]; + newItem = newValue[i]; + + // eslint-disable-next-line no-self-compare + bothNaN = (oldItem !== oldItem) && (newItem !== newItem); + if (!bothNaN && (oldItem !== newItem)) { + changeDetected++; + oldValue[i] = newItem; + } + } + } else { + if (oldValue !== internalObject) { + // we are transitioning from something which was not an object into object. + oldValue = internalObject = {}; + oldLength = 0; + changeDetected++; + } + // copy the items to oldValue and look for changes. + newLength = 0; + for (key in newValue) { + if (hasOwnProperty.call(newValue, key)) { + newLength++; + newItem = newValue[key]; + oldItem = oldValue[key]; + + if (key in oldValue) { + // eslint-disable-next-line no-self-compare + bothNaN = (oldItem !== oldItem) && (newItem !== newItem); + if (!bothNaN && (oldItem !== newItem)) { + changeDetected++; + oldValue[key] = newItem; + } + } else { + oldLength++; + oldValue[key] = newItem; + changeDetected++; + } + } + } + if (oldLength > newLength) { + // we used to have more keys, need to find them and destroy them. + changeDetected++; + for (key in oldValue) { + if (!hasOwnProperty.call(newValue, key)) { + oldLength--; + delete oldValue[key]; + } + } + } + } + return changeDetected; + } + + function $watchCollectionAction() { + if (initRun) { + initRun = false; + listener(newValue, newValue, self); + } else { + listener(newValue, veryOldValue, self); + } + + // make a copy for the next time a collection is changed + if (trackVeryOldValue) { + if (!isObject(newValue)) { + //primitive + veryOldValue = newValue; + } else if (isArrayLike(newValue)) { + veryOldValue = new Array(newValue.length); + for (var i = 0; i < newValue.length; i++) { + veryOldValue[i] = newValue[i]; + } + } else { // if object + veryOldValue = {}; + for (var key in newValue) { + if (hasOwnProperty.call(newValue, key)) { + veryOldValue[key] = newValue[key]; + } + } + } + } + } + + return this.$watch(changeDetector, $watchCollectionAction); + }, + + /** + * @ngdoc method + * @name $rootScope.Scope#$digest + * @kind function + * + * @description + * Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and + * its children. Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change + * the model, the `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers} + * until no more listeners are firing. This means that it is possible to get into an infinite + * loop. This function will throw `'Maximum iteration limit exceeded.'` if the number of + * iterations exceeds 10. + * + * Usually, you don't call `$digest()` directly in + * {@link ng.directive:ngController controllers} or in + * {@link ng.$compileProvider#directive directives}. + * Instead, you should call {@link ng.$rootScope.Scope#$apply $apply()} (typically from within + * a {@link ng.$compileProvider#directive directive}), which will force a `$digest()`. + * + * If you want to be notified whenever `$digest()` is called, + * you can register a `watchExpression` function with + * {@link ng.$rootScope.Scope#$watch $watch()} with no `listener`. + * + * In unit tests, you may need to call `$digest()` to simulate the scope life cycle. + * + * # Example + * ```js + var scope = ...; + scope.name = 'misko'; + scope.counter = 0; + + expect(scope.counter).toEqual(0); + scope.$watch('name', function(newValue, oldValue) { + scope.counter = scope.counter + 1; + }); + expect(scope.counter).toEqual(0); + + scope.$digest(); + // the listener is always called during the first $digest loop after it was registered + expect(scope.counter).toEqual(1); + + scope.$digest(); + // but now it will not be called unless the value changes + expect(scope.counter).toEqual(1); + + scope.name = 'adam'; + scope.$digest(); + expect(scope.counter).toEqual(2); + * ``` + * + */ + $digest: function() { + var watch, value, last, fn, get, + watchers, + dirty, ttl = TTL, + next, current, target = this, + watchLog = [], + logIdx, asyncTask; + + beginPhase('$digest'); + // Check for changes to browser url that happened in sync before the call to $digest + $browser.$$checkUrlChange(); + + if (this === $rootScope && applyAsyncId !== null) { + // If this is the root scope, and $applyAsync has scheduled a deferred $apply(), then + // cancel the scheduled $apply and flush the queue of expressions to be evaluated. + $browser.defer.cancel(applyAsyncId); + flushApplyAsync(); + } + + lastDirtyWatch = null; + + do { // "while dirty" loop + dirty = false; + current = target; + + // It's safe for asyncQueuePosition to be a local variable here because this loop can't + // be reentered recursively. Calling $digest from a function passed to $evalAsync would + // lead to a '$digest already in progress' error. + for (var asyncQueuePosition = 0; asyncQueuePosition < asyncQueue.length; asyncQueuePosition++) { + try { + asyncTask = asyncQueue[asyncQueuePosition]; + fn = asyncTask.fn; + fn(asyncTask.scope, asyncTask.locals); + } catch (e) { + $exceptionHandler(e); + } + lastDirtyWatch = null; + } + asyncQueue.length = 0; + + traverseScopesLoop: + do { // "traverse the scopes" loop + if ((watchers = current.$$watchers)) { + // process our watches + watchers.$$digestWatchIndex = watchers.length; + while (watchers.$$digestWatchIndex--) { + try { + watch = watchers[watchers.$$digestWatchIndex]; + // Most common watches are on primitives, in which case we can short + // circuit it with === operator, only when === fails do we use .equals + if (watch) { + get = watch.get; + if ((value = get(current)) !== (last = watch.last) && + !(watch.eq + ? equals(value, last) + : (isNumberNaN(value) && isNumberNaN(last)))) { + dirty = true; + lastDirtyWatch = watch; + watch.last = watch.eq ? copy(value, null) : value; + fn = watch.fn; + fn(value, ((last === initWatchVal) ? value : last), current); + if (ttl < 5) { + logIdx = 4 - ttl; + if (!watchLog[logIdx]) watchLog[logIdx] = []; + watchLog[logIdx].push({ + msg: isFunction(watch.exp) ? 'fn: ' + (watch.exp.name || watch.exp.toString()) : watch.exp, + newVal: value, + oldVal: last + }); + } + } else if (watch === lastDirtyWatch) { + // If the most recently dirty watcher is now clean, short circuit since the remaining watchers + // have already been tested. + dirty = false; + break traverseScopesLoop; + } + } + } catch (e) { + $exceptionHandler(e); + } + } + } + + // Insanity Warning: scope depth-first traversal + // yes, this code is a bit crazy, but it works and we have tests to prove it! + // this piece should be kept in sync with the traversal in $broadcast + if (!(next = ((current.$$watchersCount && current.$$childHead) || + (current !== target && current.$$nextSibling)))) { + while (current !== target && !(next = current.$$nextSibling)) { + current = current.$parent; + } + } + } while ((current = next)); + + // `break traverseScopesLoop;` takes us to here + + if ((dirty || asyncQueue.length) && !(ttl--)) { + clearPhase(); + throw $rootScopeMinErr('infdig', + '{0} $digest() iterations reached. Aborting!\n' + + 'Watchers fired in the last 5 iterations: {1}', + TTL, watchLog); + } + + } while (dirty || asyncQueue.length); + + clearPhase(); + + // postDigestQueuePosition isn't local here because this loop can be reentered recursively. + while (postDigestQueuePosition < postDigestQueue.length) { + try { + postDigestQueue[postDigestQueuePosition++](); + } catch (e) { + $exceptionHandler(e); + } + } + postDigestQueue.length = postDigestQueuePosition = 0; + + // Check for changes to browser url that happened during the $digest + // (for which no event is fired; e.g. via `history.pushState()`) + $browser.$$checkUrlChange(); + }, + + + /** + * @ngdoc event + * @name $rootScope.Scope#$destroy + * @eventType broadcast on scope being destroyed + * + * @description + * Broadcasted when a scope and its children are being destroyed. + * + * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to + * clean up DOM bindings before an element is removed from the DOM. + */ + + /** + * @ngdoc method + * @name $rootScope.Scope#$destroy + * @kind function + * + * @description + * Removes the current scope (and all of its children) from the parent scope. Removal implies + * that calls to {@link ng.$rootScope.Scope#$digest $digest()} will no longer + * propagate to the current scope and its children. Removal also implies that the current + * scope is eligible for garbage collection. + * + * The `$destroy()` is usually used by directives such as + * {@link ng.directive:ngRepeat ngRepeat} for managing the + * unrolling of the loop. + * + * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope. + * Application code can register a `$destroy` event handler that will give it a chance to + * perform any necessary cleanup. + * + * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to + * clean up DOM bindings before an element is removed from the DOM. + */ + $destroy: function() { + // We can't destroy a scope that has been already destroyed. + if (this.$$destroyed) return; + var parent = this.$parent; + + this.$broadcast('$destroy'); + this.$$destroyed = true; + + if (this === $rootScope) { + //Remove handlers attached to window when $rootScope is removed + $browser.$$applicationDestroyed(); + } + + incrementWatchersCount(this, -this.$$watchersCount); + for (var eventName in this.$$listenerCount) { + decrementListenerCount(this, this.$$listenerCount[eventName], eventName); + } + + // sever all the references to parent scopes (after this cleanup, the current scope should + // not be retained by any of our references and should be eligible for garbage collection) + if (parent && parent.$$childHead === this) parent.$$childHead = this.$$nextSibling; + if (parent && parent.$$childTail === this) parent.$$childTail = this.$$prevSibling; + if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling; + if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling; + + // Disable listeners, watchers and apply/digest methods + this.$destroy = this.$digest = this.$apply = this.$evalAsync = this.$applyAsync = noop; + this.$on = this.$watch = this.$watchGroup = function() { return noop; }; + this.$$listeners = {}; + + // Disconnect the next sibling to prevent `cleanUpScope` destroying those too + this.$$nextSibling = null; + cleanUpScope(this); + }, + + /** + * @ngdoc method + * @name $rootScope.Scope#$eval + * @kind function + * + * @description + * Executes the `expression` on the current scope and returns the result. Any exceptions in + * the expression are propagated (uncaught). This is useful when evaluating Angular + * expressions. + * + * # Example + * ```js + var scope = ng.$rootScope.Scope(); + scope.a = 1; + scope.b = 2; + + expect(scope.$eval('a+b')).toEqual(3); + expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3); + * ``` + * + * @param {(string|function())=} expression An angular expression to be executed. + * + * - `string`: execute using the rules as defined in {@link guide/expression expression}. + * - `function(scope)`: execute the function with the current `scope` parameter. + * + * @param {(object)=} locals Local variables object, useful for overriding values in scope. + * @returns {*} The result of evaluating the expression. + */ + $eval: function(expr, locals) { + return $parse(expr)(this, locals); + }, + + /** + * @ngdoc method + * @name $rootScope.Scope#$evalAsync + * @kind function + * + * @description + * Executes the expression on the current scope at a later point in time. + * + * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only + * that: + * + * - it will execute after the function that scheduled the evaluation (preferably before DOM + * rendering). + * - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after + * `expression` execution. + * + * Any exceptions from the execution of the expression are forwarded to the + * {@link ng.$exceptionHandler $exceptionHandler} service. + * + * __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle + * will be scheduled. However, it is encouraged to always call code that changes the model + * from within an `$apply` call. That includes code evaluated via `$evalAsync`. + * + * @param {(string|function())=} expression An angular expression to be executed. + * + * - `string`: execute using the rules as defined in {@link guide/expression expression}. + * - `function(scope)`: execute the function with the current `scope` parameter. + * + * @param {(object)=} locals Local variables object, useful for overriding values in scope. + */ + $evalAsync: function(expr, locals) { + // if we are outside of an $digest loop and this is the first time we are scheduling async + // task also schedule async auto-flush + if (!$rootScope.$$phase && !asyncQueue.length) { + $browser.defer(function() { + if (asyncQueue.length) { + $rootScope.$digest(); + } + }); + } + + asyncQueue.push({scope: this, fn: $parse(expr), locals: locals}); + }, + + $$postDigest: function(fn) { + postDigestQueue.push(fn); + }, + + /** + * @ngdoc method + * @name $rootScope.Scope#$apply + * @kind function + * + * @description + * `$apply()` is used to execute an expression in angular from outside of the angular + * framework. (For example from browser DOM events, setTimeout, XHR or third party libraries). + * Because we are calling into the angular framework we need to perform proper scope life + * cycle of {@link ng.$exceptionHandler exception handling}, + * {@link ng.$rootScope.Scope#$digest executing watches}. + * + * ## Life cycle + * + * # Pseudo-Code of `$apply()` + * ```js + function $apply(expr) { + try { + return $eval(expr); + } catch (e) { + $exceptionHandler(e); + } finally { + $root.$digest(); + } + } + * ``` + * + * + * Scope's `$apply()` method transitions through the following stages: + * + * 1. The {@link guide/expression expression} is executed using the + * {@link ng.$rootScope.Scope#$eval $eval()} method. + * 2. Any exceptions from the execution of the expression are forwarded to the + * {@link ng.$exceptionHandler $exceptionHandler} service. + * 3. The {@link ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the + * expression was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method. + * + * + * @param {(string|function())=} exp An angular expression to be executed. + * + * - `string`: execute using the rules as defined in {@link guide/expression expression}. + * - `function(scope)`: execute the function with current `scope` parameter. + * + * @returns {*} The result of evaluating the expression. + */ + $apply: function(expr) { + try { + beginPhase('$apply'); + try { + return this.$eval(expr); + } finally { + clearPhase(); + } + } catch (e) { + $exceptionHandler(e); + } finally { + try { + $rootScope.$digest(); + } catch (e) { + $exceptionHandler(e); + // eslint-disable-next-line no-unsafe-finally + throw e; + } + } + }, + + /** + * @ngdoc method + * @name $rootScope.Scope#$applyAsync + * @kind function + * + * @description + * Schedule the invocation of $apply to occur at a later time. The actual time difference + * varies across browsers, but is typically around ~10 milliseconds. + * + * This can be used to queue up multiple expressions which need to be evaluated in the same + * digest. + * + * @param {(string|function())=} exp An angular expression to be executed. + * + * - `string`: execute using the rules as defined in {@link guide/expression expression}. + * - `function(scope)`: execute the function with current `scope` parameter. + */ + $applyAsync: function(expr) { + var scope = this; + if (expr) { + applyAsyncQueue.push($applyAsyncExpression); + } + expr = $parse(expr); + scheduleApplyAsync(); + + function $applyAsyncExpression() { + scope.$eval(expr); + } + }, + + /** + * @ngdoc method + * @name $rootScope.Scope#$on + * @kind function + * + * @description + * Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for + * discussion of event life cycle. + * + * The event listener function format is: `function(event, args...)`. The `event` object + * passed into the listener has the following attributes: + * + * - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or + * `$broadcast`-ed. + * - `currentScope` - `{Scope}`: the scope that is currently handling the event. Once the + * event propagates through the scope hierarchy, this property is set to null. + * - `name` - `{string}`: name of the event. + * - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel + * further event propagation (available only for events that were `$emit`-ed). + * - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag + * to true. + * - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called. + * + * @param {string} name Event name to listen on. + * @param {function(event, ...args)} listener Function to call when the event is emitted. + * @returns {function()} Returns a deregistration function for this listener. + */ + $on: function(name, listener) { + var namedListeners = this.$$listeners[name]; + if (!namedListeners) { + this.$$listeners[name] = namedListeners = []; + } + namedListeners.push(listener); + + var current = this; + do { + if (!current.$$listenerCount[name]) { + current.$$listenerCount[name] = 0; + } + current.$$listenerCount[name]++; + } while ((current = current.$parent)); + + var self = this; + return function() { + var indexOfListener = namedListeners.indexOf(listener); + if (indexOfListener !== -1) { + namedListeners[indexOfListener] = null; + decrementListenerCount(self, 1, name); + } + }; + }, + + + /** + * @ngdoc method + * @name $rootScope.Scope#$emit + * @kind function + * + * @description + * Dispatches an event `name` upwards through the scope hierarchy notifying the + * registered {@link ng.$rootScope.Scope#$on} listeners. + * + * The event life cycle starts at the scope on which `$emit` was called. All + * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get + * notified. Afterwards, the event traverses upwards toward the root scope and calls all + * registered listeners along the way. The event will stop propagating if one of the listeners + * cancels it. + * + * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed + * onto the {@link ng.$exceptionHandler $exceptionHandler} service. + * + * @param {string} name Event name to emit. + * @param {...*} args Optional one or more arguments which will be passed onto the event listeners. + * @return {Object} Event object (see {@link ng.$rootScope.Scope#$on}). + */ + $emit: function(name, args) { + var empty = [], + namedListeners, + scope = this, + stopPropagation = false, + event = { + name: name, + targetScope: scope, + stopPropagation: function() {stopPropagation = true;}, + preventDefault: function() { + event.defaultPrevented = true; + }, + defaultPrevented: false + }, + listenerArgs = concat([event], arguments, 1), + i, length; + + do { + namedListeners = scope.$$listeners[name] || empty; + event.currentScope = scope; + for (i = 0, length = namedListeners.length; i < length; i++) { + + // if listeners were deregistered, defragment the array + if (!namedListeners[i]) { + namedListeners.splice(i, 1); + i--; + length--; + continue; + } + try { + //allow all listeners attached to the current scope to run + namedListeners[i].apply(null, listenerArgs); + } catch (e) { + $exceptionHandler(e); + } + } + //if any listener on the current scope stops propagation, prevent bubbling + if (stopPropagation) { + event.currentScope = null; + return event; + } + //traverse upwards + scope = scope.$parent; + } while (scope); + + event.currentScope = null; + + return event; + }, + + + /** + * @ngdoc method + * @name $rootScope.Scope#$broadcast + * @kind function + * + * @description + * Dispatches an event `name` downwards to all child scopes (and their children) notifying the + * registered {@link ng.$rootScope.Scope#$on} listeners. + * + * The event life cycle starts at the scope on which `$broadcast` was called. All + * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get + * notified. Afterwards, the event propagates to all direct and indirect scopes of the current + * scope and calls all registered listeners along the way. The event cannot be canceled. + * + * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed + * onto the {@link ng.$exceptionHandler $exceptionHandler} service. + * + * @param {string} name Event name to broadcast. + * @param {...*} args Optional one or more arguments which will be passed onto the event listeners. + * @return {Object} Event object, see {@link ng.$rootScope.Scope#$on} + */ + $broadcast: function(name, args) { + var target = this, + current = target, + next = target, + event = { + name: name, + targetScope: target, + preventDefault: function() { + event.defaultPrevented = true; + }, + defaultPrevented: false + }; + + if (!target.$$listenerCount[name]) return event; + + var listenerArgs = concat([event], arguments, 1), + listeners, i, length; + + //down while you can, then up and next sibling or up and next sibling until back at root + while ((current = next)) { + event.currentScope = current; + listeners = current.$$listeners[name] || []; + for (i = 0, length = listeners.length; i < length; i++) { + // if listeners were deregistered, defragment the array + if (!listeners[i]) { + listeners.splice(i, 1); + i--; + length--; + continue; + } + + try { + listeners[i].apply(null, listenerArgs); + } catch (e) { + $exceptionHandler(e); + } + } + + // Insanity Warning: scope depth-first traversal + // yes, this code is a bit crazy, but it works and we have tests to prove it! + // this piece should be kept in sync with the traversal in $digest + // (though it differs due to having the extra check for $$listenerCount) + if (!(next = ((current.$$listenerCount[name] && current.$$childHead) || + (current !== target && current.$$nextSibling)))) { + while (current !== target && !(next = current.$$nextSibling)) { + current = current.$parent; + } + } + } + + event.currentScope = null; + return event; + } + }; + + var $rootScope = new Scope(); + + //The internal queues. Expose them on the $rootScope for debugging/testing purposes. + var asyncQueue = $rootScope.$$asyncQueue = []; + var postDigestQueue = $rootScope.$$postDigestQueue = []; + var applyAsyncQueue = $rootScope.$$applyAsyncQueue = []; + + var postDigestQueuePosition = 0; + + return $rootScope; + + + function beginPhase(phase) { + if ($rootScope.$$phase) { + throw $rootScopeMinErr('inprog', '{0} already in progress', $rootScope.$$phase); + } + + $rootScope.$$phase = phase; + } + + function clearPhase() { + $rootScope.$$phase = null; + } + + function incrementWatchersCount(current, count) { + do { + current.$$watchersCount += count; + } while ((current = current.$parent)); + } + + function decrementListenerCount(current, count, name) { + do { + current.$$listenerCount[name] -= count; + + if (current.$$listenerCount[name] === 0) { + delete current.$$listenerCount[name]; + } + } while ((current = current.$parent)); + } + + /** + * function used as an initial value for watchers. + * because it's unique we can easily tell it apart from other values + */ + function initWatchVal() {} + + function flushApplyAsync() { + while (applyAsyncQueue.length) { + try { + applyAsyncQueue.shift()(); + } catch (e) { + $exceptionHandler(e); + } + } + applyAsyncId = null; + } + + function scheduleApplyAsync() { + if (applyAsyncId === null) { + applyAsyncId = $browser.defer(function() { + $rootScope.$apply(flushApplyAsync); + }); + } + } + }]; +} + +/** + * @ngdoc service + * @name $rootElement + * + * @description + * The root element of Angular application. This is either the element where {@link + * ng.directive:ngApp ngApp} was declared or the element passed into + * {@link angular.bootstrap}. The element represents the root element of application. It is also the + * location where the application's {@link auto.$injector $injector} service gets + * published, and can be retrieved using `$rootElement.injector()`. + */ + + +// the implementation is in angular.bootstrap + +/** + * @this + * @description + * Private service to sanitize uris for links and images. Used by $compile and $sanitize. + */ +function $$SanitizeUriProvider() { + var aHrefSanitizationWhitelist = /^\s*(https?|ftp|mailto|tel|file):/, + imgSrcSanitizationWhitelist = /^\s*((https?|ftp|file|blob):|data:image\/)/; + + /** + * @description + * Retrieves or overrides the default regular expression that is used for whitelisting of safe + * urls during a[href] sanitization. + * + * The sanitization is a security measure aimed at prevent XSS attacks via html links. + * + * Any url about to be assigned to a[href] via data-binding is first normalized and turned into + * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist` + * regular expression. If a match is found, the original url is written into the dom. Otherwise, + * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM. + * + * @param {RegExp=} regexp New regexp to whitelist urls with. + * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for + * chaining otherwise. + */ + this.aHrefSanitizationWhitelist = function(regexp) { + if (isDefined(regexp)) { + aHrefSanitizationWhitelist = regexp; + return this; + } + return aHrefSanitizationWhitelist; + }; + + + /** + * @description + * Retrieves or overrides the default regular expression that is used for whitelisting of safe + * urls during img[src] sanitization. + * + * The sanitization is a security measure aimed at prevent XSS attacks via html links. + * + * Any url about to be assigned to img[src] via data-binding is first normalized and turned into + * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist` + * regular expression. If a match is found, the original url is written into the dom. Otherwise, + * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM. + * + * @param {RegExp=} regexp New regexp to whitelist urls with. + * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for + * chaining otherwise. + */ + this.imgSrcSanitizationWhitelist = function(regexp) { + if (isDefined(regexp)) { + imgSrcSanitizationWhitelist = regexp; + return this; + } + return imgSrcSanitizationWhitelist; + }; + + this.$get = function() { + return function sanitizeUri(uri, isImage) { + var regex = isImage ? imgSrcSanitizationWhitelist : aHrefSanitizationWhitelist; + var normalizedVal; + normalizedVal = urlResolve(uri).href; + if (normalizedVal !== '' && !normalizedVal.match(regex)) { + return 'unsafe:' + normalizedVal; + } + return uri; + }; + }; +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Any commits to this file should be reviewed with security in mind. * + * Changes to this file can potentially create security vulnerabilities. * + * An approval from 2 Core members with history of modifying * + * this file is required. * + * * + * Does the change somehow allow for arbitrary javascript to be executed? * + * Or allows for someone to change the prototype of built-in objects? * + * Or gives undesired access to variables likes document or window? * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* exported $SceProvider, $SceDelegateProvider */ + +var $sceMinErr = minErr('$sce'); + +var SCE_CONTEXTS = { + // HTML is used when there's HTML rendered (e.g. ng-bind-html, iframe srcdoc binding). + HTML: 'html', + + // Style statements or stylesheets. Currently unused in AngularJS. + CSS: 'css', + + // An URL used in a context where it does not refer to a resource that loads code. Currently + // unused in AngularJS. + URL: 'url', + + // RESOURCE_URL is a subtype of URL used where the referred-to resource could be interpreted as + // code. (e.g. ng-include, script src binding, templateUrl) + RESOURCE_URL: 'resourceUrl', + + // Script. Currently unused in AngularJS. + JS: 'js' +}; + +// Helper functions follow. + +var UNDERSCORE_LOWERCASE_REGEXP = /_([a-z])/g; + +function snakeToCamel(name) { + return name + .replace(UNDERSCORE_LOWERCASE_REGEXP, fnCamelCaseReplace); +} + +function adjustMatcher(matcher) { + if (matcher === 'self') { + return matcher; + } else if (isString(matcher)) { + // Strings match exactly except for 2 wildcards - '*' and '**'. + // '*' matches any character except those from the set ':/.?&'. + // '**' matches any character (like .* in a RegExp). + // More than 2 *'s raises an error as it's ill defined. + if (matcher.indexOf('***') > -1) { + throw $sceMinErr('iwcard', + 'Illegal sequence *** in string matcher. String: {0}', matcher); + } + matcher = escapeForRegexp(matcher). + replace(/\\\*\\\*/g, '.*'). + replace(/\\\*/g, '[^:/.?&;]*'); + return new RegExp('^' + matcher + '$'); + } else if (isRegExp(matcher)) { + // The only other type of matcher allowed is a Regexp. + // Match entire URL / disallow partial matches. + // Flags are reset (i.e. no global, ignoreCase or multiline) + return new RegExp('^' + matcher.source + '$'); + } else { + throw $sceMinErr('imatcher', + 'Matchers may only be "self", string patterns or RegExp objects'); + } +} + + +function adjustMatchers(matchers) { + var adjustedMatchers = []; + if (isDefined(matchers)) { + forEach(matchers, function(matcher) { + adjustedMatchers.push(adjustMatcher(matcher)); + }); + } + return adjustedMatchers; +} + + +/** + * @ngdoc service + * @name $sceDelegate + * @kind function + * + * @description + * + * `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict + * Contextual Escaping (SCE)} services to AngularJS. + * + * For an overview of this service and the functionnality it provides in AngularJS, see the main + * page for {@link ng.$sce SCE}. The current page is targeted for developers who need to alter how + * SCE works in their application, which shouldn't be needed in most cases. + * + *
+ * AngularJS strongly relies on contextual escaping for the security of bindings: disabling or + * modifying this might cause cross site scripting (XSS) vulnerabilities. For libraries owners, + * changes to this service will also influence users, so be extra careful and document your changes. + *
+ * + * Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of + * the `$sce` service to customize the way Strict Contextual Escaping works in AngularJS. This is + * because, while the `$sce` provides numerous shorthand methods, etc., you really only need to + * override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things + * work because `$sce` delegates to `$sceDelegate` for these operations. + * + * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} to configure this service. + * + * The default instance of `$sceDelegate` should work out of the box with little pain. While you + * can override it completely to change the behavior of `$sce`, the common case would + * involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting + * your own whitelists and blacklists for trusting URLs used for loading AngularJS resources such as + * templates. Refer {@link ng.$sceDelegateProvider#resourceUrlWhitelist + * $sceDelegateProvider.resourceUrlWhitelist} and {@link + * ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist} + */ + +/** + * @ngdoc provider + * @name $sceDelegateProvider + * @this + * + * @description + * + * The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate + * $sceDelegate service}, used as a delegate for {@link ng.$sce Strict Contextual Escaping (SCE)}. + * + * The `$sceDelegateProvider` allows one to get/set the whitelists and blacklists used to ensure + * that the URLs used for sourcing AngularJS templates and other script-running URLs are safe (all + * places that use the `$sce.RESOURCE_URL` context). See + * {@link ng.$sceDelegateProvider#resourceUrlWhitelist $sceDelegateProvider.resourceUrlWhitelist} + * and + * {@link ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}, + * + * For the general details about this service in Angular, read the main page for {@link ng.$sce + * Strict Contextual Escaping (SCE)}. + * + * **Example**: Consider the following case.
+ * + * - your app is hosted at url `http://myapp.example.com/` + * - but some of your templates are hosted on other domains you control such as + * `http://srv01.assets.example.com/`, `http://srv02.assets.example.com/`, etc. + * - and you have an open redirect at `http://myapp.example.com/clickThru?...`. + * + * Here is what a secure configuration for this scenario might look like: + * + * ``` + * angular.module('myApp', []).config(function($sceDelegateProvider) { + * $sceDelegateProvider.resourceUrlWhitelist([ + * // Allow same origin resource loads. + * 'self', + * // Allow loading from our assets domain. Notice the difference between * and **. + * 'http://srv*.assets.example.com/**' + * ]); + * + * // The blacklist overrides the whitelist so the open redirect here is blocked. + * $sceDelegateProvider.resourceUrlBlacklist([ + * 'http://myapp.example.com/clickThru**' + * ]); + * }); + * ``` + * Note that an empty whitelist will block every resource URL from being loaded, and will require + * you to manually mark each one as trusted with `$sce.trustAsResourceUrl`. However, templates + * requested by {@link ng.$templateRequest $templateRequest} that are present in + * {@link ng.$templateCache $templateCache} will not go through this check. If you have a mechanism + * to populate your templates in that cache at config time, then it is a good idea to remove 'self' + * from that whitelist. This helps to mitigate the security impact of certain types of issues, like + * for instance attacker-controlled `ng-includes`. + */ + +function $SceDelegateProvider() { + this.SCE_CONTEXTS = SCE_CONTEXTS; + + // Resource URLs can also be trusted by policy. + var resourceUrlWhitelist = ['self'], + resourceUrlBlacklist = []; + + /** + * @ngdoc method + * @name $sceDelegateProvider#resourceUrlWhitelist + * @kind function + * + * @param {Array=} whitelist When provided, replaces the resourceUrlWhitelist with the value + * provided. This must be an array or null. A snapshot of this array is used so further + * changes to the array are ignored. + * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items + * allowed in this array. + * + * @return {Array} The currently set whitelist array. + * + * @description + * Sets/Gets the whitelist of trusted resource URLs. + * + * The **default value** when no whitelist has been explicitly set is `['self']` allowing only + * same origin resource requests. + * + *
+ * **Note:** the default whitelist of 'self' is not recommended if your app shares its origin + * with other apps! It is a good idea to limit it to only your application's directory. + *
+ */ + this.resourceUrlWhitelist = function(value) { + if (arguments.length) { + resourceUrlWhitelist = adjustMatchers(value); + } + return resourceUrlWhitelist; + }; + + /** + * @ngdoc method + * @name $sceDelegateProvider#resourceUrlBlacklist + * @kind function + * + * @param {Array=} blacklist When provided, replaces the resourceUrlBlacklist with the value + * provided. This must be an array or null. A snapshot of this array is used so further + * changes to the array are ignored.

+ * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items + * allowed in this array.

+ * The typical usage for the blacklist is to **block + * [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as + * these would otherwise be trusted but actually return content from the redirected domain. + *

+ * Finally, **the blacklist overrides the whitelist** and has the final say. + * + * @return {Array} The currently set blacklist array. + * + * @description + * Sets/Gets the blacklist of trusted resource URLs. + * + * The **default value** when no whitelist has been explicitly set is the empty array (i.e. there + * is no blacklist.) + */ + + this.resourceUrlBlacklist = function(value) { + if (arguments.length) { + resourceUrlBlacklist = adjustMatchers(value); + } + return resourceUrlBlacklist; + }; + + this.$get = ['$injector', function($injector) { + + var htmlSanitizer = function htmlSanitizer(html) { + throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.'); + }; + + if ($injector.has('$sanitize')) { + htmlSanitizer = $injector.get('$sanitize'); + } + + + function matchUrl(matcher, parsedUrl) { + if (matcher === 'self') { + return urlIsSameOrigin(parsedUrl); + } else { + // definitely a regex. See adjustMatchers() + return !!matcher.exec(parsedUrl.href); + } + } + + function isResourceUrlAllowedByPolicy(url) { + var parsedUrl = urlResolve(url.toString()); + var i, n, allowed = false; + // Ensure that at least one item from the whitelist allows this url. + for (i = 0, n = resourceUrlWhitelist.length; i < n; i++) { + if (matchUrl(resourceUrlWhitelist[i], parsedUrl)) { + allowed = true; + break; + } + } + if (allowed) { + // Ensure that no item from the blacklist blocked this url. + for (i = 0, n = resourceUrlBlacklist.length; i < n; i++) { + if (matchUrl(resourceUrlBlacklist[i], parsedUrl)) { + allowed = false; + break; + } + } + } + return allowed; + } + + function generateHolderType(Base) { + var holderType = function TrustedValueHolderType(trustedValue) { + this.$$unwrapTrustedValue = function() { + return trustedValue; + }; + }; + if (Base) { + holderType.prototype = new Base(); + } + holderType.prototype.valueOf = function sceValueOf() { + return this.$$unwrapTrustedValue(); + }; + holderType.prototype.toString = function sceToString() { + return this.$$unwrapTrustedValue().toString(); + }; + return holderType; + } + + var trustedValueHolderBase = generateHolderType(), + byType = {}; + + byType[SCE_CONTEXTS.HTML] = generateHolderType(trustedValueHolderBase); + byType[SCE_CONTEXTS.CSS] = generateHolderType(trustedValueHolderBase); + byType[SCE_CONTEXTS.URL] = generateHolderType(trustedValueHolderBase); + byType[SCE_CONTEXTS.JS] = generateHolderType(trustedValueHolderBase); + byType[SCE_CONTEXTS.RESOURCE_URL] = generateHolderType(byType[SCE_CONTEXTS.URL]); + + /** + * @ngdoc method + * @name $sceDelegate#trustAs + * + * @description + * Returns a trusted representation of the parameter for the specified context. This trusted + * object will later on be used as-is, without any security check, by bindings or directives + * that require this security context. + * For instance, marking a string as trusted for the `$sce.HTML` context will entirely bypass + * the potential `$sanitize` call in corresponding `$sce.HTML` bindings or directives, such as + * `ng-bind-html`. Note that in most cases you won't need to call this function: if you have the + * sanitizer loaded, passing the value itself will render all the HTML that does not pose a + * security risk. + * + * See {@link ng.$sceDelegate#getTrusted getTrusted} for the function that will consume those + * trusted values, and {@link ng.$sce $sce} for general documentation about strict contextual + * escaping. + * + * @param {string} type The context in which this value is safe for use, e.g. `$sce.URL`, + * `$sce.RESOURCE_URL`, `$sce.HTML`, `$sce.JS` or `$sce.CSS`. + * + * @param {*} value The value that should be considered trusted. + * @return {*} A trusted representation of value, that can be used in the given context. + */ + function trustAs(type, trustedValue) { + var Constructor = (byType.hasOwnProperty(type) ? byType[type] : null); + if (!Constructor) { + throw $sceMinErr('icontext', + 'Attempted to trust a value in invalid context. Context: {0}; Value: {1}', + type, trustedValue); + } + if (trustedValue === null || isUndefined(trustedValue) || trustedValue === '') { + return trustedValue; + } + // All the current contexts in SCE_CONTEXTS happen to be strings. In order to avoid trusting + // mutable objects, we ensure here that the value passed in is actually a string. + if (typeof trustedValue !== 'string') { + throw $sceMinErr('itype', + 'Attempted to trust a non-string value in a content requiring a string: Context: {0}', + type); + } + return new Constructor(trustedValue); + } + + /** + * @ngdoc method + * @name $sceDelegate#valueOf + * + * @description + * If the passed parameter had been returned by a prior call to {@link ng.$sceDelegate#trustAs + * `$sceDelegate.trustAs`}, returns the value that had been passed to {@link + * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}. + * + * If the passed parameter is not a value that had been returned by {@link + * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}, it must be returned as-is. + * + * @param {*} value The result of a prior {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`} + * call or anything else. + * @return {*} The `value` that was originally provided to {@link ng.$sceDelegate#trustAs + * `$sceDelegate.trustAs`} if `value` is the result of such a call. Otherwise, returns + * `value` unchanged. + */ + function valueOf(maybeTrusted) { + if (maybeTrusted instanceof trustedValueHolderBase) { + return maybeTrusted.$$unwrapTrustedValue(); + } else { + return maybeTrusted; + } + } + + /** + * @ngdoc method + * @name $sceDelegate#getTrusted + * + * @description + * Takes any input, and either returns a value that's safe to use in the specified context, or + * throws an exception. + * + * In practice, there are several cases. When given a string, this function runs checks + * and sanitization to make it safe without prior assumptions. When given the result of a {@link + * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`} call, it returns the originally supplied + * value if that value's context is valid for this call's context. Finally, this function can + * also throw when there is no way to turn `maybeTrusted` in a safe value (e.g., no sanitization + * is available or possible.) + * + * @param {string} type The context in which this value is to be used (such as `$sce.HTML`). + * @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#trustAs + * `$sceDelegate.trustAs`} call, or anything else (which will not be considered trusted.) + * @return {*} A version of the value that's safe to use in the given context, or throws an + * exception if this is impossible. + */ + function getTrusted(type, maybeTrusted) { + if (maybeTrusted === null || isUndefined(maybeTrusted) || maybeTrusted === '') { + return maybeTrusted; + } + var constructor = (byType.hasOwnProperty(type) ? byType[type] : null); + // If maybeTrusted is a trusted class instance or subclass instance, then unwrap and return + // as-is. + if (constructor && maybeTrusted instanceof constructor) { + return maybeTrusted.$$unwrapTrustedValue(); + } + // Otherwise, if we get here, then we may either make it safe, or throw an exception. This + // depends on the context: some are sanitizatible (HTML), some use whitelists (RESOURCE_URL), + // some are impossible to do (JS). This step isn't implemented for CSS and URL, as AngularJS + // has no corresponding sinks. + if (type === SCE_CONTEXTS.RESOURCE_URL) { + // RESOURCE_URL uses a whitelist. + if (isResourceUrlAllowedByPolicy(maybeTrusted)) { + return maybeTrusted; + } else { + throw $sceMinErr('insecurl', + 'Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}', + maybeTrusted.toString()); + } + } else if (type === SCE_CONTEXTS.HTML) { + // htmlSanitizer throws its own error when no sanitizer is available. + return htmlSanitizer(maybeTrusted); + } + // Default error when the $sce service has no way to make the input safe. + throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.'); + } + + return { trustAs: trustAs, + getTrusted: getTrusted, + valueOf: valueOf }; + }]; +} + + +/** + * @ngdoc provider + * @name $sceProvider + * @this + * + * @description + * + * The $sceProvider provider allows developers to configure the {@link ng.$sce $sce} service. + * - enable/disable Strict Contextual Escaping (SCE) in a module + * - override the default implementation with a custom delegate + * + * Read more about {@link ng.$sce Strict Contextual Escaping (SCE)}. + */ + +/** + * @ngdoc service + * @name $sce + * @kind function + * + * @description + * + * `$sce` is a service that provides Strict Contextual Escaping services to AngularJS. + * + * # Strict Contextual Escaping + * + * Strict Contextual Escaping (SCE) is a mode in which AngularJS constrains bindings to only render + * trusted values. Its goal is to assist in writing code in a way that (a) is secure by default, and + * (b) makes auditing for security vulnerabilities such as XSS, clickjacking, etc. a lot easier. + * + * ## Overview + * + * To systematically block XSS security bugs, AngularJS treats all values as untrusted by default in + * HTML or sensitive URL bindings. When binding untrusted values, AngularJS will automatically + * run security checks on them (sanitizations, whitelists, depending on context), or throw when it + * cannot guarantee the security of the result. That behavior depends strongly on contexts: HTML + * can be sanitized, but template URLs cannot, for instance. + * + * To illustrate this, consider the `ng-bind-html` directive. It renders its value directly as HTML: + * we call that the *context*. When given an untrusted input, AngularJS will attempt to sanitize it + * before rendering if a sanitizer is available, and throw otherwise. To bypass sanitization and + * render the input as-is, you will need to mark it as trusted for that context before attempting + * to bind it. + * + * As of version 1.2, AngularJS ships with SCE enabled by default. + * + * ## In practice + * + * Here's an example of a binding in a privileged context: + * + * ``` + * + *

+ * ``` + * + * Notice that `ng-bind-html` is bound to `userHtml` controlled by the user. With SCE + * disabled, this application allows the user to render arbitrary HTML into the DIV, which would + * be an XSS security bug. In a more realistic example, one may be rendering user comments, blog + * articles, etc. via bindings. (HTML is just one example of a context where rendering user + * controlled input creates security vulnerabilities.) + * + * For the case of HTML, you might use a library, either on the client side, or on the server side, + * to sanitize unsafe HTML before binding to the value and rendering it in the document. + * + * How would you ensure that every place that used these types of bindings was bound to a value that + * was sanitized by your library (or returned as safe for rendering by your server?) How can you + * ensure that you didn't accidentally delete the line that sanitized the value, or renamed some + * properties/fields and forgot to update the binding to the sanitized value? + * + * To be secure by default, AngularJS makes sure bindings go through that sanitization, or + * any similar validation process, unless there's a good reason to trust the given value in this + * context. That trust is formalized with a function call. This means that as a developer, you + * can assume all untrusted bindings are safe. Then, to audit your code for binding security issues, + * you just need to ensure the values you mark as trusted indeed are safe - because they were + * received from your server, sanitized by your library, etc. You can organize your codebase to + * help with this - perhaps allowing only the files in a specific directory to do this. + * Ensuring that the internal API exposed by that code doesn't markup arbitrary values as safe then + * becomes a more manageable task. + * + * In the case of AngularJS' SCE service, one uses {@link ng.$sce#trustAs $sce.trustAs} + * (and shorthand methods such as {@link ng.$sce#trustAsHtml $sce.trustAsHtml}, etc.) to + * build the trusted versions of your values. + * + * ## How does it work? + * + * In privileged contexts, directives and code will bind to the result of {@link ng.$sce#getTrusted + * $sce.getTrusted(context, value)} rather than to the value directly. Think of this function as + * a way to enforce the required security context in your data sink. Directives use {@link + * ng.$sce#parseAs $sce.parseAs} rather than `$parse` to watch attribute bindings, which performs + * the {@link ng.$sce#getTrusted $sce.getTrusted} behind the scenes on non-constant literals. Also, + * when binding without directives, AngularJS will understand the context of your bindings + * automatically. + * + * As an example, {@link ng.directive:ngBindHtml ngBindHtml} uses {@link + * ng.$sce#parseAsHtml $sce.parseAsHtml(binding expression)}. Here's the actual code (slightly + * simplified): + * + * ``` + * var ngBindHtmlDirective = ['$sce', function($sce) { + * return function(scope, element, attr) { + * scope.$watch($sce.parseAsHtml(attr.ngBindHtml), function(value) { + * element.html(value || ''); + * }); + * }; + * }]; + * ``` + * + * ## Impact on loading templates + * + * This applies both to the {@link ng.directive:ngInclude `ng-include`} directive as well as + * `templateUrl`'s specified by {@link guide/directive directives}. + * + * By default, Angular only loads templates from the same domain and protocol as the application + * document. This is done by calling {@link ng.$sce#getTrustedResourceUrl + * $sce.getTrustedResourceUrl} on the template URL. To load templates from other domains and/or + * protocols, you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist + * them} or {@link ng.$sce#trustAsResourceUrl wrap it} into a trusted value. + * + * *Please note*: + * The browser's + * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest) + * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/) + * policy apply in addition to this and may further restrict whether the template is successfully + * loaded. This means that without the right CORS policy, loading templates from a different domain + * won't work on all browsers. Also, loading templates from `file://` URL does not work on some + * browsers. + * + * ## This feels like too much overhead + * + * It's important to remember that SCE only applies to interpolation expressions. + * + * If your expressions are constant literals, they're automatically trusted and you don't need to + * call `$sce.trustAs` on them (e.g. + * `
`) just works. The `$sceDelegate` will + * also use the `$sanitize` service if it is available when binding untrusted values to + * `$sce.HTML` context. AngularJS provides an implementation in `angular-sanitize.js`, and if you + * wish to use it, you will also need to depend on the {@link ngSanitize `ngSanitize`} module in + * your application. + * + * The included {@link ng.$sceDelegate $sceDelegate} comes with sane defaults to allow you to load + * templates in `ng-include` from your application's domain without having to even know about SCE. + * It blocks loading templates from other domains or loading templates over http from an https + * served document. You can change these by setting your own custom {@link + * ng.$sceDelegateProvider#resourceUrlWhitelist whitelists} and {@link + * ng.$sceDelegateProvider#resourceUrlBlacklist blacklists} for matching such URLs. + * + * This significantly reduces the overhead. It is far easier to pay the small overhead and have an + * application that's secure and can be audited to verify that with much more ease than bolting + * security onto an application later. + * + * + * ## What trusted context types are supported? + * + * | Context | Notes | + * |---------------------|----------------| + * | `$sce.HTML` | For HTML that's safe to source into the application. The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. If an unsafe value is encountered, and the {@link ngSanitize.$sanitize $sanitize} service is available (implemented by the {@link ngSanitize ngSanitize} module) this will sanitize the value instead of throwing an error. | + * | `$sce.CSS` | For CSS that's safe to source into the application. Currently, no bindings require this context. Feel free to use it in your own directives. | + * | `$sce.URL` | For URLs that are safe to follow as links. Currently unused (`
Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` does (it's not just the URL that matters, but also what is at the end of it), and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` are required. | + * | `$sce.JS` | For JavaScript that is safe to execute in your application's context. Currently, no bindings require this context. Feel free to use it in your own directives. | + * + * + * Be aware that `a[href]` and `img[src]` automatically sanitize their URLs and do not pass them + * through {@link ng.$sce#getTrusted $sce.getTrusted}. There's no CSS-, URL-, or JS-context bindings + * in AngularJS currently, so their corresponding `$sce.trustAs` functions aren't useful yet. This + * might evolve. + * + * ## Format of items in {@link ng.$sceDelegateProvider#resourceUrlWhitelist resourceUrlWhitelist}/{@link ng.$sceDelegateProvider#resourceUrlBlacklist Blacklist}
+ * + * Each element in these arrays must be one of the following: + * + * - **'self'** + * - The special **string**, `'self'`, can be used to match against all URLs of the **same + * domain** as the application document using the **same protocol**. + * - **String** (except the special value `'self'`) + * - The string is matched against the full *normalized / absolute URL* of the resource + * being tested (substring matches are not good enough.) + * - There are exactly **two wildcard sequences** - `*` and `**`. All other characters + * match themselves. + * - `*`: matches zero or more occurrences of any character other than one of the following 6 + * characters: '`:`', '`/`', '`.`', '`?`', '`&`' and '`;`'. It's a useful wildcard for use + * in a whitelist. + * - `**`: matches zero or more occurrences of *any* character. As such, it's not + * appropriate for use in a scheme, domain, etc. as it would match too much. (e.g. + * http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might + * not have been the intention.) Its usage at the very end of the path is ok. (e.g. + * http://foo.example.com/templates/**). + * - **RegExp** (*see caveat below*) + * - *Caveat*: While regular expressions are powerful and offer great flexibility, their syntax + * (and all the inevitable escaping) makes them *harder to maintain*. It's easy to + * accidentally introduce a bug when one updates a complex expression (imho, all regexes should + * have good test coverage). For instance, the use of `.` in the regex is correct only in a + * small number of cases. A `.` character in the regex used when matching the scheme or a + * subdomain could be matched against a `:` or literal `.` that was likely not intended. It + * is highly recommended to use the string patterns and only fall back to regular expressions + * as a last resort. + * - The regular expression must be an instance of RegExp (i.e. not a string.) It is + * matched against the **entire** *normalized / absolute URL* of the resource being tested + * (even when the RegExp did not have the `^` and `$` codes.) In addition, any flags + * present on the RegExp (such as multiline, global, ignoreCase) are ignored. + * - If you are generating your JavaScript from some other templating engine (not + * recommended, e.g. in issue [#4006](https://github.com/angular/angular.js/issues/4006)), + * remember to escape your regular expression (and be aware that you might need more than + * one level of escaping depending on your templating engine and the way you interpolated + * the value.) Do make use of your platform's escaping mechanism as it might be good + * enough before coding your own. E.g. Ruby has + * [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape) + * and Python has [re.escape](http://docs.python.org/library/re.html#re.escape). + * Javascript lacks a similar built in function for escaping. Take a look at Google + * Closure library's [goog.string.regExpEscape(s)]( + * http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962). + * + * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} for an example. + * + * ## Show me an example using SCE. + * + * + * + *
+ *

+ * User comments
+ * By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when + * $sanitize is available. If $sanitize isn't available, this results in an error instead of an + * exploit. + *
+ *
+ * {{userComment.name}}: + * + *
+ *
+ *
+ *
+ *
+ * + * + * angular.module('mySceApp', ['ngSanitize']) + * .controller('AppController', ['$http', '$templateCache', '$sce', + * function AppController($http, $templateCache, $sce) { + * var self = this; + * $http.get('test_data.json', {cache: $templateCache}).then(function(response) { + * self.userComments = response.data; + * }); + * self.explicitlyTrustedHtml = $sce.trustAsHtml( + * 'Hover over this text.'); + * }]); + * + * + * + * [ + * { "name": "Alice", + * "htmlComment": + * "Is anyone reading this?" + * }, + * { "name": "Bob", + * "htmlComment": "Yes! Am I the only other one?" + * } + * ] + * + * + * + * describe('SCE doc demo', function() { + * it('should sanitize untrusted values', function() { + * expect(element.all(by.css('.htmlComment')).first().getAttribute('innerHTML')) + * .toBe('Is anyone reading this?'); + * }); + * + * it('should NOT sanitize explicitly trusted values', function() { + * expect(element(by.id('explicitlyTrustedHtml')).getAttribute('innerHTML')).toBe( + * 'Hover over this text.'); + * }); + * }); + * + *
+ * + * + * + * ## Can I disable SCE completely? + * + * Yes, you can. However, this is strongly discouraged. SCE gives you a lot of security benefits + * for little coding overhead. It will be much harder to take an SCE disabled application and + * either secure it on your own or enable SCE at a later stage. It might make sense to disable SCE + * for cases where you have a lot of existing code that was written before SCE was introduced and + * you're migrating them a module at a time. Also do note that this is an app-wide setting, so if + * you are writing a library, you will cause security bugs applications using it. + * + * That said, here's how you can completely disable SCE: + * + * ``` + * angular.module('myAppWithSceDisabledmyApp', []).config(function($sceProvider) { + * // Completely disable SCE. For demonstration purposes only! + * // Do not use in new projects or libraries. + * $sceProvider.enabled(false); + * }); + * ``` + * + */ + +function $SceProvider() { + var enabled = true; + + /** + * @ngdoc method + * @name $sceProvider#enabled + * @kind function + * + * @param {boolean=} value If provided, then enables/disables SCE application-wide. + * @return {boolean} True if SCE is enabled, false otherwise. + * + * @description + * Enables/disables SCE and returns the current value. + */ + this.enabled = function(value) { + if (arguments.length) { + enabled = !!value; + } + return enabled; + }; + + + /* Design notes on the default implementation for SCE. + * + * The API contract for the SCE delegate + * ------------------------------------- + * The SCE delegate object must provide the following 3 methods: + * + * - trustAs(contextEnum, value) + * This method is used to tell the SCE service that the provided value is OK to use in the + * contexts specified by contextEnum. It must return an object that will be accepted by + * getTrusted() for a compatible contextEnum and return this value. + * + * - valueOf(value) + * For values that were not produced by trustAs(), return them as is. For values that were + * produced by trustAs(), return the corresponding input value to trustAs. Basically, if + * trustAs is wrapping the given values into some type, this operation unwraps it when given + * such a value. + * + * - getTrusted(contextEnum, value) + * This function should return the a value that is safe to use in the context specified by + * contextEnum or throw and exception otherwise. + * + * NOTE: This contract deliberately does NOT state that values returned by trustAs() must be + * opaque or wrapped in some holder object. That happens to be an implementation detail. For + * instance, an implementation could maintain a registry of all trusted objects by context. In + * such a case, trustAs() would return the same object that was passed in. getTrusted() would + * return the same object passed in if it was found in the registry under a compatible context or + * throw an exception otherwise. An implementation might only wrap values some of the time based + * on some criteria. getTrusted() might return a value and not throw an exception for special + * constants or objects even if not wrapped. All such implementations fulfill this contract. + * + * + * A note on the inheritance model for SCE contexts + * ------------------------------------------------ + * I've used inheritance and made RESOURCE_URL wrapped types a subtype of URL wrapped types. This + * is purely an implementation details. + * + * The contract is simply this: + * + * getTrusted($sce.RESOURCE_URL, value) succeeding implies that getTrusted($sce.URL, value) + * will also succeed. + * + * Inheritance happens to capture this in a natural way. In some future, we may not use + * inheritance anymore. That is OK because no code outside of sce.js and sceSpecs.js would need to + * be aware of this detail. + */ + + this.$get = ['$parse', '$sceDelegate', function( + $parse, $sceDelegate) { + // Support: IE 9-11 only + // Prereq: Ensure that we're not running in IE<11 quirks mode. In that mode, IE < 11 allow + // the "expression(javascript expression)" syntax which is insecure. + if (enabled && msie < 8) { + throw $sceMinErr('iequirks', + 'Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks ' + + 'mode. You can fix this by adding the text to the top of your HTML ' + + 'document. See http://docs.angularjs.org/api/ng.$sce for more information.'); + } + + var sce = shallowCopy(SCE_CONTEXTS); + + /** + * @ngdoc method + * @name $sce#isEnabled + * @kind function + * + * @return {Boolean} True if SCE is enabled, false otherwise. If you want to set the value, you + * have to do it at module config time on {@link ng.$sceProvider $sceProvider}. + * + * @description + * Returns a boolean indicating if SCE is enabled. + */ + sce.isEnabled = function() { + return enabled; + }; + sce.trustAs = $sceDelegate.trustAs; + sce.getTrusted = $sceDelegate.getTrusted; + sce.valueOf = $sceDelegate.valueOf; + + if (!enabled) { + sce.trustAs = sce.getTrusted = function(type, value) { return value; }; + sce.valueOf = identity; + } + + /** + * @ngdoc method + * @name $sce#parseAs + * + * @description + * Converts Angular {@link guide/expression expression} into a function. This is like {@link + * ng.$parse $parse} and is identical when the expression is a literal constant. Otherwise, it + * wraps the expression in a call to {@link ng.$sce#getTrusted $sce.getTrusted(*type*, + * *result*)} + * + * @param {string} type The SCE context in which this result will be used. + * @param {string} expression String expression to compile. + * @return {function(context, locals)} A function which represents the compiled expression: + * + * * `context` – `{object}` – an object against which any expressions embedded in the + * strings are evaluated against (typically a scope object). + * * `locals` – `{object=}` – local variables context object, useful for overriding values + * in `context`. + */ + sce.parseAs = function sceParseAs(type, expr) { + var parsed = $parse(expr); + if (parsed.literal && parsed.constant) { + return parsed; + } else { + return $parse(expr, function(value) { + return sce.getTrusted(type, value); + }); + } + }; + + /** + * @ngdoc method + * @name $sce#trustAs + * + * @description + * Delegates to {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}. As such, returns a + * wrapped object that represents your value, and the trust you have in its safety for the given + * context. AngularJS can then use that value as-is in bindings of the specified secure context. + * This is used in bindings for `ng-bind-html`, `ng-include`, and most `src` attribute + * interpolations. See {@link ng.$sce $sce} for strict contextual escaping. + * + * @param {string} type The context in which this value is safe for use, e.g. `$sce.URL`, + * `$sce.RESOURCE_URL`, `$sce.HTML`, `$sce.JS` or `$sce.CSS`. + * + * @param {*} value The value that that should be considered trusted. + * @return {*} A wrapped version of value that can be used as a trusted variant of your `value` + * in the context you specified. + */ + + /** + * @ngdoc method + * @name $sce#trustAsHtml + * + * @description + * Shorthand method. `$sce.trustAsHtml(value)` → + * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.HTML, value)`} + * + * @param {*} value The value to mark as trusted for `$sce.HTML` context. + * @return {*} A wrapped version of value that can be used as a trusted variant of your `value` + * in `$sce.HTML` context (like `ng-bind-html`). + */ + + /** + * @ngdoc method + * @name $sce#trustAsCss + * + * @description + * Shorthand method. `$sce.trustAsCss(value)` → + * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.CSS, value)`} + * + * @param {*} value The value to mark as trusted for `$sce.CSS` context. + * @return {*} A wrapped version of value that can be used as a trusted variant + * of your `value` in `$sce.CSS` context. This context is currently unused, so there are + * almost no reasons to use this function so far. + */ + + /** + * @ngdoc method + * @name $sce#trustAsUrl + * + * @description + * Shorthand method. `$sce.trustAsUrl(value)` → + * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.URL, value)`} + * + * @param {*} value The value to mark as trusted for `$sce.URL` context. + * @return {*} A wrapped version of value that can be used as a trusted variant of your `value` + * in `$sce.URL` context. That context is currently unused, so there are almost no reasons + * to use this function so far. + */ + + /** + * @ngdoc method + * @name $sce#trustAsResourceUrl + * + * @description + * Shorthand method. `$sce.trustAsResourceUrl(value)` → + * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.RESOURCE_URL, value)`} + * + * @param {*} value The value to mark as trusted for `$sce.RESOURCE_URL` context. + * @return {*} A wrapped version of value that can be used as a trusted variant of your `value` + * in `$sce.RESOURCE_URL` context (template URLs in `ng-include`, most `src` attribute + * bindings, ...) + */ + + /** + * @ngdoc method + * @name $sce#trustAsJs + * + * @description + * Shorthand method. `$sce.trustAsJs(value)` → + * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.JS, value)`} + * + * @param {*} value The value to mark as trusted for `$sce.JS` context. + * @return {*} A wrapped version of value that can be used as a trusted variant of your `value` + * in `$sce.JS` context. That context is currently unused, so there are almost no reasons to + * use this function so far. + */ + + /** + * @ngdoc method + * @name $sce#getTrusted + * + * @description + * Delegates to {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted`}. As such, + * takes any input, and either returns a value that's safe to use in the specified context, + * or throws an exception. This function is aware of trusted values created by the `trustAs` + * function and its shorthands, and when contexts are appropriate, returns the unwrapped value + * as-is. Finally, this function can also throw when there is no way to turn `maybeTrusted` in a + * safe value (e.g., no sanitization is available or possible.) + * + * @param {string} type The context in which this value is to be used. + * @param {*} maybeTrusted The result of a prior {@link ng.$sce#trustAs + * `$sce.trustAs`} call, or anything else (which will not be considered trusted.) + * @return {*} A version of the value that's safe to use in the given context, or throws an + * exception if this is impossible. + */ + + /** + * @ngdoc method + * @name $sce#getTrustedHtml + * + * @description + * Shorthand method. `$sce.getTrustedHtml(value)` → + * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.HTML, value)`} + * + * @param {*} value The value to pass to `$sce.getTrusted`. + * @return {*} The return value of `$sce.getTrusted($sce.HTML, value)` + */ + + /** + * @ngdoc method + * @name $sce#getTrustedCss + * + * @description + * Shorthand method. `$sce.getTrustedCss(value)` → + * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.CSS, value)`} + * + * @param {*} value The value to pass to `$sce.getTrusted`. + * @return {*} The return value of `$sce.getTrusted($sce.CSS, value)` + */ + + /** + * @ngdoc method + * @name $sce#getTrustedUrl + * + * @description + * Shorthand method. `$sce.getTrustedUrl(value)` → + * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.URL, value)`} + * + * @param {*} value The value to pass to `$sce.getTrusted`. + * @return {*} The return value of `$sce.getTrusted($sce.URL, value)` + */ + + /** + * @ngdoc method + * @name $sce#getTrustedResourceUrl + * + * @description + * Shorthand method. `$sce.getTrustedResourceUrl(value)` → + * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.RESOURCE_URL, value)`} + * + * @param {*} value The value to pass to `$sceDelegate.getTrusted`. + * @return {*} The return value of `$sce.getTrusted($sce.RESOURCE_URL, value)` + */ + + /** + * @ngdoc method + * @name $sce#getTrustedJs + * + * @description + * Shorthand method. `$sce.getTrustedJs(value)` → + * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.JS, value)`} + * + * @param {*} value The value to pass to `$sce.getTrusted`. + * @return {*} The return value of `$sce.getTrusted($sce.JS, value)` + */ + + /** + * @ngdoc method + * @name $sce#parseAsHtml + * + * @description + * Shorthand method. `$sce.parseAsHtml(expression string)` → + * {@link ng.$sce#parseAs `$sce.parseAs($sce.HTML, value)`} + * + * @param {string} expression String expression to compile. + * @return {function(context, locals)} A function which represents the compiled expression: + * + * * `context` – `{object}` – an object against which any expressions embedded in the + * strings are evaluated against (typically a scope object). + * * `locals` – `{object=}` – local variables context object, useful for overriding values + * in `context`. + */ + + /** + * @ngdoc method + * @name $sce#parseAsCss + * + * @description + * Shorthand method. `$sce.parseAsCss(value)` → + * {@link ng.$sce#parseAs `$sce.parseAs($sce.CSS, value)`} + * + * @param {string} expression String expression to compile. + * @return {function(context, locals)} A function which represents the compiled expression: + * + * * `context` – `{object}` – an object against which any expressions embedded in the + * strings are evaluated against (typically a scope object). + * * `locals` – `{object=}` – local variables context object, useful for overriding values + * in `context`. + */ + + /** + * @ngdoc method + * @name $sce#parseAsUrl + * + * @description + * Shorthand method. `$sce.parseAsUrl(value)` → + * {@link ng.$sce#parseAs `$sce.parseAs($sce.URL, value)`} + * + * @param {string} expression String expression to compile. + * @return {function(context, locals)} A function which represents the compiled expression: + * + * * `context` – `{object}` – an object against which any expressions embedded in the + * strings are evaluated against (typically a scope object). + * * `locals` – `{object=}` – local variables context object, useful for overriding values + * in `context`. + */ + + /** + * @ngdoc method + * @name $sce#parseAsResourceUrl + * + * @description + * Shorthand method. `$sce.parseAsResourceUrl(value)` → + * {@link ng.$sce#parseAs `$sce.parseAs($sce.RESOURCE_URL, value)`} + * + * @param {string} expression String expression to compile. + * @return {function(context, locals)} A function which represents the compiled expression: + * + * * `context` – `{object}` – an object against which any expressions embedded in the + * strings are evaluated against (typically a scope object). + * * `locals` – `{object=}` – local variables context object, useful for overriding values + * in `context`. + */ + + /** + * @ngdoc method + * @name $sce#parseAsJs + * + * @description + * Shorthand method. `$sce.parseAsJs(value)` → + * {@link ng.$sce#parseAs `$sce.parseAs($sce.JS, value)`} + * + * @param {string} expression String expression to compile. + * @return {function(context, locals)} A function which represents the compiled expression: + * + * * `context` – `{object}` – an object against which any expressions embedded in the + * strings are evaluated against (typically a scope object). + * * `locals` – `{object=}` – local variables context object, useful for overriding values + * in `context`. + */ + + // Shorthand delegations. + var parse = sce.parseAs, + getTrusted = sce.getTrusted, + trustAs = sce.trustAs; + + forEach(SCE_CONTEXTS, function(enumValue, name) { + var lName = lowercase(name); + sce[snakeToCamel('parse_as_' + lName)] = function(expr) { + return parse(enumValue, expr); + }; + sce[snakeToCamel('get_trusted_' + lName)] = function(value) { + return getTrusted(enumValue, value); + }; + sce[snakeToCamel('trust_as_' + lName)] = function(value) { + return trustAs(enumValue, value); + }; + }); + + return sce; + }]; +} + +/* exported $SnifferProvider */ + +/** + * !!! This is an undocumented "private" service !!! + * + * @name $sniffer + * @requires $window + * @requires $document + * @this + * + * @property {boolean} history Does the browser support html5 history api ? + * @property {boolean} transitions Does the browser support CSS transition events ? + * @property {boolean} animations Does the browser support CSS animation events ? + * + * @description + * This is very simple implementation of testing browser's features. + */ +function $SnifferProvider() { + this.$get = ['$window', '$document', function($window, $document) { + var eventSupport = {}, + // Chrome Packaged Apps are not allowed to access `history.pushState`. + // If not sandboxed, they can be detected by the presence of `chrome.app.runtime` + // (see https://developer.chrome.com/apps/api_index). If sandboxed, they can be detected by + // the presence of an extension runtime ID and the absence of other Chrome runtime APIs + // (see https://developer.chrome.com/apps/manifest/sandbox). + // (NW.js apps have access to Chrome APIs, but do support `history`.) + isNw = $window.nw && $window.nw.process, + isChromePackagedApp = + !isNw && + $window.chrome && + ($window.chrome.app && $window.chrome.app.runtime || + !$window.chrome.app && $window.chrome.runtime && $window.chrome.runtime.id), + hasHistoryPushState = !isChromePackagedApp && $window.history && $window.history.pushState, + android = + toInt((/android (\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]), + boxee = /Boxee/i.test(($window.navigator || {}).userAgent), + document = $document[0] || {}, + bodyStyle = document.body && document.body.style, + transitions = false, + animations = false; + + if (bodyStyle) { + // Support: Android <5, Blackberry Browser 10, default Chrome in Android 4.4.x + // Mentioned browsers need a -webkit- prefix for transitions & animations. + transitions = !!('transition' in bodyStyle || 'webkitTransition' in bodyStyle); + animations = !!('animation' in bodyStyle || 'webkitAnimation' in bodyStyle); + } + + + return { + // Android has history.pushState, but it does not update location correctly + // so let's not use the history API at all. + // http://code.google.com/p/android/issues/detail?id=17471 + // https://github.com/angular/angular.js/issues/904 + + // older webkit browser (533.9) on Boxee box has exactly the same problem as Android has + // so let's not use the history API also + // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined + history: !!(hasHistoryPushState && !(android < 4) && !boxee), + hasEvent: function(event) { + // Support: IE 9-11 only + // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have + // it. In particular the event is not fired when backspace or delete key are pressed or + // when cut operation is performed. + // IE10+ implements 'input' event but it erroneously fires under various situations, + // e.g. when placeholder changes, or a form is focused. + if (event === 'input' && msie) return false; + + if (isUndefined(eventSupport[event])) { + var divElm = document.createElement('div'); + eventSupport[event] = 'on' + event in divElm; + } + + return eventSupport[event]; + }, + csp: csp(), + transitions: transitions, + animations: animations, + android: android + }; + }]; +} + +var $templateRequestMinErr = minErr('$compile'); + +/** + * @ngdoc provider + * @name $templateRequestProvider + * @this + * + * @description + * Used to configure the options passed to the {@link $http} service when making a template request. + * + * For example, it can be used for specifying the "Accept" header that is sent to the server, when + * requesting a template. + */ +function $TemplateRequestProvider() { + + var httpOptions; + + /** + * @ngdoc method + * @name $templateRequestProvider#httpOptions + * @description + * The options to be passed to the {@link $http} service when making the request. + * You can use this to override options such as the "Accept" header for template requests. + * + * The {@link $templateRequest} will set the `cache` and the `transformResponse` properties of the + * options if not overridden here. + * + * @param {string=} value new value for the {@link $http} options. + * @returns {string|self} Returns the {@link $http} options when used as getter and self if used as setter. + */ + this.httpOptions = function(val) { + if (val) { + httpOptions = val; + return this; + } + return httpOptions; + }; + + /** + * @ngdoc service + * @name $templateRequest + * + * @description + * The `$templateRequest` service runs security checks then downloads the provided template using + * `$http` and, upon success, stores the contents inside of `$templateCache`. If the HTTP request + * fails or the response data of the HTTP request is empty, a `$compile` error will be thrown (the + * exception can be thwarted by setting the 2nd parameter of the function to true). Note that the + * contents of `$templateCache` are trusted, so the call to `$sce.getTrustedUrl(tpl)` is omitted + * when `tpl` is of type string and `$templateCache` has the matching entry. + * + * If you want to pass custom options to the `$http` service, such as setting the Accept header you + * can configure this via {@link $templateRequestProvider#httpOptions}. + * + * @param {string|TrustedResourceUrl} tpl The HTTP request template URL + * @param {boolean=} ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty + * + * @return {Promise} a promise for the HTTP response data of the given URL. + * + * @property {number} totalPendingRequests total amount of pending template requests being downloaded. + */ + this.$get = ['$exceptionHandler', '$templateCache', '$http', '$q', '$sce', + function($exceptionHandler, $templateCache, $http, $q, $sce) { + + function handleRequestFn(tpl, ignoreRequestError) { + handleRequestFn.totalPendingRequests++; + + // We consider the template cache holds only trusted templates, so + // there's no need to go through whitelisting again for keys that already + // are included in there. This also makes Angular accept any script + // directive, no matter its name. However, we still need to unwrap trusted + // types. + if (!isString(tpl) || isUndefined($templateCache.get(tpl))) { + tpl = $sce.getTrustedResourceUrl(tpl); + } + + var transformResponse = $http.defaults && $http.defaults.transformResponse; + + if (isArray(transformResponse)) { + transformResponse = transformResponse.filter(function(transformer) { + return transformer !== defaultHttpResponseTransform; + }); + } else if (transformResponse === defaultHttpResponseTransform) { + transformResponse = null; + } + + return $http.get(tpl, extend({ + cache: $templateCache, + transformResponse: transformResponse + }, httpOptions)) + .finally(function() { + handleRequestFn.totalPendingRequests--; + }) + .then(function(response) { + $templateCache.put(tpl, response.data); + return response.data; + }, handleError); + + function handleError(resp) { + if (!ignoreRequestError) { + resp = $templateRequestMinErr('tpload', + 'Failed to load template: {0} (HTTP status: {1} {2})', + tpl, resp.status, resp.statusText); + + $exceptionHandler(resp); + } + + return $q.reject(resp); + } + } + + handleRequestFn.totalPendingRequests = 0; + + return handleRequestFn; + } + ]; +} + +/** @this */ +function $$TestabilityProvider() { + this.$get = ['$rootScope', '$browser', '$location', + function($rootScope, $browser, $location) { + + /** + * @name $testability + * + * @description + * The private $$testability service provides a collection of methods for use when debugging + * or by automated test and debugging tools. + */ + var testability = {}; + + /** + * @name $$testability#findBindings + * + * @description + * Returns an array of elements that are bound (via ng-bind or {{}}) + * to expressions matching the input. + * + * @param {Element} element The element root to search from. + * @param {string} expression The binding expression to match. + * @param {boolean} opt_exactMatch If true, only returns exact matches + * for the expression. Filters and whitespace are ignored. + */ + testability.findBindings = function(element, expression, opt_exactMatch) { + var bindings = element.getElementsByClassName('ng-binding'); + var matches = []; + forEach(bindings, function(binding) { + var dataBinding = angular.element(binding).data('$binding'); + if (dataBinding) { + forEach(dataBinding, function(bindingName) { + if (opt_exactMatch) { + var matcher = new RegExp('(^|\\s)' + escapeForRegexp(expression) + '(\\s|\\||$)'); + if (matcher.test(bindingName)) { + matches.push(binding); + } + } else { + if (bindingName.indexOf(expression) !== -1) { + matches.push(binding); + } + } + }); + } + }); + return matches; + }; + + /** + * @name $$testability#findModels + * + * @description + * Returns an array of elements that are two-way found via ng-model to + * expressions matching the input. + * + * @param {Element} element The element root to search from. + * @param {string} expression The model expression to match. + * @param {boolean} opt_exactMatch If true, only returns exact matches + * for the expression. + */ + testability.findModels = function(element, expression, opt_exactMatch) { + var prefixes = ['ng-', 'data-ng-', 'ng\\:']; + for (var p = 0; p < prefixes.length; ++p) { + var attributeEquals = opt_exactMatch ? '=' : '*='; + var selector = '[' + prefixes[p] + 'model' + attributeEquals + '"' + expression + '"]'; + var elements = element.querySelectorAll(selector); + if (elements.length) { + return elements; + } + } + }; + + /** + * @name $$testability#getLocation + * + * @description + * Shortcut for getting the location in a browser agnostic way. Returns + * the path, search, and hash. (e.g. /path?a=b#hash) + */ + testability.getLocation = function() { + return $location.url(); + }; + + /** + * @name $$testability#setLocation + * + * @description + * Shortcut for navigating to a location without doing a full page reload. + * + * @param {string} url The location url (path, search and hash, + * e.g. /path?a=b#hash) to go to. + */ + testability.setLocation = function(url) { + if (url !== $location.url()) { + $location.url(url); + $rootScope.$digest(); + } + }; + + /** + * @name $$testability#whenStable + * + * @description + * Calls the callback when $timeout and $http requests are completed. + * + * @param {function} callback + */ + testability.whenStable = function(callback) { + $browser.notifyWhenNoOutstandingRequests(callback); + }; + + return testability; + }]; +} + +/** @this */ +function $TimeoutProvider() { + this.$get = ['$rootScope', '$browser', '$q', '$$q', '$exceptionHandler', + function($rootScope, $browser, $q, $$q, $exceptionHandler) { + + var deferreds = {}; + + + /** + * @ngdoc service + * @name $timeout + * + * @description + * Angular's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch + * block and delegates any exceptions to + * {@link ng.$exceptionHandler $exceptionHandler} service. + * + * The return value of calling `$timeout` is a promise, which will be resolved when + * the delay has passed and the timeout function, if provided, is executed. + * + * To cancel a timeout request, call `$timeout.cancel(promise)`. + * + * In tests you can use {@link ngMock.$timeout `$timeout.flush()`} to + * synchronously flush the queue of deferred functions. + * + * If you only want a promise that will be resolved after some specified delay + * then you can call `$timeout` without the `fn` function. + * + * @param {function()=} fn A function, whose execution should be delayed. + * @param {number=} [delay=0] Delay in milliseconds. + * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise + * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block. + * @param {...*=} Pass additional parameters to the executed function. + * @returns {Promise} Promise that will be resolved when the timeout is reached. The promise + * will be resolved with the return value of the `fn` function. + * + */ + function timeout(fn, delay, invokeApply) { + if (!isFunction(fn)) { + invokeApply = delay; + delay = fn; + fn = noop; + } + + var args = sliceArgs(arguments, 3), + skipApply = (isDefined(invokeApply) && !invokeApply), + deferred = (skipApply ? $$q : $q).defer(), + promise = deferred.promise, + timeoutId; + + timeoutId = $browser.defer(function() { + try { + deferred.resolve(fn.apply(null, args)); + } catch (e) { + deferred.reject(e); + $exceptionHandler(e); + } finally { + delete deferreds[promise.$$timeoutId]; + } + + if (!skipApply) $rootScope.$apply(); + }, delay); + + promise.$$timeoutId = timeoutId; + deferreds[timeoutId] = deferred; + + return promise; + } + + + /** + * @ngdoc method + * @name $timeout#cancel + * + * @description + * Cancels a task associated with the `promise`. As a result of this, the promise will be + * resolved with a rejection. + * + * @param {Promise=} promise Promise returned by the `$timeout` function. + * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully + * canceled. + */ + timeout.cancel = function(promise) { + if (promise && promise.$$timeoutId in deferreds) { + // Timeout cancels should not report an unhandled promise. + markQExceptionHandled(deferreds[promise.$$timeoutId].promise); + deferreds[promise.$$timeoutId].reject('canceled'); + delete deferreds[promise.$$timeoutId]; + return $browser.defer.cancel(promise.$$timeoutId); + } + return false; + }; + + return timeout; + }]; +} + +// NOTE: The usage of window and document instead of $window and $document here is +// deliberate. This service depends on the specific behavior of anchor nodes created by the +// browser (resolving and parsing URLs) that is unlikely to be provided by mock objects and +// cause us to break tests. In addition, when the browser resolves a URL for XHR, it +// doesn't know about mocked locations and resolves URLs to the real document - which is +// exactly the behavior needed here. There is little value is mocking these out for this +// service. +var urlParsingNode = window.document.createElement('a'); +var originUrl = urlResolve(window.location.href); + + +/** + * + * Implementation Notes for non-IE browsers + * ---------------------------------------- + * Assigning a URL to the href property of an anchor DOM node, even one attached to the DOM, + * results both in the normalizing and parsing of the URL. Normalizing means that a relative + * URL will be resolved into an absolute URL in the context of the application document. + * Parsing means that the anchor node's host, hostname, protocol, port, pathname and related + * properties are all populated to reflect the normalized URL. This approach has wide + * compatibility - Safari 1+, Mozilla 1+ etc. See + * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html + * + * Implementation Notes for IE + * --------------------------- + * IE <= 10 normalizes the URL when assigned to the anchor node similar to the other + * browsers. However, the parsed components will not be set if the URL assigned did not specify + * them. (e.g. if you assign a.href = "foo", then a.protocol, a.host, etc. will be empty.) We + * work around that by performing the parsing in a 2nd step by taking a previously normalized + * URL (e.g. by assigning to a.href) and assigning it a.href again. This correctly populates the + * properties such as protocol, hostname, port, etc. + * + * References: + * http://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement + * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html + * http://url.spec.whatwg.org/#urlutils + * https://github.com/angular/angular.js/pull/2902 + * http://james.padolsey.com/javascript/parsing-urls-with-the-dom/ + * + * @kind function + * @param {string} url The URL to be parsed. + * @description Normalizes and parses a URL. + * @returns {object} Returns the normalized URL as a dictionary. + * + * | member name | Description | + * |---------------|----------------| + * | href | A normalized version of the provided URL if it was not an absolute URL | + * | protocol | The protocol including the trailing colon | + * | host | The host and port (if the port is non-default) of the normalizedUrl | + * | search | The search params, minus the question mark | + * | hash | The hash string, minus the hash symbol + * | hostname | The hostname + * | port | The port, without ":" + * | pathname | The pathname, beginning with "/" + * + */ +function urlResolve(url) { + var href = url; + + // Support: IE 9-11 only + if (msie) { + // Normalize before parse. Refer Implementation Notes on why this is + // done in two steps on IE. + urlParsingNode.setAttribute('href', href); + href = urlParsingNode.href; + } + + urlParsingNode.setAttribute('href', href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: (urlParsingNode.pathname.charAt(0) === '/') + ? urlParsingNode.pathname + : '/' + urlParsingNode.pathname + }; +} + +/** + * Parse a request URL and determine whether this is a same-origin request as the application document. + * + * @param {string|object} requestUrl The url of the request as a string that will be resolved + * or a parsed URL object. + * @returns {boolean} Whether the request is for the same origin as the application document. + */ +function urlIsSameOrigin(requestUrl) { + var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl; + return (parsed.protocol === originUrl.protocol && + parsed.host === originUrl.host); +} + +/** + * @ngdoc service + * @name $window + * @this + * + * @description + * A reference to the browser's `window` object. While `window` + * is globally available in JavaScript, it causes testability problems, because + * it is a global variable. In angular we always refer to it through the + * `$window` service, so it may be overridden, removed or mocked for testing. + * + * Expressions, like the one defined for the `ngClick` directive in the example + * below, are evaluated with respect to the current scope. Therefore, there is + * no risk of inadvertently coding in a dependency on a global value in such an + * expression. + * + * @example + + + +
+ + +
+
+ + it('should display the greeting in the input box', function() { + element(by.model('greeting')).sendKeys('Hello, E2E Tests'); + // If we click the button it will block the test runner + // element(':button').click(); + }); + +
+ */ +function $WindowProvider() { + this.$get = valueFn(window); +} + +/** + * @name $$cookieReader + * @requires $document + * + * @description + * This is a private service for reading cookies used by $http and ngCookies + * + * @return {Object} a key/value map of the current cookies + */ +function $$CookieReader($document) { + var rawDocument = $document[0] || {}; + var lastCookies = {}; + var lastCookieString = ''; + + function safeGetCookie(rawDocument) { + try { + return rawDocument.cookie || ''; + } catch (e) { + return ''; + } + } + + function safeDecodeURIComponent(str) { + try { + return decodeURIComponent(str); + } catch (e) { + return str; + } + } + + return function() { + var cookieArray, cookie, i, index, name; + var currentCookieString = safeGetCookie(rawDocument); + + if (currentCookieString !== lastCookieString) { + lastCookieString = currentCookieString; + cookieArray = lastCookieString.split('; '); + lastCookies = {}; + + for (i = 0; i < cookieArray.length; i++) { + cookie = cookieArray[i]; + index = cookie.indexOf('='); + if (index > 0) { //ignore nameless cookies + name = safeDecodeURIComponent(cookie.substring(0, index)); + // the first value that is seen for a cookie is the most + // specific one. values for the same cookie name that + // follow are for less specific paths. + if (isUndefined(lastCookies[name])) { + lastCookies[name] = safeDecodeURIComponent(cookie.substring(index + 1)); + } + } + } + } + return lastCookies; + }; +} + +$$CookieReader.$inject = ['$document']; + +/** @this */ +function $$CookieReaderProvider() { + this.$get = $$CookieReader; +} + +/* global currencyFilter: true, + dateFilter: true, + filterFilter: true, + jsonFilter: true, + limitToFilter: true, + lowercaseFilter: true, + numberFilter: true, + orderByFilter: true, + uppercaseFilter: true, + */ + +/** + * @ngdoc provider + * @name $filterProvider + * @description + * + * Filters are just functions which transform input to an output. However filters need to be + * Dependency Injected. To achieve this a filter definition consists of a factory function which is + * annotated with dependencies and is responsible for creating a filter function. + * + *
+ * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`. + * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace + * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores + * (`myapp_subsection_filterx`). + *
+ * + * ```js + * // Filter registration + * function MyModule($provide, $filterProvider) { + * // create a service to demonstrate injection (not always needed) + * $provide.value('greet', function(name){ + * return 'Hello ' + name + '!'; + * }); + * + * // register a filter factory which uses the + * // greet service to demonstrate DI. + * $filterProvider.register('greet', function(greet){ + * // return the filter function which uses the greet service + * // to generate salutation + * return function(text) { + * // filters need to be forgiving so check input validity + * return text && greet(text) || text; + * }; + * }); + * } + * ``` + * + * The filter function is registered with the `$injector` under the filter name suffix with + * `Filter`. + * + * ```js + * it('should be the same instance', inject( + * function($filterProvider) { + * $filterProvider.register('reverse', function(){ + * return ...; + * }); + * }, + * function($filter, reverseFilter) { + * expect($filter('reverse')).toBe(reverseFilter); + * }); + * ``` + * + * + * For more information about how angular filters work, and how to create your own filters, see + * {@link guide/filter Filters} in the Angular Developer Guide. + */ + +/** + * @ngdoc service + * @name $filter + * @kind function + * @description + * Filters are used for formatting data displayed to the user. + * + * They can be used in view templates, controllers or services.Angular comes + * with a collection of [built-in filters](api/ng/filter), but it is easy to + * define your own as well. + * + * The general syntax in templates is as follows: + * + * ```html + * {{ expression [| filter_name[:parameter_value] ... ] }} + * ``` + * + * @param {String} name Name of the filter function to retrieve + * @return {Function} the filter function + * @example + + +
+

{{ originalText }}

+

{{ filteredText }}

+
+
+ + + angular.module('filterExample', []) + .controller('MainCtrl', function($scope, $filter) { + $scope.originalText = 'hello'; + $scope.filteredText = $filter('uppercase')($scope.originalText); + }); + +
+ */ +$FilterProvider.$inject = ['$provide']; +/** @this */ +function $FilterProvider($provide) { + var suffix = 'Filter'; + + /** + * @ngdoc method + * @name $filterProvider#register + * @param {string|Object} name Name of the filter function, or an object map of filters where + * the keys are the filter names and the values are the filter factories. + * + *
+ * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`. + * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace + * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores + * (`myapp_subsection_filterx`). + *
+ * @param {Function} factory If the first argument was a string, a factory function for the filter to be registered. + * @returns {Object} Registered filter instance, or if a map of filters was provided then a map + * of the registered filter instances. + */ + function register(name, factory) { + if (isObject(name)) { + var filters = {}; + forEach(name, function(filter, key) { + filters[key] = register(key, filter); + }); + return filters; + } else { + return $provide.factory(name + suffix, factory); + } + } + this.register = register; + + this.$get = ['$injector', function($injector) { + return function(name) { + return $injector.get(name + suffix); + }; + }]; + + //////////////////////////////////////// + + /* global + currencyFilter: false, + dateFilter: false, + filterFilter: false, + jsonFilter: false, + limitToFilter: false, + lowercaseFilter: false, + numberFilter: false, + orderByFilter: false, + uppercaseFilter: false + */ + + register('currency', currencyFilter); + register('date', dateFilter); + register('filter', filterFilter); + register('json', jsonFilter); + register('limitTo', limitToFilter); + register('lowercase', lowercaseFilter); + register('number', numberFilter); + register('orderBy', orderByFilter); + register('uppercase', uppercaseFilter); +} + +/** + * @ngdoc filter + * @name filter + * @kind function + * + * @description + * Selects a subset of items from `array` and returns it as a new array. + * + * @param {Array} array The source array. + *
+ * **Note**: If the array contains objects that reference themselves, filtering is not possible. + *
+ * @param {string|Object|function()} expression The predicate to be used for selecting items from + * `array`. + * + * Can be one of: + * + * - `string`: The string is used for matching against the contents of the `array`. All strings or + * objects with string properties in `array` that match this string will be returned. This also + * applies to nested object properties. + * The predicate can be negated by prefixing the string with `!`. + * + * - `Object`: A pattern object can be used to filter specific properties on objects contained + * by `array`. For example `{name:"M", phone:"1"}` predicate will return an array of items + * which have property `name` containing "M" and property `phone` containing "1". A special + * property name (`$` by default) can be used (e.g. as in `{$: "text"}`) to accept a match + * against any property of the object or its nested object properties. That's equivalent to the + * simple substring match with a `string` as described above. The special property name can be + * overwritten, using the `anyPropertyKey` parameter. + * The predicate can be negated by prefixing the string with `!`. + * For example `{name: "!M"}` predicate will return an array of items which have property `name` + * not containing "M". + * + * Note that a named property will match properties on the same level only, while the special + * `$` property will match properties on the same level or deeper. E.g. an array item like + * `{name: {first: 'John', last: 'Doe'}}` will **not** be matched by `{name: 'John'}`, but + * **will** be matched by `{$: 'John'}`. + * + * - `function(value, index, array)`: A predicate function can be used to write arbitrary filters. + * The function is called for each element of the array, with the element, its index, and + * the entire array itself as arguments. + * + * The final result is an array of those elements that the predicate returned true for. + * + * @param {function(actual, expected)|true|false} [comparator] Comparator which is used in + * determining if values retrieved using `expression` (when it is not a function) should be + * considered a match based on the expected value (from the filter expression) and actual + * value (from the object in the array). + * + * Can be one of: + * + * - `function(actual, expected)`: + * The function will be given the object value and the predicate value to compare and + * should return true if both values should be considered equal. + * + * - `true`: A shorthand for `function(actual, expected) { return angular.equals(actual, expected)}`. + * This is essentially strict comparison of expected and actual. + * + * - `false`: A short hand for a function which will look for a substring match in a case + * insensitive way. Primitive values are converted to strings. Objects are not compared against + * primitives, unless they have a custom `toString` method (e.g. `Date` objects). + * + * + * Defaults to `false`. + * + * @param {string} [anyPropertyKey] The special property name that matches against any property. + * By default `$`. + * + * @example + + +
+ + + + + + + + +
NamePhone
{{friend.name}}{{friend.phone}}
+
+
+
+
+
+ + + + + + +
NamePhone
{{friendObj.name}}{{friendObj.phone}}
+
+ + var expectFriendNames = function(expectedNames, key) { + element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) { + arr.forEach(function(wd, i) { + expect(wd.getText()).toMatch(expectedNames[i]); + }); + }); + }; + + it('should search across all fields when filtering with a string', function() { + var searchText = element(by.model('searchText')); + searchText.clear(); + searchText.sendKeys('m'); + expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend'); + + searchText.clear(); + searchText.sendKeys('76'); + expectFriendNames(['John', 'Julie'], 'friend'); + }); + + it('should search in specific fields when filtering with a predicate object', function() { + var searchAny = element(by.model('search.$')); + searchAny.clear(); + searchAny.sendKeys('i'); + expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj'); + }); + it('should use a equal comparison when comparator is true', function() { + var searchName = element(by.model('search.name')); + var strict = element(by.model('strict')); + searchName.clear(); + searchName.sendKeys('Julie'); + strict.click(); + expectFriendNames(['Julie'], 'friendObj'); + }); + +
+ */ + +function filterFilter() { + return function(array, expression, comparator, anyPropertyKey) { + if (!isArrayLike(array)) { + if (array == null) { + return array; + } else { + throw minErr('filter')('notarray', 'Expected array but received: {0}', array); + } + } + + anyPropertyKey = anyPropertyKey || '$'; + var expressionType = getTypeForFilter(expression); + var predicateFn; + var matchAgainstAnyProp; + + switch (expressionType) { + case 'function': + predicateFn = expression; + break; + case 'boolean': + case 'null': + case 'number': + case 'string': + matchAgainstAnyProp = true; + // falls through + case 'object': + predicateFn = createPredicateFn(expression, comparator, anyPropertyKey, matchAgainstAnyProp); + break; + default: + return array; + } + + return Array.prototype.filter.call(array, predicateFn); + }; +} + +// Helper functions for `filterFilter` +function createPredicateFn(expression, comparator, anyPropertyKey, matchAgainstAnyProp) { + var shouldMatchPrimitives = isObject(expression) && (anyPropertyKey in expression); + var predicateFn; + + if (comparator === true) { + comparator = equals; + } else if (!isFunction(comparator)) { + comparator = function(actual, expected) { + if (isUndefined(actual)) { + // No substring matching against `undefined` + return false; + } + if ((actual === null) || (expected === null)) { + // No substring matching against `null`; only match against `null` + return actual === expected; + } + if (isObject(expected) || (isObject(actual) && !hasCustomToString(actual))) { + // Should not compare primitives against objects, unless they have custom `toString` method + return false; + } + + actual = lowercase('' + actual); + expected = lowercase('' + expected); + return actual.indexOf(expected) !== -1; + }; + } + + predicateFn = function(item) { + if (shouldMatchPrimitives && !isObject(item)) { + return deepCompare(item, expression[anyPropertyKey], comparator, anyPropertyKey, false); + } + return deepCompare(item, expression, comparator, anyPropertyKey, matchAgainstAnyProp); + }; + + return predicateFn; +} + +function deepCompare(actual, expected, comparator, anyPropertyKey, matchAgainstAnyProp, dontMatchWholeObject) { + var actualType = getTypeForFilter(actual); + var expectedType = getTypeForFilter(expected); + + if ((expectedType === 'string') && (expected.charAt(0) === '!')) { + return !deepCompare(actual, expected.substring(1), comparator, anyPropertyKey, matchAgainstAnyProp); + } else if (isArray(actual)) { + // In case `actual` is an array, consider it a match + // if ANY of it's items matches `expected` + return actual.some(function(item) { + return deepCompare(item, expected, comparator, anyPropertyKey, matchAgainstAnyProp); + }); + } + + switch (actualType) { + case 'object': + var key; + if (matchAgainstAnyProp) { + for (key in actual) { + // Under certain, rare, circumstances, key may not be a string and `charAt` will be undefined + // See: https://github.com/angular/angular.js/issues/15644 + if (key.charAt && (key.charAt(0) !== '$') && + deepCompare(actual[key], expected, comparator, anyPropertyKey, true)) { + return true; + } + } + return dontMatchWholeObject ? false : deepCompare(actual, expected, comparator, anyPropertyKey, false); + } else if (expectedType === 'object') { + for (key in expected) { + var expectedVal = expected[key]; + if (isFunction(expectedVal) || isUndefined(expectedVal)) { + continue; + } + + var matchAnyProperty = key === anyPropertyKey; + var actualVal = matchAnyProperty ? actual : actual[key]; + if (!deepCompare(actualVal, expectedVal, comparator, anyPropertyKey, matchAnyProperty, matchAnyProperty)) { + return false; + } + } + return true; + } else { + return comparator(actual, expected); + } + case 'function': + return false; + default: + return comparator(actual, expected); + } +} + +// Used for easily differentiating between `null` and actual `object` +function getTypeForFilter(val) { + return (val === null) ? 'null' : typeof val; +} + +var MAX_DIGITS = 22; +var DECIMAL_SEP = '.'; +var ZERO_CHAR = '0'; + +/** + * @ngdoc filter + * @name currency + * @kind function + * + * @description + * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default + * symbol for current locale is used. + * + * @param {number} amount Input to filter. + * @param {string=} symbol Currency symbol or identifier to be displayed. + * @param {number=} fractionSize Number of decimal places to round the amount to, defaults to default max fraction size for current locale + * @returns {string} Formatted number. + * + * + * @example + + + +
+
+ default currency symbol ($): {{amount | currency}}
+ custom currency identifier (USD$): {{amount | currency:"USD$"}}
+ no fractions (0): {{amount | currency:"USD$":0}} +
+
+ + it('should init with 1234.56', function() { + expect(element(by.id('currency-default')).getText()).toBe('$1,234.56'); + expect(element(by.id('currency-custom')).getText()).toBe('USD$1,234.56'); + expect(element(by.id('currency-no-fractions')).getText()).toBe('USD$1,235'); + }); + it('should update', function() { + if (browser.params.browser === 'safari') { + // Safari does not understand the minus key. See + // https://github.com/angular/protractor/issues/481 + return; + } + element(by.model('amount')).clear(); + element(by.model('amount')).sendKeys('-1234'); + expect(element(by.id('currency-default')).getText()).toBe('-$1,234.00'); + expect(element(by.id('currency-custom')).getText()).toBe('-USD$1,234.00'); + expect(element(by.id('currency-no-fractions')).getText()).toBe('-USD$1,234'); + }); + +
+ */ +currencyFilter.$inject = ['$locale']; +function currencyFilter($locale) { + var formats = $locale.NUMBER_FORMATS; + return function(amount, currencySymbol, fractionSize) { + if (isUndefined(currencySymbol)) { + currencySymbol = formats.CURRENCY_SYM; + } + + if (isUndefined(fractionSize)) { + fractionSize = formats.PATTERNS[1].maxFrac; + } + + // if null or undefined pass it through + return (amount == null) + ? amount + : formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, fractionSize). + replace(/\u00A4/g, currencySymbol); + }; +} + +/** + * @ngdoc filter + * @name number + * @kind function + * + * @description + * Formats a number as text. + * + * If the input is null or undefined, it will just be returned. + * If the input is infinite (Infinity or -Infinity), the Infinity symbol '∞' or '-∞' is returned, respectively. + * If the input is not a number an empty string is returned. + * + * + * @param {number|string} number Number to format. + * @param {(number|string)=} fractionSize Number of decimal places to round the number to. + * If this is not provided then the fraction size is computed from the current locale's number + * formatting pattern. In the case of the default locale, it will be 3. + * @returns {string} Number rounded to `fractionSize` appropriately formatted based on the current + * locale (e.g., in the en_US locale it will have "." as the decimal separator and + * include "," group separators after each third digit). + * + * @example + + + +
+
+ Default formatting: {{val | number}}
+ No fractions: {{val | number:0}}
+ Negative number: {{-val | number:4}} +
+
+ + it('should format numbers', function() { + expect(element(by.id('number-default')).getText()).toBe('1,234.568'); + expect(element(by.binding('val | number:0')).getText()).toBe('1,235'); + expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679'); + }); + + it('should update', function() { + element(by.model('val')).clear(); + element(by.model('val')).sendKeys('3374.333'); + expect(element(by.id('number-default')).getText()).toBe('3,374.333'); + expect(element(by.binding('val | number:0')).getText()).toBe('3,374'); + expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330'); + }); + +
+ */ +numberFilter.$inject = ['$locale']; +function numberFilter($locale) { + var formats = $locale.NUMBER_FORMATS; + return function(number, fractionSize) { + + // if null or undefined pass it through + return (number == null) + ? number + : formatNumber(number, formats.PATTERNS[0], formats.GROUP_SEP, formats.DECIMAL_SEP, + fractionSize); + }; +} + +/** + * Parse a number (as a string) into three components that can be used + * for formatting the number. + * + * (Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/) + * + * @param {string} numStr The number to parse + * @return {object} An object describing this number, containing the following keys: + * - d : an array of digits containing leading zeros as necessary + * - i : the number of the digits in `d` that are to the left of the decimal point + * - e : the exponent for numbers that would need more than `MAX_DIGITS` digits in `d` + * + */ +function parse(numStr) { + var exponent = 0, digits, numberOfIntegerDigits; + var i, j, zeros; + + // Decimal point? + if ((numberOfIntegerDigits = numStr.indexOf(DECIMAL_SEP)) > -1) { + numStr = numStr.replace(DECIMAL_SEP, ''); + } + + // Exponential form? + if ((i = numStr.search(/e/i)) > 0) { + // Work out the exponent. + if (numberOfIntegerDigits < 0) numberOfIntegerDigits = i; + numberOfIntegerDigits += +numStr.slice(i + 1); + numStr = numStr.substring(0, i); + } else if (numberOfIntegerDigits < 0) { + // There was no decimal point or exponent so it is an integer. + numberOfIntegerDigits = numStr.length; + } + + // Count the number of leading zeros. + for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) { /* empty */ } + + if (i === (zeros = numStr.length)) { + // The digits are all zero. + digits = [0]; + numberOfIntegerDigits = 1; + } else { + // Count the number of trailing zeros + zeros--; + while (numStr.charAt(zeros) === ZERO_CHAR) zeros--; + + // Trailing zeros are insignificant so ignore them + numberOfIntegerDigits -= i; + digits = []; + // Convert string to array of digits without leading/trailing zeros. + for (j = 0; i <= zeros; i++, j++) { + digits[j] = +numStr.charAt(i); + } + } + + // If the number overflows the maximum allowed digits then use an exponent. + if (numberOfIntegerDigits > MAX_DIGITS) { + digits = digits.splice(0, MAX_DIGITS - 1); + exponent = numberOfIntegerDigits - 1; + numberOfIntegerDigits = 1; + } + + return { d: digits, e: exponent, i: numberOfIntegerDigits }; +} + +/** + * Round the parsed number to the specified number of decimal places + * This function changed the parsedNumber in-place + */ +function roundNumber(parsedNumber, fractionSize, minFrac, maxFrac) { + var digits = parsedNumber.d; + var fractionLen = digits.length - parsedNumber.i; + + // determine fractionSize if it is not specified; `+fractionSize` converts it to a number + fractionSize = (isUndefined(fractionSize)) ? Math.min(Math.max(minFrac, fractionLen), maxFrac) : +fractionSize; + + // The index of the digit to where rounding is to occur + var roundAt = fractionSize + parsedNumber.i; + var digit = digits[roundAt]; + + if (roundAt > 0) { + // Drop fractional digits beyond `roundAt` + digits.splice(Math.max(parsedNumber.i, roundAt)); + + // Set non-fractional digits beyond `roundAt` to 0 + for (var j = roundAt; j < digits.length; j++) { + digits[j] = 0; + } + } else { + // We rounded to zero so reset the parsedNumber + fractionLen = Math.max(0, fractionLen); + parsedNumber.i = 1; + digits.length = Math.max(1, roundAt = fractionSize + 1); + digits[0] = 0; + for (var i = 1; i < roundAt; i++) digits[i] = 0; + } + + if (digit >= 5) { + if (roundAt - 1 < 0) { + for (var k = 0; k > roundAt; k--) { + digits.unshift(0); + parsedNumber.i++; + } + digits.unshift(1); + parsedNumber.i++; + } else { + digits[roundAt - 1]++; + } + } + + // Pad out with zeros to get the required fraction length + for (; fractionLen < Math.max(0, fractionSize); fractionLen++) digits.push(0); + + + // Do any carrying, e.g. a digit was rounded up to 10 + var carry = digits.reduceRight(function(carry, d, i, digits) { + d = d + carry; + digits[i] = d % 10; + return Math.floor(d / 10); + }, 0); + if (carry) { + digits.unshift(carry); + parsedNumber.i++; + } +} + +/** + * Format a number into a string + * @param {number} number The number to format + * @param {{ + * minFrac, // the minimum number of digits required in the fraction part of the number + * maxFrac, // the maximum number of digits required in the fraction part of the number + * gSize, // number of digits in each group of separated digits + * lgSize, // number of digits in the last group of digits before the decimal separator + * negPre, // the string to go in front of a negative number (e.g. `-` or `(`)) + * posPre, // the string to go in front of a positive number + * negSuf, // the string to go after a negative number (e.g. `)`) + * posSuf // the string to go after a positive number + * }} pattern + * @param {string} groupSep The string to separate groups of number (e.g. `,`) + * @param {string} decimalSep The string to act as the decimal separator (e.g. `.`) + * @param {[type]} fractionSize The size of the fractional part of the number + * @return {string} The number formatted as a string + */ +function formatNumber(number, pattern, groupSep, decimalSep, fractionSize) { + + if (!(isString(number) || isNumber(number)) || isNaN(number)) return ''; + + var isInfinity = !isFinite(number); + var isZero = false; + var numStr = Math.abs(number) + '', + formattedText = '', + parsedNumber; + + if (isInfinity) { + formattedText = '\u221e'; + } else { + parsedNumber = parse(numStr); + + roundNumber(parsedNumber, fractionSize, pattern.minFrac, pattern.maxFrac); + + var digits = parsedNumber.d; + var integerLen = parsedNumber.i; + var exponent = parsedNumber.e; + var decimals = []; + isZero = digits.reduce(function(isZero, d) { return isZero && !d; }, true); + + // pad zeros for small numbers + while (integerLen < 0) { + digits.unshift(0); + integerLen++; + } + + // extract decimals digits + if (integerLen > 0) { + decimals = digits.splice(integerLen, digits.length); + } else { + decimals = digits; + digits = [0]; + } + + // format the integer digits with grouping separators + var groups = []; + if (digits.length >= pattern.lgSize) { + groups.unshift(digits.splice(-pattern.lgSize, digits.length).join('')); + } + while (digits.length > pattern.gSize) { + groups.unshift(digits.splice(-pattern.gSize, digits.length).join('')); + } + if (digits.length) { + groups.unshift(digits.join('')); + } + formattedText = groups.join(groupSep); + + // append the decimal digits + if (decimals.length) { + formattedText += decimalSep + decimals.join(''); + } + + if (exponent) { + formattedText += 'e+' + exponent; + } + } + if (number < 0 && !isZero) { + return pattern.negPre + formattedText + pattern.negSuf; + } else { + return pattern.posPre + formattedText + pattern.posSuf; + } +} + +function padNumber(num, digits, trim, negWrap) { + var neg = ''; + if (num < 0 || (negWrap && num <= 0)) { + if (negWrap) { + num = -num + 1; + } else { + num = -num; + neg = '-'; + } + } + num = '' + num; + while (num.length < digits) num = ZERO_CHAR + num; + if (trim) { + num = num.substr(num.length - digits); + } + return neg + num; +} + + +function dateGetter(name, size, offset, trim, negWrap) { + offset = offset || 0; + return function(date) { + var value = date['get' + name](); + if (offset > 0 || value > -offset) { + value += offset; + } + if (value === 0 && offset === -12) value = 12; + return padNumber(value, size, trim, negWrap); + }; +} + +function dateStrGetter(name, shortForm, standAlone) { + return function(date, formats) { + var value = date['get' + name](); + var propPrefix = (standAlone ? 'STANDALONE' : '') + (shortForm ? 'SHORT' : ''); + var get = uppercase(propPrefix + name); + + return formats[get][value]; + }; +} + +function timeZoneGetter(date, formats, offset) { + var zone = -1 * offset; + var paddedZone = (zone >= 0) ? '+' : ''; + + paddedZone += padNumber(Math[zone > 0 ? 'floor' : 'ceil'](zone / 60), 2) + + padNumber(Math.abs(zone % 60), 2); + + return paddedZone; +} + +function getFirstThursdayOfYear(year) { + // 0 = index of January + var dayOfWeekOnFirst = (new Date(year, 0, 1)).getDay(); + // 4 = index of Thursday (+1 to account for 1st = 5) + // 11 = index of *next* Thursday (+1 account for 1st = 12) + return new Date(year, 0, ((dayOfWeekOnFirst <= 4) ? 5 : 12) - dayOfWeekOnFirst); +} + +function getThursdayThisWeek(datetime) { + return new Date(datetime.getFullYear(), datetime.getMonth(), + // 4 = index of Thursday + datetime.getDate() + (4 - datetime.getDay())); +} + +function weekGetter(size) { + return function(date) { + var firstThurs = getFirstThursdayOfYear(date.getFullYear()), + thisThurs = getThursdayThisWeek(date); + + var diff = +thisThurs - +firstThurs, + result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week + + return padNumber(result, size); + }; +} + +function ampmGetter(date, formats) { + return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1]; +} + +function eraGetter(date, formats) { + return date.getFullYear() <= 0 ? formats.ERAS[0] : formats.ERAS[1]; +} + +function longEraGetter(date, formats) { + return date.getFullYear() <= 0 ? formats.ERANAMES[0] : formats.ERANAMES[1]; +} + +var DATE_FORMATS = { + yyyy: dateGetter('FullYear', 4, 0, false, true), + yy: dateGetter('FullYear', 2, 0, true, true), + y: dateGetter('FullYear', 1, 0, false, true), + MMMM: dateStrGetter('Month'), + MMM: dateStrGetter('Month', true), + MM: dateGetter('Month', 2, 1), + M: dateGetter('Month', 1, 1), + LLLL: dateStrGetter('Month', false, true), + dd: dateGetter('Date', 2), + d: dateGetter('Date', 1), + HH: dateGetter('Hours', 2), + H: dateGetter('Hours', 1), + hh: dateGetter('Hours', 2, -12), + h: dateGetter('Hours', 1, -12), + mm: dateGetter('Minutes', 2), + m: dateGetter('Minutes', 1), + ss: dateGetter('Seconds', 2), + s: dateGetter('Seconds', 1), + // while ISO 8601 requires fractions to be prefixed with `.` or `,` + // we can be just safely rely on using `sss` since we currently don't support single or two digit fractions + sss: dateGetter('Milliseconds', 3), + EEEE: dateStrGetter('Day'), + EEE: dateStrGetter('Day', true), + a: ampmGetter, + Z: timeZoneGetter, + ww: weekGetter(2), + w: weekGetter(1), + G: eraGetter, + GG: eraGetter, + GGG: eraGetter, + GGGG: longEraGetter +}; + +var DATE_FORMATS_SPLIT = /((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\s\S]*)/, + NUMBER_STRING = /^-?\d+$/; + +/** + * @ngdoc filter + * @name date + * @kind function + * + * @description + * Formats `date` to a string based on the requested `format`. + * + * `format` string can be composed of the following elements: + * + * * `'yyyy'`: 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010) + * * `'yy'`: 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10) + * * `'y'`: 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199) + * * `'MMMM'`: Month in year (January-December) + * * `'MMM'`: Month in year (Jan-Dec) + * * `'MM'`: Month in year, padded (01-12) + * * `'M'`: Month in year (1-12) + * * `'LLLL'`: Stand-alone month in year (January-December) + * * `'dd'`: Day in month, padded (01-31) + * * `'d'`: Day in month (1-31) + * * `'EEEE'`: Day in Week,(Sunday-Saturday) + * * `'EEE'`: Day in Week, (Sun-Sat) + * * `'HH'`: Hour in day, padded (00-23) + * * `'H'`: Hour in day (0-23) + * * `'hh'`: Hour in AM/PM, padded (01-12) + * * `'h'`: Hour in AM/PM, (1-12) + * * `'mm'`: Minute in hour, padded (00-59) + * * `'m'`: Minute in hour (0-59) + * * `'ss'`: Second in minute, padded (00-59) + * * `'s'`: Second in minute (0-59) + * * `'sss'`: Millisecond in second, padded (000-999) + * * `'a'`: AM/PM marker + * * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200) + * * `'ww'`: Week of year, padded (00-53). Week 01 is the week with the first Thursday of the year + * * `'w'`: Week of year (0-53). Week 1 is the week with the first Thursday of the year + * * `'G'`, `'GG'`, `'GGG'`: The abbreviated form of the era string (e.g. 'AD') + * * `'GGGG'`: The long form of the era string (e.g. 'Anno Domini') + * + * `format` string can also be one of the following predefined + * {@link guide/i18n localizable formats}: + * + * * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale + * (e.g. Sep 3, 2010 12:05:08 PM) + * * `'short'`: equivalent to `'M/d/yy h:mm a'` for en_US locale (e.g. 9/3/10 12:05 PM) + * * `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` for en_US locale + * (e.g. Friday, September 3, 2010) + * * `'longDate'`: equivalent to `'MMMM d, y'` for en_US locale (e.g. September 3, 2010) + * * `'mediumDate'`: equivalent to `'MMM d, y'` for en_US locale (e.g. Sep 3, 2010) + * * `'shortDate'`: equivalent to `'M/d/yy'` for en_US locale (e.g. 9/3/10) + * * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 PM) + * * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 PM) + * + * `format` string can contain literal values. These need to be escaped by surrounding with single quotes (e.g. + * `"h 'in the morning'"`). In order to output a single quote, escape it - i.e., two single quotes in a sequence + * (e.g. `"h 'o''clock'"`). + * + * Any other characters in the `format` string will be output as-is. + * + * @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or + * number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its + * shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is + * specified in the string input, the time is considered to be in the local timezone. + * @param {string=} format Formatting rules (see Description). If not specified, + * `mediumDate` is used. + * @param {string=} timezone Timezone to be used for formatting. It understands UTC/GMT and the + * continental US time zone abbreviations, but for general use, use a time zone offset, for + * example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian) + * If not specified, the timezone of the browser will be used. + * @returns {string} Formatted string or the input if input is not recognized as date/millis. + * + * @example + + + {{1288323623006 | date:'medium'}}: + {{1288323623006 | date:'medium'}}
+ {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}: + {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}
+ {{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}: + {{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}
+ {{1288323623006 | date:"MM/dd/yyyy 'at' h:mma"}}: + {{'1288323623006' | date:"MM/dd/yyyy 'at' h:mma"}}
+
+ + it('should format date', function() { + expect(element(by.binding("1288323623006 | date:'medium'")).getText()). + toMatch(/Oct 2\d, 2010 \d{1,2}:\d{2}:\d{2} (AM|PM)/); + expect(element(by.binding("1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'")).getText()). + toMatch(/2010-10-2\d \d{2}:\d{2}:\d{2} (-|\+)?\d{4}/); + expect(element(by.binding("'1288323623006' | date:'MM/dd/yyyy @ h:mma'")).getText()). + toMatch(/10\/2\d\/2010 @ \d{1,2}:\d{2}(AM|PM)/); + expect(element(by.binding("'1288323623006' | date:\"MM/dd/yyyy 'at' h:mma\"")).getText()). + toMatch(/10\/2\d\/2010 at \d{1,2}:\d{2}(AM|PM)/); + }); + +
+ */ +dateFilter.$inject = ['$locale']; +function dateFilter($locale) { + + + var R_ISO8601_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/; + // 1 2 3 4 5 6 7 8 9 10 11 + function jsonStringToDate(string) { + var match; + if ((match = string.match(R_ISO8601_STR))) { + var date = new Date(0), + tzHour = 0, + tzMin = 0, + dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear, + timeSetter = match[8] ? date.setUTCHours : date.setHours; + + if (match[9]) { + tzHour = toInt(match[9] + match[10]); + tzMin = toInt(match[9] + match[11]); + } + dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3])); + var h = toInt(match[4] || 0) - tzHour; + var m = toInt(match[5] || 0) - tzMin; + var s = toInt(match[6] || 0); + var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000); + timeSetter.call(date, h, m, s, ms); + return date; + } + return string; + } + + + return function(date, format, timezone) { + var text = '', + parts = [], + fn, match; + + format = format || 'mediumDate'; + format = $locale.DATETIME_FORMATS[format] || format; + if (isString(date)) { + date = NUMBER_STRING.test(date) ? toInt(date) : jsonStringToDate(date); + } + + if (isNumber(date)) { + date = new Date(date); + } + + if (!isDate(date) || !isFinite(date.getTime())) { + return date; + } + + while (format) { + match = DATE_FORMATS_SPLIT.exec(format); + if (match) { + parts = concat(parts, match, 1); + format = parts.pop(); + } else { + parts.push(format); + format = null; + } + } + + var dateTimezoneOffset = date.getTimezoneOffset(); + if (timezone) { + dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset); + date = convertTimezoneToLocal(date, timezone, true); + } + forEach(parts, function(value) { + fn = DATE_FORMATS[value]; + text += fn ? fn(date, $locale.DATETIME_FORMATS, dateTimezoneOffset) + : value === '\'\'' ? '\'' : value.replace(/(^'|'$)/g, '').replace(/''/g, '\''); + }); + + return text; + }; +} + + +/** + * @ngdoc filter + * @name json + * @kind function + * + * @description + * Allows you to convert a JavaScript object into JSON string. + * + * This filter is mostly useful for debugging. When using the double curly {{value}} notation + * the binding is automatically converted to JSON. + * + * @param {*} object Any JavaScript object (including arrays and primitive types) to filter. + * @param {number=} spacing The number of spaces to use per indentation, defaults to 2. + * @returns {string} JSON string. + * + * + * @example + + +
{{ {'name':'value'} | json }}
+
{{ {'name':'value'} | json:4 }}
+
+ + it('should jsonify filtered objects', function() { + expect(element(by.id('default-spacing')).getText()).toMatch(/\{\n {2}"name": ?"value"\n}/); + expect(element(by.id('custom-spacing')).getText()).toMatch(/\{\n {4}"name": ?"value"\n}/); + }); + +
+ * + */ +function jsonFilter() { + return function(object, spacing) { + if (isUndefined(spacing)) { + spacing = 2; + } + return toJson(object, spacing); + }; +} + + +/** + * @ngdoc filter + * @name lowercase + * @kind function + * @description + * Converts string to lowercase. + * + * See the {@link ng.uppercase uppercase filter documentation} for a functionally identical example. + * + * @see angular.lowercase + */ +var lowercaseFilter = valueFn(lowercase); + + +/** + * @ngdoc filter + * @name uppercase + * @kind function + * @description + * Converts string to uppercase. + * @example + + + +
+ +

{{title}}

+ +

{{title | uppercase}}

+
+
+
+ */ +var uppercaseFilter = valueFn(uppercase); + +/** + * @ngdoc filter + * @name limitTo + * @kind function + * + * @description + * Creates a new array or string containing only a specified number of elements. The elements are + * taken from either the beginning or the end of the source array, string or number, as specified by + * the value and sign (positive or negative) of `limit`. Other array-like objects are also supported + * (e.g. array subclasses, NodeLists, jqLite/jQuery collections etc). If a number is used as input, + * it is converted to a string. + * + * @param {Array|ArrayLike|string|number} input - Array/array-like, string or number to be limited. + * @param {string|number} limit - The length of the returned array or string. If the `limit` number + * is positive, `limit` number of items from the beginning of the source array/string are copied. + * If the number is negative, `limit` number of items from the end of the source array/string + * are copied. The `limit` will be trimmed if it exceeds `array.length`. If `limit` is undefined, + * the input will be returned unchanged. + * @param {(string|number)=} begin - Index at which to begin limitation. As a negative index, + * `begin` indicates an offset from the end of `input`. Defaults to `0`. + * @returns {Array|string} A new sub-array or substring of length `limit` or less if the input had + * less than `limit` elements. + * + * @example + + + +
+ +

Output numbers: {{ numbers | limitTo:numLimit }}

+ +

Output letters: {{ letters | limitTo:letterLimit }}

+ +

Output long number: {{ longNumber | limitTo:longNumberLimit }}

+
+
+ + var numLimitInput = element(by.model('numLimit')); + var letterLimitInput = element(by.model('letterLimit')); + var longNumberLimitInput = element(by.model('longNumberLimit')); + var limitedNumbers = element(by.binding('numbers | limitTo:numLimit')); + var limitedLetters = element(by.binding('letters | limitTo:letterLimit')); + var limitedLongNumber = element(by.binding('longNumber | limitTo:longNumberLimit')); + + it('should limit the number array to first three items', function() { + expect(numLimitInput.getAttribute('value')).toBe('3'); + expect(letterLimitInput.getAttribute('value')).toBe('3'); + expect(longNumberLimitInput.getAttribute('value')).toBe('3'); + expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]'); + expect(limitedLetters.getText()).toEqual('Output letters: abc'); + expect(limitedLongNumber.getText()).toEqual('Output long number: 234'); + }); + + // There is a bug in safari and protractor that doesn't like the minus key + // it('should update the output when -3 is entered', function() { + // numLimitInput.clear(); + // numLimitInput.sendKeys('-3'); + // letterLimitInput.clear(); + // letterLimitInput.sendKeys('-3'); + // longNumberLimitInput.clear(); + // longNumberLimitInput.sendKeys('-3'); + // expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]'); + // expect(limitedLetters.getText()).toEqual('Output letters: ghi'); + // expect(limitedLongNumber.getText()).toEqual('Output long number: 342'); + // }); + + it('should not exceed the maximum size of input array', function() { + numLimitInput.clear(); + numLimitInput.sendKeys('100'); + letterLimitInput.clear(); + letterLimitInput.sendKeys('100'); + longNumberLimitInput.clear(); + longNumberLimitInput.sendKeys('100'); + expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]'); + expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi'); + expect(limitedLongNumber.getText()).toEqual('Output long number: 2345432342'); + }); + +
+*/ +function limitToFilter() { + return function(input, limit, begin) { + if (Math.abs(Number(limit)) === Infinity) { + limit = Number(limit); + } else { + limit = toInt(limit); + } + if (isNumberNaN(limit)) return input; + + if (isNumber(input)) input = input.toString(); + if (!isArrayLike(input)) return input; + + begin = (!begin || isNaN(begin)) ? 0 : toInt(begin); + begin = (begin < 0) ? Math.max(0, input.length + begin) : begin; + + if (limit >= 0) { + return sliceFn(input, begin, begin + limit); + } else { + if (begin === 0) { + return sliceFn(input, limit, input.length); + } else { + return sliceFn(input, Math.max(0, begin + limit), begin); + } + } + }; +} + +function sliceFn(input, begin, end) { + if (isString(input)) return input.slice(begin, end); + + return slice.call(input, begin, end); +} + +/** + * @ngdoc filter + * @name orderBy + * @kind function + * + * @description + * Returns an array containing the items from the specified `collection`, ordered by a `comparator` + * function based on the values computed using the `expression` predicate. + * + * For example, `[{id: 'foo'}, {id: 'bar'}] | orderBy:'id'` would result in + * `[{id: 'bar'}, {id: 'foo'}]`. + * + * The `collection` can be an Array or array-like object (e.g. NodeList, jQuery object, TypedArray, + * String, etc). + * + * The `expression` can be a single predicate, or a list of predicates each serving as a tie-breaker + * for the preceding one. The `expression` is evaluated against each item and the output is used + * for comparing with other items. + * + * You can change the sorting order by setting `reverse` to `true`. By default, items are sorted in + * ascending order. + * + * The comparison is done using the `comparator` function. If none is specified, a default, built-in + * comparator is used (see below for details - in a nutshell, it compares numbers numerically and + * strings alphabetically). + * + * ### Under the hood + * + * Ordering the specified `collection` happens in two phases: + * + * 1. All items are passed through the predicate (or predicates), and the returned values are saved + * along with their type (`string`, `number` etc). For example, an item `{label: 'foo'}`, passed + * through a predicate that extracts the value of the `label` property, would be transformed to: + * ``` + * { + * value: 'foo', + * type: 'string', + * index: ... + * } + * ``` + * 2. The comparator function is used to sort the items, based on the derived values, types and + * indices. + * + * If you use a custom comparator, it will be called with pairs of objects of the form + * `{value: ..., type: '...', index: ...}` and is expected to return `0` if the objects are equal + * (as far as the comparator is concerned), `-1` if the 1st one should be ranked higher than the + * second, or `1` otherwise. + * + * In order to ensure that the sorting will be deterministic across platforms, if none of the + * specified predicates can distinguish between two items, `orderBy` will automatically introduce a + * dummy predicate that returns the item's index as `value`. + * (If you are using a custom comparator, make sure it can handle this predicate as well.) + * + * If a custom comparator still can't distinguish between two items, then they will be sorted based + * on their index using the built-in comparator. + * + * Finally, in an attempt to simplify things, if a predicate returns an object as the extracted + * value for an item, `orderBy` will try to convert that object to a primitive value, before passing + * it to the comparator. The following rules govern the conversion: + * + * 1. If the object has a `valueOf()` method that returns a primitive, its return value will be + * used instead.
+ * (If the object has a `valueOf()` method that returns another object, then the returned object + * will be used in subsequent steps.) + * 2. If the object has a custom `toString()` method (i.e. not the one inherited from `Object`) that + * returns a primitive, its return value will be used instead.
+ * (If the object has a `toString()` method that returns another object, then the returned object + * will be used in subsequent steps.) + * 3. No conversion; the object itself is used. + * + * ### The default comparator + * + * The default, built-in comparator should be sufficient for most usecases. In short, it compares + * numbers numerically, strings alphabetically (and case-insensitively), for objects falls back to + * using their index in the original collection, and sorts values of different types by type. + * + * More specifically, it follows these steps to determine the relative order of items: + * + * 1. If the compared values are of different types, compare the types themselves alphabetically. + * 2. If both values are of type `string`, compare them alphabetically in a case- and + * locale-insensitive way. + * 3. If both values are objects, compare their indices instead. + * 4. Otherwise, return: + * - `0`, if the values are equal (by strict equality comparison, i.e. using `===`). + * - `-1`, if the 1st value is "less than" the 2nd value (compared using the `<` operator). + * - `1`, otherwise. + * + * **Note:** If you notice numbers not being sorted as expected, make sure they are actually being + * saved as numbers and not strings. + * **Note:** For the purpose of sorting, `null` values are treated as the string `'null'` (i.e. + * `type: 'string'`, `value: 'null'`). This may cause unexpected sort order relative to + * other values. + * + * @param {Array|ArrayLike} collection - The collection (array or array-like object) to sort. + * @param {(Function|string|Array.)=} expression - A predicate (or list of + * predicates) to be used by the comparator to determine the order of elements. + * + * Can be one of: + * + * - `Function`: A getter function. This function will be called with each item as argument and + * the return value will be used for sorting. + * - `string`: An Angular expression. This expression will be evaluated against each item and the + * result will be used for sorting. For example, use `'label'` to sort by a property called + * `label` or `'label.substring(0, 3)'` to sort by the first 3 characters of the `label` + * property.
+ * (The result of a constant expression is interpreted as a property name to be used for + * comparison. For example, use `'"special name"'` (note the extra pair of quotes) to sort by a + * property called `special name`.)
+ * An expression can be optionally prefixed with `+` or `-` to control the sorting direction, + * ascending or descending. For example, `'+label'` or `'-label'`. If no property is provided, + * (e.g. `'+'` or `'-'`), the collection element itself is used in comparisons. + * - `Array`: An array of function and/or string predicates. If a predicate cannot determine the + * relative order of two items, the next predicate is used as a tie-breaker. + * + * **Note:** If the predicate is missing or empty then it defaults to `'+'`. + * + * @param {boolean=} reverse - If `true`, reverse the sorting order. + * @param {(Function)=} comparator - The comparator function used to determine the relative order of + * value pairs. If omitted, the built-in comparator will be used. + * + * @returns {Array} - The sorted array. + * + * + * @example + * ### Ordering a table with `ngRepeat` + * + * The example below demonstrates a simple {@link ngRepeat ngRepeat}, where the data is sorted by + * age in descending order (expression is set to `'-age'`). The `comparator` is not set, which means + * it defaults to the built-in comparator. + * + + +
+ + + + + + + + + + + +
NamePhone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+
+ + angular.module('orderByExample1', []) + .controller('ExampleController', ['$scope', function($scope) { + $scope.friends = [ + {name: 'John', phone: '555-1212', age: 10}, + {name: 'Mary', phone: '555-9876', age: 19}, + {name: 'Mike', phone: '555-4321', age: 21}, + {name: 'Adam', phone: '555-5678', age: 35}, + {name: 'Julie', phone: '555-8765', age: 29} + ]; + }]); + + + .friends { + border-collapse: collapse; + } + + .friends th { + border-bottom: 1px solid; + } + .friends td, .friends th { + border-left: 1px solid; + padding: 5px 10px; + } + .friends td:first-child, .friends th:first-child { + border-left: none; + } + + + // Element locators + var names = element.all(by.repeater('friends').column('friend.name')); + + it('should sort friends by age in reverse order', function() { + expect(names.get(0).getText()).toBe('Adam'); + expect(names.get(1).getText()).toBe('Julie'); + expect(names.get(2).getText()).toBe('Mike'); + expect(names.get(3).getText()).toBe('Mary'); + expect(names.get(4).getText()).toBe('John'); + }); + +
+ *
+ * + * @example + * ### Changing parameters dynamically + * + * All parameters can be changed dynamically. The next example shows how you can make the columns of + * a table sortable, by binding the `expression` and `reverse` parameters to scope properties. + * + + +
+
Sort by = {{propertyName}}; reverse = {{reverse}}
+
+ +
+ + + + + + + + + + + +
+ + + + + + + + +
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+
+ + angular.module('orderByExample2', []) + .controller('ExampleController', ['$scope', function($scope) { + var friends = [ + {name: 'John', phone: '555-1212', age: 10}, + {name: 'Mary', phone: '555-9876', age: 19}, + {name: 'Mike', phone: '555-4321', age: 21}, + {name: 'Adam', phone: '555-5678', age: 35}, + {name: 'Julie', phone: '555-8765', age: 29} + ]; + + $scope.propertyName = 'age'; + $scope.reverse = true; + $scope.friends = friends; + + $scope.sortBy = function(propertyName) { + $scope.reverse = ($scope.propertyName === propertyName) ? !$scope.reverse : false; + $scope.propertyName = propertyName; + }; + }]); + + + .friends { + border-collapse: collapse; + } + + .friends th { + border-bottom: 1px solid; + } + .friends td, .friends th { + border-left: 1px solid; + padding: 5px 10px; + } + .friends td:first-child, .friends th:first-child { + border-left: none; + } + + .sortorder:after { + content: '\25b2'; // BLACK UP-POINTING TRIANGLE + } + .sortorder.reverse:after { + content: '\25bc'; // BLACK DOWN-POINTING TRIANGLE + } + + + // Element locators + var unsortButton = element(by.partialButtonText('unsorted')); + var nameHeader = element(by.partialButtonText('Name')); + var phoneHeader = element(by.partialButtonText('Phone')); + var ageHeader = element(by.partialButtonText('Age')); + var firstName = element(by.repeater('friends').column('friend.name').row(0)); + var lastName = element(by.repeater('friends').column('friend.name').row(4)); + + it('should sort friends by some property, when clicking on the column header', function() { + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); + + phoneHeader.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Mary'); + + nameHeader.click(); + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('Mike'); + + ageHeader.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Adam'); + }); + + it('should sort friends in reverse order, when clicking on the same column', function() { + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); + + ageHeader.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Adam'); + + ageHeader.click(); + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); + }); + + it('should restore the original order, when clicking "Set to unsorted"', function() { + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); + + unsortButton.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Julie'); + }); + +
+ *
+ * + * @example + * ### Using `orderBy` inside a controller + * + * It is also possible to call the `orderBy` filter manually, by injecting `orderByFilter`, and + * calling it with the desired parameters. (Alternatively, you could inject the `$filter` factory + * and retrieve the `orderBy` filter with `$filter('orderBy')`.) + * + + +
+
Sort by = {{propertyName}}; reverse = {{reverse}}
+
+ +
+ + + + + + + + + + + +
+ + + + + + + + +
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+
+ + angular.module('orderByExample3', []) + .controller('ExampleController', ['$scope', 'orderByFilter', function($scope, orderBy) { + var friends = [ + {name: 'John', phone: '555-1212', age: 10}, + {name: 'Mary', phone: '555-9876', age: 19}, + {name: 'Mike', phone: '555-4321', age: 21}, + {name: 'Adam', phone: '555-5678', age: 35}, + {name: 'Julie', phone: '555-8765', age: 29} + ]; + + $scope.propertyName = 'age'; + $scope.reverse = true; + $scope.friends = orderBy(friends, $scope.propertyName, $scope.reverse); + + $scope.sortBy = function(propertyName) { + $scope.reverse = (propertyName !== null && $scope.propertyName === propertyName) + ? !$scope.reverse : false; + $scope.propertyName = propertyName; + $scope.friends = orderBy(friends, $scope.propertyName, $scope.reverse); + }; + }]); + + + .friends { + border-collapse: collapse; + } + + .friends th { + border-bottom: 1px solid; + } + .friends td, .friends th { + border-left: 1px solid; + padding: 5px 10px; + } + .friends td:first-child, .friends th:first-child { + border-left: none; + } + + .sortorder:after { + content: '\25b2'; // BLACK UP-POINTING TRIANGLE + } + .sortorder.reverse:after { + content: '\25bc'; // BLACK DOWN-POINTING TRIANGLE + } + + + // Element locators + var unsortButton = element(by.partialButtonText('unsorted')); + var nameHeader = element(by.partialButtonText('Name')); + var phoneHeader = element(by.partialButtonText('Phone')); + var ageHeader = element(by.partialButtonText('Age')); + var firstName = element(by.repeater('friends').column('friend.name').row(0)); + var lastName = element(by.repeater('friends').column('friend.name').row(4)); + + it('should sort friends by some property, when clicking on the column header', function() { + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); + + phoneHeader.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Mary'); + + nameHeader.click(); + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('Mike'); + + ageHeader.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Adam'); + }); + + it('should sort friends in reverse order, when clicking on the same column', function() { + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); + + ageHeader.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Adam'); + + ageHeader.click(); + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); + }); + + it('should restore the original order, when clicking "Set to unsorted"', function() { + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); + + unsortButton.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Julie'); + }); + +
+ *
+ * + * @example + * ### Using a custom comparator + * + * If you have very specific requirements about the way items are sorted, you can pass your own + * comparator function. For example, you might need to compare some strings in a locale-sensitive + * way. (When specifying a custom comparator, you also need to pass a value for the `reverse` + * argument - passing `false` retains the default sorting order, i.e. ascending.) + * + + +
+
+

Locale-sensitive Comparator

+ + + + + + + + + +
NameFavorite Letter
{{friend.name}}{{friend.favoriteLetter}}
+
+
+

Default Comparator

+ + + + + + + + + +
NameFavorite Letter
{{friend.name}}{{friend.favoriteLetter}}
+
+
+
+ + angular.module('orderByExample4', []) + .controller('ExampleController', ['$scope', function($scope) { + $scope.friends = [ + {name: 'John', favoriteLetter: 'Ä'}, + {name: 'Mary', favoriteLetter: 'Ü'}, + {name: 'Mike', favoriteLetter: 'Ö'}, + {name: 'Adam', favoriteLetter: 'H'}, + {name: 'Julie', favoriteLetter: 'Z'} + ]; + + $scope.localeSensitiveComparator = function(v1, v2) { + // If we don't get strings, just compare by index + if (v1.type !== 'string' || v2.type !== 'string') { + return (v1.index < v2.index) ? -1 : 1; + } + + // Compare strings alphabetically, taking locale into account + return v1.value.localeCompare(v2.value); + }; + }]); + + + .friends-container { + display: inline-block; + margin: 0 30px; + } + + .friends { + border-collapse: collapse; + } + + .friends th { + border-bottom: 1px solid; + } + .friends td, .friends th { + border-left: 1px solid; + padding: 5px 10px; + } + .friends td:first-child, .friends th:first-child { + border-left: none; + } + + + // Element locators + var container = element(by.css('.custom-comparator')); + var names = container.all(by.repeater('friends').column('friend.name')); + + it('should sort friends by favorite letter (in correct alphabetical order)', function() { + expect(names.get(0).getText()).toBe('John'); + expect(names.get(1).getText()).toBe('Adam'); + expect(names.get(2).getText()).toBe('Mike'); + expect(names.get(3).getText()).toBe('Mary'); + expect(names.get(4).getText()).toBe('Julie'); + }); + +
+ * + */ +orderByFilter.$inject = ['$parse']; +function orderByFilter($parse) { + return function(array, sortPredicate, reverseOrder, compareFn) { + + if (array == null) return array; + if (!isArrayLike(array)) { + throw minErr('orderBy')('notarray', 'Expected array but received: {0}', array); + } + + if (!isArray(sortPredicate)) { sortPredicate = [sortPredicate]; } + if (sortPredicate.length === 0) { sortPredicate = ['+']; } + + var predicates = processPredicates(sortPredicate); + + var descending = reverseOrder ? -1 : 1; + + // Define the `compare()` function. Use a default comparator if none is specified. + var compare = isFunction(compareFn) ? compareFn : defaultCompare; + + // The next three lines are a version of a Swartzian Transform idiom from Perl + // (sometimes called the Decorate-Sort-Undecorate idiom) + // See https://en.wikipedia.org/wiki/Schwartzian_transform + var compareValues = Array.prototype.map.call(array, getComparisonObject); + compareValues.sort(doComparison); + array = compareValues.map(function(item) { return item.value; }); + + return array; + + function getComparisonObject(value, index) { + // NOTE: We are adding an extra `tieBreaker` value based on the element's index. + // This will be used to keep the sort stable when none of the input predicates can + // distinguish between two elements. + return { + value: value, + tieBreaker: {value: index, type: 'number', index: index}, + predicateValues: predicates.map(function(predicate) { + return getPredicateValue(predicate.get(value), index); + }) + }; + } + + function doComparison(v1, v2) { + for (var i = 0, ii = predicates.length; i < ii; i++) { + var result = compare(v1.predicateValues[i], v2.predicateValues[i]); + if (result) { + return result * predicates[i].descending * descending; + } + } + + return (compare(v1.tieBreaker, v2.tieBreaker) || defaultCompare(v1.tieBreaker, v2.tieBreaker)) * descending; + } + }; + + function processPredicates(sortPredicates) { + return sortPredicates.map(function(predicate) { + var descending = 1, get = identity; + + if (isFunction(predicate)) { + get = predicate; + } else if (isString(predicate)) { + if ((predicate.charAt(0) === '+' || predicate.charAt(0) === '-')) { + descending = predicate.charAt(0) === '-' ? -1 : 1; + predicate = predicate.substring(1); + } + if (predicate !== '') { + get = $parse(predicate); + if (get.constant) { + var key = get(); + get = function(value) { return value[key]; }; + } + } + } + return {get: get, descending: descending}; + }); + } + + function isPrimitive(value) { + switch (typeof value) { + case 'number': /* falls through */ + case 'boolean': /* falls through */ + case 'string': + return true; + default: + return false; + } + } + + function objectValue(value) { + // If `valueOf` is a valid function use that + if (isFunction(value.valueOf)) { + value = value.valueOf(); + if (isPrimitive(value)) return value; + } + // If `toString` is a valid function and not the one from `Object.prototype` use that + if (hasCustomToString(value)) { + value = value.toString(); + if (isPrimitive(value)) return value; + } + + return value; + } + + function getPredicateValue(value, index) { + var type = typeof value; + if (value === null) { + type = 'string'; + value = 'null'; + } else if (type === 'object') { + value = objectValue(value); + } + return {value: value, type: type, index: index}; + } + + function defaultCompare(v1, v2) { + var result = 0; + var type1 = v1.type; + var type2 = v2.type; + + if (type1 === type2) { + var value1 = v1.value; + var value2 = v2.value; + + if (type1 === 'string') { + // Compare strings case-insensitively + value1 = value1.toLowerCase(); + value2 = value2.toLowerCase(); + } else if (type1 === 'object') { + // For basic objects, use the position of the object + // in the collection instead of the value + if (isObject(value1)) value1 = v1.index; + if (isObject(value2)) value2 = v2.index; + } + + if (value1 !== value2) { + result = value1 < value2 ? -1 : 1; + } + } else { + result = type1 < type2 ? -1 : 1; + } + + return result; + } +} + +function ngDirective(directive) { + if (isFunction(directive)) { + directive = { + link: directive + }; + } + directive.restrict = directive.restrict || 'AC'; + return valueFn(directive); +} + +/** + * @ngdoc directive + * @name a + * @restrict E + * + * @description + * Modifies the default behavior of the html a tag so that the default action is prevented when + * the href attribute is empty. + * + * For dynamically creating `href` attributes for a tags, see the {@link ng.ngHref `ngHref`} directive. + */ +var htmlAnchorDirective = valueFn({ + restrict: 'E', + compile: function(element, attr) { + if (!attr.href && !attr.xlinkHref) { + return function(scope, element) { + // If the linked element is not an anchor tag anymore, do nothing + if (element[0].nodeName.toLowerCase() !== 'a') return; + + // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute. + var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ? + 'xlink:href' : 'href'; + element.on('click', function(event) { + // if we have no href url, then don't navigate anywhere. + if (!element.attr(href)) { + event.preventDefault(); + } + }); + }; + } + } +}); + +/** + * @ngdoc directive + * @name ngHref + * @restrict A + * @priority 99 + * + * @description + * Using Angular markup like `{{hash}}` in an href attribute will + * make the link go to the wrong URL if the user clicks it before + * Angular has a chance to replace the `{{hash}}` markup with its + * value. Until Angular replaces the markup the link will be broken + * and will most likely return a 404 error. The `ngHref` directive + * solves this problem. + * + * The wrong way to write it: + * ```html + * link1 + * ``` + * + * The correct way to write it: + * ```html + * link1 + * ``` + * + * @element A + * @param {template} ngHref any string which can contain `{{}}` markup. + * + * @example + * This example shows various combinations of `href`, `ng-href` and `ng-click` attributes + * in links and their different behaviors: + + +
+ link 1 (link, don't reload)
+ link 2 (link, don't reload)
+ link 3 (link, reload!)
+ anchor (link, don't reload)
+ anchor (no link)
+ link (link, change location) +
+ + it('should execute ng-click but not reload when href without value', function() { + element(by.id('link-1')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('1'); + expect(element(by.id('link-1')).getAttribute('href')).toBe(''); + }); + + it('should execute ng-click but not reload when href empty string', function() { + element(by.id('link-2')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('2'); + expect(element(by.id('link-2')).getAttribute('href')).toBe(''); + }); + + it('should execute ng-click and change url when ng-href specified', function() { + expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\/123$/); + + element(by.id('link-3')).click(); + + // At this point, we navigate away from an Angular page, so we need + // to use browser.driver to get the base webdriver. + + browser.wait(function() { + return browser.driver.getCurrentUrl().then(function(url) { + return url.match(/\/123$/); + }); + }, 5000, 'page should navigate to /123'); + }); + + it('should execute ng-click but not reload when href empty string and name specified', function() { + element(by.id('link-4')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('4'); + expect(element(by.id('link-4')).getAttribute('href')).toBe(''); + }); + + it('should execute ng-click but not reload when no href but name specified', function() { + element(by.id('link-5')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('5'); + expect(element(by.id('link-5')).getAttribute('href')).toBe(null); + }); + + it('should only change url when only ng-href', function() { + element(by.model('value')).clear(); + element(by.model('value')).sendKeys('6'); + expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\/6$/); + + element(by.id('link-6')).click(); + + // At this point, we navigate away from an Angular page, so we need + // to use browser.driver to get the base webdriver. + browser.wait(function() { + return browser.driver.getCurrentUrl().then(function(url) { + return url.match(/\/6$/); + }); + }, 5000, 'page should navigate to /6'); + }); + +
+ */ + +/** + * @ngdoc directive + * @name ngSrc + * @restrict A + * @priority 99 + * + * @description + * Using Angular markup like `{{hash}}` in a `src` attribute doesn't + * work right: The browser will fetch from the URL with the literal + * text `{{hash}}` until Angular replaces the expression inside + * `{{hash}}`. The `ngSrc` directive solves this problem. + * + * The buggy way to write it: + * ```html + * Description + * ``` + * + * The correct way to write it: + * ```html + * Description + * ``` + * + * @element IMG + * @param {template} ngSrc any string which can contain `{{}}` markup. + */ + +/** + * @ngdoc directive + * @name ngSrcset + * @restrict A + * @priority 99 + * + * @description + * Using Angular markup like `{{hash}}` in a `srcset` attribute doesn't + * work right: The browser will fetch from the URL with the literal + * text `{{hash}}` until Angular replaces the expression inside + * `{{hash}}`. The `ngSrcset` directive solves this problem. + * + * The buggy way to write it: + * ```html + * Description + * ``` + * + * The correct way to write it: + * ```html + * Description + * ``` + * + * @element IMG + * @param {template} ngSrcset any string which can contain `{{}}` markup. + */ + +/** + * @ngdoc directive + * @name ngDisabled + * @restrict A + * @priority 100 + * + * @description + * + * This directive sets the `disabled` attribute on the element (typically a form control, + * e.g. `input`, `button`, `select` etc.) if the + * {@link guide/expression expression} inside `ngDisabled` evaluates to truthy. + * + * A special directive is necessary because we cannot use interpolation inside the `disabled` + * attribute. See the {@link guide/interpolation interpolation guide} for more info. + * + * @example + + +
+ +
+ + it('should toggle button', function() { + expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy(); + element(by.model('checked')).click(); + expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy(); + }); + +
+ * + * @element INPUT + * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy, + * then the `disabled` attribute will be set on the element + */ + + +/** + * @ngdoc directive + * @name ngChecked + * @restrict A + * @priority 100 + * + * @description + * Sets the `checked` attribute on the element, if the expression inside `ngChecked` is truthy. + * + * Note that this directive should not be used together with {@link ngModel `ngModel`}, + * as this can lead to unexpected behavior. + * + * A special directive is necessary because we cannot use interpolation inside the `checked` + * attribute. See the {@link guide/interpolation interpolation guide} for more info. + * + * @example + + +
+ +
+ + it('should check both checkBoxes', function() { + expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy(); + element(by.model('master')).click(); + expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy(); + }); + +
+ * + * @element INPUT + * @param {expression} ngChecked If the {@link guide/expression expression} is truthy, + * then the `checked` attribute will be set on the element + */ + + +/** + * @ngdoc directive + * @name ngReadonly + * @restrict A + * @priority 100 + * + * @description + * + * Sets the `readonly` attribute on the element, if the expression inside `ngReadonly` is truthy. + * Note that `readonly` applies only to `input` elements with specific types. [See the input docs on + * MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-readonly) for more information. + * + * A special directive is necessary because we cannot use interpolation inside the `readonly` + * attribute. See the {@link guide/interpolation interpolation guide} for more info. + * + * @example + + +
+ +
+ + it('should toggle readonly attr', function() { + expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeFalsy(); + element(by.model('checked')).click(); + expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeTruthy(); + }); + +
+ * + * @element INPUT + * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy, + * then special attribute "readonly" will be set on the element + */ + + +/** + * @ngdoc directive + * @name ngSelected + * @restrict A + * @priority 100 + * + * @description + * + * Sets the `selected` attribute on the element, if the expression inside `ngSelected` is truthy. + * + * A special directive is necessary because we cannot use interpolation inside the `selected` + * attribute. See the {@link guide/interpolation interpolation guide} for more info. + * + *
+ * **Note:** `ngSelected` does not interact with the `select` and `ngModel` directives, it only + * sets the `selected` attribute on the element. If you are using `ngModel` on the select, you + * should not use `ngSelected` on the options, as `ngModel` will set the select value and + * selected options. + *
+ * + * @example + + +
+ +
+ + it('should select Greetings!', function() { + expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy(); + element(by.model('selected')).click(); + expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy(); + }); + +
+ * + * @element OPTION + * @param {expression} ngSelected If the {@link guide/expression expression} is truthy, + * then special attribute "selected" will be set on the element + */ + +/** + * @ngdoc directive + * @name ngOpen + * @restrict A + * @priority 100 + * + * @description + * + * Sets the `open` attribute on the element, if the expression inside `ngOpen` is truthy. + * + * A special directive is necessary because we cannot use interpolation inside the `open` + * attribute. See the {@link guide/interpolation interpolation guide} for more info. + * + * ## A note about browser compatibility + * + * Internet Explorer and Edge do not support the `details` element, it is + * recommended to use {@link ng.ngShow} and {@link ng.ngHide} instead. + * + * @example + + +
+
+ List +
    +
  • Apple
  • +
  • Orange
  • +
  • Durian
  • +
+
+
+ + it('should toggle open', function() { + expect(element(by.id('details')).getAttribute('open')).toBeFalsy(); + element(by.model('open')).click(); + expect(element(by.id('details')).getAttribute('open')).toBeTruthy(); + }); + +
+ * + * @element DETAILS + * @param {expression} ngOpen If the {@link guide/expression expression} is truthy, + * then special attribute "open" will be set on the element + */ + +var ngAttributeAliasDirectives = {}; + +// boolean attrs are evaluated +forEach(BOOLEAN_ATTR, function(propName, attrName) { + // binding to multiple is not supported + if (propName === 'multiple') return; + + function defaultLinkFn(scope, element, attr) { + scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) { + attr.$set(attrName, !!value); + }); + } + + var normalized = directiveNormalize('ng-' + attrName); + var linkFn = defaultLinkFn; + + if (propName === 'checked') { + linkFn = function(scope, element, attr) { + // ensuring ngChecked doesn't interfere with ngModel when both are set on the same input + if (attr.ngModel !== attr[normalized]) { + defaultLinkFn(scope, element, attr); + } + }; + } + + ngAttributeAliasDirectives[normalized] = function() { + return { + restrict: 'A', + priority: 100, + link: linkFn + }; + }; +}); + +// aliased input attrs are evaluated +forEach(ALIASED_ATTR, function(htmlAttr, ngAttr) { + ngAttributeAliasDirectives[ngAttr] = function() { + return { + priority: 100, + link: function(scope, element, attr) { + //special case ngPattern when a literal regular expression value + //is used as the expression (this way we don't have to watch anything). + if (ngAttr === 'ngPattern' && attr.ngPattern.charAt(0) === '/') { + var match = attr.ngPattern.match(REGEX_STRING_REGEXP); + if (match) { + attr.$set('ngPattern', new RegExp(match[1], match[2])); + return; + } + } + + scope.$watch(attr[ngAttr], function ngAttrAliasWatchAction(value) { + attr.$set(ngAttr, value); + }); + } + }; + }; +}); + +// ng-src, ng-srcset, ng-href are interpolated +forEach(['src', 'srcset', 'href'], function(attrName) { + var normalized = directiveNormalize('ng-' + attrName); + ngAttributeAliasDirectives[normalized] = function() { + return { + priority: 99, // it needs to run after the attributes are interpolated + link: function(scope, element, attr) { + var propName = attrName, + name = attrName; + + if (attrName === 'href' && + toString.call(element.prop('href')) === '[object SVGAnimatedString]') { + name = 'xlinkHref'; + attr.$attr[name] = 'xlink:href'; + propName = null; + } + + attr.$observe(normalized, function(value) { + if (!value) { + if (attrName === 'href') { + attr.$set(name, null); + } + return; + } + + attr.$set(name, value); + + // Support: IE 9-11 only + // On IE, if "ng:src" directive declaration is used and "src" attribute doesn't exist + // then calling element.setAttribute('src', 'foo') doesn't do anything, so we need + // to set the property as well to achieve the desired effect. + // We use attr[attrName] value since $set can sanitize the url. + if (msie && propName) element.prop(propName, attr[name]); + }); + } + }; + }; +}); + +/* global -nullFormCtrl, -PENDING_CLASS, -SUBMITTED_CLASS + */ +var nullFormCtrl = { + $addControl: noop, + $$renameControl: nullFormRenameControl, + $removeControl: noop, + $setValidity: noop, + $setDirty: noop, + $setPristine: noop, + $setSubmitted: noop +}, +PENDING_CLASS = 'ng-pending', +SUBMITTED_CLASS = 'ng-submitted'; + +function nullFormRenameControl(control, name) { + control.$name = name; +} + +/** + * @ngdoc type + * @name form.FormController + * + * @property {boolean} $pristine True if user has not interacted with the form yet. + * @property {boolean} $dirty True if user has already interacted with the form. + * @property {boolean} $valid True if all of the containing forms and controls are valid. + * @property {boolean} $invalid True if at least one containing control or form is invalid. + * @property {boolean} $submitted True if user has submitted the form even if its invalid. + * + * @property {Object} $pending An object hash, containing references to controls or forms with + * pending validators, where: + * + * - keys are validations tokens (error names). + * - values are arrays of controls or forms that have a pending validator for the given error name. + * + * See {@link form.FormController#$error $error} for a list of built-in validation tokens. + * + * @property {Object} $error An object hash, containing references to controls or forms with failing + * validators, where: + * + * - keys are validation tokens (error names), + * - values are arrays of controls or forms that have a failing validator for the given error name. + * + * Built-in validation tokens: + * - `email` + * - `max` + * - `maxlength` + * - `min` + * - `minlength` + * - `number` + * - `pattern` + * - `required` + * - `url` + * - `date` + * - `datetimelocal` + * - `time` + * - `week` + * - `month` + * + * @description + * `FormController` keeps track of all its controls and nested forms as well as the state of them, + * such as being valid/invalid or dirty/pristine. + * + * Each {@link ng.directive:form form} directive creates an instance + * of `FormController`. + * + */ +//asks for $scope to fool the BC controller module +FormController.$inject = ['$element', '$attrs', '$scope', '$animate', '$interpolate']; +function FormController($element, $attrs, $scope, $animate, $interpolate) { + this.$$controls = []; + + // init state + this.$error = {}; + this.$$success = {}; + this.$pending = undefined; + this.$name = $interpolate($attrs.name || $attrs.ngForm || '')($scope); + this.$dirty = false; + this.$pristine = true; + this.$valid = true; + this.$invalid = false; + this.$submitted = false; + this.$$parentForm = nullFormCtrl; + + this.$$element = $element; + this.$$animate = $animate; + + setupValidity(this); +} + +FormController.prototype = { + /** + * @ngdoc method + * @name form.FormController#$rollbackViewValue + * + * @description + * Rollback all form controls pending updates to the `$modelValue`. + * + * Updates may be pending by a debounced event or because the input is waiting for a some future + * event defined in `ng-model-options`. This method is typically needed by the reset button of + * a form that uses `ng-model-options` to pend updates. + */ + $rollbackViewValue: function() { + forEach(this.$$controls, function(control) { + control.$rollbackViewValue(); + }); + }, + + /** + * @ngdoc method + * @name form.FormController#$commitViewValue + * + * @description + * Commit all form controls pending updates to the `$modelValue`. + * + * Updates may be pending by a debounced event or because the input is waiting for a some future + * event defined in `ng-model-options`. This method is rarely needed as `NgModelController` + * usually handles calling this in response to input events. + */ + $commitViewValue: function() { + forEach(this.$$controls, function(control) { + control.$commitViewValue(); + }); + }, + + /** + * @ngdoc method + * @name form.FormController#$addControl + * @param {object} control control object, either a {@link form.FormController} or an + * {@link ngModel.NgModelController} + * + * @description + * Register a control with the form. Input elements using ngModelController do this automatically + * when they are linked. + * + * Note that the current state of the control will not be reflected on the new parent form. This + * is not an issue with normal use, as freshly compiled and linked controls are in a `$pristine` + * state. + * + * However, if the method is used programmatically, for example by adding dynamically created controls, + * or controls that have been previously removed without destroying their corresponding DOM element, + * it's the developers responsibility to make sure the current state propagates to the parent form. + * + * For example, if an input control is added that is already `$dirty` and has `$error` properties, + * calling `$setDirty()` and `$validate()` afterwards will propagate the state to the parent form. + */ + $addControl: function(control) { + // Breaking change - before, inputs whose name was "hasOwnProperty" were quietly ignored + // and not added to the scope. Now we throw an error. + assertNotHasOwnProperty(control.$name, 'input'); + this.$$controls.push(control); + + if (control.$name) { + this[control.$name] = control; + } + + control.$$parentForm = this; + }, + + // Private API: rename a form control + $$renameControl: function(control, newName) { + var oldName = control.$name; + + if (this[oldName] === control) { + delete this[oldName]; + } + this[newName] = control; + control.$name = newName; + }, + + /** + * @ngdoc method + * @name form.FormController#$removeControl + * @param {object} control control object, either a {@link form.FormController} or an + * {@link ngModel.NgModelController} + * + * @description + * Deregister a control from the form. + * + * Input elements using ngModelController do this automatically when they are destroyed. + * + * Note that only the removed control's validation state (`$errors`etc.) will be removed from the + * form. `$dirty`, `$submitted` states will not be changed, because the expected behavior can be + * different from case to case. For example, removing the only `$dirty` control from a form may or + * may not mean that the form is still `$dirty`. + */ + $removeControl: function(control) { + if (control.$name && this[control.$name] === control) { + delete this[control.$name]; + } + forEach(this.$pending, function(value, name) { + // eslint-disable-next-line no-invalid-this + this.$setValidity(name, null, control); + }, this); + forEach(this.$error, function(value, name) { + // eslint-disable-next-line no-invalid-this + this.$setValidity(name, null, control); + }, this); + forEach(this.$$success, function(value, name) { + // eslint-disable-next-line no-invalid-this + this.$setValidity(name, null, control); + }, this); + + arrayRemove(this.$$controls, control); + control.$$parentForm = nullFormCtrl; + }, + + /** + * @ngdoc method + * @name form.FormController#$setDirty + * + * @description + * Sets the form to a dirty state. + * + * This method can be called to add the 'ng-dirty' class and set the form to a dirty + * state (ng-dirty class). This method will also propagate to parent forms. + */ + $setDirty: function() { + this.$$animate.removeClass(this.$$element, PRISTINE_CLASS); + this.$$animate.addClass(this.$$element, DIRTY_CLASS); + this.$dirty = true; + this.$pristine = false; + this.$$parentForm.$setDirty(); + }, + + /** + * @ngdoc method + * @name form.FormController#$setPristine + * + * @description + * Sets the form to its pristine state. + * + * This method sets the form's `$pristine` state to true, the `$dirty` state to false, removes + * the `ng-dirty` class and adds the `ng-pristine` class. Additionally, it sets the `$submitted` + * state to false. + * + * This method will also propagate to all the controls contained in this form. + * + * Setting a form back to a pristine state is often useful when we want to 'reuse' a form after + * saving or resetting it. + */ + $setPristine: function() { + this.$$animate.setClass(this.$$element, PRISTINE_CLASS, DIRTY_CLASS + ' ' + SUBMITTED_CLASS); + this.$dirty = false; + this.$pristine = true; + this.$submitted = false; + forEach(this.$$controls, function(control) { + control.$setPristine(); + }); + }, + + /** + * @ngdoc method + * @name form.FormController#$setUntouched + * + * @description + * Sets the form to its untouched state. + * + * This method can be called to remove the 'ng-touched' class and set the form controls to their + * untouched state (ng-untouched class). + * + * Setting a form controls back to their untouched state is often useful when setting the form + * back to its pristine state. + */ + $setUntouched: function() { + forEach(this.$$controls, function(control) { + control.$setUntouched(); + }); + }, + + /** + * @ngdoc method + * @name form.FormController#$setSubmitted + * + * @description + * Sets the form to its submitted state. + */ + $setSubmitted: function() { + this.$$animate.addClass(this.$$element, SUBMITTED_CLASS); + this.$submitted = true; + this.$$parentForm.$setSubmitted(); + } +}; + +/** + * @ngdoc method + * @name form.FormController#$setValidity + * + * @description + * Change the validity state of the form, and notify the parent form (if any). + * + * Application developers will rarely need to call this method directly. It is used internally, by + * {@link ngModel.NgModelController#$setValidity NgModelController.$setValidity()}, to propagate a + * control's validity state to the parent `FormController`. + * + * @param {string} validationErrorKey Name of the validator. The `validationErrorKey` will be + * assigned to either `$error[validationErrorKey]` or `$pending[validationErrorKey]` (for + * unfulfilled `$asyncValidators`), so that it is available for data-binding. The + * `validationErrorKey` should be in camelCase and will get converted into dash-case for + * class name. Example: `myError` will result in `ng-valid-my-error` and + * `ng-invalid-my-error` classes and can be bound to as `{{ someForm.$error.myError }}`. + * @param {boolean} isValid Whether the current state is valid (true), invalid (false), pending + * (undefined), or skipped (null). Pending is used for unfulfilled `$asyncValidators`. + * Skipped is used by AngularJS when validators do not run because of parse errors and when + * `$asyncValidators` do not run because any of the `$validators` failed. + * @param {NgModelController | FormController} controller - The controller whose validity state is + * triggering the change. + */ +addSetValidityMethod({ + clazz: FormController, + set: function(object, property, controller) { + var list = object[property]; + if (!list) { + object[property] = [controller]; + } else { + var index = list.indexOf(controller); + if (index === -1) { + list.push(controller); + } + } + }, + unset: function(object, property, controller) { + var list = object[property]; + if (!list) { + return; + } + arrayRemove(list, controller); + if (list.length === 0) { + delete object[property]; + } + } +}); + +/** + * @ngdoc directive + * @name ngForm + * @restrict EAC + * + * @description + * Nestable alias of {@link ng.directive:form `form`} directive. HTML + * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a + * sub-group of controls needs to be determined. + * + * Note: the purpose of `ngForm` is to group controls, + * but not to be a replacement for the `
` tag with all of its capabilities + * (e.g. posting to the server, ...). + * + * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into + * related scope, under this name. + * + */ + + /** + * @ngdoc directive + * @name form + * @restrict E + * + * @description + * Directive that instantiates + * {@link form.FormController FormController}. + * + * If the `name` attribute is specified, the form controller is published onto the current scope under + * this name. + * + * # Alias: {@link ng.directive:ngForm `ngForm`} + * + * In Angular, forms can be nested. This means that the outer form is valid when all of the child + * forms are valid as well. However, browsers do not allow nesting of `` elements, so + * Angular provides the {@link ng.directive:ngForm `ngForm`} directive, which behaves identically to + * `form` but can be nested. Nested forms can be useful, for example, if the validity of a sub-group + * of controls needs to be determined. + * + * # CSS classes + * - `ng-valid` is set if the form is valid. + * - `ng-invalid` is set if the form is invalid. + * - `ng-pending` is set if the form is pending. + * - `ng-pristine` is set if the form is pristine. + * - `ng-dirty` is set if the form is dirty. + * - `ng-submitted` is set if the form was submitted. + * + * Keep in mind that ngAnimate can detect each of these classes when added and removed. + * + * + * # Submitting a form and preventing the default action + * + * Since the role of forms in client-side Angular applications is different than in classical + * roundtrip apps, it is desirable for the browser not to translate the form submission into a full + * page reload that sends the data to the server. Instead some javascript logic should be triggered + * to handle the form submission in an application-specific way. + * + * For this reason, Angular prevents the default action (form submission to the server) unless the + * `` element has an `action` attribute specified. + * + * You can use one of the following two ways to specify what javascript method should be called when + * a form is submitted: + * + * - {@link ng.directive:ngSubmit ngSubmit} directive on the form element + * - {@link ng.directive:ngClick ngClick} directive on the first + * button or input field of type submit (input[type=submit]) + * + * To prevent double execution of the handler, use only one of the {@link ng.directive:ngSubmit ngSubmit} + * or {@link ng.directive:ngClick ngClick} directives. + * This is because of the following form submission rules in the HTML specification: + * + * - If a form has only one input field then hitting enter in this field triggers form submit + * (`ngSubmit`) + * - if a form has 2+ input fields and no buttons or input[type=submit] then hitting enter + * doesn't trigger submit + * - if a form has one or more input fields and one or more buttons or input[type=submit] then + * hitting enter in any of the input fields will trigger the click handler on the *first* button or + * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`) + * + * Any pending `ngModelOptions` changes will take place immediately when an enclosing form is + * submitted. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit` + * to have access to the updated model. + * + * ## Animation Hooks + * + * Animations in ngForm are triggered when any of the associated CSS classes are added and removed. + * These classes are: `.ng-pristine`, `.ng-dirty`, `.ng-invalid` and `.ng-valid` as well as any + * other validations that are performed within the form. Animations in ngForm are similar to how + * they work in ngClass and animations can be hooked into using CSS transitions, keyframes as well + * as JS animations. + * + * The following example shows a simple way to utilize CSS transitions to style a form element + * that has been rendered as invalid after it has been validated: + * + *
+ * //be sure to include ngAnimate as a module to hook into more
+ * //advanced animations
+ * .my-form {
+ *   transition:0.5s linear all;
+ *   background: white;
+ * }
+ * .my-form.ng-invalid {
+ *   background: red;
+ *   color:white;
+ * }
+ * 
+ * + * @example + + + + + + userType: + Required!
+ userType = {{userType}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ +
+ + it('should initialize to model', function() { + var userType = element(by.binding('userType')); + var valid = element(by.binding('myForm.input.$valid')); + + expect(userType.getText()).toContain('guest'); + expect(valid.getText()).toContain('true'); + }); + + it('should be invalid if empty', function() { + var userType = element(by.binding('userType')); + var valid = element(by.binding('myForm.input.$valid')); + var userInput = element(by.model('userType')); + + userInput.clear(); + userInput.sendKeys(''); + + expect(userType.getText()).toEqual('userType ='); + expect(valid.getText()).toContain('false'); + }); + +
+ * + * @param {string=} name Name of the form. If specified, the form controller will be published into + * related scope, under this name. + */ +var formDirectiveFactory = function(isNgForm) { + return ['$timeout', '$parse', function($timeout, $parse) { + var formDirective = { + name: 'form', + restrict: isNgForm ? 'EAC' : 'E', + require: ['form', '^^?form'], //first is the form's own ctrl, second is an optional parent form + controller: FormController, + compile: function ngFormCompile(formElement, attr) { + // Setup initial state of the control + formElement.addClass(PRISTINE_CLASS).addClass(VALID_CLASS); + + var nameAttr = attr.name ? 'name' : (isNgForm && attr.ngForm ? 'ngForm' : false); + + return { + pre: function ngFormPreLink(scope, formElement, attr, ctrls) { + var controller = ctrls[0]; + + // if `action` attr is not present on the form, prevent the default action (submission) + if (!('action' in attr)) { + // we can't use jq events because if a form is destroyed during submission the default + // action is not prevented. see #1238 + // + // IE 9 is not affected because it doesn't fire a submit event and try to do a full + // page reload if the form was destroyed by submission of the form via a click handler + // on a button in the form. Looks like an IE9 specific bug. + var handleFormSubmission = function(event) { + scope.$apply(function() { + controller.$commitViewValue(); + controller.$setSubmitted(); + }); + + event.preventDefault(); + }; + + formElement[0].addEventListener('submit', handleFormSubmission); + + // unregister the preventDefault listener so that we don't not leak memory but in a + // way that will achieve the prevention of the default action. + formElement.on('$destroy', function() { + $timeout(function() { + formElement[0].removeEventListener('submit', handleFormSubmission); + }, 0, false); + }); + } + + var parentFormCtrl = ctrls[1] || controller.$$parentForm; + parentFormCtrl.$addControl(controller); + + var setter = nameAttr ? getSetter(controller.$name) : noop; + + if (nameAttr) { + setter(scope, controller); + attr.$observe(nameAttr, function(newValue) { + if (controller.$name === newValue) return; + setter(scope, undefined); + controller.$$parentForm.$$renameControl(controller, newValue); + setter = getSetter(controller.$name); + setter(scope, controller); + }); + } + formElement.on('$destroy', function() { + controller.$$parentForm.$removeControl(controller); + setter(scope, undefined); + extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards + }); + } + }; + } + }; + + return formDirective; + + function getSetter(expression) { + if (expression === '') { + //create an assignable expression, so forms with an empty name can be renamed later + return $parse('this[""]').assign; + } + return $parse(expression).assign || noop; + } + }]; +}; + +var formDirective = formDirectiveFactory(); +var ngFormDirective = formDirectiveFactory(true); + + + +// helper methods +function setupValidity(instance) { + instance.$$classCache = {}; + instance.$$classCache[INVALID_CLASS] = !(instance.$$classCache[VALID_CLASS] = instance.$$element.hasClass(VALID_CLASS)); +} +function addSetValidityMethod(context) { + var clazz = context.clazz, + set = context.set, + unset = context.unset; + + clazz.prototype.$setValidity = function(validationErrorKey, state, controller) { + if (isUndefined(state)) { + createAndSet(this, '$pending', validationErrorKey, controller); + } else { + unsetAndCleanup(this, '$pending', validationErrorKey, controller); + } + if (!isBoolean(state)) { + unset(this.$error, validationErrorKey, controller); + unset(this.$$success, validationErrorKey, controller); + } else { + if (state) { + unset(this.$error, validationErrorKey, controller); + set(this.$$success, validationErrorKey, controller); + } else { + set(this.$error, validationErrorKey, controller); + unset(this.$$success, validationErrorKey, controller); + } + } + if (this.$pending) { + cachedToggleClass(this, PENDING_CLASS, true); + this.$valid = this.$invalid = undefined; + toggleValidationCss(this, '', null); + } else { + cachedToggleClass(this, PENDING_CLASS, false); + this.$valid = isObjectEmpty(this.$error); + this.$invalid = !this.$valid; + toggleValidationCss(this, '', this.$valid); + } + + // re-read the state as the set/unset methods could have + // combined state in this.$error[validationError] (used for forms), + // where setting/unsetting only increments/decrements the value, + // and does not replace it. + var combinedState; + if (this.$pending && this.$pending[validationErrorKey]) { + combinedState = undefined; + } else if (this.$error[validationErrorKey]) { + combinedState = false; + } else if (this.$$success[validationErrorKey]) { + combinedState = true; + } else { + combinedState = null; + } + + toggleValidationCss(this, validationErrorKey, combinedState); + this.$$parentForm.$setValidity(validationErrorKey, combinedState, this); + }; + + function createAndSet(ctrl, name, value, controller) { + if (!ctrl[name]) { + ctrl[name] = {}; + } + set(ctrl[name], value, controller); + } + + function unsetAndCleanup(ctrl, name, value, controller) { + if (ctrl[name]) { + unset(ctrl[name], value, controller); + } + if (isObjectEmpty(ctrl[name])) { + ctrl[name] = undefined; + } + } + + function cachedToggleClass(ctrl, className, switchValue) { + if (switchValue && !ctrl.$$classCache[className]) { + ctrl.$$animate.addClass(ctrl.$$element, className); + ctrl.$$classCache[className] = true; + } else if (!switchValue && ctrl.$$classCache[className]) { + ctrl.$$animate.removeClass(ctrl.$$element, className); + ctrl.$$classCache[className] = false; + } + } + + function toggleValidationCss(ctrl, validationErrorKey, isValid) { + validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : ''; + + cachedToggleClass(ctrl, VALID_CLASS + validationErrorKey, isValid === true); + cachedToggleClass(ctrl, INVALID_CLASS + validationErrorKey, isValid === false); + } +} + +function isObjectEmpty(obj) { + if (obj) { + for (var prop in obj) { + if (obj.hasOwnProperty(prop)) { + return false; + } + } + } + return true; +} + +/* global + VALID_CLASS: false, + INVALID_CLASS: false, + PRISTINE_CLASS: false, + DIRTY_CLASS: false, + ngModelMinErr: false +*/ + +// Regex code was initially obtained from SO prior to modification: https://stackoverflow.com/questions/3143070/javascript-regex-iso-datetime#answer-3143231 +var ISO_DATE_REGEXP = /^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/; +// See valid URLs in RFC3987 (http://tools.ietf.org/html/rfc3987) +// Note: We are being more lenient, because browsers are too. +// 1. Scheme +// 2. Slashes +// 3. Username +// 4. Password +// 5. Hostname +// 6. Port +// 7. Path +// 8. Query +// 9. Fragment +// 1111111111111111 222 333333 44444 55555555555555555555555 666 77777777 8888888 999 +var URL_REGEXP = /^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i; +// eslint-disable-next-line max-len +var EMAIL_REGEXP = /^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/; +var NUMBER_REGEXP = /^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/; +var DATE_REGEXP = /^(\d{4,})-(\d{2})-(\d{2})$/; +var DATETIMELOCAL_REGEXP = /^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/; +var WEEK_REGEXP = /^(\d{4,})-W(\d\d)$/; +var MONTH_REGEXP = /^(\d{4,})-(\d\d)$/; +var TIME_REGEXP = /^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/; + +var PARTIAL_VALIDATION_EVENTS = 'keydown wheel mousedown'; +var PARTIAL_VALIDATION_TYPES = createMap(); +forEach('date,datetime-local,month,time,week'.split(','), function(type) { + PARTIAL_VALIDATION_TYPES[type] = true; +}); + +var inputType = { + + /** + * @ngdoc input + * @name input[text] + * + * @description + * Standard HTML text input with angular data binding, inherited by most of the `input` elements. + * + * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} required Adds `required` validation error key if the value is not entered. + * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to + * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of + * `required` when you want to data-bind to the `required` attribute. + * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than + * minlength. + * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than + * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of + * any length. + * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string + * that contains the regular expression body that will be converted to a regular expression + * as in the ngPattern directive. + * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue} + * does not match a RegExp found by evaluating the Angular expression given in the attribute value. + * If the expression evaluates to a RegExp object, then this is used directly. + * If the expression evaluates to a string, then it will be converted to a RegExp + * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to + * `new RegExp('^abc$')`.
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to + * start at the index of the last search's match, thus not taking the whole input value into + * account. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input. + * This parameter is ignored for input[type=password] controls, which will never trim the + * input. + * + * @example + + + +
+ +
+ + Required! + + Single word only! +
+ text = {{example.text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+
+ + var text = element(by.binding('example.text')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('example.text')); + + it('should initialize to model', function() { + expect(text.getText()).toContain('guest'); + expect(valid.getText()).toContain('true'); + }); + + it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + + expect(text.getText()).toEqual('text ='); + expect(valid.getText()).toContain('false'); + }); + + it('should be invalid if multi word', function() { + input.clear(); + input.sendKeys('hello world'); + + expect(valid.getText()).toContain('false'); + }); + +
+ */ + 'text': textInputType, + + /** + * @ngdoc input + * @name input[date] + * + * @description + * Input with date validation and transformation. In browsers that do not yet support + * the HTML5 date input, a text element will be used. In that case, text must be entered in a valid ISO-8601 + * date format (yyyy-MM-dd), for example: `2009-01-06`. Since many + * modern browsers do not yet support this input type, it is important to provide cues to users on the + * expected input format via a placeholder or label. + * + * The model must always be a Date object, otherwise Angular will throw an error. + * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string. + * + * The timezone to be used to read/write the `Date` instance in the model can be defined using + * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser. + * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a + * valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute + * (e.g. `min="{{minDate | date:'yyyy-MM-dd'}}"`). Note that `min` will also add native HTML5 + * constraint validation. + * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be + * a valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute + * (e.g. `max="{{maxDate | date:'yyyy-MM-dd'}}"`). Note that `max` will also add native HTML5 + * constraint validation. + * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO date string + * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute. + * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO date string + * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute. + * @param {string=} required Sets `required` validation error key if the value is not entered. + * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to + * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of + * `required` when you want to data-bind to the `required` attribute. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * + * @example + + + +
+ + +
+ + Required! + + Not a valid date! +
+ value = {{example.value | date: "yyyy-MM-dd"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+
+ + var value = element(by.binding('example.value | date: "yyyy-MM-dd"')); + var valid = element(by.binding('myForm.input.$valid')); + + // currently protractor/webdriver does not support + // sending keys to all known HTML5 input controls + // for various browsers (see https://github.com/angular/protractor/issues/562). + function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); + } + + it('should initialize to model', function() { + expect(value.getText()).toContain('2013-10-22'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); + }); + + it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + + it('should be invalid if over max', function() { + setInput('2015-01-01'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + +
+ */ + 'date': createDateInputType('date', DATE_REGEXP, + createDateParser(DATE_REGEXP, ['yyyy', 'MM', 'dd']), + 'yyyy-MM-dd'), + + /** + * @ngdoc input + * @name input[datetime-local] + * + * @description + * Input with datetime validation and transformation. In browsers that do not yet support + * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601 + * local datetime format (yyyy-MM-ddTHH:mm:ss), for example: `2010-12-28T14:57:00`. + * + * The model must always be a Date object, otherwise Angular will throw an error. + * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string. + * + * The timezone to be used to read/write the `Date` instance in the model can be defined using + * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser. + * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. + * This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation + * inside this attribute (e.g. `min="{{minDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}"`). + * Note that `min` will also add native HTML5 constraint validation. + * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. + * This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation + * inside this attribute (e.g. `max="{{maxDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}"`). + * Note that `max` will also add native HTML5 constraint validation. + * @param {(date|string)=} ngMin Sets the `min` validation error key to the Date / ISO datetime string + * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute. + * @param {(date|string)=} ngMax Sets the `max` validation error key to the Date / ISO datetime string + * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute. + * @param {string=} required Sets `required` validation error key if the value is not entered. + * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to + * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of + * `required` when you want to data-bind to the `required` attribute. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * + * @example + + + +
+ + +
+ + Required! + + Not a valid date! +
+ value = {{example.value | date: "yyyy-MM-ddTHH:mm:ss"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+
+ + var value = element(by.binding('example.value | date: "yyyy-MM-ddTHH:mm:ss"')); + var valid = element(by.binding('myForm.input.$valid')); + + // currently protractor/webdriver does not support + // sending keys to all known HTML5 input controls + // for various browsers (https://github.com/angular/protractor/issues/562). + function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); + } + + it('should initialize to model', function() { + expect(value.getText()).toContain('2010-12-28T14:57:00'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); + }); + + it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + + it('should be invalid if over max', function() { + setInput('2015-01-01T23:59:00'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + +
+ */ + 'datetime-local': createDateInputType('datetimelocal', DATETIMELOCAL_REGEXP, + createDateParser(DATETIMELOCAL_REGEXP, ['yyyy', 'MM', 'dd', 'HH', 'mm', 'ss', 'sss']), + 'yyyy-MM-ddTHH:mm:ss.sss'), + + /** + * @ngdoc input + * @name input[time] + * + * @description + * Input with time validation and transformation. In browsers that do not yet support + * the HTML5 time input, a text element will be used. In that case, the text must be entered in a valid ISO-8601 + * local time format (HH:mm:ss), for example: `14:57:00`. Model must be a Date object. This binding will always output a + * Date object to the model of January 1, 1970, or local date `new Date(1970, 0, 1, HH, mm, ss)`. + * + * The model must always be a Date object, otherwise Angular will throw an error. + * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string. + * + * The timezone to be used to read/write the `Date` instance in the model can be defined using + * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser. + * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. + * This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this + * attribute (e.g. `min="{{minTime | date:'HH:mm:ss'}}"`). Note that `min` will also add + * native HTML5 constraint validation. + * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. + * This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this + * attribute (e.g. `max="{{maxTime | date:'HH:mm:ss'}}"`). Note that `max` will also add + * native HTML5 constraint validation. + * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO time string the + * `ngMin` expression evaluates to. Note that it does not set the `min` attribute. + * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO time string the + * `ngMax` expression evaluates to. Note that it does not set the `max` attribute. + * @param {string=} required Sets `required` validation error key if the value is not entered. + * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to + * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of + * `required` when you want to data-bind to the `required` attribute. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * + * @example + + + +
+ + +
+ + Required! + + Not a valid date! +
+ value = {{example.value | date: "HH:mm:ss"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+
+ + var value = element(by.binding('example.value | date: "HH:mm:ss"')); + var valid = element(by.binding('myForm.input.$valid')); + + // currently protractor/webdriver does not support + // sending keys to all known HTML5 input controls + // for various browsers (https://github.com/angular/protractor/issues/562). + function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); + } + + it('should initialize to model', function() { + expect(value.getText()).toContain('14:57:00'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); + }); + + it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + + it('should be invalid if over max', function() { + setInput('23:59:00'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + +
+ */ + 'time': createDateInputType('time', TIME_REGEXP, + createDateParser(TIME_REGEXP, ['HH', 'mm', 'ss', 'sss']), + 'HH:mm:ss.sss'), + + /** + * @ngdoc input + * @name input[week] + * + * @description + * Input with week-of-the-year validation and transformation to Date. In browsers that do not yet support + * the HTML5 week input, a text element will be used. In that case, the text must be entered in a valid ISO-8601 + * week format (yyyy-W##), for example: `2013-W02`. + * + * The model must always be a Date object, otherwise Angular will throw an error. + * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string. + * + * The timezone to be used to read/write the `Date` instance in the model can be defined using + * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser. + * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. + * This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this + * attribute (e.g. `min="{{minWeek | date:'yyyy-Www'}}"`). Note that `min` will also add + * native HTML5 constraint validation. + * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. + * This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this + * attribute (e.g. `max="{{maxWeek | date:'yyyy-Www'}}"`). Note that `max` will also add + * native HTML5 constraint validation. + * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string + * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute. + * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string + * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute. + * @param {string=} required Sets `required` validation error key if the value is not entered. + * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to + * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of + * `required` when you want to data-bind to the `required` attribute. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * + * @example + + + +
+ +
+ + Required! + + Not a valid date! +
+ value = {{example.value | date: "yyyy-Www"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+
+ + var value = element(by.binding('example.value | date: "yyyy-Www"')); + var valid = element(by.binding('myForm.input.$valid')); + + // currently protractor/webdriver does not support + // sending keys to all known HTML5 input controls + // for various browsers (https://github.com/angular/protractor/issues/562). + function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); + } + + it('should initialize to model', function() { + expect(value.getText()).toContain('2013-W01'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); + }); + + it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + + it('should be invalid if over max', function() { + setInput('2015-W01'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + +
+ */ + 'week': createDateInputType('week', WEEK_REGEXP, weekParser, 'yyyy-Www'), + + /** + * @ngdoc input + * @name input[month] + * + * @description + * Input with month validation and transformation. In browsers that do not yet support + * the HTML5 month input, a text element will be used. In that case, the text must be entered in a valid ISO-8601 + * month format (yyyy-MM), for example: `2009-01`. + * + * The model must always be a Date object, otherwise Angular will throw an error. + * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string. + * If the model is not set to the first of the month, the next view to model update will set it + * to the first of the month. + * + * The timezone to be used to read/write the `Date` instance in the model can be defined using + * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser. + * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. + * This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this + * attribute (e.g. `min="{{minMonth | date:'yyyy-MM'}}"`). Note that `min` will also add + * native HTML5 constraint validation. + * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. + * This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this + * attribute (e.g. `max="{{maxMonth | date:'yyyy-MM'}}"`). Note that `max` will also add + * native HTML5 constraint validation. + * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string + * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute. + * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string + * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute. + + * @param {string=} required Sets `required` validation error key if the value is not entered. + * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to + * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of + * `required` when you want to data-bind to the `required` attribute. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * + * @example + + + +
+ + +
+ + Required! + + Not a valid month! +
+ value = {{example.value | date: "yyyy-MM"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+
+ + var value = element(by.binding('example.value | date: "yyyy-MM"')); + var valid = element(by.binding('myForm.input.$valid')); + + // currently protractor/webdriver does not support + // sending keys to all known HTML5 input controls + // for various browsers (https://github.com/angular/protractor/issues/562). + function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); + } + + it('should initialize to model', function() { + expect(value.getText()).toContain('2013-10'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); + }); + + it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + + it('should be invalid if over max', function() { + setInput('2015-01'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + +
+ */ + 'month': createDateInputType('month', MONTH_REGEXP, + createDateParser(MONTH_REGEXP, ['yyyy', 'MM']), + 'yyyy-MM'), + + /** + * @ngdoc input + * @name input[number] + * + * @description + * Text input with number validation and transformation. Sets the `number` validation + * error if not a valid number. + * + *
+ * The model must always be of type `number` otherwise Angular will throw an error. + * Be aware that a string containing a number is not enough. See the {@link ngModel:numfmt} + * error docs for more information and an example of how to convert your model if necessary. + *
+ * + * ## Issues with HTML5 constraint validation + * + * In browsers that follow the + * [HTML5 specification](https://html.spec.whatwg.org/multipage/forms.html#number-state-%28type=number%29), + * `input[number]` does not work as expected with {@link ngModelOptions `ngModelOptions.allowInvalid`}. + * If a non-number is entered in the input, the browser will report the value as an empty string, + * which means the view / model values in `ngModel` and subsequently the scope value + * will also be an empty string. + * + * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. + * Can be interpolated. + * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. + * Can be interpolated. + * @param {string=} ngMin Like `min`, sets the `min` validation error key if the value entered is less than `ngMin`, + * but does not trigger HTML5 native validation. Takes an expression. + * @param {string=} ngMax Like `max`, sets the `max` validation error key if the value entered is greater than `ngMax`, + * but does not trigger HTML5 native validation. Takes an expression. + * @param {string=} step Sets the `step` validation error key if the value entered does not fit the `step` constraint. + * Can be interpolated. + * @param {string=} ngStep Like `step`, sets the `step` validation error key if the value entered does not fit the `ngStep` constraint, + * but does not trigger HTML5 native validation. Takes an expression. + * @param {string=} required Sets `required` validation error key if the value is not entered. + * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to + * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of + * `required` when you want to data-bind to the `required` attribute. + * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than + * minlength. + * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than + * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of + * any length. + * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string + * that contains the regular expression body that will be converted to a regular expression + * as in the ngPattern directive. + * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue} + * does not match a RegExp found by evaluating the Angular expression given in the attribute value. + * If the expression evaluates to a RegExp object, then this is used directly. + * If the expression evaluates to a string, then it will be converted to a RegExp + * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to + * `new RegExp('^abc$')`.
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to + * start at the index of the last search's match, thus not taking the whole input value into + * account. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * + * @example + + + +
+ +
+ + Required! + + Not valid number! +
+ value = {{example.value}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+
+ + var value = element(by.binding('example.value')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('example.value')); + + it('should initialize to model', function() { + expect(value.getText()).toContain('12'); + expect(valid.getText()).toContain('true'); + }); + + it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('false'); + }); + + it('should be invalid if over max', function() { + input.clear(); + input.sendKeys('123'); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('false'); + }); + +
+ */ + 'number': numberInputType, + + + /** + * @ngdoc input + * @name input[url] + * + * @description + * Text input with URL validation. Sets the `url` validation error key if the content is not a + * valid URL. + * + *
+ * **Note:** `input[url]` uses a regex to validate urls that is derived from the regex + * used in Chromium. If you need stricter validation, you can use `ng-pattern` or modify + * the built-in validators (see the {@link guide/forms Forms guide}) + *
+ * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} required Sets `required` validation error key if the value is not entered. + * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to + * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of + * `required` when you want to data-bind to the `required` attribute. + * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than + * minlength. + * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than + * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of + * any length. + * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string + * that contains the regular expression body that will be converted to a regular expression + * as in the ngPattern directive. + * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue} + * does not match a RegExp found by evaluating the Angular expression given in the attribute value. + * If the expression evaluates to a RegExp object, then this is used directly. + * If the expression evaluates to a string, then it will be converted to a RegExp + * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to + * `new RegExp('^abc$')`.
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to + * start at the index of the last search's match, thus not taking the whole input value into + * account. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * + * @example + + + +
+
+ + var text = element(by.binding('url.text')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('url.text')); + + it('should initialize to model', function() { + expect(text.getText()).toContain('http://google.com'); + expect(valid.getText()).toContain('true'); + }); + + it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + + expect(text.getText()).toEqual('text ='); + expect(valid.getText()).toContain('false'); + }); + + it('should be invalid if not url', function() { + input.clear(); + input.sendKeys('box'); + + expect(valid.getText()).toContain('false'); + }); + +
+ */ + 'url': urlInputType, + + + /** + * @ngdoc input + * @name input[email] + * + * @description + * Text input with email validation. Sets the `email` validation error key if not a valid email + * address. + * + *
+ * **Note:** `input[email]` uses a regex to validate email addresses that is derived from the regex + * used in Chromium. If you need stricter validation (e.g. requiring a top-level domain), you can + * use `ng-pattern` or modify the built-in validators (see the {@link guide/forms Forms guide}) + *
+ * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} required Sets `required` validation error key if the value is not entered. + * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to + * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of + * `required` when you want to data-bind to the `required` attribute. + * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than + * minlength. + * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than + * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of + * any length. + * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string + * that contains the regular expression body that will be converted to a regular expression + * as in the ngPattern directive. + * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue} + * does not match a RegExp found by evaluating the Angular expression given in the attribute value. + * If the expression evaluates to a RegExp object, then this is used directly. + * If the expression evaluates to a string, then it will be converted to a RegExp + * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to + * `new RegExp('^abc$')`.
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to + * start at the index of the last search's match, thus not taking the whole input value into + * account. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * + * @example + + + +
+ +
+ + Required! + + Not valid email! +
+ text = {{email.text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.email = {{!!myForm.$error.email}}
+
+
+ + var text = element(by.binding('email.text')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('email.text')); + + it('should initialize to model', function() { + expect(text.getText()).toContain('me@example.com'); + expect(valid.getText()).toContain('true'); + }); + + it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + expect(text.getText()).toEqual('text ='); + expect(valid.getText()).toContain('false'); + }); + + it('should be invalid if not email', function() { + input.clear(); + input.sendKeys('xxx'); + + expect(valid.getText()).toContain('false'); + }); + +
+ */ + 'email': emailInputType, + + + /** + * @ngdoc input + * @name input[radio] + * + * @description + * HTML radio button. + * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string} value The value to which the `ngModel` expression should be set when selected. + * Note that `value` only supports `string` values, i.e. the scope model needs to be a string, + * too. Use `ngValue` if you need complex models (`number`, `object`, ...). + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * @param {string} ngValue Angular expression to which `ngModel` will be be set when the radio + * is selected. Should be used instead of the `value` attribute if you need + * a non-string `ngModel` (`boolean`, `array`, ...). + * + * @example + + + +
+
+
+
+ color = {{color.name | json}}
+
+ Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`. +
+ + it('should change state', function() { + var inputs = element.all(by.model('color.name')); + var color = element(by.binding('color.name')); + + expect(color.getText()).toContain('blue'); + + inputs.get(0).click(); + expect(color.getText()).toContain('red'); + + inputs.get(1).click(); + expect(color.getText()).toContain('green'); + }); + +
+ */ + 'radio': radioInputType, + + /** + * @ngdoc input + * @name input[range] + * + * @description + * Native range input with validation and transformation. + * + * The model for the range input must always be a `Number`. + * + * IE9 and other browsers that do not support the `range` type fall back + * to a text input without any default values for `min`, `max` and `step`. Model binding, + * validation and number parsing are nevertheless supported. + * + * Browsers that support range (latest Chrome, Safari, Firefox, Edge) treat `input[range]` + * in a way that never allows the input to hold an invalid value. That means: + * - any non-numerical value is set to `(max + min) / 2`. + * - any numerical value that is less than the current min val, or greater than the current max val + * is set to the min / max val respectively. + * - additionally, the current `step` is respected, so the nearest value that satisfies a step + * is used. + * + * See the [HTML Spec on input[type=range]](https://www.w3.org/TR/html5/forms.html#range-state-(type=range)) + * for more info. + * + * This has the following consequences for Angular: + * + * Since the element value should always reflect the current model value, a range input + * will set the bound ngModel expression to the value that the browser has set for the + * input element. For example, in the following input ``, + * if the application sets `model.value = null`, the browser will set the input to `'50'`. + * Angular will then set the model to `50`, to prevent input and model value being out of sync. + * + * That means the model for range will immediately be set to `50` after `ngModel` has been + * initialized. It also means a range input can never have the required error. + * + * This does not only affect changes to the model value, but also to the values of the `min`, + * `max`, and `step` attributes. When these change in a way that will cause the browser to modify + * the input value, Angular will also update the model value. + * + * Automatic value adjustment also means that a range input element can never have the `required`, + * `min`, or `max` errors. + * + * However, `step` is currently only fully implemented by Firefox. Other browsers have problems + * when the step value changes dynamically - they do not adjust the element value correctly, but + * instead may set the `stepMismatch` error. If that's the case, the Angular will set the `step` + * error on the input, and set the model to `undefined`. + * + * Note that `input[range]` is not compatible with`ngMax`, `ngMin`, and `ngStep`, because they do + * not set the `min` and `max` attributes, which means that the browser won't automatically adjust + * the input value based on their values, and will always assume min = 0, max = 100, and step = 1. + * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} min Sets the `min` validation to ensure that the value entered is greater + * than `min`. Can be interpolated. + * @param {string=} max Sets the `max` validation to ensure that the value entered is less than `max`. + * Can be interpolated. + * @param {string=} step Sets the `step` validation to ensure that the value entered matches the `step` + * Can be interpolated. + * @param {string=} ngChange Angular expression to be executed when the ngModel value changes due + * to user interaction with the input element. + * @param {expression=} ngChecked If the expression is truthy, then the `checked` attribute will be set on the + * element. **Note** : `ngChecked` should not be used alongside `ngModel`. + * Checkout {@link ng.directive:ngChecked ngChecked} for usage. + * + * @example + + + +
+ + Model as range: +
+ Model as number:
+ Min:
+ Max:
+ value = {{value}}
+ myForm.range.$valid = {{myForm.range.$valid}}
+ myForm.range.$error = {{myForm.range.$error}} +
+
+
+ + * ## Range Input with ngMin & ngMax attributes + + * @example + + + +
+ Model as range: +
+ Model as number:
+ Min:
+ Max:
+ value = {{value}}
+ myForm.range.$valid = {{myForm.range.$valid}}
+ myForm.range.$error = {{myForm.range.$error}} +
+
+
+ + */ + 'range': rangeInputType, + + /** + * @ngdoc input + * @name input[checkbox] + * + * @description + * HTML checkbox. + * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {expression=} ngTrueValue The value to which the expression should be set when selected. + * @param {expression=} ngFalseValue The value to which the expression should be set when not selected. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * + * @example + + + +
+
+
+ value1 = {{checkboxModel.value1}}
+ value2 = {{checkboxModel.value2}}
+
+
+ + it('should change state', function() { + var value1 = element(by.binding('checkboxModel.value1')); + var value2 = element(by.binding('checkboxModel.value2')); + + expect(value1.getText()).toContain('true'); + expect(value2.getText()).toContain('YES'); + + element(by.model('checkboxModel.value1')).click(); + element(by.model('checkboxModel.value2')).click(); + + expect(value1.getText()).toContain('false'); + expect(value2.getText()).toContain('NO'); + }); + +
+ */ + 'checkbox': checkboxInputType, + + 'hidden': noop, + 'button': noop, + 'submit': noop, + 'reset': noop, + 'file': noop +}; + +function stringBasedInputType(ctrl) { + ctrl.$formatters.push(function(value) { + return ctrl.$isEmpty(value) ? value : value.toString(); + }); +} + +function textInputType(scope, element, attr, ctrl, $sniffer, $browser) { + baseInputType(scope, element, attr, ctrl, $sniffer, $browser); + stringBasedInputType(ctrl); +} + +function baseInputType(scope, element, attr, ctrl, $sniffer, $browser) { + var type = lowercase(element[0].type); + + // In composition mode, users are still inputting intermediate text buffer, + // hold the listener until composition is done. + // More about composition events: https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent + if (!$sniffer.android) { + var composing = false; + + element.on('compositionstart', function() { + composing = true; + }); + + element.on('compositionend', function() { + composing = false; + listener(); + }); + } + + var timeout; + + var listener = function(ev) { + if (timeout) { + $browser.defer.cancel(timeout); + timeout = null; + } + if (composing) return; + var value = element.val(), + event = ev && ev.type; + + // By default we will trim the value + // If the attribute ng-trim exists we will avoid trimming + // If input type is 'password', the value is never trimmed + if (type !== 'password' && (!attr.ngTrim || attr.ngTrim !== 'false')) { + value = trim(value); + } + + // If a control is suffering from bad input (due to native validators), browsers discard its + // value, so it may be necessary to revalidate (by calling $setViewValue again) even if the + // control's value is the same empty value twice in a row. + if (ctrl.$viewValue !== value || (value === '' && ctrl.$$hasNativeValidators)) { + ctrl.$setViewValue(value, event); + } + }; + + // if the browser does support "input" event, we are fine - except on IE9 which doesn't fire the + // input event on backspace, delete or cut + if ($sniffer.hasEvent('input')) { + element.on('input', listener); + } else { + var deferListener = function(ev, input, origValue) { + if (!timeout) { + timeout = $browser.defer(function() { + timeout = null; + if (!input || input.value !== origValue) { + listener(ev); + } + }); + } + }; + + element.on('keydown', /** @this */ function(event) { + var key = event.keyCode; + + // ignore + // command modifiers arrows + if (key === 91 || (15 < key && key < 19) || (37 <= key && key <= 40)) return; + + deferListener(event, this, this.value); + }); + + // if user modifies input value using context menu in IE, we need "paste" and "cut" events to catch it + if ($sniffer.hasEvent('paste')) { + element.on('paste cut', deferListener); + } + } + + // if user paste into input using mouse on older browser + // or form autocomplete on newer browser, we need "change" event to catch it + element.on('change', listener); + + // Some native input types (date-family) have the ability to change validity without + // firing any input/change events. + // For these event types, when native validators are present and the browser supports the type, + // check for validity changes on various DOM events. + if (PARTIAL_VALIDATION_TYPES[type] && ctrl.$$hasNativeValidators && type === attr.type) { + element.on(PARTIAL_VALIDATION_EVENTS, /** @this */ function(ev) { + if (!timeout) { + var validity = this[VALIDITY_STATE_PROPERTY]; + var origBadInput = validity.badInput; + var origTypeMismatch = validity.typeMismatch; + timeout = $browser.defer(function() { + timeout = null; + if (validity.badInput !== origBadInput || validity.typeMismatch !== origTypeMismatch) { + listener(ev); + } + }); + } + }); + } + + ctrl.$render = function() { + // Workaround for Firefox validation #12102. + var value = ctrl.$isEmpty(ctrl.$viewValue) ? '' : ctrl.$viewValue; + if (element.val() !== value) { + element.val(value); + } + }; +} + +function weekParser(isoWeek, existingDate) { + if (isDate(isoWeek)) { + return isoWeek; + } + + if (isString(isoWeek)) { + WEEK_REGEXP.lastIndex = 0; + var parts = WEEK_REGEXP.exec(isoWeek); + if (parts) { + var year = +parts[1], + week = +parts[2], + hours = 0, + minutes = 0, + seconds = 0, + milliseconds = 0, + firstThurs = getFirstThursdayOfYear(year), + addDays = (week - 1) * 7; + + if (existingDate) { + hours = existingDate.getHours(); + minutes = existingDate.getMinutes(); + seconds = existingDate.getSeconds(); + milliseconds = existingDate.getMilliseconds(); + } + + return new Date(year, 0, firstThurs.getDate() + addDays, hours, minutes, seconds, milliseconds); + } + } + + return NaN; +} + +function createDateParser(regexp, mapping) { + return function(iso, date) { + var parts, map; + + if (isDate(iso)) { + return iso; + } + + if (isString(iso)) { + // When a date is JSON'ified to wraps itself inside of an extra + // set of double quotes. This makes the date parsing code unable + // to match the date string and parse it as a date. + if (iso.charAt(0) === '"' && iso.charAt(iso.length - 1) === '"') { + iso = iso.substring(1, iso.length - 1); + } + if (ISO_DATE_REGEXP.test(iso)) { + return new Date(iso); + } + regexp.lastIndex = 0; + parts = regexp.exec(iso); + + if (parts) { + parts.shift(); + if (date) { + map = { + yyyy: date.getFullYear(), + MM: date.getMonth() + 1, + dd: date.getDate(), + HH: date.getHours(), + mm: date.getMinutes(), + ss: date.getSeconds(), + sss: date.getMilliseconds() / 1000 + }; + } else { + map = { yyyy: 1970, MM: 1, dd: 1, HH: 0, mm: 0, ss: 0, sss: 0 }; + } + + forEach(parts, function(part, index) { + if (index < mapping.length) { + map[mapping[index]] = +part; + } + }); + return new Date(map.yyyy, map.MM - 1, map.dd, map.HH, map.mm, map.ss || 0, map.sss * 1000 || 0); + } + } + + return NaN; + }; +} + +function createDateInputType(type, regexp, parseDate, format) { + return function dynamicDateInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter) { + badInputChecker(scope, element, attr, ctrl); + baseInputType(scope, element, attr, ctrl, $sniffer, $browser); + var timezone = ctrl && ctrl.$options.getOption('timezone'); + var previousDate; + + ctrl.$$parserName = type; + ctrl.$parsers.push(function(value) { + if (ctrl.$isEmpty(value)) return null; + if (regexp.test(value)) { + // Note: We cannot read ctrl.$modelValue, as there might be a different + // parser/formatter in the processing chain so that the model + // contains some different data format! + var parsedDate = parseDate(value, previousDate); + if (timezone) { + parsedDate = convertTimezoneToLocal(parsedDate, timezone); + } + return parsedDate; + } + return undefined; + }); + + ctrl.$formatters.push(function(value) { + if (value && !isDate(value)) { + throw ngModelMinErr('datefmt', 'Expected `{0}` to be a date', value); + } + if (isValidDate(value)) { + previousDate = value; + if (previousDate && timezone) { + previousDate = convertTimezoneToLocal(previousDate, timezone, true); + } + return $filter('date')(value, format, timezone); + } else { + previousDate = null; + return ''; + } + }); + + if (isDefined(attr.min) || attr.ngMin) { + var minVal; + ctrl.$validators.min = function(value) { + return !isValidDate(value) || isUndefined(minVal) || parseDate(value) >= minVal; + }; + attr.$observe('min', function(val) { + minVal = parseObservedDateValue(val); + ctrl.$validate(); + }); + } + + if (isDefined(attr.max) || attr.ngMax) { + var maxVal; + ctrl.$validators.max = function(value) { + return !isValidDate(value) || isUndefined(maxVal) || parseDate(value) <= maxVal; + }; + attr.$observe('max', function(val) { + maxVal = parseObservedDateValue(val); + ctrl.$validate(); + }); + } + + function isValidDate(value) { + // Invalid Date: getTime() returns NaN + return value && !(value.getTime && value.getTime() !== value.getTime()); + } + + function parseObservedDateValue(val) { + return isDefined(val) && !isDate(val) ? parseDate(val) || undefined : val; + } + }; +} + +function badInputChecker(scope, element, attr, ctrl) { + var node = element[0]; + var nativeValidation = ctrl.$$hasNativeValidators = isObject(node.validity); + if (nativeValidation) { + ctrl.$parsers.push(function(value) { + var validity = element.prop(VALIDITY_STATE_PROPERTY) || {}; + return validity.badInput || validity.typeMismatch ? undefined : value; + }); + } +} + +function numberFormatterParser(ctrl) { + ctrl.$$parserName = 'number'; + ctrl.$parsers.push(function(value) { + if (ctrl.$isEmpty(value)) return null; + if (NUMBER_REGEXP.test(value)) return parseFloat(value); + return undefined; + }); + + ctrl.$formatters.push(function(value) { + if (!ctrl.$isEmpty(value)) { + if (!isNumber(value)) { + throw ngModelMinErr('numfmt', 'Expected `{0}` to be a number', value); + } + value = value.toString(); + } + return value; + }); +} + +function parseNumberAttrVal(val) { + if (isDefined(val) && !isNumber(val)) { + val = parseFloat(val); + } + return !isNumberNaN(val) ? val : undefined; +} + +function isNumberInteger(num) { + // See http://stackoverflow.com/questions/14636536/how-to-check-if-a-variable-is-an-integer-in-javascript#14794066 + // (minus the assumption that `num` is a number) + + // eslint-disable-next-line no-bitwise + return (num | 0) === num; +} + +function countDecimals(num) { + var numString = num.toString(); + var decimalSymbolIndex = numString.indexOf('.'); + + if (decimalSymbolIndex === -1) { + if (-1 < num && num < 1) { + // It may be in the exponential notation format (`1e-X`) + var match = /e-(\d+)$/.exec(numString); + + if (match) { + return Number(match[1]); + } + } + + return 0; + } + + return numString.length - decimalSymbolIndex - 1; +} + +function isValidForStep(viewValue, stepBase, step) { + // At this point `stepBase` and `step` are expected to be non-NaN values + // and `viewValue` is expected to be a valid stringified number. + var value = Number(viewValue); + + var isNonIntegerValue = !isNumberInteger(value); + var isNonIntegerStepBase = !isNumberInteger(stepBase); + var isNonIntegerStep = !isNumberInteger(step); + + // Due to limitations in Floating Point Arithmetic (e.g. `0.3 - 0.2 !== 0.1` or + // `0.5 % 0.1 !== 0`), we need to convert all numbers to integers. + if (isNonIntegerValue || isNonIntegerStepBase || isNonIntegerStep) { + var valueDecimals = isNonIntegerValue ? countDecimals(value) : 0; + var stepBaseDecimals = isNonIntegerStepBase ? countDecimals(stepBase) : 0; + var stepDecimals = isNonIntegerStep ? countDecimals(step) : 0; + + var decimalCount = Math.max(valueDecimals, stepBaseDecimals, stepDecimals); + var multiplier = Math.pow(10, decimalCount); + + value = value * multiplier; + stepBase = stepBase * multiplier; + step = step * multiplier; + + if (isNonIntegerValue) value = Math.round(value); + if (isNonIntegerStepBase) stepBase = Math.round(stepBase); + if (isNonIntegerStep) step = Math.round(step); + } + + return (value - stepBase) % step === 0; +} + +function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) { + badInputChecker(scope, element, attr, ctrl); + numberFormatterParser(ctrl); + baseInputType(scope, element, attr, ctrl, $sniffer, $browser); + + var minVal; + var maxVal; + + if (isDefined(attr.min) || attr.ngMin) { + ctrl.$validators.min = function(value) { + return ctrl.$isEmpty(value) || isUndefined(minVal) || value >= minVal; + }; + + attr.$observe('min', function(val) { + minVal = parseNumberAttrVal(val); + // TODO(matsko): implement validateLater to reduce number of validations + ctrl.$validate(); + }); + } + + if (isDefined(attr.max) || attr.ngMax) { + ctrl.$validators.max = function(value) { + return ctrl.$isEmpty(value) || isUndefined(maxVal) || value <= maxVal; + }; + + attr.$observe('max', function(val) { + maxVal = parseNumberAttrVal(val); + // TODO(matsko): implement validateLater to reduce number of validations + ctrl.$validate(); + }); + } + + if (isDefined(attr.step) || attr.ngStep) { + var stepVal; + ctrl.$validators.step = function(modelValue, viewValue) { + return ctrl.$isEmpty(viewValue) || isUndefined(stepVal) || + isValidForStep(viewValue, minVal || 0, stepVal); + }; + + attr.$observe('step', function(val) { + stepVal = parseNumberAttrVal(val); + // TODO(matsko): implement validateLater to reduce number of validations + ctrl.$validate(); + }); + } +} + +function rangeInputType(scope, element, attr, ctrl, $sniffer, $browser) { + badInputChecker(scope, element, attr, ctrl); + numberFormatterParser(ctrl); + baseInputType(scope, element, attr, ctrl, $sniffer, $browser); + + var supportsRange = ctrl.$$hasNativeValidators && element[0].type === 'range', + minVal = supportsRange ? 0 : undefined, + maxVal = supportsRange ? 100 : undefined, + stepVal = supportsRange ? 1 : undefined, + validity = element[0].validity, + hasMinAttr = isDefined(attr.min), + hasMaxAttr = isDefined(attr.max), + hasStepAttr = isDefined(attr.step); + + var originalRender = ctrl.$render; + + ctrl.$render = supportsRange && isDefined(validity.rangeUnderflow) && isDefined(validity.rangeOverflow) ? + //Browsers that implement range will set these values automatically, but reading the adjusted values after + //$render would cause the min / max validators to be applied with the wrong value + function rangeRender() { + originalRender(); + ctrl.$setViewValue(element.val()); + } : + originalRender; + + if (hasMinAttr) { + ctrl.$validators.min = supportsRange ? + // Since all browsers set the input to a valid value, we don't need to check validity + function noopMinValidator() { return true; } : + // non-support browsers validate the min val + function minValidator(modelValue, viewValue) { + return ctrl.$isEmpty(viewValue) || isUndefined(minVal) || viewValue >= minVal; + }; + + setInitialValueAndObserver('min', minChange); + } + + if (hasMaxAttr) { + ctrl.$validators.max = supportsRange ? + // Since all browsers set the input to a valid value, we don't need to check validity + function noopMaxValidator() { return true; } : + // non-support browsers validate the max val + function maxValidator(modelValue, viewValue) { + return ctrl.$isEmpty(viewValue) || isUndefined(maxVal) || viewValue <= maxVal; + }; + + setInitialValueAndObserver('max', maxChange); + } + + if (hasStepAttr) { + ctrl.$validators.step = supportsRange ? + function nativeStepValidator() { + // Currently, only FF implements the spec on step change correctly (i.e. adjusting the + // input element value to a valid value). It's possible that other browsers set the stepMismatch + // validity error instead, so we can at least report an error in that case. + return !validity.stepMismatch; + } : + // ngStep doesn't set the setp attr, so the browser doesn't adjust the input value as setting step would + function stepValidator(modelValue, viewValue) { + return ctrl.$isEmpty(viewValue) || isUndefined(stepVal) || + isValidForStep(viewValue, minVal || 0, stepVal); + }; + + setInitialValueAndObserver('step', stepChange); + } + + function setInitialValueAndObserver(htmlAttrName, changeFn) { + // interpolated attributes set the attribute value only after a digest, but we need the + // attribute value when the input is first rendered, so that the browser can adjust the + // input value based on the min/max value + element.attr(htmlAttrName, attr[htmlAttrName]); + attr.$observe(htmlAttrName, changeFn); + } + + function minChange(val) { + minVal = parseNumberAttrVal(val); + // ignore changes before model is initialized + if (isNumberNaN(ctrl.$modelValue)) { + return; + } + + if (supportsRange) { + var elVal = element.val(); + // IE11 doesn't set the el val correctly if the minVal is greater than the element value + if (minVal > elVal) { + elVal = minVal; + element.val(elVal); + } + ctrl.$setViewValue(elVal); + } else { + // TODO(matsko): implement validateLater to reduce number of validations + ctrl.$validate(); + } + } + + function maxChange(val) { + maxVal = parseNumberAttrVal(val); + // ignore changes before model is initialized + if (isNumberNaN(ctrl.$modelValue)) { + return; + } + + if (supportsRange) { + var elVal = element.val(); + // IE11 doesn't set the el val correctly if the maxVal is less than the element value + if (maxVal < elVal) { + element.val(maxVal); + // IE11 and Chrome don't set the value to the minVal when max < min + elVal = maxVal < minVal ? minVal : maxVal; + } + ctrl.$setViewValue(elVal); + } else { + // TODO(matsko): implement validateLater to reduce number of validations + ctrl.$validate(); + } + } + + function stepChange(val) { + stepVal = parseNumberAttrVal(val); + // ignore changes before model is initialized + if (isNumberNaN(ctrl.$modelValue)) { + return; + } + + // Some browsers don't adjust the input value correctly, but set the stepMismatch error + if (supportsRange && ctrl.$viewValue !== element.val()) { + ctrl.$setViewValue(element.val()); + } else { + // TODO(matsko): implement validateLater to reduce number of validations + ctrl.$validate(); + } + } +} + +function urlInputType(scope, element, attr, ctrl, $sniffer, $browser) { + // Note: no badInputChecker here by purpose as `url` is only a validation + // in browsers, i.e. we can always read out input.value even if it is not valid! + baseInputType(scope, element, attr, ctrl, $sniffer, $browser); + stringBasedInputType(ctrl); + + ctrl.$$parserName = 'url'; + ctrl.$validators.url = function(modelValue, viewValue) { + var value = modelValue || viewValue; + return ctrl.$isEmpty(value) || URL_REGEXP.test(value); + }; +} + +function emailInputType(scope, element, attr, ctrl, $sniffer, $browser) { + // Note: no badInputChecker here by purpose as `url` is only a validation + // in browsers, i.e. we can always read out input.value even if it is not valid! + baseInputType(scope, element, attr, ctrl, $sniffer, $browser); + stringBasedInputType(ctrl); + + ctrl.$$parserName = 'email'; + ctrl.$validators.email = function(modelValue, viewValue) { + var value = modelValue || viewValue; + return ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value); + }; +} + +function radioInputType(scope, element, attr, ctrl) { + var doTrim = !attr.ngTrim || trim(attr.ngTrim) !== 'false'; + // make the name unique, if not defined + if (isUndefined(attr.name)) { + element.attr('name', nextUid()); + } + + var listener = function(ev) { + var value; + if (element[0].checked) { + value = attr.value; + if (doTrim) { + value = trim(value); + } + ctrl.$setViewValue(value, ev && ev.type); + } + }; + + element.on('click', listener); + + ctrl.$render = function() { + var value = attr.value; + if (doTrim) { + value = trim(value); + } + element[0].checked = (value === ctrl.$viewValue); + }; + + attr.$observe('value', ctrl.$render); +} + +function parseConstantExpr($parse, context, name, expression, fallback) { + var parseFn; + if (isDefined(expression)) { + parseFn = $parse(expression); + if (!parseFn.constant) { + throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' + + '`{1}`.', name, expression); + } + return parseFn(context); + } + return fallback; +} + +function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) { + var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true); + var falseValue = parseConstantExpr($parse, scope, 'ngFalseValue', attr.ngFalseValue, false); + + var listener = function(ev) { + ctrl.$setViewValue(element[0].checked, ev && ev.type); + }; + + element.on('click', listener); + + ctrl.$render = function() { + element[0].checked = ctrl.$viewValue; + }; + + // Override the standard `$isEmpty` because the $viewValue of an empty checkbox is always set to `false` + // This is because of the parser below, which compares the `$modelValue` with `trueValue` to convert + // it to a boolean. + ctrl.$isEmpty = function(value) { + return value === false; + }; + + ctrl.$formatters.push(function(value) { + return equals(value, trueValue); + }); + + ctrl.$parsers.push(function(value) { + return value ? trueValue : falseValue; + }); +} + + +/** + * @ngdoc directive + * @name textarea + * @restrict E + * + * @description + * HTML textarea element control with angular data-binding. The data-binding and validation + * properties of this element are exactly the same as those of the + * {@link ng.directive:input input element}. + * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} required Sets `required` validation error key if the value is not entered. + * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to + * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of + * `required` when you want to data-bind to the `required` attribute. + * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than + * minlength. + * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than + * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any + * length. + * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue} + * does not match a RegExp found by evaluating the Angular expression given in the attribute value. + * If the expression evaluates to a RegExp object, then this is used directly. + * If the expression evaluates to a string, then it will be converted to a RegExp + * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to + * `new RegExp('^abc$')`.
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to + * start at the index of the last search's match, thus not taking the whole input value into + * account. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input. + * + * @knownIssue + * + * When specifying the `placeholder` attribute of ` + *
{{ list | json }}
+ * + * + * it("should split the text by newlines", function() { + * var listInput = element(by.model('list')); + * var output = element(by.binding('list | json')); + * listInput.sendKeys('abc\ndef\nghi'); + * expect(output.getText()).toContain('[\n "abc",\n "def",\n "ghi"\n]'); + * }); + * + * + * + * @element input + * @param {string=} ngList optional delimiter that should be used to split the value. + */ +var ngListDirective = function() { + return { + restrict: 'A', + priority: 100, + require: 'ngModel', + link: function(scope, element, attr, ctrl) { + var ngList = attr.ngList || ', '; + var trimValues = attr.ngTrim !== 'false'; + var separator = trimValues ? trim(ngList) : ngList; + + var parse = function(viewValue) { + // If the viewValue is invalid (say required but empty) it will be `undefined` + if (isUndefined(viewValue)) return; + + var list = []; + + if (viewValue) { + forEach(viewValue.split(separator), function(value) { + if (value) list.push(trimValues ? trim(value) : value); + }); + } + + return list; + }; + + ctrl.$parsers.push(parse); + ctrl.$formatters.push(function(value) { + if (isArray(value)) { + return value.join(ngList); + } + + return undefined; + }); + + // Override the standard $isEmpty because an empty array means the input is empty. + ctrl.$isEmpty = function(value) { + return !value || !value.length; + }; + } + }; +}; + +/* global VALID_CLASS: true, + INVALID_CLASS: true, + PRISTINE_CLASS: true, + DIRTY_CLASS: true, + UNTOUCHED_CLASS: true, + TOUCHED_CLASS: true, + PENDING_CLASS: true, + addSetValidityMethod: true, + setupValidity: true, + defaultModelOptions: false +*/ + + +var VALID_CLASS = 'ng-valid', + INVALID_CLASS = 'ng-invalid', + PRISTINE_CLASS = 'ng-pristine', + DIRTY_CLASS = 'ng-dirty', + UNTOUCHED_CLASS = 'ng-untouched', + TOUCHED_CLASS = 'ng-touched', + EMPTY_CLASS = 'ng-empty', + NOT_EMPTY_CLASS = 'ng-not-empty'; + +var ngModelMinErr = minErr('ngModel'); + +/** + * @ngdoc type + * @name ngModel.NgModelController + * + * @property {*} $viewValue The actual value from the control's view. For `input` elements, this is a + * String. See {@link ngModel.NgModelController#$setViewValue} for information about when the $viewValue + * is set. + * + * @property {*} $modelValue The value in the model that the control is bound to. + * + * @property {Array.} $parsers Array of functions to execute, as a pipeline, whenever + * the control updates the ngModelController with a new {@link ngModel.NgModelController#$viewValue + `$viewValue`} from the DOM, usually via user input. + See {@link ngModel.NgModelController#$setViewValue `$setViewValue()`} for a detailed lifecycle explanation. + Note that the `$parsers` are not called when the bound ngModel expression changes programmatically. + + The functions are called in array order, each passing + its return value through to the next. The last return value is forwarded to the + {@link ngModel.NgModelController#$validators `$validators`} collection. + + Parsers are used to sanitize / convert the {@link ngModel.NgModelController#$viewValue + `$viewValue`}. + + Returning `undefined` from a parser means a parse error occurred. In that case, + no {@link ngModel.NgModelController#$validators `$validators`} will run and the `ngModel` + will be set to `undefined` unless {@link ngModelOptions `ngModelOptions.allowInvalid`} + is set to `true`. The parse error is stored in `ngModel.$error.parse`. + + This simple example shows a parser that would convert text input value to lowercase: + * ```js + * function parse(value) { + * if (value) { + * return value.toLowerCase(); + * } + * } + * ngModelController.$parsers.push(parse); + * ``` + + * + * @property {Array.} $formatters Array of functions to execute, as a pipeline, whenever + the bound ngModel expression changes programmatically. The `$formatters` are not called when the + value of the control is changed by user interaction. + + Formatters are used to format / convert the {@link ngModel.NgModelController#$modelValue + `$modelValue`} for display in the control. + + The functions are called in reverse array order, each passing the value through to the + next. The last return value is used as the actual DOM value. + + This simple example shows a formatter that would convert the model value to uppercase: + + * ```js + * function format(value) { + * if (value) { + * return value.toUpperCase(); + * } + * } + * ngModel.$formatters.push(format); + * ``` + * + * @property {Object.} $validators A collection of validators that are applied + * whenever the model value changes. The key value within the object refers to the name of the + * validator while the function refers to the validation operation. The validation operation is + * provided with the model value as an argument and must return a true or false value depending + * on the response of that validation. + * + * ```js + * ngModel.$validators.validCharacters = function(modelValue, viewValue) { + * var value = modelValue || viewValue; + * return /[0-9]+/.test(value) && + * /[a-z]+/.test(value) && + * /[A-Z]+/.test(value) && + * /\W+/.test(value); + * }; + * ``` + * + * @property {Object.} $asyncValidators A collection of validations that are expected to + * perform an asynchronous validation (e.g. a HTTP request). The validation function that is provided + * is expected to return a promise when it is run during the model validation process. Once the promise + * is delivered then the validation status will be set to true when fulfilled and false when rejected. + * When the asynchronous validators are triggered, each of the validators will run in parallel and the model + * value will only be updated once all validators have been fulfilled. As long as an asynchronous validator + * is unfulfilled, its key will be added to the controllers `$pending` property. Also, all asynchronous validators + * will only run once all synchronous validators have passed. + * + * Please note that if $http is used then it is important that the server returns a success HTTP response code + * in order to fulfill the validation and a status level of `4xx` in order to reject the validation. + * + * ```js + * ngModel.$asyncValidators.uniqueUsername = function(modelValue, viewValue) { + * var value = modelValue || viewValue; + * + * // Lookup user by username + * return $http.get('/api/users/' + value). + * then(function resolved() { + * //username exists, this means validation fails + * return $q.reject('exists'); + * }, function rejected() { + * //username does not exist, therefore this validation passes + * return true; + * }); + * }; + * ``` + * + * @property {Array.} $viewChangeListeners Array of functions to execute whenever the + * view value has changed. It is called with no arguments, and its return value is ignored. + * This can be used in place of additional $watches against the model value. + * + * @property {Object} $error An object hash with all failing validator ids as keys. + * @property {Object} $pending An object hash with all pending validator ids as keys. + * + * @property {boolean} $untouched True if control has not lost focus yet. + * @property {boolean} $touched True if control has lost focus. + * @property {boolean} $pristine True if user has not interacted with the control yet. + * @property {boolean} $dirty True if user has already interacted with the control. + * @property {boolean} $valid True if there is no error. + * @property {boolean} $invalid True if at least one error on the control. + * @property {string} $name The name attribute of the control. + * + * @description + * + * `NgModelController` provides API for the {@link ngModel `ngModel`} directive. + * The controller contains services for data-binding, validation, CSS updates, and value formatting + * and parsing. It purposefully does not contain any logic which deals with DOM rendering or + * listening to DOM events. + * Such DOM related logic should be provided by other directives which make use of + * `NgModelController` for data-binding to control elements. + * Angular provides this DOM logic for most {@link input `input`} elements. + * At the end of this page you can find a {@link ngModel.NgModelController#custom-control-example + * custom control example} that uses `ngModelController` to bind to `contenteditable` elements. + * + * @example + * ### Custom Control Example + * This example shows how to use `NgModelController` with a custom control to achieve + * data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`) + * collaborate together to achieve the desired result. + * + * `contenteditable` is an HTML5 attribute, which tells the browser to let the element + * contents be edited in place by the user. + * + * We are using the {@link ng.service:$sce $sce} service here and include the {@link ngSanitize $sanitize} + * module to automatically remove "bad" content like inline event listener (e.g. ``). + * However, as we are using `$sce` the model can still decide to provide unsafe content if it marks + * that content using the `$sce` service. + * + * + + [contenteditable] { + border: 1px solid black; + background-color: white; + min-height: 20px; + } + + .ng-invalid { + border: 1px solid red; + } + + + + angular.module('customControl', ['ngSanitize']). + directive('contenteditable', ['$sce', function($sce) { + return { + restrict: 'A', // only activate on element attribute + require: '?ngModel', // get a hold of NgModelController + link: function(scope, element, attrs, ngModel) { + if (!ngModel) return; // do nothing if no ng-model + + // Specify how UI should be updated + ngModel.$render = function() { + element.html($sce.getTrustedHtml(ngModel.$viewValue || '')); + }; + + // Listen for change events to enable binding + element.on('blur keyup change', function() { + scope.$evalAsync(read); + }); + read(); // initialize + + // Write data to the model + function read() { + var html = element.html(); + // When we clear the content editable the browser leaves a
behind + // If strip-br attribute is provided then we strip this out + if (attrs.stripBr && html === '
') { + html = ''; + } + ngModel.$setViewValue(html); + } + } + }; + }]); +
+ +
+
Change me!
+ Required! +
+ +
+
+ + it('should data-bind and become invalid', function() { + if (browser.params.browser === 'safari' || browser.params.browser === 'firefox') { + // SafariDriver can't handle contenteditable + // and Firefox driver can't clear contenteditables very well + return; + } + var contentEditable = element(by.css('[contenteditable]')); + var content = 'Change me!'; + + expect(contentEditable.getText()).toEqual(content); + + contentEditable.clear(); + contentEditable.sendKeys(protractor.Key.BACK_SPACE); + expect(contentEditable.getText()).toEqual(''); + expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/); + }); + + *
+ * + * + */ +NgModelController.$inject = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse', '$animate', '$timeout', '$q', '$interpolate']; +function NgModelController($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $q, $interpolate) { + this.$viewValue = Number.NaN; + this.$modelValue = Number.NaN; + this.$$rawModelValue = undefined; // stores the parsed modelValue / model set from scope regardless of validity. + this.$validators = {}; + this.$asyncValidators = {}; + this.$parsers = []; + this.$formatters = []; + this.$viewChangeListeners = []; + this.$untouched = true; + this.$touched = false; + this.$pristine = true; + this.$dirty = false; + this.$valid = true; + this.$invalid = false; + this.$error = {}; // keep invalid keys here + this.$$success = {}; // keep valid keys here + this.$pending = undefined; // keep pending keys here + this.$name = $interpolate($attr.name || '', false)($scope); + this.$$parentForm = nullFormCtrl; + this.$options = defaultModelOptions; + + this.$$parsedNgModel = $parse($attr.ngModel); + this.$$parsedNgModelAssign = this.$$parsedNgModel.assign; + this.$$ngModelGet = this.$$parsedNgModel; + this.$$ngModelSet = this.$$parsedNgModelAssign; + this.$$pendingDebounce = null; + this.$$parserValid = undefined; + + this.$$currentValidationRunId = 0; + + // https://github.com/angular/angular.js/issues/15833 + // Prevent `$$scope` from being iterated over by `copy` when NgModelController is deep watched + Object.defineProperty(this, '$$scope', {value: $scope}); + this.$$attr = $attr; + this.$$element = $element; + this.$$animate = $animate; + this.$$timeout = $timeout; + this.$$parse = $parse; + this.$$q = $q; + this.$$exceptionHandler = $exceptionHandler; + + setupValidity(this); + setupModelWatcher(this); +} + +NgModelController.prototype = { + $$initGetterSetters: function() { + if (this.$options.getOption('getterSetter')) { + var invokeModelGetter = this.$$parse(this.$$attr.ngModel + '()'), + invokeModelSetter = this.$$parse(this.$$attr.ngModel + '($$$p)'); + + this.$$ngModelGet = function($scope) { + var modelValue = this.$$parsedNgModel($scope); + if (isFunction(modelValue)) { + modelValue = invokeModelGetter($scope); + } + return modelValue; + }; + this.$$ngModelSet = function($scope, newValue) { + if (isFunction(this.$$parsedNgModel($scope))) { + invokeModelSetter($scope, {$$$p: newValue}); + } else { + this.$$parsedNgModelAssign($scope, newValue); + } + }; + } else if (!this.$$parsedNgModel.assign) { + throw ngModelMinErr('nonassign', 'Expression \'{0}\' is non-assignable. Element: {1}', + this.$$attr.ngModel, startingTag(this.$$element)); + } + }, + + + /** + * @ngdoc method + * @name ngModel.NgModelController#$render + * + * @description + * Called when the view needs to be updated. It is expected that the user of the ng-model + * directive will implement this method. + * + * The `$render()` method is invoked in the following situations: + * + * * `$rollbackViewValue()` is called. If we are rolling back the view value to the last + * committed value then `$render()` is called to update the input control. + * * The value referenced by `ng-model` is changed programmatically and both the `$modelValue` and + * the `$viewValue` are different from last time. + * + * Since `ng-model` does not do a deep watch, `$render()` is only invoked if the values of + * `$modelValue` and `$viewValue` are actually different from their previous values. If `$modelValue` + * or `$viewValue` are objects (rather than a string or number) then `$render()` will not be + * invoked if you only change a property on the objects. + */ + $render: noop, + + /** + * @ngdoc method + * @name ngModel.NgModelController#$isEmpty + * + * @description + * This is called when we need to determine if the value of an input is empty. + * + * For instance, the required directive does this to work out if the input has data or not. + * + * The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`. + * + * You can override this for input directives whose concept of being empty is different from the + * default. The `checkboxInputType` directive does this because in its case a value of `false` + * implies empty. + * + * @param {*} value The value of the input to check for emptiness. + * @returns {boolean} True if `value` is "empty". + */ + $isEmpty: function(value) { + // eslint-disable-next-line no-self-compare + return isUndefined(value) || value === '' || value === null || value !== value; + }, + + $$updateEmptyClasses: function(value) { + if (this.$isEmpty(value)) { + this.$$animate.removeClass(this.$$element, NOT_EMPTY_CLASS); + this.$$animate.addClass(this.$$element, EMPTY_CLASS); + } else { + this.$$animate.removeClass(this.$$element, EMPTY_CLASS); + this.$$animate.addClass(this.$$element, NOT_EMPTY_CLASS); + } + }, + + /** + * @ngdoc method + * @name ngModel.NgModelController#$setPristine + * + * @description + * Sets the control to its pristine state. + * + * This method can be called to remove the `ng-dirty` class and set the control to its pristine + * state (`ng-pristine` class). A model is considered to be pristine when the control + * has not been changed from when first compiled. + */ + $setPristine: function() { + this.$dirty = false; + this.$pristine = true; + this.$$animate.removeClass(this.$$element, DIRTY_CLASS); + this.$$animate.addClass(this.$$element, PRISTINE_CLASS); + }, + + /** + * @ngdoc method + * @name ngModel.NgModelController#$setDirty + * + * @description + * Sets the control to its dirty state. + * + * This method can be called to remove the `ng-pristine` class and set the control to its dirty + * state (`ng-dirty` class). A model is considered to be dirty when the control has been changed + * from when first compiled. + */ + $setDirty: function() { + this.$dirty = true; + this.$pristine = false; + this.$$animate.removeClass(this.$$element, PRISTINE_CLASS); + this.$$animate.addClass(this.$$element, DIRTY_CLASS); + this.$$parentForm.$setDirty(); + }, + + /** + * @ngdoc method + * @name ngModel.NgModelController#$setUntouched + * + * @description + * Sets the control to its untouched state. + * + * This method can be called to remove the `ng-touched` class and set the control to its + * untouched state (`ng-untouched` class). Upon compilation, a model is set as untouched + * by default, however this function can be used to restore that state if the model has + * already been touched by the user. + */ + $setUntouched: function() { + this.$touched = false; + this.$untouched = true; + this.$$animate.setClass(this.$$element, UNTOUCHED_CLASS, TOUCHED_CLASS); + }, + + /** + * @ngdoc method + * @name ngModel.NgModelController#$setTouched + * + * @description + * Sets the control to its touched state. + * + * This method can be called to remove the `ng-untouched` class and set the control to its + * touched state (`ng-touched` class). A model is considered to be touched when the user has + * first focused the control element and then shifted focus away from the control (blur event). + */ + $setTouched: function() { + this.$touched = true; + this.$untouched = false; + this.$$animate.setClass(this.$$element, TOUCHED_CLASS, UNTOUCHED_CLASS); + }, + + /** + * @ngdoc method + * @name ngModel.NgModelController#$rollbackViewValue + * + * @description + * Cancel an update and reset the input element's value to prevent an update to the `$modelValue`, + * which may be caused by a pending debounced event or because the input is waiting for some + * future event. + * + * If you have an input that uses `ng-model-options` to set up debounced updates or updates that + * depend on special events such as `blur`, there can be a period when the `$viewValue` is out of + * sync with the ngModel's `$modelValue`. + * + * In this case, you can use `$rollbackViewValue()` to manually cancel the debounced / future update + * and reset the input to the last committed view value. + * + * It is also possible that you run into difficulties if you try to update the ngModel's `$modelValue` + * programmatically before these debounced/future events have resolved/occurred, because Angular's + * dirty checking mechanism is not able to tell whether the model has actually changed or not. + * + * The `$rollbackViewValue()` method should be called before programmatically changing the model of an + * input which may have such events pending. This is important in order to make sure that the + * input field will be updated with the new model value and any pending operations are cancelled. + * + * + * + * angular.module('cancel-update-example', []) + * + * .controller('CancelUpdateController', ['$scope', function($scope) { + * $scope.model = {value1: '', value2: ''}; + * + * $scope.setEmpty = function(e, value, rollback) { + * if (e.keyCode === 27) { + * e.preventDefault(); + * if (rollback) { + * $scope.myForm[value].$rollbackViewValue(); + * } + * $scope.model[value] = ''; + * } + * }; + * }]); + * + * + *
+ *

Both of these inputs are only updated if they are blurred. Hitting escape should + * empty them. Follow these steps and observe the difference:

+ *
    + *
  1. Type something in the input. You will see that the model is not yet updated
  2. + *
  3. Press the Escape key. + *
      + *
    1. In the first example, nothing happens, because the model is already '', and no + * update is detected. If you blur the input, the model will be set to the current view. + *
    2. + *
    3. In the second example, the pending update is cancelled, and the input is set back + * to the last committed view value (''). Blurring the input does nothing. + *
    4. + *
    + *
  4. + *
+ * + *
+ *
+ *

Without $rollbackViewValue():

+ * + * value1: "{{ model.value1 }}" + *
+ * + *
+ *

With $rollbackViewValue():

+ * + * value2: "{{ model.value2 }}" + *
+ *
+ *
+ *
+ + div { + display: table-cell; + } + div:nth-child(1) { + padding-right: 30px; + } + + + *
+ */ + $rollbackViewValue: function() { + this.$$timeout.cancel(this.$$pendingDebounce); + this.$viewValue = this.$$lastCommittedViewValue; + this.$render(); + }, + + /** + * @ngdoc method + * @name ngModel.NgModelController#$validate + * + * @description + * Runs each of the registered validators (first synchronous validators and then + * asynchronous validators). + * If the validity changes to invalid, the model will be set to `undefined`, + * unless {@link ngModelOptions `ngModelOptions.allowInvalid`} is `true`. + * If the validity changes to valid, it will set the model to the last available valid + * `$modelValue`, i.e. either the last parsed value or the last value set from the scope. + */ + $validate: function() { + // ignore $validate before model is initialized + if (isNumberNaN(this.$modelValue)) { + return; + } + + var viewValue = this.$$lastCommittedViewValue; + // Note: we use the $$rawModelValue as $modelValue might have been + // set to undefined during a view -> model update that found validation + // errors. We can't parse the view here, since that could change + // the model although neither viewValue nor the model on the scope changed + var modelValue = this.$$rawModelValue; + + var prevValid = this.$valid; + var prevModelValue = this.$modelValue; + + var allowInvalid = this.$options.getOption('allowInvalid'); + + var that = this; + this.$$runValidators(modelValue, viewValue, function(allValid) { + // If there was no change in validity, don't update the model + // This prevents changing an invalid modelValue to undefined + if (!allowInvalid && prevValid !== allValid) { + // Note: Don't check this.$valid here, as we could have + // external validators (e.g. calculated on the server), + // that just call $setValidity and need the model value + // to calculate their validity. + that.$modelValue = allValid ? modelValue : undefined; + + if (that.$modelValue !== prevModelValue) { + that.$$writeModelToScope(); + } + } + }); + }, + + $$runValidators: function(modelValue, viewValue, doneCallback) { + this.$$currentValidationRunId++; + var localValidationRunId = this.$$currentValidationRunId; + var that = this; + + // check parser error + if (!processParseErrors()) { + validationDone(false); + return; + } + if (!processSyncValidators()) { + validationDone(false); + return; + } + processAsyncValidators(); + + function processParseErrors() { + var errorKey = that.$$parserName || 'parse'; + if (isUndefined(that.$$parserValid)) { + setValidity(errorKey, null); + } else { + if (!that.$$parserValid) { + forEach(that.$validators, function(v, name) { + setValidity(name, null); + }); + forEach(that.$asyncValidators, function(v, name) { + setValidity(name, null); + }); + } + // Set the parse error last, to prevent unsetting it, should a $validators key == parserName + setValidity(errorKey, that.$$parserValid); + return that.$$parserValid; + } + return true; + } + + function processSyncValidators() { + var syncValidatorsValid = true; + forEach(that.$validators, function(validator, name) { + var result = Boolean(validator(modelValue, viewValue)); + syncValidatorsValid = syncValidatorsValid && result; + setValidity(name, result); + }); + if (!syncValidatorsValid) { + forEach(that.$asyncValidators, function(v, name) { + setValidity(name, null); + }); + return false; + } + return true; + } + + function processAsyncValidators() { + var validatorPromises = []; + var allValid = true; + forEach(that.$asyncValidators, function(validator, name) { + var promise = validator(modelValue, viewValue); + if (!isPromiseLike(promise)) { + throw ngModelMinErr('nopromise', + 'Expected asynchronous validator to return a promise but got \'{0}\' instead.', promise); + } + setValidity(name, undefined); + validatorPromises.push(promise.then(function() { + setValidity(name, true); + }, function() { + allValid = false; + setValidity(name, false); + })); + }); + if (!validatorPromises.length) { + validationDone(true); + } else { + that.$$q.all(validatorPromises).then(function() { + validationDone(allValid); + }, noop); + } + } + + function setValidity(name, isValid) { + if (localValidationRunId === that.$$currentValidationRunId) { + that.$setValidity(name, isValid); + } + } + + function validationDone(allValid) { + if (localValidationRunId === that.$$currentValidationRunId) { + + doneCallback(allValid); + } + } + }, + + /** + * @ngdoc method + * @name ngModel.NgModelController#$commitViewValue + * + * @description + * Commit a pending update to the `$modelValue`. + * + * Updates may be pending by a debounced event or because the input is waiting for a some future + * event defined in `ng-model-options`. this method is rarely needed as `NgModelController` + * usually handles calling this in response to input events. + */ + $commitViewValue: function() { + var viewValue = this.$viewValue; + + this.$$timeout.cancel(this.$$pendingDebounce); + + // If the view value has not changed then we should just exit, except in the case where there is + // a native validator on the element. In this case the validation state may have changed even though + // the viewValue has stayed empty. + if (this.$$lastCommittedViewValue === viewValue && (viewValue !== '' || !this.$$hasNativeValidators)) { + return; + } + this.$$updateEmptyClasses(viewValue); + this.$$lastCommittedViewValue = viewValue; + + // change to dirty + if (this.$pristine) { + this.$setDirty(); + } + this.$$parseAndValidate(); + }, + + $$parseAndValidate: function() { + var viewValue = this.$$lastCommittedViewValue; + var modelValue = viewValue; + var that = this; + + this.$$parserValid = isUndefined(modelValue) ? undefined : true; + + if (this.$$parserValid) { + for (var i = 0; i < this.$parsers.length; i++) { + modelValue = this.$parsers[i](modelValue); + if (isUndefined(modelValue)) { + this.$$parserValid = false; + break; + } + } + } + if (isNumberNaN(this.$modelValue)) { + // this.$modelValue has not been touched yet... + this.$modelValue = this.$$ngModelGet(this.$$scope); + } + var prevModelValue = this.$modelValue; + var allowInvalid = this.$options.getOption('allowInvalid'); + this.$$rawModelValue = modelValue; + + if (allowInvalid) { + this.$modelValue = modelValue; + writeToModelIfNeeded(); + } + + // Pass the $$lastCommittedViewValue here, because the cached viewValue might be out of date. + // This can happen if e.g. $setViewValue is called from inside a parser + this.$$runValidators(modelValue, this.$$lastCommittedViewValue, function(allValid) { + if (!allowInvalid) { + // Note: Don't check this.$valid here, as we could have + // external validators (e.g. calculated on the server), + // that just call $setValidity and need the model value + // to calculate their validity. + that.$modelValue = allValid ? modelValue : undefined; + writeToModelIfNeeded(); + } + }); + + function writeToModelIfNeeded() { + if (that.$modelValue !== prevModelValue) { + that.$$writeModelToScope(); + } + } + }, + + $$writeModelToScope: function() { + this.$$ngModelSet(this.$$scope, this.$modelValue); + forEach(this.$viewChangeListeners, function(listener) { + try { + listener(); + } catch (e) { + // eslint-disable-next-line no-invalid-this + this.$$exceptionHandler(e); + } + }, this); + }, + + /** + * @ngdoc method + * @name ngModel.NgModelController#$setViewValue + * + * @description + * Update the view value. + * + * This method should be called when a control wants to change the view value; typically, + * this is done from within a DOM event handler. For example, the {@link ng.directive:input input} + * directive calls it when the value of the input changes and {@link ng.directive:select select} + * calls it when an option is selected. + * + * When `$setViewValue` is called, the new `value` will be staged for committing through the `$parsers` + * and `$validators` pipelines. If there are no special {@link ngModelOptions} specified then the staged + * value is sent directly for processing through the `$parsers` pipeline. After this, the `$validators` and + * `$asyncValidators` are called and the value is applied to `$modelValue`. + * Finally, the value is set to the **expression** specified in the `ng-model` attribute and + * all the registered change listeners, in the `$viewChangeListeners` list are called. + * + * In case the {@link ng.directive:ngModelOptions ngModelOptions} directive is used with `updateOn` + * and the `default` trigger is not listed, all those actions will remain pending until one of the + * `updateOn` events is triggered on the DOM element. + * All these actions will be debounced if the {@link ng.directive:ngModelOptions ngModelOptions} + * directive is used with a custom debounce for this particular event. + * Note that a `$digest` is only triggered once the `updateOn` events are fired, or if `debounce` + * is specified, once the timer runs out. + * + * When used with standard inputs, the view value will always be a string (which is in some cases + * parsed into another type, such as a `Date` object for `input[date]`.) + * However, custom controls might also pass objects to this method. In this case, we should make + * a copy of the object before passing it to `$setViewValue`. This is because `ngModel` does not + * perform a deep watch of objects, it only looks for a change of identity. If you only change + * the property of the object then ngModel will not realize that the object has changed and + * will not invoke the `$parsers` and `$validators` pipelines. For this reason, you should + * not change properties of the copy once it has been passed to `$setViewValue`. + * Otherwise you may cause the model value on the scope to change incorrectly. + * + *
+ * In any case, the value passed to the method should always reflect the current value + * of the control. For example, if you are calling `$setViewValue` for an input element, + * you should pass the input DOM value. Otherwise, the control and the scope model become + * out of sync. It's also important to note that `$setViewValue` does not call `$render` or change + * the control's DOM value in any way. If we want to change the control's DOM value + * programmatically, we should update the `ngModel` scope expression. Its new value will be + * picked up by the model controller, which will run it through the `$formatters`, `$render` it + * to update the DOM, and finally call `$validate` on it. + *
+ * + * @param {*} value value from the view. + * @param {string} trigger Event that triggered the update. + */ + $setViewValue: function(value, trigger) { + this.$viewValue = value; + if (this.$options.getOption('updateOnDefault')) { + this.$$debounceViewValueCommit(trigger); + } + }, + + $$debounceViewValueCommit: function(trigger) { + var debounceDelay = this.$options.getOption('debounce'); + + if (isNumber(debounceDelay[trigger])) { + debounceDelay = debounceDelay[trigger]; + } else if (isNumber(debounceDelay['default'])) { + debounceDelay = debounceDelay['default']; + } + + this.$$timeout.cancel(this.$$pendingDebounce); + var that = this; + if (debounceDelay > 0) { // this fails if debounceDelay is an object + this.$$pendingDebounce = this.$$timeout(function() { + that.$commitViewValue(); + }, debounceDelay); + } else if (this.$$scope.$root.$$phase) { + this.$commitViewValue(); + } else { + this.$$scope.$apply(function() { + that.$commitViewValue(); + }); + } + }, + + /** + * @ngdoc method + * + * @name ngModel.NgModelController#$overrideModelOptions + * + * @description + * + * Override the current model options settings programmatically. + * + * The previous `ModelOptions` value will not be modified. Instead, a + * new `ModelOptions` object will inherit from the previous one overriding + * or inheriting settings that are defined in the given parameter. + * + * See {@link ngModelOptions} for information about what options can be specified + * and how model option inheritance works. + * + * @param {Object} options a hash of settings to override the previous options + * + */ + $overrideModelOptions: function(options) { + this.$options = this.$options.createChild(options); + } +}; + +function setupModelWatcher(ctrl) { + // model -> value + // Note: we cannot use a normal scope.$watch as we want to detect the following: + // 1. scope value is 'a' + // 2. user enters 'b' + // 3. ng-change kicks in and reverts scope value to 'a' + // -> scope value did not change since the last digest as + // ng-change executes in apply phase + // 4. view should be changed back to 'a' + ctrl.$$scope.$watch(function ngModelWatch(scope) { + var modelValue = ctrl.$$ngModelGet(scope); + + // if scope model value and ngModel value are out of sync + // TODO(perf): why not move this to the action fn? + if (modelValue !== ctrl.$modelValue && + // checks for NaN is needed to allow setting the model to NaN when there's an asyncValidator + // eslint-disable-next-line no-self-compare + (ctrl.$modelValue === ctrl.$modelValue || modelValue === modelValue) + ) { + ctrl.$modelValue = ctrl.$$rawModelValue = modelValue; + ctrl.$$parserValid = undefined; + + var formatters = ctrl.$formatters, + idx = formatters.length; + + var viewValue = modelValue; + while (idx--) { + viewValue = formatters[idx](viewValue); + } + if (ctrl.$viewValue !== viewValue) { + ctrl.$$updateEmptyClasses(viewValue); + ctrl.$viewValue = ctrl.$$lastCommittedViewValue = viewValue; + ctrl.$render(); + + // It is possible that model and view value have been updated during render + ctrl.$$runValidators(ctrl.$modelValue, ctrl.$viewValue, noop); + } + } + + return modelValue; + }); +} + +/** + * @ngdoc method + * @name ngModel.NgModelController#$setValidity + * + * @description + * Change the validity state, and notify the form. + * + * This method can be called within $parsers/$formatters or a custom validation implementation. + * However, in most cases it should be sufficient to use the `ngModel.$validators` and + * `ngModel.$asyncValidators` collections which will call `$setValidity` automatically. + * + * @param {string} validationErrorKey Name of the validator. The `validationErrorKey` will be assigned + * to either `$error[validationErrorKey]` or `$pending[validationErrorKey]` + * (for unfulfilled `$asyncValidators`), so that it is available for data-binding. + * The `validationErrorKey` should be in camelCase and will get converted into dash-case + * for class name. Example: `myError` will result in `ng-valid-my-error` and `ng-invalid-my-error` + * classes and can be bound to as `{{ someForm.someControl.$error.myError }}`. + * @param {boolean} isValid Whether the current state is valid (true), invalid (false), pending (undefined), + * or skipped (null). Pending is used for unfulfilled `$asyncValidators`. + * Skipped is used by Angular when validators do not run because of parse errors and + * when `$asyncValidators` do not run because any of the `$validators` failed. + */ +addSetValidityMethod({ + clazz: NgModelController, + set: function(object, property) { + object[property] = true; + }, + unset: function(object, property) { + delete object[property]; + } +}); + + +/** + * @ngdoc directive + * @name ngModel + * + * @element input + * @priority 1 + * + * @description + * The `ngModel` directive binds an `input`,`select`, `textarea` (or custom form control) to a + * property on the scope using {@link ngModel.NgModelController NgModelController}, + * which is created and exposed by this directive. + * + * `ngModel` is responsible for: + * + * - Binding the view into the model, which other directives such as `input`, `textarea` or `select` + * require. + * - Providing validation behavior (i.e. required, number, email, url). + * - Keeping the state of the control (valid/invalid, dirty/pristine, touched/untouched, validation errors). + * - Setting related css classes on the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`, `ng-touched`, + * `ng-untouched`, `ng-empty`, `ng-not-empty`) including animations. + * - Registering the control with its parent {@link ng.directive:form form}. + * + * Note: `ngModel` will try to bind to the property given by evaluating the expression on the + * current scope. If the property doesn't already exist on this scope, it will be created + * implicitly and added to the scope. + * + * For best practices on using `ngModel`, see: + * + * - [Understanding Scopes](https://github.com/angular/angular.js/wiki/Understanding-Scopes) + * + * For basic examples, how to use `ngModel`, see: + * + * - {@link ng.directive:input input} + * - {@link input[text] text} + * - {@link input[checkbox] checkbox} + * - {@link input[radio] radio} + * - {@link input[number] number} + * - {@link input[email] email} + * - {@link input[url] url} + * - {@link input[date] date} + * - {@link input[datetime-local] datetime-local} + * - {@link input[time] time} + * - {@link input[month] month} + * - {@link input[week] week} + * - {@link ng.directive:select select} + * - {@link ng.directive:textarea textarea} + * + * # Complex Models (objects or collections) + * + * By default, `ngModel` watches the model by reference, not value. This is important to know when + * binding inputs to models that are objects (e.g. `Date`) or collections (e.g. arrays). If only properties of the + * object or collection change, `ngModel` will not be notified and so the input will not be re-rendered. + * + * The model must be assigned an entirely new object or collection before a re-rendering will occur. + * + * Some directives have options that will cause them to use a custom `$watchCollection` on the model expression + * - for example, `ngOptions` will do so when a `track by` clause is included in the comprehension expression or + * if the select is given the `multiple` attribute. + * + * The `$watchCollection()` method only does a shallow comparison, meaning that changing properties deeper than the + * first level of the object (or only changing the properties of an item in the collection if it's an array) will still + * not trigger a re-rendering of the model. + * + * # CSS classes + * The following CSS classes are added and removed on the associated input/select/textarea element + * depending on the validity of the model. + * + * - `ng-valid`: the model is valid + * - `ng-invalid`: the model is invalid + * - `ng-valid-[key]`: for each valid key added by `$setValidity` + * - `ng-invalid-[key]`: for each invalid key added by `$setValidity` + * - `ng-pristine`: the control hasn't been interacted with yet + * - `ng-dirty`: the control has been interacted with + * - `ng-touched`: the control has been blurred + * - `ng-untouched`: the control hasn't been blurred + * - `ng-pending`: any `$asyncValidators` are unfulfilled + * - `ng-empty`: the view does not contain a value or the value is deemed "empty", as defined + * by the {@link ngModel.NgModelController#$isEmpty} method + * - `ng-not-empty`: the view contains a non-empty value + * + * Keep in mind that ngAnimate can detect each of these classes when added and removed. + * + * ## Animation Hooks + * + * Animations within models are triggered when any of the associated CSS classes are added and removed + * on the input element which is attached to the model. These classes include: `.ng-pristine`, `.ng-dirty`, + * `.ng-invalid` and `.ng-valid` as well as any other validations that are performed on the model itself. + * The animations that are triggered within ngModel are similar to how they work in ngClass and + * animations can be hooked into using CSS transitions, keyframes as well as JS animations. + * + * The following example shows a simple way to utilize CSS transitions to style an input element + * that has been rendered as invalid after it has been validated: + * + *
+ * //be sure to include ngAnimate as a module to hook into more
+ * //advanced animations
+ * .my-input {
+ *   transition:0.5s linear all;
+ *   background: white;
+ * }
+ * .my-input.ng-invalid {
+ *   background: red;
+ *   color:white;
+ * }
+ * 
+ * + * @example + * + + + +

+ Update input to see transitions when valid/invalid. + Integer is a valid value. +

+
+ +
+
+ *
+ * + * ## Binding to a getter/setter + * + * Sometimes it's helpful to bind `ngModel` to a getter/setter function. A getter/setter is a + * function that returns a representation of the model when called with zero arguments, and sets + * the internal state of a model when called with an argument. It's sometimes useful to use this + * for models that have an internal representation that's different from what the model exposes + * to the view. + * + *
+ * **Best Practice:** It's best to keep getters fast because Angular is likely to call them more + * frequently than other parts of your code. + *
+ * + * You use this behavior by adding `ng-model-options="{ getterSetter: true }"` to an element that + * has `ng-model` attached to it. You can also add `ng-model-options="{ getterSetter: true }"` to + * a `
`, which will enable this behavior for all ``s within it. See + * {@link ng.directive:ngModelOptions `ngModelOptions`} for more. + * + * The following example shows how to use `ngModel` with a getter/setter: + * + * @example + * + +
+ + + +
user.name = 
+
+
+ + angular.module('getterSetterExample', []) + .controller('ExampleController', ['$scope', function($scope) { + var _name = 'Brian'; + $scope.user = { + name: function(newName) { + // Note that newName can be undefined for two reasons: + // 1. Because it is called as a getter and thus called with no arguments + // 2. Because the property should actually be set to undefined. This happens e.g. if the + // input is invalid + return arguments.length ? (_name = newName) : _name; + } + }; + }]); + + *
+ */ +var ngModelDirective = ['$rootScope', function($rootScope) { + return { + restrict: 'A', + require: ['ngModel', '^?form', '^?ngModelOptions'], + controller: NgModelController, + // Prelink needs to run before any input directive + // so that we can set the NgModelOptions in NgModelController + // before anyone else uses it. + priority: 1, + compile: function ngModelCompile(element) { + // Setup initial state of the control + element.addClass(PRISTINE_CLASS).addClass(UNTOUCHED_CLASS).addClass(VALID_CLASS); + + return { + pre: function ngModelPreLink(scope, element, attr, ctrls) { + var modelCtrl = ctrls[0], + formCtrl = ctrls[1] || modelCtrl.$$parentForm, + optionsCtrl = ctrls[2]; + + if (optionsCtrl) { + modelCtrl.$options = optionsCtrl.$options; + } + + modelCtrl.$$initGetterSetters(); + + // notify others, especially parent forms + formCtrl.$addControl(modelCtrl); + + attr.$observe('name', function(newValue) { + if (modelCtrl.$name !== newValue) { + modelCtrl.$$parentForm.$$renameControl(modelCtrl, newValue); + } + }); + + scope.$on('$destroy', function() { + modelCtrl.$$parentForm.$removeControl(modelCtrl); + }); + }, + post: function ngModelPostLink(scope, element, attr, ctrls) { + var modelCtrl = ctrls[0]; + if (modelCtrl.$options.getOption('updateOn')) { + element.on(modelCtrl.$options.getOption('updateOn'), function(ev) { + modelCtrl.$$debounceViewValueCommit(ev && ev.type); + }); + } + + function setTouched() { + modelCtrl.$setTouched(); + } + + element.on('blur', function() { + if (modelCtrl.$touched) return; + + if ($rootScope.$$phase) { + scope.$evalAsync(setTouched); + } else { + scope.$apply(setTouched); + } + }); + } + }; + } + }; +}]; + +/* exported defaultModelOptions */ +var defaultModelOptions; +var DEFAULT_REGEXP = /(\s+|^)default(\s+|$)/; + +/** + * @ngdoc type + * @name ModelOptions + * @description + * A container for the options set by the {@link ngModelOptions} directive + */ +function ModelOptions(options) { + this.$$options = options; +} + +ModelOptions.prototype = { + + /** + * @ngdoc method + * @name ModelOptions#getOption + * @param {string} name the name of the option to retrieve + * @returns {*} the value of the option + * @description + * Returns the value of the given option + */ + getOption: function(name) { + return this.$$options[name]; + }, + + /** + * @ngdoc method + * @name ModelOptions#createChild + * @param {Object} options a hash of options for the new child that will override the parent's options + * @return {ModelOptions} a new `ModelOptions` object initialized with the given options. + */ + createChild: function(options) { + var inheritAll = false; + + // make a shallow copy + options = extend({}, options); + + // Inherit options from the parent if specified by the value `"$inherit"` + forEach(options, /* @this */ function(option, key) { + if (option === '$inherit') { + if (key === '*') { + inheritAll = true; + } else { + options[key] = this.$$options[key]; + // `updateOn` is special so we must also inherit the `updateOnDefault` option + if (key === 'updateOn') { + options.updateOnDefault = this.$$options.updateOnDefault; + } + } + } else { + if (key === 'updateOn') { + // If the `updateOn` property contains the `default` event then we have to remove + // it from the event list and set the `updateOnDefault` flag. + options.updateOnDefault = false; + options[key] = trim(option.replace(DEFAULT_REGEXP, function() { + options.updateOnDefault = true; + return ' '; + })); + } + } + }, this); + + if (inheritAll) { + // We have a property of the form: `"*": "$inherit"` + delete options['*']; + defaults(options, this.$$options); + } + + // Finally add in any missing defaults + defaults(options, defaultModelOptions.$$options); + + return new ModelOptions(options); + } +}; + + +defaultModelOptions = new ModelOptions({ + updateOn: '', + updateOnDefault: true, + debounce: 0, + getterSetter: false, + allowInvalid: false, + timezone: null +}); + + +/** + * @ngdoc directive + * @name ngModelOptions + * + * @description + * This directive allows you to modify the behaviour of {@link ngModel} directives within your + * application. You can specify an `ngModelOptions` directive on any element. All {@link ngModel} + * directives will use the options of their nearest `ngModelOptions` ancestor. + * + * The `ngModelOptions` settings are found by evaluating the value of the attribute directive as + * an Angular expression. This expression should evaluate to an object, whose properties contain + * the settings. For example: `
+ *
+ * + *
+ *
+ * ``` + * + * the `input` element will have the following settings + * + * ```js + * { allowInvalid: true, updateOn: 'default', debounce: 0 } + * ``` + * + * Notice that the `debounce` setting was not inherited and used the default value instead. + * + * You can specify that all undefined settings are automatically inherited from an ancestor by + * including a property with key of `"*"` and value of `"$inherit"`. + * + * For example given the following fragment of HTML + * + * + * ```html + *
+ *
+ * + *
+ *
+ * ``` + * + * the `input` element will have the following settings + * + * ```js + * { allowInvalid: true, updateOn: 'default', debounce: 200 } + * ``` + * + * Notice that the `debounce` setting now inherits the value from the outer `
` element. + * + * If you are creating a reusable component then you should be careful when using `"*": "$inherit"` + * since you may inadvertently inherit a setting in the future that changes the behavior of your component. + * + * + * ## Triggering and debouncing model updates + * + * The `updateOn` and `debounce` properties allow you to specify a custom list of events that will + * trigger a model update and/or a debouncing delay so that the actual update only takes place when + * a timer expires; this timer will be reset after another change takes place. + * + * Given the nature of `ngModelOptions`, the value displayed inside input fields in the view might + * be different from the value in the actual model. This means that if you update the model you + * should also invoke {@link ngModel.NgModelController#$rollbackViewValue} on the relevant input field in + * order to make sure it is synchronized with the model and that any debounced action is canceled. + * + * The easiest way to reference the control's {@link ngModel.NgModelController#$rollbackViewValue} + * method is by making sure the input is placed inside a form that has a `name` attribute. This is + * important because `form` controllers are published to the related scope under the name in their + * `name` attribute. + * + * Any pending changes will take place immediately when an enclosing form is submitted via the + * `submit` event. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit` + * to have access to the updated model. + * + * The following example shows how to override immediate updates. Changes on the inputs within the + * form will update the model only when the control loses focus (blur event). If `escape` key is + * pressed while the input field is focused, the value is reset to the value in the current model. + * + * + * + *
+ *
+ *
+ *
+ *
+ *
user.name = 
+ *
+ *
+ * + * angular.module('optionsExample', []) + * .controller('ExampleController', ['$scope', function($scope) { + * $scope.user = { name: 'say', data: '' }; + * + * $scope.cancel = function(e) { + * if (e.keyCode === 27) { + * $scope.userForm.userName.$rollbackViewValue(); + * } + * }; + * }]); + * + * + * var model = element(by.binding('user.name')); + * var input = element(by.model('user.name')); + * var other = element(by.model('user.data')); + * + * it('should allow custom events', function() { + * input.sendKeys(' hello'); + * input.click(); + * expect(model.getText()).toEqual('say'); + * other.click(); + * expect(model.getText()).toEqual('say hello'); + * }); + * + * it('should $rollbackViewValue when model changes', function() { + * input.sendKeys(' hello'); + * expect(input.getAttribute('value')).toEqual('say hello'); + * input.sendKeys(protractor.Key.ESCAPE); + * expect(input.getAttribute('value')).toEqual('say'); + * other.click(); + * expect(model.getText()).toEqual('say'); + * }); + * + *
+ * + * The next example shows how to debounce model changes. Model will be updated only 1 sec after last change. + * If the `Clear` button is pressed, any debounced action is canceled and the value becomes empty. + * + * + * + *
+ *
+ * Name: + * + *
+ *
+ *
user.name = 
+ *
+ *
+ * + * angular.module('optionsExample', []) + * .controller('ExampleController', ['$scope', function($scope) { + * $scope.user = { name: 'say' }; + * }]); + * + *
+ * + * ## Model updates and validation + * + * The default behaviour in `ngModel` is that the model value is set to `undefined` when the + * validation determines that the value is invalid. By setting the `allowInvalid` property to true, + * the model will still be updated even if the value is invalid. + * + * + * ## Connecting to the scope + * + * By setting the `getterSetter` property to true you are telling ngModel that the `ngModel` expression + * on the scope refers to a "getter/setter" function rather than the value itself. + * + * The following example shows how to bind to getter/setters: + * + * + * + *
+ *
+ * + *
+ *
user.name = 
+ *
+ *
+ * + * angular.module('getterSetterExample', []) + * .controller('ExampleController', ['$scope', function($scope) { + * var _name = 'Brian'; + * $scope.user = { + * name: function(newName) { + * return angular.isDefined(newName) ? (_name = newName) : _name; + * } + * }; + * }]); + * + *
+ * + * + * ## Specifying timezones + * + * You can specify the timezone that date/time input directives expect by providing its name in the + * `timezone` property. + * + * @param {Object} ngModelOptions options to apply to {@link ngModel} directives on this element and + * and its descendents. Valid keys are: + * - `updateOn`: string specifying which event should the input be bound to. You can set several + * events using an space delimited list. There is a special event called `default` that + * matches the default events belonging to the control. + * - `debounce`: integer value which contains the debounce model update value in milliseconds. A + * value of 0 triggers an immediate update. If an object is supplied instead, you can specify a + * custom value for each event. For example: + * ``` + * ng-model-options="{ + * updateOn: 'default blur', + * debounce: { 'default': 500, 'blur': 0 } + * }" + * ``` + * - `allowInvalid`: boolean value which indicates that the model can be set with values that did + * not validate correctly instead of the default behavior of setting the model to undefined. + * - `getterSetter`: boolean value which determines whether or not to treat functions bound to + * `ngModel` as getters/setters. + * - `timezone`: Defines the timezone to be used to read/write the `Date` instance in the model for + * ``, ``, ... . It understands UTC/GMT and the + * continental US time zone abbreviations, but for general use, use a time zone offset, for + * example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian) + * If not specified, the timezone of the browser will be used. + * + */ +var ngModelOptionsDirective = function() { + NgModelOptionsController.$inject = ['$attrs', '$scope']; + function NgModelOptionsController($attrs, $scope) { + this.$$attrs = $attrs; + this.$$scope = $scope; + } + NgModelOptionsController.prototype = { + $onInit: function() { + var parentOptions = this.parentCtrl ? this.parentCtrl.$options : defaultModelOptions; + var modelOptionsDefinition = this.$$scope.$eval(this.$$attrs.ngModelOptions); + + this.$options = parentOptions.createChild(modelOptionsDefinition); + } + }; + + return { + restrict: 'A', + // ngModelOptions needs to run before ngModel and input directives + priority: 10, + require: {parentCtrl: '?^^ngModelOptions'}, + bindToController: true, + controller: NgModelOptionsController + }; +}; + + +// shallow copy over values from `src` that are not already specified on `dst` +function defaults(dst, src) { + forEach(src, function(value, key) { + if (!isDefined(dst[key])) { + dst[key] = value; + } + }); +} + +/** + * @ngdoc directive + * @name ngNonBindable + * @restrict AC + * @priority 1000 + * + * @description + * The `ngNonBindable` directive tells Angular not to compile or bind the contents of the current + * DOM element. This is useful if the element contains what appears to be Angular directives and + * bindings but which should be ignored by Angular. This could be the case if you have a site that + * displays snippets of code, for instance. + * + * @element ANY + * + * @example + * In this example there are two locations where a simple interpolation binding (`{{}}`) is present, + * but the one wrapped in `ngNonBindable` is left alone. + * + * @example + + +
Normal: {{1 + 2}}
+
Ignored: {{1 + 2}}
+
+ + it('should check ng-non-bindable', function() { + expect(element(by.binding('1 + 2')).getText()).toContain('3'); + expect(element.all(by.css('div')).last().getText()).toMatch(/1 \+ 2/); + }); + +
+ */ +var ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 }); + +/* exported ngOptionsDirective */ + +/* global jqLiteRemove */ + +var ngOptionsMinErr = minErr('ngOptions'); + +/** + * @ngdoc directive + * @name ngOptions + * @restrict A + * + * @description + * + * The `ngOptions` attribute can be used to dynamically generate a list of `` + * DOM element. + * * `disable`: The result of this expression will be used to disable the rendered ` + * + *
+ * + *
+ *
+ *
+ * singleSelect = {{data.singleSelect}} + * + *
+ *
+ *
+ * multipleSelect = {{data.multipleSelect}}
+ * + *
+ * + * + * angular.module('staticSelect', []) + * .controller('ExampleController', ['$scope', function($scope) { + * $scope.data = { + * singleSelect: null, + * multipleSelect: [], + * option1: 'option-1' + * }; + * + * $scope.forceUnknownOption = function() { + * $scope.data.singleSelect = 'nonsense'; + * }; + * }]); + * + * + * + * ### Using `ngRepeat` to generate `select` options + * + * + *
+ *
+ * + * + *
+ *
+ * model = {{data.model}}
+ *
+ *
+ * + * angular.module('ngrepeatSelect', []) + * .controller('ExampleController', ['$scope', function($scope) { + * $scope.data = { + * model: null, + * availableOptions: [ + * {id: '1', name: 'Option A'}, + * {id: '2', name: 'Option B'}, + * {id: '3', name: 'Option C'} + * ] + * }; + * }]); + * + *
+ * + * ### Using `ngValue` to bind the model to an array of objects + * + * + *
+ *
+ * + * + *
+ *
+ *
model = {{data.model | json}}

+ *
+ *
+ * + * angular.module('ngvalueSelect', []) + * .controller('ExampleController', ['$scope', function($scope) { + * $scope.data = { + * model: null, + * availableOptions: [ + {value: 'myString', name: 'string'}, + {value: 1, name: 'integer'}, + {value: true, name: 'boolean'}, + {value: null, name: 'null'}, + {value: {prop: 'value'}, name: 'object'}, + {value: ['a'], name: 'array'} + * ] + * }; + * }]); + * + *
+ * + * ### Using `select` with `ngOptions` and setting a default value + * See the {@link ngOptions ngOptions documentation} for more `ngOptions` usage examples. + * + * + * + *
+ *
+ * + * + *
+ *
+ * option = {{data.selectedOption}}
+ *
+ *
+ * + * angular.module('defaultValueSelect', []) + * .controller('ExampleController', ['$scope', function($scope) { + * $scope.data = { + * availableOptions: [ + * {id: '1', name: 'Option A'}, + * {id: '2', name: 'Option B'}, + * {id: '3', name: 'Option C'} + * ], + * selectedOption: {id: '3', name: 'Option C'} //This sets the default value of the select in the ui + * }; + * }]); + * + *
+ * + * + * ### Binding `select` to a non-string value via `ngModel` parsing / formatting + * + * + * + * + * {{ model }} + * + * + * angular.module('nonStringSelect', []) + * .run(function($rootScope) { + * $rootScope.model = { id: 2 }; + * }) + * .directive('convertToNumber', function() { + * return { + * require: 'ngModel', + * link: function(scope, element, attrs, ngModel) { + * ngModel.$parsers.push(function(val) { + * return parseInt(val, 10); + * }); + * ngModel.$formatters.push(function(val) { + * return '' + val; + * }); + * } + * }; + * }); + * + * + * it('should initialize to model', function() { + * expect(element(by.model('model.id')).$('option:checked').getText()).toEqual('Two'); + * }); + * + * + * + */ +var selectDirective = function() { + + return { + restrict: 'E', + require: ['select', '?ngModel'], + controller: SelectController, + priority: 1, + link: { + pre: selectPreLink, + post: selectPostLink + } + }; + + function selectPreLink(scope, element, attr, ctrls) { + + var selectCtrl = ctrls[0]; + var ngModelCtrl = ctrls[1]; + + // if ngModel is not defined, we don't need to do anything but set the registerOption + // function to noop, so options don't get added internally + if (!ngModelCtrl) { + selectCtrl.registerOption = noop; + return; + } + + + selectCtrl.ngModelCtrl = ngModelCtrl; + + // When the selected item(s) changes we delegate getting the value of the select control + // to the `readValue` method, which can be changed if the select can have multiple + // selected values or if the options are being generated by `ngOptions` + element.on('change', function() { + selectCtrl.removeUnknownOption(); + scope.$apply(function() { + ngModelCtrl.$setViewValue(selectCtrl.readValue()); + }); + }); + + // If the select allows multiple values then we need to modify how we read and write + // values from and to the control; also what it means for the value to be empty and + // we have to add an extra watch since ngModel doesn't work well with arrays - it + // doesn't trigger rendering if only an item in the array changes. + if (attr.multiple) { + selectCtrl.multiple = true; + + // Read value now needs to check each option to see if it is selected + selectCtrl.readValue = function readMultipleValue() { + var array = []; + forEach(element.find('option'), function(option) { + if (option.selected && !option.disabled) { + var val = option.value; + array.push(val in selectCtrl.selectValueMap ? selectCtrl.selectValueMap[val] : val); + } + }); + return array; + }; + + // Write value now needs to set the selected property of each matching option + selectCtrl.writeValue = function writeMultipleValue(value) { + forEach(element.find('option'), function(option) { + var shouldBeSelected = !!value && (includes(value, option.value) || + includes(value, selectCtrl.selectValueMap[option.value])); + var currentlySelected = option.selected; + + // Support: IE 9-11 only, Edge 12-15+ + // In IE and Edge adding options to the selection via shift+click/UP/DOWN + // will de-select already selected options if "selected" on those options was set + // more than once (i.e. when the options were already selected) + // So we only modify the selected property if necessary. + // Note: this behavior cannot be replicated via unit tests because it only shows in the + // actual user interface. + if (shouldBeSelected !== currentlySelected) { + setOptionSelectedStatus(jqLite(option), shouldBeSelected); + } + + }); + }; + + // we have to do it on each watch since ngModel watches reference, but + // we need to work of an array, so we need to see if anything was inserted/removed + var lastView, lastViewRef = NaN; + scope.$watch(function selectMultipleWatch() { + if (lastViewRef === ngModelCtrl.$viewValue && !equals(lastView, ngModelCtrl.$viewValue)) { + lastView = shallowCopy(ngModelCtrl.$viewValue); + ngModelCtrl.$render(); + } + lastViewRef = ngModelCtrl.$viewValue; + }); + + // If we are a multiple select then value is now a collection + // so the meaning of $isEmpty changes + ngModelCtrl.$isEmpty = function(value) { + return !value || value.length === 0; + }; + + } + } + + function selectPostLink(scope, element, attrs, ctrls) { + // if ngModel is not defined, we don't need to do anything + var ngModelCtrl = ctrls[1]; + if (!ngModelCtrl) return; + + var selectCtrl = ctrls[0]; + + // We delegate rendering to the `writeValue` method, which can be changed + // if the select can have multiple selected values or if the options are being + // generated by `ngOptions`. + // This must be done in the postLink fn to prevent $render to be called before + // all nodes have been linked correctly. + ngModelCtrl.$render = function() { + selectCtrl.writeValue(ngModelCtrl.$viewValue); + }; + } +}; + + +// The option directive is purely designed to communicate the existence (or lack of) +// of dynamically created (and destroyed) option elements to their containing select +// directive via its controller. +var optionDirective = ['$interpolate', function($interpolate) { + return { + restrict: 'E', + priority: 100, + compile: function(element, attr) { + var interpolateValueFn, interpolateTextFn; + + if (isDefined(attr.ngValue)) { + // Will be handled by registerOption + } else if (isDefined(attr.value)) { + // If the value attribute is defined, check if it contains an interpolation + interpolateValueFn = $interpolate(attr.value, true); + } else { + // If the value attribute is not defined then we fall back to the + // text content of the option element, which may be interpolated + interpolateTextFn = $interpolate(element.text(), true); + if (!interpolateTextFn) { + attr.$set('value', element.text()); + } + } + + return function(scope, element, attr) { + // This is an optimization over using ^^ since we don't want to have to search + // all the way to the root of the DOM for every single option element + var selectCtrlName = '$selectController', + parent = element.parent(), + selectCtrl = parent.data(selectCtrlName) || + parent.parent().data(selectCtrlName); // in case we are in optgroup + + if (selectCtrl) { + selectCtrl.registerOption(scope, element, attr, interpolateValueFn, interpolateTextFn); + } + }; + } + }; +}]; + +/** + * @ngdoc directive + * @name ngRequired + * @restrict A + * + * @description + * + * ngRequired adds the required {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}. + * It is most often used for {@link input `input`} and {@link select `select`} controls, but can also be + * applied to custom controls. + * + * The directive sets the `required` attribute on the element if the Angular expression inside + * `ngRequired` evaluates to true. A special directive for setting `required` is necessary because we + * cannot use interpolation inside `required`. See the {@link guide/interpolation interpolation guide} + * for more info. + * + * The validator will set the `required` error key to true if the `required` attribute is set and + * calling {@link ngModel.NgModelController#$isEmpty `NgModelController.$isEmpty`} with the + * {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`} returns `true`. For example, the + * `$isEmpty()` implementation for `input[text]` checks the length of the `$viewValue`. When developing + * custom controls, `$isEmpty()` can be overwritten to account for a $viewValue that is not string-based. + * + * @example + * + * + * + *
+ *
+ * + * + *
+ * + *
+ *
+ * required error set? = {{form.input.$error.required}}
+ * model = {{model}} + *
+ *
+ *
+ * + var required = element(by.binding('form.input.$error.required')); + var model = element(by.binding('model')); + var input = element(by.id('input')); + + it('should set the required error', function() { + expect(required.getText()).toContain('true'); + + input.sendKeys('123'); + expect(required.getText()).not.toContain('true'); + expect(model.getText()).toContain('123'); + }); + * + *
+ */ +var requiredDirective = function() { + return { + restrict: 'A', + require: '?ngModel', + link: function(scope, elm, attr, ctrl) { + if (!ctrl) return; + attr.required = true; // force truthy in case we are on non input element + + ctrl.$validators.required = function(modelValue, viewValue) { + return !attr.required || !ctrl.$isEmpty(viewValue); + }; + + attr.$observe('required', function() { + ctrl.$validate(); + }); + } + }; +}; + +/** + * @ngdoc directive + * @name ngPattern + * + * @description + * + * ngPattern adds the pattern {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}. + * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls. + * + * The validator sets the `pattern` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`} + * does not match a RegExp which is obtained by evaluating the Angular expression given in the + * `ngPattern` attribute value: + * * If the expression evaluates to a RegExp object, then this is used directly. + * * If the expression evaluates to a string, then it will be converted to a RegExp after wrapping it + * in `^` and `$` characters. For instance, `"abc"` will be converted to `new RegExp('^abc$')`. + * + *
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to + * start at the index of the last search's match, thus not taking the whole input value into + * account. + *
+ * + *
+ * **Note:** This directive is also added when the plain `pattern` attribute is used, with two + * differences: + *
    + *
  1. + * `ngPattern` does not set the `pattern` attribute and therefore HTML5 constraint validation is + * not available. + *
  2. + *
  3. + * The `ngPattern` attribute must be an expression, while the `pattern` value must be + * interpolated. + *
  4. + *
+ *
+ * + * @example + * + * + * + *
+ *
+ * + * + *
+ * + *
+ *
+ * input valid? = {{form.input.$valid}}
+ * model = {{model}} + *
+ *
+ *
+ * + var model = element(by.binding('model')); + var input = element(by.id('input')); + + it('should validate the input with the default pattern', function() { + input.sendKeys('aaa'); + expect(model.getText()).not.toContain('aaa'); + + input.clear().then(function() { + input.sendKeys('123'); + expect(model.getText()).toContain('123'); + }); + }); + * + *
+ */ +var patternDirective = function() { + return { + restrict: 'A', + require: '?ngModel', + link: function(scope, elm, attr, ctrl) { + if (!ctrl) return; + + var regexp, patternExp = attr.ngPattern || attr.pattern; + attr.$observe('pattern', function(regex) { + if (isString(regex) && regex.length > 0) { + regex = new RegExp('^' + regex + '$'); + } + + if (regex && !regex.test) { + throw minErr('ngPattern')('noregexp', + 'Expected {0} to be a RegExp but was {1}. Element: {2}', patternExp, + regex, startingTag(elm)); + } + + regexp = regex || undefined; + ctrl.$validate(); + }); + + ctrl.$validators.pattern = function(modelValue, viewValue) { + // HTML5 pattern constraint validates the input value, so we validate the viewValue + return ctrl.$isEmpty(viewValue) || isUndefined(regexp) || regexp.test(viewValue); + }; + } + }; +}; + +/** + * @ngdoc directive + * @name ngMaxlength + * + * @description + * + * ngMaxlength adds the maxlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}. + * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls. + * + * The validator sets the `maxlength` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`} + * is longer than the integer obtained by evaluating the Angular expression given in the + * `ngMaxlength` attribute value. + * + *
+ * **Note:** This directive is also added when the plain `maxlength` attribute is used, with two + * differences: + *
    + *
  1. + * `ngMaxlength` does not set the `maxlength` attribute and therefore HTML5 constraint + * validation is not available. + *
  2. + *
  3. + * The `ngMaxlength` attribute must be an expression, while the `maxlength` value must be + * interpolated. + *
  4. + *
+ *
+ * + * @example + * + * + * + *
+ *
+ * + * + *
+ * + *
+ *
+ * input valid? = {{form.input.$valid}}
+ * model = {{model}} + *
+ *
+ *
+ * + var model = element(by.binding('model')); + var input = element(by.id('input')); + + it('should validate the input with the default maxlength', function() { + input.sendKeys('abcdef'); + expect(model.getText()).not.toContain('abcdef'); + + input.clear().then(function() { + input.sendKeys('abcde'); + expect(model.getText()).toContain('abcde'); + }); + }); + * + *
+ */ +var maxlengthDirective = function() { + return { + restrict: 'A', + require: '?ngModel', + link: function(scope, elm, attr, ctrl) { + if (!ctrl) return; + + var maxlength = -1; + attr.$observe('maxlength', function(value) { + var intVal = toInt(value); + maxlength = isNumberNaN(intVal) ? -1 : intVal; + ctrl.$validate(); + }); + ctrl.$validators.maxlength = function(modelValue, viewValue) { + return (maxlength < 0) || ctrl.$isEmpty(viewValue) || (viewValue.length <= maxlength); + }; + } + }; +}; + +/** + * @ngdoc directive + * @name ngMinlength + * + * @description + * + * ngMinlength adds the minlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}. + * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls. + * + * The validator sets the `minlength` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`} + * is shorter than the integer obtained by evaluating the Angular expression given in the + * `ngMinlength` attribute value. + * + *
+ * **Note:** This directive is also added when the plain `minlength` attribute is used, with two + * differences: + *
    + *
  1. + * `ngMinlength` does not set the `minlength` attribute and therefore HTML5 constraint + * validation is not available. + *
  2. + *
  3. + * The `ngMinlength` value must be an expression, while the `minlength` value must be + * interpolated. + *
  4. + *
+ *
+ * + * @example + * + * + * + *
+ *
+ * + * + *
+ * + *
+ *
+ * input valid? = {{form.input.$valid}}
+ * model = {{model}} + *
+ *
+ *
+ * + var model = element(by.binding('model')); + var input = element(by.id('input')); + + it('should validate the input with the default minlength', function() { + input.sendKeys('ab'); + expect(model.getText()).not.toContain('ab'); + + input.sendKeys('abc'); + expect(model.getText()).toContain('abc'); + }); + * + *
+ */ +var minlengthDirective = function() { + return { + restrict: 'A', + require: '?ngModel', + link: function(scope, elm, attr, ctrl) { + if (!ctrl) return; + + var minlength = 0; + attr.$observe('minlength', function(value) { + minlength = toInt(value) || 0; + ctrl.$validate(); + }); + ctrl.$validators.minlength = function(modelValue, viewValue) { + return ctrl.$isEmpty(viewValue) || viewValue.length >= minlength; + }; + } + }; +}; + +if (window.angular.bootstrap) { + // AngularJS is already loaded, so we can return here... + if (window.console) { + console.log('WARNING: Tried to load angular more than once.'); + } + return; +} + +// try to bind to jquery now so that one can write jqLite(fn) +// but we will rebind on bootstrap again. +bindJQuery(); + +publishExternalAPI(angular); + +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-us", + "localeID": "en_US", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); + +/** + * Setup file for the Scenario. + * Must be first in the compilation/bootstrap list. + */ + +// Public namespace +angular.scenario = angular.scenario || {}; + +/** + * Expose jQuery (e.g. for custom dsl extensions). + */ +angular.scenario.jQuery = _jQuery; + +/** + * Defines a new output format. + * + * @param {string} name the name of the new output format + * @param {function()} fn function(context, runner) that generates the output + */ +angular.scenario.output = angular.scenario.output || function(name, fn) { + angular.scenario.output[name] = fn; +}; + +/** + * Defines a new DSL statement. If your factory function returns a Future + * it's returned, otherwise the result is assumed to be a map of functions + * for chaining. Chained functions are subject to the same rules. + * + * Note: All functions on the chain are bound to the chain scope so values + * set on "this" in your statement function are available in the chained + * functions. + * + * @param {string} name The name of the statement + * @param {function()} fn Factory function(), return a function for + * the statement. + */ +angular.scenario.dsl = angular.scenario.dsl || function(name, fn) { + angular.scenario.dsl[name] = function() { + // The dsl binds `this` for us when calling chained functions + /** @this */ + function executeStatement(statement, args) { + var result = statement.apply(this, args); + if (angular.isFunction(result) || result instanceof angular.scenario.Future) { + return result; + } + var self = this; + var chain = angular.extend({}, result); + angular.forEach(chain, function(value, name) { + if (angular.isFunction(value)) { + chain[name] = function() { + return executeStatement.call(self, value, arguments); + }; + } else { + chain[name] = value; + } + }); + return chain; + } + var statement = fn.apply(this, arguments); + return /** @this */ function() { + return executeStatement.call(this, statement, arguments); + }; + }; +}; + +/** + * Defines a new matcher for use with the expects() statement. The value + * this.actual (like in Jasmine) is available in your matcher to compare + * against. Your function should return a boolean. The future is automatically + * created for you. + * + * @param {string} name The name of the matcher + * @param {function()} fn The matching function(expected). + */ +angular.scenario.matcher = angular.scenario.matcher || function(name, fn) { + angular.scenario.matcher[name] = function(expected) { + var description = this.future.name + + (this.inverse ? ' not ' : ' ') + name + + ' ' + angular.toJson(expected); + var self = this; + this.addFuture('expect ' + description, + function(done) { + var error; + self.actual = self.future.value; + if ((self.inverse && fn.call(self, expected)) || + (!self.inverse && !fn.call(self, expected))) { + error = 'expected ' + description + + ' but was ' + angular.toJson(self.actual); + } + done(error); + }); + }; +}; + +/** + * Initialize the scenario runner and run ! + * + * Access global window and document object + * Access $runner through closure + * + * @param {Object=} config Config options + */ +angular.scenario.setUpAndRun = function(config) { + var href = window.location.href; + var body = _jQuery(window.document.body); + var output = []; + var objModel = new angular.scenario.ObjectModel($runner); + + if (config && config.scenario_output) { + output = config.scenario_output.split(','); + } + + angular.forEach(angular.scenario.output, function(fn, name) { + if (!output.length || output.indexOf(name) !== -1) { + var context = body.append('
').find('div:last'); + context.attr('id', name); + fn.call({}, context, $runner, objModel); + } + }); + + if (!/^http/.test(href) && !/^https/.test(href)) { + body.append('

'); + body.find('#system-error').text( + 'Scenario runner must be run using http or https. The protocol ' + + href.split(':')[0] + ':// is not supported.' + ); + return; + } + + var appFrame = body.append('
').find('#application'); + var application = new angular.scenario.Application(appFrame); + + $runner.on('RunnerEnd', function() { + appFrame.css('display', 'none'); + appFrame.find('iframe').attr('src', 'about:blank'); + }); + + $runner.on('RunnerError', function(error) { + if (window.console) { + console.log(formatException(error)); + } else { + // Do something for IE + // eslint-disable-next-line no-alert + alert(error); + } + }); + + $runner.run(application); +}; + +/** + * Iterates through list with iterator function that must call the + * continueFunction to continue iterating. + * + * @param {Array} list list to iterate over + * @param {function()} iterator Callback function(value, continueFunction) + * @param {function()} done Callback function(error, result) called when + * iteration finishes or an error occurs. + */ +function asyncForEach(list, iterator, done) { + var i = 0; + function loop(error, index) { + if (index && index > i) { + i = index; + } + if (error || i >= list.length) { + done(error); + } else { + try { + iterator(list[i++], loop); + } catch (e) { + done(e); + } + } + } + loop(); +} + +/** + * Formats an exception into a string with the stack trace, but limits + * to a specific line length. + * + * @param {Object} error The exception to format, can be anything throwable + * @param {Number=} [maxStackLines=5] max lines of the stack trace to include + * default is 5. + */ +function formatException(error, maxStackLines) { + maxStackLines = maxStackLines || 5; + var message = error.toString(); + if (error.stack) { + var stack = error.stack.split('\n'); + if (stack[0].indexOf(message) === -1) { + maxStackLines++; + stack.unshift(error.message); + } + message = stack.slice(0, maxStackLines).join('\n'); + } + return message; +} + +/** + * Returns a function that gets the file name and line number from a + * location in the stack if available based on the call site. + * + * Note: this returns another function because accessing .stack is very + * expensive in Chrome. + * + * @param {Number} offset Number of stack lines to skip + */ +function callerFile(offset) { + var error = new Error(); + + return function() { + var line = (error.stack || '').split('\n')[offset]; + + // Clean up the stack trace line + if (line) { + if (line.indexOf('@') !== -1) { + // Firefox + line = line.substring(line.indexOf('@') + 1); + } else { + // Chrome + line = line.substring(line.indexOf('(') + 1).replace(')', ''); + } + } + + return line || ''; + }; +} + + +/** + * Don't use the jQuery trigger method since it works incorrectly. + * + * jQuery notifies listeners and then changes the state of a checkbox and + * does not create a real browser event. A real click changes the state of + * the checkbox and then notifies listeners. + * + * To work around this we instead use our own handler that fires a real event. + */ +(function(fn) { + // We need a handle to the original trigger function for input tests. + var parentTrigger = fn._originalTrigger = fn.trigger; + fn.trigger = function(type) { + if (/(click|change|keydown|blur|input|mousedown|mouseup)/.test(type)) { + var processDefaults = []; + this.each(function(index, node) { + processDefaults.push(browserTrigger(node, type)); + }); + + // this is not compatible with jQuery - we return an array of returned values, + // so that scenario runner know whether JS code has preventDefault() of the event or not... + return processDefaults; + } + return parentTrigger.apply(this, arguments); + }; +})(_jQuery.fn); + +/** + * Finds all bindings with the substring match of name and returns an + * array of their values. + * + * @param {string} bindExp The name to match + * @return {Array.} String of binding values + */ +_jQuery.fn.bindings = function(windowJquery, bindExp) { + var result = [], match, + bindSelector = '.ng-binding:visible'; + if (angular.isString(bindExp)) { + bindExp = bindExp.replace(/\s/g, ''); + match = function(actualExp) { + if (actualExp) { + actualExp = actualExp.replace(/\s/g, ''); + if (actualExp === bindExp) return true; + if (actualExp.indexOf(bindExp) === 0) { + return actualExp.charAt(bindExp.length) === '|'; + } + } + }; + } else if (bindExp) { + match = function(actualExp) { + return actualExp && bindExp.exec(actualExp); + }; + } else { + match = function(actualExp) { + return !!actualExp; + }; + } + var selection = this.find(bindSelector); + if (this.is(bindSelector)) { + selection = selection.add(this); + } + + function push(value) { + if (angular.isUndefined(value)) { + value = ''; + } else if (typeof value !== 'string') { + value = angular.toJson(value); + } + result.push('' + value); + } + + selection.each(/* @this Node */ function() { + var element = windowJquery(this), + bindings; + if ((bindings = element.data('$binding'))) { + for (var expressions = [], binding, j = 0, jj = bindings.length; j < jj; j++) { + binding = bindings[j]; + + if (binding.expressions) { + expressions = binding.expressions; + } else { + expressions = [binding]; + } + for (var scope, expression, i = 0, ii = expressions.length; i < ii; i++) { + expression = expressions[i]; + if (match(expression)) { + scope = scope || element.scope(); + push(scope.$eval(expression)); + } + } + } + } + }); + return result; +}; + +/** + * Represents the application currently being tested and abstracts usage + * of iframes or separate windows. + * + * @param {Object} context jQuery wrapper around HTML context. + */ +angular.scenario.Application = function(context) { + this.context = context; + context.append( + '

Current URL: None

' + + '
' + ); +}; + +/** + * Gets the jQuery collection of frames. Don't use this directly because + * frames may go stale. + * + * @private + * @return {Object} jQuery collection + */ +angular.scenario.Application.prototype.getFrame_ = function() { + return this.context.find('#test-frames iframe:last'); +}; + +/** + * Gets the window of the test runner frame. Always favor executeAction() + * instead of this method since it prevents you from getting a stale window. + * + * @private + * @return {Object} the window of the frame + */ +angular.scenario.Application.prototype.getWindow_ = function() { + var contentWindow = this.getFrame_().prop('contentWindow'); + if (!contentWindow) { + throw new Error('Frame window is not accessible.'); + } + return contentWindow; +}; + +/** + * Changes the location of the frame. + * + * @param {string} url The URL. If it begins with a # then only the + * hash of the page is changed. + * @param {function()} loadFn function($window, $document) Called when frame loads. + * @param {function()} errorFn function(error) Called if any error when loading. + */ +angular.scenario.Application.prototype.navigateTo = function(url, loadFn, errorFn) { + var self = this; + var frame = self.getFrame_(); + //TODO(esprehn): Refactor to use rethrow() + errorFn = errorFn || function(e) { throw e; }; + if (url === 'about:blank') { + errorFn('Sandbox Error: Navigating to about:blank is not allowed.'); + } else if (url.charAt(0) === '#') { + url = frame.attr('src').split('#')[0] + url; + frame.attr('src', url); + self.executeAction(loadFn); + } else { + frame.remove(); + self.context.find('#test-frames').append(' +
+ + + +

+ + + + diff --git a/1.6.6/docs/partials/api/ng/directive/input.html b/1.6.6/docs/partials/api/ng/directive/input.html new file mode 100644 index 000000000..3d1f101b0 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/input.html @@ -0,0 +1,273 @@ + Improve this Doc + + + + +  View Source + + + +
+

input

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

HTML input element control. When used together with ngModel, it provides data-binding, +input state control, and validation. +Input control follows HTML5 input types and polyfills the HTML5 validation behavior for older browsers.

+
+Note: Not every feature offered is available for all input types. +Specifically, data binding and event handling via ng-model is unsupported for input[file]. +
+
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <input
      ng-model="string"
      [name="string"]
      [required="string"]
      [ng-required="boolean"]
      [ng-minlength="number"]
      [ng-maxlength="number"]
      [ng-pattern="string"]
      [ng-change="string"]
      [ng-trim="boolean"]>
    ...
    </input>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngModel + + + + string + +

Assignable angular expression to data-bind to.

+ + +
+ name + +
(optional)
+
+ string + +

Property name of the form under which the control is published.

+ + +
+ required + +
(optional)
+
+ string + +

Sets required validation error key if the value is not entered.

+ + +
+ ngRequired + +
(optional)
+
+ boolean + +

Sets required attribute if set to true

+ + +
+ ngMinlength + +
(optional)
+
+ number + +

Sets minlength validation error key if the value is shorter than + minlength.

+ + +
+ ngMaxlength + +
(optional)
+
+ number + +

Sets maxlength validation error key if the value is longer than + maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any + length.

+ + +
+ ngPattern + +
(optional)
+
+ string + +

Sets pattern validation error key if the ngModel $viewValue + value does not match a RegExp found by evaluating the Angular expression given in the attribute value. + If the expression evaluates to a RegExp object, then this is used directly. + If the expression evaluates to a string, then it will be converted to a RegExp + after wrapping it in ^ and $ characters. For instance, "abc" will be converted to + new RegExp('^abc$').
+ Note: Avoid using the g flag on the RegExp, as it will cause each successive search to + start at the index of the last search's match, thus not taking the whole input value into + account.

+ + +
+ ngChange + +
(optional)
+
+ string + +

Angular expression to be executed when input changes due to user + interaction with the input element.

+ + +
+ ngTrim + +
(optional)
+
+ boolean + +

If set to false Angular will not automatically trim the input. + This parameter is ignored for input[type=password] controls, which will never trim the + input.

+ +

(default: true)

+
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
   angular.module('inputExample', [])
     .controller('ExampleController', ['$scope', function($scope) {
       $scope.user = {name: 'guest', last: 'visitor'};
     }]);
</script>
<div ng-controller="ExampleController">
  <form name="myForm">
    <label>
       User name:
       <input type="text" name="userName" ng-model="user.name" required>
    </label>
    <div role="alert">
      <span class="error" ng-show="myForm.userName.$error.required">
       Required!</span>
    </div>
    <label>
       Last name:
       <input type="text" name="lastName" ng-model="user.last"
       ng-minlength="3" ng-maxlength="10">
    </label>
    <div role="alert">
      <span class="error" ng-show="myForm.lastName.$error.minlength">
        Too short!</span>
      <span class="error" ng-show="myForm.lastName.$error.maxlength">
        Too long!</span>
    </div>
  </form>
  <hr>
  <tt>user = {{user}}</tt><br/>
  <tt>myForm.userName.$valid = {{myForm.userName.$valid}}</tt><br/>
  <tt>myForm.userName.$error = {{myForm.userName.$error}}</tt><br/>
  <tt>myForm.lastName.$valid = {{myForm.lastName.$valid}}</tt><br/>
  <tt>myForm.lastName.$error = {{myForm.lastName.$error}}</tt><br/>
  <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
  <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
  <tt>myForm.$error.minlength = {{!!myForm.$error.minlength}}</tt><br/>
  <tt>myForm.$error.maxlength = {{!!myForm.$error.maxlength}}</tt><br/>
</div>
+
+ +
+
var user = element(by.exactBinding('user'));
var userNameValid = element(by.binding('myForm.userName.$valid'));
var lastNameValid = element(by.binding('myForm.lastName.$valid'));
var lastNameError = element(by.binding('myForm.lastName.$error'));
var formValid = element(by.binding('myForm.$valid'));
var userNameInput = element(by.model('user.name'));
var userLastInput = element(by.model('user.last'));

it('should initialize to model', function() {
  expect(user.getText()).toContain('{"name":"guest","last":"visitor"}');
  expect(userNameValid.getText()).toContain('true');
  expect(formValid.getText()).toContain('true');
});

it('should be invalid if empty when required', function() {
  userNameInput.clear();
  userNameInput.sendKeys('');

  expect(user.getText()).toContain('{"last":"visitor"}');
  expect(userNameValid.getText()).toContain('false');
  expect(formValid.getText()).toContain('false');
});

it('should be valid if empty when min length is set', function() {
  userLastInput.clear();
  userLastInput.sendKeys('');

  expect(user.getText()).toContain('{"name":"guest","last":""}');
  expect(lastNameValid.getText()).toContain('true');
  expect(formValid.getText()).toContain('true');
});

it('should be invalid if less than required min length', function() {
  userLastInput.clear();
  userLastInput.sendKeys('xx');

  expect(user.getText()).toContain('{"name":"guest"}');
  expect(lastNameValid.getText()).toContain('false');
  expect(lastNameError.getText()).toContain('minlength');
  expect(formValid.getText()).toContain('false');
});

it('should be invalid if longer than max length', function() {
  userLastInput.clear();
  userLastInput.sendKeys('some ridiculously long name');

  expect(user.getText()).toContain('{"name":"guest"}');
  expect(lastNameValid.getText()).toContain('false');
  expect(lastNameError.getText()).toContain('maxlength');
  expect(formValid.getText()).toContain('false');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngApp.html b/1.6.6/docs/partials/api/ng/directive/ngApp.html new file mode 100644 index 000000000..f709d39cf --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngApp.html @@ -0,0 +1,212 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngApp

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Use this directive to auto-bootstrap an AngularJS application. The ngApp directive +designates the root element of the application and is typically placed near the root element +of the page - e.g. on the <body> or <html> tags.

+

There are a few things to keep in mind when using ngApp:

+
    +
  • only one AngularJS application can be auto-bootstrapped per HTML document. The first ngApp +found in the document will be used to define the root element to auto-bootstrap as an +application. To run multiple applications in an HTML document you must manually bootstrap them using +angular.bootstrap instead.
  • +
  • AngularJS applications cannot be nested within each other.
  • +
  • Do not use a directive that uses transclusion on the same element as ngApp. +This includes directives such as ngIf, ngInclude and +ngView. +Doing this misplaces the app $rootElement and the app's injector, +causing animations to stop working and making the injector inaccessible from outside the app.
  • +
+

You can specify an AngularJS module to be used as the root module for the application. This +module will be loaded into the $injector when the application is bootstrapped. It +should contain the application code needed or have dependencies on other modules that will +contain the code. See angular.module for more information.

+

In the example below if the ngApp directive were not placed on the html element then the +document would not be compiled, the AppController would not be instantiated and the {{ a+b }} +would not be resolved to 3.

+

ngApp is the easiest, and most common way to bootstrap an application.

+

+ +

+ + +
+ + +
+
<div ng-controller="ngAppDemoController">
  I can add: {{a}} + {{b}} =  {{ a+b }}
</div>
+
+ +
+
angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) {
  $scope.a = 1;
  $scope.b = 2;
});
+
+ + + +
+
+ + +

+

Using ngStrictDi, you would see something like this:

+

+ +

+ + +
+ + +
+
<div ng-app="ngAppStrictDemo" ng-strict-di>
    <div ng-controller="GoodController1">
        I can add: {{a}} + {{b}} =  {{ a+b }}

        <p>This renders because the controller does not fail to
           instantiate, by using explicit annotation style (see
           script.js for details)
        </p>
    </div>

    <div ng-controller="GoodController2">
        Name: <input ng-model="name"><br />
        Hello, {{name}}!

        <p>This renders because the controller does not fail to
           instantiate, by using explicit annotation style
           (see script.js for details)
        </p>
    </div>

    <div ng-controller="BadController">
        I can add: {{a}} + {{b}} =  {{ a+b }}

        <p>The controller could not be instantiated, due to relying
           on automatic function annotations (which are disabled in
           strict mode). As such, the content of this section is not
           interpolated, and there should be an error in your web console.
        </p>
    </div>
</div>
+
+ +
+
angular.module('ngAppStrictDemo', [])
// BadController will fail to instantiate, due to relying on automatic function annotation,
// rather than an explicit annotation
.controller('BadController', function($scope) {
  $scope.a = 1;
  $scope.b = 2;
})
// Unlike BadController, GoodController1 and GoodController2 will not fail to be instantiated,
// due to using explicit annotations using the array style and $inject property, respectively.
.controller('GoodController1', ['$scope', function($scope) {
  $scope.a = 1;
  $scope.b = 2;
}])
.controller('GoodController2', GoodController2);
function GoodController2($scope) {
  $scope.name = 'World';
}
GoodController2.$inject = ['$scope'];
+
+ +
+
div[ng-controller] {
    margin-bottom: 1em;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    border: 1px solid;
    padding: .5em;
}
div[ng-controller^=Good] {
    border-color: #d6e9c6;
    background-color: #dff0d8;
    color: #3c763d;
}
div[ng-controller^=Bad] {
    border-color: #ebccd1;
    background-color: #f2dede;
    color: #a94442;
    margin-bottom: 0;
}
+
+ + + +
+
+ + +

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-app
      ng-app="angular.Module"
      [ng-strict-di="boolean"]>
    ...
    </ng-app>
    +
  • +
  • as attribute: +
    <ANY
      ng-app="angular.Module"
      [ng-strict-di="boolean"]>
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngApp + + + + angular.Module + +

an optional application + module name to load.

+ + +
+ ngStrictDi + +
(optional)
+
+ boolean + +

if this attribute is present on the app element, the injector will be + created in "strict-di" mode. This means that the application will fail to invoke functions which + do not use explicit function annotation (and are thus unsuitable for minification), as described + in the Dependency Injection guide, and useful debugging info will assist in + tracking down the root of these bugs.

+ + +
+ +
+ + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngBind.html b/1.6.6/docs/partials/api/ng/directive/ngBind.html new file mode 100644 index 000000000..1cc2ca443 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngBind.html @@ -0,0 +1,138 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngBind

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

The ngBind attribute tells Angular to replace the text content of the specified HTML element +with the value of a given expression, and to update the text content when the value of that +expression changes.

+

Typically, you don't use ngBind directly, but instead you use the double curly markup like +{{ expression }} which is similar but less verbose.

+

It is preferable to use ngBind instead of {{ expression }} if a template is momentarily +displayed by the browser in its raw state before Angular compiles it. Since ngBind is an +element attribute, it makes the bindings invisible to the user while the page is loading.

+

An alternative solution to this problem would be using the +ngCloak directive.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <ANY
      ng-bind="expression">
    ...
    </ANY>
    +
  • +
  • as CSS class: +
    <ANY class="ng-bind: expression;"> ... </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngBind + + + + expression + +

Expression to evaluate.

+ + +
+ +
+ + + +

Examples

Enter a name in the Live Preview text box; the greeting below the text box changes instantly. + + +

+ + +
+ + +
+
<script>
  angular.module('bindExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.name = 'Whirled';
    }]);
</script>
<div ng-controller="ExampleController">
  <label>Enter name: <input type="text" ng-model="name"></label><br>
  Hello <span ng-bind="name"></span>!
</div>
+
+ +
+
it('should check ng-bind', function() {
  var nameInput = element(by.model('name'));

  expect(element(by.binding('name')).getText()).toBe('Whirled');
  nameInput.clear();
  nameInput.sendKeys('world');
  expect(element(by.binding('name')).getText()).toBe('world');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngBindHtml.html b/1.6.6/docs/partials/api/ng/directive/ngBindHtml.html new file mode 100644 index 000000000..267dcaec4 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngBindHtml.html @@ -0,0 +1,145 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngBindHtml

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Evaluates the expression and inserts the resulting HTML into the element in a secure way. By default, +the resulting HTML content will be sanitized using the $sanitize service. +To utilize this functionality, ensure that $sanitize is available, for example, by including ngSanitize in your module's dependencies (not in core Angular). In order to use ngSanitize +in your module's dependencies, you need to include "angular-sanitize.js" in your application.

+

You may also bypass sanitization for values you know are safe. To do so, bind to +an explicitly trusted value via $sce.trustAsHtml. See the example +under Strict Contextual Escaping (SCE).

+

Note: If a $sanitize service is unavailable and the bound value isn't explicitly trusted, you +will have an exception (instead of an exploit.)

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-bind-html
      ng-bind-html="expression">
    ...
    </ng-bind-html>
    +
  • +
  • as attribute: +
    <ANY
      ng-bind-html="expression">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngBindHtml + + + + expression + +

Expression to evaluate.

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
 <p ng-bind-html="myHTML"></p>
</div>
+
+ +
+
angular.module('bindHtmlExample', ['ngSanitize'])
.controller('ExampleController', ['$scope', function($scope) {
  $scope.myHTML =
     'I am an <code>HTML</code>string with ' +
     '<a href="#">links!</a> and other <em>stuff</em>';
}]);
+
+ +
+
it('should check ng-bind-html', function() {
  expect(element(by.binding('myHTML')).getText()).toBe(
      'I am an HTMLstring with links! and other stuff');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngBindTemplate.html b/1.6.6/docs/partials/api/ng/directive/ngBindTemplate.html new file mode 100644 index 000000000..1aecb0015 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngBindTemplate.html @@ -0,0 +1,136 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngBindTemplate

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

The ngBindTemplate directive specifies that the element +text content should be replaced with the interpolation of the template +in the ngBindTemplate attribute. +Unlike ngBind, the ngBindTemplate can contain multiple {{ }} +expressions. This directive is needed since some HTML elements +(such as TITLE and OPTION) cannot contain SPAN elements.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-bind-template
      ng-bind-template="string">
    ...
    </ng-bind-template>
    +
  • +
  • as attribute: +
    <ANY
      ng-bind-template="string">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngBindTemplate + + + + string + +

template of form + {{ expression }} to eval.

+ + +
+ +
+ + + +

Examples

Try it here: enter text in text box and watch the greeting change. + + +

+ + +
+ + +
+
<script>
  angular.module('bindExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.salutation = 'Hello';
      $scope.name = 'World';
    }]);
</script>
<div ng-controller="ExampleController">
 <label>Salutation: <input type="text" ng-model="salutation"></label><br>
 <label>Name: <input type="text" ng-model="name"></label><br>
 <pre ng-bind-template="{{salutation}} {{name}}!"></pre>
</div>
+
+ +
+
it('should check ng-bind', function() {
  var salutationElem = element(by.binding('salutation'));
  var salutationInput = element(by.model('salutation'));
  var nameInput = element(by.model('name'));

  expect(salutationElem.getText()).toBe('Hello World!');

  salutationInput.clear();
  salutationInput.sendKeys('Greetings');
  nameInput.clear();
  nameInput.sendKeys('user');

  expect(salutationElem.getText()).toBe('Greetings user!');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngBlur.html b/1.6.6/docs/partials/api/ng/directive/ngBlur.html new file mode 100644 index 000000000..3bbb9b7a7 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngBlur.html @@ -0,0 +1,105 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngBlur

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Specify custom behavior on blur event.

+

A blur event fires when +an element has lost focus.

+

Note: As the blur event is executed synchronously also during DOM manipulations +(e.g. removing a focussed input), +AngularJS executes the expression using scope.$evalAsync if the event is fired +during an $apply to ensure a consistent state.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-blur
      ng-blur="expression">
    ...
    </ng-blur>
    +
  • +
  • as attribute: +
    <window, input, select, textarea, a
      ng-blur="expression">
    ...
    </window, input, select, textarea, a>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngBlur + + + + expression + +

Expression to evaluate upon +blur. (Event object is available as $event)

+ + +
+ +
+ + + +

Examples

See ngClick

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngChange.html b/1.6.6/docs/partials/api/ng/directive/ngChange.html new file mode 100644 index 000000000..d9fe0892b --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngChange.html @@ -0,0 +1,142 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngChange

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Evaluate the given expression when the user changes the input. +The expression is evaluated immediately, unlike the JavaScript onchange event +which only triggers at the end of a change (usually, when the user leaves the +form element or presses the return key).

+

The ngChange expression is only evaluated when a change in the input value causes +a new value to be committed to the model.

+

It will not be evaluated:

+
    +
  • if the value returned from the $parsers transformation pipeline has not changed
  • +
  • if the input has continued to be invalid since the model will stay null
  • +
  • if the model is changed programmatically and not by a change to the input value
  • +
+

Note, this directive requires ngModel to be present.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-change
      ng-change="expression">
    ...
    </ng-change>
    +
  • +
  • as attribute: +
    <input
      ng-change="expression">
    ...
    </input>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngChange + + + + expression + +

Expression to evaluate upon change +in input value.

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('changeExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.counter = 0;
      $scope.change = function() {
        $scope.counter++;
      };
    }]);
</script>
<div ng-controller="ExampleController">
  <input type="checkbox" ng-model="confirmed" ng-change="change()" id="ng-change-example1" />
  <input type="checkbox" ng-model="confirmed" id="ng-change-example2" />
  <label for="ng-change-example2">Confirmed</label><br />
  <tt>debug = {{confirmed}}</tt><br/>
  <tt>counter = {{counter}}</tt><br/>
</div>
+
+ +
+
var counter = element(by.binding('counter'));
var debug = element(by.binding('confirmed'));

it('should evaluate the expression if changing from view', function() {
  expect(counter.getText()).toContain('0');

  element(by.id('ng-change-example1')).click();

  expect(counter.getText()).toContain('1');
  expect(debug.getText()).toContain('true');
});

it('should not evaluate the expression if changing from model', function() {
  element(by.id('ng-change-example2')).click();

  expect(counter.getText()).toContain('0');
  expect(debug.getText()).toContain('true');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngChecked.html b/1.6.6/docs/partials/api/ng/directive/ngChecked.html new file mode 100644 index 000000000..6229746dc --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngChecked.html @@ -0,0 +1,129 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngChecked

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Sets the checked attribute on the element, if the expression inside ngChecked is truthy.

+

Note that this directive should not be used together with ngModel, +as this can lead to unexpected behavior.

+

A special directive is necessary because we cannot use interpolation inside the checked +attribute. See the interpolation guide for more info.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 100.
  • + +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <INPUT
      ng-checked="expression">
    ...
    </INPUT>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngChecked + + + + expression + +

If the expression is truthy, + then the checked attribute will be set on the element

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<label>Check me to check both: <input type="checkbox" ng-model="master"></label><br/>
<input id="checkSlave" type="checkbox" ng-checked="master" aria-label="Slave input">
+
+ +
+
it('should check both checkBoxes', function() {
  expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy();
  element(by.model('master')).click();
  expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy();
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngClass.html b/1.6.6/docs/partials/api/ng/directive/ngClass.html new file mode 100644 index 000000000..d31b3d8c9 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngClass.html @@ -0,0 +1,235 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngClass

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

The ngClass directive allows you to dynamically set CSS classes on an HTML element by databinding +an expression that represents all classes to be added.

+

The directive operates in three different ways, depending on which of three types the expression +evaluates to:

+
    +
  1. If the expression evaluates to a string, the string should be one or more space-delimited class +names.

    +
  2. +
  3. If the expression evaluates to an object, then for each key-value pair of the +object with a truthy value the corresponding key is used as a class name.

    +
  4. +
  5. If the expression evaluates to an array, each element of the array should either be a string as in +type 1 or an object as in type 2. This means that you can mix strings and objects together in an array +to give you more control over what CSS classes appear. See the code below for an example of this.

    +
  6. +
+

The directive won't add duplicate classes if a particular class was already set.

+

When the expression changes, the previously added classes are removed and only then are the +new classes added.

+ +
+ + + +

Known Issues

+
+

You should not use interpolation in the value of the class +attribute, when using the ngClass directive on the same element. +See here for more info.

+ +
+ + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <ANY
      ng-class="expression">
    ...
    </ANY>
    +
  • +
  • as CSS class: +
    <ANY class="ng-class: expression;"> ... </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngClass + + + + expression + +

Expression to eval. The result + of the evaluation can be a string representing space delimited class + names, an array, or a map of class names to boolean values. In the case of a map, the + names of the properties whose values are truthy will be added as css classes to the + element.

+ + +
+ +
+ +

Animations

+ + + + + + + + + + + + + + + + + +
AnimationOccurs
addClassjust before the class is applied to the element
removeClassjust before the class is removed from the element
+ + Click here to learn more about the steps involved in the animation. + + +

Examples

Example that demonstrates basic bindings via ngClass directive. + + +

+ + +
+ + +
+
<p ng-class="{strike: deleted, bold: important, 'has-error': error}">Map Syntax Example</p>
<label>
   <input type="checkbox" ng-model="deleted">
   deleted (apply "strike" class)
</label><br>
<label>
   <input type="checkbox" ng-model="important">
   important (apply "bold" class)
</label><br>
<label>
   <input type="checkbox" ng-model="error">
   error (apply "has-error" class)
</label>
<hr>
<p ng-class="style">Using String Syntax</p>
<input type="text" ng-model="style"
       placeholder="Type: bold strike red" aria-label="Type: bold strike red">
<hr>
<p ng-class="[style1, style2, style3]">Using Array Syntax</p>
<input ng-model="style1"
       placeholder="Type: bold, strike or red" aria-label="Type: bold, strike or red"><br>
<input ng-model="style2"
       placeholder="Type: bold, strike or red" aria-label="Type: bold, strike or red 2"><br>
<input ng-model="style3"
       placeholder="Type: bold, strike or red" aria-label="Type: bold, strike or red 3"><br>
<hr>
<p ng-class="[style4, {orange: warning}]">Using Array and Map Syntax</p>
<input ng-model="style4" placeholder="Type: bold, strike" aria-label="Type: bold, strike"><br>
<label><input type="checkbox" ng-model="warning"> warning (apply "orange" class)</label>
+
+ +
+
.strike {
    text-decoration: line-through;
}
.bold {
    font-weight: bold;
}
.red {
    color: red;
}
.has-error {
    color: red;
    background-color: yellow;
}
.orange {
    color: orange;
}
+
+ +
+
var ps = element.all(by.css('p'));

it('should let you toggle the class', function() {

  expect(ps.first().getAttribute('class')).not.toMatch(/bold/);
  expect(ps.first().getAttribute('class')).not.toMatch(/has-error/);

  element(by.model('important')).click();
  expect(ps.first().getAttribute('class')).toMatch(/bold/);

  element(by.model('error')).click();
  expect(ps.first().getAttribute('class')).toMatch(/has-error/);
});

it('should let you toggle string example', function() {
  expect(ps.get(1).getAttribute('class')).toBe('');
  element(by.model('style')).clear();
  element(by.model('style')).sendKeys('red');
  expect(ps.get(1).getAttribute('class')).toBe('red');
});

it('array example should have 3 classes', function() {
  expect(ps.get(2).getAttribute('class')).toBe('');
  element(by.model('style1')).sendKeys('bold');
  element(by.model('style2')).sendKeys('strike');
  element(by.model('style3')).sendKeys('red');
  expect(ps.get(2).getAttribute('class')).toBe('bold strike red');
});

it('array with map example should have 2 classes', function() {
  expect(ps.last().getAttribute('class')).toBe('');
  element(by.model('style4')).sendKeys('bold');
  element(by.model('warning')).click();
  expect(ps.last().getAttribute('class')).toBe('bold orange');
});
+
+ + + +
+
+ + +

+

Animations

+

The example below demonstrates how to perform animations using ngClass.

+

+ +

+ + +
+ + +
+
<input id="setbtn" type="button" value="set" ng-click="myVar='my-class'">
<input id="clearbtn" type="button" value="clear" ng-click="myVar=''">
<br>
<span class="base-class" ng-class="myVar">Sample Text</span>
+
+ +
+
.base-class {
  transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
}

.base-class.my-class {
  color: red;
  font-size:3em;
}
+
+ +
+
it('should check ng-class', function() {
  expect(element(by.css('.base-class')).getAttribute('class')).not.
    toMatch(/my-class/);

  element(by.id('setbtn')).click();

  expect(element(by.css('.base-class')).getAttribute('class')).
    toMatch(/my-class/);

  element(by.id('clearbtn')).click();

  expect(element(by.css('.base-class')).getAttribute('class')).not.
    toMatch(/my-class/);
});
+
+ + + +
+
+ + +

+

ngClass and pre-existing CSS3 Transitions/Animations

+

The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure. + Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder + any pre-existing CSS transitions already on the element. To get an idea of what happens during a class-based animation, be sure + to view the step by step details of $animate.addClass and + $animate.removeClass.

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngClassEven.html b/1.6.6/docs/partials/api/ng/directive/ngClassEven.html new file mode 100644 index 000000000..62a9230ac --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngClassEven.html @@ -0,0 +1,139 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngClassEven

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

The ngClassOdd and ngClassEven directives work exactly as +ngClass, except they work in +conjunction with ngRepeat and take effect only on odd (even) rows.

+

This directive can be applied only within the scope of an +ngRepeat.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <ANY
      ng-class-even="expression">
    ...
    </ANY>
    +
  • +
  • as CSS class: +
    <ANY class="ng-class-even: expression;"> ... </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngClassEven + + + + expression + +

Expression to eval. The + result of the evaluation can be a string representing space delimited class names or an array.

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<ol ng-init="names=['John', 'Mary', 'Cate', 'Suz']">
  <li ng-repeat="name in names">
   <span ng-class-odd="'odd'" ng-class-even="'even'">
     {{name}} &nbsp; &nbsp; &nbsp;
   </span>
  </li>
</ol>
+
+ +
+
.odd {
  color: red;
}
.even {
  color: blue;
}
+
+ +
+
it('should check ng-class-odd and ng-class-even', function() {
  expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).
    toMatch(/odd/);
  expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).
    toMatch(/even/);
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngClassOdd.html b/1.6.6/docs/partials/api/ng/directive/ngClassOdd.html new file mode 100644 index 000000000..e227e9735 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngClassOdd.html @@ -0,0 +1,139 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngClassOdd

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

The ngClassOdd and ngClassEven directives work exactly as +ngClass, except they work in +conjunction with ngRepeat and take effect only on odd (even) rows.

+

This directive can be applied only within the scope of an +ngRepeat.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <ANY
      ng-class-odd="expression">
    ...
    </ANY>
    +
  • +
  • as CSS class: +
    <ANY class="ng-class-odd: expression;"> ... </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngClassOdd + + + + expression + +

Expression to eval. The result + of the evaluation can be a string representing space delimited class names or an array.

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<ol ng-init="names=['John', 'Mary', 'Cate', 'Suz']">
  <li ng-repeat="name in names">
   <span ng-class-odd="'odd'" ng-class-even="'even'">
     {{name}}
   </span>
  </li>
</ol>
+
+ +
+
.odd {
  color: red;
}
.even {
  color: blue;
}
+
+ +
+
it('should check ng-class-odd and ng-class-even', function() {
  expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).
    toMatch(/odd/);
  expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).
    toMatch(/even/);
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngClick.html b/1.6.6/docs/partials/api/ng/directive/ngClick.html new file mode 100644 index 000000000..f2780cd41 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngClick.html @@ -0,0 +1,130 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngClick

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

The ngClick directive allows you to specify custom behavior when +an element is clicked.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-click
      ng-click="expression">
    ...
    </ng-click>
    +
  • +
  • as attribute: +
    <ANY
      ng-click="expression">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngClick + + + + expression + +

Expression to evaluate upon +click. (Event object is available as $event)

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<button ng-click="count = count + 1" ng-init="count=0">
  Increment
</button>
<span>
  count: {{count}}
</span>
+
+ +
+
it('should check ng-click', function() {
  expect(element(by.binding('count')).getText()).toMatch('0');
  element(by.css('button')).click();
  expect(element(by.binding('count')).getText()).toMatch('1');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngCloak.html b/1.6.6/docs/partials/api/ng/directive/ngCloak.html new file mode 100644 index 000000000..e21ce30ed --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngCloak.html @@ -0,0 +1,113 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngCloak

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

The ngCloak directive is used to prevent the Angular html template from being briefly +displayed by the browser in its raw (uncompiled) form while your application is loading. Use this +directive to avoid the undesirable flicker effect caused by the html template display.

+

The directive can be applied to the <body> element, but the preferred usage is to apply +multiple ngCloak directives to small portions of the page to permit progressive rendering +of the browser view.

+

ngCloak works in cooperation with the following css rule embedded within angular.js and +angular.min.js. +For CSP mode please add angular-csp.css to your html file (see ngCsp).

+
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
+  display: none !important;
+}
+
+

When this css rule is loaded by the browser, all html elements (including their children) that +are tagged with the ngCloak directive are hidden. When Angular encounters this directive +during the compilation of the template it deletes the ngCloak element attribute, making +the compiled element visible.

+

For the best result, the angular.js script must be loaded in the head section of the html +document; alternatively, the css rule above must be included in the external stylesheet of the +application.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <ANY>
    ...
    </ANY>
    +
  • +
  • as CSS class: +
    <ANY class=""> ... </ANY>
    +
  • + +
+ + + + +

Examples

+ +

+ + +
+ + +
+
<div id="template1" ng-cloak>{{ 'hello' }}</div>
<div id="template2" class="ng-cloak">{{ 'world' }}</div>
+
+ +
+
it('should remove the template directive and css class', function() {
  expect($('#template1').getAttribute('ng-cloak')).
    toBeNull();
  expect($('#template2').getAttribute('ng-cloak')).
    toBeNull();
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngController.html b/1.6.6/docs/partials/api/ng/directive/ngController.html new file mode 100644 index 000000000..722ad59a2 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngController.html @@ -0,0 +1,219 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngController

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

The ngController directive attaches a controller class to the view. This is a key aspect of how angular +supports the principles behind the Model-View-Controller design pattern.

+

MVC components in angular:

+
    +
  • Model — Models are the properties of a scope; scopes are attached to the DOM where scope properties +are accessed through bindings.
  • +
  • View — The template (HTML with data bindings) that is rendered into the View.
  • +
  • Controller — The ngController directive specifies a Controller class; the class contains business +logic behind the application to decorate the scope with functions and values
  • +
+

Note that you can also attach controllers to the DOM by declaring it in a route definition +via the $route service. A common mistake is to declare the controller +again using ng-controller in the template itself. This will cause the controller to be attached +and executed twice.

+ +
+ + + + +
+ + + +

Directive Info

+
    +
  • This directive creates new scope.
  • +
  • This directive executes at priority level 500.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-controller
      ng-controller="expression">
    ...
    </ng-controller>
    +
  • +
  • as attribute: +
    <ANY
      ng-controller="expression">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngController + + + + expression + +

Name of a constructor function registered with the current +$controllerProvider or an expression +that on the current scope evaluates to a constructor function.

+

The controller instance can be published into a scope property by specifying +ng-controller="as propertyName".

+

If the current $controllerProvider is configured to use globals (via +$controllerProvider.allowGlobals()), this may +also be the name of a globally accessible constructor function (deprecated, not recommended).

+ + +
+ +
+ + + +

Examples

Here is a simple form for editing user contact information. Adding, removing, clearing, and +greeting are methods declared on the controller (see source tab). These methods can +easily be called from the angular markup. Any changes to the data are automatically reflected +in the View without the need for a manual update.

+

Two different declaration styles are included below:

+
    +
  • one binds methods and properties directly onto the controller using this: +ng-controller="SettingsController1 as settings"
  • +
  • one injects $scope into the controller: +ng-controller="SettingsController2"
  • +
+

The second option is more common in the Angular community, and is generally used in boilerplates +and in this guide. However, there are advantages to binding properties directly to the controller +and avoiding scope.

+
    +
  • Using controller as makes it obvious which controller you are accessing in the template when +multiple controllers apply to an element.
  • +
  • If you are writing your controllers as classes you have easier access to the properties and +methods, which will appear on the scope, from inside the controller code.
  • +
  • Since there is always a . in the bindings, you don't have to worry about prototypal +inheritance masking primitives.
  • +
+

This example demonstrates the controller as syntax.

+

+ +

+ + +
+ + +
+
<div id="ctrl-as-exmpl" ng-controller="SettingsController1 as settings">
  <label>Name: <input type="text" ng-model="settings.name"/></label>
  <button ng-click="settings.greet()">greet</button><br/>
  Contact:
  <ul>
    <li ng-repeat="contact in settings.contacts">
      <select ng-model="contact.type" aria-label="Contact method" id="select_{{$index}}">
         <option>phone</option>
         <option>email</option>
      </select>
      <input type="text" ng-model="contact.value" aria-labelledby="select_{{$index}}" />
      <button ng-click="settings.clearContact(contact)">clear</button>
      <button ng-click="settings.removeContact(contact)" aria-label="Remove">X</button>
    </li>
    <li><button ng-click="settings.addContact()">add</button></li>
 </ul>
</div>
+
+ +
+
angular.module('controllerAsExample', [])
  .controller('SettingsController1', SettingsController1);

function SettingsController1() {
  this.name = 'John Smith';
  this.contacts = [
    {type: 'phone', value: '408 555 1212'},
    {type: 'email', value: 'john.smith@example.org'}
  ];
}

SettingsController1.prototype.greet = function() {
  alert(this.name);
};

SettingsController1.prototype.addContact = function() {
  this.contacts.push({type: 'email', value: 'yourname@example.org'});
};

SettingsController1.prototype.removeContact = function(contactToRemove) {
 var index = this.contacts.indexOf(contactToRemove);
  this.contacts.splice(index, 1);
};

SettingsController1.prototype.clearContact = function(contact) {
  contact.type = 'phone';
  contact.value = '';
};
+
+ +
+
it('should check controller as', function() {
  var container = element(by.id('ctrl-as-exmpl'));
    expect(container.element(by.model('settings.name'))
      .getAttribute('value')).toBe('John Smith');

  var firstRepeat =
      container.element(by.repeater('contact in settings.contacts').row(0));
  var secondRepeat =
      container.element(by.repeater('contact in settings.contacts').row(1));

  expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
      .toBe('408 555 1212');

  expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))
      .toBe('john.smith@example.org');

  firstRepeat.element(by.buttonText('clear')).click();

  expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
      .toBe('');

  container.element(by.buttonText('add')).click();

  expect(container.element(by.repeater('contact in settings.contacts').row(2))
      .element(by.model('contact.value'))
      .getAttribute('value'))
      .toBe('yourname@example.org');
});
+
+ + + +
+
+ + +

+

This example demonstrates the "attach to $scope" style of controller.

+

+ +

+ + +
+ + +
+
<div id="ctrl-exmpl" ng-controller="SettingsController2">
  <label>Name: <input type="text" ng-model="name"/></label>
  <button ng-click="greet()">greet</button><br/>
  Contact:
  <ul>
    <li ng-repeat="contact in contacts">
      <select ng-model="contact.type" id="select_{{$index}}">
         <option>phone</option>
         <option>email</option>
      </select>
      <input type="text" ng-model="contact.value" aria-labelledby="select_{{$index}}" />
      <button ng-click="clearContact(contact)">clear</button>
      <button ng-click="removeContact(contact)">X</button>
    </li>
    <li>[ <button ng-click="addContact()">add</button> ]</li>
 </ul>
</div>
+
+ +
+
angular.module('controllerExample', [])
  .controller('SettingsController2', ['$scope', SettingsController2]);

function SettingsController2($scope) {
  $scope.name = 'John Smith';
  $scope.contacts = [
    {type:'phone', value:'408 555 1212'},
    {type:'email', value:'john.smith@example.org'}
  ];

  $scope.greet = function() {
    alert($scope.name);
  };

  $scope.addContact = function() {
    $scope.contacts.push({type:'email', value:'yourname@example.org'});
  };

  $scope.removeContact = function(contactToRemove) {
    var index = $scope.contacts.indexOf(contactToRemove);
    $scope.contacts.splice(index, 1);
  };

  $scope.clearContact = function(contact) {
    contact.type = 'phone';
    contact.value = '';
  };
}
+
+ +
+
it('should check controller', function() {
  var container = element(by.id('ctrl-exmpl'));

  expect(container.element(by.model('name'))
      .getAttribute('value')).toBe('John Smith');

  var firstRepeat =
      container.element(by.repeater('contact in contacts').row(0));
  var secondRepeat =
      container.element(by.repeater('contact in contacts').row(1));

  expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
      .toBe('408 555 1212');
  expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))
      .toBe('john.smith@example.org');

  firstRepeat.element(by.buttonText('clear')).click();

  expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
      .toBe('');

  container.element(by.buttonText('add')).click();

  expect(container.element(by.repeater('contact in contacts').row(2))
      .element(by.model('contact.value'))
      .getAttribute('value'))
      .toBe('yourname@example.org');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngCopy.html b/1.6.6/docs/partials/api/ng/directive/ngCopy.html new file mode 100644 index 000000000..444c87f6c --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngCopy.html @@ -0,0 +1,122 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngCopy

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Specify custom behavior on copy event.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-copy
      ng-copy="expression">
    ...
    </ng-copy>
    +
  • +
  • as attribute: +
    <window, input, select, textarea, a
      ng-copy="expression">
    ...
    </window, input, select, textarea, a>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngCopy + + + + expression + +

Expression to evaluate upon +copy. (Event object is available as $event)

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<input ng-copy="copied=true" ng-init="copied=false; value='copy me'" ng-model="value">
copied: {{copied}}
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngCsp.html b/1.6.6/docs/partials/api/ng/directive/ngCsp.html new file mode 100644 index 000000000..473657c7a --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngCsp.html @@ -0,0 +1,170 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngCsp

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Angular has some features that can conflict with certain restrictions that are applied when using +CSP (Content Security Policy) rules.

+

If you intend to implement CSP with these rules then you must tell Angular not to use these +features.

+

This is necessary when developing things like Google Chrome Extensions or Universal Windows Apps.

+

The following default rules in CSP affect Angular:

+
    +
  • The use of eval(), Function(string) and similar functions to dynamically create and execute +code from strings is forbidden. Angular makes use of this in the $parse service to +provide a 30% increase in the speed of evaluating Angular expressions. (This CSP rule can be +disabled with the CSP keyword unsafe-eval, but it is generally not recommended as it would +weaken the protections offered by CSP.)

    +
  • +
  • The use of inline resources, such as inline <script> and <style> elements, are forbidden. +This prevents apps from injecting custom styles directly into the document. Angular makes use of +this to include some CSS rules (e.g. ngCloak and ngHide). To make these +directives work when a CSP rule is blocking inline styles, you must link to the angular-csp.css +in your HTML manually. (This CSP rule can be disabled with the CSP keyword unsafe-inline, but +it is generally not recommended as it would weaken the protections offered by CSP.)

    +
  • +
+

If you do not provide ngCsp then Angular tries to autodetect if CSP is blocking dynamic code +creation from strings (e.g., unsafe-eval not specified in CSP header) and automatically +deactivates this feature in the $parse service. This autodetection, however, triggers a +CSP error to be logged in the console:

+
Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of
+script in the following Content Security Policy directive: "default-src 'self'". Note that
+'script-src' was not explicitly set, so 'default-src' is used as a fallback.
+
+

This error is harmless but annoying. To prevent the error from showing up, put the ngCsp +directive on an element of the HTML document that appears before the <script> tag that loads +the angular.js file.

+

Note: This directive is only available in the ng-csp and data-ng-csp attribute form.

+

You can specify which of the CSP related Angular features should be deactivated by providing +a value for the ng-csp attribute. The options are as follows:

+
    +
  • no-inline-style: this stops Angular from injecting CSS styles into the DOM

    +
  • +
  • no-unsafe-eval: this stops Angular from optimizing $parse with unsafe eval of strings

    +
  • +
+

You can use these values in the following combinations:

+
    +
  • No declaration means that Angular will assume that you can do inline styles, but it will do +a runtime check for unsafe-eval. E.g. <body>. This is backwardly compatible with previous +versions of Angular.

    +
  • +
  • A simple ng-csp (or data-ng-csp) attribute will tell Angular to deactivate both inline +styles and unsafe eval. E.g. <body ng-csp>. This is backwardly compatible with previous +versions of Angular.

    +
  • +
  • Specifying only no-unsafe-eval tells Angular that we must not use eval, but that we can +inject inline styles. E.g. <body ng-csp="no-unsafe-eval">.

    +
  • +
  • Specifying only no-inline-style tells Angular that we must not inject styles, but that we can +run eval - no automatic check for unsafe eval will occur. E.g. <body ng-csp="no-inline-style">

    +
  • +
  • Specifying both no-unsafe-eval and no-inline-style tells Angular that we must not inject +styles nor use eval, which is the same as an empty: ng-csp. +E.g.<body ng-csp="no-inline-style;no-unsafe-eval">

    +
  • +
+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <ANY>
    ...
    </ANY>
    +
  • + +
+ + + + +

Examples

This example shows how to apply the ngCsp directive to the html tag.

+
<!doctype html>
+<html ng-app ng-csp>
+...
+...
+</html>
+
+ +

+
+
+ + +
+ + +
+
<div ng-controller="MainController as ctrl">
  <div>
    <button ng-click="ctrl.inc()" id="inc">Increment</button>
    <span id="counter">
      {{ctrl.counter}}
    </span>
  </div>

  <div>
    <button ng-click="ctrl.evil()" id="evil">Evil</button>
    <span id="evilError">
      {{ctrl.evilError}}
    </span>
  </div>
</div>
+
+ +
+
angular.module('cspExample', [])
.controller('MainController', function MainController() {
   this.counter = 0;
   this.inc = function() {
     this.counter++;
   };
   this.evil = function() {
     try {
       eval('1+2'); // eslint-disable-line no-eval
     } catch (e) {
       this.evilError = e.message;
     }
   };
 });
+
+ +
+
var util, webdriver;

var incBtn = element(by.id('inc'));
var counter = element(by.id('counter'));
var evilBtn = element(by.id('evil'));
var evilError = element(by.id('evilError'));

function getAndClearSevereErrors() {
  return browser.manage().logs().get('browser').then(function(browserLog) {
    return browserLog.filter(function(logEntry) {
      return logEntry.level.value > webdriver.logging.Level.WARNING.value;
    });
  });
}

function clearErrors() {
  getAndClearSevereErrors();
}

function expectNoErrors() {
  getAndClearSevereErrors().then(function(filteredLog) {
    expect(filteredLog.length).toEqual(0);
    if (filteredLog.length) {
      console.log('browser console errors: ' + util.inspect(filteredLog));
    }
  });
}

function expectError(regex) {
  getAndClearSevereErrors().then(function(filteredLog) {
    var found = false;
    filteredLog.forEach(function(log) {
      if (log.message.match(regex)) {
        found = true;
      }
    });
    if (!found) {
      throw new Error('expected an error that matches ' + regex);
    }
  });
}

beforeEach(function() {
  util = require('util');
  webdriver = require('selenium-webdriver');
});

// For now, we only test on Chrome,
// as Safari does not load the page with Protractor's injected scripts,
// and Firefox webdriver always disables content security policy (#6358)
if (browser.params.browser !== 'chrome') {
  return;
}

it('should not report errors when the page is loaded', function() {
  // clear errors so we are not dependent on previous tests
  clearErrors();
  // Need to reload the page as the page is already loaded when
  // we come here
  browser.driver.getCurrentUrl().then(function(url) {
    browser.get(url);
  });
  expectNoErrors();
});

it('should evaluate expressions', function() {
  expect(counter.getText()).toEqual('0');
  incBtn.click();
  expect(counter.getText()).toEqual('1');
  expectNoErrors();
});

it('should throw and report an error when using "eval"', function() {
  evilBtn.click();
  expect(evilError.getText()).toMatch(/Content Security Policy/);
  expectError(/Content Security Policy/);
});
+
+ + + +
+
+ + + +
+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngCut.html b/1.6.6/docs/partials/api/ng/directive/ngCut.html new file mode 100644 index 000000000..9b44f402f --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngCut.html @@ -0,0 +1,122 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngCut

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Specify custom behavior on cut event.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-cut
      ng-cut="expression">
    ...
    </ng-cut>
    +
  • +
  • as attribute: +
    <window, input, select, textarea, a
      ng-cut="expression">
    ...
    </window, input, select, textarea, a>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngCut + + + + expression + +

Expression to evaluate upon +cut. (Event object is available as $event)

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<input ng-cut="cut=true" ng-init="cut=false; value='cut me'" ng-model="value">
cut: {{cut}}
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngDblclick.html b/1.6.6/docs/partials/api/ng/directive/ngDblclick.html new file mode 100644 index 000000000..0fda0f388 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngDblclick.html @@ -0,0 +1,122 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngDblclick

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

The ngDblclick directive allows you to specify custom behavior on a dblclick event.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-dblclick
      ng-dblclick="expression">
    ...
    </ng-dblclick>
    +
  • +
  • as attribute: +
    <ANY
      ng-dblclick="expression">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngDblclick + + + + expression + +

Expression to evaluate upon +a dblclick. (The Event object is available as $event)

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<button ng-dblclick="count = count + 1" ng-init="count=0">
  Increment (on double click)
</button>
count: {{count}}
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngDisabled.html b/1.6.6/docs/partials/api/ng/directive/ngDisabled.html new file mode 100644 index 000000000..c6b158e6a --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngDisabled.html @@ -0,0 +1,129 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngDisabled

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

This directive sets the disabled attribute on the element (typically a form control, +e.g. input, button, select etc.) if the +expression inside ngDisabled evaluates to truthy.

+

A special directive is necessary because we cannot use interpolation inside the disabled +attribute. See the interpolation guide for more info.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 100.
  • + +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <INPUT
      ng-disabled="expression">
    ...
    </INPUT>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngDisabled + + + + expression + +

If the expression is truthy, + then the disabled attribute will be set on the element

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<label>Click me to toggle: <input type="checkbox" ng-model="checked"></label><br/>
<button ng-model="button" ng-disabled="checked">Button</button>
+
+ +
+
it('should toggle button', function() {
  expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy();
  element(by.model('checked')).click();
  expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy();
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngFocus.html b/1.6.6/docs/partials/api/ng/directive/ngFocus.html new file mode 100644 index 000000000..db77bfc8d --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngFocus.html @@ -0,0 +1,102 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngFocus

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Specify custom behavior on focus event.

+

Note: As the focus event is executed synchronously when calling input.focus() +AngularJS executes the expression using scope.$evalAsync if the event is fired +during an $apply to ensure a consistent state.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-focus
      ng-focus="expression">
    ...
    </ng-focus>
    +
  • +
  • as attribute: +
    <window, input, select, textarea, a
      ng-focus="expression">
    ...
    </window, input, select, textarea, a>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngFocus + + + + expression + +

Expression to evaluate upon +focus. (Event object is available as $event)

+ + +
+ +
+ + + +

Examples

See ngClick

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngForm.html b/1.6.6/docs/partials/api/ng/directive/ngForm.html new file mode 100644 index 000000000..73575b420 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngForm.html @@ -0,0 +1,105 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngForm

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Nestable alias of form directive. HTML +does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a +sub-group of controls needs to be determined.

+

Note: the purpose of ngForm is to group controls, +but not to be a replacement for the <form> tag with all of its capabilities +(e.g. posting to the server, ...).

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-form
      [name="string"]>
    ...
    </ng-form>
    +
  • +
  • as attribute: +
    <ANY
      [ng-form="string"]>
    ...
    </ANY>
    +
  • +
  • as CSS class: +
    <ANY class="[ng-form: string;]"> ... </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngForm + | name +
(optional)
+
+ string + +

Name of the form. If specified, the form controller will be published into + related scope, under this name.

+ + +
+ +
+ + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngHide.html b/1.6.6/docs/partials/api/ng/directive/ngHide.html new file mode 100644 index 000000000..9e61eedb7 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngHide.html @@ -0,0 +1,258 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngHide

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

The ngHide directive shows or hides the given HTML element based on the expression provided to +the ngHide attribute.

+

The element is shown or hidden by removing or adding the .ng-hide CSS class onto the element. +The .ng-hide CSS class is predefined in AngularJS and sets the display style to none (using an +!important flag). For CSP mode please add angular-csp.css to your HTML file (see +ngCsp).

+
<!-- when $scope.myValue is truthy (element is hidden) -->
+<div ng-hide="myValue" class="ng-hide"></div>
+
+<!-- when $scope.myValue is falsy (element is visible) -->
+<div ng-hide="myValue"></div>
+
+

When the ngHide expression evaluates to a truthy value then the .ng-hide CSS class is added +to the class attribute on the element causing it to become hidden. When falsy, the .ng-hide +CSS class is removed from the element causing the element not to appear hidden.

+

Why is !important used?

+

You may be wondering why !important is used for the .ng-hide CSS class. This is because the +.ng-hide selector can be easily overridden by heavier selectors. For example, something as +simple as changing the display style on a HTML list item would make hidden elements appear +visible. This also becomes a bigger issue when dealing with CSS frameworks.

+

By using !important, the show and hide behavior will work as expected despite any clash between +CSS selector specificity (when !important isn't used with any conflicting styles). If a +developer chooses to override the styling to change how to hide an element then it is just a +matter of using !important in their own CSS code.

+

Overriding .ng-hide

+

By default, the .ng-hide class will style the element with display: none !important. If you +wish to change the hide behavior with ngShow/ngHide, you can simply overwrite the styles for +the .ng-hide CSS class. Note that the selector that needs to be used is actually +.ng-hide:not(.ng-hide-animate) to cope with extra animation classes that can be added.

+
.ng-hide:not(.ng-hide-animate) {
+  /* These are just alternative ways of hiding an element */
+  display: block!important;
+  position: absolute;
+  top: -9999px;
+  left: -9999px;
+}
+
+

By default you don't need to override in CSS anything and the animations will work around the +display style.

+

A note about animations with ngHide

+

Animations in ngShow/ngHide work with the show and hide events that are triggered when the +directive expression is true and false. This system works like the animation system present with +ngClass except that you must also include the !important flag to override the display +property so that the elements are not actually hidden during the animation.

+
/* A working example can be found at the bottom of this page. */
+.my-element.ng-hide-add, .my-element.ng-hide-remove {
+  transition: all 0.5s linear;
+}
+
+.my-element.ng-hide-add { ... }
+.my-element.ng-hide-add.ng-hide-add-active { ... }
+.my-element.ng-hide-remove { ... }
+.my-element.ng-hide-remove.ng-hide-remove-active { ... }
+
+

Keep in mind that, as of AngularJS version 1.3, there is no need to change the display property +to block during animation states - ngAnimate will automatically handle the style toggling for you.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • +
  • This directive can be used as multiElement
  • +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-hide
      ng-hide="expression">
    ...
    </ng-hide>
    +
  • +
  • as attribute: +
    <ANY
      ng-hide="expression">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngHide + + + + expression + +

If the expression is truthy/falsy then the + element is hidden/shown respectively.

+ + +
+ +
+ +

Animations

+ + + + + + + + + + + + + + + + + +
AnimationOccurs
addClass .ng-hideAfter the ngHide expression evaluates to a truthy value and just before the contents are set to hidden.
removeClass .ng-hideAfter the ngHide expression evaluates to a non truthy value and just before contents are set to visible.
+ + Click here to learn more about the steps involved in the animation. + + +

Examples

A simple example, animating the element's opacity:

+

+ +

+ + +
+ + +
+
Hide: <input type="checkbox" ng-model="checked" aria-label="Toggle ngHide"><br />
<div class="check-element animate-show-hide" ng-hide="checked">
  I hide when your checkbox is checked.
</div>
+
+ +
+
.animate-show-hide.ng-hide {
  opacity: 0;
}

.animate-show-hide.ng-hide-add,
.animate-show-hide.ng-hide-remove {
  transition: all linear 0.5s;
}

.check-element {
  border: 1px solid black;
  opacity: 1;
  padding: 10px;
}
+
+ +
+
it('should check ngHide', function() {
  var checkbox = element(by.model('checked'));
  var checkElem = element(by.css('.check-element'));

  expect(checkElem.isDisplayed()).toBe(true);
  checkbox.click();
  expect(checkElem.isDisplayed()).toBe(false);
});
+
+ + + +
+
+ + +

+

A more complex example, featuring different show/hide animations:

+

+ +

+ + +
+ + +
+
Hide: <input type="checkbox" ng-model="checked" aria-label="Toggle ngHide"><br />
<div class="check-element funky-show-hide" ng-hide="checked">
  I hide when your checkbox is checked.
</div>
+
+ +
+
body {
  overflow: hidden;
  perspective: 1000px;
}

.funky-show-hide.ng-hide-add {
  transform: rotateZ(0);
  transform-origin: right;
  transition: all 0.5s ease-in-out;
}

.funky-show-hide.ng-hide-add.ng-hide-add-active {
  transform: rotateZ(-135deg);
}

.funky-show-hide.ng-hide-remove {
  transform: rotateY(90deg);
  transform-origin: left;
  transition: all 0.5s ease;
}

.funky-show-hide.ng-hide-remove.ng-hide-remove-active {
  transform: rotateY(0);
}

.check-element {
  border: 1px solid black;
  opacity: 1;
  padding: 10px;
}
+
+ +
+
it('should check ngHide', function() {
  var checkbox = element(by.model('checked'));
  var checkElem = element(by.css('.check-element'));

  expect(checkElem.isDisplayed()).toBe(true);
  checkbox.click();
  expect(checkElem.isDisplayed()).toBe(false);
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngHref.html b/1.6.6/docs/partials/api/ng/directive/ngHref.html new file mode 100644 index 000000000..6975cd16f --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngHref.html @@ -0,0 +1,137 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngHref

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Using Angular markup like {{hash}} in an href attribute will +make the link go to the wrong URL if the user clicks it before +Angular has a chance to replace the {{hash}} markup with its +value. Until Angular replaces the markup the link will be broken +and will most likely return a 404 error. The ngHref directive +solves this problem.

+

The wrong way to write it:

+
<a href="http://www.gravatar.com/avatar/{{hash}}">link1</a>
+
+

The correct way to write it:

+
<a ng-href="http://www.gravatar.com/avatar/{{hash}}">link1</a>
+
+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 99.
  • + +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <A
      ng-href="template">
    ...
    </A>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngHref + + + + template + +

any string which can contain {{}} markup.

+ + +
+ +
+ + + +

Examples

This example shows various combinations of href, ng-href and ng-click attributes +in links and their different behaviors: + + +

+ + +
+ + +
+
<input ng-model="value" /><br />
<a id="link-1" href ng-click="value = 1">link 1</a> (link, don't reload)<br />
<a id="link-2" href="" ng-click="value = 2">link 2</a> (link, don't reload)<br />
<a id="link-3" ng-href="/{{'123'}}">link 3</a> (link, reload!)<br />
<a id="link-4" href="" name="xx" ng-click="value = 4">anchor</a> (link, don't reload)<br />
<a id="link-5" name="xxx" ng-click="value = 5">anchor</a> (no link)<br />
<a id="link-6" ng-href="{{value}}">link</a> (link, change location)
+
+ +
+
it('should execute ng-click but not reload when href without value', function() {
  element(by.id('link-1')).click();
  expect(element(by.model('value')).getAttribute('value')).toEqual('1');
  expect(element(by.id('link-1')).getAttribute('href')).toBe('');
});

it('should execute ng-click but not reload when href empty string', function() {
  element(by.id('link-2')).click();
  expect(element(by.model('value')).getAttribute('value')).toEqual('2');
  expect(element(by.id('link-2')).getAttribute('href')).toBe('');
});

it('should execute ng-click and change url when ng-href specified', function() {
  expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\/123$/);

  element(by.id('link-3')).click();

  // At this point, we navigate away from an Angular page, so we need
  // to use browser.driver to get the base webdriver.

  browser.wait(function() {
    return browser.driver.getCurrentUrl().then(function(url) {
      return url.match(/\/123$/);
    });
  }, 5000, 'page should navigate to /123');
});

it('should execute ng-click but not reload when href empty string and name specified', function() {
  element(by.id('link-4')).click();
  expect(element(by.model('value')).getAttribute('value')).toEqual('4');
  expect(element(by.id('link-4')).getAttribute('href')).toBe('');
});

it('should execute ng-click but not reload when no href but name specified', function() {
  element(by.id('link-5')).click();
  expect(element(by.model('value')).getAttribute('value')).toEqual('5');
  expect(element(by.id('link-5')).getAttribute('href')).toBe(null);
});

it('should only change url when only ng-href', function() {
  element(by.model('value')).clear();
  element(by.model('value')).sendKeys('6');
  expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\/6$/);

  element(by.id('link-6')).click();

  // At this point, we navigate away from an Angular page, so we need
  // to use browser.driver to get the base webdriver.
  browser.wait(function() {
    return browser.driver.getCurrentUrl().then(function(url) {
      return url.match(/\/6$/);
    });
  }, 5000, 'page should navigate to /6');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngIf.html b/1.6.6/docs/partials/api/ng/directive/ngIf.html new file mode 100644 index 000000000..59e1b3aa9 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngIf.html @@ -0,0 +1,170 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngIf

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

The ngIf directive removes or recreates a portion of the DOM tree based on an +{expression}. If the expression assigned to ngIf evaluates to a false +value then the element is removed from the DOM, otherwise a clone of the +element is reinserted into the DOM.

+

ngIf differs from ngShow and ngHide in that ngIf completely removes and recreates the +element in the DOM rather than changing its visibility via the display css property. A common +case when this difference is significant is when using css selectors that rely on an element's +position within the DOM, such as the :first-child or :last-child pseudo-classes.

+

Note that when an element is removed using ngIf its scope is destroyed and a new scope +is created when the element is restored. The scope created within ngIf inherits from +its parent scope using +prototypal inheritance. +An important implication of this is if ngModel is used within ngIf to bind to +a javascript primitive defined in the parent scope. In this case any modifications made to the +variable within the child scope will override (hide) the value in the parent scope.

+

Also, ngIf recreates elements using their compiled state. An example of this behavior +is if an element's class attribute is directly modified after it's compiled, using something like +jQuery's .addClass() method, and the element is later removed. When ngIf recreates the element +the added class will be lost because the original compiled state is used to regenerate the element.

+

Additionally, you can provide animations via the ngAnimate module to animate the enter +and leave effects.

+ +
+ + + + +
+ + + +

Directive Info

+
    +
  • This directive creates new scope.
  • +
  • This directive executes at priority level 600.
  • +
  • This directive can be used as multiElement
  • +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <ANY
      ng-if="expression">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngIf + + + + expression + +

If the expression is falsy then + the element is removed from the DOM tree. If it is truthy a copy of the compiled + element is added to the DOM tree.

+ + +
+ +
+ +

Animations

+ + + + + + + + + + + + + + + + + +
AnimationOccurs
enterjust after the ngIf contents change and a new DOM element is created and injected into the ngIf container
leavejust before the ngIf contents are removed from the DOM
+ + Click here to learn more about the steps involved in the animation. + + +

Examples

+ +

+ + +
+ + +
+
<label>Click me: <input type="checkbox" ng-model="checked" ng-init="checked=true" /></label><br/>
Show when checked:
<span ng-if="checked" class="animate-if">
  This is removed when the checkbox is unchecked.
</span>
+
+ +
+
.animate-if {
  background:white;
  border:1px solid black;
  padding:10px;
}

.animate-if.ng-enter, .animate-if.ng-leave {
  transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
}

.animate-if.ng-enter,
.animate-if.ng-leave.ng-leave-active {
  opacity:0;
}

.animate-if.ng-leave,
.animate-if.ng-enter.ng-enter-active {
  opacity:1;
}
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngInclude.html b/1.6.6/docs/partials/api/ng/directive/ngInclude.html new file mode 100644 index 000000000..db035377f --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngInclude.html @@ -0,0 +1,435 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngInclude

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Fetches, compiles and includes an external HTML fragment.

+

By default, the template URL is restricted to the same domain and protocol as the +application document. This is done by calling $sce.getTrustedResourceUrl on it. To load templates from other domains or protocols +you may either whitelist them or +wrap them as trusted values. Refer to Angular's Strict Contextual Escaping.

+

In addition, the browser's +Same Origin Policy +and Cross-Origin Resource Sharing (CORS) +policy may further restrict whether the template is successfully loaded. +For example, ngInclude won't work for cross-domain requests on all browsers and for file:// +access on some browsers.

+ +
+ + + + +
+ + + +

Directive Info

+
    +
  • This directive creates new scope.
  • +
  • This directive executes at priority level 400.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-include
      src="string"
      [onload="string"]
      [autoscroll="string"]>
    ...
    </ng-include>
    +
  • +
  • as attribute: +
    <ANY
      ng-include="string"
      [onload="string"]
      [autoscroll="string"]>
    ...
    </ANY>
    +
  • +
  • as CSS class: +
    <ANY class="ng-include: string; [onload: string;] [autoscroll: string;]"> ... </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngInclude + | src + + + string + +

angular expression evaluating to URL. If the source is a string constant, + make sure you wrap it in single quotes, e.g. src="'myPartialTemplate.html'".

+ + +
+ onload + +
(optional)
+
+ string + +

Expression to evaluate when a new partial is loaded. +

+ Note: When using onload on SVG elements in IE11, the browser will try to call + a function with the name on the window element, which will usually throw a + "function is undefined" error. To fix this, you can instead use data-onload or a + different form that matches onload. +

+ + +
+ autoscroll + +
(optional)
+
+ string + +

Whether ngInclude should call $anchorScroll to scroll the viewport after the content is loaded.

+
- If the attribute is not set, disable scrolling.
+- If the attribute is set without value, enable scrolling.
+- Otherwise enable scrolling only if the expression evaluates to truthy value.
+
+ + +
+ +
+ +

Events

+
    +
  • +

    $includeContentRequested

    +

    Emitted every time the ngInclude content is requested.

    +
    + + +
    +

    Type:

    +
    emit
    +
    +
    +

    Target:

    +
    the scope ngInclude was declared in
    +
    + +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + angularEvent + + + + Object + +

    Synthetic event object.

    + + +
    + src + + + + String + +

    URL of content to load.

    + + +
    + +
  • + +
  • +

    $includeContentLoaded

    +

    Emitted every time the ngInclude content is reloaded.

    +
    + + +
    +

    Type:

    +
    emit
    +
    +
    +

    Target:

    +
    the current ngInclude scope
    +
    + +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + angularEvent + + + + Object + +

    Synthetic event object.

    + + +
    + src + + + + String + +

    URL of content to load.

    + + +
    + +
  • + +
  • +

    $includeContentError

    +

    Emitted when a template HTTP request yields an erroneous response (status < 200 || status > 299)

    +
    + + +
    +

    Type:

    +
    emit
    +
    +
    +

    Target:

    +
    the scope ngInclude was declared in
    +
    + +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + angularEvent + + + + Object + +

    Synthetic event object.

    + + +
    + src + + + + String + +

    URL of content to load.

    + + +
    + +
  • +
+ +

Animations

+ + + + + + + + + + + + + + + + + +
AnimationOccurs
enterwhen the expression changes, on the new include
leavewhen the expression changes, on the old include
+

The enter and leave animation occur concurrently.

+ + Click here to learn more about the steps involved in the animation. + + +

Examples

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <select ng-model="template" ng-options="t.name for t in templates">
   <option value="">(blank)</option>
  </select>
  url of the template: <code>{{template.url}}</code>
  <hr/>
  <div class="slide-animate-container">
    <div class="slide-animate" ng-include="template.url"></div>
  </div>
</div>
+
+ +
+
angular.module('includeExample', ['ngAnimate'])
.controller('ExampleController', ['$scope', function($scope) {
  $scope.templates =
    [{ name: 'template1.html', url: 'template1.html'},
     { name: 'template2.html', url: 'template2.html'}];
  $scope.template = $scope.templates[0];
}]);
+
+ +
+
Content of template1.html
+
+ +
+
Content of template2.html
+
+ +
+
.slide-animate-container {
  position:relative;
  background:white;
  border:1px solid black;
  height:40px;
  overflow:hidden;
}

.slide-animate {
  padding:10px;
}

.slide-animate.ng-enter, .slide-animate.ng-leave {
  transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;

  position:absolute;
  top:0;
  left:0;
  right:0;
  bottom:0;
  display:block;
  padding:10px;
}

.slide-animate.ng-enter {
  top:-50px;
}
.slide-animate.ng-enter.ng-enter-active {
  top:0;
}

.slide-animate.ng-leave {
  top:0;
}
.slide-animate.ng-leave.ng-leave-active {
  top:50px;
}
+
+ +
+
var templateSelect = element(by.model('template'));
var includeElem = element(by.css('[ng-include]'));

it('should load template1.html', function() {
  expect(includeElem.getText()).toMatch(/Content of template1.html/);
});

it('should load template2.html', function() {
  if (browser.params.browser === 'firefox') {
    // Firefox can't handle using selects
    // See https://github.com/angular/protractor/issues/480
    return;
  }
  templateSelect.click();
  templateSelect.all(by.css('option')).get(2).click();
  expect(includeElem.getText()).toMatch(/Content of template2.html/);
});

it('should change to blank', function() {
  if (browser.params.browser === 'firefox') {
    // Firefox can't handle using selects
    return;
  }
  templateSelect.click();
  templateSelect.all(by.css('option')).get(0).click();
  expect(includeElem.isPresent()).toBe(false);
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngInit.html b/1.6.6/docs/partials/api/ng/directive/ngInit.html new file mode 100644 index 000000000..483cbfbf8 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngInit.html @@ -0,0 +1,143 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngInit

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

The ngInit directive allows you to evaluate an expression in the +current scope.

+
+This directive can be abused to add unnecessary amounts of logic into your templates. +There are only a few appropriate uses of ngInit, such as for aliasing special properties of +ngRepeat, as seen in the demo below; and for injecting data via +server side scripting. Besides these few cases, you should use controllers +rather than ngInit to initialize values on a scope. +
+ +
+Note: If you have assignment in ngInit along with a filter, make +sure you have parentheses to ensure correct operator precedence: +
+<div ng-init="test1 = ($index | toString)"></div>
+
+
+
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 450.
  • + +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <ANY
      ng-init="expression">
    ...
    </ANY>
    +
  • +
  • as CSS class: +
    <ANY class="ng-init: expression;"> ... </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngInit + + + + expression + +

Expression to eval.

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('initExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.list = [['a', 'b'], ['c', 'd']];
    }]);
</script>
<div ng-controller="ExampleController">
  <div ng-repeat="innerList in list" ng-init="outerIndex = $index">
    <div ng-repeat="value in innerList" ng-init="innerIndex = $index">
       <span class="example-init">list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}};</span>
    </div>
  </div>
</div>
+
+ +
+
it('should alias index positions', function() {
  var elements = element.all(by.css('.example-init'));
  expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;');
  expect(elements.get(1).getText()).toBe('list[ 0 ][ 1 ] = b;');
  expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;');
  expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngJq.html b/1.6.6/docs/partials/api/ng/directive/ngJq.html new file mode 100644 index 000000000..dc3851488 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngJq.html @@ -0,0 +1,119 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngJq

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Use this directive to force the angular.element library. This should be +used to force either jqLite by leaving ng-jq blank or setting the name of +the jquery variable under window (eg. jQuery).

+

Since angular looks for this directive when it is loaded (doesn't wait for the +DOMContentLoaded event), it must be placed on an element that comes before the script +which loads angular. Also, only the first instance of ng-jq will be used and all +others ignored.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-jq
      [ng-jq="string"]>
    ...
    </ng-jq>
    +
  • +
  • as attribute: +
    <ANY
      [ng-jq="string"]>
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngJq + +
(optional)
+
+ string + +

the name of the library available under window +to be used for angular.element

+ + +
+ +
+ + + +

Examples

This example shows how to force jqLite using the ngJq directive to the html tag.

+
<!doctype html>
+<html ng-app ng-jq>
+...
+...
+</html>
+
+

This example shows how to use a jQuery based library of a different name. +The library name must be available at the top most 'window'.

+
<!doctype html>
+<html ng-app ng-jq="jQueryLib">
+...
+...
+</html>
+
+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngKeydown.html b/1.6.6/docs/partials/api/ng/directive/ngKeydown.html new file mode 100644 index 000000000..1d81a432f --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngKeydown.html @@ -0,0 +1,122 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngKeydown

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Specify custom behavior on keydown event.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-keydown
      ng-keydown="expression">
    ...
    </ng-keydown>
    +
  • +
  • as attribute: +
    <ANY
      ng-keydown="expression">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngKeydown + + + + expression + +

Expression to evaluate upon +keydown. (Event object is available as $event and can be interrogated for keyCode, altKey, etc.)

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<input ng-keydown="count = count + 1" ng-init="count=0">
key down count: {{count}}
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngKeypress.html b/1.6.6/docs/partials/api/ng/directive/ngKeypress.html new file mode 100644 index 000000000..b8fd3549a --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngKeypress.html @@ -0,0 +1,123 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngKeypress

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Specify custom behavior on keypress event.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-keypress
      ng-keypress="expression">
    ...
    </ng-keypress>
    +
  • +
  • as attribute: +
    <ANY
      ng-keypress="expression">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngKeypress + + + + expression + +

Expression to evaluate upon +keypress. (Event object is available as $event +and can be interrogated for keyCode, altKey, etc.)

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<input ng-keypress="count = count + 1" ng-init="count=0">
key press count: {{count}}
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngKeyup.html b/1.6.6/docs/partials/api/ng/directive/ngKeyup.html new file mode 100644 index 000000000..56628218f --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngKeyup.html @@ -0,0 +1,122 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngKeyup

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Specify custom behavior on keyup event.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-keyup
      ng-keyup="expression">
    ...
    </ng-keyup>
    +
  • +
  • as attribute: +
    <ANY
      ng-keyup="expression">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngKeyup + + + + expression + +

Expression to evaluate upon +keyup. (Event object is available as $event and can be interrogated for keyCode, altKey, etc.)

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<p>Typing in the input box below updates the key count</p>
<input ng-keyup="count = count + 1" ng-init="count=0"> key up count: {{count}}

<p>Typing in the input box below updates the keycode</p>
<input ng-keyup="event=$event">
<p>event keyCode: {{ event.keyCode }}</p>
<p>event altKey: {{ event.altKey }}</p>
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngList.html b/1.6.6/docs/partials/api/ng/directive/ngList.html new file mode 100644 index 000000000..6810c64b3 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngList.html @@ -0,0 +1,180 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngList

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Text input that converts between a delimited string and an array of strings. The default +delimiter is a comma followed by a space - equivalent to ng-list=", ". You can specify a custom +delimiter as the value of the ngList attribute - for example, ng-list=" | ".

+

The behaviour of the directive is affected by the use of the ngTrim attribute.

+
    +
  • If ngTrim is set to "false" then whitespace around both the separator and each +list item is respected. This implies that the user of the directive is responsible for +dealing with whitespace but also allows you to use whitespace as a delimiter, such as a +tab or newline character.
  • +
  • Otherwise whitespace around the delimiter is ignored when splitting (although it is respected +when joining the list items back together) and whitespace around each list item is stripped +before it is added to the model.
  • +
+

Example with Validation

+

+ +

+ + +
+ + +
+
angular.module('listExample', [])
.controller('ExampleController', ['$scope', function($scope) {
  $scope.names = ['morpheus', 'neo', 'trinity'];
}]);
+
+ +
+
<form name="myForm" ng-controller="ExampleController">
 <label>List: <input name="namesInput" ng-model="names" ng-list required></label>
 <span role="alert">
   <span class="error" ng-show="myForm.namesInput.$error.required">
   Required!</span>
 </span>
 <br>
 <tt>names = {{names}}</tt><br/>
 <tt>myForm.namesInput.$valid = {{myForm.namesInput.$valid}}</tt><br/>
 <tt>myForm.namesInput.$error = {{myForm.namesInput.$error}}</tt><br/>
 <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
 <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
</form>
+
+ +
+
var listInput = element(by.model('names'));
var names = element(by.exactBinding('names'));
var valid = element(by.binding('myForm.namesInput.$valid'));
var error = element(by.css('span.error'));

it('should initialize to model', function() {
  expect(names.getText()).toContain('["morpheus","neo","trinity"]');
  expect(valid.getText()).toContain('true');
  expect(error.getCssValue('display')).toBe('none');
});

it('should be invalid if empty', function() {
  listInput.clear();
  listInput.sendKeys('');

  expect(names.getText()).toContain('');
  expect(valid.getText()).toContain('false');
  expect(error.getCssValue('display')).not.toBe('none');
});
+
+ + + +
+
+ + +

+

Example - splitting on newline

+

+ +

+ + +
+ + +
+
<textarea ng-model="list" ng-list="&#10;" ng-trim="false"></textarea>
<pre>{{ list | json }}</pre>
+
+ +
+
it("should split the text by newlines", function() {
  var listInput = element(by.model('list'));
  var output = element(by.binding('list | json'));
  listInput.sendKeys('abc\ndef\nghi');
  expect(output.getText()).toContain('[\n  "abc",\n  "def",\n  "ghi"\n]');
});
+
+ + + +
+
+ + +

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-list
      [ng-list="string"]>
    ...
    </ng-list>
    +
  • +
  • as attribute: +
    <input
      [ng-list="string"]>
    ...
    </input>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngList + +
(optional)
+
+ string + +

optional delimiter that should be used to split the value.

+ + +
+ +
+ + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngMaxlength.html b/1.6.6/docs/partials/api/ng/directive/ngMaxlength.html new file mode 100644 index 000000000..f19e296f5 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngMaxlength.html @@ -0,0 +1,113 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngMaxlength

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

ngMaxlength adds the maxlength validator to ngModel. +It is most often used for text-based input controls, but can also be applied to custom text-based controls.

+

The validator sets the maxlength error key if the ngModel.$viewValue +is longer than the integer obtained by evaluating the Angular expression given in the +ngMaxlength attribute value.

+
+Note: This directive is also added when the plain maxlength attribute is used, with two +differences: +
    +
  1. + ngMaxlength does not set the maxlength attribute and therefore HTML5 constraint + validation is not available. +
  2. +
  3. + The ngMaxlength attribute must be an expression, while the maxlength value must be + interpolated. +
  4. +
+
+
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-maxlength>
    ...
    </ng-maxlength>
    +
  • +
  • as attribute: +
    <ANY>
    ...
    </ANY>
    +
  • + +
+ + + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('ngMaxlengthExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.maxlength = 5;
    }]);
</script>
<div ng-controller="ExampleController">
  <form name="form">
    <label for="maxlength">Set a maxlength: </label>
    <input type="number" ng-model="maxlength" id="maxlength" />
    <br>
    <label for="input">This input is restricted by the current maxlength: </label>
    <input type="text" ng-model="model" id="input" name="input" ng-maxlength="maxlength" /><br>
    <hr>
    input valid? = <code>{{form.input.$valid}}</code><br>
    model = <code>{{model}}</code>
  </form>
</div>
+
+ +
+
var model = element(by.binding('model'));
var input = element(by.id('input'));

it('should validate the input with the default maxlength', function() {
  input.sendKeys('abcdef');
  expect(model.getText()).not.toContain('abcdef');

  input.clear().then(function() {
    input.sendKeys('abcde');
    expect(model.getText()).toContain('abcde');
  });
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngMinlength.html b/1.6.6/docs/partials/api/ng/directive/ngMinlength.html new file mode 100644 index 000000000..a8cc4bafe --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngMinlength.html @@ -0,0 +1,113 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngMinlength

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

ngMinlength adds the minlength validator to ngModel. +It is most often used for text-based input controls, but can also be applied to custom text-based controls.

+

The validator sets the minlength error key if the ngModel.$viewValue +is shorter than the integer obtained by evaluating the Angular expression given in the +ngMinlength attribute value.

+
+Note: This directive is also added when the plain minlength attribute is used, with two +differences: +
    +
  1. + ngMinlength does not set the minlength attribute and therefore HTML5 constraint + validation is not available. +
  2. +
  3. + The ngMinlength value must be an expression, while the minlength value must be + interpolated. +
  4. +
+
+
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-minlength>
    ...
    </ng-minlength>
    +
  • +
  • as attribute: +
    <ANY>
    ...
    </ANY>
    +
  • + +
+ + + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('ngMinlengthExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.minlength = 3;
    }]);
</script>
<div ng-controller="ExampleController">
  <form name="form">
    <label for="minlength">Set a minlength: </label>
    <input type="number" ng-model="minlength" id="minlength" />
    <br>
    <label for="input">This input is restricted by the current minlength: </label>
    <input type="text" ng-model="model" id="input" name="input" ng-minlength="minlength" /><br>
    <hr>
    input valid? = <code>{{form.input.$valid}}</code><br>
    model = <code>{{model}}</code>
  </form>
</div>
+
+ +
+
var model = element(by.binding('model'));
var input = element(by.id('input'));

it('should validate the input with the default minlength', function() {
  input.sendKeys('ab');
  expect(model.getText()).not.toContain('ab');

  input.sendKeys('abc');
  expect(model.getText()).toContain('abc');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngModel.html b/1.6.6/docs/partials/api/ng/directive/ngModel.html new file mode 100644 index 000000000..d7e09691a --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngModel.html @@ -0,0 +1,228 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngModel

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

The ngModel directive binds an input,select, textarea (or custom form control) to a +property on the scope using NgModelController, +which is created and exposed by this directive.

+

ngModel is responsible for:

+
    +
  • Binding the view into the model, which other directives such as input, textarea or select +require.
  • +
  • Providing validation behavior (i.e. required, number, email, url).
  • +
  • Keeping the state of the control (valid/invalid, dirty/pristine, touched/untouched, validation errors).
  • +
  • Setting related css classes on the element (ng-valid, ng-invalid, ng-dirty, ng-pristine, ng-touched, +ng-untouched, ng-empty, ng-not-empty) including animations.
  • +
  • Registering the control with its parent form.
  • +
+

Note: ngModel will try to bind to the property given by evaluating the expression on the +current scope. If the property doesn't already exist on this scope, it will be created +implicitly and added to the scope.

+

For best practices on using ngModel, see:

+ +

For basic examples, how to use ngModel, see:

+ +

Complex Models (objects or collections)

+

By default, ngModel watches the model by reference, not value. This is important to know when +binding inputs to models that are objects (e.g. Date) or collections (e.g. arrays). If only properties of the +object or collection change, ngModel will not be notified and so the input will not be re-rendered.

+

The model must be assigned an entirely new object or collection before a re-rendering will occur.

+

Some directives have options that will cause them to use a custom $watchCollection on the model expression

+
    +
  • for example, ngOptions will do so when a track by clause is included in the comprehension expression or +if the select is given the multiple attribute.
  • +
+

The $watchCollection() method only does a shallow comparison, meaning that changing properties deeper than the +first level of the object (or only changing the properties of an item in the collection if it's an array) will still +not trigger a re-rendering of the model.

+

CSS classes

+

The following CSS classes are added and removed on the associated input/select/textarea element +depending on the validity of the model.

+
    +
  • ng-valid: the model is valid
  • +
  • ng-invalid: the model is invalid
  • +
  • ng-valid-[key]: for each valid key added by $setValidity
  • +
  • ng-invalid-[key]: for each invalid key added by $setValidity
  • +
  • ng-pristine: the control hasn't been interacted with yet
  • +
  • ng-dirty: the control has been interacted with
  • +
  • ng-touched: the control has been blurred
  • +
  • ng-untouched: the control hasn't been blurred
  • +
  • ng-pending: any $asyncValidators are unfulfilled
  • +
  • ng-empty: the view does not contain a value or the value is deemed "empty", as defined + by the ngModel.NgModelController method
  • +
  • ng-not-empty: the view contains a non-empty value
  • +
+

Keep in mind that ngAnimate can detect each of these classes when added and removed.

+

Animation Hooks

+

Animations within models are triggered when any of the associated CSS classes are added and removed +on the input element which is attached to the model. These classes include: .ng-pristine, .ng-dirty, +.ng-invalid and .ng-valid as well as any other validations that are performed on the model itself. +The animations that are triggered within ngModel are similar to how they work in ngClass and +animations can be hooked into using CSS transitions, keyframes as well as JS animations.

+

The following example shows a simple way to utilize CSS transitions to style an input element +that has been rendered as invalid after it has been validated:

+
+//be sure to include ngAnimate as a module to hook into more
+//advanced animations
+.my-input {
+  transition:0.5s linear all;
+  background: white;
+}
+.my-input.ng-invalid {
+  background: red;
+  color:white;
+}
+
+
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 1.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-model>
    ...
    </ng-model>
    +
  • +
  • as attribute: +
    <input>
    ...
    </input>
    +
  • + +
+ + + + +

Examples

+ +

+ + +
+ + +
+
<script>
 angular.module('inputExample', [])
   .controller('ExampleController', ['$scope', function($scope) {
     $scope.val = '1';
   }]);
</script>
<style>
  .my-input {
    transition:all linear 0.5s;
    background: transparent;
  }
  .my-input.ng-invalid {
    color:white;
    background: red;
  }
</style>
<p id="inputDescription">
 Update input to see transitions when valid/invalid.
 Integer is a valid value.
</p>
<form name="testForm" ng-controller="ExampleController">
  <input ng-model="val" ng-pattern="/^\d+$/" name="anim" class="my-input"
         aria-describedby="inputDescription" />
</form>
+
+ + + +
+
+ + +

+

Binding to a getter/setter

+

Sometimes it's helpful to bind ngModel to a getter/setter function. A getter/setter is a +function that returns a representation of the model when called with zero arguments, and sets +the internal state of a model when called with an argument. It's sometimes useful to use this +for models that have an internal representation that's different from what the model exposes +to the view.

+
+Best Practice: It's best to keep getters fast because Angular is likely to call them more +frequently than other parts of your code. +
+ +

You use this behavior by adding ng-model-options="{ getterSetter: true }" to an element that +has ng-model attached to it. You can also add ng-model-options="{ getterSetter: true }" to +a <form>, which will enable this behavior for all <input>s within it. See +ngModelOptions for more.

+

The following example shows how to use ngModel with a getter/setter:

+

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <form name="userForm">
    <label>Name:
      <input type="text" name="userName"
             ng-model="user.name"
             ng-model-options="{ getterSetter: true }" />
    </label>
  </form>
  <pre>user.name = <span ng-bind="user.name()"></span></pre>
</div>
+
+ +
+
angular.module('getterSetterExample', [])
.controller('ExampleController', ['$scope', function($scope) {
  var _name = 'Brian';
  $scope.user = {
    name: function(newName) {
     // Note that newName can be undefined for two reasons:
     // 1. Because it is called as a getter and thus called with no arguments
     // 2. Because the property should actually be set to undefined. This happens e.g. if the
     //    input is invalid
     return arguments.length ? (_name = newName) : _name;
    }
  };
}]);
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngModelOptions.html b/1.6.6/docs/partials/api/ng/directive/ngModelOptions.html new file mode 100644 index 000000000..38ef3e79e --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngModelOptions.html @@ -0,0 +1,290 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngModelOptions

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

This directive allows you to modify the behaviour of ngModel directives within your +application. You can specify an ngModelOptions directive on any element. All ngModel +directives will use the options of their nearest ngModelOptions ancestor.

+

The ngModelOptions settings are found by evaluating the value of the attribute directive as +an Angular expression. This expression should evaluate to an object, whose properties contain +the settings. For example: <div "ng-model-options"="{ debounce: 100 }".

+

Inheriting Options

+

You can specify that an ngModelOptions setting should be inherited from a parent ngModelOptions +directive by giving it the value of "$inherit". +Then it will inherit that setting from the first ngModelOptions directive found by traversing up the +DOM tree. If there is no ancestor element containing an ngModelOptions directive then default settings +will be used.

+

For example given the following fragment of HTML

+
<div ng-model-options="{ allowInvalid: true, debounce: 200 }">
+  <form ng-model-options="{ updateOn: 'blur', allowInvalid: '$inherit' }">
+    <input ng-model-options="{ updateOn: 'default', allowInvalid: '$inherit' }" />
+  </form>
+</div>
+
+

the input element will have the following settings

+
{ allowInvalid: true, updateOn: 'default', debounce: 0 }
+
+

Notice that the debounce setting was not inherited and used the default value instead.

+

You can specify that all undefined settings are automatically inherited from an ancestor by +including a property with key of "*" and value of "$inherit".

+

For example given the following fragment of HTML

+
<div ng-model-options="{ allowInvalid: true, debounce: 200 }">
+  <form ng-model-options="{ updateOn: 'blur', "*": '$inherit' }">
+    <input ng-model-options="{ updateOn: 'default', "*": '$inherit' }" />
+  </form>
+</div>
+
+

the input element will have the following settings

+
{ allowInvalid: true, updateOn: 'default', debounce: 200 }
+
+

Notice that the debounce setting now inherits the value from the outer <div> element.

+

If you are creating a reusable component then you should be careful when using "*": "$inherit" +since you may inadvertently inherit a setting in the future that changes the behavior of your component.

+

Triggering and debouncing model updates

+

The updateOn and debounce properties allow you to specify a custom list of events that will +trigger a model update and/or a debouncing delay so that the actual update only takes place when +a timer expires; this timer will be reset after another change takes place.

+

Given the nature of ngModelOptions, the value displayed inside input fields in the view might +be different from the value in the actual model. This means that if you update the model you +should also invoke ngModel.NgModelController on the relevant input field in +order to make sure it is synchronized with the model and that any debounced action is canceled.

+

The easiest way to reference the control's ngModel.NgModelController +method is by making sure the input is placed inside a form that has a name attribute. This is +important because form controllers are published to the related scope under the name in their +name attribute.

+

Any pending changes will take place immediately when an enclosing form is submitted via the +submit event. Note that ngClick events will occur before the model is updated. Use ngSubmit +to have access to the updated model.

+

The following example shows how to override immediate updates. Changes on the inputs within the +form will update the model only when the control loses focus (blur event). If escape key is +pressed while the input field is focused, the value is reset to the value in the current model.

+

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <form name="userForm">
    <label>
      Name:
      <input type="text" name="userName"
             ng-model="user.name"
             ng-model-options="{ updateOn: 'blur' }"
             ng-keyup="cancel($event)" />
    </label><br />
    <label>
      Other data:
      <input type="text" ng-model="user.data" />
    </label><br />
  </form>
  <pre>user.name = <span ng-bind="user.name"></span></pre>
</div>
+
+ +
+
angular.module('optionsExample', [])
.controller('ExampleController', ['$scope', function($scope) {
  $scope.user = { name: 'say', data: '' };

  $scope.cancel = function(e) {
    if (e.keyCode === 27) {
      $scope.userForm.userName.$rollbackViewValue();
    }
  };
}]);
+
+ +
+
var model = element(by.binding('user.name'));
var input = element(by.model('user.name'));
var other = element(by.model('user.data'));

it('should allow custom events', function() {
  input.sendKeys(' hello');
  input.click();
  expect(model.getText()).toEqual('say');
  other.click();
  expect(model.getText()).toEqual('say hello');
});

it('should $rollbackViewValue when model changes', function() {
  input.sendKeys(' hello');
  expect(input.getAttribute('value')).toEqual('say hello');
  input.sendKeys(protractor.Key.ESCAPE);
  expect(input.getAttribute('value')).toEqual('say');
  other.click();
  expect(model.getText()).toEqual('say');
});
+
+ + + +
+
+ + +

+

The next example shows how to debounce model changes. Model will be updated only 1 sec after last change. +If the Clear button is pressed, any debounced action is canceled and the value becomes empty.

+

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <form name="userForm">
    Name:
    <input type="text" name="userName"
           ng-model="user.name"
           ng-model-options="{ debounce: 1000 }" />
    <button ng-click="userForm.userName.$rollbackViewValue(); user.name=''">Clear</button><br />
  </form>
  <pre>user.name = <span ng-bind="user.name"></span></pre>
</div>
+
+ +
+
angular.module('optionsExample', [])
.controller('ExampleController', ['$scope', function($scope) {
  $scope.user = { name: 'say' };
}]);
+
+ + + +
+
+ + +

+

Model updates and validation

+

The default behaviour in ngModel is that the model value is set to undefined when the +validation determines that the value is invalid. By setting the allowInvalid property to true, +the model will still be updated even if the value is invalid.

+

Connecting to the scope

+

By setting the getterSetter property to true you are telling ngModel that the ngModel expression +on the scope refers to a "getter/setter" function rather than the value itself.

+

The following example shows how to bind to getter/setters:

+

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <form name="userForm">
    <label>
      Name:
      <input type="text" name="userName"
             ng-model="user.name"
             ng-model-options="{ getterSetter: true }" />
    </label>
  </form>
  <pre>user.name = <span ng-bind="user.name()"></span></pre>
</div>
+
+ +
+
angular.module('getterSetterExample', [])
.controller('ExampleController', ['$scope', function($scope) {
  var _name = 'Brian';
  $scope.user = {
    name: function(newName) {
      return angular.isDefined(newName) ? (_name = newName) : _name;
    }
  };
}]);
+
+ + + +
+
+ + +

+

Specifying timezones

+

You can specify the timezone that date/time input directives expect by providing its name in the +timezone property.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-model-options
      ng-model-options="Object">
    ...
    </ng-model-options>
    +
  • +
  • as attribute: +
    <ANY
      ng-model-options="Object">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngModelOptions + + + + Object + +

options to apply to ngModel directives on this element and + and its descendents. Valid keys are:

+
    +
  • updateOn: string specifying which event should the input be bound to. You can set several +events using an space delimited list. There is a special event called default that +matches the default events belonging to the control.
  • +
  • debounce: integer value which contains the debounce model update value in milliseconds. A +value of 0 triggers an immediate update. If an object is supplied instead, you can specify a +custom value for each event. For example:
    ng-model-options="{
    +  updateOn: 'default blur',
    +  debounce: { 'default': 500, 'blur': 0 }
    +}"
    +
    +
  • +
  • allowInvalid: boolean value which indicates that the model can be set with values that did +not validate correctly instead of the default behavior of setting the model to undefined.
  • +
  • getterSetter: boolean value which determines whether or not to treat functions bound to +ngModel as getters/setters.
  • +
  • timezone: Defines the timezone to be used to read/write the Date instance in the model for +<input type="date" />, <input type="time" />, ... . It understands UTC/GMT and the +continental US time zone abbreviations, but for general use, use a time zone offset, for +example, '+0430' (4 hours, 30 minutes east of the Greenwich meridian) +If not specified, the timezone of the browser will be used.
  • +
+ + +
+ +
+ + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngMousedown.html b/1.6.6/docs/partials/api/ng/directive/ngMousedown.html new file mode 100644 index 000000000..e7a3b5029 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngMousedown.html @@ -0,0 +1,122 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngMousedown

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

The ngMousedown directive allows you to specify custom behavior on mousedown event.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-mousedown
      ng-mousedown="expression">
    ...
    </ng-mousedown>
    +
  • +
  • as attribute: +
    <ANY
      ng-mousedown="expression">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngMousedown + + + + expression + +

Expression to evaluate upon +mousedown. (Event object is available as $event)

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<button ng-mousedown="count = count + 1" ng-init="count=0">
  Increment (on mouse down)
</button>
count: {{count}}
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngMouseenter.html b/1.6.6/docs/partials/api/ng/directive/ngMouseenter.html new file mode 100644 index 000000000..e0a996b43 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngMouseenter.html @@ -0,0 +1,122 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngMouseenter

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Specify custom behavior on mouseenter event.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-mouseenter
      ng-mouseenter="expression">
    ...
    </ng-mouseenter>
    +
  • +
  • as attribute: +
    <ANY
      ng-mouseenter="expression">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngMouseenter + + + + expression + +

Expression to evaluate upon +mouseenter. (Event object is available as $event)

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<button ng-mouseenter="count = count + 1" ng-init="count=0">
  Increment (when mouse enters)
</button>
count: {{count}}
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngMouseleave.html b/1.6.6/docs/partials/api/ng/directive/ngMouseleave.html new file mode 100644 index 000000000..e5c8ec28d --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngMouseleave.html @@ -0,0 +1,122 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngMouseleave

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Specify custom behavior on mouseleave event.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-mouseleave
      ng-mouseleave="expression">
    ...
    </ng-mouseleave>
    +
  • +
  • as attribute: +
    <ANY
      ng-mouseleave="expression">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngMouseleave + + + + expression + +

Expression to evaluate upon +mouseleave. (Event object is available as $event)

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<button ng-mouseleave="count = count + 1" ng-init="count=0">
  Increment (when mouse leaves)
</button>
count: {{count}}
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngMousemove.html b/1.6.6/docs/partials/api/ng/directive/ngMousemove.html new file mode 100644 index 000000000..32c31bb41 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngMousemove.html @@ -0,0 +1,122 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngMousemove

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Specify custom behavior on mousemove event.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-mousemove
      ng-mousemove="expression">
    ...
    </ng-mousemove>
    +
  • +
  • as attribute: +
    <ANY
      ng-mousemove="expression">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngMousemove + + + + expression + +

Expression to evaluate upon +mousemove. (Event object is available as $event)

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<button ng-mousemove="count = count + 1" ng-init="count=0">
  Increment (when mouse moves)
</button>
count: {{count}}
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngMouseover.html b/1.6.6/docs/partials/api/ng/directive/ngMouseover.html new file mode 100644 index 000000000..963139895 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngMouseover.html @@ -0,0 +1,122 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngMouseover

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Specify custom behavior on mouseover event.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-mouseover
      ng-mouseover="expression">
    ...
    </ng-mouseover>
    +
  • +
  • as attribute: +
    <ANY
      ng-mouseover="expression">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngMouseover + + + + expression + +

Expression to evaluate upon +mouseover. (Event object is available as $event)

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<button ng-mouseover="count = count + 1" ng-init="count=0">
  Increment (when mouse is over)
</button>
count: {{count}}
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngMouseup.html b/1.6.6/docs/partials/api/ng/directive/ngMouseup.html new file mode 100644 index 000000000..33a4cc6f2 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngMouseup.html @@ -0,0 +1,122 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngMouseup

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Specify custom behavior on mouseup event.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-mouseup
      ng-mouseup="expression">
    ...
    </ng-mouseup>
    +
  • +
  • as attribute: +
    <ANY
      ng-mouseup="expression">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngMouseup + + + + expression + +

Expression to evaluate upon +mouseup. (Event object is available as $event)

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<button ng-mouseup="count = count + 1" ng-init="count=0">
  Increment (on mouse up)
</button>
count: {{count}}
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngNonBindable.html b/1.6.6/docs/partials/api/ng/directive/ngNonBindable.html new file mode 100644 index 000000000..cee4e40db --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngNonBindable.html @@ -0,0 +1,99 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngNonBindable

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

The ngNonBindable directive tells Angular not to compile or bind the contents of the current +DOM element. This is useful if the element contains what appears to be Angular directives and +bindings but which should be ignored by Angular. This could be the case if you have a site that +displays snippets of code, for instance.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 1000.
  • + +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <ANY>
    ...
    </ANY>
    +
  • +
  • as CSS class: +
    <ANY class=""> ... </ANY>
    +
  • + +
+ + + + +

Examples

In this example there are two locations where a simple interpolation binding ({{}}) is present, +but the one wrapped in ngNonBindable is left alone.

+

+ +

+ + +
+ + +
+
<div>Normal: {{1 + 2}}</div>
<div ng-non-bindable>Ignored: {{1 + 2}}</div>
+
+ +
+
it('should check ng-non-bindable', function() {
  expect(element(by.binding('1 + 2')).getText()).toContain('3');
  expect(element.all(by.css('div')).last().getText()).toMatch(/1 \+ 2/);
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngOpen.html b/1.6.6/docs/partials/api/ng/directive/ngOpen.html new file mode 100644 index 000000000..ed884c7f8 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngOpen.html @@ -0,0 +1,130 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngOpen

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Sets the open attribute on the element, if the expression inside ngOpen is truthy.

+

A special directive is necessary because we cannot use interpolation inside the open +attribute. See the interpolation guide for more info.

+

A note about browser compatibility

+

Internet Explorer and Edge do not support the details element, it is +recommended to use ngShow and ngHide instead.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 100.
  • + +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <DETAILS
      ng-open="expression">
    ...
    </DETAILS>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngOpen + + + + expression + +

If the expression is truthy, + then special attribute "open" will be set on the element

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<label>Toggle details: <input type="checkbox" ng-model="open"></label><br/>
<details id="details" ng-open="open">
   <summary>List</summary>
   <ul>
     <li>Apple</li>
     <li>Orange</li>
     <li>Durian</li>
   </ul>
</details>
+
+ +
+
it('should toggle open', function() {
  expect(element(by.id('details')).getAttribute('open')).toBeFalsy();
  element(by.model('open')).click();
  expect(element(by.id('details')).getAttribute('open')).toBeTruthy();
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngOptions.html b/1.6.6/docs/partials/api/ng/directive/ngOptions.html new file mode 100644 index 000000000..1c4848ceb --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngOptions.html @@ -0,0 +1,323 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngOptions

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

The ngOptions attribute can be used to dynamically generate a list of <option> +elements for the <select> element using the array or object obtained by evaluating the +ngOptions comprehension expression.

+

In many cases, ngRepeat can be used on <option> elements instead of +ngOptions to achieve a similar result. However, ngOptions provides some benefits:

+
    +
  • more flexibility in how the <select>'s model is assigned via the select as part of the +comprehension expression
  • +
  • reduced memory consumption by not creating a new scope for each repeated instance
  • +
  • increased render speed by creating the options in a documentFragment instead of individually
  • +
+

When an item in the <select> menu is selected, the array element or object property +represented by the selected option will be bound to the model identified by the ngModel +directive.

+

Optionally, a single hard-coded <option> element, with the value set to an empty string, can +be nested into the <select> element. This element will then represent the null or "not selected" +option. See example below for demonstration.

+

Complex Models (objects or collections)

+

By default, ngModel watches the model by reference, not value. This is important to know when +binding the select to a model that is an object or a collection.

+

One issue occurs if you want to preselect an option. For example, if you set +the model to an object that is equal to an object in your collection, ngOptions won't be able to set the selection, +because the objects are not identical. So by default, you should always reference the item in your collection +for preselections, e.g.: $scope.selected = $scope.collection[3].

+

Another solution is to use a track by clause, because then ngOptions will track the identity +of the item not by reference, but by the result of the track by expression. For example, if your +collection items have an id property, you would track by item.id.

+

A different issue with objects or collections is that ngModel won't detect if an object property or +a collection item changes. For that reason, ngOptions additionally watches the model using +$watchCollection, when the expression contains a track by clause or the the select has the multiple attribute. +This allows ngOptions to trigger a re-rendering of the options even if the actual object/collection +has not changed identity, but only a property on the object or an item in the collection changes.

+

Note that $watchCollection does a shallow comparison of the properties of the object (or the items in the collection +if the model is an array). This means that changing a property deeper than the first level inside the +object/collection will not trigger a re-rendering.

+

select as

+

Using select as will bind the result of the select expression to the model, but +the value of the <select> and <option> html elements will be either the index (for array data sources) +or property name (for object data sources) of the value within the collection. If a track by expression +is used, the result of that expression will be set as the value of the option and select elements.

+

select as and track by

+
+Be careful when using select as and track by in the same expression. +
+ +

Given this array of items on the $scope:

+
$scope.items = [{
+  id: 1,
+  label: 'aLabel',
+  subItem: { name: 'aSubItem' }
+}, {
+  id: 2,
+  label: 'bLabel',
+  subItem: { name: 'bSubItem' }
+}];
+
+

This will work:

+
<select ng-options="item as item.label for item in items track by item.id" ng-model="selected"></select>
+
+
$scope.selected = $scope.items[0];
+
+

but this will not work:

+
<select ng-options="item.subItem as item.label for item in items track by item.id" ng-model="selected"></select>
+
+
$scope.selected = $scope.items[0].subItem;
+
+

In both examples, the track by expression is applied successfully to each item in the +items array. Because the selected option has been set programmatically in the controller, the +track by expression is also applied to the ngModel value. In the first example, the +ngModel value is items[0] and the track by expression evaluates to items[0].id with +no issue. In the second example, the ngModel value is items[0].subItem and the track by +expression evaluates to items[0].subItem.id (which is undefined). As a result, the model value +is not matched against any <option> and the <select> appears as having no selected value.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <ANY
      ng-model="string"
      ng-options="comprehension_expression"
      [name="string"]
      [required="string"]
      [ng-required="string"]
      [ng-attr-size="string"]>
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngModel + + + + string + +

Assignable AngularJS expression to data-bind to.

+ + +
+ ngOptions + + + + comprehension_expression + +

in one of the following forms:

+
    +
  • for array data sources:
      +
    • label for value in array
    • +
    • select as label for value in array
    • +
    • label group by group for value in array
    • +
    • label disable when disable for value in array
    • +
    • label group by group for value in array track by trackexpr
    • +
    • label disable when disable for value in array track by trackexpr
    • +
    • label for value in array | orderBy:orderexpr track by trackexpr + (for including a filter with track by)
    • +
    +
  • +
  • for object data sources:
      +
    • label for (key , value) in object
    • +
    • select as label for (key , value) in object
    • +
    • label group by group for (key, value) in object
    • +
    • label disable when disable for (key, value) in object
    • +
    • select as label group by group + for (key, value) in object
    • +
    • select as label disable when disable + for (key, value) in object
    • +
    +
  • +
+

Where:

+
    +
  • array / object: an expression which evaluates to an array / object to iterate over.
  • +
  • value: local variable which will refer to each item in the array or each property value + of object during iteration.
  • +
  • key: local variable which will refer to a property name in object during iteration.
  • +
  • label: The result of this expression will be the label for <option> element. The +expression will most likely refer to the value variable (e.g. value.propertyName).
  • +
  • select: The result of this expression will be bound to the model of the parent <select> + element. If not specified, select expression will default to value.
  • +
  • group: The result of this expression will be used to group options using the <optgroup> + DOM element.
  • +
  • disable: The result of this expression will be used to disable the rendered <option> + element. Return true to disable.
  • +
  • trackexpr: Used when working with an array of objects. The result of this expression will be + used to identify the objects in the array. The trackexpr will most likely refer to the +value variable (e.g. value.propertyName). With this the selection is preserved + even when the options are recreated (e.g. reloaded from the server).
  • +
+ + +
+ name + +
(optional)
+
+ string + +

Property name of the form under which the control is published.

+ + +
+ required + +
(optional)
+
+ string + +

The control is considered valid only if value is entered.

+ + +
+ ngRequired + +
(optional)
+
+ string + +

Adds required attribute and required validation constraint to + the element when the ngRequired expression evaluates to true. Use ngRequired instead of + required when you want to data-bind to the required attribute.

+ + +
+ ngAttrSize + +
(optional)
+
+ string + +

sets the size of the select element dynamically. Uses the +ngAttr directive.

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
angular.module('selectExample', [])
  .controller('ExampleController', ['$scope', function($scope) {
    $scope.colors = [
      {name:'black', shade:'dark'},
      {name:'white', shade:'light', notAnOption: true},
      {name:'red', shade:'dark'},
      {name:'blue', shade:'dark', notAnOption: true},
      {name:'yellow', shade:'light', notAnOption: false}
    ];
    $scope.myColor = $scope.colors[2]; // red
  }]);
</script>
<div ng-controller="ExampleController">
  <ul>
    <li ng-repeat="color in colors">
      <label>Name: <input ng-model="color.name"></label>
      <label><input type="checkbox" ng-model="color.notAnOption"> Disabled?</label>
      <button ng-click="colors.splice($index, 1)" aria-label="Remove">X</button>
    </li>
    <li>
      <button ng-click="colors.push({})">add</button>
    </li>
  </ul>
  <hr/>
  <label>Color (null not allowed):
    <select ng-model="myColor" ng-options="color.name for color in colors"></select>
  </label><br/>
  <label>Color (null allowed):
  <span  class="nullable">
    <select ng-model="myColor" ng-options="color.name for color in colors">
      <option value="">-- choose color --</option>
    </select>
  </span></label><br/>

  <label>Color grouped by shade:
    <select ng-model="myColor" ng-options="color.name group by color.shade for color in colors">
    </select>
  </label><br/>

  <label>Color grouped by shade, with some disabled:
    <select ng-model="myColor"
          ng-options="color.name group by color.shade disable when color.notAnOption for color in colors">
    </select>
  </label><br/>



  Select <button ng-click="myColor = { name:'not in list', shade: 'other' }">bogus</button>.
  <br/>
  <hr/>
  Currently selected: {{ {selected_color:myColor} }}
  <div style="border:solid 1px black; height:20px"
       ng-style="{'background-color':myColor.name}">
  </div>
</div>
+
+ +
+
it('should check ng-options', function() {
  expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('red');
  element.all(by.model('myColor')).first().click();
  element.all(by.css('select[ng-model="myColor"] option')).first().click();
  expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('black');
  element(by.css('.nullable select[ng-model="myColor"]')).click();
  element.all(by.css('.nullable select[ng-model="myColor"] option')).first().click();
  expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('null');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngPaste.html b/1.6.6/docs/partials/api/ng/directive/ngPaste.html new file mode 100644 index 000000000..95635cf9e --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngPaste.html @@ -0,0 +1,122 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngPaste

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Specify custom behavior on paste event.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-paste
      ng-paste="expression">
    ...
    </ng-paste>
    +
  • +
  • as attribute: +
    <window, input, select, textarea, a
      ng-paste="expression">
    ...
    </window, input, select, textarea, a>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngPaste + + + + expression + +

Expression to evaluate upon +paste. (Event object is available as $event)

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<input ng-paste="paste=true" ng-init="paste=false" placeholder='paste here'>
pasted: {{paste}}
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngPattern.html b/1.6.6/docs/partials/api/ng/directive/ngPattern.html new file mode 100644 index 000000000..ef8ed476b --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngPattern.html @@ -0,0 +1,124 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngPattern

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

ngPattern adds the pattern validator to ngModel. +It is most often used for text-based input controls, but can also be applied to custom text-based controls.

+

The validator sets the pattern error key if the ngModel.$viewValue +does not match a RegExp which is obtained by evaluating the Angular expression given in the +ngPattern attribute value:

+
    +
  • If the expression evaluates to a RegExp object, then this is used directly.
  • +
  • If the expression evaluates to a string, then it will be converted to a RegExp after wrapping it +in ^ and $ characters. For instance, "abc" will be converted to new RegExp('^abc$').
  • +
+
+Note: Avoid using the g flag on the RegExp, as it will cause each successive search to +start at the index of the last search's match, thus not taking the whole input value into +account. +
+ +
+Note: This directive is also added when the plain pattern attribute is used, with two +differences: +
    +
  1. + ngPattern does not set the pattern attribute and therefore HTML5 constraint validation is + not available. +
  2. +
  3. + The ngPattern attribute must be an expression, while the pattern value must be + interpolated. +
  4. +
+
+
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-pattern>
    ...
    </ng-pattern>
    +
  • +
  • as attribute: +
    <ANY>
    ...
    </ANY>
    +
  • + +
+ + + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('ngPatternExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.regex = '\\d+';
    }]);
</script>
<div ng-controller="ExampleController">
  <form name="form">
    <label for="regex">Set a pattern (regex string): </label>
    <input type="text" ng-model="regex" id="regex" />
    <br>
    <label for="input">This input is restricted by the current pattern: </label>
    <input type="text" ng-model="model" id="input" name="input" ng-pattern="regex" /><br>
    <hr>
    input valid? = <code>{{form.input.$valid}}</code><br>
    model = <code>{{model}}</code>
  </form>
</div>
+
+ +
+
var model = element(by.binding('model'));
var input = element(by.id('input'));

it('should validate the input with the default pattern', function() {
  input.sendKeys('aaa');
  expect(model.getText()).not.toContain('aaa');

  input.clear().then(function() {
    input.sendKeys('123');
    expect(model.getText()).toContain('123');
  });
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngPluralize.html b/1.6.6/docs/partials/api/ng/directive/ngPluralize.html new file mode 100644 index 000000000..114781068 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngPluralize.html @@ -0,0 +1,223 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngPluralize

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

ngPluralize is a directive that displays messages according to en-US localization rules. +These rules are bundled with angular.js, but can be overridden +(see Angular i18n dev guide). You configure ngPluralize directive +by specifying the mappings between +plural categories +and the strings to be displayed.

+

Plural categories and explicit number rules

+

There are two +plural categories +in Angular's default en-US locale: "one" and "other".

+

While a plural category may match many numbers (for example, in en-US locale, "other" can match +any number that is not 1), an explicit number rule can only match one number. For example, the +explicit number rule for "3" matches the number 3. There are examples of plural categories +and explicit number rules throughout the rest of this documentation.

+

Configuring ngPluralize

+

You configure ngPluralize by providing 2 attributes: count and when. +You can also provide an optional attribute, offset.

+

The value of the count attribute can be either a string or an Angular expression; these are evaluated on the current scope for its bound value.

+

The when attribute specifies the mappings between plural categories and the actual +string to be displayed. The value of the attribute should be a JSON object.

+

The following example shows how to configure ngPluralize:

+
<ng-pluralize count="personCount"
+                 when="{'0': 'Nobody is viewing.',
+                     'one': '1 person is viewing.',
+                     'other': '{} people are viewing.'}">
+</ng-pluralize>
+
+

In the example, "0: Nobody is viewing." is an explicit number rule. If you did not +specify this rule, 0 would be matched to the "other" category and "0 people are viewing" +would be shown instead of "Nobody is viewing". You can specify an explicit number rule for +other numbers, for example 12, so that instead of showing "12 people are viewing", you can +show "a dozen people are viewing".

+

You can use a set of closed braces ({}) as a placeholder for the number that you want substituted +into pluralized strings. In the previous example, Angular will replace {} with +{{personCount}}. The closed braces {} is a placeholder +for {{numberExpression}}.

+

If no rule is defined for a category, then an empty string is displayed and a warning is generated. +Note that some locales define more categories than one and other. For example, fr-fr defines few and many.

+

Configuring ngPluralize with offset

+

The offset attribute allows further customization of pluralized text, which can result in +a better user experience. For example, instead of the message "4 people are viewing this document", +you might display "John, Kate and 2 others are viewing this document". +The offset attribute allows you to offset a number by any desired value. +Let's take a look at an example:

+
<ng-pluralize count="personCount" offset=2
+              when="{'0': 'Nobody is viewing.',
+                     '1': '{{person1}} is viewing.',
+                     '2': '{{person1}} and {{person2}} are viewing.',
+                     'one': '{{person1}}, {{person2}} and one other person are viewing.',
+                     'other': '{{person1}}, {{person2}} and {} other people are viewing.'}">
+</ng-pluralize>
+
+

Notice that we are still using two plural categories(one, other), but we added +three explicit number rules 0, 1 and 2. +When one person, perhaps John, views the document, "John is viewing" will be shown. +When three people view the document, no explicit number rule is found, so +an offset of 2 is taken off 3, and Angular uses 1 to decide the plural category. +In this case, plural category 'one' is matched and "John, Mary and one other person are viewing" +is shown.

+

Note that when you specify offsets, you must provide explicit number rules for +numbers from 0 up to and including the offset. If you use an offset of 3, for example, +you must provide explicit number rules for 0, 1, 2 and 3. You must also provide plural strings for +plural categories "one" and "other".

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-pluralize
      count=""
      when="string"
      [offset="number"]>
    ...
    </ng-pluralize>
    +
  • +
  • as attribute: +
    <ANY
      count=""
      when="string"
      [offset="number"]>
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ count + + + + stringexpression + +

The variable to be bound to.

+ + +
+ when + + + + string + +

The mapping between plural category to its corresponding strings.

+ + +
+ offset + +
(optional)
+
+ number + +

Offset to deduct from the total number.

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('pluralizeExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.person1 = 'Igor';
      $scope.person2 = 'Misko';
      $scope.personCount = 1;
    }]);
</script>
<div ng-controller="ExampleController">
  <label>Person 1:<input type="text" ng-model="person1" value="Igor" /></label><br/>
  <label>Person 2:<input type="text" ng-model="person2" value="Misko" /></label><br/>
  <label>Number of People:<input type="text" ng-model="personCount" value="1" /></label><br/>

  <!--- Example with simple pluralization rules for en locale --->
  Without Offset:
  <ng-pluralize count="personCount"
                when="{'0': 'Nobody is viewing.',
                       'one': '1 person is viewing.',
                       'other': '{} people are viewing.'}">
  </ng-pluralize><br>

  <!--- Example with offset --->
  With Offset(2):
  <ng-pluralize count="personCount" offset=2
                when="{'0': 'Nobody is viewing.',
                       '1': '{{person1}} is viewing.',
                       '2': '{{person1}} and {{person2}} are viewing.',
                       'one': '{{person1}}, {{person2}} and one other person are viewing.',
                       'other': '{{person1}}, {{person2}} and {} other people are viewing.'}">
  </ng-pluralize>
</div>
+
+ +
+
it('should show correct pluralized string', function() {
  var withoutOffset = element.all(by.css('ng-pluralize')).get(0);
  var withOffset = element.all(by.css('ng-pluralize')).get(1);
  var countInput = element(by.model('personCount'));

  expect(withoutOffset.getText()).toEqual('1 person is viewing.');
  expect(withOffset.getText()).toEqual('Igor is viewing.');

  countInput.clear();
  countInput.sendKeys('0');

  expect(withoutOffset.getText()).toEqual('Nobody is viewing.');
  expect(withOffset.getText()).toEqual('Nobody is viewing.');

  countInput.clear();
  countInput.sendKeys('2');

  expect(withoutOffset.getText()).toEqual('2 people are viewing.');
  expect(withOffset.getText()).toEqual('Igor and Misko are viewing.');

  countInput.clear();
  countInput.sendKeys('3');

  expect(withoutOffset.getText()).toEqual('3 people are viewing.');
  expect(withOffset.getText()).toEqual('Igor, Misko and one other person are viewing.');

  countInput.clear();
  countInput.sendKeys('4');

  expect(withoutOffset.getText()).toEqual('4 people are viewing.');
  expect(withOffset.getText()).toEqual('Igor, Misko and 2 other people are viewing.');
});
it('should show data-bound names', function() {
  var withOffset = element.all(by.css('ng-pluralize')).get(1);
  var personCount = element(by.model('personCount'));
  var person1 = element(by.model('person1'));
  var person2 = element(by.model('person2'));
  personCount.clear();
  personCount.sendKeys('4');
  person1.clear();
  person1.sendKeys('Di');
  person2.clear();
  person2.sendKeys('Vojta');
  expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngReadonly.html b/1.6.6/docs/partials/api/ng/directive/ngReadonly.html new file mode 100644 index 000000000..b26157b38 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngReadonly.html @@ -0,0 +1,129 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngReadonly

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Sets the readonly attribute on the element, if the expression inside ngReadonly is truthy. +Note that readonly applies only to input elements with specific types. See the input docs on +MDN for more information.

+

A special directive is necessary because we cannot use interpolation inside the readonly +attribute. See the interpolation guide for more info.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 100.
  • + +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <INPUT
      ng-readonly="expression">
    ...
    </INPUT>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngReadonly + + + + expression + +

If the expression is truthy, + then special attribute "readonly" will be set on the element

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<label>Check me to make text readonly: <input type="checkbox" ng-model="checked"></label><br/>
<input type="text" ng-readonly="checked" value="I'm Angular" aria-label="Readonly field" />
+
+ +
+
it('should toggle readonly attr', function() {
  expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeFalsy();
  element(by.model('checked')).click();
  expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeTruthy();
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngRepeat.html b/1.6.6/docs/partials/api/ng/directive/ngRepeat.html new file mode 100644 index 000000000..fdf5b4e00 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngRepeat.html @@ -0,0 +1,388 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngRepeat

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

The ngRepeat directive instantiates a template once per item from a collection. Each template +instance gets its own scope, where the given loop variable is set to the current collection item, +and $index is set to the item index or key.

+

Special properties are exposed on the local scope of each template instance, including:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDetails
$indexnumberiterator offset of the repeated element (0..length-1)
$firstbooleantrue if the repeated element is first in the iterator.
$middlebooleantrue if the repeated element is between the first and last in the iterator.
$lastbooleantrue if the repeated element is last in the iterator.
$evenbooleantrue if the iterator position $index is even (otherwise false).
$oddbooleantrue if the iterator position $index is odd (otherwise false).
+
+ Creating aliases for these properties is possible with ngInit. + This may be useful when, for instance, nesting ngRepeats. +
+ + +

Iterating over object properties

+

It is possible to get ngRepeat to iterate over the properties of an object using the following +syntax:

+
<div ng-repeat="(key, value) in myObj"> ... </div>
+
+

However, there are a few limitations compared to array iteration:

+
    +
  • The JavaScript specification does not define the order of keys +returned for an object, so Angular relies on the order returned by the browser +when running for key in myObj. Browsers generally follow the strategy of providing +keys in the order in which they were defined, although there are exceptions when keys are deleted +and reinstated. See the +MDN page on delete for more info.

    +
  • +
  • ngRepeat will silently ignore object keys starting with $, because +it's a prefix used by Angular for public ($) and private ($$) properties.

    +
  • +
  • The built-in filters orderBy and filter do not work with +objects, and will throw an error if used with one.

    +
  • +
+

If you are hitting any of these limitations, the recommended workaround is to convert your object into an array +that is sorted into the order that you prefer before providing it to ngRepeat. You could +do this with a filter such as toArrayFilter +or implement a $watch on the object yourself.

+

Tracking and Duplicates

+

ngRepeat uses $watchCollection to detect changes in +the collection. When a change happens, ngRepeat then makes the corresponding changes to the DOM:

+
    +
  • When an item is added, a new instance of the template is added to the DOM.
  • +
  • When an item is removed, its template instance is removed from the DOM.
  • +
  • When items are reordered, their respective templates are reordered in the DOM.
  • +
+

To minimize creation of DOM elements, ngRepeat uses a function +to "keep track" of all items in the collection and their corresponding DOM elements. +For example, if an item is added to the collection, ngRepeat will know that all other items +already have DOM elements, and will not re-render them.

+

The default tracking function (which tracks items by their identity) does not allow +duplicate items in arrays. This is because when there are duplicates, it is not possible +to maintain a one-to-one mapping between collection items and DOM elements.

+

If you do need to repeat duplicate items, you can substitute the default tracking behavior +with your own using the track by expression.

+

For example, you may track items by the index of each item in the collection, using the +special scope property $index:

+
<div ng-repeat="n in [42, 42, 43, 43] track by $index">
+  {{n}}
+</div>
+
+

You may also use arbitrary expressions in track by, including references to custom functions +on the scope:

+
<div ng-repeat="n in [42, 42, 43, 43] track by myTrackingFunction(n)">
+  {{n}}
+</div>
+
+
+If you are working with objects that have a unique identifier property, you should track +by this identifier instead of the object instance. Should you reload your data later, ngRepeat +will not have to rebuild the DOM elements for items it has already rendered, even if the +JavaScript objects in the collection have been substituted for new ones. For large collections, +this significantly improves rendering performance. If you don't have a unique identifier, +track by $index can also provide a performance boost. +
+ +
<div ng-repeat="model in collection track by model.id">
+  {{model.name}}
+</div>
+
+


+
+Avoid using track by $index when the repeated template contains +one-time bindings. In such cases, the nth DOM +element will always be matched with the nth item of the array, so the bindings on that element +will not be updated even when the corresponding item changes, essentially causing the view to get +out-of-sync with the underlying data. +
+ +

When no track by expression is provided, it is equivalent to tracking by the built-in +$id function, which tracks items by their identity:

+
<div ng-repeat="obj in collection track by $id(obj)">
+  {{obj.prop}}
+</div>
+
+


+

+Note: track by must always be the last expression: +

+
<div ng-repeat="model in collection | orderBy: 'id' as filtered_result track by model.id">
+  {{model.name}}
+</div>
+
+

Special repeat start and end points

+

To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending +the range of the repeater by defining explicit start and end points by using ng-repeat-start and ng-repeat-end respectively. +The ng-repeat-start directive works the same as ng-repeat, but will repeat all the HTML code (including the tag it's defined on) +up to and including the ending HTML tag where ng-repeat-end is placed.

+

The example below makes use of this feature:

+
<header ng-repeat-start="item in items">
+  Header {{ item }}
+</header>
+<div class="body">
+  Body {{ item }}
+</div>
+<footer ng-repeat-end>
+  Footer {{ item }}
+</footer>
+
+

And with an input of ['A','B'] for the items variable in the example above, the output will evaluate to:

+
<header>
+  Header A
+</header>
+<div class="body">
+  Body A
+</div>
+<footer>
+  Footer A
+</footer>
+<header>
+  Header B
+</header>
+<div class="body">
+  Body B
+</div>
+<footer>
+  Footer B
+</footer>
+
+

The custom start and end points for ngRepeat also support all other HTML directive syntax flavors provided in AngularJS (such +as data-ng-repeat-start, x-ng-repeat-start and ng:repeat-start).

+ +
+ + + + +
+ + + +

Directive Info

+
    +
  • This directive creates new scope.
  • +
  • This directive executes at priority level 1000.
  • +
  • This directive can be used as multiElement
  • +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <ANY
      ng-repeat="repeat_expression">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngRepeat + + + + repeat_expression + +

The expression indicating how to enumerate a collection. These + formats are currently supported:

+
    +
  • variable in expression – where variable is the user defined loop variable and expression +is a scope expression giving the collection to enumerate.

    +

    For example: album in artist.albums.

    +
  • +
  • (key, value) in expression – where key and value can be any user defined identifiers, +and expression is the scope expression giving the collection to enumerate.

    +

    For example: (name, age) in {'adam':10, 'amalie':12}.

    +
  • +
  • variable in expression track by tracking_expression – You can also provide an optional tracking expression +which can be used to associate the objects in the collection with the DOM elements. If no tracking expression +is specified, ng-repeat associates elements by identity. It is an error to have +more than one tracking expression value resolve to the same key. (This would mean that two distinct objects are +mapped to the same DOM element, which is not possible.)

    +
    + Note: the track by expression must come last - after any filters, and the alias expression. +
    + +

    For example: item in items is equivalent to item in items track by $id(item). This implies that the DOM elements +will be associated by item identity in the array.

    +

    For example: item in items track by $id(item). A built in $id() function can be used to assign a unique +$$hashKey property to each item in the array. This property is then used as a key to associated DOM elements +with the corresponding item in the array by identity. Moving the same object in array would move the DOM +element in the same way in the DOM.

    +

    For example: item in items track by item.id is a typical pattern when the items come from the database. In this +case the object identity does not matter. Two objects are considered equivalent as long as their id +property is same.

    +

    For example: item in items | filter:searchText track by item.id is a pattern that might be used to apply a filter +to items in conjunction with a tracking expression.

    +
  • +
  • variable in expression as alias_expression – You can also provide an optional alias expression which will then store the +intermediate results of the repeater after the filters have been applied. Typically this is used to render a special message +when a filter is active on the repeater, but the filtered result set is empty.

    +

    For example: item in items | filter:x as results will store the fragment of the repeated items as results, but only after +the items have been processed through the filter.

    +

    Please note that `as [variable name] is not an operator but rather a part of ngRepeat micro-syntax so it can be used only at the end +(and not as operator, inside an expression).

    +

    For example: item in items | filter : x | orderBy : order | limitTo : limit as results .

    +
  • +
+ + +
+ +
+ +

Animations

+ + + + + + + + + + + + + + + + + + + + + +
AnimationOccurs
enterwhen a new item is added to the list or when an item is revealed after a filter
leavewhen an item is removed from the list or when an item is filtered out
movewhen an adjacent item is filtered out causing a reorder or when the item contents are reordered
+

See the example below for defining CSS animations with ngRepeat.

+ + Click here to learn more about the steps involved in the animation. + + +

Examples

This example uses ngRepeat to display a list of people. A filter is used to restrict the displayed +results by name or by age. New (entering) and removed (leaving) items are animated. + + +

+ + +
+ + +
+
<div ng-controller="repeatController">
  I have {{friends.length}} friends. They are:
  <input type="search" ng-model="q" placeholder="filter friends..." aria-label="filter friends" />
  <ul class="example-animate-container">
    <li class="animate-repeat" ng-repeat="friend in friends | filter:q as results">
      [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old.
    </li>
    <li class="animate-repeat" ng-if="results.length === 0">
      <strong>No results found...</strong>
    </li>
  </ul>
</div>
+
+ +
+
angular.module('ngRepeat', ['ngAnimate']).controller('repeatController', function($scope) {
  $scope.friends = [
    {name:'John', age:25, gender:'boy'},
    {name:'Jessie', age:30, gender:'girl'},
    {name:'Johanna', age:28, gender:'girl'},
    {name:'Joy', age:15, gender:'girl'},
    {name:'Mary', age:28, gender:'girl'},
    {name:'Peter', age:95, gender:'boy'},
    {name:'Sebastian', age:50, gender:'boy'},
    {name:'Erika', age:27, gender:'girl'},
    {name:'Patrick', age:40, gender:'boy'},
    {name:'Samantha', age:60, gender:'girl'}
  ];
});
+
+ +
+
.example-animate-container {
  background:white;
  border:1px solid black;
  list-style:none;
  margin:0;
  padding:0 10px;
}

.animate-repeat {
  line-height:30px;
  list-style:none;
  box-sizing:border-box;
}

.animate-repeat.ng-move,
.animate-repeat.ng-enter,
.animate-repeat.ng-leave {
  transition:all linear 0.5s;
}

.animate-repeat.ng-leave.ng-leave-active,
.animate-repeat.ng-move,
.animate-repeat.ng-enter {
  opacity:0;
  max-height:0;
}

.animate-repeat.ng-leave,
.animate-repeat.ng-move.ng-move-active,
.animate-repeat.ng-enter.ng-enter-active {
  opacity:1;
  max-height:30px;
}
+
+ +
+
var friends = element.all(by.repeater('friend in friends'));

it('should render initial data set', function() {
  expect(friends.count()).toBe(10);
  expect(friends.get(0).getText()).toEqual('[1] John who is 25 years old.');
  expect(friends.get(1).getText()).toEqual('[2] Jessie who is 30 years old.');
  expect(friends.last().getText()).toEqual('[10] Samantha who is 60 years old.');
  expect(element(by.binding('friends.length')).getText())
      .toMatch("I have 10 friends. They are:");
});

 it('should update repeater when filter predicate changes', function() {
   expect(friends.count()).toBe(10);

   element(by.model('q')).sendKeys('ma');

   expect(friends.count()).toBe(2);
   expect(friends.get(0).getText()).toEqual('[1] Mary who is 28 years old.');
   expect(friends.last().getText()).toEqual('[2] Samantha who is 60 years old.');
 });
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngRequired.html b/1.6.6/docs/partials/api/ng/directive/ngRequired.html new file mode 100644 index 000000000..3fbcb3afe --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngRequired.html @@ -0,0 +1,103 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngRequired

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

ngRequired adds the required validator to ngModel. +It is most often used for input and select controls, but can also be +applied to custom controls.

+

The directive sets the required attribute on the element if the Angular expression inside +ngRequired evaluates to true. A special directive for setting required is necessary because we +cannot use interpolation inside required. See the interpolation guide +for more info.

+

The validator will set the required error key to true if the required attribute is set and +calling NgModelController.$isEmpty with the +ngModel.$viewValue returns true. For example, the +$isEmpty() implementation for input[text] checks the length of the $viewValue. When developing +custom controls, $isEmpty() can be overwritten to account for a $viewValue that is not string-based.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <ANY>
    ...
    </ANY>
    +
  • + +
+ + + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('ngRequiredExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.required = true;
    }]);
</script>
<div ng-controller="ExampleController">
  <form name="form">
    <label for="required">Toggle required: </label>
    <input type="checkbox" ng-model="required" id="required" />
    <br>
    <label for="input">This input must be filled if `required` is true: </label>
    <input type="text" ng-model="model" id="input" name="input" ng-required="required" /><br>
    <hr>
    required error set? = <code>{{form.input.$error.required}}</code><br>
    model = <code>{{model}}</code>
  </form>
</div>
+
+ +
+
var required = element(by.binding('form.input.$error.required'));
var model = element(by.binding('model'));
var input = element(by.id('input'));

it('should set the required error', function() {
  expect(required.getText()).toContain('true');

  input.sendKeys('123');
  expect(required.getText()).not.toContain('true');
  expect(model.getText()).toContain('123');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngSelected.html b/1.6.6/docs/partials/api/ng/directive/ngSelected.html new file mode 100644 index 000000000..671b56500 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngSelected.html @@ -0,0 +1,132 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngSelected

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Sets the selected attribute on the element, if the expression inside ngSelected is truthy.

+

A special directive is necessary because we cannot use interpolation inside the selected +attribute. See the interpolation guide for more info.

+
+ Note: ngSelected does not interact with the select and ngModel directives, it only + sets the selected attribute on the element. If you are using ngModel on the select, you + should not use ngSelected on the options, as ngModel will set the select value and + selected options. +
+
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 100.
  • + +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <OPTION
      ng-selected="expression">
    ...
    </OPTION>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngSelected + + + + expression + +

If the expression is truthy, + then special attribute "selected" will be set on the element

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<label>Check me to select: <input type="checkbox" ng-model="selected"></label><br/>
<select aria-label="ngSelected demo">
  <option>Hello!</option>
  <option id="greet" ng-selected="selected">Greetings!</option>
</select>
+
+ +
+
it('should select Greetings!', function() {
  expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy();
  element(by.model('selected')).click();
  expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy();
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngShow.html b/1.6.6/docs/partials/api/ng/directive/ngShow.html new file mode 100644 index 000000000..6df629d32 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngShow.html @@ -0,0 +1,258 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngShow

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

The ngShow directive shows or hides the given HTML element based on the expression provided to +the ngShow attribute.

+

The element is shown or hidden by removing or adding the .ng-hide CSS class onto the element. +The .ng-hide CSS class is predefined in AngularJS and sets the display style to none (using an +!important flag). For CSP mode please add angular-csp.css to your HTML file (see +ngCsp).

+
<!-- when $scope.myValue is truthy (element is visible) -->
+<div ng-show="myValue"></div>
+
+<!-- when $scope.myValue is falsy (element is hidden) -->
+<div ng-show="myValue" class="ng-hide"></div>
+
+

When the ngShow expression evaluates to a falsy value then the .ng-hide CSS class is added +to the class attribute on the element causing it to become hidden. When truthy, the .ng-hide +CSS class is removed from the element causing the element not to appear hidden.

+

Why is !important used?

+

You may be wondering why !important is used for the .ng-hide CSS class. This is because the +.ng-hide selector can be easily overridden by heavier selectors. For example, something as +simple as changing the display style on a HTML list item would make hidden elements appear +visible. This also becomes a bigger issue when dealing with CSS frameworks.

+

By using !important, the show and hide behavior will work as expected despite any clash between +CSS selector specificity (when !important isn't used with any conflicting styles). If a +developer chooses to override the styling to change how to hide an element then it is just a +matter of using !important in their own CSS code.

+

Overriding .ng-hide

+

By default, the .ng-hide class will style the element with display: none !important. If you +wish to change the hide behavior with ngShow/ngHide, you can simply overwrite the styles for +the .ng-hide CSS class. Note that the selector that needs to be used is actually +.ng-hide:not(.ng-hide-animate) to cope with extra animation classes that can be added.

+
.ng-hide:not(.ng-hide-animate) {
+  /* These are just alternative ways of hiding an element */
+  display: block!important;
+  position: absolute;
+  top: -9999px;
+  left: -9999px;
+}
+
+

By default you don't need to override anything in CSS and the animations will work around the +display style.

+

A note about animations with ngShow

+

Animations in ngShow/ngHide work with the show and hide events that are triggered when the +directive expression is true and false. This system works like the animation system present with +ngClass except that you must also include the !important flag to override the display +property so that the elements are not actually hidden during the animation.

+
/* A working example can be found at the bottom of this page. */
+.my-element.ng-hide-add, .my-element.ng-hide-remove {
+  transition: all 0.5s linear;
+}
+
+.my-element.ng-hide-add { ... }
+.my-element.ng-hide-add.ng-hide-add-active { ... }
+.my-element.ng-hide-remove { ... }
+.my-element.ng-hide-remove.ng-hide-remove-active { ... }
+
+

Keep in mind that, as of AngularJS version 1.3, there is no need to change the display property +to block during animation states - ngAnimate will automatically handle the style toggling for you.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • +
  • This directive can be used as multiElement
  • +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-show
      ng-show="expression">
    ...
    </ng-show>
    +
  • +
  • as attribute: +
    <ANY
      ng-show="expression">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngShow + + + + expression + +

If the expression is truthy/falsy then the + element is shown/hidden respectively.

+ + +
+ +
+ +

Animations

+ + + + + + + + + + + + + + + + + +
AnimationOccurs
addClass .ng-hideAfter the ngShow expression evaluates to a non truthy value and just before the contents are set to hidden.
removeClass .ng-hideAfter the ngShow expression evaluates to a truthy value and just before contents are set to visible.
+ + Click here to learn more about the steps involved in the animation. + + +

Examples

A simple example, animating the element's opacity:

+

+ +

+ + +
+ + +
+
Show: <input type="checkbox" ng-model="checked" aria-label="Toggle ngShow"><br />
<div class="check-element animate-show-hide" ng-show="checked">
  I show up when your checkbox is checked.
</div>
+
+ +
+
.animate-show-hide.ng-hide {
  opacity: 0;
}

.animate-show-hide.ng-hide-add,
.animate-show-hide.ng-hide-remove {
  transition: all linear 0.5s;
}

.check-element {
  border: 1px solid black;
  opacity: 1;
  padding: 10px;
}
+
+ +
+
it('should check ngShow', function() {
  var checkbox = element(by.model('checked'));
  var checkElem = element(by.css('.check-element'));

  expect(checkElem.isDisplayed()).toBe(false);
  checkbox.click();
  expect(checkElem.isDisplayed()).toBe(true);
});
+
+ + + +
+
+ + +

+

A more complex example, featuring different show/hide animations:

+

+ +

+ + +
+ + +
+
Show: <input type="checkbox" ng-model="checked" aria-label="Toggle ngShow"><br />
<div class="check-element funky-show-hide" ng-show="checked">
  I show up when your checkbox is checked.
</div>
+
+ +
+
body {
  overflow: hidden;
  perspective: 1000px;
}

.funky-show-hide.ng-hide-add {
  transform: rotateZ(0);
  transform-origin: right;
  transition: all 0.5s ease-in-out;
}

.funky-show-hide.ng-hide-add.ng-hide-add-active {
  transform: rotateZ(-135deg);
}

.funky-show-hide.ng-hide-remove {
  transform: rotateY(90deg);
  transform-origin: left;
  transition: all 0.5s ease;
}

.funky-show-hide.ng-hide-remove.ng-hide-remove-active {
  transform: rotateY(0);
}

.check-element {
  border: 1px solid black;
  opacity: 1;
  padding: 10px;
}
+
+ +
+
it('should check ngShow', function() {
  var checkbox = element(by.model('checked'));
  var checkElem = element(by.css('.check-element'));

  expect(checkElem.isDisplayed()).toBe(false);
  checkbox.click();
  expect(checkElem.isDisplayed()).toBe(true);
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngSrc.html b/1.6.6/docs/partials/api/ng/directive/ngSrc.html new file mode 100644 index 000000000..52f6ee3b0 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngSrc.html @@ -0,0 +1,101 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngSrc

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Using Angular markup like {{hash}} in a src attribute doesn't +work right: The browser will fetch from the URL with the literal +text {{hash}} until Angular replaces the expression inside +{{hash}}. The ngSrc directive solves this problem.

+

The buggy way to write it:

+
<img src="http://www.gravatar.com/avatar/{{hash}}" alt="Description"/>
+
+

The correct way to write it:

+
<img ng-src="http://www.gravatar.com/avatar/{{hash}}" alt="Description" />
+
+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 99.
  • + +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <IMG
      ng-src="template">
    ...
    </IMG>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngSrc + + + + template + +

any string which can contain {{}} markup.

+ + +
+ +
+ + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngSrcset.html b/1.6.6/docs/partials/api/ng/directive/ngSrcset.html new file mode 100644 index 000000000..85d327ffa --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngSrcset.html @@ -0,0 +1,101 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngSrcset

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Using Angular markup like {{hash}} in a srcset attribute doesn't +work right: The browser will fetch from the URL with the literal +text {{hash}} until Angular replaces the expression inside +{{hash}}. The ngSrcset directive solves this problem.

+

The buggy way to write it:

+
<img srcset="http://www.gravatar.com/avatar/{{hash}} 2x" alt="Description"/>
+
+

The correct way to write it:

+
<img ng-srcset="http://www.gravatar.com/avatar/{{hash}} 2x" alt="Description" />
+
+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 99.
  • + +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <IMG
      ng-srcset="template">
    ...
    </IMG>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngSrcset + + + + template + +

any string which can contain {{}} markup.

+ + +
+ +
+ + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngStyle.html b/1.6.6/docs/partials/api/ng/directive/ngStyle.html new file mode 100644 index 000000000..4294595a6 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngStyle.html @@ -0,0 +1,146 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngStyle

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

The ngStyle directive allows you to set CSS style on an HTML element conditionally.

+ +
+ + + +

Known Issues

+
+

You should not use interpolation in the value of the style +attribute, when using the ngStyle directive on the same element. +See here for more info.

+ +
+ + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <ANY
      ng-style="expression">
    ...
    </ANY>
    +
  • +
  • as CSS class: +
    <ANY class="ng-style: expression;"> ... </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngStyle + + + + expression + +

Expression which evals to an +object whose keys are CSS style names and values are corresponding values for those CSS +keys.

+

Since some CSS style names are not valid keys for an object, they must be quoted. +See the 'background-color' style in the example below.

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<input type="button" value="set color" ng-click="myStyle={color:'red'}">
<input type="button" value="set background" ng-click="myStyle={'background-color':'blue'}">
<input type="button" value="clear" ng-click="myStyle={}">
<br/>
<span ng-style="myStyle">Sample Text</span>
<pre>myStyle={{myStyle}}</pre>
+
+ +
+
span {
  color: black;
}
+
+ +
+
var colorSpan = element(by.css('span'));

it('should check ng-style', function() {
  expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');
  element(by.css('input[value=\'set color\']')).click();
  expect(colorSpan.getCssValue('color')).toBe('rgba(255, 0, 0, 1)');
  element(by.css('input[value=clear]')).click();
  expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngSubmit.html b/1.6.6/docs/partials/api/ng/directive/ngSubmit.html new file mode 100644 index 000000000..523dcaf0b --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngSubmit.html @@ -0,0 +1,138 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngSubmit

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Enables binding angular expressions to onsubmit events.

+

Additionally it prevents the default action (which for form means sending the request to the +server and reloading the current page), but only if the form does not contain action, +data-action, or x-action attributes.

+
+Warning: Be careful not to cause "double-submission" by using both the ngClick and +ngSubmit handlers together. See the +form directive documentation +for a detailed discussion of when ngSubmit may be triggered. +
+
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-submit
      ng-submit="expression">
    ...
    </ng-submit>
    +
  • +
  • as attribute: +
    <form
      ng-submit="expression">
    ...
    </form>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngSubmit + + + + expression + +

Expression to eval. +(Event object is available as $event)

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('submitExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.list = [];
      $scope.text = 'hello';
      $scope.submit = function() {
        if ($scope.text) {
          $scope.list.push(this.text);
          $scope.text = '';
        }
      };
    }]);
</script>
<form ng-submit="submit()" ng-controller="ExampleController">
  Enter text and hit enter:
  <input type="text" ng-model="text" name="text" />
  <input type="submit" id="submit" value="Submit" />
  <pre>list={{list}}</pre>
</form>
+
+ +
+
it('should check ng-submit', function() {
  expect(element(by.binding('list')).getText()).toBe('list=[]');
  element(by.css('#submit')).click();
  expect(element(by.binding('list')).getText()).toContain('hello');
  expect(element(by.model('text')).getAttribute('value')).toBe('');
});
it('should ignore empty strings', function() {
  expect(element(by.binding('list')).getText()).toBe('list=[]');
  element(by.css('#submit')).click();
  element(by.css('#submit')).click();
  expect(element(by.binding('list')).getText()).toContain('hello');
 });
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngSwitch.html b/1.6.6/docs/partials/api/ng/directive/ngSwitch.html new file mode 100644 index 000000000..f267bcb85 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngSwitch.html @@ -0,0 +1,193 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngSwitch

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

The ngSwitch directive is used to conditionally swap DOM structure on your template based on a scope expression. +Elements within ngSwitch but without ngSwitchWhen or ngSwitchDefault directives will be preserved at the location +as specified in the template.

+

The directive itself works similar to ngInclude, however, instead of downloading template code (or loading it +from the template cache), ngSwitch simply chooses one of the nested elements and makes it visible based on which element +matches the value obtained from the evaluated expression. In other words, you define a container element +(where you place the directive), place an expression on the on="..." attribute +(or the ng-switch="..." attribute), define any inner elements inside of the directive and place +a when attribute per element. The when attribute is used to inform ngSwitch which element to display when the on +expression is evaluated. If a matching expression is not found via a when attribute then an element with the default +attribute is displayed.

+
+Be aware that the attribute values to match against cannot be expressions. They are interpreted +as literal string values to match against. +For example, ng-switch-when="someVal" will match against the string "someVal" not against the +value of the expression $scope.someVal. +
+
+ + + + +
+ + + +

Directive Info

+
    +
  • This directive creates new scope.
  • +
  • This directive executes at priority level 1200.
  • + +
+ + +

Usage

+
+ +
<ANY ng-switch="expression">
+  <ANY ng-switch-when="matchValue1">...</ANY>
+  <ANY ng-switch-when="matchValue2">...</ANY>
+  <ANY ng-switch-default>...</ANY>
+</ANY>
+
+ + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngSwitch + | on + + + * + +

expression to match against ng-switch-when. +On child elements add:

+
    +
  • ngSwitchWhen: the case statement to match against. If match then this +case will be displayed. If the same match appears multiple times, all the +elements will be displayed. It is possible to associate multiple values to +the same ngSwitchWhen by defining the optional attribute +ngSwitchWhenSeparator. The separator will be used to split the value of +the ngSwitchWhen attribute into multiple tokens, and the element will show +if any of the ngSwitch evaluates to any of these tokens.
  • +
  • ngSwitchDefault: the default case when no other case match. If there +are multiple default cases, all of them will be displayed when no other +case match.
  • +
+ + +
+ +
+ +

Animations

+ + + + + + + + + + + + + + + + + +
AnimationOccurs
enterafter the ngSwitch contents change and the matched child element is placed inside the container
leaveafter the ngSwitch contents change and just before the former contents are removed from the DOM
+ + Click here to learn more about the steps involved in the animation. + + +

Examples

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <select ng-model="selection" ng-options="item for item in items">
  </select>
  <code>selection={{selection}}</code>
  <hr/>
  <div class="animate-switch-container"
    ng-switch on="selection">
      <div class="animate-switch" ng-switch-when="settings|options" ng-switch-when-separator="|">Settings Div</div>
      <div class="animate-switch" ng-switch-when="home">Home Span</div>
      <div class="animate-switch" ng-switch-default>default</div>
  </div>
</div>
+
+ +
+
angular.module('switchExample', ['ngAnimate'])
.controller('ExampleController', ['$scope', function($scope) {
  $scope.items = ['settings', 'home', 'options', 'other'];
  $scope.selection = $scope.items[0];
}]);
+
+ +
+
.animate-switch-container {
  position:relative;
  background:white;
  border:1px solid black;
  height:40px;
  overflow:hidden;
}

.animate-switch {
  padding:10px;
}

.animate-switch.ng-animate {
  transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;

  position:absolute;
  top:0;
  left:0;
  right:0;
  bottom:0;
}

.animate-switch.ng-leave.ng-leave-active,
.animate-switch.ng-enter {
  top:-50px;
}
.animate-switch.ng-leave,
.animate-switch.ng-enter.ng-enter-active {
  top:0;
}
+
+ +
+
var switchElem = element(by.css('[ng-switch]'));
var select = element(by.model('selection'));

it('should start in settings', function() {
  expect(switchElem.getText()).toMatch(/Settings Div/);
});
it('should change to home', function() {
  select.all(by.css('option')).get(1).click();
  expect(switchElem.getText()).toMatch(/Home Span/);
});
it('should change to settings via "options"', function() {
  select.all(by.css('option')).get(2).click();
  expect(switchElem.getText()).toMatch(/Settings Div/);
});
it('should select default', function() {
  select.all(by.css('option')).get(3).click();
  expect(switchElem.getText()).toMatch(/default/);
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngTransclude.html b/1.6.6/docs/partials/api/ng/directive/ngTransclude.html new file mode 100644 index 000000000..743084475 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngTransclude.html @@ -0,0 +1,217 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngTransclude

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.

+

You can specify that you want to insert a named transclusion slot, instead of the default slot, by providing the slot name +as the value of the ng-transclude or ng-transclude-slot attribute.

+

If the transcluded content is not empty (i.e. contains one or more DOM nodes, including whitespace text nodes), any existing +content of this element will be removed before the transcluded content is inserted. +If the transcluded content is empty (or only whitespace), the existing content is left intact. This lets you provide fallback +content in the case that no transcluded content is provided.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-transclude
      ng-transclude-slot="string">
    ...
    </ng-transclude>
    +
  • +
  • as attribute: +
    <ANY
      ng-transclude="string">
    ...
    </ANY>
    +
  • +
  • as CSS class: +
    <ANY class="ng-transclude: string;"> ... </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngTransclude + | ngTranscludeSlot + + + string + +

the name of the slot to insert at this point. If this is not provided, is empty + or its value is the same as the name of the attribute then the default slot is used.

+ + +
+ +
+ + + +

Examples

Basic transclusion

+

This example demonstrates basic transclusion of content into a component directive. + + +

+ + +
+ + +
+
<script>
  angular.module('transcludeExample', [])
   .directive('pane', function(){
      return {
        restrict: 'E',
        transclude: true,
        scope: { title:'@' },
        template: '<div style="border: 1px solid black;">' +
                    '<div style="background-color: gray">{{title}}</div>' +
                    '<ng-transclude></ng-transclude>' +
                  '</div>'
      };
  })
  .controller('ExampleController', ['$scope', function($scope) {
    $scope.title = 'Lorem Ipsum';
    $scope.text = 'Neque porro quisquam est qui dolorem ipsum quia dolor...';
  }]);
</script>
<div ng-controller="ExampleController">
  <input ng-model="title" aria-label="title"> <br/>
  <textarea ng-model="text" aria-label="text"></textarea> <br/>
  <pane title="{{title}}"><span>{{text}}</span></pane>
</div>
+
+ +
+
it('should have transcluded', function() {
  var titleElement = element(by.model('title'));
  titleElement.clear();
  titleElement.sendKeys('TITLE');
  var textElement = element(by.model('text'));
  textElement.clear();
  textElement.sendKeys('TEXT');
  expect(element(by.binding('title')).getText()).toEqual('TITLE');
  expect(element(by.binding('text')).getText()).toEqual('TEXT');
});
+
+ + + +
+
+ + +

+

Transclude fallback content

+

This example shows how to use NgTransclude with fallback content, that +is displayed if no transcluded content is provided.

+

+ +

+ + +
+ + +
+
<script>
angular.module('transcludeFallbackContentExample', [])
.directive('myButton', function(){
            return {
              restrict: 'E',
              transclude: true,
              scope: true,
              template: '<button style="cursor: pointer;">' +
                          '<ng-transclude>' +
                            '<b style="color: red;">Button1</b>' +
                          '</ng-transclude>' +
                        '</button>'
            };
        });
</script>
<!-- fallback button content -->
<my-button id="fallback"></my-button>
<!-- modified button content -->
<my-button id="modified">
  <i style="color: green;">Button2</i>
</my-button>
+
+ +
+
it('should have different transclude element content', function() {
  expect(element(by.id('fallback')).getText()).toBe('Button1');
  expect(element(by.id('modified')).getText()).toBe('Button2');
});
+
+ + + +
+
+ + +

+

Multi-slot transclusion

+

This example demonstrates using multi-slot transclusion in a component directive. + + +

+ + +
+ + +
+
<style>
  .title, .footer {
    background-color: gray
  }
</style>
<div ng-controller="ExampleController">
  <input ng-model="title" aria-label="title"> <br/>
  <textarea ng-model="text" aria-label="text"></textarea> <br/>
  <pane>
    <pane-title><a ng-href="{{link}}">{{title}}</a></pane-title>
    <pane-body><p>{{text}}</p></pane-body>
  </pane>
</div>
+
+ +
+
angular.module('multiSlotTranscludeExample', [])
 .directive('pane', function() {
    return {
      restrict: 'E',
      transclude: {
        'title': '?paneTitle',
        'body': 'paneBody',
        'footer': '?paneFooter'
      },
      template: '<div style="border: 1px solid black;">' +
                  '<div class="title" ng-transclude="title">Fallback Title</div>' +
                  '<div ng-transclude="body"></div>' +
                  '<div class="footer" ng-transclude="footer">Fallback Footer</div>' +
                '</div>'
    };
})
.controller('ExampleController', ['$scope', function($scope) {
  $scope.title = 'Lorem Ipsum';
  $scope.link = 'https://google.com';
  $scope.text = 'Neque porro quisquam est qui dolorem ipsum quia dolor...';
}]);
+
+ +
+
it('should have transcluded the title and the body', function() {
  var titleElement = element(by.model('title'));
  titleElement.clear();
  titleElement.sendKeys('TITLE');
  var textElement = element(by.model('text'));
  textElement.clear();
  textElement.sendKeys('TEXT');
  expect(element(by.css('.title')).getText()).toEqual('TITLE');
  expect(element(by.binding('text')).getText()).toEqual('TEXT');
  expect(element(by.css('.footer')).getText()).toEqual('Fallback Footer');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/ngValue.html b/1.6.6/docs/partials/api/ng/directive/ngValue.html new file mode 100644 index 000000000..ed9aaf496 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/ngValue.html @@ -0,0 +1,136 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngValue

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Binds the given expression to the value of the element.

+

It is mainly used on input[radio] and option elements, +so that when the element is selected, the ngModel of that element (or its +select parent element) is set to the bound value. It is especially useful +for dynamically generated lists using ngRepeat, as shown below.

+

It can also be used to achieve one-way binding of a given expression to an input element +such as an input[text] or a textarea, when that element does not use ngModel.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-value
      [ng-value="string"]>
    ...
    </ng-value>
    +
  • +
  • as attribute: +
    <input
      [ng-value="string"]>
    ...
    </input>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngValue + +
(optional)
+
+ string + +

angular expression, whose value will be bound to the value attribute +and value property of the element.

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
   angular.module('valueExample', [])
     .controller('ExampleController', ['$scope', function($scope) {
       $scope.names = ['pizza', 'unicorns', 'robots'];
       $scope.my = { favorite: 'unicorns' };
     }]);
</script>
 <form ng-controller="ExampleController">
   <h2>Which is your favorite?</h2>
     <label ng-repeat="name in names" for="{{name}}">
       {{name}}
       <input type="radio"
              ng-model="my.favorite"
              ng-value="name"
              id="{{name}}"
              name="favorite">
     </label>
   <div>You chose {{my.favorite}}</div>
 </form>
+
+ +
+
var favorite = element(by.binding('my.favorite'));

it('should initialize to model', function() {
  expect(favorite.getText()).toContain('unicorns');
});
it('should bind the values to the inputs', function() {
  element.all(by.model('my.favorite')).get(0).click();
  expect(favorite.getText()).toContain('pizza');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/script.html b/1.6.6/docs/partials/api/ng/directive/script.html new file mode 100644 index 000000000..3356e4f85 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/script.html @@ -0,0 +1,145 @@ + Improve this Doc + + + + +  View Source + + + +
+

script

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

Load the content of a <script> element into $templateCache, so that the +template can be used by ngInclude, +ngView, or directives. The type of the +<script> element must be specified as text/ng-template, and a cache name for the template must be +assigned through the element's id, which can then be used as a directive's templateUrl.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <script
      type="string"
      id="string">
    ...
    </script>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ type + + + + string + +

Must be set to 'text/ng-template'.

+ + +
+ id + + + + string + +

Cache name of the template.

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<script type="text/ng-template" id="/tpl.html">
  Content of the template.
</script>

<a ng-click="currentTpl='/tpl.html'" id="tpl-link">Load inlined template</a>
<div id="tpl-content" ng-include src="currentTpl"></div>
+
+ +
+
it('should load template defined inside script tag', function() {
  element(by.css('#tpl-link')).click();
  expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/);
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/select.html b/1.6.6/docs/partials/api/ng/directive/select.html new file mode 100644 index 000000000..a8a344aec --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/select.html @@ -0,0 +1,438 @@ + Improve this Doc + + + + +  View Source + + + +
+

select

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

HTML select element with angular data-binding.

+

The select directive is used together with ngModel to provide data-binding +between the scope and the <select> control (including setting default values). +It also handles dynamic <option> elements, which can be added using the ngRepeat or +ngOptions directives.

+

When an item in the <select> menu is selected, the value of the selected option will be bound +to the model identified by the ngModel directive. With static or repeated options, this is +the content of the value attribute or the textContent of the <option>, if the value attribute is missing. +Value and textContent can be interpolated.

+

The select controller exposes utility functions that can be used +to manipulate the select's behavior.

+

Matching model and option values

+

In general, the match between the model and an option is evaluated by strictly comparing the model +value against the value of the available options.

+

If you are setting the option value with the option's value attribute, or textContent, the +value will always be a string which means that the model value must also be a string. +Otherwise the select directive cannot match them correctly.

+

To bind the model to a non-string value, you can use one of the following strategies:

+
    +
  • the ngOptions directive +(select)
  • +
  • the ngValue directive, which allows arbitrary expressions to be +option values (Example)
  • +
  • model $parsers / $formatters to convert the string value +(Example)
  • +
+

If the viewValue of ngModel does not match any of the options, then the control +will automatically add an "unknown" option, which it then removes when the mismatch is resolved.

+

Optionally, a single hard-coded <option> element, with the value set to an empty string, can +be nested into the <select> element. This element will then represent the null or "not selected" +option. See example below for demonstration.

+

Choosing between ngRepeat and ngOptions

+

In many cases, ngRepeat can be used on <option> elements instead of ngOptions to achieve a similar result. However, ngOptions provides some benefits:

+
    +
  • more flexibility in how the <select>'s model is assigned via the select as part of the +comprehension expression
  • +
  • reduced memory consumption by not creating a new scope for each repeated instance
  • +
  • increased render speed by creating the options in a documentFragment instead of individually
  • +
+

Specifically, select with repeated options slows down significantly starting at 2000 options in +Chrome and Internet Explorer / Edge.

+ +
+ + + +

Known Issues

+
+

In Firefox, the select model is only updated when the select element is blurred. For example, +when switching between options with the keyboard, the select model is only set to the +currently selected option when the select is blurred, e.g via tab key or clicking the mouse +outside the select.

+

This is due to an ambiguity in the select element specification. See the +issue on the Firefox bug tracker +for more information, and this +Github comment for a workaround

+ +
+ + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <select
      ng-model="string"
      [name="string"]
      [multiple="string"]
      [required="string"]
      [ng-required="string"]
      [ng-change="string"]
      [ng-options="string"]
      [ng-attr-size="string"]>
    ...
    </select>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngModel + + + + string + +

Assignable angular expression to data-bind to.

+ + +
+ name + +
(optional)
+
+ string + +

Property name of the form under which the control is published.

+ + +
+ multiple + +
(optional)
+
+ string + +

Allows multiple options to be selected. The selected values will be + bound to the model as an array.

+ + +
+ required + +
(optional)
+
+ string + +

Sets required validation error key if the value is not entered.

+ + +
+ ngRequired + +
(optional)
+
+ string + +

Adds required attribute and required validation constraint to +the element when the ngRequired expression evaluates to true. Use ngRequired instead of required +when you want to data-bind to the required attribute.

+ + +
+ ngChange + +
(optional)
+
+ string + +

Angular expression to be executed when selected option(s) changes due to user + interaction with the select element.

+ + +
+ ngOptions + +
(optional)
+
+ string + +

sets the options that the select is populated with and defines what is +set on the model on selection. See ngOptions.

+ + +
+ ngAttrSize + +
(optional)
+
+ string + +

sets the size of the select element dynamically. Uses the +ngAttr directive.

+ + +
+ +
+ + + +

Examples

Simple select elements with static options

+

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <form name="myForm">
    <label for="singleSelect"> Single select: </label><br>
    <select name="singleSelect" ng-model="data.singleSelect">
      <option value="option-1">Option 1</option>
      <option value="option-2">Option 2</option>
    </select><br>

    <label for="singleSelect"> Single select with "not selected" option and dynamic option values: </label><br>
    <select name="singleSelect" id="singleSelect" ng-model="data.singleSelect">
      <option value="">---Please select---</option> <!-- not selected / blank option -->
      <option value="{{data.option1}}">Option 1</option> <!-- interpolation -->
      <option value="option-2">Option 2</option>
    </select><br>
    <button ng-click="forceUnknownOption()">Force unknown option</button><br>
    <tt>singleSelect = {{data.singleSelect}}</tt>

    <hr>
    <label for="multipleSelect"> Multiple select: </label><br>
    <select name="multipleSelect" id="multipleSelect" ng-model="data.multipleSelect" multiple>
      <option value="option-1">Option 1</option>
      <option value="option-2">Option 2</option>
      <option value="option-3">Option 3</option>
    </select><br>
    <tt>multipleSelect = {{data.multipleSelect}}</tt><br/>
  </form>
</div>
+
+ +
+
angular.module('staticSelect', [])
 .controller('ExampleController', ['$scope', function($scope) {
   $scope.data = {
    singleSelect: null,
    multipleSelect: [],
    option1: 'option-1'
   };

   $scope.forceUnknownOption = function() {
     $scope.data.singleSelect = 'nonsense';
   };
}]);
+
+ + + +
+
+ + +

+

Using ngRepeat to generate select options

+

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <form name="myForm">
    <label for="repeatSelect"> Repeat select: </label>
    <select name="repeatSelect" id="repeatSelect" ng-model="data.model">
      <option ng-repeat="option in data.availableOptions" value="{{option.id}}">{{option.name}}</option>
    </select>
  </form>
  <hr>
  <tt>model = {{data.model}}</tt><br/>
</div>
+
+ +
+
angular.module('ngrepeatSelect', [])
 .controller('ExampleController', ['$scope', function($scope) {
   $scope.data = {
    model: null,
    availableOptions: [
      {id: '1', name: 'Option A'},
      {id: '2', name: 'Option B'},
      {id: '3', name: 'Option C'}
    ]
   };
}]);
+
+ + + +
+
+ + +

+

Using ngValue to bind the model to an array of objects

+

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <form name="myForm">
    <label for="ngvalueselect"> ngvalue select: </label>
    <select size="6" name="ngvalueselect" ng-model="data.model" multiple>
      <option ng-repeat="option in data.availableOptions" ng-value="option.value">{{option.name}}</option>
    </select>
  </form>
  <hr>
  <pre>model = {{data.model | json}}</pre><br/>
</div>
+
+ +
+
angular.module('ngvalueSelect', [])
 .controller('ExampleController', ['$scope', function($scope) {
   $scope.data = {
    model: null,
    availableOptions: [
         {value: 'myString', name: 'string'},
         {value: 1, name: 'integer'},
         {value: true, name: 'boolean'},
         {value: null, name: 'null'},
         {value: {prop: 'value'}, name: 'object'},
         {value: ['a'], name: 'array'}
    ]
   };
}]);
+
+ + + +
+
+ + +

+

Using select with ngOptions and setting a default value

+

See the ngOptions documentation for more ngOptions usage examples.

+

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <form name="myForm">
    <label for="mySelect">Make a choice:</label>
    <select name="mySelect" id="mySelect"
      ng-options="option.name for option in data.availableOptions track by option.id"
      ng-model="data.selectedOption"></select>
  </form>
  <hr>
  <tt>option = {{data.selectedOption}}</tt><br/>
</div>
+
+ +
+
angular.module('defaultValueSelect', [])
 .controller('ExampleController', ['$scope', function($scope) {
   $scope.data = {
    availableOptions: [
      {id: '1', name: 'Option A'},
      {id: '2', name: 'Option B'},
      {id: '3', name: 'Option C'}
    ],
    selectedOption: {id: '3', name: 'Option C'} //This sets the default value of the select in the ui
    };
}]);
+
+ + + +
+
+ + +

+

Binding select to a non-string value via ngModel parsing / formatting

+

+ +

+ + +
+ + +
+
<select ng-model="model.id" convert-to-number>
  <option value="0">Zero</option>
  <option value="1">One</option>
  <option value="2">Two</option>
</select>
{{ model }}
+
+ +
+
angular.module('nonStringSelect', [])
.run(function($rootScope) {
  $rootScope.model = { id: 2 };
})
.directive('convertToNumber', function() {
  return {
    require: 'ngModel',
    link: function(scope, element, attrs, ngModel) {
      ngModel.$parsers.push(function(val) {
        return parseInt(val, 10);
      });
      ngModel.$formatters.push(function(val) {
        return '' + val;
      });
    }
  };
});
+
+ +
+
it('should initialize to model', function() {
  expect(element(by.model('model.id')).$('option:checked').getText()).toEqual('Two');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/directive/textarea.html b/1.6.6/docs/partials/api/ng/directive/textarea.html new file mode 100644 index 000000000..db246f9ec --- /dev/null +++ b/1.6.6/docs/partials/api/ng/directive/textarea.html @@ -0,0 +1,252 @@ + Improve this Doc + + + + +  View Source + + + +
+

textarea

+
    + +
  1. + - directive in module ng +
  2. +
+
+ + + + + +
+

HTML textarea element control with angular data-binding. The data-binding and validation +properties of this element are exactly the same as those of the +input element.

+ +
+ + + +

Known Issues

+
+

When specifying the placeholder attribute of <textarea>, Internet Explorer will temporarily +insert the placeholder value as the textarea's content. If the placeholder value contains +interpolation ({{ ... }}), an error will be logged in the console when Angular tries to update +the value of the by-then-removed text node. This doesn't affect the functionality of the +textarea, but can be undesirable.

+

You can work around this Internet Explorer issue by using ng-attr-placeholder instead of +placeholder on textareas, whenever you need interpolation in the placeholder value. You can +find more details on ngAttr in the +Interpolation section of the +Developer Guide.

+ +
+ + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <textarea
      ng-model="string"
      [name="string"]
      [required="string"]
      [ng-required="string"]
      [ng-minlength="number"]
      [ng-maxlength="number"]
      [ng-pattern="string"]
      [ng-change="string"]
      [ng-trim="boolean"]>
    ...
    </textarea>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngModel + + + + string + +

Assignable angular expression to data-bind to.

+ + +
+ name + +
(optional)
+
+ string + +

Property name of the form under which the control is published.

+ + +
+ required + +
(optional)
+
+ string + +

Sets required validation error key if the value is not entered.

+ + +
+ ngRequired + +
(optional)
+
+ string + +

Adds required attribute and required validation constraint to + the element when the ngRequired expression evaluates to true. Use ngRequired instead of + required when you want to data-bind to the required attribute.

+ + +
+ ngMinlength + +
(optional)
+
+ number + +

Sets minlength validation error key if the value is shorter than + minlength.

+ + +
+ ngMaxlength + +
(optional)
+
+ number + +

Sets maxlength validation error key if the value is longer than + maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any + length.

+ + +
+ ngPattern + +
(optional)
+
+ string + +

Sets pattern validation error key if the ngModel $viewValue + does not match a RegExp found by evaluating the Angular expression given in the attribute value. + If the expression evaluates to a RegExp object, then this is used directly. + If the expression evaluates to a string, then it will be converted to a RegExp + after wrapping it in ^ and $ characters. For instance, "abc" will be converted to + new RegExp('^abc$').
+ Note: Avoid using the g flag on the RegExp, as it will cause each successive search to + start at the index of the last search's match, thus not taking the whole input value into + account.

+ + +
+ ngChange + +
(optional)
+
+ string + +

Angular expression to be executed when input changes due to user + interaction with the input element.

+ + +
+ ngTrim + +
(optional)
+
+ boolean + +

If set to false Angular will not automatically trim the input.

+ +

(default: true)

+
+ +
+ + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/filter.html b/1.6.6/docs/partials/api/ng/filter.html new file mode 100644 index 000000000..a9cecbb57 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/filter.html @@ -0,0 +1,77 @@ + +

Filter components in ng

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
filter

Selects a subset of items from array and returns it as a new array.

+
currency

Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default +symbol for current locale is used.

+
number

Formats a number as text.

+
date

Formats date to a string based on the requested format.

+
json

Allows you to convert a JavaScript object into JSON string.

+
lowercase

Converts string to lowercase.

+
uppercase

Converts string to uppercase.

+
limitTo

Creates a new array or string containing only a specified number of elements. The elements are +taken from either the beginning or the end of the source array, string or number, as specified by +the value and sign (positive or negative) of limit. Other array-like objects are also supported +(e.g. array subclasses, NodeLists, jqLite/jQuery collections etc). If a number is used as input, +it is converted to a string.

+
orderBy

Returns an array containing the items from the specified collection, ordered by a comparator +function based on the values computed using the expression predicate.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ng/filter/currency.html b/1.6.6/docs/partials/api/ng/filter/currency.html new file mode 100644 index 000000000..119cb7396 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/filter/currency.html @@ -0,0 +1,159 @@ + Improve this Doc + + + + +  View Source + + + +
+

currency

+
    + +
  1. + - filter in module ng +
  2. +
+
+ + + + + +
+

Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default +symbol for current locale is used.

+ +
+ + + + +
+ + + +

Usage

+

In HTML Template Binding

+ +
{{ currency_expression | currency : symbol : fractionSize}}
+ + +

In JavaScript

+
$filter('currency')(amount, symbol, fractionSize)
+ + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ amount + + + + number + +

Input to filter.

+ + +
+ symbol + +
(optional)
+
+ string + +

Currency symbol or identifier to be displayed.

+ + +
+ fractionSize + +
(optional)
+
+ number + +

Number of decimal places to round the amount to, defaults to default max fraction size for current locale

+ + +
+ +
+ +

Returns

+ + + + + +
string

Formatted number.

+
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('currencyExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.amount = 1234.56;
    }]);
</script>
<div ng-controller="ExampleController">
  <input type="number" ng-model="amount" aria-label="amount"> <br>
  default currency symbol ($): <span id="currency-default">{{amount | currency}}</span><br>
  custom currency identifier (USD$): <span id="currency-custom">{{amount | currency:"USD$"}}</span><br>
  no fractions (0): <span id="currency-no-fractions">{{amount | currency:"USD$":0}}</span>
</div>
+
+ +
+
it('should init with 1234.56', function() {
  expect(element(by.id('currency-default')).getText()).toBe('$1,234.56');
  expect(element(by.id('currency-custom')).getText()).toBe('USD$1,234.56');
  expect(element(by.id('currency-no-fractions')).getText()).toBe('USD$1,235');
});
it('should update', function() {
  if (browser.params.browser === 'safari') {
    // Safari does not understand the minus key. See
    // https://github.com/angular/protractor/issues/481
    return;
  }
  element(by.model('amount')).clear();
  element(by.model('amount')).sendKeys('-1234');
  expect(element(by.id('currency-default')).getText()).toBe('-$1,234.00');
  expect(element(by.id('currency-custom')).getText()).toBe('-USD$1,234.00');
  expect(element(by.id('currency-no-fractions')).getText()).toBe('-USD$1,234');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/filter/date.html b/1.6.6/docs/partials/api/ng/filter/date.html new file mode 100644 index 000000000..956655bc5 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/filter/date.html @@ -0,0 +1,213 @@ + Improve this Doc + + + + +  View Source + + + +
+

date

+
    + +
  1. + - filter in module ng +
  2. +
+
+ + + + + +
+

Formats date to a string based on the requested format.

+

format string can be composed of the following elements:

+
    +
  • 'yyyy': 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010)
  • +
  • 'yy': 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)
  • +
  • 'y': 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199)
  • +
  • 'MMMM': Month in year (January-December)
  • +
  • 'MMM': Month in year (Jan-Dec)
  • +
  • 'MM': Month in year, padded (01-12)
  • +
  • 'M': Month in year (1-12)
  • +
  • 'LLLL': Stand-alone month in year (January-December)
  • +
  • 'dd': Day in month, padded (01-31)
  • +
  • 'd': Day in month (1-31)
  • +
  • 'EEEE': Day in Week,(Sunday-Saturday)
  • +
  • 'EEE': Day in Week, (Sun-Sat)
  • +
  • 'HH': Hour in day, padded (00-23)
  • +
  • 'H': Hour in day (0-23)
  • +
  • 'hh': Hour in AM/PM, padded (01-12)
  • +
  • 'h': Hour in AM/PM, (1-12)
  • +
  • 'mm': Minute in hour, padded (00-59)
  • +
  • 'm': Minute in hour (0-59)
  • +
  • 'ss': Second in minute, padded (00-59)
  • +
  • 's': Second in minute (0-59)
  • +
  • 'sss': Millisecond in second, padded (000-999)
  • +
  • 'a': AM/PM marker
  • +
  • 'Z': 4 digit (+sign) representation of the timezone offset (-1200-+1200)
  • +
  • 'ww': Week of year, padded (00-53). Week 01 is the week with the first Thursday of the year
  • +
  • 'w': Week of year (0-53). Week 1 is the week with the first Thursday of the year
  • +
  • 'G', 'GG', 'GGG': The abbreviated form of the era string (e.g. 'AD')
  • +
  • 'GGGG': The long form of the era string (e.g. 'Anno Domini')

    +

    format string can also be one of the following predefined +localizable formats:

    +
  • +
  • 'medium': equivalent to 'MMM d, y h:mm:ss a' for en_US locale +(e.g. Sep 3, 2010 12:05:08 PM)

    +
  • +
  • 'short': equivalent to 'M/d/yy h:mm a' for en_US locale (e.g. 9/3/10 12:05 PM)
  • +
  • 'fullDate': equivalent to 'EEEE, MMMM d, y' for en_US locale +(e.g. Friday, September 3, 2010)
  • +
  • 'longDate': equivalent to 'MMMM d, y' for en_US locale (e.g. September 3, 2010)
  • +
  • 'mediumDate': equivalent to 'MMM d, y' for en_US locale (e.g. Sep 3, 2010)
  • +
  • 'shortDate': equivalent to 'M/d/yy' for en_US locale (e.g. 9/3/10)
  • +
  • 'mediumTime': equivalent to 'h:mm:ss a' for en_US locale (e.g. 12:05:08 PM)
  • +
  • 'shortTime': equivalent to 'h:mm a' for en_US locale (e.g. 12:05 PM)

    +

    format string can contain literal values. These need to be escaped by surrounding with single quotes (e.g. +"h 'in the morning'"). In order to output a single quote, escape it - i.e., two single quotes in a sequence +(e.g. "h 'o''clock'").

    +

    Any other characters in the format string will be output as-is.

    +
  • +
+ +
+ + + + +
+ + + +

Usage

+

In HTML Template Binding

+ +
{{ date_expression | date : format : timezone}}
+ + +

In JavaScript

+
$filter('date')(date, format, timezone)
+ + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ date + + + + Datenumberstring + +

Date to format either as Date object, milliseconds (string or + number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its + shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is + specified in the string input, the time is considered to be in the local timezone.

+ + +
+ format + +
(optional)
+
+ string + +

Formatting rules (see Description). If not specified, + mediumDate is used.

+ + +
+ timezone + +
(optional)
+
+ string + +

Timezone to be used for formatting. It understands UTC/GMT and the + continental US time zone abbreviations, but for general use, use a time zone offset, for + example, '+0430' (4 hours, 30 minutes east of the Greenwich meridian) + If not specified, the timezone of the browser will be used.

+ + +
+ +
+ +

Returns

+ + + + + +
string

Formatted string or the input if input is not recognized as date/millis.

+
+ + + +

Examples

+ +

+ + +
+ + +
+
<span ng-non-bindable>{{1288323623006 | date:'medium'}}</span>:
    <span>{{1288323623006 | date:'medium'}}</span><br>
<span ng-non-bindable>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span>:
   <span>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span><br>
<span ng-non-bindable>{{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}</span>:
   <span>{{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}</span><br>
<span ng-non-bindable>{{1288323623006 | date:"MM/dd/yyyy 'at' h:mma"}}</span>:
   <span>{{'1288323623006' | date:"MM/dd/yyyy 'at' h:mma"}}</span><br>
+
+ +
+
it('should format date', function() {
  expect(element(by.binding("1288323623006 | date:'medium'")).getText()).
     toMatch(/Oct 2\d, 2010 \d{1,2}:\d{2}:\d{2} (AM|PM)/);
  expect(element(by.binding("1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'")).getText()).
     toMatch(/2010-10-2\d \d{2}:\d{2}:\d{2} (-|\+)?\d{4}/);
  expect(element(by.binding("'1288323623006' | date:'MM/dd/yyyy @ h:mma'")).getText()).
     toMatch(/10\/2\d\/2010 @ \d{1,2}:\d{2}(AM|PM)/);
  expect(element(by.binding("'1288323623006' | date:\"MM/dd/yyyy 'at' h:mma\"")).getText()).
     toMatch(/10\/2\d\/2010 at \d{1,2}:\d{2}(AM|PM)/);
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/filter/filter.html b/1.6.6/docs/partials/api/ng/filter/filter.html new file mode 100644 index 000000000..6384fccd2 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/filter/filter.html @@ -0,0 +1,216 @@ + Improve this Doc + + + + +  View Source + + + +
+

filter

+
    + +
  1. + - filter in module ng +
  2. +
+
+ + + + + +
+

Selects a subset of items from array and returns it as a new array.

+ +
+ + + + +
+ + + +

Usage

+

In HTML Template Binding

+ +
{{ filter_expression | filter : expression : comparator : anyPropertyKey}}
+ + +

In JavaScript

+
$filter('filter')(array, expression, comparator, anyPropertyKey)
+ + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ array + + + + Array + +

The source array.

+
+ Note: If the array contains objects that reference themselves, filtering is not possible. +
+ +
+ expression + + + + stringObjectfunction() + +

The predicate to be used for selecting items from + array.

+

Can be one of:

+
    +
  • string: The string is used for matching against the contents of the array. All strings or +objects with string properties in array that match this string will be returned. This also +applies to nested object properties. +The predicate can be negated by prefixing the string with !.

    +
  • +
  • Object: A pattern object can be used to filter specific properties on objects contained +by array. For example {name:"M", phone:"1"} predicate will return an array of items +which have property name containing "M" and property phone containing "1". A special +property name ($ by default) can be used (e.g. as in {$: "text"}) to accept a match +against any property of the object or its nested object properties. That's equivalent to the +simple substring match with a string as described above. The special property name can be +overwritten, using the anyPropertyKey parameter. +The predicate can be negated by prefixing the string with !. +For example {name: "!M"} predicate will return an array of items which have property name +not containing "M".

    +

    Note that a named property will match properties on the same level only, while the special +$ property will match properties on the same level or deeper. E.g. an array item like +{name: {first: 'John', last: 'Doe'}} will not be matched by {name: 'John'}, but +will be matched by {$: 'John'}.

    +
  • +
  • function(value, index, array): A predicate function can be used to write arbitrary filters. +The function is called for each element of the array, with the element, its index, and +the entire array itself as arguments.

    +

    The final result is an array of those elements that the predicate returned true for.

    +
  • +
+ + +
+ comparator + +
(optional)
+
+ function(actual, expected)truefalse + +

Comparator which is used in + determining if values retrieved using expression (when it is not a function) should be + considered a match based on the expected value (from the filter expression) and actual + value (from the object in the array).

+

Can be one of:

+
    +
  • function(actual, expected): +The function will be given the object value and the predicate value to compare and +should return true if both values should be considered equal.

    +
  • +
  • true: A shorthand for function(actual, expected) { return angular.equals(actual, expected)}. +This is essentially strict comparison of expected and actual.

    +
  • +
  • false: A short hand for a function which will look for a substring match in a case +insensitive way. Primitive values are converted to strings. Objects are not compared against +primitives, unless they have a custom toString method (e.g. Date objects).

    +
  • +
+

Defaults to false.

+ + +
+ anyPropertyKey + +
(optional)
+
+ string + +

The special property name that matches against any property. + By default $.

+ + +
+ +
+ + + + + +

Examples

+ +

+ + +
+ + +
+
<div ng-init="friends = [{name:'John', phone:'555-1276'},
                         {name:'Mary', phone:'800-BIG-MARY'},
                         {name:'Mike', phone:'555-4321'},
                         {name:'Adam', phone:'555-5678'},
                         {name:'Julie', phone:'555-8765'},
                         {name:'Juliette', phone:'555-5678'}]"></div>

<label>Search: <input ng-model="searchText"></label>
<table id="searchTextResults">
  <tr><th>Name</th><th>Phone</th></tr>
  <tr ng-repeat="friend in friends | filter:searchText">
    <td>{{friend.name}}</td>
    <td>{{friend.phone}}</td>
  </tr>
</table>
<hr>
<label>Any: <input ng-model="search.$"></label> <br>
<label>Name only <input ng-model="search.name"></label><br>
<label>Phone only <input ng-model="search.phone"></label><br>
<label>Equality <input type="checkbox" ng-model="strict"></label><br>
<table id="searchObjResults">
  <tr><th>Name</th><th>Phone</th></tr>
  <tr ng-repeat="friendObj in friends | filter:search:strict">
    <td>{{friendObj.name}}</td>
    <td>{{friendObj.phone}}</td>
  </tr>
</table>
+
+ +
+
var expectFriendNames = function(expectedNames, key) {
  element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) {
    arr.forEach(function(wd, i) {
      expect(wd.getText()).toMatch(expectedNames[i]);
    });
  });
};

it('should search across all fields when filtering with a string', function() {
  var searchText = element(by.model('searchText'));
  searchText.clear();
  searchText.sendKeys('m');
  expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend');

  searchText.clear();
  searchText.sendKeys('76');
  expectFriendNames(['John', 'Julie'], 'friend');
});

it('should search in specific fields when filtering with a predicate object', function() {
  var searchAny = element(by.model('search.$'));
  searchAny.clear();
  searchAny.sendKeys('i');
  expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj');
});
it('should use a equal comparison when comparator is true', function() {
  var searchName = element(by.model('search.name'));
  var strict = element(by.model('strict'));
  searchName.clear();
  searchName.sendKeys('Julie');
  strict.click();
  expectFriendNames(['Julie'], 'friendObj');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/filter/json.html b/1.6.6/docs/partials/api/ng/filter/json.html new file mode 100644 index 000000000..780b7633a --- /dev/null +++ b/1.6.6/docs/partials/api/ng/filter/json.html @@ -0,0 +1,143 @@ + Improve this Doc + + + + +  View Source + + + +
+

json

+
    + +
  1. + - filter in module ng +
  2. +
+
+ + + + + +
+

Allows you to convert a JavaScript object into JSON string.

+

This filter is mostly useful for debugging. When using the double curly {{value}} notation + the binding is automatically converted to JSON.

+ +
+ + + + +
+ + + +

Usage

+

In HTML Template Binding

+ +
{{ json_expression | json : spacing}}
+ + +

In JavaScript

+
$filter('json')(object, spacing)
+ + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ object + + + + * + +

Any JavaScript object (including arrays and primitive types) to filter.

+ + +
+ spacing + +
(optional)
+
+ number + +

The number of spaces to use per indentation, defaults to 2.

+ + +
+ +
+ +

Returns

+ + + + + +
string

JSON string.

+
+ + + +

Examples

+ +

+ + +
+ + +
+
<pre id="default-spacing">{{ {'name':'value'} | json }}</pre>
<pre id="custom-spacing">{{ {'name':'value'} | json:4 }}</pre>
+
+ +
+
it('should jsonify filtered objects', function() {
  expect(element(by.id('default-spacing')).getText()).toMatch(/\{\n {2}"name": ?"value"\n}/);
  expect(element(by.id('custom-spacing')).getText()).toMatch(/\{\n {4}"name": ?"value"\n}/);
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/filter/limitTo.html b/1.6.6/docs/partials/api/ng/filter/limitTo.html new file mode 100644 index 000000000..75faf5585 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/filter/limitTo.html @@ -0,0 +1,168 @@ + Improve this Doc + + + + +  View Source + + + +
+

limitTo

+
    + +
  1. + - filter in module ng +
  2. +
+
+ + + + + +
+

Creates a new array or string containing only a specified number of elements. The elements are +taken from either the beginning or the end of the source array, string or number, as specified by +the value and sign (positive or negative) of limit. Other array-like objects are also supported +(e.g. array subclasses, NodeLists, jqLite/jQuery collections etc). If a number is used as input, +it is converted to a string.

+ +
+ + + + +
+ + + +

Usage

+

In HTML Template Binding

+ +
{{ limitTo_expression | limitTo : limit : begin}}
+ + +

In JavaScript

+
$filter('limitTo')(input, limit, begin)
+ + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ input + + + + ArrayArrayLikestringnumber + +

Array/array-like, string or number to be limited.

+ + +
+ limit + + + + stringnumber + +

The length of the returned array or string. If the limit number + is positive, limit number of items from the beginning of the source array/string are copied. + If the number is negative, limit number of items from the end of the source array/string + are copied. The limit will be trimmed if it exceeds array.length. If limit is undefined, + the input will be returned unchanged.

+ + +
+ begin + +
(optional)
+
+ stringnumber + +

Index at which to begin limitation. As a negative index, + begin indicates an offset from the end of input. Defaults to 0.

+ + +
+ +
+ +

Returns

+ + + + + +
Arraystring

A new sub-array or substring of length limit or less if the input had + less than limit elements.

+
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('limitToExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.numbers = [1,2,3,4,5,6,7,8,9];
      $scope.letters = "abcdefghi";
      $scope.longNumber = 2345432342;
      $scope.numLimit = 3;
      $scope.letterLimit = 3;
      $scope.longNumberLimit = 3;
    }]);
</script>
<div ng-controller="ExampleController">
  <label>
     Limit {{numbers}} to:
     <input type="number" step="1" ng-model="numLimit">
  </label>
  <p>Output numbers: {{ numbers | limitTo:numLimit }}</p>
  <label>
     Limit {{letters}} to:
     <input type="number" step="1" ng-model="letterLimit">
  </label>
  <p>Output letters: {{ letters | limitTo:letterLimit }}</p>
  <label>
     Limit {{longNumber}} to:
     <input type="number" step="1" ng-model="longNumberLimit">
  </label>
  <p>Output long number: {{ longNumber | limitTo:longNumberLimit }}</p>
</div>
+
+ +
+
var numLimitInput = element(by.model('numLimit'));
var letterLimitInput = element(by.model('letterLimit'));
var longNumberLimitInput = element(by.model('longNumberLimit'));
var limitedNumbers = element(by.binding('numbers | limitTo:numLimit'));
var limitedLetters = element(by.binding('letters | limitTo:letterLimit'));
var limitedLongNumber = element(by.binding('longNumber | limitTo:longNumberLimit'));

it('should limit the number array to first three items', function() {
  expect(numLimitInput.getAttribute('value')).toBe('3');
  expect(letterLimitInput.getAttribute('value')).toBe('3');
  expect(longNumberLimitInput.getAttribute('value')).toBe('3');
  expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]');
  expect(limitedLetters.getText()).toEqual('Output letters: abc');
  expect(limitedLongNumber.getText()).toEqual('Output long number: 234');
});

// There is a bug in safari and protractor that doesn't like the minus key
// it('should update the output when -3 is entered', function() {
//   numLimitInput.clear();
//   numLimitInput.sendKeys('-3');
//   letterLimitInput.clear();
//   letterLimitInput.sendKeys('-3');
//   longNumberLimitInput.clear();
//   longNumberLimitInput.sendKeys('-3');
//   expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]');
//   expect(limitedLetters.getText()).toEqual('Output letters: ghi');
//   expect(limitedLongNumber.getText()).toEqual('Output long number: 342');
// });

it('should not exceed the maximum size of input array', function() {
  numLimitInput.clear();
  numLimitInput.sendKeys('100');
  letterLimitInput.clear();
  letterLimitInput.sendKeys('100');
  longNumberLimitInput.clear();
  longNumberLimitInput.sendKeys('100');
  expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]');
  expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi');
  expect(limitedLongNumber.getText()).toEqual('Output long number: 2345432342');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/filter/lowercase.html b/1.6.6/docs/partials/api/ng/filter/lowercase.html new file mode 100644 index 000000000..3485c49c5 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/filter/lowercase.html @@ -0,0 +1,54 @@ + Improve this Doc + + + + +  View Source + + + +
+

lowercase

+
    + +
  1. + - filter in module ng +
  2. +
+
+ + + + + +
+

Converts string to lowercase.

+

See the uppercase filter documentation for a functionally identical example.

+ +
+ + + + +
+ + + +

Usage

+

In HTML Template Binding

+ +
{{ lowercase_expression | lowercase}}
+ + +

In JavaScript

+
$filter('lowercase')()
+ + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/filter/number.html b/1.6.6/docs/partials/api/ng/filter/number.html new file mode 100644 index 000000000..e26946a00 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/filter/number.html @@ -0,0 +1,149 @@ + Improve this Doc + + + + +  View Source + + + +
+

number

+
    + +
  1. + - filter in module ng +
  2. +
+
+ + + + + +
+

Formats a number as text.

+

If the input is null or undefined, it will just be returned. +If the input is infinite (Infinity or -Infinity), the Infinity symbol '∞' or '-∞' is returned, respectively. +If the input is not a number an empty string is returned.

+ +
+ + + + +
+ + + +

Usage

+

In HTML Template Binding

+ +
{{ number_expression | number : fractionSize}}
+ + +

In JavaScript

+
$filter('number')(number, fractionSize)
+ + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ number + + + + numberstring + +

Number to format.

+ + +
+ fractionSize + +
(optional)
+
+ numberstring + +

Number of decimal places to round the number to. +If this is not provided then the fraction size is computed from the current locale's number +formatting pattern. In the case of the default locale, it will be 3.

+ + +
+ +
+ +

Returns

+ + + + + +
string

Number rounded to fractionSize appropriately formatted based on the current + locale (e.g., in the en_US locale it will have "." as the decimal separator and + include "," group separators after each third digit).

+
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('numberFilterExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.val = 1234.56789;
    }]);
</script>
<div ng-controller="ExampleController">
  <label>Enter number: <input ng-model='val'></label><br>
  Default formatting: <span id='number-default'>{{val | number}}</span><br>
  No fractions: <span>{{val | number:0}}</span><br>
  Negative number: <span>{{-val | number:4}}</span>
</div>
+
+ +
+
 it('should format numbers', function() {
   expect(element(by.id('number-default')).getText()).toBe('1,234.568');
   expect(element(by.binding('val | number:0')).getText()).toBe('1,235');
   expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679');
 });

 it('should update', function() {
   element(by.model('val')).clear();
   element(by.model('val')).sendKeys('3374.333');
   expect(element(by.id('number-default')).getText()).toBe('3,374.333');
   expect(element(by.binding('val | number:0')).getText()).toBe('3,374');
   expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/filter/orderBy.html b/1.6.6/docs/partials/api/ng/filter/orderBy.html new file mode 100644 index 000000000..e70d995f2 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/filter/orderBy.html @@ -0,0 +1,438 @@ + Improve this Doc + + + + +  View Source + + + +
+

orderBy

+
    + +
  1. + - filter in module ng +
  2. +
+
+ + + + + +
+

Returns an array containing the items from the specified collection, ordered by a comparator +function based on the values computed using the expression predicate.

+

For example, [{id: 'foo'}, {id: 'bar'}] | orderBy:'id' would result in +[{id: 'bar'}, {id: 'foo'}].

+

The collection can be an Array or array-like object (e.g. NodeList, jQuery object, TypedArray, +String, etc).

+

The expression can be a single predicate, or a list of predicates each serving as a tie-breaker +for the preceding one. The expression is evaluated against each item and the output is used +for comparing with other items.

+

You can change the sorting order by setting reverse to true. By default, items are sorted in +ascending order.

+

The comparison is done using the comparator function. If none is specified, a default, built-in +comparator is used (see below for details - in a nutshell, it compares numbers numerically and +strings alphabetically).

+

Under the hood

+

Ordering the specified collection happens in two phases:

+
    +
  1. All items are passed through the predicate (or predicates), and the returned values are saved +along with their type (string, number etc). For example, an item {label: 'foo'}, passed +through a predicate that extracts the value of the label property, would be transformed to:
    {
    +  value: 'foo',
    +  type: 'string',
    +  index: ...
    +}
    +
    +
  2. +
  3. The comparator function is used to sort the items, based on the derived values, types and +indices.
  4. +
+

If you use a custom comparator, it will be called with pairs of objects of the form +{value: ..., type: '...', index: ...} and is expected to return 0 if the objects are equal +(as far as the comparator is concerned), -1 if the 1st one should be ranked higher than the +second, or 1 otherwise.

+

In order to ensure that the sorting will be deterministic across platforms, if none of the +specified predicates can distinguish between two items, orderBy will automatically introduce a +dummy predicate that returns the item's index as value. +(If you are using a custom comparator, make sure it can handle this predicate as well.)

+

If a custom comparator still can't distinguish between two items, then they will be sorted based +on their index using the built-in comparator.

+

Finally, in an attempt to simplify things, if a predicate returns an object as the extracted +value for an item, orderBy will try to convert that object to a primitive value, before passing +it to the comparator. The following rules govern the conversion:

+
    +
  1. If the object has a valueOf() method that returns a primitive, its return value will be +used instead.
    +(If the object has a valueOf() method that returns another object, then the returned object +will be used in subsequent steps.)
  2. +
  3. If the object has a custom toString() method (i.e. not the one inherited from Object) that +returns a primitive, its return value will be used instead.
    +(If the object has a toString() method that returns another object, then the returned object +will be used in subsequent steps.)
  4. +
  5. No conversion; the object itself is used.
  6. +
+

The default comparator

+

The default, built-in comparator should be sufficient for most usecases. In short, it compares +numbers numerically, strings alphabetically (and case-insensitively), for objects falls back to +using their index in the original collection, and sorts values of different types by type.

+

More specifically, it follows these steps to determine the relative order of items:

+
    +
  1. If the compared values are of different types, compare the types themselves alphabetically.
  2. +
  3. If both values are of type string, compare them alphabetically in a case- and +locale-insensitive way.
  4. +
  5. If both values are objects, compare their indices instead.
  6. +
  7. Otherwise, return:
      +
    • 0, if the values are equal (by strict equality comparison, i.e. using ===).
    • +
    • -1, if the 1st value is "less than" the 2nd value (compared using the < operator).
    • +
    • 1, otherwise.
    • +
    +
  8. +
+

Note: If you notice numbers not being sorted as expected, make sure they are actually being + saved as numbers and not strings. +Note: For the purpose of sorting, null values are treated as the string 'null' (i.e. + type: 'string', value: 'null'). This may cause unexpected sort order relative to + other values.

+ +
+ + + + +
+ + + +

Usage

+

In HTML Template Binding

+ +
{{ orderBy_expression | orderBy : expression : reverse : comparator}}
+ + +

In JavaScript

+
$filter('orderBy')(collection, expression, reverse, comparator)
+ + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ collection + + + + ArrayArrayLike + +

The collection (array or array-like object) to sort.

+ + +
+ expression + +
(optional)
+
+ function()stringArray.<(function()|string)> + +

A predicate (or list of + predicates) to be used by the comparator to determine the order of elements.

+

Can be one of:

+
    +
  • Function: A getter function. This function will be called with each item as argument and +the return value will be used for sorting.
  • +
  • string: An Angular expression. This expression will be evaluated against each item and the +result will be used for sorting. For example, use 'label' to sort by a property called +label or 'label.substring(0, 3)' to sort by the first 3 characters of the label +property.
    +(The result of a constant expression is interpreted as a property name to be used for +comparison. For example, use '"special name"' (note the extra pair of quotes) to sort by a +property called special name.)
    +An expression can be optionally prefixed with + or - to control the sorting direction, +ascending or descending. For example, '+label' or '-label'. If no property is provided, +(e.g. '+' or '-'), the collection element itself is used in comparisons.
  • +
  • Array: An array of function and/or string predicates. If a predicate cannot determine the +relative order of two items, the next predicate is used as a tie-breaker.
  • +
+

Note: If the predicate is missing or empty then it defaults to '+'.

+ + +
+ reverse + +
(optional)
+
+ boolean + +

If true, reverse the sorting order.

+ + +
+ comparator + +
(optional)
+
+ function() + +

The comparator function used to determine the relative order of + value pairs. If omitted, the built-in comparator will be used.

+ + +
+ +
+ +

Returns

+ + + + + +
Array
    +
  • The sorted array.
  • +
+
+ + + +

Examples

Ordering a table with ngRepeat

+

The example below demonstrates a simple ngRepeat, where the data is sorted by +age in descending order (expression is set to '-age'). The comparator is not set, which means +it defaults to the built-in comparator.

+

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <table class="friends">
    <tr>
      <th>Name</th>
      <th>Phone Number</th>
      <th>Age</th>
    </tr>
    <tr ng-repeat="friend in friends | orderBy:'-age'">
      <td>{{friend.name}}</td>
      <td>{{friend.phone}}</td>
      <td>{{friend.age}}</td>
    </tr>
  </table>
</div>
+
+ +
+
angular.module('orderByExample1', [])
.controller('ExampleController', ['$scope', function($scope) {
  $scope.friends = [
    {name: 'John',   phone: '555-1212',  age: 10},
    {name: 'Mary',   phone: '555-9876',  age: 19},
    {name: 'Mike',   phone: '555-4321',  age: 21},
    {name: 'Adam',   phone: '555-5678',  age: 35},
    {name: 'Julie',  phone: '555-8765',  age: 29}
  ];
}]);
+
+ +
+
.friends {
  border-collapse: collapse;
}

.friends th {
  border-bottom: 1px solid;
}
.friends td, .friends th {
  border-left: 1px solid;
  padding: 5px 10px;
}
.friends td:first-child, .friends th:first-child {
  border-left: none;
}
+
+ +
+
// Element locators
var names = element.all(by.repeater('friends').column('friend.name'));

it('should sort friends by age in reverse order', function() {
  expect(names.get(0).getText()).toBe('Adam');
  expect(names.get(1).getText()).toBe('Julie');
  expect(names.get(2).getText()).toBe('Mike');
  expect(names.get(3).getText()).toBe('Mary');
  expect(names.get(4).getText()).toBe('John');
});
+
+ + + +
+
+ + +

+

Changing parameters dynamically

+

All parameters can be changed dynamically. The next example shows how you can make the columns of +a table sortable, by binding the expression and reverse parameters to scope properties.

+

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <pre>Sort by = {{propertyName}}; reverse = {{reverse}}</pre>
  <hr/>
  <button ng-click="propertyName = null; reverse = false">Set to unsorted</button>
  <hr/>
  <table class="friends">
    <tr>
      <th>
        <button ng-click="sortBy('name')">Name</button>
        <span class="sortorder" ng-show="propertyName === 'name'" ng-class="{reverse: reverse}"></span>
      </th>
      <th>
        <button ng-click="sortBy('phone')">Phone Number</button>
        <span class="sortorder" ng-show="propertyName === 'phone'" ng-class="{reverse: reverse}"></span>
      </th>
      <th>
        <button ng-click="sortBy('age')">Age</button>
        <span class="sortorder" ng-show="propertyName === 'age'" ng-class="{reverse: reverse}"></span>
      </th>
    </tr>
    <tr ng-repeat="friend in friends | orderBy:propertyName:reverse">
      <td>{{friend.name}}</td>
      <td>{{friend.phone}}</td>
      <td>{{friend.age}}</td>
    </tr>
  </table>
</div>
+
+ +
+
angular.module('orderByExample2', [])
.controller('ExampleController', ['$scope', function($scope) {
  var friends = [
    {name: 'John',   phone: '555-1212',  age: 10},
    {name: 'Mary',   phone: '555-9876',  age: 19},
    {name: 'Mike',   phone: '555-4321',  age: 21},
    {name: 'Adam',   phone: '555-5678',  age: 35},
    {name: 'Julie',  phone: '555-8765',  age: 29}
  ];

  $scope.propertyName = 'age';
  $scope.reverse = true;
  $scope.friends = friends;

  $scope.sortBy = function(propertyName) {
    $scope.reverse = ($scope.propertyName === propertyName) ? !$scope.reverse : false;
    $scope.propertyName = propertyName;
  };
}]);
+
+ +
+
.friends {
  border-collapse: collapse;
}

.friends th {
  border-bottom: 1px solid;
}
.friends td, .friends th {
  border-left: 1px solid;
  padding: 5px 10px;
}
.friends td:first-child, .friends th:first-child {
  border-left: none;
}

.sortorder:after {
  content: '\25b2';   // BLACK UP-POINTING TRIANGLE
}
.sortorder.reverse:after {
  content: '\25bc';   // BLACK DOWN-POINTING TRIANGLE
}
+
+ +
+
// Element locators
var unsortButton = element(by.partialButtonText('unsorted'));
var nameHeader = element(by.partialButtonText('Name'));
var phoneHeader = element(by.partialButtonText('Phone'));
var ageHeader = element(by.partialButtonText('Age'));
var firstName = element(by.repeater('friends').column('friend.name').row(0));
var lastName = element(by.repeater('friends').column('friend.name').row(4));

it('should sort friends by some property, when clicking on the column header', function() {
  expect(firstName.getText()).toBe('Adam');
  expect(lastName.getText()).toBe('John');

  phoneHeader.click();
  expect(firstName.getText()).toBe('John');
  expect(lastName.getText()).toBe('Mary');

  nameHeader.click();
  expect(firstName.getText()).toBe('Adam');
  expect(lastName.getText()).toBe('Mike');

  ageHeader.click();
  expect(firstName.getText()).toBe('John');
  expect(lastName.getText()).toBe('Adam');
});

it('should sort friends in reverse order, when clicking on the same column', function() {
  expect(firstName.getText()).toBe('Adam');
  expect(lastName.getText()).toBe('John');

  ageHeader.click();
  expect(firstName.getText()).toBe('John');
  expect(lastName.getText()).toBe('Adam');

  ageHeader.click();
  expect(firstName.getText()).toBe('Adam');
  expect(lastName.getText()).toBe('John');
});

it('should restore the original order, when clicking "Set to unsorted"', function() {
  expect(firstName.getText()).toBe('Adam');
  expect(lastName.getText()).toBe('John');

  unsortButton.click();
  expect(firstName.getText()).toBe('John');
  expect(lastName.getText()).toBe('Julie');
});
+
+ + + +
+
+ + +

+

Using orderBy inside a controller

+

It is also possible to call the orderBy filter manually, by injecting orderByFilter, and +calling it with the desired parameters. (Alternatively, you could inject the $filter factory +and retrieve the orderBy filter with $filter('orderBy').)

+

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <pre>Sort by = {{propertyName}}; reverse = {{reverse}}</pre>
  <hr/>
  <button ng-click="sortBy(null)">Set to unsorted</button>
  <hr/>
  <table class="friends">
    <tr>
      <th>
        <button ng-click="sortBy('name')">Name</button>
        <span class="sortorder" ng-show="propertyName === 'name'" ng-class="{reverse: reverse}"></span>
      </th>
      <th>
        <button ng-click="sortBy('phone')">Phone Number</button>
        <span class="sortorder" ng-show="propertyName === 'phone'" ng-class="{reverse: reverse}"></span>
      </th>
      <th>
        <button ng-click="sortBy('age')">Age</button>
        <span class="sortorder" ng-show="propertyName === 'age'" ng-class="{reverse: reverse}"></span>
      </th>
    </tr>
    <tr ng-repeat="friend in friends">
      <td>{{friend.name}}</td>
      <td>{{friend.phone}}</td>
      <td>{{friend.age}}</td>
    </tr>
  </table>
</div>
+
+ +
+
angular.module('orderByExample3', [])
.controller('ExampleController', ['$scope', 'orderByFilter', function($scope, orderBy) {
  var friends = [
    {name: 'John',   phone: '555-1212',  age: 10},
    {name: 'Mary',   phone: '555-9876',  age: 19},
    {name: 'Mike',   phone: '555-4321',  age: 21},
    {name: 'Adam',   phone: '555-5678',  age: 35},
    {name: 'Julie',  phone: '555-8765',  age: 29}
  ];

  $scope.propertyName = 'age';
  $scope.reverse = true;
  $scope.friends = orderBy(friends, $scope.propertyName, $scope.reverse);

  $scope.sortBy = function(propertyName) {
    $scope.reverse = (propertyName !== null && $scope.propertyName === propertyName)
        ? !$scope.reverse : false;
    $scope.propertyName = propertyName;
    $scope.friends = orderBy(friends, $scope.propertyName, $scope.reverse);
  };
}]);
+
+ +
+
.friends {
  border-collapse: collapse;
}

.friends th {
  border-bottom: 1px solid;
}
.friends td, .friends th {
  border-left: 1px solid;
  padding: 5px 10px;
}
.friends td:first-child, .friends th:first-child {
  border-left: none;
}

.sortorder:after {
  content: '\25b2';   // BLACK UP-POINTING TRIANGLE
}
.sortorder.reverse:after {
  content: '\25bc';   // BLACK DOWN-POINTING TRIANGLE
}
+
+ +
+
// Element locators
var unsortButton = element(by.partialButtonText('unsorted'));
var nameHeader = element(by.partialButtonText('Name'));
var phoneHeader = element(by.partialButtonText('Phone'));
var ageHeader = element(by.partialButtonText('Age'));
var firstName = element(by.repeater('friends').column('friend.name').row(0));
var lastName = element(by.repeater('friends').column('friend.name').row(4));

it('should sort friends by some property, when clicking on the column header', function() {
  expect(firstName.getText()).toBe('Adam');
  expect(lastName.getText()).toBe('John');

  phoneHeader.click();
  expect(firstName.getText()).toBe('John');
  expect(lastName.getText()).toBe('Mary');

  nameHeader.click();
  expect(firstName.getText()).toBe('Adam');
  expect(lastName.getText()).toBe('Mike');

  ageHeader.click();
  expect(firstName.getText()).toBe('John');
  expect(lastName.getText()).toBe('Adam');
});

it('should sort friends in reverse order, when clicking on the same column', function() {
  expect(firstName.getText()).toBe('Adam');
  expect(lastName.getText()).toBe('John');

  ageHeader.click();
  expect(firstName.getText()).toBe('John');
  expect(lastName.getText()).toBe('Adam');

  ageHeader.click();
  expect(firstName.getText()).toBe('Adam');
  expect(lastName.getText()).toBe('John');
});

it('should restore the original order, when clicking "Set to unsorted"', function() {
  expect(firstName.getText()).toBe('Adam');
  expect(lastName.getText()).toBe('John');

  unsortButton.click();
  expect(firstName.getText()).toBe('John');
  expect(lastName.getText()).toBe('Julie');
});
+
+ + + +
+
+ + +

+

Using a custom comparator

+

If you have very specific requirements about the way items are sorted, you can pass your own +comparator function. For example, you might need to compare some strings in a locale-sensitive +way. (When specifying a custom comparator, you also need to pass a value for the reverse +argument - passing false retains the default sorting order, i.e. ascending.)

+

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <div class="friends-container custom-comparator">
    <h3>Locale-sensitive Comparator</h3>
    <table class="friends">
      <tr>
        <th>Name</th>
        <th>Favorite Letter</th>
      </tr>
      <tr ng-repeat="friend in friends | orderBy:'favoriteLetter':false:localeSensitiveComparator">
        <td>{{friend.name}}</td>
        <td>{{friend.favoriteLetter}}</td>
      </tr>
    </table>
  </div>
  <div class="friends-container default-comparator">
    <h3>Default Comparator</h3>
    <table class="friends">
      <tr>
        <th>Name</th>
        <th>Favorite Letter</th>
      </tr>
      <tr ng-repeat="friend in friends | orderBy:'favoriteLetter'">
        <td>{{friend.name}}</td>
        <td>{{friend.favoriteLetter}}</td>
      </tr>
    </table>
  </div>
</div>
+
+ +
+
angular.module('orderByExample4', [])
.controller('ExampleController', ['$scope', function($scope) {
  $scope.friends = [
    {name: 'John',   favoriteLetter: 'Ä'},
    {name: 'Mary',   favoriteLetter: 'Ü'},
    {name: 'Mike',   favoriteLetter: 'Ö'},
    {name: 'Adam',   favoriteLetter: 'H'},
    {name: 'Julie',  favoriteLetter: 'Z'}
  ];

  $scope.localeSensitiveComparator = function(v1, v2) {
    // If we don't get strings, just compare by index
    if (v1.type !== 'string' || v2.type !== 'string') {
      return (v1.index < v2.index) ? -1 : 1;
    }

    // Compare strings alphabetically, taking locale into account
    return v1.value.localeCompare(v2.value);
  };
}]);
+
+ +
+
.friends-container {
  display: inline-block;
  margin: 0 30px;
}

.friends {
  border-collapse: collapse;
}

.friends th {
  border-bottom: 1px solid;
}
.friends td, .friends th {
  border-left: 1px solid;
  padding: 5px 10px;
}
.friends td:first-child, .friends th:first-child {
  border-left: none;
}
+
+ +
+
// Element locators
var container = element(by.css('.custom-comparator'));
var names = container.all(by.repeater('friends').column('friend.name'));

it('should sort friends by favorite letter (in correct alphabetical order)', function() {
  expect(names.get(0).getText()).toBe('John');
  expect(names.get(1).getText()).toBe('Adam');
  expect(names.get(2).getText()).toBe('Mike');
  expect(names.get(3).getText()).toBe('Mary');
  expect(names.get(4).getText()).toBe('Julie');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/filter/uppercase.html b/1.6.6/docs/partials/api/ng/filter/uppercase.html new file mode 100644 index 000000000..9c5583891 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/filter/uppercase.html @@ -0,0 +1,79 @@ + Improve this Doc + + + + +  View Source + + + +
+

uppercase

+
    + +
  1. + - filter in module ng +
  2. +
+
+ + + + + +
+

Converts string to uppercase.

+ +
+ + + + +
+ + + +

Usage

+

In HTML Template Binding

+ +
{{ uppercase_expression | uppercase}}
+ + +

In JavaScript

+
$filter('uppercase')()
+ + + + + + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('uppercaseFilterExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.title = 'This is a title';
    }]);
</script>
<div ng-controller="ExampleController">
  <!-- This title should be formatted normally -->
  <h1>{{title}}</h1>
  <!-- This title should be capitalized -->
  <h1>{{title | uppercase}}</h1>
</div>
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/function.html b/1.6.6/docs/partials/api/ng/function.html new file mode 100644 index 000000000..a5de09ebf --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function.html @@ -0,0 +1,205 @@ + +

Function components in ng

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
angular.lowercase

Converts the specified string to lowercase.

+
angular.uppercase

Converts the specified string to uppercase.

+
angular.forEach

Invokes the iterator function once for each item in obj collection, which can be either an +object or an array. The iterator function is invoked with iterator(value, key, obj), where value +is the value of an object property or an array element, key is the object property key or +array element index and obj is the obj itself. Specifying a context for the function is optional.

+
angular.extend

Extends the destination object dst by copying own enumerable properties from the src object(s) +to dst. You can specify multiple src objects. If you want to preserve original objects, you can do so +by passing an empty object as the target: var object = angular.extend({}, object1, object2).

+
angular.merge

Deeply extends the destination object dst by copying own enumerable properties from the src object(s) +to dst. You can specify multiple src objects. If you want to preserve original objects, you can do so +by passing an empty object as the target: var object = angular.merge({}, object1, object2).

+
angular.noop

A function that performs no operations. This function can be useful when writing code in the +functional style.

+
function foo(callback) {
+  var result = calculateResult();
+  (callback || angular.noop)(result);
+}
+
+
angular.identity

A function that returns its first argument. This function is useful when writing code in the +functional style.

+
angular.isUndefined

Determines if a reference is undefined.

+
angular.isDefined

Determines if a reference is defined.

+
angular.isObject

Determines if a reference is an Object. Unlike typeof in JavaScript, nulls are not +considered to be objects. Note that JavaScript arrays are objects.

+
angular.isString

Determines if a reference is a String.

+
angular.isNumber

Determines if a reference is a Number.

+
angular.isDate

Determines if a value is a date.

+
angular.isArray

Determines if a reference is an Array. Alias of Array.isArray.

+
angular.isFunction

Determines if a reference is a Function.

+
angular.isElement

Determines if a reference is a DOM element (or wrapped jQuery element).

+
angular.copy

Creates a deep copy of source, which should be an object or an array.

+
angular.equals

Determines if two objects or two values are equivalent. Supports value types, regular +expressions, arrays and objects.

+
angular.bind

Returns a function which calls function fn bound to self (self becomes the this for +fn). You can supply optional args that are prebound to the function. This feature is also +known as partial application, as +distinguished from function currying.

+
angular.toJson

Serializes input into a JSON-formatted string. Properties with leading $$ characters will be +stripped since angular uses this notation internally.

+
angular.fromJson

Deserializes a JSON string.

+
angular.bootstrap

Use this function to manually start up angular application.

+
angular.reloadWithDebugInfo

Use this function to reload the current application with debug information turned on. +This takes precedence over a call to $compileProvider.debugInfoEnabled(false).

+
angular.injector

Creates an injector object that can be used for retrieving services as well as for +dependency injection (see dependency injection).

+
angular.element

Wraps a raw DOM element or HTML string as a jQuery element.

+
angular.module

The angular.module is a global place for creating, registering and retrieving Angular +modules. +All modules (angular core or 3rd party) that should be available to an application must be +registered using this mechanism.

+
angular.errorHandlingConfig

Configure several aspects of error handling in AngularJS if used as a setter or return the +current configuration if used as a getter. The following options are supported:

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ng/function/angular.bind.html b/1.6.6/docs/partials/api/ng/function/angular.bind.html new file mode 100644 index 000000000..6629d5fa1 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.bind.html @@ -0,0 +1,132 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.bind

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

Returns a function which calls function fn bound to self (self becomes the this for +fn). You can supply optional args that are prebound to the function. This feature is also +known as partial application, as +distinguished from function currying.

+ +
+ + + + +
+ + + + +

Usage

+ +

angular.bind(self, fn, args);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ self + + + + Object + +

Context which fn should be evaluated in.

+ + +
+ fn + + + + function() + +

Function to be bound.

+ + +
+ args + + + + * + +

Optional arguments to be prebound to the fn function call.

+ + +
+ +
+ +

Returns

+ + + + + +
function()

Function that wraps the fn with all the specified bindings.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.bootstrap.html b/1.6.6/docs/partials/api/ng/function/angular.bootstrap.html new file mode 100644 index 000000000..1b808fd40 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.bootstrap.html @@ -0,0 +1,172 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.bootstrap

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

Use this function to manually start up angular application.

+

For more information, see the Bootstrap guide.

+

Angular will detect if it has been loaded into the browser more than once and only allow the +first loaded script to be bootstrapped and will report a warning to the browser console for +each of the subsequent scripts. This prevents strange results in applications, where otherwise +multiple instances of Angular try to work on the DOM.

+
+Note: Protractor based end-to-end tests cannot use this function to bootstrap manually. +They must use ngApp. +
+ +
+Note: Do not bootstrap the app on an element with a directive that uses transclusion, +such as ngIf, ngInclude and ngView. +Doing this misplaces the app $rootElement and the app's injector, +causing animations to stop working and making the injector inaccessible from outside the app. +
+ +
<!doctype html>
+<html>
+<body>
+<div ng-controller="WelcomeController">
+  {{greeting}}
+</div>
+
+<script src="angular.js"></script>
+<script>
+  var app = angular.module('demo', [])
+  .controller('WelcomeController', function($scope) {
+      $scope.greeting = 'Welcome!';
+  });
+  angular.bootstrap(document, ['demo']);
+</script>
+</body>
+</html>
+
+ +
+ + + + +
+ + + + +

Usage

+ +

angular.bootstrap(element, [modules], [config]);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ element + + + + DOMElement + +

DOM element which is the root of angular application.

+ + +
+ modules + +
(optional)
+
+ Array<String|Function|Array>= + +

an array of modules to load into the application. + Each item in the array should be the name of a predefined module or a (DI annotated) + function that will be invoked by the injector as a config block. + See: modules

+ + +
+ config + +
(optional)
+
+ Object + +

an object for defining configuration options for the application. The + following keys are supported:

+
    +
  • strictDi - disable automatic function annotation for the application. This is meant to +assist in finding bugs which break minified code. Defaults to false.
  • +
+ + +
+ +
+ +

Returns

+ + + + + +
auto.$injector

Returns the newly created injector for this app.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.copy.html b/1.6.6/docs/partials/api/ng/function/angular.copy.html new file mode 100644 index 000000000..22475b06d --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.copy.html @@ -0,0 +1,159 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.copy

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

Creates a deep copy of source, which should be an object or an array.

+
    +
  • If no destination is supplied, a copy of the object or array is created.
  • +
  • If a destination is provided, all of its elements (for arrays) or properties (for objects) +are deleted and then all elements/properties from the source are copied to it.
  • +
  • If source is not an object or array (inc. null and undefined), source is returned.
  • +
  • If source is identical to destination an exception will be thrown.
  • +
+


+
+ Only enumerable properties are taken into account. Non-enumerable properties (both on source + and on destination) will be ignored. +
+
+ + + + +
+ + + + +

Usage

+ +

angular.copy(source, [destination]);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ source + + + + * + +

The source that will be used to make a copy. + Can be any type, including primitives, null, and undefined.

+ + +
+ destination + +
(optional)
+
+ ObjectArray + +

Destination into which the source is copied. If + provided, must be of the same type as source.

+ + +
+ +
+ +

Returns

+ + + + + +
*

The copy or updated destination, if destination was specified.

+
+ + + + + + + + +

Examples

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <form novalidate class="simple-form">
    <label>Name: <input type="text" ng-model="user.name" /></label><br />
    <label>Age:  <input type="number" ng-model="user.age" /></label><br />
    Gender: <label><input type="radio" ng-model="user.gender" value="male" />male</label>
            <label><input type="radio" ng-model="user.gender" value="female" />female</label><br />
    <button ng-click="reset()">RESET</button>
    <button ng-click="update(user)">SAVE</button>
  </form>
  <pre>form = {{user | json}}</pre>
  <pre>master = {{master | json}}</pre>
</div>
+
+ +
+
// Module: copyExample
angular.
  module('copyExample', []).
  controller('ExampleController', ['$scope', function($scope) {
    $scope.master = {};

    $scope.reset = function() {
      // Example with 1 argument
      $scope.user = angular.copy($scope.master);
    };

    $scope.update = function(user) {
      // Example with 2 arguments
      angular.copy(user, $scope.master);
    };

    $scope.reset();
  }]);
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.element.html b/1.6.6/docs/partials/api/ng/function/angular.element.html new file mode 100644 index 000000000..8803df923 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.element.html @@ -0,0 +1,185 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.element

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

Wraps a raw DOM element or HTML string as a jQuery element.

+

If jQuery is available, angular.element is an alias for the +jQuery function. If jQuery is not available, angular.element +delegates to Angular's built-in subset of jQuery, called "jQuery lite" or jqLite.

+

jqLite is a tiny, API-compatible subset of jQuery that allows +Angular to manipulate the DOM in a cross-browser compatible way. jqLite implements only the most +commonly needed functionality with the goal of having a very small footprint.

+

To use jQuery, simply ensure it is loaded before the angular.js file. You can also use the +ngJq directive to specify that jqlite should be used over jQuery, or to use a +specific version of jQuery if multiple versions exist on the page.

+
Note: All element references in Angular are always wrapped with jQuery or +jqLite (such as the element argument in a directive's compile / link function). They are never raw DOM references.
+ +
Note: Keep in mind that this function will not find elements +by tag name / CSS selector. For lookups by tag name, try instead angular.element(document).find(...) +or $document.find(), or use the standard DOM APIs, e.g. document.querySelectorAll().
+ +

Angular's jqLite

+

jqLite provides only the following jQuery methods:

+ +

jQuery/jqLite Extras

+

Angular also provides the following additional methods and events to both jQuery and jqLite:

+

Events

+
    +
  • $destroy - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event + on all DOM nodes being removed. This can be used to clean up any 3rd party bindings to the DOM + element before it is removed.
  • +
+

Methods

+
    +
  • controller(name) - retrieves the controller of the current element or its parent. By default +retrieves controller associated with the ngController directive. If name is provided as +camelCase directive name, then the controller for this directive will be retrieved (e.g. +'ngModel').
  • +
  • injector() - retrieves the injector of the current element or its parent.
  • +
  • scope() - retrieves the scope of the current +element or its parent. Requires Debug Data to +be enabled.
  • +
  • isolateScope() - retrieves an isolate scope if one is attached directly to the +current element. This getter should be used only on elements that contain a directive which starts a new isolate +scope. Calling scope() on this element always returns the original non-isolate scope. +Requires Debug Data to be enabled.
  • +
  • inheritedData() - same as data(), but walks up the DOM until a value is found or the top +parent element is reached.
  • +
+ +
+ + + +

Known Issues

+
+

You cannot spy on angular.element if you are using Jasmine version 1.x. See +https://github.com/angular/angular.js/issues/14251 for more information.

+ +
+ + +
+ + + + +

Usage

+ +

angular.element(element);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ element + + + + stringDOMElement + +

HTML string or DOMElement to be wrapped into jQuery.

+ + +
+ +
+ +

Returns

+ + + + + +
Object

jQuery object.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.equals.html b/1.6.6/docs/partials/api/ng/function/angular.equals.html new file mode 100644 index 000000000..f74d1acd5 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.equals.html @@ -0,0 +1,160 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.equals

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

Determines if two objects or two values are equivalent. Supports value types, regular +expressions, arrays and objects.

+

Two objects or values are considered equivalent if at least one of the following is true:

+
    +
  • Both objects or values pass === comparison.
  • +
  • Both objects or values are of the same type and all of their properties are equal by +comparing them with angular.equals.
  • +
  • Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)
  • +
  • Both values represent the same regular expression (In JavaScript, +/abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual +representation matches).
  • +
+

During a property comparison, properties of function type and properties with names +that begin with $ are ignored.

+

Scope and DOMWindow objects are being compared only by identify (===).

+ +
+ + + + +
+ + + + +

Usage

+ +

angular.equals(o1, o2);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ o1 + + + + * + +

Object or value to compare.

+ + +
+ o2 + + + + * + +

Object or value to compare.

+ + +
+ +
+ +

Returns

+ + + + + +
boolean

True if arguments are equal.

+
+ + + + + + + + +

Examples

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <form novalidate>
    <h3>User 1</h3>
    Name: <input type="text" ng-model="user1.name">
    Age: <input type="number" ng-model="user1.age">

    <h3>User 2</h3>
    Name: <input type="text" ng-model="user2.name">
    Age: <input type="number" ng-model="user2.age">

    <div>
      <br/>
      <input type="button" value="Compare" ng-click="compare()">
    </div>
    User 1: <pre>{{user1 | json}}</pre>
    User 2: <pre>{{user2 | json}}</pre>
    Equal: <pre>{{result}}</pre>
  </form>
</div>
+
+ +
+
angular.module('equalsExample', []).controller('ExampleController', ['$scope', function($scope) {
  $scope.user1 = {};
  $scope.user2 = {};
  $scope.compare = function() {
    $scope.result = angular.equals($scope.user1, $scope.user2);
  };
}]);
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.errorHandlingConfig.html b/1.6.6/docs/partials/api/ng/function/angular.errorHandlingConfig.html new file mode 100644 index 000000000..32825a34e --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.errorHandlingConfig.html @@ -0,0 +1,101 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.errorHandlingConfig

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

Configure several aspects of error handling in AngularJS if used as a setter or return the +current configuration if used as a getter. The following options are supported:

+
    +
  • objectMaxDepth: The maximum depth to which objects are traversed when stringified for error messages.
  • +
+

Omitted or undefined options will leave the corresponding configuration values unchanged.

+ +
+ + + + +
+ + + + +

Usage

+ +

angular.errorHandlingConfig([config]);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ config + +
(optional)
+
+ Object + +

The configuration object. May only contain the options that need to be + updated. Supported keys:

+
    +
  • objectMaxDepth {Number} - The max depth for stringifying objects. Setting to a +non-positive or non-numeric value, removes the max depth limit. +Default: 5
  • +
+ + +
+ +
+ + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.extend.html b/1.6.6/docs/partials/api/ng/function/angular.extend.html new file mode 100644 index 000000000..7beb48b51 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.extend.html @@ -0,0 +1,117 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.extend

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

Extends the destination object dst by copying own enumerable properties from the src object(s) +to dst. You can specify multiple src objects. If you want to preserve original objects, you can do so +by passing an empty object as the target: var object = angular.extend({}, object1, object2).

+

Note: Keep in mind that angular.extend does not support recursive merge (deep copy). Use +angular.merge for this.

+ +
+ + + + +
+ + + + +

Usage

+ +

angular.extend(dst, src);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ dst + + + + Object + +

Destination object.

+ + +
+ src + + + + Object + +

Source object(s).

+ + +
+ +
+ +

Returns

+ + + + + +
Object

Reference to dst.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.forEach.html b/1.6.6/docs/partials/api/ng/function/angular.forEach.html new file mode 100644 index 000000000..bd211f06e --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.forEach.html @@ -0,0 +1,145 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.forEach

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

Invokes the iterator function once for each item in obj collection, which can be either an +object or an array. The iterator function is invoked with iterator(value, key, obj), where value +is the value of an object property or an array element, key is the object property key or +array element index and obj is the obj itself. Specifying a context for the function is optional.

+

It is worth noting that .forEach does not iterate over inherited properties because it filters +using the hasOwnProperty method.

+

Unlike ES262's +Array.prototype.forEach, +providing 'undefined' or 'null' values for obj will not throw a TypeError, but rather just +return the value provided.

+
var values = {name: 'misko', gender: 'male'};
+var log = [];
+angular.forEach(values, function(value, key) {
+  this.push(key + ': ' + value);
+}, log);
+expect(log).toEqual(['name: misko', 'gender: male']);
+
+ +
+ + + + +
+ + + + +

Usage

+ +

angular.forEach(obj, iterator, [context]);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ obj + + + + ObjectArray + +

Object to iterate over.

+ + +
+ iterator + + + + Function + +

Iterator function.

+ + +
+ context + +
(optional)
+
+ Object + +

Object to become context (this) for the iterator function.

+ + +
+ +
+ +

Returns

+ + + + + +
ObjectArray

Reference to obj.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.fromJson.html b/1.6.6/docs/partials/api/ng/function/angular.fromJson.html new file mode 100644 index 000000000..43f4e7ecd --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.fromJson.html @@ -0,0 +1,97 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.fromJson

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

Deserializes a JSON string.

+ +
+ + + + +
+ + + + +

Usage

+ +

angular.fromJson(json);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ json + + + + string + +

JSON string to deserialize.

+ + +
+ +
+ +

Returns

+ + + + + +
ObjectArraystringnumber

Deserialized JSON string.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.identity.html b/1.6.6/docs/partials/api/ng/function/angular.identity.html new file mode 100644 index 000000000..a9c0536b2 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.identity.html @@ -0,0 +1,111 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.identity

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

A function that returns its first argument. This function is useful when writing code in the +functional style.

+
function transformer(transformationFn, value) {
+  return (transformationFn || angular.identity)(value);
+};
+
+// E.g.
+function getResult(fn, input) {
+  return (fn || angular.identity)(input);
+};
+
+getResult(function(n) { return n * 2; }, 21);   // returns 42
+getResult(null, 21);                            // returns 21
+getResult(undefined, 21);                       // returns 21
+
+ +
+ + + + +
+ + + + +

Usage

+ +

angular.identity(value);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ value + + + + * + +

to be returned.

+ + +
+ +
+ +

Returns

+ + + + + +
*

the value passed in.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.injector.html b/1.6.6/docs/partials/api/ng/function/angular.injector.html new file mode 100644 index 000000000..67645198f --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.injector.html @@ -0,0 +1,145 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.injector

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

Creates an injector object that can be used for retrieving services as well as for +dependency injection (see dependency injection).

+ +
+ + + + +
+ + + + +

Usage

+ +

angular.injector(modules, [strictDi]);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ modules + + + + Array.<string|Function> + +

A list of module functions or their aliases. See + angular.module. The ng module must be explicitly added.

+ + +
+ strictDi + +
(optional)
+
+ boolean + +

Whether the injector should be in strict mode, which + disallows argument name annotation inference.

+ +

(default: false)

+
+ +
+ +

Returns

+ + + + + +
injector

Injector object. See $injector.

+
+ + + + + + + + +

Examples

Typical usage

+
// create an injector
+var $injector = angular.injector(['ng']);
+
+// use the injector to kick off your application
+// use the type inference to auto inject arguments, or use implicit injection
+$injector.invoke(function($rootScope, $compile, $document) {
+  $compile($document)($rootScope);
+  $rootScope.$digest();
+});
+
+

Sometimes you want to get access to the injector of a currently running Angular app +from outside Angular. Perhaps, you want to inject and compile some markup after the +application has been bootstrapped. You can do this using the extra injector() added +to JQuery/jqLite elements. See angular.element.

+

This is fairly rare but could be the case if a third party library is injecting the +markup.

+

In the following example a new block of HTML containing a ng-controller +directive is added to the end of the document body by JQuery. We then compile and link +it into the current AngularJS scope.

+
var $div = $('<div ng-controller="MyCtrl">{{content.label}}</div>');
+$(document.body).append($div);
+
+angular.element(document).injector().invoke(function($compile) {
+  var scope = angular.element($div).scope();
+  $compile($div)(scope);
+});
+
+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.isArray.html b/1.6.6/docs/partials/api/ng/function/angular.isArray.html new file mode 100644 index 000000000..d406c792f --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.isArray.html @@ -0,0 +1,97 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.isArray

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

Determines if a reference is an Array. Alias of Array.isArray.

+ +
+ + + + +
+ + + + +

Usage

+ +

angular.isArray(value);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ value + + + + * + +

Reference to check.

+ + +
+ +
+ +

Returns

+ + + + + +
boolean

True if value is an Array.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.isDate.html b/1.6.6/docs/partials/api/ng/function/angular.isDate.html new file mode 100644 index 000000000..c8867017c --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.isDate.html @@ -0,0 +1,97 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.isDate

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

Determines if a value is a date.

+ +
+ + + + +
+ + + + +

Usage

+ +

angular.isDate(value);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ value + + + + * + +

Reference to check.

+ + +
+ +
+ +

Returns

+ + + + + +
boolean

True if value is a Date.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.isDefined.html b/1.6.6/docs/partials/api/ng/function/angular.isDefined.html new file mode 100644 index 000000000..d080288c2 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.isDefined.html @@ -0,0 +1,97 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.isDefined

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

Determines if a reference is defined.

+ +
+ + + + +
+ + + + +

Usage

+ +

angular.isDefined(value);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ value + + + + * + +

Reference to check.

+ + +
+ +
+ +

Returns

+ + + + + +
boolean

True if value is defined.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.isElement.html b/1.6.6/docs/partials/api/ng/function/angular.isElement.html new file mode 100644 index 000000000..352a9eb5f --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.isElement.html @@ -0,0 +1,97 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.isElement

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

Determines if a reference is a DOM element (or wrapped jQuery element).

+ +
+ + + + +
+ + + + +

Usage

+ +

angular.isElement(value);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ value + + + + * + +

Reference to check.

+ + +
+ +
+ +

Returns

+ + + + + +
boolean

True if value is a DOM element (or wrapped jQuery element).

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.isFunction.html b/1.6.6/docs/partials/api/ng/function/angular.isFunction.html new file mode 100644 index 000000000..458f8a4c7 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.isFunction.html @@ -0,0 +1,97 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.isFunction

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

Determines if a reference is a Function.

+ +
+ + + + +
+ + + + +

Usage

+ +

angular.isFunction(value);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ value + + + + * + +

Reference to check.

+ + +
+ +
+ +

Returns

+ + + + + +
boolean

True if value is a Function.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.isNumber.html b/1.6.6/docs/partials/api/ng/function/angular.isNumber.html new file mode 100644 index 000000000..97f922af8 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.isNumber.html @@ -0,0 +1,101 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.isNumber

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

Determines if a reference is a Number.

+

This includes the "special" numbers NaN, +Infinity and -Infinity.

+

If you wish to exclude these then you can use the native +`isFinite' +method.

+ +
+ + + + +
+ + + + +

Usage

+ +

angular.isNumber(value);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ value + + + + * + +

Reference to check.

+ + +
+ +
+ +

Returns

+ + + + + +
boolean

True if value is a Number.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.isObject.html b/1.6.6/docs/partials/api/ng/function/angular.isObject.html new file mode 100644 index 000000000..b72392594 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.isObject.html @@ -0,0 +1,98 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.isObject

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

Determines if a reference is an Object. Unlike typeof in JavaScript, nulls are not +considered to be objects. Note that JavaScript arrays are objects.

+ +
+ + + + +
+ + + + +

Usage

+ +

angular.isObject(value);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ value + + + + * + +

Reference to check.

+ + +
+ +
+ +

Returns

+ + + + + +
boolean

True if value is an Object but not null.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.isString.html b/1.6.6/docs/partials/api/ng/function/angular.isString.html new file mode 100644 index 000000000..519f04e11 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.isString.html @@ -0,0 +1,97 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.isString

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

Determines if a reference is a String.

+ +
+ + + + +
+ + + + +

Usage

+ +

angular.isString(value);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ value + + + + * + +

Reference to check.

+ + +
+ +
+ +

Returns

+ + + + + +
boolean

True if value is a String.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.isUndefined.html b/1.6.6/docs/partials/api/ng/function/angular.isUndefined.html new file mode 100644 index 000000000..1ae1d9c5b --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.isUndefined.html @@ -0,0 +1,97 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.isUndefined

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

Determines if a reference is undefined.

+ +
+ + + + +
+ + + + +

Usage

+ +

angular.isUndefined(value);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ value + + + + * + +

Reference to check.

+ + +
+ +
+ +

Returns

+ + + + + +
boolean

True if value is undefined.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.lowercase.html b/1.6.6/docs/partials/api/ng/function/angular.lowercase.html new file mode 100644 index 000000000..f544f1a7c --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.lowercase.html @@ -0,0 +1,106 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.lowercase

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + +
+
Deprecated: + (since 1.5.0) + (to be removed in 1.7.0) +
+

Use String.prototype.toLowerCase instead.

+ +
+ + + +
+

Converts the specified string to lowercase.

+ +
+ + + + +
+ + + + +

Usage

+ +

angular.lowercase(string);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ string + + + + string + +

String to be converted to lowercase.

+ + +
+ +
+ +

Returns

+ + + + + +
string

Lowercased string.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.merge.html b/1.6.6/docs/partials/api/ng/function/angular.merge.html new file mode 100644 index 000000000..e8af5786f --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.merge.html @@ -0,0 +1,141 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.merge

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + +
+
Deprecated: + (since 1.6.5) + +
+

This function is deprecated, but will not be removed in the 1.x lifecycle. +There are edge cases (see known issues) that are not +supported by this function. We suggest +using lodash's merge() instead.

+ +
+ + + +
+

Deeply extends the destination object dst by copying own enumerable properties from the src object(s) +to dst. You can specify multiple src objects. If you want to preserve original objects, you can do so +by passing an empty object as the target: var object = angular.merge({}, object1, object2).

+

Unlike extend(), merge() recursively descends into object properties of source +objects, performing a deep copy.

+ +
+ + + +

Known Issues

+
+

This is a list of (known) object types that are not handled correctly by this function:

+ + +
+ + +
+ + + + +

Usage

+ +

angular.merge(dst, src);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ dst + + + + Object + +

Destination object.

+ + +
+ src + + + + Object + +

Source object(s).

+ + +
+ +
+ +

Returns

+ + + + + +
Object

Reference to dst.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.module.html b/1.6.6/docs/partials/api/ng/function/angular.module.html new file mode 100644 index 000000000..15e49870b --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.module.html @@ -0,0 +1,157 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.module

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

The angular.module is a global place for creating, registering and retrieving Angular +modules. +All modules (angular core or 3rd party) that should be available to an application must be +registered using this mechanism.

+

Passing one argument retrieves an existing angular.Module, +whereas passing more than one argument creates a new angular.Module

+

Module

+

A module is a collection of services, directives, controllers, filters, and configuration information. +angular.module is used to configure the $injector.

+
// Create a new module
+var myModule = angular.module('myModule', []);
+
+// register a new service
+myModule.value('appName', 'MyCoolApp');
+
+// configure existing services inside initialization blocks.
+myModule.config(['$locationProvider', function($locationProvider) {
+  // Configure existing providers
+  $locationProvider.hashPrefix('!');
+}]);
+
+

Then you can create an injector and load your modules like this:

+
var injector = angular.injector(['ng', 'myModule'])
+
+

However it's more likely that you'll just use +ngApp or +angular.bootstrap to simplify this process for you.

+ +
+ + + + +
+ + + + +

Usage

+ +

angular.module(name, [requires], [configFn]);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ name + + + + string + +

The name of the module to create or retrieve.

+ + +
+ requires + +
(optional)
+
+ !Array.<string>= + +

If specified then new module is being created. If + unspecified then the module is being retrieved for further configuration.

+ + +
+ configFn + +
(optional)
+
+ Function= + +

Optional configuration function for the module. Same as + Module#config().

+ + +
+ +
+ +

Returns

+ + + + + +
angular.Module

new module with the angular.Module api.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.noop.html b/1.6.6/docs/partials/api/ng/function/angular.noop.html new file mode 100644 index 000000000..59e66f698 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.noop.html @@ -0,0 +1,63 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.noop

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

A function that performs no operations. This function can be useful when writing code in the +functional style.

+
function foo(callback) {
+  var result = calculateResult();
+  (callback || angular.noop)(result);
+}
+
+ +
+ + + + +
+ + + + +

Usage

+ +

angular.noop();

+ + + + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.reloadWithDebugInfo.html b/1.6.6/docs/partials/api/ng/function/angular.reloadWithDebugInfo.html new file mode 100644 index 000000000..f64cca100 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.reloadWithDebugInfo.html @@ -0,0 +1,50 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.reloadWithDebugInfo

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

Use this function to reload the current application with debug information turned on. +This takes precedence over a call to $compileProvider.debugInfoEnabled(false).

+

See $compileProvider for more.

+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.toJson.html b/1.6.6/docs/partials/api/ng/function/angular.toJson.html new file mode 100644 index 000000000..65c3c8257 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.toJson.html @@ -0,0 +1,136 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.toJson

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + + + +
+

Serializes input into a JSON-formatted string. Properties with leading $$ characters will be +stripped since angular uses this notation internally.

+ +
+ + + +

Known Issues

+
+

The Safari browser throws a RangeError instead of returning null when it tries to stringify a Date +object with an invalid date value. The only reliable way to prevent this is to monkeypatch the +Date.prototype.toJSON method as follows:

+
var _DatetoJSON = Date.prototype.toJSON;
+Date.prototype.toJSON = function() {
+  try {
+    return _DatetoJSON.call(this);
+  } catch(e) {
+    if (e instanceof RangeError) {
+      return null;
+    }
+    throw e;
+  }
+};
+
+

See https://github.com/angular/angular.js/pull/14221 for more information.

+ +
+ + +
+ + + + +

Usage

+ +

angular.toJson(obj, pretty);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ obj + + + + ObjectArrayDatestringnumberboolean + +

Input to be serialized into JSON.

+ + +
+ pretty + +
(optional)
+
+ booleannumber + +

If set to true, the JSON output will contain newlines and whitespace. + If set to an integer, the JSON output will contain that many spaces per indentation.

+ +

(default: 2)

+
+ +
+ +

Returns

+ + + + + +
stringundefined

JSON-ified string representing obj.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/function/angular.uppercase.html b/1.6.6/docs/partials/api/ng/function/angular.uppercase.html new file mode 100644 index 000000000..ceb59f275 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/function/angular.uppercase.html @@ -0,0 +1,106 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.uppercase

+
    + +
  1. + - function in module ng +
  2. +
+
+ + + +
+
Deprecated: + (since 1.5.0) + (to be removed in 1.7.0) +
+

Use String.prototype.toUpperCase instead.

+ +
+ + + +
+

Converts the specified string to uppercase.

+ +
+ + + + +
+ + + + +

Usage

+ +

angular.uppercase(string);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ string + + + + string + +

String to be converted to uppercase.

+ + +
+ +
+ +

Returns

+ + + + + +
string

Uppercased string.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/input.html b/1.6.6/docs/partials/api/ng/input.html new file mode 100644 index 000000000..fa86b69cb --- /dev/null +++ b/1.6.6/docs/partials/api/ng/input.html @@ -0,0 +1,105 @@ + +

Input components in ng

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
input[text]

Standard HTML text input with angular data binding, inherited by most of the input elements.

+
input[date]

Input with date validation and transformation. In browsers that do not yet support +the HTML5 date input, a text element will be used. In that case, text must be entered in a valid ISO-8601 +date format (yyyy-MM-dd), for example: 2009-01-06. Since many +modern browsers do not yet support this input type, it is important to provide cues to users on the +expected input format via a placeholder or label.

+
input[datetime-local]

Input with datetime validation and transformation. In browsers that do not yet support +the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601 +local datetime format (yyyy-MM-ddTHH:mm:ss), for example: 2010-12-28T14:57:00.

+
input[time]

Input with time validation and transformation. In browsers that do not yet support +the HTML5 time input, a text element will be used. In that case, the text must be entered in a valid ISO-8601 +local time format (HH:mm:ss), for example: 14:57:00. Model must be a Date object. This binding will always output a +Date object to the model of January 1, 1970, or local date new Date(1970, 0, 1, HH, mm, ss).

+
input[week]

Input with week-of-the-year validation and transformation to Date. In browsers that do not yet support +the HTML5 week input, a text element will be used. In that case, the text must be entered in a valid ISO-8601 +week format (yyyy-W##), for example: 2013-W02.

+
input[month]

Input with month validation and transformation. In browsers that do not yet support +the HTML5 month input, a text element will be used. In that case, the text must be entered in a valid ISO-8601 +month format (yyyy-MM), for example: 2009-01.

+
input[number]

Text input with number validation and transformation. Sets the number validation +error if not a valid number.

+
input[url]

Text input with URL validation. Sets the url validation error key if the content is not a +valid URL.

+
input[email]

Text input with email validation. Sets the email validation error key if not a valid email +address.

+
input[radio]

HTML radio button.

+
input[range]

Native range input with validation and transformation.

+
input[checkbox]

HTML checkbox.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ng/input/input[checkbox].html b/1.6.6/docs/partials/api/ng/input/input[checkbox].html new file mode 100644 index 000000000..a90ac3dc2 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/input/input[checkbox].html @@ -0,0 +1,183 @@ + Improve this Doc + + + + +  View Source + + + +
+

input[checkbox]

+
    + +
  1. + - input in module ng +
  2. +
+
+ + + + + +
+

HTML checkbox.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
<input type="checkbox"
       ng-model="string"
       [name="string"]
       [ng-true-value="expression"]
       [ng-false-value="expression"]
       [ng-change="string"]>
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngModel + + + + string + +

Assignable angular expression to data-bind to.

+ + +
+ name + +
(optional)
+
+ string + +

Property name of the form under which the control is published.

+ + +
+ ngTrueValue + +
(optional)
+
+ expression + +

The value to which the expression should be set when selected.

+ + +
+ ngFalseValue + +
(optional)
+
+ expression + +

The value to which the expression should be set when not selected.

+ + +
+ ngChange + +
(optional)
+
+ string + +

Angular expression to be executed when input changes due to user + interaction with the input element.

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('checkboxExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.checkboxModel = {
       value1 : true,
       value2 : 'YES'
     };
    }]);
</script>
<form name="myForm" ng-controller="ExampleController">
  <label>Value1:
    <input type="checkbox" ng-model="checkboxModel.value1">
  </label><br/>
  <label>Value2:
    <input type="checkbox" ng-model="checkboxModel.value2"
           ng-true-value="'YES'" ng-false-value="'NO'">
   </label><br/>
  <tt>value1 = {{checkboxModel.value1}}</tt><br/>
  <tt>value2 = {{checkboxModel.value2}}</tt><br/>
 </form>
+
+ +
+
it('should change state', function() {
  var value1 = element(by.binding('checkboxModel.value1'));
  var value2 = element(by.binding('checkboxModel.value2'));

  expect(value1.getText()).toContain('true');
  expect(value2.getText()).toContain('YES');

  element(by.model('checkboxModel.value1')).click();
  element(by.model('checkboxModel.value2')).click();

  expect(value1.getText()).toContain('false');
  expect(value2.getText()).toContain('NO');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/input/input[date].html b/1.6.6/docs/partials/api/ng/input/input[date].html new file mode 100644 index 000000000..db82228c9 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/input/input[date].html @@ -0,0 +1,265 @@ + Improve this Doc + + + + +  View Source + + + +
+

input[date]

+
    + +
  1. + - input in module ng +
  2. +
+
+ + + + + +
+

Input with date validation and transformation. In browsers that do not yet support +the HTML5 date input, a text element will be used. In that case, text must be entered in a valid ISO-8601 +date format (yyyy-MM-dd), for example: 2009-01-06. Since many +modern browsers do not yet support this input type, it is important to provide cues to users on the +expected input format via a placeholder or label.

+

The model must always be a Date object, otherwise Angular will throw an error. +Invalid Date objects (dates whose getTime() is NaN) will be rendered as an empty string.

+

The timezone to be used to read/write the Date instance in the model can be defined using +ngModelOptions. By default, this is the timezone of the browser.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
<input type="date"
       ng-model="string"
       [name="string"]
       [min="string"]
       [max="string"]
       [ng-min=""]
       [ng-max=""]
       [required="string"]
       [ng-required="string"]
       [ng-change="string"]>
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngModel + + + + string + +

Assignable angular expression to data-bind to.

+ + +
+ name + +
(optional)
+
+ string + +

Property name of the form under which the control is published.

+ + +
+ min + +
(optional)
+
+ string + +

Sets the min validation error key if the value entered is less than min. This must be a + valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute + (e.g. min="{{minDate | date:'yyyy-MM-dd'}}"). Note that min will also add native HTML5 + constraint validation.

+ + +
+ max + +
(optional)
+
+ string + +

Sets the max validation error key if the value entered is greater than max. This must be + a valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute + (e.g. max="{{maxDate | date:'yyyy-MM-dd'}}"). Note that max will also add native HTML5 + constraint validation.

+ + +
+ ngMin + +
(optional)
+
+ datestring + +

Sets the min validation constraint to the Date / ISO date string + the ngMin expression evaluates to. Note that it does not set the min attribute.

+ + +
+ ngMax + +
(optional)
+
+ datestring + +

Sets the max validation constraint to the Date / ISO date string + the ngMax expression evaluates to. Note that it does not set the max attribute.

+ + +
+ required + +
(optional)
+
+ string + +

Sets required validation error key if the value is not entered.

+ + +
+ ngRequired + +
(optional)
+
+ string + +

Adds required attribute and required validation constraint to + the element when the ngRequired expression evaluates to true. Use ngRequired instead of + required when you want to data-bind to the required attribute.

+ + +
+ ngChange + +
(optional)
+
+ string + +

Angular expression to be executed when input changes due to user + interaction with the input element.

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
   angular.module('dateInputExample', [])
     .controller('DateController', ['$scope', function($scope) {
       $scope.example = {
         value: new Date(2013, 9, 22)
       };
     }]);
</script>
<form name="myForm" ng-controller="DateController as dateCtrl">
   <label for="exampleInput">Pick a date in 2013:</label>
   <input type="date" id="exampleInput" name="input" ng-model="example.value"
       placeholder="yyyy-MM-dd" min="2013-01-01" max="2013-12-31" required />
   <div role="alert">
     <span class="error" ng-show="myForm.input.$error.required">
         Required!</span>
     <span class="error" ng-show="myForm.input.$error.date">
         Not a valid date!</span>
    </div>
    <tt>value = {{example.value | date: "yyyy-MM-dd"}}</tt><br/>
    <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
    <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
    <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
    <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
</form>
+
+ +
+
var value = element(by.binding('example.value | date: "yyyy-MM-dd"'));
var valid = element(by.binding('myForm.input.$valid'));

// currently protractor/webdriver does not support
// sending keys to all known HTML5 input controls
// for various browsers (see https://github.com/angular/protractor/issues/562).
function setInput(val) {
  // set the value of the element and force validation.
  var scr = "var ipt = document.getElementById('exampleInput'); " +
  "ipt.value = '" + val + "';" +
  "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });";
  browser.executeScript(scr);
}

it('should initialize to model', function() {
  expect(value.getText()).toContain('2013-10-22');
  expect(valid.getText()).toContain('myForm.input.$valid = true');
});

it('should be invalid if empty', function() {
  setInput('');
  expect(value.getText()).toEqual('value =');
  expect(valid.getText()).toContain('myForm.input.$valid = false');
});

it('should be invalid if over max', function() {
  setInput('2015-01-01');
  expect(value.getText()).toContain('');
  expect(valid.getText()).toContain('myForm.input.$valid = false');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/input/input[datetime-local].html b/1.6.6/docs/partials/api/ng/input/input[datetime-local].html new file mode 100644 index 000000000..75a4dc276 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/input/input[datetime-local].html @@ -0,0 +1,263 @@ + Improve this Doc + + + + +  View Source + + + +
+

input[datetime-local]

+
    + +
  1. + - input in module ng +
  2. +
+
+ + + + + +
+

Input with datetime validation and transformation. In browsers that do not yet support +the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601 +local datetime format (yyyy-MM-ddTHH:mm:ss), for example: 2010-12-28T14:57:00.

+

The model must always be a Date object, otherwise Angular will throw an error. +Invalid Date objects (dates whose getTime() is NaN) will be rendered as an empty string.

+

The timezone to be used to read/write the Date instance in the model can be defined using +ngModelOptions. By default, this is the timezone of the browser.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
<input type="datetime-local"
       ng-model="string"
       [name="string"]
       [min="string"]
       [max="string"]
       [ng-min=""]
       [ng-max=""]
       [required="string"]
       [ng-required="string"]
       [ng-change="string"]>
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngModel + + + + string + +

Assignable angular expression to data-bind to.

+ + +
+ name + +
(optional)
+
+ string + +

Property name of the form under which the control is published.

+ + +
+ min + +
(optional)
+
+ string + +

Sets the min validation error key if the value entered is less than min. + This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation + inside this attribute (e.g. min="{{minDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}"). + Note that min will also add native HTML5 constraint validation.

+ + +
+ max + +
(optional)
+
+ string + +

Sets the max validation error key if the value entered is greater than max. + This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation + inside this attribute (e.g. max="{{maxDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}"). + Note that max will also add native HTML5 constraint validation.

+ + +
+ ngMin + +
(optional)
+
+ datestring + +

Sets the min validation error key to the Date / ISO datetime string + the ngMin expression evaluates to. Note that it does not set the min attribute.

+ + +
+ ngMax + +
(optional)
+
+ datestring + +

Sets the max validation error key to the Date / ISO datetime string + the ngMax expression evaluates to. Note that it does not set the max attribute.

+ + +
+ required + +
(optional)
+
+ string + +

Sets required validation error key if the value is not entered.

+ + +
+ ngRequired + +
(optional)
+
+ string + +

Adds required attribute and required validation constraint to + the element when the ngRequired expression evaluates to true. Use ngRequired instead of + required when you want to data-bind to the required attribute.

+ + +
+ ngChange + +
(optional)
+
+ string + +

Angular expression to be executed when input changes due to user + interaction with the input element.

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('dateExample', [])
    .controller('DateController', ['$scope', function($scope) {
      $scope.example = {
        value: new Date(2010, 11, 28, 14, 57)
      };
    }]);
</script>
<form name="myForm" ng-controller="DateController as dateCtrl">
  <label for="exampleInput">Pick a date between in 2013:</label>
  <input type="datetime-local" id="exampleInput" name="input" ng-model="example.value"
      placeholder="yyyy-MM-ddTHH:mm:ss" min="2001-01-01T00:00:00" max="2013-12-31T00:00:00" required />
  <div role="alert">
    <span class="error" ng-show="myForm.input.$error.required">
        Required!</span>
    <span class="error" ng-show="myForm.input.$error.datetimelocal">
        Not a valid date!</span>
  </div>
  <tt>value = {{example.value | date: "yyyy-MM-ddTHH:mm:ss"}}</tt><br/>
  <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
  <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
  <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
  <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
</form>
+
+ +
+
var value = element(by.binding('example.value | date: "yyyy-MM-ddTHH:mm:ss"'));
var valid = element(by.binding('myForm.input.$valid'));

// currently protractor/webdriver does not support
// sending keys to all known HTML5 input controls
// for various browsers (https://github.com/angular/protractor/issues/562).
function setInput(val) {
  // set the value of the element and force validation.
  var scr = "var ipt = document.getElementById('exampleInput'); " +
  "ipt.value = '" + val + "';" +
  "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });";
  browser.executeScript(scr);
}

it('should initialize to model', function() {
  expect(value.getText()).toContain('2010-12-28T14:57:00');
  expect(valid.getText()).toContain('myForm.input.$valid = true');
});

it('should be invalid if empty', function() {
  setInput('');
  expect(value.getText()).toEqual('value =');
  expect(valid.getText()).toContain('myForm.input.$valid = false');
});

it('should be invalid if over max', function() {
  setInput('2015-01-01T23:59:00');
  expect(value.getText()).toContain('');
  expect(valid.getText()).toContain('myForm.input.$valid = false');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/input/input[email].html b/1.6.6/docs/partials/api/ng/input/input[email].html new file mode 100644 index 000000000..d223c675d --- /dev/null +++ b/1.6.6/docs/partials/api/ng/input/input[email].html @@ -0,0 +1,267 @@ + Improve this Doc + + + + +  View Source + + + +
+

input[email]

+
    + +
  1. + - input in module ng +
  2. +
+
+ + + + + +
+

Text input with email validation. Sets the email validation error key if not a valid email +address.

+
+Note: input[email] uses a regex to validate email addresses that is derived from the regex +used in Chromium. If you need stricter validation (e.g. requiring a top-level domain), you can +use ng-pattern or modify the built-in validators (see the Forms guide) +
+
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
<input type="email"
       ng-model="string"
       [name="string"]
       [required="string"]
       [ng-required="string"]
       [ng-minlength="number"]
       [ng-maxlength="number"]
       [pattern="string"]
       [ng-pattern="string"]
       [ng-change="string"]>
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngModel + + + + string + +

Assignable angular expression to data-bind to.

+ + +
+ name + +
(optional)
+
+ string + +

Property name of the form under which the control is published.

+ + +
+ required + +
(optional)
+
+ string + +

Sets required validation error key if the value is not entered.

+ + +
+ ngRequired + +
(optional)
+
+ string + +

Adds required attribute and required validation constraint to + the element when the ngRequired expression evaluates to true. Use ngRequired instead of + required when you want to data-bind to the required attribute.

+ + +
+ ngMinlength + +
(optional)
+
+ number + +

Sets minlength validation error key if the value is shorter than + minlength.

+ + +
+ ngMaxlength + +
(optional)
+
+ number + +

Sets maxlength validation error key if the value is longer than + maxlength. Setting the attribute to a negative or non-numeric value, allows view values of + any length.

+ + +
+ pattern + +
(optional)
+
+ string + +

Similar to ngPattern except that the attribute value is the actual string + that contains the regular expression body that will be converted to a regular expression + as in the ngPattern directive.

+ + +
+ ngPattern + +
(optional)
+
+ string + +

Sets pattern validation error key if the ngModel $viewValue + does not match a RegExp found by evaluating the Angular expression given in the attribute value. + If the expression evaluates to a RegExp object, then this is used directly. + If the expression evaluates to a string, then it will be converted to a RegExp + after wrapping it in ^ and $ characters. For instance, "abc" will be converted to + new RegExp('^abc$').
+ Note: Avoid using the g flag on the RegExp, as it will cause each successive search to + start at the index of the last search's match, thus not taking the whole input value into + account.

+ + +
+ ngChange + +
(optional)
+
+ string + +

Angular expression to be executed when input changes due to user + interaction with the input element.

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('emailExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.email = {
        text: 'me@example.com'
      };
    }]);
</script>
  <form name="myForm" ng-controller="ExampleController">
    <label>Email:
      <input type="email" name="input" ng-model="email.text" required>
    </label>
    <div role="alert">
      <span class="error" ng-show="myForm.input.$error.required">
        Required!</span>
      <span class="error" ng-show="myForm.input.$error.email">
        Not valid email!</span>
    </div>
    <tt>text = {{email.text}}</tt><br/>
    <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
    <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
    <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
    <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
    <tt>myForm.$error.email = {{!!myForm.$error.email}}</tt><br/>
  </form>
+
+ +
+
var text = element(by.binding('email.text'));
var valid = element(by.binding('myForm.input.$valid'));
var input = element(by.model('email.text'));

it('should initialize to model', function() {
  expect(text.getText()).toContain('me@example.com');
  expect(valid.getText()).toContain('true');
});

it('should be invalid if empty', function() {
  input.clear();
  input.sendKeys('');
  expect(text.getText()).toEqual('text =');
  expect(valid.getText()).toContain('false');
});

it('should be invalid if not email', function() {
  input.clear();
  input.sendKeys('xxx');

  expect(valid.getText()).toContain('false');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/input/input[month].html b/1.6.6/docs/partials/api/ng/input/input[month].html new file mode 100644 index 000000000..95dc3dac4 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/input/input[month].html @@ -0,0 +1,265 @@ + Improve this Doc + + + + +  View Source + + + +
+

input[month]

+
    + +
  1. + - input in module ng +
  2. +
+
+ + + + + +
+

Input with month validation and transformation. In browsers that do not yet support +the HTML5 month input, a text element will be used. In that case, the text must be entered in a valid ISO-8601 +month format (yyyy-MM), for example: 2009-01.

+

The model must always be a Date object, otherwise Angular will throw an error. +Invalid Date objects (dates whose getTime() is NaN) will be rendered as an empty string. +If the model is not set to the first of the month, the next view to model update will set it +to the first of the month.

+

The timezone to be used to read/write the Date instance in the model can be defined using +ngModelOptions. By default, this is the timezone of the browser.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
<input type="month"
       ng-model="string"
       [name="string"]
       [min="string"]
       [max="string"]
       [ng-min=""]
       [ng-max=""]
       [required="string"]
       [ng-required="string"]
       [ng-change="string"]>
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngModel + + + + string + +

Assignable angular expression to data-bind to.

+ + +
+ name + +
(optional)
+
+ string + +

Property name of the form under which the control is published.

+ + +
+ min + +
(optional)
+
+ string + +

Sets the min validation error key if the value entered is less than min. + This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this + attribute (e.g. min="{{minMonth | date:'yyyy-MM'}}"). Note that min will also add + native HTML5 constraint validation.

+ + +
+ max + +
(optional)
+
+ string + +

Sets the max validation error key if the value entered is greater than max. + This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this + attribute (e.g. max="{{maxMonth | date:'yyyy-MM'}}"). Note that max will also add + native HTML5 constraint validation.

+ + +
+ ngMin + +
(optional)
+
+ datestring + +

Sets the min validation constraint to the Date / ISO week string + the ngMin expression evaluates to. Note that it does not set the min attribute.

+ + +
+ ngMax + +
(optional)
+
+ datestring + +

Sets the max validation constraint to the Date / ISO week string + the ngMax expression evaluates to. Note that it does not set the max attribute.

+ + +
+ required + +
(optional)
+
+ string + +

Sets required validation error key if the value is not entered.

+ + +
+ ngRequired + +
(optional)
+
+ string + +

Adds required attribute and required validation constraint to + the element when the ngRequired expression evaluates to true. Use ngRequired instead of + required when you want to data-bind to the required attribute.

+ + +
+ ngChange + +
(optional)
+
+ string + +

Angular expression to be executed when input changes due to user + interaction with the input element.

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
 angular.module('monthExample', [])
   .controller('DateController', ['$scope', function($scope) {
     $scope.example = {
       value: new Date(2013, 9, 1)
     };
   }]);
</script>
<form name="myForm" ng-controller="DateController as dateCtrl">
  <label for="exampleInput">Pick a month in 2013:</label>
  <input id="exampleInput" type="month" name="input" ng-model="example.value"
     placeholder="yyyy-MM" min="2013-01" max="2013-12" required />
  <div role="alert">
    <span class="error" ng-show="myForm.input.$error.required">
       Required!</span>
    <span class="error" ng-show="myForm.input.$error.month">
       Not a valid month!</span>
  </div>
  <tt>value = {{example.value | date: "yyyy-MM"}}</tt><br/>
  <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
  <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
  <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
  <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
</form>
+
+ +
+
var value = element(by.binding('example.value | date: "yyyy-MM"'));
var valid = element(by.binding('myForm.input.$valid'));

// currently protractor/webdriver does not support
// sending keys to all known HTML5 input controls
// for various browsers (https://github.com/angular/protractor/issues/562).
function setInput(val) {
  // set the value of the element and force validation.
  var scr = "var ipt = document.getElementById('exampleInput'); " +
  "ipt.value = '" + val + "';" +
  "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });";
  browser.executeScript(scr);
}

it('should initialize to model', function() {
  expect(value.getText()).toContain('2013-10');
  expect(valid.getText()).toContain('myForm.input.$valid = true');
});

it('should be invalid if empty', function() {
  setInput('');
  expect(value.getText()).toEqual('value =');
  expect(valid.getText()).toContain('myForm.input.$valid = false');
});

it('should be invalid if over max', function() {
  setInput('2015-01');
  expect(value.getText()).toContain('');
  expect(valid.getText()).toContain('myForm.input.$valid = false');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/input/input[number].html b/1.6.6/docs/partials/api/ng/input/input[number].html new file mode 100644 index 000000000..8ee475a12 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/input/input[number].html @@ -0,0 +1,378 @@ + Improve this Doc + + + + +  View Source + + + +
+

input[number]

+
    + +
  1. + - input in module ng +
  2. +
+
+ + + + + +
+

Text input with number validation and transformation. Sets the number validation +error if not a valid number.

+
+The model must always be of type number otherwise Angular will throw an error. +Be aware that a string containing a number is not enough. See the numfmt +error docs for more information and an example of how to convert your model if necessary. +
+ +

Issues with HTML5 constraint validation

+

In browsers that follow the +HTML5 specification, +input[number] does not work as expected with ngModelOptions.allowInvalid. +If a non-number is entered in the input, the browser will report the value as an empty string, +which means the view / model values in ngModel and subsequently the scope value +will also be an empty string.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
<input type="number"
       ng-model="string"
       [name="string"]
       [min="string"]
       [max="string"]
       [ng-min="string"]
       [ng-max="string"]
       [step="string"]
       [ng-step="string"]
       [required="string"]
       [ng-required="string"]
       [ng-minlength="number"]
       [ng-maxlength="number"]
       [pattern="string"]
       [ng-pattern="string"]
       [ng-change="string"]>
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngModel + + + + string + +

Assignable angular expression to data-bind to.

+ + +
+ name + +
(optional)
+
+ string + +

Property name of the form under which the control is published.

+ + +
+ min + +
(optional)
+
+ string + +

Sets the min validation error key if the value entered is less than min. + Can be interpolated.

+ + +
+ max + +
(optional)
+
+ string + +

Sets the max validation error key if the value entered is greater than max. + Can be interpolated.

+ + +
+ ngMin + +
(optional)
+
+ string + +

Like min, sets the min validation error key if the value entered is less than ngMin, + but does not trigger HTML5 native validation. Takes an expression.

+ + +
+ ngMax + +
(optional)
+
+ string + +

Like max, sets the max validation error key if the value entered is greater than ngMax, + but does not trigger HTML5 native validation. Takes an expression.

+ + +
+ step + +
(optional)
+
+ string + +

Sets the step validation error key if the value entered does not fit the step constraint. + Can be interpolated.

+ + +
+ ngStep + +
(optional)
+
+ string + +

Like step, sets the step validation error key if the value entered does not fit the ngStep constraint, + but does not trigger HTML5 native validation. Takes an expression.

+ + +
+ required + +
(optional)
+
+ string + +

Sets required validation error key if the value is not entered.

+ + +
+ ngRequired + +
(optional)
+
+ string + +

Adds required attribute and required validation constraint to + the element when the ngRequired expression evaluates to true. Use ngRequired instead of + required when you want to data-bind to the required attribute.

+ + +
+ ngMinlength + +
(optional)
+
+ number + +

Sets minlength validation error key if the value is shorter than + minlength.

+ + +
+ ngMaxlength + +
(optional)
+
+ number + +

Sets maxlength validation error key if the value is longer than + maxlength. Setting the attribute to a negative or non-numeric value, allows view values of + any length.

+ + +
+ pattern + +
(optional)
+
+ string + +

Similar to ngPattern except that the attribute value is the actual string + that contains the regular expression body that will be converted to a regular expression + as in the ngPattern directive.

+ + +
+ ngPattern + +
(optional)
+
+ string + +

Sets pattern validation error key if the ngModel $viewValue + does not match a RegExp found by evaluating the Angular expression given in the attribute value. + If the expression evaluates to a RegExp object, then this is used directly. + If the expression evaluates to a string, then it will be converted to a RegExp + after wrapping it in ^ and $ characters. For instance, "abc" will be converted to + new RegExp('^abc$').
+ Note: Avoid using the g flag on the RegExp, as it will cause each successive search to + start at the index of the last search's match, thus not taking the whole input value into + account.

+ + +
+ ngChange + +
(optional)
+
+ string + +

Angular expression to be executed when input changes due to user + interaction with the input element.

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('numberExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.example = {
        value: 12
      };
    }]);
</script>
<form name="myForm" ng-controller="ExampleController">
  <label>Number:
    <input type="number" name="input" ng-model="example.value"
           min="0" max="99" required>
 </label>
  <div role="alert">
    <span class="error" ng-show="myForm.input.$error.required">
      Required!</span>
    <span class="error" ng-show="myForm.input.$error.number">
      Not valid number!</span>
  </div>
  <tt>value = {{example.value}}</tt><br/>
  <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
  <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
  <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
  <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
 </form>
+
+ +
+
var value = element(by.binding('example.value'));
var valid = element(by.binding('myForm.input.$valid'));
var input = element(by.model('example.value'));

it('should initialize to model', function() {
  expect(value.getText()).toContain('12');
  expect(valid.getText()).toContain('true');
});

it('should be invalid if empty', function() {
  input.clear();
  input.sendKeys('');
  expect(value.getText()).toEqual('value =');
  expect(valid.getText()).toContain('false');
});

it('should be invalid if over max', function() {
  input.clear();
  input.sendKeys('123');
  expect(value.getText()).toEqual('value =');
  expect(valid.getText()).toContain('false');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/input/input[radio].html b/1.6.6/docs/partials/api/ng/input/input[radio].html new file mode 100644 index 000000000..e376c7be5 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/input/input[radio].html @@ -0,0 +1,187 @@ + Improve this Doc + + + + +  View Source + + + +
+

input[radio]

+
    + +
  1. + - input in module ng +
  2. +
+
+ + + + + +
+

HTML radio button.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
<input type="radio"
       ng-model="string"
       value="string"
       [name="string"]
       [ng-change="string"]
       ng-value="string">
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngModel + + + + string + +

Assignable angular expression to data-bind to.

+ + +
+ value + + + + string + +

The value to which the ngModel expression should be set when selected. + Note that value only supports string values, i.e. the scope model needs to be a string, + too. Use ngValue if you need complex models (number, object, ...).

+ + +
+ name + +
(optional)
+
+ string + +

Property name of the form under which the control is published.

+ + +
+ ngChange + +
(optional)
+
+ string + +

Angular expression to be executed when input changes due to user + interaction with the input element.

+ + +
+ ngValue + + + + string + +

Angular expression to which ngModel will be be set when the radio + is selected. Should be used instead of the value attribute if you need + a non-string ngModel (boolean, array, ...).

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('radioExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.color = {
        name: 'blue'
      };
      $scope.specialValue = {
        "id": "12345",
        "value": "green"
      };
    }]);
</script>
<form name="myForm" ng-controller="ExampleController">
  <label>
    <input type="radio" ng-model="color.name" value="red">
    Red
  </label><br/>
  <label>
    <input type="radio" ng-model="color.name" ng-value="specialValue">
    Green
  </label><br/>
  <label>
    <input type="radio" ng-model="color.name" value="blue">
    Blue
  </label><br/>
  <tt>color = {{color.name | json}}</tt><br/>
 </form>
 Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`.
+
+ +
+
it('should change state', function() {
  var inputs = element.all(by.model('color.name'));
  var color = element(by.binding('color.name'));

  expect(color.getText()).toContain('blue');

  inputs.get(0).click();
  expect(color.getText()).toContain('red');

  inputs.get(1).click();
  expect(color.getText()).toContain('green');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/input/input[range].html b/1.6.6/docs/partials/api/ng/input/input[range].html new file mode 100644 index 000000000..bbdadc2ce --- /dev/null +++ b/1.6.6/docs/partials/api/ng/input/input[range].html @@ -0,0 +1,274 @@ + Improve this Doc + + + + +  View Source + + + +
+

input[range]

+
    + +
  1. + - input in module ng +
  2. +
+
+ + + + + +
+

Native range input with validation and transformation.

+

The model for the range input must always be a Number.

+

IE9 and other browsers that do not support the range type fall back +to a text input without any default values for min, max and step. Model binding, +validation and number parsing are nevertheless supported.

+

Browsers that support range (latest Chrome, Safari, Firefox, Edge) treat input[range] +in a way that never allows the input to hold an invalid value. That means:

+
    +
  • any non-numerical value is set to (max + min) / 2.
  • +
  • any numerical value that is less than the current min val, or greater than the current max val +is set to the min / max val respectively.
  • +
  • additionally, the current step is respected, so the nearest value that satisfies a step +is used.
  • +
+

See the HTML Spec on input[type=range]) +for more info.

+

This has the following consequences for Angular:

+

Since the element value should always reflect the current model value, a range input +will set the bound ngModel expression to the value that the browser has set for the +input element. For example, in the following input <input type="range" ng-model="model.value">, +if the application sets model.value = null, the browser will set the input to '50'. +Angular will then set the model to 50, to prevent input and model value being out of sync.

+

That means the model for range will immediately be set to 50 after ngModel has been +initialized. It also means a range input can never have the required error.

+

This does not only affect changes to the model value, but also to the values of the min, +max, and step attributes. When these change in a way that will cause the browser to modify +the input value, Angular will also update the model value.

+

Automatic value adjustment also means that a range input element can never have the required, +min, or max errors.

+

However, step is currently only fully implemented by Firefox. Other browsers have problems +when the step value changes dynamically - they do not adjust the element value correctly, but +instead may set the stepMismatch error. If that's the case, the Angular will set the step +error on the input, and set the model to undefined.

+

Note that input[range] is not compatible withngMax, ngMin, and ngStep, because they do +not set the min and max attributes, which means that the browser won't automatically adjust +the input value based on their values, and will always assume min = 0, max = 100, and step = 1.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
<input type="range"
       ng-model="string"
       [name="string"]
       [min="string"]
       [max="string"]
       [step="string"]
       [ng-change="string"]
       [ng-checked="expression"]>
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngModel + + + + string + +

Assignable angular expression to data-bind to.

+ + +
+ name + +
(optional)
+
+ string + +

Property name of the form under which the control is published.

+ + +
+ min + +
(optional)
+
+ string + +

Sets the min validation to ensure that the value entered is greater + than min. Can be interpolated.

+ + +
+ max + +
(optional)
+
+ string + +

Sets the max validation to ensure that the value entered is less than max. + Can be interpolated.

+ + +
+ step + +
(optional)
+
+ string + +

Sets the step validation to ensure that the value entered matches the step + Can be interpolated.

+ + +
+ ngChange + +
(optional)
+
+ string + +

Angular expression to be executed when the ngModel value changes due + to user interaction with the input element.

+ + +
+ ngChecked + +
(optional)
+
+ expression + +

If the expression is truthy, then the checked attribute will be set on the + element. Note : ngChecked should not be used alongside ngModel. + Checkout ngChecked for usage.

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('rangeExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.value = 75;
      $scope.min = 10;
      $scope.max = 90;
    }]);
</script>
<form name="myForm" ng-controller="ExampleController">

  Model as range: <input type="range" name="range" ng-model="value" min="{{min}}"  max="{{max}}">
  <hr>
  Model as number: <input type="number" ng-model="value"><br>
  Min: <input type="number" ng-model="min"><br>
  Max: <input type="number" ng-model="max"><br>
  value = <code>{{value}}</code><br/>
  myForm.range.$valid = <code>{{myForm.range.$valid}}</code><br/>
  myForm.range.$error = <code>{{myForm.range.$error}}</code>
</form>
+
+ + + +
+
+ + +

+

Range Input with ngMin & ngMax attributes

+

+ +

+ + +
+ + +
+
<script>
  angular.module('rangeExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.value = 75;
      $scope.min = 10;
      $scope.max = 90;
    }]);
</script>
<form name="myForm" ng-controller="ExampleController">
  Model as range: <input type="range" name="range" ng-model="value" ng-min="min" ng-max="max">
  <hr>
  Model as number: <input type="number" ng-model="value"><br>
  Min: <input type="number" ng-model="min"><br>
  Max: <input type="number" ng-model="max"><br>
  value = <code>{{value}}</code><br/>
  myForm.range.$valid = <code>{{myForm.range.$valid}}</code><br/>
  myForm.range.$error = <code>{{myForm.range.$error}}</code>
</form>
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/input/input[text].html b/1.6.6/docs/partials/api/ng/input/input[text].html new file mode 100644 index 000000000..0b3a78d03 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/input/input[text].html @@ -0,0 +1,280 @@ + Improve this Doc + + + + +  View Source + + + +
+

input[text]

+
    + +
  1. + - input in module ng +
  2. +
+
+ + + + + +
+

Standard HTML text input with angular data binding, inherited by most of the input elements.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
<input type="text"
       ng-model="string"
       [name="string"]
       [required="string"]
       [ng-required="string"]
       [ng-minlength="number"]
       [ng-maxlength="number"]
       [pattern="string"]
       [ng-pattern="string"]
       [ng-change="string"]
       [ng-trim="boolean"]>
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngModel + + + + string + +

Assignable angular expression to data-bind to.

+ + +
+ name + +
(optional)
+
+ string + +

Property name of the form under which the control is published.

+ + +
+ required + +
(optional)
+
+ string + +

Adds required validation error key if the value is not entered.

+ + +
+ ngRequired + +
(optional)
+
+ string + +

Adds required attribute and required validation constraint to + the element when the ngRequired expression evaluates to true. Use ngRequired instead of + required when you want to data-bind to the required attribute.

+ + +
+ ngMinlength + +
(optional)
+
+ number + +

Sets minlength validation error key if the value is shorter than + minlength.

+ + +
+ ngMaxlength + +
(optional)
+
+ number + +

Sets maxlength validation error key if the value is longer than + maxlength. Setting the attribute to a negative or non-numeric value, allows view values of + any length.

+ + +
+ pattern + +
(optional)
+
+ string + +

Similar to ngPattern except that the attribute value is the actual string + that contains the regular expression body that will be converted to a regular expression + as in the ngPattern directive.

+ + +
+ ngPattern + +
(optional)
+
+ string + +

Sets pattern validation error key if the ngModel $viewValue + does not match a RegExp found by evaluating the Angular expression given in the attribute value. + If the expression evaluates to a RegExp object, then this is used directly. + If the expression evaluates to a string, then it will be converted to a RegExp + after wrapping it in ^ and $ characters. For instance, "abc" will be converted to + new RegExp('^abc$').
+ Note: Avoid using the g flag on the RegExp, as it will cause each successive search to + start at the index of the last search's match, thus not taking the whole input value into + account.

+ + +
+ ngChange + +
(optional)
+
+ string + +

Angular expression to be executed when input changes due to user + interaction with the input element.

+ + +
+ ngTrim + +
(optional)
+
+ boolean + +

If set to false Angular will not automatically trim the input. + This parameter is ignored for input[type=password] controls, which will never trim the + input.

+ +

(default: true)

+
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('textInputExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.example = {
        text: 'guest',
        word: /^\s*\w*\s*$/
      };
    }]);
</script>
<form name="myForm" ng-controller="ExampleController">
  <label>Single word:
    <input type="text" name="input" ng-model="example.text"
           ng-pattern="example.word" required ng-trim="false">
  </label>
  <div role="alert">
    <span class="error" ng-show="myForm.input.$error.required">
      Required!</span>
    <span class="error" ng-show="myForm.input.$error.pattern">
      Single word only!</span>
  </div>
  <code>text = {{example.text}}</code><br/>
  <code>myForm.input.$valid = {{myForm.input.$valid}}</code><br/>
  <code>myForm.input.$error = {{myForm.input.$error}}</code><br/>
  <code>myForm.$valid = {{myForm.$valid}}</code><br/>
  <code>myForm.$error.required = {{!!myForm.$error.required}}</code><br/>
 </form>
+
+ +
+
var text = element(by.binding('example.text'));
var valid = element(by.binding('myForm.input.$valid'));
var input = element(by.model('example.text'));

it('should initialize to model', function() {
  expect(text.getText()).toContain('guest');
  expect(valid.getText()).toContain('true');
});

it('should be invalid if empty', function() {
  input.clear();
  input.sendKeys('');

  expect(text.getText()).toEqual('text =');
  expect(valid.getText()).toContain('false');
});

it('should be invalid if multi word', function() {
  input.clear();
  input.sendKeys('hello world');

  expect(valid.getText()).toContain('false');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/input/input[time].html b/1.6.6/docs/partials/api/ng/input/input[time].html new file mode 100644 index 000000000..d423e5398 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/input/input[time].html @@ -0,0 +1,264 @@ + Improve this Doc + + + + +  View Source + + + +
+

input[time]

+
    + +
  1. + - input in module ng +
  2. +
+
+ + + + + +
+

Input with time validation and transformation. In browsers that do not yet support +the HTML5 time input, a text element will be used. In that case, the text must be entered in a valid ISO-8601 +local time format (HH:mm:ss), for example: 14:57:00. Model must be a Date object. This binding will always output a +Date object to the model of January 1, 1970, or local date new Date(1970, 0, 1, HH, mm, ss).

+

The model must always be a Date object, otherwise Angular will throw an error. +Invalid Date objects (dates whose getTime() is NaN) will be rendered as an empty string.

+

The timezone to be used to read/write the Date instance in the model can be defined using +ngModelOptions. By default, this is the timezone of the browser.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
<input type="time"
       ng-model="string"
       [name="string"]
       [min="string"]
       [max="string"]
       [ng-min=""]
       [ng-max=""]
       [required="string"]
       [ng-required="string"]
       [ng-change="string"]>
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngModel + + + + string + +

Assignable angular expression to data-bind to.

+ + +
+ name + +
(optional)
+
+ string + +

Property name of the form under which the control is published.

+ + +
+ min + +
(optional)
+
+ string + +

Sets the min validation error key if the value entered is less than min. + This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this + attribute (e.g. min="{{minTime | date:'HH:mm:ss'}}"). Note that min will also add + native HTML5 constraint validation.

+ + +
+ max + +
(optional)
+
+ string + +

Sets the max validation error key if the value entered is greater than max. + This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this + attribute (e.g. max="{{maxTime | date:'HH:mm:ss'}}"). Note that max will also add + native HTML5 constraint validation.

+ + +
+ ngMin + +
(optional)
+
+ datestring + +

Sets the min validation constraint to the Date / ISO time string the + ngMin expression evaluates to. Note that it does not set the min attribute.

+ + +
+ ngMax + +
(optional)
+
+ datestring + +

Sets the max validation constraint to the Date / ISO time string the + ngMax expression evaluates to. Note that it does not set the max attribute.

+ + +
+ required + +
(optional)
+
+ string + +

Sets required validation error key if the value is not entered.

+ + +
+ ngRequired + +
(optional)
+
+ string + +

Adds required attribute and required validation constraint to + the element when the ngRequired expression evaluates to true. Use ngRequired instead of + required when you want to data-bind to the required attribute.

+ + +
+ ngChange + +
(optional)
+
+ string + +

Angular expression to be executed when input changes due to user + interaction with the input element.

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
 angular.module('timeExample', [])
   .controller('DateController', ['$scope', function($scope) {
     $scope.example = {
       value: new Date(1970, 0, 1, 14, 57, 0)
     };
   }]);
</script>
<form name="myForm" ng-controller="DateController as dateCtrl">
   <label for="exampleInput">Pick a time between 8am and 5pm:</label>
   <input type="time" id="exampleInput" name="input" ng-model="example.value"
       placeholder="HH:mm:ss" min="08:00:00" max="17:00:00" required />
   <div role="alert">
     <span class="error" ng-show="myForm.input.$error.required">
         Required!</span>
     <span class="error" ng-show="myForm.input.$error.time">
         Not a valid date!</span>
   </div>
   <tt>value = {{example.value | date: "HH:mm:ss"}}</tt><br/>
   <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
   <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
   <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
   <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
</form>
+
+ +
+
var value = element(by.binding('example.value | date: "HH:mm:ss"'));
var valid = element(by.binding('myForm.input.$valid'));

// currently protractor/webdriver does not support
// sending keys to all known HTML5 input controls
// for various browsers (https://github.com/angular/protractor/issues/562).
function setInput(val) {
  // set the value of the element and force validation.
  var scr = "var ipt = document.getElementById('exampleInput'); " +
  "ipt.value = '" + val + "';" +
  "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });";
  browser.executeScript(scr);
}

it('should initialize to model', function() {
  expect(value.getText()).toContain('14:57:00');
  expect(valid.getText()).toContain('myForm.input.$valid = true');
});

it('should be invalid if empty', function() {
  setInput('');
  expect(value.getText()).toEqual('value =');
  expect(valid.getText()).toContain('myForm.input.$valid = false');
});

it('should be invalid if over max', function() {
  setInput('23:59:00');
  expect(value.getText()).toContain('');
  expect(valid.getText()).toContain('myForm.input.$valid = false');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/input/input[url].html b/1.6.6/docs/partials/api/ng/input/input[url].html new file mode 100644 index 000000000..f74c4d2e1 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/input/input[url].html @@ -0,0 +1,267 @@ + Improve this Doc + + + + +  View Source + + + +
+

input[url]

+
    + +
  1. + - input in module ng +
  2. +
+
+ + + + + +
+

Text input with URL validation. Sets the url validation error key if the content is not a +valid URL.

+
+Note: input[url] uses a regex to validate urls that is derived from the regex +used in Chromium. If you need stricter validation, you can use ng-pattern or modify +the built-in validators (see the Forms guide) +
+
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
<input type="url"
       ng-model="string"
       [name="string"]
       [required="string"]
       [ng-required="string"]
       [ng-minlength="number"]
       [ng-maxlength="number"]
       [pattern="string"]
       [ng-pattern="string"]
       [ng-change="string"]>
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngModel + + + + string + +

Assignable angular expression to data-bind to.

+ + +
+ name + +
(optional)
+
+ string + +

Property name of the form under which the control is published.

+ + +
+ required + +
(optional)
+
+ string + +

Sets required validation error key if the value is not entered.

+ + +
+ ngRequired + +
(optional)
+
+ string + +

Adds required attribute and required validation constraint to + the element when the ngRequired expression evaluates to true. Use ngRequired instead of + required when you want to data-bind to the required attribute.

+ + +
+ ngMinlength + +
(optional)
+
+ number + +

Sets minlength validation error key if the value is shorter than + minlength.

+ + +
+ ngMaxlength + +
(optional)
+
+ number + +

Sets maxlength validation error key if the value is longer than + maxlength. Setting the attribute to a negative or non-numeric value, allows view values of + any length.

+ + +
+ pattern + +
(optional)
+
+ string + +

Similar to ngPattern except that the attribute value is the actual string + that contains the regular expression body that will be converted to a regular expression + as in the ngPattern directive.

+ + +
+ ngPattern + +
(optional)
+
+ string + +

Sets pattern validation error key if the ngModel $viewValue + does not match a RegExp found by evaluating the Angular expression given in the attribute value. + If the expression evaluates to a RegExp object, then this is used directly. + If the expression evaluates to a string, then it will be converted to a RegExp + after wrapping it in ^ and $ characters. For instance, "abc" will be converted to + new RegExp('^abc$').
+ Note: Avoid using the g flag on the RegExp, as it will cause each successive search to + start at the index of the last search's match, thus not taking the whole input value into + account.

+ + +
+ ngChange + +
(optional)
+
+ string + +

Angular expression to be executed when input changes due to user + interaction with the input element.

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('urlExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.url = {
        text: 'http://google.com'
      };
    }]);
</script>
<form name="myForm" ng-controller="ExampleController">
  <label>URL:
    <input type="url" name="input" ng-model="url.text" required>
  <label>
  <div role="alert">
    <span class="error" ng-show="myForm.input.$error.required">
      Required!</span>
    <span class="error" ng-show="myForm.input.$error.url">
      Not valid url!</span>
  </div>
  <tt>text = {{url.text}}</tt><br/>
  <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
  <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
  <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
  <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
  <tt>myForm.$error.url = {{!!myForm.$error.url}}</tt><br/>
 </form>
+
+ +
+
var text = element(by.binding('url.text'));
var valid = element(by.binding('myForm.input.$valid'));
var input = element(by.model('url.text'));

it('should initialize to model', function() {
  expect(text.getText()).toContain('http://google.com');
  expect(valid.getText()).toContain('true');
});

it('should be invalid if empty', function() {
  input.clear();
  input.sendKeys('');

  expect(text.getText()).toEqual('text =');
  expect(valid.getText()).toContain('false');
});

it('should be invalid if not url', function() {
  input.clear();
  input.sendKeys('box');

  expect(valid.getText()).toContain('false');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/input/input[week].html b/1.6.6/docs/partials/api/ng/input/input[week].html new file mode 100644 index 000000000..48578555b --- /dev/null +++ b/1.6.6/docs/partials/api/ng/input/input[week].html @@ -0,0 +1,263 @@ + Improve this Doc + + + + +  View Source + + + +
+

input[week]

+
    + +
  1. + - input in module ng +
  2. +
+
+ + + + + +
+

Input with week-of-the-year validation and transformation to Date. In browsers that do not yet support +the HTML5 week input, a text element will be used. In that case, the text must be entered in a valid ISO-8601 +week format (yyyy-W##), for example: 2013-W02.

+

The model must always be a Date object, otherwise Angular will throw an error. +Invalid Date objects (dates whose getTime() is NaN) will be rendered as an empty string.

+

The timezone to be used to read/write the Date instance in the model can be defined using +ngModelOptions. By default, this is the timezone of the browser.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
<input type="week"
       ng-model="string"
       [name="string"]
       [min="string"]
       [max="string"]
       [ng-min=""]
       [ng-max=""]
       [required="string"]
       [ng-required="string"]
       [ng-change="string"]>
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngModel + + + + string + +

Assignable angular expression to data-bind to.

+ + +
+ name + +
(optional)
+
+ string + +

Property name of the form under which the control is published.

+ + +
+ min + +
(optional)
+
+ string + +

Sets the min validation error key if the value entered is less than min. + This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this + attribute (e.g. min="{{minWeek | date:'yyyy-Www'}}"). Note that min will also add + native HTML5 constraint validation.

+ + +
+ max + +
(optional)
+
+ string + +

Sets the max validation error key if the value entered is greater than max. + This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this + attribute (e.g. max="{{maxWeek | date:'yyyy-Www'}}"). Note that max will also add + native HTML5 constraint validation.

+ + +
+ ngMin + +
(optional)
+
+ datestring + +

Sets the min validation constraint to the Date / ISO week string + the ngMin expression evaluates to. Note that it does not set the min attribute.

+ + +
+ ngMax + +
(optional)
+
+ datestring + +

Sets the max validation constraint to the Date / ISO week string + the ngMax expression evaluates to. Note that it does not set the max attribute.

+ + +
+ required + +
(optional)
+
+ string + +

Sets required validation error key if the value is not entered.

+ + +
+ ngRequired + +
(optional)
+
+ string + +

Adds required attribute and required validation constraint to + the element when the ngRequired expression evaluates to true. Use ngRequired instead of + required when you want to data-bind to the required attribute.

+ + +
+ ngChange + +
(optional)
+
+ string + +

Angular expression to be executed when input changes due to user + interaction with the input element.

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<script>
angular.module('weekExample', [])
  .controller('DateController', ['$scope', function($scope) {
    $scope.example = {
      value: new Date(2013, 0, 3)
    };
  }]);
</script>
<form name="myForm" ng-controller="DateController as dateCtrl">
  <label>Pick a date between in 2013:
    <input id="exampleInput" type="week" name="input" ng-model="example.value"
           placeholder="YYYY-W##" min="2012-W32"
           max="2013-W52" required />
  </label>
  <div role="alert">
    <span class="error" ng-show="myForm.input.$error.required">
        Required!</span>
    <span class="error" ng-show="myForm.input.$error.week">
        Not a valid date!</span>
  </div>
  <tt>value = {{example.value | date: "yyyy-Www"}}</tt><br/>
  <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
  <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
  <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
  <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
</form>
+
+ +
+
var value = element(by.binding('example.value | date: "yyyy-Www"'));
var valid = element(by.binding('myForm.input.$valid'));

// currently protractor/webdriver does not support
// sending keys to all known HTML5 input controls
// for various browsers (https://github.com/angular/protractor/issues/562).
function setInput(val) {
  // set the value of the element and force validation.
  var scr = "var ipt = document.getElementById('exampleInput'); " +
  "ipt.value = '" + val + "';" +
  "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });";
  browser.executeScript(scr);
}

it('should initialize to model', function() {
  expect(value.getText()).toContain('2013-W01');
  expect(valid.getText()).toContain('myForm.input.$valid = true');
});

it('should be invalid if empty', function() {
  setInput('');
  expect(value.getText()).toEqual('value =');
  expect(valid.getText()).toContain('myForm.input.$valid = false');
});

it('should be invalid if over max', function() {
  setInput('2015-W01');
  expect(value.getText()).toContain('');
  expect(valid.getText()).toContain('myForm.input.$valid = false');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/object.html b/1.6.6/docs/partials/api/ng/object.html new file mode 100644 index 000000000..de25b75ba --- /dev/null +++ b/1.6.6/docs/partials/api/ng/object.html @@ -0,0 +1,23 @@ + +

Object components in ng

+ + + +
+
+ + + + + + + + + + + +
NameDescription
angular.version

An object that contains information about the current AngularJS version.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ng/object/angular.version.html b/1.6.6/docs/partials/api/ng/object/angular.version.html new file mode 100644 index 000000000..61e0fff8e --- /dev/null +++ b/1.6.6/docs/partials/api/ng/object/angular.version.html @@ -0,0 +1,56 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.version

+
    + +
  1. + - object in module ng +
  2. +
+
+ + + + + +
+

An object that contains information about the current AngularJS version.

+

This object has the following properties:

+
    +
  • full{string} – Full version string, such as "0.9.18".
  • +
  • major{number} – Major version number, such as "0".
  • +
  • minor{number} – Minor version number, such as "9".
  • +
  • dot{number} – Dot version number, such as "18".
  • +
  • codeName{string} – Code name of the release, such as "jiggling-armfat".
  • +
+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/provider.html b/1.6.6/docs/partials/api/ng/provider.html new file mode 100644 index 000000000..a6645e4c5 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/provider.html @@ -0,0 +1,115 @@ + +

Provider components in ng

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
$anchorScrollProvider

Use $anchorScrollProvider to disable automatic scrolling whenever +$location.hash() changes.

+
$animateProvider

Default implementation of $animate that doesn't perform any animations, instead just +synchronously performs DOM updates and resolves the returned runner promise.

+
$compileProvider
$controllerProvider

The $controller service is used by Angular to create new +controllers.

+
$filterProvider

Filters are just functions which transform input to an output. However filters need to be +Dependency Injected. To achieve this a filter definition consists of a factory function which is +annotated with dependencies and is responsible for creating a filter function.

+
$httpProvider

Use $httpProvider to change the default behavior of the $http service.

+
$interpolateProvider

Used for configuring the interpolation markup. Defaults to {{ and }}.

+
$locationProvider

Use the $locationProvider to configure how the application deep linking paths are stored.

+
$logProvider

Use the $logProvider to configure how the application logs messages

+
$parseProvider

$parseProvider can be used for configuring the default behavior of the $parse + service.

+
$qProvider
$rootScopeProvider

Provider for the $rootScope service.

+
$sceDelegateProvider

The $sceDelegateProvider provider allows developers to configure the $sceDelegate service, used as a delegate for Strict Contextual Escaping (SCE).

+
$sceProvider

The $sceProvider provider allows developers to configure the $sce service.

+
    +
  • enable/disable Strict Contextual Escaping (SCE) in a module
  • +
  • override the default implementation with a custom delegate
  • +
+
$templateRequestProvider

Used to configure the options passed to the $http service when making a template request.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ng/provider/$anchorScrollProvider.html b/1.6.6/docs/partials/api/ng/provider/$anchorScrollProvider.html new file mode 100644 index 000000000..e03cf6c29 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/provider/$anchorScrollProvider.html @@ -0,0 +1,75 @@ + Improve this Doc + + + + +  View Source + + + +
+

$anchorScrollProvider

+
    + +
  1. + - $anchorScroll +
  2. + +
  3. + - provider in module ng +
  4. +
+
+ + + + + +
+

Use $anchorScrollProvider to disable automatic scrolling whenever +$location.hash() changes.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    disableAutoScrolling();

    + +

    +

    By default, $anchorScroll() will automatically detect changes to +$location.hash() and scroll to the element matching the new hash.
    +Use this method to disable automatic scrolling.

    +

    If automatic scrolling is disabled, one must explicitly call +$anchorScroll() in order to scroll to the element related to the +current hash.

    +
    + + + + + + + +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/provider/$animateProvider.html b/1.6.6/docs/partials/api/ng/provider/$animateProvider.html new file mode 100644 index 000000000..13f2d67d4 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/provider/$animateProvider.html @@ -0,0 +1,296 @@ + Improve this Doc + + + + +  View Source + + + +
+

$animateProvider

+
    + +
  1. + - $animate +
  2. + +
  3. + - provider in module ng +
  4. +
+
+ + + + + +
+

Default implementation of $animate that doesn't perform any animations, instead just +synchronously performs DOM updates and resolves the returned runner promise.

+

In order to enable animations the ngAnimate module has to be loaded.

+

To see the functional implementation check out src/ngAnimate/animate.js.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    register(name, factory);

    + +

    +

    Registers a new injectable animation factory function. The factory function produces the +animation object which contains callback functions for each event that is expected to be +animated.

    +
      +
    • eventFn: function(element, ... , doneFunction, options) +The element to animate, the doneFunction and the options fed into the animation. Depending +on the type of animation additional arguments will be injected into the animation function. The +list below explains the function signatures for the different animation methods:

      +
    • +
    • setClass: function(element, addedClasses, removedClasses, doneFunction, options)

      +
    • +
    • addClass: function(element, addedClasses, doneFunction, options)
    • +
    • removeClass: function(element, removedClasses, doneFunction, options)
    • +
    • enter, leave, move: function(element, doneFunction, options)
    • +
    • animate: function(element, fromStyles, toStyles, doneFunction, options)

      +

      Make sure to trigger the doneFunction once the animation is fully complete.

      +
    • +
    +
    return {
    +  //enter, leave, move signature
    +  eventFn : function(element, done, options) {
    +    //code to run the animation
    +    //once complete, then run done()
    +    return function endFunction(wasCancelled) {
    +      //code to cancel the animation
    +    }
    +  }
    +}
    +
    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + string + +

    The name of the animation (this is what the class-based CSS value will be compared to).

    + + +
    + factory + + + + Function + +

    The factory function that will be executed to return the animation + object.

    + + +
    + + + + + +
  • + +
  • +

    customFilter([filterFn]);

    + +

    +

    Sets and/or returns the custom filter function that is used to "filter" animations, i.e. +determine if an animation is allowed or not. When no filter is specified (the default), no +animation will be blocked. Setting the customFilter value will only allow animations for +which the filter function's return value is truthy.

    +

    This allows to easily create arbitrarily complex rules for filtering animations, such as +allowing specific events only, or enabling animations on specific subtrees of the DOM, etc. +Filtering animations can also boost performance for low-powered devices, as well as +applications containing a lot of structural operations.

    +
    + Best Practice: + Keep the filtering function as lean as possible, because it will be called for each DOM + action (e.g. insertion, removal, class change) performed by "animation-aware" directives. + See here for a list of built-in + directives that support animations. + Performing computationally expensive or time-consuming operations on each call of the + filtering function can make your animations sluggish. +
    + +

    Note: If present, customFilter will be checked before +classNameFilter.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + filterFn + +
    (optional)
    +
    + Function= + +

    The filter function which will be used to filter all animations. + If a falsy value is returned, no animation will be performed. The function will be called + with the following arguments:

    +
      +
    • node {DOMElement} - The DOM element to be animated.
    • +
    • event {String} - The name of the animation event (e.g. enter, leave, addClass +etc).
    • +
    • options {Object} - A collection of options/styles used for the animation.
    • +
    + + +
    + + + + + + +

    Returns

    + + + + + +
    Function

    The current filter function or null if there is none set.

    +
    +
  • + +
  • +

    classNameFilter([expression]);

    + +

    +

    Sets and/or returns the CSS class regular expression that is checked when performing +an animation. Upon bootstrap the classNameFilter value is not set at all and will +therefore enable $animate to attempt to perform an animation on any element that is triggered. +When setting the classNameFilter value, animations will only be performed on elements +that successfully match the filter expression. This in turn can boost performance +for low-powered devices as well as applications containing a lot of structural operations.

    +

    Note: If present, classNameFilter will be checked after +customFilter. If customFilter is present and returns +false, classNameFilter will not be checked.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + expression + +
    (optional)
    +
    + RegExp + +

    The className expression which will be checked against all animations

    + + +
    + + + + + + +

    Returns

    + + + + + +
    RegExp

    The current CSS className expression value. If null then there is no expression value

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/provider/$compileProvider.html b/1.6.6/docs/partials/api/ng/provider/$compileProvider.html new file mode 100644 index 000000000..a2f9d8f23 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/provider/$compileProvider.html @@ -0,0 +1,785 @@ + Improve this Doc + + + + +  View Source + + + +
+

$compileProvider

+
    + +
  1. + - $compile +
  2. + +
  3. + - provider in module ng +
  4. +
+
+ + + + + +
+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    directive(name, directiveFactory);

    + +

    +

    Register a new directive with the compiler.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + stringObject + +

    Name of the directive in camel-case (i.e. ngBind which + will match as ng-bind), or an object map of directives where the keys are the + names and the values are the factories.

    + + +
    + directiveFactory + + + + function()Array + +

    An injectable directive factory function. See the + directive guide and the compile API for more info.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    ng.$compileProvider

    Self for chaining.

    +
    +
  • + +
  • +

    component(name, options);

    + +

    +

    Register a component definition with the compiler. This is a shorthand for registering a special +type of directive, which represents a self-contained UI component in your application. Such components +are always isolated (i.e. scope: {}) and are always restricted to elements (i.e. restrict: 'E').

    +

    Component definitions are very simple and do not require as much configuration as defining general +directives. Component definitions usually consist only of a template and a controller backing it.

    +

    In order to make the definition easier, components enforce best practices like use of controllerAs, +bindToController. They always have isolate scope and are restricted to elements.

    +

    Here are a few examples of how you would usually define components:

    +
    var myMod = angular.module(...);
    +myMod.component('myComp', {
    +  template: '<div>My name is {{$ctrl.name}}</div>',
    +  controller: function() {
    +    this.name = 'shahar';
    +  }
    +});
    +
    +myMod.component('myComp', {
    +  template: '<div>My name is {{$ctrl.name}}</div>',
    +  bindings: {name: '@'}
    +});
    +
    +myMod.component('myComp', {
    +  templateUrl: 'views/my-comp.html',
    +  controller: 'MyCtrl',
    +  controllerAs: 'ctrl',
    +  bindings: {name: '@'}
    +});
    +
    +

    For more examples, and an in-depth guide, see the component guide.

    +


    +See also $compileProvider.directive().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + stringObject + +

    Name of the component in camelCase (i.e. myComp which will match <my-comp>), + or an object map of components where the keys are the names and the values are the component definition objects.

    + + +
    + options + + + + Object + +

    Component definition object (a simplified + directive definition object), + with the following properties (all optional):

    +
      +
    • controller{(string|function()=} – controller constructor function that should be +associated with newly created scope or the name of a registered controller if passed as a string. An empty noop function by default.
    • +
    • controllerAs{string=} – identifier name for to reference the controller in the component's scope. +If present, the controller will be published to scope under the controllerAs name. +If not present, this will default to be $ctrl.
    • +
    • template{string=|function()=} – html template as a string or a function that +returns an html template as a string which should be used as the contents of this component. +Empty string by default.

      +

      If template is a function, then it is injected with +the following locals:

      +
        +
      • $element - Current element
      • +
      • $attrs - Current attributes object for the element
      • +
      +
    • +
    • templateUrl{string=|function()=} – path or function that returns a path to an html +template that should be used as the contents of this component.

      +

      If templateUrl is a function, then it is injected with +the following locals:

      +
        +
      • $element - Current element
      • +
      • $attrs - Current attributes object for the element
      • +
      +
    • +
    • bindings{object=} – defines bindings between DOM attributes and component properties. +Component properties are always bound to the component controller and not to the scope. +See bindToController.

      +
    • +
    • transclude{boolean=} – whether content transclusion is enabled. +Disabled by default.
    • +
    • require - {Object<string, string>=} - requires the controllers of other directives and binds them to +this component's controller. The object keys specify the property names under which the required +controllers (object values) will be bound. See require.
    • +
    • $... – additional properties to attach to the directive factory function and the controller +constructor function. (This is used by the component router to annotate)
    • +
    + + +
    + + + + + + +

    Returns

    + + + + + +
    ng.$compileProvider

    the compile provider itself, for chaining of function calls.

    +
    +
  • + +
  • +

    aHrefSanitizationWhitelist([regexp]);

    + +

    +

    Retrieves or overrides the default regular expression that is used for whitelisting of safe +urls during a[href] sanitization.

    +

    The sanitization is a security measure aimed at preventing XSS attacks via html links.

    +

    Any url about to be assigned to a[href] via data-binding is first normalized and turned into +an absolute url. Afterwards, the url is matched against the aHrefSanitizationWhitelist +regular expression. If a match is found, the original url is written into the dom. Otherwise, +the absolute url is prefixed with 'unsafe:' string and only then is it written into the DOM.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + regexp + +
    (optional)
    +
    + RegExp + +

    New regexp to whitelist urls with.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    RegExpng.$compileProvider

    Current RegExp if called without value or self for + chaining otherwise.

    +
    +
  • + +
  • +

    imgSrcSanitizationWhitelist([regexp]);

    + +

    +

    Retrieves or overrides the default regular expression that is used for whitelisting of safe +urls during img[src] sanitization.

    +

    The sanitization is a security measure aimed at prevent XSS attacks via html links.

    +

    Any url about to be assigned to img[src] via data-binding is first normalized and turned into +an absolute url. Afterwards, the url is matched against the imgSrcSanitizationWhitelist +regular expression. If a match is found, the original url is written into the dom. Otherwise, +the absolute url is prefixed with 'unsafe:' string and only then is it written into the DOM.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + regexp + +
    (optional)
    +
    + RegExp + +

    New regexp to whitelist urls with.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    RegExpng.$compileProvider

    Current RegExp if called without value or self for + chaining otherwise.

    +
    +
  • + +
  • +

    debugInfoEnabled([enabled]);

    + +

    +

    Call this method to enable/disable various debug runtime information in the compiler such as adding +binding information and a reference to the current scope on to DOM elements. +If enabled, the compiler will add the following to DOM elements that have been bound to the scope

    +
      +
    • ng-binding CSS class
    • +
    • $binding data property containing an array of the binding expressions
    • +
    +

    You may want to disable this in production for a significant performance boost. See +Disabling Debug Data for more.

    +

    The default value is true.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + enabled + +
    (optional)
    +
    + boolean + +

    update the debugInfoEnabled state if provided, otherwise just return the +current debugInfoEnabled state

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    current value if used as getter or itself (chaining) if used as setter

    +
    +
  • + +
  • +

    preAssignBindingsEnabled([enabled]);

    + +

    +

    Call this method to enable/disable whether directive controllers are assigned bindings before +calling the controller's constructor. +If enabled (true), the compiler assigns the value of each of the bindings to the +properties of the controller object before the constructor of this object is called.

    +

    If disabled (false), the compiler calls the constructor first before assigning bindings.

    +

    The default value is false.

    +
    + + +
    +
    Deprecated: + (since 1.6.0) + (to be removed in 1.7.0) +
    +

    This method and the option to assign the bindings before calling the controller's constructor +will be removed in v1.7.0.

    + +
    + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + enabled + +
    (optional)
    +
    + boolean + +

    update the preAssignBindingsEnabled state if provided, otherwise just return the +current preAssignBindingsEnabled state

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    current value if used as getter or itself (chaining) if used as setter

    +
    +
  • + +
  • +

    strictComponentBindingsEnabled([enabled]);

    + +

    +

    Call this method to enable/disable strict component bindings check. If enabled, the compiler will enforce that +for all bindings of a component that are not set as optional with ?, an attribute needs to be provided +on the component's HTML tag.

    +

    The default value is false.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + enabled + +
    (optional)
    +
    + boolean + +

    update the strictComponentBindingsEnabled state if provided, otherwise just return the +current strictComponentBindingsEnabled state

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    current value if used as getter or itself (chaining) if used as setter

    +
    +
  • + +
  • +

    onChangesTtl(limit);

    + +

    +

    Sets the number of times $onChanges hooks can trigger new changes before giving up and +assuming that the model is unstable.

    +

    The current default is 10 iterations.

    +

    In complex applications it's possible that dependencies between $onChanges hooks and bindings will result +in several iterations of calls to these hooks. However if an application needs more than the default 10 +iterations to stabilize then you should investigate what is causing the model to continuously change during +the $onChanges hook execution.

    +

    Increasing the TTL could have performance implications, so you should not change it without proper justification.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + limit + + + + number + +

    The number of $onChanges hook iterations.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    numberobject

    the current limit (or this if called as a setter for chaining)

    +
    +
  • + +
  • +

    commentDirectivesEnabled(enabled);

    + +

    +

    It indicates to the compiler +whether or not directives on comments should be compiled. +Defaults to true.

    +

    Calling this function with false disables the compilation of directives +on comments for the whole application. +This results in a compilation performance gain, +as the compiler doesn't have to check comments when looking for directives. +This should however only be used if you are sure that no comment directives are used in +the application (including any 3rd party directives).

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + enabled + + + + boolean + +

    false if the compiler may ignore directives on comments

    + + +
    + + + + + + +

    Returns

    + + + + + +
    booleanobject

    the current value (or this if called as a setter for chaining)

    +
    +
  • + +
  • +

    cssClassDirectivesEnabled(enabled);

    + +

    +

    It indicates to the compiler +whether or not directives on element classes should be compiled. +Defaults to true.

    +

    Calling this function with false disables the compilation of directives +on element classes for the whole application. +This results in a compilation performance gain, +as the compiler doesn't have to check element classes when looking for directives. +This should however only be used if you are sure that no class directives are used in +the application (including any 3rd party directives).

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + enabled + + + + boolean + +

    false if the compiler may ignore directives on element classes

    + + +
    + + + + + + +

    Returns

    + + + + + +
    booleanobject

    the current value (or this if called as a setter for chaining)

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/provider/$controllerProvider.html b/1.6.6/docs/partials/api/ng/provider/$controllerProvider.html new file mode 100644 index 000000000..059c5bcde --- /dev/null +++ b/1.6.6/docs/partials/api/ng/provider/$controllerProvider.html @@ -0,0 +1,191 @@ + Improve this Doc + + + + +  View Source + + + +
+

$controllerProvider

+
    + +
  1. + - $controller +
  2. + +
  3. + - provider in module ng +
  4. +
+
+ + + + + +
+

The $controller service is used by Angular to create new +controllers.

+

This provider allows controller registration via the +register method.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    has(name);

    + +

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + string + +

    Controller name to check.

    + + +
    + + + + + +
  • + +
  • +

    register(name, constructor);

    + +

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + stringObject + +

    Controller name, or an object map of controllers where the keys are + the names and the values are the constructors.

    + + +
    + constructor + + + + function()Array + +

    Controller constructor fn (optionally decorated with DI + annotations in the array notation).

    + + +
    + + + + + +
  • + +
  • +

    allowGlobals();

    + +

    +

    If called, allows $controller to find controller constructors on window

    +
    + + +
    +
    Deprecated: + (since v1.3.0) + (to be removed in v1.7.0) +
    +

    This method of finding controllers has been deprecated.

    + +
    + + + + + + +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/provider/$filterProvider.html b/1.6.6/docs/partials/api/ng/provider/$filterProvider.html new file mode 100644 index 000000000..e9d19e525 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/provider/$filterProvider.html @@ -0,0 +1,174 @@ + Improve this Doc + + + + +  View Source + + + +
+

$filterProvider

+
    + +
  1. + - $filter +
  2. + +
  3. + - provider in module ng +
  4. +
+
+ + + + + +
+

Filters are just functions which transform input to an output. However filters need to be +Dependency Injected. To achieve this a filter definition consists of a factory function which is +annotated with dependencies and is responsible for creating a filter function.

+
+Note: Filter names must be valid angular Expressions identifiers, such as uppercase or orderBy. +Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace +your filters, then you can use capitalization (myappSubsectionFilterx) or underscores +(myapp_subsection_filterx). +
+ +
// Filter registration
+function MyModule($provide, $filterProvider) {
+  // create a service to demonstrate injection (not always needed)
+  $provide.value('greet', function(name){
+    return 'Hello ' + name + '!';
+  });
+
+  // register a filter factory which uses the
+  // greet service to demonstrate DI.
+  $filterProvider.register('greet', function(greet){
+    // return the filter function which uses the greet service
+    // to generate salutation
+    return function(text) {
+      // filters need to be forgiving so check input validity
+      return text && greet(text) || text;
+    };
+  });
+}
+
+

The filter function is registered with the $injector under the filter name suffix with +Filter.

+
it('should be the same instance', inject(
+  function($filterProvider) {
+    $filterProvider.register('reverse', function(){
+      return ...;
+    });
+  },
+  function($filter, reverseFilter) {
+    expect($filter('reverse')).toBe(reverseFilter);
+  });
+
+

For more information about how angular filters work, and how to create your own filters, see +Filters in the Angular Developer Guide.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    register(name, factory);

    + +

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + stringObject + +

    Name of the filter function, or an object map of filters where + the keys are the filter names and the values are the filter factories.

    +
    + Note: Filter names must be valid angular Expressions identifiers, such as uppercase or orderBy. + Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace + your filters, then you can use capitalization (myappSubsectionFilterx) or underscores + (myapp_subsection_filterx). +
    + +
    + factory + + + + Function + +

    If the first argument was a string, a factory function for the filter to be registered.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    Object

    Registered filter instance, or if a map of filters was provided then a map + of the registered filter instances.

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/provider/$httpProvider.html b/1.6.6/docs/partials/api/ng/provider/$httpProvider.html new file mode 100644 index 000000000..e66f68075 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/provider/$httpProvider.html @@ -0,0 +1,198 @@ + Improve this Doc + + + + +  View Source + + + +
+

$httpProvider

+
    + +
  1. + - $http +
  2. + +
  3. + - provider in module ng +
  4. +
+
+ + + + + +
+

Use $httpProvider to change the default behavior of the $http service.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    useApplyAsync([value]);

    + +

    +

    Configure $http service to combine processing of multiple http responses received at around +the same time via $rootScope.$applyAsync. This can result in +significant performance improvement for bigger applications that make many HTTP requests +concurrently (common during application bootstrap).

    +

    Defaults to false. If no value is specified, returns the current configured value.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + value + +
    (optional)
    +
    + boolean + +

    If true, when requests are loaded, they will schedule a deferred + "apply" on the next tick, giving time for subsequent requests in a roughly ~10ms window + to load and share the same digest cycle.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    booleanObject

    If a value is specified, returns the $httpProvider for chaining. + otherwise, returns the current configured value.

    +
    +
  • +
+ + +

Properties

+
    +
  • +

    defaults

    + + + + + +

    Object containing default values for all $http requests.

    +
      +
    • defaults.cache - {boolean|Object} - A boolean value or object created with +$cacheFactory to enable or disable caching of HTTP responses +by default. See $http Caching for more information.

      +
    • +
    • defaults.headers - {Object} - Default headers for all $http requests. +Refer to $http for documentation on +setting default headers.

      +
        +
      • defaults.headers.common
      • +
      • defaults.headers.post
      • +
      • defaults.headers.put
      • +
      • defaults.headers.patch
      • +
      +
    • +
    • defaults.jsonpCallbackParam - {string} - the name of the query parameter that passes the name of the +callback in a JSONP request. The value of this parameter will be replaced with the expression generated by the +$jsonpCallbacks service. Defaults to 'callback'.

      +
    • +
    • defaults.paramSerializer - {string|function(Object<string,string>):string} - A function +used to the prepare string representation of request parameters (specified as an object). +If specified as string, it is interpreted as a function registered with the $injector. +Defaults to $httpParamSerializer.

      +
    • +
    • defaults.transformRequest - +{Array<function(data, headersGetter)>|function(data, headersGetter)} - +An array of functions (or a single function) which are applied to the request data. +By default, this is an array with one request transformation function:

      +
        +
      • If the data property of the request configuration object contains an object, serialize it +into JSON format.
      • +
      +
    • +
    • defaults.transformResponse - +{Array<function(data, headersGetter, status)>|function(data, headersGetter, status)} - +An array of functions (or a single function) which are applied to the response data. By default, +this is an array which applies one response transformation function that does two things:

      + +
    • +
    • defaults.xsrfCookieName - {string} - Name of cookie containing the XSRF token. +Defaults value is 'XSRF-TOKEN'.

      +
    • +
    • defaults.xsrfHeaderName - {string} - Name of HTTP header to populate with the +XSRF token. Defaults value is 'X-XSRF-TOKEN'.

      +
    • +
    +
    + +
  • + +
  • +

    interceptors

    + + + + + +

    Array containing service factories for all synchronous or asynchronous $http +pre-processing of request or postprocessing of responses.

    +

    These service factories are ordered by request, i.e. they are applied in the same order as the +array, on request, but reverse order, on response.

    +

    Interceptors detailed info

    +
    + +
  • +
+ + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/provider/$interpolateProvider.html b/1.6.6/docs/partials/api/ng/provider/$interpolateProvider.html new file mode 100644 index 000000000..4ef3ad10d --- /dev/null +++ b/1.6.6/docs/partials/api/ng/provider/$interpolateProvider.html @@ -0,0 +1,205 @@ + Improve this Doc + + + + +  View Source + + + +
+

$interpolateProvider

+
    + +
  1. + - $interpolate +
  2. + +
  3. + - provider in module ng +
  4. +
+
+ + + + + +
+

Used for configuring the interpolation markup. Defaults to {{ and }}.

+
+This feature is sometimes used to mix different markup languages, e.g. to wrap an Angular +template within a Python Jinja template (or any other template language). Mixing templating +languages is very dangerous. The embedding template language will not safely escape Angular +expressions, so any user-controlled values in the template will cause Cross Site Scripting (XSS) +security bugs! +
+
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    startSymbol([value]);

    + +

    +

    Symbol to denote start of expression in the interpolated string. Defaults to {{.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + value + +
    (optional)
    +
    + string + +

    new value to set the starting symbol to.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    stringself

    Returns the symbol when used as getter and self if used as setter.

    +
    +
  • + +
  • +

    endSymbol([value]);

    + +

    +

    Symbol to denote the end of expression in the interpolated string. Defaults to }}.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + value + +
    (optional)
    +
    + string + +

    new value to set the ending symbol to.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    stringself

    Returns the symbol when used as getter and self if used as setter.

    +
    +
  • +
+ + + + + + +

Examples

+ +

+ + +
+ + +
+
<script>
  var customInterpolationApp = angular.module('customInterpolationApp', []);

  customInterpolationApp.config(function($interpolateProvider) {
    $interpolateProvider.startSymbol('//');
    $interpolateProvider.endSymbol('//');
  });


  customInterpolationApp.controller('DemoController', function() {
      this.label = "This binding is brought you by // interpolation symbols.";
  });
</script>
<div ng-controller="DemoController as demo">
    //demo.label//
</div>
+
+ +
+
it('should interpolate binding with custom symbols', function() {
  expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/provider/$locationProvider.html b/1.6.6/docs/partials/api/ng/provider/$locationProvider.html new file mode 100644 index 000000000..714a82f8a --- /dev/null +++ b/1.6.6/docs/partials/api/ng/provider/$locationProvider.html @@ -0,0 +1,182 @@ + Improve this Doc + + + + +  View Source + + + +
+

$locationProvider

+
    + +
  1. + - $location +
  2. + +
  3. + - provider in module ng +
  4. +
+
+ + + + + +
+

Use the $locationProvider to configure how the application deep linking paths are stored.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    hashPrefix([prefix]);

    + +

    +

    The default value for the prefix is '!'.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + prefix + +
    (optional)
    +
    + string + +

    Prefix for hash part (containing path and search)

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    current value if used as getter or itself (chaining) if used as setter

    +
    +
  • + +
  • +

    html5Mode([mode]);

    + +

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + mode + +
    (optional)
    +
    + booleanObject + +

    If boolean, sets html5Mode.enabled to value. + If object, sets enabled, requireBase and rewriteLinks to respective values. Supported + properties:

    +
      +
    • enabled{boolean} – (default: false) If true, will rely on history.pushState to +change urls where supported. Will fall back to hash-prefixed paths in browsers that do not +support pushState.
    • +
    • requireBase - {boolean} - (default: true) When html5Mode is enabled, specifies +whether or not a tag is required to be present. If enabled and requireBase are +true, and a base tag is not present, an error will be thrown when $location is injected. +See the $location guide for more information
    • +
    • rewriteLinks - {boolean|string} - (default: true) When html5Mode is enabled, +enables/disables URL rewriting for relative links. If set to a string, URL rewriting will +only happen on links with an attribute that matches the given string. For example, if set +to 'internal-link', then the URL will only be rewritten for <a internal-link> links. +Note that attribute name normalization does not apply +here, so 'internalLink' will not match 'internal-link'.
    • +
    + + +
    + + + + + + +

    Returns

    + + + + + +
    Object

    html5Mode object if used as getter or itself (chaining) if used as setter

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/provider/$logProvider.html b/1.6.6/docs/partials/api/ng/provider/$logProvider.html new file mode 100644 index 000000000..5ad704cf6 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/provider/$logProvider.html @@ -0,0 +1,109 @@ + Improve this Doc + + + + +  View Source + + + +
+

$logProvider

+
    + +
  1. + - $log +
  2. + +
  3. + - provider in module ng +
  4. +
+
+ + + + + +
+

Use the $logProvider to configure how the application logs messages

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    debugEnabled([flag]);

    + +

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + flag + +
    (optional)
    +
    + boolean + +

    enable or disable debug level messages

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    current value if used as getter or itself (chaining) if used as setter

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/provider/$parseProvider.html b/1.6.6/docs/partials/api/ng/provider/$parseProvider.html new file mode 100644 index 000000000..17db7239b --- /dev/null +++ b/1.6.6/docs/partials/api/ng/provider/$parseProvider.html @@ -0,0 +1,193 @@ + Improve this Doc + + + + +  View Source + + + +
+

$parseProvider

+
    + +
  1. + - $parse +
  2. + +
  3. + - provider in module ng +
  4. +
+
+ + + + + +
+

$parseProvider can be used for configuring the default behavior of the $parse + service.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    addLiteral(literalName, literalValue);

    + +

    +

    Configure $parse service to add literal values that will be present as literal at expressions.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + literalName + + + + string + +

    Token for the literal value. The literal name value must be a valid literal name.

    + + +
    + literalValue + + + + * + +

    Value for this literal. All literal values must be primitives or undefined.

    + + +
    + + + + + +
  • + +
  • +

    setIdentifierFns([identifierStart], [identifierContinue]);

    + +

    +

    Allows defining the set of characters that are allowed in Angular expressions. The function +identifierStart will get called to know if a given character is a valid character to be the +first character for an identifier. The function identifierContinue will get called to know if +a given character is a valid character to be a follow-up identifier character. The functions +identifierStart and identifierContinue will receive as arguments the single character to be +identifier and the character code point. These arguments will be string and numeric. Keep in +mind that the string parameter can be two characters long depending on the character +representation. It is expected for the function to return true or false, whether that +character is allowed or not.

    +

    Since this function will be called extensively, keep the implementation of these functions fast, +as the performance of these functions have a direct impact on the expressions parsing speed.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + identifierStart + +
    (optional)
    +
    + function= + +

    The function that will decide whether the given character is + a valid identifier start character.

    + + +
    + identifierContinue + +
    (optional)
    +
    + function= + +

    The function that will decide whether the given character is + a valid identifier continue character.

    + + +
    + + + + + +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/provider/$qProvider.html b/1.6.6/docs/partials/api/ng/provider/$qProvider.html new file mode 100644 index 000000000..bcf2a21c2 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/provider/$qProvider.html @@ -0,0 +1,111 @@ + Improve this Doc + + + + +  View Source + + + +
+

$qProvider

+
    + +
  1. + - $q +
  2. + +
  3. + - provider in module ng +
  4. +
+
+ + + + + +
+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    errorOnUnhandledRejections([value]);

    + +

    +

    Retrieves or overrides whether to generate an error when a rejected promise is not handled. +This feature is enabled by default.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + value + +
    (optional)
    +
    + boolean + +

    Whether to generate an error when a rejected promise is not handled.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    booleanng.$qProvider

    Current value when called without a new value or self for + chaining otherwise.

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/provider/$rootScopeProvider.html b/1.6.6/docs/partials/api/ng/provider/$rootScopeProvider.html new file mode 100644 index 000000000..e8b8700af --- /dev/null +++ b/1.6.6/docs/partials/api/ng/provider/$rootScopeProvider.html @@ -0,0 +1,109 @@ + Improve this Doc + + + + +  View Source + + + +
+

$rootScopeProvider

+
    + +
  1. + - $rootScope +
  2. + +
  3. + - provider in module ng +
  4. +
+
+ + + + + +
+

Provider for the $rootScope service.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    digestTtl(limit);

    + +

    +

    Sets the number of $digest iterations the scope should attempt to execute before giving up and +assuming that the model is unstable.

    +

    The current default is 10 iterations.

    +

    In complex applications it's possible that the dependencies between $watchs will result in +several digest iterations. However if an application needs more than the default 10 digest +iterations for its model to stabilize then you should investigate what is causing the model to +continuously change during the digest.

    +

    Increasing the TTL could have performance implications, so you should not change it without +proper justification.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + limit + + + + number + +

    The number of digest iterations.

    + + +
    + + + + + +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/provider/$sceDelegateProvider.html b/1.6.6/docs/partials/api/ng/provider/$sceDelegateProvider.html new file mode 100644 index 000000000..5b2017dda --- /dev/null +++ b/1.6.6/docs/partials/api/ng/provider/$sceDelegateProvider.html @@ -0,0 +1,222 @@ + Improve this Doc + + + + +  View Source + + + +
+

$sceDelegateProvider

+
    + +
  1. + - $sceDelegate +
  2. + +
  3. + - provider in module ng +
  4. +
+
+ + + + + +
+

The $sceDelegateProvider provider allows developers to configure the $sceDelegate service, used as a delegate for Strict Contextual Escaping (SCE).

+

The $sceDelegateProvider allows one to get/set the whitelists and blacklists used to ensure +that the URLs used for sourcing AngularJS templates and other script-running URLs are safe (all +places that use the $sce.RESOURCE_URL context). See +$sceDelegateProvider.resourceUrlWhitelist +and +$sceDelegateProvider.resourceUrlBlacklist,

+

For the general details about this service in Angular, read the main page for Strict Contextual Escaping (SCE).

+

Example: Consider the following case.

+
    +
  • your app is hosted at url http://myapp.example.com/
  • +
  • but some of your templates are hosted on other domains you control such as +http://srv01.assets.example.com/, http://srv02.assets.example.com/, etc.
  • +
  • and you have an open redirect at http://myapp.example.com/clickThru?....
  • +
+

Here is what a secure configuration for this scenario might look like:

+
angular.module('myApp', []).config(function($sceDelegateProvider) {
+  $sceDelegateProvider.resourceUrlWhitelist([
+    // Allow same origin resource loads.
+    'self',
+    // Allow loading from our assets domain.  Notice the difference between * and **.
+    'http://srv*.assets.example.com/**'
+  ]);
+
+  // The blacklist overrides the whitelist so the open redirect here is blocked.
+  $sceDelegateProvider.resourceUrlBlacklist([
+    'http://myapp.example.com/clickThru**'
+  ]);
+});
+
+

Note that an empty whitelist will block every resource URL from being loaded, and will require +you to manually mark each one as trusted with $sce.trustAsResourceUrl. However, templates +requested by $templateRequest that are present in +$templateCache will not go through this check. If you have a mechanism +to populate your templates in that cache at config time, then it is a good idea to remove 'self' +from that whitelist. This helps to mitigate the security impact of certain types of issues, like +for instance attacker-controlled ng-includes.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    resourceUrlWhitelist([whitelist]);

    + +

    +

    Sets/Gets the whitelist of trusted resource URLs.

    +

    The default value when no whitelist has been explicitly set is ['self'] allowing only +same origin resource requests.

    +
    +Note: the default whitelist of 'self' is not recommended if your app shares its origin +with other apps! It is a good idea to limit it to only your application's directory. +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + whitelist + +
    (optional)
    +
    + Array + +

    When provided, replaces the resourceUrlWhitelist with the value + provided. This must be an array or null. A snapshot of this array is used so further + changes to the array are ignored. + Follow this link for a description of the items + allowed in this array.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    Array

    The currently set whitelist array.

    +
    +
  • + +
  • +

    resourceUrlBlacklist([blacklist]);

    + +

    +

    Sets/Gets the blacklist of trusted resource URLs.

    +

    The default value when no whitelist has been explicitly set is the empty array (i.e. there +is no blacklist.)

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + blacklist + +
    (optional)
    +
    + Array + +

    When provided, replaces the resourceUrlBlacklist with the value + provided. This must be an array or null. A snapshot of this array is used so further + changes to the array are ignored.

    + Follow this link for a description of the items + allowed in this array.

    + The typical usage for the blacklist is to block + open redirects served by your domain as + these would otherwise be trusted but actually return content from the redirected domain. +

    + Finally, the blacklist overrides the whitelist and has the final say.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    Array

    The currently set blacklist array.

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/provider/$sceProvider.html b/1.6.6/docs/partials/api/ng/provider/$sceProvider.html new file mode 100644 index 000000000..3e3498c50 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/provider/$sceProvider.html @@ -0,0 +1,115 @@ + Improve this Doc + + + + +  View Source + + + +
+

$sceProvider

+
    + +
  1. + - $sce +
  2. + +
  3. + - provider in module ng +
  4. +
+
+ + + + + +
+

The $sceProvider provider allows developers to configure the $sce service.

+
    +
  • enable/disable Strict Contextual Escaping (SCE) in a module
  • +
  • override the default implementation with a custom delegate
  • +
+

Read more about Strict Contextual Escaping (SCE).

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    enabled([value]);

    + +

    +

    Enables/disables SCE and returns the current value.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + value + +
    (optional)
    +
    + boolean + +

    If provided, then enables/disables SCE application-wide.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    boolean

    True if SCE is enabled, false otherwise.

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/provider/$templateRequestProvider.html b/1.6.6/docs/partials/api/ng/provider/$templateRequestProvider.html new file mode 100644 index 000000000..ac5b45035 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/provider/$templateRequestProvider.html @@ -0,0 +1,115 @@ + Improve this Doc + + + + +  View Source + + + +
+

$templateRequestProvider

+
    + +
  1. + - $templateRequest +
  2. + +
  3. + - provider in module ng +
  4. +
+
+ + + + + +
+

Used to configure the options passed to the $http service when making a template request.

+

For example, it can be used for specifying the "Accept" header that is sent to the server, when +requesting a template.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    httpOptions([value]);

    + +

    +

    The options to be passed to the $http service when making the request. +You can use this to override options such as the "Accept" header for template requests.

    +

    The $templateRequest will set the cache and the transformResponse properties of the +options if not overridden here.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + value + +
    (optional)
    +
    + string + +

    new value for the $http options.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    stringself

    Returns the $http options when used as getter and self if used as setter.

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service.html b/1.6.6/docs/partials/api/ng/service.html new file mode 100644 index 000000000..04eebd9b7 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service.html @@ -0,0 +1,246 @@ + +

Service components in ng

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
$anchorScroll

When called, it scrolls to the element related to the specified hash or (if omitted) to the +current value of $location.hash(), according to the rules specified +in the +HTML5 spec.

+
$animate

The $animate service exposes a series of DOM utility methods that provide support +for animation hooks. The default behavior is the application of DOM operations, however, +when an animation is detected (and animations are enabled), $animate will do the heavy lifting +to ensure that animation runs with the triggered DOM operation.

+
$animateCss

This is the core version of $animateCss. By default, only when the ngAnimate is included, +then the $animateCss service will actually perform animations.

+
$cacheFactory

Factory that constructs Cache objects and gives access to +them.

+
$templateCache

The first time a template is used, it is loaded in the template cache for quick retrieval. You +can load templates directly into the cache in a script tag, or by consuming the +$templateCache service directly.

+
$compile

Compiles an HTML string or DOM into a template and produces a template function, which +can then be used to link scope and the template together.

+
$controller

$controller service is responsible for instantiating controllers.

+
$document

A jQuery or jqLite wrapper for the browser's window.document object.

+
$exceptionHandler

Any uncaught exception in angular expressions is delegated to this service. +The default implementation simply delegates to $log.error which logs it into +the browser console.

+
$filter

Filters are used for formatting data displayed to the user.

+
$httpParamSerializer

Default $http params serializer that converts objects to strings +according to the following rules:

+
$httpParamSerializerJQLike

Alternative $http params serializer that follows +jQuery's param() method logic. +The serializer will also sort the params alphabetically.

+
$http

The $http service is a core Angular service that facilitates communication with the remote +HTTP servers via the browser's XMLHttpRequest +object or via JSONP.

+
$xhrFactory

Factory function used to create XMLHttpRequest objects.

+
$httpBackend

HTTP backend used by the service that delegates to +XMLHttpRequest object or JSONP and deals with browser incompatibilities.

+
$interpolate

Compiles a string with markup into an interpolation function. This service is used by the +HTML $compile service for data binding. See +$interpolateProvider for configuring the +interpolation markup.

+
$interval

Angular's wrapper for window.setInterval. The fn function is executed every delay +milliseconds.

+
$jsonpCallbacks

This service handles the lifecycle of callbacks to handle JSONP requests. +Override this service if you wish to customise where the callbacks are stored and +how they vary compared to the requested url.

+
$locale

$locale service provides localization rules for various Angular components. As of right now the +only public api is:

+
$location

The $location service parses the URL in the browser address bar (based on the +window.location) and makes the URL +available to your application. Changes to the URL in the address bar are reflected into +$location service and changes to $location are reflected into the browser address bar.

+
$log

Simple service for logging. Default implementation safely writes the message +into the browser's console (if present).

+
$parse

Converts Angular expression into a function.

+
$q

A service that helps you run functions asynchronously, and use their return values (or exceptions) +when they are done processing.

+
$rootElement

The root element of Angular application. This is either the element where ngApp was declared or the element passed into +angular.bootstrap. The element represents the root element of application. It is also the +location where the application's $injector service gets +published, and can be retrieved using $rootElement.injector().

+
$rootScope

Every application has a single root scope. +All other scopes are descendant scopes of the root scope. Scopes provide separation +between the model and the view, via a mechanism for watching the model for changes. +They also provide event emission/broadcast and subscription facility. See the +developer guide on scopes.

+
$sceDelegate

$sceDelegate is a service that is used by the $sce service to provide Strict +Contextual Escaping (SCE) services to AngularJS.

+
$sce

$sce is a service that provides Strict Contextual Escaping services to AngularJS.

+
$templateRequest

The $templateRequest service runs security checks then downloads the provided template using +$http and, upon success, stores the contents inside of $templateCache. If the HTTP request +fails or the response data of the HTTP request is empty, a $compile error will be thrown (the +exception can be thwarted by setting the 2nd parameter of the function to true). Note that the +contents of $templateCache are trusted, so the call to $sce.getTrustedUrl(tpl) is omitted +when tpl is of type string and $templateCache has the matching entry.

+
$timeout

Angular's wrapper for window.setTimeout. The fn function is wrapped into a try/catch +block and delegates any exceptions to +$exceptionHandler service.

+
$window

A reference to the browser's window object. While window +is globally available in JavaScript, it causes testability problems, because +it is a global variable. In angular we always refer to it through the +$window service, so it may be overridden, removed or mocked for testing.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ng/service/$anchorScroll.html b/1.6.6/docs/partials/api/ng/service/$anchorScroll.html new file mode 100644 index 000000000..da5bc9557 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$anchorScroll.html @@ -0,0 +1,220 @@ + Improve this Doc + + + + +  View Source + + + +
+

$anchorScroll

+
    + +
  1. + - $anchorScrollProvider +
  2. + +
  3. + - service in module ng +
  4. +
+
+ + + + + +
+

When called, it scrolls to the element related to the specified hash or (if omitted) to the +current value of $location.hash(), according to the rules specified +in the +HTML5 spec.

+

It also watches the $location.hash() and automatically scrolls to +match any anchor whenever it changes. This can be disabled by calling +$anchorScrollProvider.disableAutoScrolling().

+

Additionally, you can use its yOffset property to specify a +vertical scroll-offset (either fixed or dynamic).

+ +
+ + + + +
+ +

Dependencies

+ + + + + +

Usage

+ +

$anchorScroll([hash]);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ hash + +
(optional)
+
+ string + +

The hash specifying the element to scroll to. If omitted, the value of + $location.hash() will be used.

+ + +
+ +
+ + + + + + +

Properties

+
    +
  • +

    yOffset

    + + + + + +
    numberfunction()jqLite

    If set, specifies a vertical scroll-offset. This is often useful when there are fixed +positioned elements at the top of the page, such as navbars, headers etc.

    +

    yOffset can be specified in various ways:

    +
      +
    • number: A fixed number of pixels to be used as offset.

    • +
    • function: A getter function called everytime $anchorScroll() is executed. Must return +a number representing the offset (in pixels).

    • +
    • jqLite: A jqLite/jQuery element to be used for specifying the offset. The distance from +the top of the page to the element's bottom will be used as offset.
      +Note: The element will be taken into account only as long as its position is set to +fixed. This option is useful, when dealing with responsive navbars/headers that adjust +their height and/or positioning according to the viewport's size.
    • +
    +


    +
    +In order for yOffset to work properly, scrolling should take place on the document's root and +not some child element. +
    + +
  • +
+ + + + +

Examples

+ +

+ + +
+ + +
+
<div id="scrollArea" ng-controller="ScrollController">
  <a ng-click="gotoBottom()">Go to bottom</a>
  <a id="bottom"></a> You're at the bottom!
</div>
+
+ +
+
angular.module('anchorScrollExample', [])
.controller('ScrollController', ['$scope', '$location', '$anchorScroll',
  function($scope, $location, $anchorScroll) {
    $scope.gotoBottom = function() {
      // set the location.hash to the id of
      // the element you wish to scroll to.
      $location.hash('bottom');

      // call $anchorScroll()
      $anchorScroll();
    };
  }]);
+
+ +
+
#scrollArea {
  height: 280px;
  overflow: auto;
}

#bottom {
  display: block;
  margin-top: 2000px;
}
+
+ + + +
+
+ + +

+


+The example below illustrates the use of a vertical scroll-offset (specified as a fixed value). +See $anchorScroll.yOffset for more details.

+

+ +

+ + +
+ + +
+
<div class="fixed-header" ng-controller="headerCtrl">
  <a href="" ng-click="gotoAnchor(x)" ng-repeat="x in [1,2,3,4,5]">
    Go to anchor {{x}}
  </a>
</div>
<div id="anchor{{x}}" class="anchor" ng-repeat="x in [1,2,3,4,5]">
  Anchor {{x}} of 5
</div>
+
+ +
+
angular.module('anchorScrollOffsetExample', [])
.run(['$anchorScroll', function($anchorScroll) {
  $anchorScroll.yOffset = 50;   // always scroll by 50 extra pixels
}])
.controller('headerCtrl', ['$anchorScroll', '$location', '$scope',
  function($anchorScroll, $location, $scope) {
    $scope.gotoAnchor = function(x) {
      var newHash = 'anchor' + x;
      if ($location.hash() !== newHash) {
        // set the $location.hash to `newHash` and
        // $anchorScroll will automatically scroll to it
        $location.hash('anchor' + x);
      } else {
        // call $anchorScroll() explicitly,
        // since $location.hash hasn't changed
        $anchorScroll();
      }
    };
  }
]);
+
+ +
+
body {
  padding-top: 50px;
}

.anchor {
  border: 2px dashed DarkOrchid;
  padding: 10px 10px 200px 10px;
}

.fixed-header {
  background-color: rgba(0, 0, 0, 0.2);
  height: 50px;
  position: fixed;
  top: 0; left: 0; right: 0;
}

.fixed-header > a {
  display: inline-block;
  margin: 5px 15px;
}
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$animate.html b/1.6.6/docs/partials/api/ng/service/$animate.html new file mode 100644 index 000000000..46ae0d743 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$animate.html @@ -0,0 +1,1227 @@ + Improve this Doc + + + + +  View Source + + + +
+

$animate

+
    + +
  1. + - $animateProvider +
  2. + +
  3. + - service in module ng +
  4. +
+
+ + + + + +
+

The $animate service exposes a series of DOM utility methods that provide support +for animation hooks. The default behavior is the application of DOM operations, however, +when an animation is detected (and animations are enabled), $animate will do the heavy lifting +to ensure that animation runs with the triggered DOM operation.

+

By default $animate doesn't trigger any animations. This is because the ngAnimate module isn't +included and only when it is active then the animation hooks that $animate triggers will be +functional. Once active then all structural ng- directives will trigger animations as they perform +their DOM-related operations (enter, leave and move). Other directives such as ngClass, +ngShow, ngHide and ngMessages also provide support for animations.

+

It is recommended that the$animate service is always used when executing DOM-related procedures within directives.

+

To learn more about enabling animation support, click here to visit the +ngAnimate module page.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    on(event, container, callback);

    + +

    +

    Sets up an event listener to fire whenever the animation event (enter, leave, move, etc...) + has fired on the given element or among any of its children. Once the listener is fired, the provided callback + is fired with the following params:

    +
    $animate.on('enter', container,
    +   function callback(element, phase) {
    +     // cool we detected an enter animation within the container
    +   }
    +);
    +
    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + event + + + + string + +

    the animation event that will be captured (e.g. enter, leave, move, addClass, removeClass, etc...)

    + + +
    + container + + + + DOMElement + +

    the container element that will capture each of the animation events that are fired on itself + as well as among its children

    + + +
    + callback + + + + Function + +

    the callback function that will be fired when the listener is triggered

    +

    The arguments present in the callback function are:

    +
      +
    • element - The captured DOM element that the animation was fired on.
    • +
    • phase - The phase of the animation. The two possible phases are start (when the animation starts) and close (when it ends).
    • +
    + + +
    + + + + + +
  • + +
  • +

    off(event, [container], [callback]);

    + +

    +

    Deregisters an event listener based on the event which has been associated with the provided element. This method +can be used in three different ways depending on the arguments:

    +
    // remove all the animation event listeners listening for `enter`
    +$animate.off('enter');
    +
    +// remove listeners for all animation events from the container element
    +$animate.off(container);
    +
    +// remove all the animation event listeners listening for `enter` on the given element and its children
    +$animate.off('enter', container);
    +
    +// remove the event listener function provided by `callback` that is set
    +// to listen for `enter` on the given `container` as well as its children
    +$animate.off('enter', container, callback);
    +
    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + event + | container + + + stringDOMElement + +

    the animation event (e.g. enter, leave, move, +addClass, removeClass, etc...), or the container element. If it is the element, all other +arguments are ignored.

    + + +
    + container + +
    (optional)
    +
    + DOMElement + +

    the container element the event listener was placed on

    + + +
    + callback + +
    (optional)
    +
    + Function= + +

    the callback function that was registered as the listener

    + + +
    + + + + + +
  • + +
  • +

    pin(element, parentElement);

    + +

    +

    Associates the provided element with a host parent element to allow the element to be animated even if it exists + outside of the DOM structure of the Angular application. By doing so, any animation triggered via $animate can be issued on the + element despite being outside the realm of the application or within another application. Say for example if the application + was bootstrapped on an element that is somewhere inside of the <body> tag, but we wanted to allow for an element to be situated + as a direct child of document.body, then this can be achieved by pinning the element via $animate.pin(element). Keep in mind + that calling $animate.pin(element, parentElement) will not actually insert into the DOM anywhere; it will just create the association.

    +

    Note that this feature is only active when the ngAnimate module is used.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + element + + + + DOMElement + +

    the external element that will be pinned

    + + +
    + parentElement + + + + DOMElement + +

    the host parent element that will be associated with the external element

    + + +
    + + + + + +
  • + +
  • +

    enabled([element], [enabled]);

    + +

    +

    Used to get and set whether animations are enabled or not on the entire application or on an element and its children. This +function can be called in four ways:

    +
    // returns true or false
    +$animate.enabled();
    +
    +// changes the enabled state for all animations
    +$animate.enabled(false);
    +$animate.enabled(true);
    +
    +// returns true or false if animations are enabled for an element
    +$animate.enabled(element);
    +
    +// changes the enabled state for an element and its children
    +$animate.enabled(element, true);
    +$animate.enabled(element, false);
    +
    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + element + +
    (optional)
    +
    + DOMElement + +

    the element that will be considered for checking/setting the enabled state

    + + +
    + enabled + +
    (optional)
    +
    + boolean + +

    whether or not the animations will be enabled for the element

    + + +
    + + + + + + +

    Returns

    + + + + + +
    boolean

    whether or not animations are enabled

    +
    +
  • + +
  • +

    cancel(animationPromise);

    + +

    +

    Cancels the provided animation.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + animationPromise + + + + Promise + +

    The animation promise that is returned when an animation is started.

    + + +
    + + + + + +
  • + +
  • +

    enter(element, parent, [after], [options]);

    + +

    +

    Inserts the element into the DOM either after the after element (if provided) or + as the first child within the parent element and then triggers an animation. + A promise is returned that will be resolved during the next digest once the animation + has completed.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + element + + + + DOMElement + +

    the element which will be inserted into the DOM

    + + +
    + parent + + + + DOMElement + +

    the parent element which will append the element as + a child (so long as the after element is not present)

    + + +
    + after + +
    (optional)
    +
    + DOMElement + +

    the sibling element after which the element will be appended

    + + +
    + options + +
    (optional)
    +
    + object + +

    an optional collection of options/styles that will be applied to the element. + The object can have the following properties:

    +
      +
    • addClass - {string} - space-separated CSS classes to add to element
    • +
    • from - {Object} - CSS properties & values at the beginning of animation. Must have matching to
    • +
    • removeClass - {string} - space-separated CSS classes to remove from element
    • +
    • to - {Object} - CSS properties & values at end of animation. Must have matching from
    • +
    + + +
    + + + + + + +

    Returns

    + + + + + +
    Promise

    the animation callback promise

    +
    +
  • + +
  • +

    move(element, parent, [after], [options]);

    + +

    +

    Inserts (moves) the element into its new position in the DOM either after + the after element (if provided) or as the first child within the parent element + and then triggers an animation. A promise is returned that will be resolved + during the next digest once the animation has completed.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + element + + + + DOMElement + +

    the element which will be moved into the new DOM position

    + + +
    + parent + + + + DOMElement + +

    the parent element which will append the element as + a child (so long as the after element is not present)

    + + +
    + after + +
    (optional)
    +
    + DOMElement + +

    the sibling element after which the element will be appended

    + + +
    + options + +
    (optional)
    +
    + object + +

    an optional collection of options/styles that will be applied to the element. + The object can have the following properties:

    +
      +
    • addClass - {string} - space-separated CSS classes to add to element
    • +
    • from - {Object} - CSS properties & values at the beginning of animation. Must have matching to
    • +
    • removeClass - {string} - space-separated CSS classes to remove from element
    • +
    • to - {Object} - CSS properties & values at end of animation. Must have matching from
    • +
    + + +
    + + + + + + +

    Returns

    + + + + + +
    Promise

    the animation callback promise

    +
    +
  • + +
  • +

    leave(element, [options]);

    + +

    +

    Triggers an animation and then removes the element from the DOM. +When the function is called a promise is returned that will be resolved during the next +digest once the animation has completed.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + element + + + + DOMElement + +

    the element which will be removed from the DOM

    + + +
    + options + +
    (optional)
    +
    + object + +

    an optional collection of options/styles that will be applied to the element. + The object can have the following properties:

    +
      +
    • addClass - {string} - space-separated CSS classes to add to element
    • +
    • from - {Object} - CSS properties & values at the beginning of animation. Must have matching to
    • +
    • removeClass - {string} - space-separated CSS classes to remove from element
    • +
    • to - {Object} - CSS properties & values at end of animation. Must have matching from
    • +
    + + +
    + + + + + + +

    Returns

    + + + + + +
    Promise

    the animation callback promise

    +
    +
  • + +
  • +

    addClass(element, className, [options]);

    + +

    +

    Triggers an addClass animation surrounding the addition of the provided CSS class(es). Upon + execution, the addClass operation will only be handled after the next digest and it will not trigger an + animation if element already contains the CSS class or if the class is removed at a later step. + Note that class-based animations are treated differently compared to structural animations + (like enter, move and leave) since the CSS classes may be added/removed at different points + depending if CSS or JavaScript animations are used.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + element + + + + DOMElement + +

    the element which the CSS classes will be applied to

    + + +
    + className + + + + string + +

    the CSS class(es) that will be added (multiple classes are separated via spaces)

    + + +
    + options + +
    (optional)
    +
    + object + +

    an optional collection of options/styles that will be applied to the element. + The object can have the following properties:

    +
      +
    • addClass - {string} - space-separated CSS classes to add to element
    • +
    • from - {Object} - CSS properties & values at the beginning of animation. Must have matching to
    • +
    • removeClass - {string} - space-separated CSS classes to remove from element
    • +
    • to - {Object} - CSS properties & values at end of animation. Must have matching from
    • +
    + + +
    + + + + + + +

    Returns

    + + + + + +
    Promise

    the animation callback promise

    +
    +
  • + +
  • +

    removeClass(element, className, [options]);

    + +

    +

    Triggers a removeClass animation surrounding the removal of the provided CSS class(es). Upon + execution, the removeClass operation will only be handled after the next digest and it will not trigger an + animation if element does not contain the CSS class or if the class is added at a later step. + Note that class-based animations are treated differently compared to structural animations + (like enter, move and leave) since the CSS classes may be added/removed at different points + depending if CSS or JavaScript animations are used.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + element + + + + DOMElement + +

    the element which the CSS classes will be applied to

    + + +
    + className + + + + string + +

    the CSS class(es) that will be removed (multiple classes are separated via spaces)

    + + +
    + options + +
    (optional)
    +
    + object + +

    an optional collection of options/styles that will be applied to the element. + The object can have the following properties:

    +
      +
    • addClass - {string} - space-separated CSS classes to add to element
    • +
    • from - {Object} - CSS properties & values at the beginning of animation. Must have matching to
    • +
    • removeClass - {string} - space-separated CSS classes to remove from element
    • +
    • to - {Object} - CSS properties & values at end of animation. Must have matching from
    • +
    + + +
    + + + + + + +

    Returns

    + + + + + +
    Promise

    the animation callback promise

    +
    +
  • + +
  • +

    setClass(element, add, remove, [options]);

    + +

    +

    Performs both the addition and removal of a CSS classes on an element and (during the process) + triggers an animation surrounding the class addition/removal. Much like $animate.addClass and + $animate.removeClass, setClass will only evaluate the classes being added/removed once a digest has + passed. Note that class-based animations are treated differently compared to structural animations + (like enter, move and leave) since the CSS classes may be added/removed at different points + depending if CSS or JavaScript animations are used.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + element + + + + DOMElement + +

    the element which the CSS classes will be applied to

    + + +
    + add + + + + string + +

    the CSS class(es) that will be added (multiple classes are separated via spaces)

    + + +
    + remove + + + + string + +

    the CSS class(es) that will be removed (multiple classes are separated via spaces)

    + + +
    + options + +
    (optional)
    +
    + object + +

    an optional collection of options/styles that will be applied to the element. + The object can have the following properties:

    +
      +
    • addClass - {string} - space-separated CSS classes to add to element
    • +
    • from - {Object} - CSS properties & values at the beginning of animation. Must have matching to
    • +
    • removeClass - {string} - space-separated CSS classes to remove from element
    • +
    • to - {Object} - CSS properties & values at end of animation. Must have matching from
    • +
    + + +
    + + + + + + +

    Returns

    + + + + + +
    Promise

    the animation callback promise

    +
    +
  • + +
  • +

    animate(element, from, to, [className], [options]);

    + +

    +

    Performs an inline animation on the element which applies the provided to and from CSS styles to the element. +If any detected CSS transition, keyframe or JavaScript matches the provided className value, then the animation will take +on the provided styles. For example, if a transition animation is set for the given className, then the provided from and +to styles will be applied alongside the given transition. If the CSS style provided in from does not have a corresponding +style in to, the style in from is applied immediately, and no animation is run. +If a JavaScript animation is detected then the provided styles will be given in as function parameters into the animate +method (or as part of the options parameter):

    +
    ngModule.animation('.my-inline-animation', function() {
    +  return {
    +    animate : function(element, from, to, done, options) {
    +      //animation
    +      done();
    +    }
    +  }
    +});
    +
    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + element + + + + DOMElement + +

    the element which the CSS styles will be applied to

    + + +
    + from + + + + object + +

    the from (starting) CSS styles that will be applied to the element and across the animation.

    + + +
    + to + + + + object + +

    the to (destination) CSS styles that will be applied to the element and across the animation.

    + + +
    + className + +
    (optional)
    +
    + string + +

    an optional CSS class that will be applied to the element for the duration of the animation. If + this value is left as empty then a CSS class of ng-inline-animate will be applied to the element. + (Note that if no animation is detected then this value will not be applied to the element.)

    + + +
    + options + +
    (optional)
    +
    + object + +

    an optional collection of options/styles that will be applied to the element. + The object can have the following properties:

    +
      +
    • addClass - {string} - space-separated CSS classes to add to element
    • +
    • from - {Object} - CSS properties & values at the beginning of animation. Must have matching to
    • +
    • removeClass - {string} - space-separated CSS classes to remove from element
    • +
    • to - {Object} - CSS properties & values at end of animation. Must have matching from
    • +
    + + +
    + + + + + + +

    Returns

    + + + + + +
    Promise

    the animation callback promise

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$animateCss.html b/1.6.6/docs/partials/api/ng/service/$animateCss.html new file mode 100644 index 000000000..d0dbe2e46 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$animateCss.html @@ -0,0 +1,52 @@ + Improve this Doc + + + + +  View Source + + + +
+

$animateCss

+
    + + + +
  1. + - service in module ng +
  2. +
+
+ + + + + +
+

This is the core version of $animateCss. By default, only when the ngAnimate is included, +then the $animateCss service will actually perform animations.

+

Click here to read the documentation for $animateCss.

+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$cacheFactory.html b/1.6.6/docs/partials/api/ng/service/$cacheFactory.html new file mode 100644 index 000000000..a211a94fa --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$cacheFactory.html @@ -0,0 +1,262 @@ + Improve this Doc + + + + +  View Source + + + +
+

$cacheFactory

+
    + + + +
  1. + - service in module ng +
  2. +
+
+ + + + + +
+

Factory that constructs Cache objects and gives access to +them.

+
var cache = $cacheFactory('cacheId');
+expect($cacheFactory.get('cacheId')).toBe(cache);
+expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();
+
+cache.put("key", "value");
+cache.put("another key", "another value");
+
+// We've specified no options on creation
+expect(cache.info()).toEqual({id: 'cacheId', size: 2});
+
+ +
+ + + + +
+ + + + +

Usage

+ +

$cacheFactory(cacheId, [options]);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ cacheId + + + + string + +

Name or id of the newly created cache.

+ + +
+ options + +
(optional)
+
+ object + +

Options object that specifies the cache behavior. Properties:

+
    +
  • {number=} capacity — turns the cache into LRU cache.
  • +
+ + +
+ +
+ +

Returns

+ + + + + +
object

Newly created cache object with the following set of methods:

+
    +
  • {object} info() — Returns id, size, and options of cache.
  • +
  • {{*}} put({string} key, {*} value) — Puts a new key-value pair into the cache and returns +it.
  • +
  • {{*}} get({string} key) — Returns cached value for key or undefined for cache miss.
  • +
  • {void} remove({string} key) — Removes a key-value pair from the cache.
  • +
  • {void} removeAll() — Removes all cached values.
  • +
  • {void} destroy() — Removes references to this cache from $cacheFactory.
  • +
+
+ + +

Methods

+
    +
  • +

    info();

    + +

    +

    Get information about all the caches that have been created

    +
    + + + + + + + + +

    Returns

    + + + + + +
    Object
      +
    • key-value map of cacheId to the result of calling cache#info
    • +
    +
    +
  • + +
  • +

    get(cacheId);

    + +

    +

    Get access to a cache object by the cacheId used when it was created.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + cacheId + + + + string + +

    Name or id of a cache to access.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    object

    Cache object identified by the cacheId or undefined if no such cache.

    +
    +
  • +
+ + + + + + +

Examples

+ +

+ + +
+ + +
+
<div ng-controller="CacheController">
  <input ng-model="newCacheKey" placeholder="Key">
  <input ng-model="newCacheValue" placeholder="Value">
  <button ng-click="put(newCacheKey, newCacheValue)">Cache</button>

  <p ng-if="keys.length">Cached Values</p>
  <div ng-repeat="key in keys">
    <span ng-bind="key"></span>
    <span>: </span>
    <b ng-bind="cache.get(key)"></b>
  </div>

  <p>Cache Info</p>
  <div ng-repeat="(key, value) in cache.info()">
    <span ng-bind="key"></span>
    <span>: </span>
    <b ng-bind="value"></b>
  </div>
</div>
+
+ +
+
angular.module('cacheExampleApp', []).
controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) {
  $scope.keys = [];
  $scope.cache = $cacheFactory('cacheId');
  $scope.put = function(key, value) {
    if (angular.isUndefined($scope.cache.get(key))) {
      $scope.keys.push(key);
    }
    $scope.cache.put(key, angular.isUndefined(value) ? null : value);
  };
}]);
+
+ +
+
p {
  margin: 10px 0 3px;
}
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$compile.html b/1.6.6/docs/partials/api/ng/service/$compile.html new file mode 100644 index 000000000..e4e320153 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$compile.html @@ -0,0 +1,925 @@ + Improve this Doc + + + + +  View Source + + + +
+

$compile

+
    + +
  1. + - $compileProvider +
  2. + +
  3. + - service in module ng +
  4. +
+
+ + + + + +
+

Compiles an HTML string or DOM into a template and produces a template function, which +can then be used to link scope and the template together.

+

The compilation is a process of walking the DOM tree and matching DOM elements to +directives.

+
+Note: This document is an in-depth reference of all directive options. +For a gentle introduction to directives with examples of common use cases, +see the directive guide. +
+ +

Comprehensive Directive API

+

There are many different options for a directive.

+

The difference resides in the return value of the factory function. +You can either return a Directive Definition Object (see below) +that defines the directive properties, or just the postLink function (all other properties will have +the default values).

+
+Best Practice: It's recommended to use the "directive definition object" form. +
+ +

Here's an example directive declared with a Directive Definition Object:

+
var myModule = angular.module(...);
+
+myModule.directive('directiveName', function factory(injectables) {
+  var directiveDefinitionObject = {
+    priority: 0,
+    template: '<div></div>', // or // function(tElement, tAttrs) { ... },
+    // or
+    // templateUrl: 'directive.html', // or // function(tElement, tAttrs) { ... },
+    transclude: false,
+    restrict: 'A',
+    templateNamespace: 'html',
+    scope: false,
+    controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... },
+    controllerAs: 'stringIdentifier',
+    bindToController: false,
+    require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'],
+    multiElement: false,
+    compile: function compile(tElement, tAttrs, transclude) {
+      return {
+         pre: function preLink(scope, iElement, iAttrs, controller) { ... },
+         post: function postLink(scope, iElement, iAttrs, controller) { ... }
+      }
+      // or
+      // return function postLink( ... ) { ... }
+    },
+    // or
+    // link: {
+    //  pre: function preLink(scope, iElement, iAttrs, controller) { ... },
+    //  post: function postLink(scope, iElement, iAttrs, controller) { ... }
+    // }
+    // or
+    // link: function postLink( ... ) { ... }
+  };
+  return directiveDefinitionObject;
+});
+
+
+Note: Any unspecified options will use the default value. You can see the default values below. +
+ +

Therefore the above can be simplified as:

+
var myModule = angular.module(...);
+
+myModule.directive('directiveName', function factory(injectables) {
+  var directiveDefinitionObject = {
+    link: function postLink(scope, iElement, iAttrs) { ... }
+  };
+  return directiveDefinitionObject;
+  // or
+  // return function postLink(scope, iElement, iAttrs) { ... }
+});
+
+

Life-cycle hooks

+

Directive controllers can provide the following methods that are called by Angular at points in the life-cycle of the +directive:

+
    +
  • $onInit() - Called on each controller after all the controllers on an element have been constructed and +had their bindings initialized (and before the pre & post linking functions for the directives on +this element). This is a good place to put initialization code for your controller.
  • +
  • $onChanges(changesObj) - Called whenever one-way (<) or interpolation (@) bindings are updated. The +changesObj is a hash whose keys are the names of the bound properties that have changed, and the values are an +object of the form { currentValue, previousValue, isFirstChange() }. Use this hook to trigger updates within a +component such as cloning the bound value to prevent accidental mutation of the outer value. Note that this will +also be called when your bindings are initialized.
  • +
  • $doCheck() - Called on each turn of the digest cycle. Provides an opportunity to detect and act on +changes. Any actions that you wish to take in response to the changes that you detect must be +invoked from this hook; implementing this has no effect on when $onChanges is called. For example, this hook +could be useful if you wish to perform a deep equality check, or to check a Date object, changes to which would not +be detected by Angular's change detector and thus not trigger $onChanges. This hook is invoked with no arguments; +if detecting changes, you must store the previous value(s) for comparison to the current values.
  • +
  • $onDestroy() - Called on a controller when its containing scope is destroyed. Use this hook for releasing +external resources, watches and event handlers. Note that components have their $onDestroy() hooks called in +the same order as the $scope.$broadcast events are triggered, which is top down. This means that parent +components will have their $onDestroy() hook called before child components.
  • +
  • $postLink() - Called after this controller's element and its children have been linked. Similar to the post-link +function this hook can be used to set up DOM event handlers and do direct DOM manipulation. +Note that child elements that contain templateUrl directives will not have been compiled and linked since +they are waiting for their template to load asynchronously and their own compilation and linking has been +suspended until that occurs.
  • +
+

Comparison with Angular 2 life-cycle hooks

+

Angular 2 also uses life-cycle hooks for its components. While the Angular 1 life-cycle hooks are similar there are +some differences that you should be aware of, especially when it comes to moving your code from Angular 1 to Angular 2:

+
    +
  • Angular 1 hooks are prefixed with $, such as $onInit. Angular 2 hooks are prefixed with ng, such as ngOnInit.
  • +
  • Angular 1 hooks can be defined on the controller prototype or added to the controller inside its constructor. +In Angular 2 you can only define hooks on the prototype of the Component class.
  • +
  • Due to the differences in change-detection, you may get many more calls to $doCheck in Angular 1 than you would to +ngDoCheck in Angular 2
  • +
  • Changes to the model inside $doCheck will trigger new turns of the digest loop, which will cause the changes to be +propagated throughout the application. +Angular 2 does not allow the ngDoCheck hook to trigger a change outside of the component. It will either throw an +error or do nothing depending upon the state of enableProdMode().
  • +
+

Life-cycle hook examples

+

This example shows how you can check for mutations to a Date object even though the identity of the object +has not changed.

+

+ +

+ + +
+ + +
+
angular.module('do-check-module', [])
.component('app', {
  template:
    'Month: <input ng-model="$ctrl.month" ng-change="$ctrl.updateDate()">' +
    'Date: {{ $ctrl.date }}' +
    '<test date="$ctrl.date"></test>',
  controller: function() {
    this.date = new Date();
    this.month = this.date.getMonth();
    this.updateDate = function() {
      this.date.setMonth(this.month);
    };
  }
})
.component('test', {
  bindings: { date: '<' },
  template:
    '<pre>{{ $ctrl.log | json }}</pre>',
  controller: function() {
    var previousValue;
    this.log = [];
    this.$doCheck = function() {
      var currentValue = this.date && this.date.valueOf();
      if (previousValue !== currentValue) {
        this.log.push('doCheck: date mutated: ' + this.date);
        previousValue = currentValue;
      }
    };
  }
});
+
+ +
+
<app></app>
+
+ + + +
+
+ + +

+

This example show how you might use $doCheck to trigger changes in your component's inputs even if the +actual identity of the component doesn't change. (Be aware that cloning and deep equality checks on large +arrays or objects can have a negative impact on your application performance)

+

+ +

+ + +
+ + +
+
<div ng-init="items = []">
  <button ng-click="items.push(items.length)">Add Item</button>
  <button ng-click="items = []">Reset Items</button>
  <pre>{{ items }}</pre>
  <test items="items"></test>
</div>
+
+ +
+
angular.module('do-check-module', [])
.component('test', {
  bindings: { items: '<' },
  template:
    '<pre>{{ $ctrl.log | json }}</pre>',
  controller: function() {
    this.log = [];

    this.$doCheck = function() {
      if (this.items_ref !== this.items) {
        this.log.push('doCheck: items changed');
        this.items_ref = this.items;
      }
      if (!angular.equals(this.items_clone, this.items)) {
        this.log.push('doCheck: items mutated');
        this.items_clone = angular.copy(this.items);
      }
    };
  }
});
+
+ + + +
+
+ + +

+

Directive Definition Object

+

The directive definition object provides instructions to the compiler. The attributes are:

+

multiElement

+

When this property is set to true (default is false), the HTML compiler will collect DOM nodes between +nodes with the attributes directive-name-start and directive-name-end, and group them +together as the directive elements. It is recommended that this feature be used on directives +which are not strictly behavioral (such as ngClick), and which +do not manipulate or replace child nodes (such as ngInclude).

+

priority

+

When there are multiple directives defined on a single DOM element, sometimes it +is necessary to specify the order in which the directives are applied. The priority is used +to sort the directives before their compile functions get called. Priority is defined as a +number. Directives with greater numerical priority are compiled first. Pre-link functions +are also run in priority order, but post-link functions are run in reverse order. The order +of directives with the same priority is undefined. The default priority is 0.

+

terminal

+

If set to true then the current priority will be the last set of directives +which will execute (any directives at the current priority will still execute +as the order of execution on same priority is undefined). Note that expressions +and other directives used in the directive's template will also be excluded from execution.

+

scope

+

The scope property can be false, true, or an object:

+
    +
  • false (default): No scope will be created for the directive. The directive will use its +parent's scope.

    +
  • +
  • true: A new child scope that prototypically inherits from its parent will be created for +the directive's element. If multiple directives on the same element request a new scope, +only one new scope is created.

    +
  • +
  • {...} (an object hash): A new "isolate" scope is created for the directive's template. +The 'isolate' scope differs from normal scope in that it does not prototypically +inherit from its parent scope. This is useful when creating reusable components, which should not +accidentally read or modify data in the parent scope. Note that an isolate scope +directive without a template or templateUrl will not apply the isolate scope +to its children elements.

    +
  • +
+

The 'isolate' scope object hash defines a set of local scope properties derived from attributes on the +directive's element. These local properties are useful for aliasing values for templates. The keys in +the object hash map to the name of the property on the isolate scope; the values define how the property +is bound to the parent scope, via matching attributes on the directive's element:

+
    +
  • @ or @attr - bind a local scope property to the value of DOM attribute. The result is +always a string since DOM attributes are strings. If no attr name is specified then the +attribute name is assumed to be the same as the local name. Given <my-component +my-attr="hello {{name}}"> and the isolate scope definition scope: { localName:'@myAttr' }, +the directive's scope property localName will reflect the interpolated value of hello +{{name}}. As the name attribute changes so will the localName property on the directive's +scope. The name is read from the parent scope (not the directive's scope).

    +
  • +
  • = or =attr - set up a bidirectional binding between a local scope property and an expression +passed via the attribute attr. The expression is evaluated in the context of the parent scope. +If no attr name is specified then the attribute name is assumed to be the same as the local +name. Given <my-component my-attr="parentModel"> and the isolate scope definition scope: { +localModel: '=myAttr' }, the property localModel on the directive's scope will reflect the +value of parentModel on the parent scope. Changes to parentModel will be reflected in +localModel and vice versa. Optional attributes should be marked as such with a question mark: +=? or =?attr. If the binding expression is non-assignable, or if the attribute isn't +optional and doesn't exist, an exception ($compile:nonassign) +will be thrown upon discovering changes to the local value, since it will be impossible to sync +them back to the parent scope. By default, the $watch +method is used for tracking changes, and the equality check is based on object identity. +However, if an object literal or an array literal is passed as the binding expression, the +equality check is done by value (using the angular.equals function). It's also possible +to watch the evaluated value shallowly with $watchCollection: use =* or =*attr (=*? or =*?attr if the attribute is optional).

    +
  • +
  • < or <attr - set up a one-way (one-directional) binding between a local scope property and an +expression passed via the attribute attr. The expression is evaluated in the context of the +parent scope. If no attr name is specified then the attribute name is assumed to be the same as the +local name. You can also make the binding optional by adding ?: <? or <?attr.

    +

    For example, given <my-component my-attr="parentModel"> and directive definition of +scope: { localModel:'<myAttr' }, then the isolated scope property localModel will reflect the +value of parentModel on the parent scope. Any changes to parentModel will be reflected +in localModel, but changes in localModel will not reflect in parentModel. There are however +two caveats:

    +
      +
    1. one-way binding does not copy the value from the parent to the isolate scope, it simply +sets the same value. That means if your bound value is an object, changes to its properties +in the isolated scope will be reflected in the parent scope (because both reference the same object).
    2. +
    3. one-way binding watches changes to the identity of the parent value. That means the +$watch on the parent value only fires if the reference +to the value has changed. In most cases, this should not be of concern, but can be important +to know if you one-way bind to an object, and then replace that object in the isolated scope. +If you now change a property of the object in your parent scope, the change will not be +propagated to the isolated scope, because the identity of the object on the parent scope +has not changed. Instead you must assign a new object.
    4. +
    +

    One-way binding is useful if you do not plan to propagate changes to your isolated scope bindings +back to the parent. However, it does not make this completely impossible.

    +
  • +
  • & or &attr - provides a way to execute an expression in the context of the parent scope. If +no attr name is specified then the attribute name is assumed to be the same as the local name. +Given <my-component my-attr="count = count + value"> and the isolate scope definition scope: { +localFn:'&myAttr' }, the isolate scope property localFn will point to a function wrapper for +the count = count + value expression. Often it's desirable to pass data from the isolated scope +via an expression to the parent scope. This can be done by passing a map of local variable names +and values into the expression wrapper fn. For example, if the expression is increment(amount) +then we can specify the amount value by calling the localFn as localFn({amount: 22}).

    +
  • +
+

In general it's possible to apply more than one directive to one element, but there might be limitations +depending on the type of scope required by the directives. The following points will help explain these limitations. +For simplicity only two directives are taken into account, but it is also applicable for several directives:

+
    +
  • no scope + no scope => Two directives which don't require their own scope will use their parent's scope
  • +
  • child scope + no scope => Both directives will share one single child scope
  • +
  • child scope + child scope => Both directives will share one single child scope
  • +
  • isolated scope + no scope => The isolated directive will use it's own created isolated scope. The other directive will use +its parent's scope
  • +
  • isolated scope + child scope => Won't work! Only one scope can be related to one element. Therefore these directives cannot +be applied to the same element.
  • +
  • isolated scope + isolated scope => Won't work! Only one scope can be related to one element. Therefore these directives +cannot be applied to the same element.
  • +
+

bindToController

+

This property is used to bind scope properties directly to the controller. It can be either +true or an object hash with the same format as the scope property.

+

When an isolate scope is used for a directive (see above), bindToController: true will +allow a component to have its properties bound to the controller, rather than to scope.

+

After the controller is instantiated, the initial values of the isolate scope bindings will be bound to the controller +properties. You can access these bindings once they have been initialized by providing a controller method called +$onInit, which is called after all the controllers on an element have been constructed and had their bindings +initialized.

+
+Deprecation warning: if $compileProcvider.preAssignBindingsEnabled(true) was called, bindings for non-ES6 class +controllers are bound to this before the controller constructor is called but this use is now deprecated. Please +place initialization code that relies upon bindings inside a $onInit method on the controller, instead. +
+ +

It is also possible to set bindToController to an object hash with the same format as the scope property. +This will set up the scope bindings to the controller directly. Note that scope can still be used +to define which kind of scope is created. By default, no scope is created. Use scope: {} to create an isolate +scope (useful for component directives).

+

If both bindToController and scope are defined and have object hashes, bindToController overrides scope.

+

controller

+

Controller constructor function. The controller is instantiated before the +pre-linking phase and can be accessed by other directives (see +require attribute). This allows the directives to communicate with each other and augment +each other's behavior. The controller is injectable (and supports bracket notation) with the following locals:

+
    +
  • $scope - Current scope associated with the element
  • +
  • $element - Current element
  • +
  • $attrs - Current attributes object for the element
  • +
  • $transclude - A transclude linking function pre-bound to the correct transclusion scope: +function([scope], cloneLinkingFn, futureParentElement, slotName):
      +
    • scope: (optional) override the scope.
    • +
    • cloneLinkingFn: (optional) argument to create clones of the original transcluded content.
    • +
    • futureParentElement (optional):
        +
      • defines the parent to which the cloneLinkingFn will add the cloned elements.
      • +
      • default: $element.parent() resp. $element for transclude:'element' resp. transclude:true.
      • +
      • only needed for transcludes that are allowed to contain non html elements (e.g. SVG elements) +and when the cloneLinkingFn is passed, +as those elements need to created and cloned in a special way when they are defined outside their +usual containers (e.g. like <svg>).
      • +
      • See also the directive.templateNamespace property.
      • +
      +
    • +
    • slotName: (optional) the name of the slot to transclude. If falsy (e.g. null, undefined or '') +then the default transclusion is provided. +The $transclude function also has a method on it, $transclude.isSlotFilled(slotName), which returns +true if the specified slot contains content (i.e. one or more DOM nodes).
    • +
    +
  • +
+

require

+

Require another directive and inject its controller as the fourth argument to the linking function. The +require property can be a string, an array or an object:

+
    +
  • a string containing the name of the directive to pass to the linking function
  • +
  • an array containing the names of directives to pass to the linking function. The argument passed to the +linking function will be an array of controllers in the same order as the names in the require property
  • +
  • an object whose property values are the names of the directives to pass to the linking function. The argument +passed to the linking function will also be an object with matching keys, whose values will hold the corresponding +controllers.
  • +
+

If the require property is an object and bindToController is truthy, then the required controllers are +bound to the controller using the keys of the require property. This binding occurs after all the controllers +have been constructed but before $onInit is called. +If the name of the required controller is the same as the local name (the key), the name can be +omitted. For example, {parentDir: '^^'} is equivalent to {parentDir: '^^parentDir'}. +See the $compileProvider helper for an example of how this can be used. +If no such required directive(s) can be found, or if the directive does not have a controller, then an error is +raised (unless no link function is specified and the required controllers are not being bound to the directive +controller, in which case error checking is skipped). The name can be prefixed with:

+
    +
  • (no prefix) - Locate the required controller on the current element. Throw an error if not found.
  • +
  • ? - Attempt to locate the required controller or pass null to the link fn if not found.
  • +
  • ^ - Locate the required controller by searching the element and its parents. Throw an error if not found.
  • +
  • ^^ - Locate the required controller by searching the element's parents. Throw an error if not found.
  • +
  • ?^ - Attempt to locate the required controller by searching the element and its parents or pass +null to the link fn if not found.
  • +
  • ?^^ - Attempt to locate the required controller by searching the element's parents, or pass +null to the link fn if not found.
  • +
+

controllerAs

+

Identifier name for a reference to the controller in the directive's scope. +This allows the controller to be referenced from the directive template. This is especially +useful when a directive is used as component, i.e. with an isolate scope. It's also possible +to use it in a directive without an isolate / new scope, but you need to be aware that the +controllerAs reference might overwrite a property that already exists on the parent scope.

+

restrict

+

String of subset of EACM which restricts the directive to a specific directive +declaration style. If omitted, the defaults (elements and attributes) are used.

+
    +
  • E - Element name (default): <my-directive></my-directive>
  • +
  • A - Attribute (default): <div my-directive="exp"></div>
  • +
  • C - Class: <div class="my-directive: exp;"></div>
  • +
  • M - Comment: <!-- directive: my-directive exp -->
  • +
+

templateNamespace

+

String representing the document type used by the markup in the template. +AngularJS needs this information as those elements need to be created and cloned +in a special way when they are defined outside their usual containers like <svg> and <math>.

+
    +
  • html - All root nodes in the template are HTML. Root nodes may also be +top-level elements such as <svg> or <math>.
  • +
  • svg - The root nodes in the template are SVG elements (excluding <math>).
  • +
  • math - The root nodes in the template are MathML elements (excluding <svg>).
  • +
+

If no templateNamespace is specified, then the namespace is considered to be html.

+

template

+

HTML markup that may:

+
    +
  • Replace the contents of the directive's element (default).
  • +
  • Replace the directive's element itself (if replace is true - DEPRECATED).
  • +
  • Wrap the contents of the directive's element (if transclude is true).
  • +
+

Value may be:

+
    +
  • A string. For example <div red-on-hover>{{delete_str}}</div>.
  • +
  • A function which takes two arguments tElement and tAttrs (described in the compile +function api below) and returns a string value.
  • +
+

templateUrl

+

This is similar to template but the template is loaded from the specified URL, asynchronously.

+

Because template loading is asynchronous the compiler will suspend compilation of directives on that element +for later when the template has been resolved. In the meantime it will continue to compile and link +sibling and parent elements as though this element had not contained any directives.

+

The compiler does not suspend the entire compilation to wait for templates to be loaded because this +would result in the whole app "stalling" until all templates are loaded asynchronously - even in the +case when only one deeply nested directive has templateUrl.

+

Template loading is asynchronous even if the template has been preloaded into the $templateCache

+

You can specify templateUrl as a string representing the URL or as a function which takes two +arguments tElement and tAttrs (described in the compile function api below) and returns +a string value representing the url. In either case, the template URL is passed through $sce.getTrustedResourceUrl.

+

replace ([DEPRECATED!], will be removed in next major release - i.e. v2.0)

+

specify what the template should replace. Defaults to false.

+
    +
  • true - the template will replace the directive's element.
  • +
  • false - the template will replace the contents of the directive's element.
  • +
+

The replacement process migrates all of the attributes / classes from the old element to the new +one. See the Directives Guide for an example.

+

There are very few scenarios where element replacement is required for the application function, +the main one being reusable custom components that are used within SVG contexts +(because SVG doesn't work with custom elements in the DOM tree).

+

transclude

+

Extract the contents of the element where the directive appears and make it available to the directive. +The contents are compiled and provided to the directive as a transclusion function. See the +Transclusion section below.

+

compile

+
function compile(tElement, tAttrs, transclude) { ... }
+
+

The compile function deals with transforming the template DOM. Since most directives do not do +template transformation, it is not used often. The compile function takes the following arguments:

+
    +
  • tElement - template element - The element where the directive has been declared. It is +safe to do template transformation on the element and child elements only.

    +
  • +
  • tAttrs - template attributes - Normalized list of attributes declared on this element shared +between all directive compile functions.

    +
  • +
  • transclude - [DEPRECATED!] A transclude linking function: function(scope, cloneLinkingFn)

    +
  • +
+
+Note: The template instance and the link instance may be different objects if the template has +been cloned. For this reason it is not safe to do anything other than DOM transformations that +apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration +should be done in a linking function rather than in a compile function. +
+ +
+Note: The compile function cannot handle directives that recursively use themselves in their +own templates or compile functions. Compiling these directives results in an infinite loop and +stack overflow errors. + +This can be avoided by manually using $compile in the postLink function to imperatively compile +a directive's template instead of relying on automatic template compilation via template or +templateUrl declaration or manual compilation inside the compile function. +
+ +
+Note: The transclude function that is passed to the compile function is deprecated, as it + e.g. does not know about the right outer scope. Please use the transclude function that is passed + to the link function instead. +
+ +

A compile function can have a return value which can be either a function or an object.

+
    +
  • returning a (post-link) function - is equivalent to registering the linking function via the +link property of the config object when the compile function is empty.

    +
  • +
  • returning an object with function(s) registered via pre and post properties - allows you to +control when a linking function should be called during the linking phase. See info about +pre-linking and post-linking functions below.

    +
  • +
+ +

This property is used only if the compile property is not defined.

+
function link(scope, iElement, iAttrs, controller, transcludeFn) { ... }
+
+

The link function is responsible for registering DOM listeners as well as updating the DOM. It is +executed after the template has been cloned. This is where most of the directive logic will be +put.

+
    +
  • scope - Scope - The scope to be used by the +directive for registering watches.

    +
  • +
  • iElement - instance element - The element where the directive is to be used. It is safe to +manipulate the children of the element only in postLink function since the children have +already been linked.

    +
  • +
  • iAttrs - instance attributes - Normalized list of attributes declared on this element shared +between all directive linking functions.

    +
  • +
  • controller - the directive's required controller instance(s) - Instances are shared +among all directives, which allows the directives to use the controllers as a communication +channel. The exact value depends on the directive's require property:

    +
      +
    • no controller(s) required: the directive's own controller, or undefined if it doesn't have one
    • +
    • string: the controller instance
    • +
    • array: array of controller instances
    • +
    +

    If a required controller cannot be found, and it is optional, the instance is null, +otherwise the Missing Required Controller error is thrown.

    +

    Note that you can also require the directive's own controller - it will be made available like +any other controller.

    +
  • +
  • transcludeFn - A transclude linking function pre-bound to the correct transclusion scope. +This is the same as the $transclude parameter of directive controllers, +see the controller section for details. +function([scope], cloneLinkingFn, futureParentElement).

    +
  • +
+

Pre-linking function

+

Executed before the child elements are linked. Not safe to do DOM transformation since the +compiler linking function will fail to locate the correct elements for linking.

+

Post-linking function

+

Executed after the child elements are linked.

+

Note that child elements that contain templateUrl directives will not have been compiled +and linked since they are waiting for their template to load asynchronously and their own +compilation and linking has been suspended until that occurs.

+

It is safe to do DOM transformation in the post-linking function on elements that are not waiting +for their async templates to be resolved.

+

Transclusion

+

Transclusion is the process of extracting a collection of DOM elements from one part of the DOM and +copying them to another part of the DOM, while maintaining their connection to the original AngularJS +scope from where they were taken.

+

Transclusion is used (often with ngTransclude) to insert the +original contents of a directive's element into a specified place in the template of the directive. +The benefit of transclusion, over simply moving the DOM elements manually, is that the transcluded +content has access to the properties on the scope from which it was taken, even if the directive +has isolated scope. +See the Directives Guide.

+

This makes it possible for the widget to have private state for its template, while the transcluded +content has access to its originating scope.

+
+Note: When testing an element transclude directive you must not place the directive at the root of the +DOM fragment that is being compiled. See Testing Transclusion Directives. +
+ +

There are three kinds of transclusion depending upon whether you want to transclude just the contents of the +directive's element, the entire element or multiple parts of the element contents:

+
    +
  • true - transclude the content (i.e. the child nodes) of the directive's element.
  • +
  • 'element' - transclude the whole of the directive's element including any directives on this +element that defined at a lower priority than this directive. When used, the template +property is ignored.
  • +
  • {...} (an object hash): - map elements of the content onto transclusion "slots" in the template.
  • +
+

Mult-slot transclusion is declared by providing an object for the transclude property.

+

This object is a map where the keys are the name of the slot to fill and the value is an element selector +used to match the HTML to the slot. The element selector should be in normalized form (e.g. myElement) +and will match the standard element variants (e.g. my-element, my:element, data-my-element, etc).

+

For further information check out the guide on Matching Directives

+

If the element selector is prefixed with a ? then that slot is optional.

+

For example, the transclude object { slotA: '?myCustomElement' } maps <my-custom-element> elements to +the slotA slot, which can be accessed via the $transclude function or via the ngTransclude directive.

+

Slots that are not marked as optional (?) will trigger a compile time error if there are no matching elements +in the transclude content. If you wish to know if an optional slot was filled with content, then you can call +$transclude.isSlotFilled(slotName) on the transclude function passed to the directive's link function and +injectable into the directive's controller.

+

Transclusion Functions

+

When a directive requests transclusion, the compiler extracts its contents and provides a transclusion +function to the directive's link function and controller. This transclusion function is a special +linking function that will return the compiled contents linked to a new transclusion scope.

+
+If you are just using ngTransclude then you don't need to worry about this function, since +ngTransclude will deal with it for us. +
+ +

If you want to manually control the insertion and removal of the transcluded content in your directive +then you must use this transclude function. When you call a transclude function it returns a a jqLite/JQuery +object that contains the compiled DOM, which is linked to the correct transclusion scope.

+

When you call a transclusion function you can pass in a clone attach function. This function accepts +two parameters, function(clone, scope) { ... }, where the clone is a fresh compiled copy of your transcluded +content and the scope is the newly created transclusion scope, which the clone will be linked to.

+
+Best Practice: Always provide a cloneFn (clone attach function) when you call a transclude function +since you then get a fresh clone of the original DOM and also have access to the new transclusion scope. +
+ +

It is normal practice to attach your transcluded content (clone) to the DOM inside your clone +attach function:

+
var transcludedContent, transclusionScope;
+
+$transclude(function(clone, scope) {
+  element.append(clone);
+  transcludedContent = clone;
+  transclusionScope = scope;
+});
+
+

Later, if you want to remove the transcluded content from your DOM then you should also destroy the +associated transclusion scope:

+
transcludedContent.remove();
+transclusionScope.$destroy();
+
+
+Best Practice: if you intend to add and remove transcluded content manually in your directive +(by calling the transclude function to get the DOM and calling element.remove() to remove it), +then you are also responsible for calling $destroy on the transclusion scope. +
+ +

The built-in DOM manipulation directives, such as ngIf, ngSwitch and ngRepeat +automatically destroy their transcluded clones as necessary so you do not need to worry about this if +you are simply using ngTransclude to inject the transclusion into your directive.

+

Transclusion Scopes

+

When you call a transclude function it returns a DOM fragment that is pre-bound to a transclusion +scope. This scope is special, in that it is a child of the directive's scope (and so gets destroyed +when the directive's scope gets destroyed) but it inherits the properties of the scope from which it +was taken.

+

For example consider a directive that uses transclusion and isolated scope. The DOM hierarchy might look +like this:

+
<div ng-app>
+  <div isolate>
+    <div transclusion>
+    </div>
+  </div>
+</div>
+
+

The $parent scope hierarchy will look like this:

+
- $rootScope
+  - isolate
+    - transclusion
+
+

but the scopes will inherit prototypically from different scopes to their $parent.

+
- $rootScope
+  - transclusion
+- isolate
+
+

Attributes

+

The Attributes object - passed as a parameter in the +link() or compile() functions. It has a variety of uses.

+
    +
  • Accessing normalized attribute names: Directives like 'ngBind' can be expressed in many ways: +'ng:bind', data-ng-bind, or 'x-ng-bind'. The attributes object allows for normalized access +to the attributes.

    +
  • +
  • Directive inter-communication: All directives share the same instance of the attributes +object which allows the directives to use the attributes object as inter directive +communication.

    +
  • +
  • Supports interpolation: Interpolation attributes are assigned to the attribute object +allowing other directives to read the interpolated value.

    +
  • +
  • Observing interpolated attributes: Use $observe to observe the value changes of attributes +that contain interpolation (e.g. src="{{bar}}"). Not only is this very efficient but it's also +the only way to easily get the actual value because during the linking phase the interpolation +hasn't been evaluated yet and so the value is at this time set to undefined.

    +
  • +
+
function linkingFn(scope, elm, attrs, ctrl) {
+  // get the attribute value
+  console.log(attrs.ngModel);
+
+  // change the attribute
+  attrs.$set('ngModel', 'new value');
+
+  // observe changes to interpolated attribute
+  attrs.$observe('ngModel', function(value) {
+    console.log('ngModel has changed value to ' + value);
+  });
+}
+
+

Example

+
+Note: Typically directives are registered with module.directive. The example below is +to illustrate how $compile works. +
+ +

+ +

+ + +
+ + +
+
<script>
  angular.module('compileExample', [], function($compileProvider) {
    // configure new 'compile' directive by passing a directive
    // factory function. The factory function injects the '$compile'
    $compileProvider.directive('compile', function($compile) {
      // directive factory creates a link function
      return function(scope, element, attrs) {
        scope.$watch(
          function(scope) {
             // watch the 'compile' expression for changes
            return scope.$eval(attrs.compile);
          },
          function(value) {
            // when the 'compile' expression changes
            // assign it into the current DOM
            element.html(value);

            // compile the new DOM and link it to the current
            // scope.
            // NOTE: we only compile .childNodes so that
            // we don't get into infinite loop compiling ourselves
            $compile(element.contents())(scope);
          }
        );
      };
    });
  })
  .controller('GreeterController', ['$scope', function($scope) {
    $scope.name = 'Angular';
    $scope.html = 'Hello {{name}}';
  }]);
</script>
<div ng-controller="GreeterController">
  <input ng-model="name"> <br/>
  <textarea ng-model="html"></textarea> <br/>
  <div compile="html"></div>
</div>
+
+ +
+
it('should auto compile', function() {
  var textarea = $('textarea');
  var output = $('div[compile]');
  // The initial state reads 'Hello Angular'.
  expect(output.getText()).toBe('Hello Angular');
  textarea.clear();
  textarea.sendKeys('{{name}}!');
  expect(output.getText()).toBe('Angular!');
});
+
+ + + +
+
+ + +

+ +
+ + + +

Known Issues

+
+

Double Compilation

+

Double compilation occurs when an already compiled part of the DOM gets + compiled again. This is an undesired effect and can lead to misbehaving directives, performance issues, + and memory leaks. Refer to the Compiler Guide section on double compilation for an in-depth explanation and ways to avoid it.

+ +
+ + +
+ + + + +

Usage

+ +

$compile(element, transclude, maxPriority);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ element + + + + stringDOMElement + +

Element or HTML string to compile into a template function.

+ + +
+ transclude + + + + function(angular.Scope, cloneAttachFn=) + +

function available to directives - DEPRECATED.

+
+Note: Passing a transclude function to the $compile function is deprecated, as it + e.g. will not use the right outer scope. Please pass the transclude function as a + parentBoundTranscludeFn to the link function instead. +
+ +
+ maxPriority + + + + number + +

only apply directives lower than given priority (Only effects the + root element(s), not their children)

+ + +
+ +
+ +

Returns

+ + + + + +
function(scope, cloneAttachFn=, options=)

a link function which is used to bind template +(a DOM element/tree) to a scope. Where:

+
    +
  • scope - A Scope to bind to.
  • +
  • cloneAttachFn - If cloneAttachFn is provided, then the link function will clone the +template and call the cloneAttachFn function allowing the caller to attach the +cloned elements to the DOM document at the appropriate place. The cloneAttachFn is +called as:
    cloneAttachFn(clonedElement, scope) where:

    +
      +
    • clonedElement - is a clone of the original element passed into the compiler.
    • +
    • scope - is the current scope with which the linking function is working with.
    • +
    +
  • +
  • options - An optional object hash with linking options. If options is provided, then the following +keys may be used to control linking behavior:

    +
      +
    • parentBoundTranscludeFn - the transclude function made available to +directives; if given, it will be passed through to the link functions of +directives found in element during compilation.
    • +
    • transcludeControllers - an object hash with keys that map controller names +to a hash with the key instance, which maps to the controller instance; +if given, it will make the controllers available to directives on the compileNode:
      {
      +  parent: {
      +    instance: parentControllerInstance
      +  }
      +}
      +
      +
    • +
    • futureParentElement - defines the parent to which the cloneAttachFn will add +the cloned elements; only needed for transcludes that are allowed to contain non html +elements (e.g. SVG elements). See also the directive.controller property.
    • +
    +
  • +
+

Calling the linking function returns the element of the template. It is either the original +element passed in, or the clone of the element if the cloneAttachFn is provided.

+

After linking the view is not updated until after a call to $digest which typically is done by +Angular automatically.

+

If you need access to the bound view, there are two ways to do it:

+
    +
  • If you are not asking the linking function to clone the template, create the DOM element(s) +before you send them to the compiler and keep this reference around.

    +
    var element = $compile('<p>{{total}}</p>')(scope);
    +
    +
  • +
  • if on the other hand, you need the element to be cloned, the view reference from the original +example would not point to the clone, but rather to the original template that was cloned. In +this case, you can access the clone via the cloneAttachFn:

    +
    var templateElement = angular.element('<p>{{total}}</p>'),
    +    scope = ....;
    +
    +var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) {
    +  //attach the clone to DOM document at the right place
    +});
    +
    +//now we have reference to the cloned DOM via `clonedElement`
    +
    +
  • +
+

For information on how the compiler works, see the +Angular HTML Compiler section of the Developer Guide.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$controller.html b/1.6.6/docs/partials/api/ng/service/$controller.html new file mode 100644 index 000000000..cacedfe3b --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$controller.html @@ -0,0 +1,136 @@ + Improve this Doc + + + + +  View Source + + + +
+

$controller

+
    + +
  1. + - $controllerProvider +
  2. + +
  3. + - service in module ng +
  4. +
+
+ + + + + +
+

$controller service is responsible for instantiating controllers.

+

It's just a simple call to $injector, but extracted into +a service, so that one can override this service with BC version.

+ +
+ + + + +
+ +

Dependencies

+ + + + + +

Usage

+ +

$controller(constructor, locals);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ constructor + + + + function()string + +

If called with a function then it's considered to be the + controller constructor function. Otherwise it's considered to be a string which is used + to retrieve the controller constructor using the following steps:

+
    +
  • check if a controller with given name is registered via $controllerProvider
  • +
  • check if evaluating the string on the current scope returns a constructor
  • +
  • if $controllerProvider#allowGlobals, check window[constructor] on the global +window object (deprecated, not recommended)

    +

    The string can use the controller as property syntax, where the controller instance is published +as the specified property on the scope; the scope must be injected into locals param for this +to work correctly.

    +
  • +
+ + +
+ locals + + + + Object + +

Injection locals for Controller.

+ + +
+ +
+ +

Returns

+ + + + + +
Object

Instance of given controller.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$document.html b/1.6.6/docs/partials/api/ng/service/$document.html new file mode 100644 index 000000000..8e2a2487e --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$document.html @@ -0,0 +1,88 @@ + Improve this Doc + + + + +  View Source + + + +
+

$document

+
    + + + +
  1. + - service in module ng +
  2. +
+
+ + + + + +
+

A jQuery or jqLite wrapper for the browser's window.document object.

+ +
+ + + + +
+ +

Dependencies

+ + + + + + + + + + + + + + +

Examples

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <p>$document title: <b ng-bind="title"></b></p>
  <p>window.document title: <b ng-bind="windowTitle"></b></p>
</div>
+
+ +
+
angular.module('documentExample', [])
.controller('ExampleController', ['$scope', '$document', function($scope, $document) {
  $scope.title = $document[0].title;
  $scope.windowTitle = angular.element(window.document)[0].title;
}]);
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$exceptionHandler.html b/1.6.6/docs/partials/api/ng/service/$exceptionHandler.html new file mode 100644 index 000000000..be9448d47 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$exceptionHandler.html @@ -0,0 +1,137 @@ + Improve this Doc + + + + +  View Source + + + +
+

$exceptionHandler

+
    + + + +
  1. + - service in module ng +
  2. +
+
+ + + + + +
+

Any uncaught exception in angular expressions is delegated to this service. +The default implementation simply delegates to $log.error which logs it into +the browser console.

+

In unit tests, if angular-mocks.js is loaded, this service is overridden by +mock $exceptionHandler which aids in testing.

+

Example:

+

The example below will overwrite the default $exceptionHandler in order to (a) log uncaught +errors to the backend for later inspection by the developers and (b) to use $log.warn() instead +of $log.error().

+
angular.
+  module('exceptionOverwrite', []).
+  factory('$exceptionHandler', ['$log', 'logErrorsToBackend', function($log, logErrorsToBackend) {
+    return function myExceptionHandler(exception, cause) {
+      logErrorsToBackend(exception, cause);
+      $log.warn(exception, cause);
+    };
+  }]);
+
+


+Note, that code executed in event-listeners (even those registered using jqLite's on/bind +methods) does not delegate exceptions to the $exceptionHandler +(unless executed during a digest).

+

If you wish, you can manually delegate exceptions, e.g. +try { ... } catch(e) { $exceptionHandler(e); }

+ +
+ + + + +
+ +

Dependencies

+ + + + + +

Usage

+ +

$exceptionHandler(exception, [cause]);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ exception + + + + Error + +

Exception associated with the error.

+ + +
+ cause + +
(optional)
+
+ string + +

Optional information about the context in which + the error was thrown.

+ + +
+ +
+ + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$filter.html b/1.6.6/docs/partials/api/ng/service/$filter.html new file mode 100644 index 000000000..8c0a13277 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$filter.html @@ -0,0 +1,140 @@ + Improve this Doc + + + + +  View Source + + + +
+

$filter

+
    + +
  1. + - $filterProvider +
  2. + +
  3. + - service in module ng +
  4. +
+
+ + + + + +
+

Filters are used for formatting data displayed to the user.

+

They can be used in view templates, controllers or services.Angular comes +with a collection of built-in filters, but it is easy to +define your own as well.

+

The general syntax in templates is as follows:

+
{{ expression [| filter_name[:parameter_value] ... ] }}
+
+ +
+ + + + +
+ + + + +

Usage

+ +

$filter(name);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ name + + + + String + +

Name of the filter function to retrieve

+ + +
+ +
+ +

Returns

+ + + + + +
Function

the filter function

+
+ + + + + + + + +

Examples

+ +

+ + +
+ + +
+
<div ng-controller="MainCtrl">
 <h3>{{ originalText }}</h3>
 <h3>{{ filteredText }}</h3>
</div>
+
+ +
+
angular.module('filterExample', [])
.controller('MainCtrl', function($scope, $filter) {
  $scope.originalText = 'hello';
  $scope.filteredText = $filter('uppercase')($scope.originalText);
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$http.html b/1.6.6/docs/partials/api/ng/service/$http.html new file mode 100644 index 000000000..c4caca739 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$http.html @@ -0,0 +1,1123 @@ + Improve this Doc + + + + +  View Source + + + +
+

$http

+
    + +
  1. + - $httpProvider +
  2. + +
  3. + - service in module ng +
  4. +
+
+ + + + + +
+

The $http service is a core Angular service that facilitates communication with the remote +HTTP servers via the browser's XMLHttpRequest +object or via JSONP.

+

For unit testing applications that use $http service, see +$httpBackend mock.

+

For a higher level of abstraction, please check out the $resource service.

+

The $http API is based on the deferred/promise APIs exposed by +the $q service. While for simple usage patterns this doesn't matter much, for advanced usage +it is important to familiarize yourself with these APIs and the guarantees they provide.

+

General usage

+

The $http service is a function which takes a single argument — a configuration object — +that is used to generate an HTTP request and returns a promise.

+
// Simple GET request example:
+$http({
+  method: 'GET',
+  url: '/someUrl'
+}).then(function successCallback(response) {
+    // this callback will be called asynchronously
+    // when the response is available
+  }, function errorCallback(response) {
+    // called asynchronously if an error occurs
+    // or server returns response with an error status.
+  });
+
+

The response object has these properties:

+
    +
  • data{string|Object} – The response body transformed with the transform +functions.
  • +
  • status{number} – HTTP status code of the response.
  • +
  • headers{function([headerName])} – Header getter function.
  • +
  • config{Object} – The configuration object that was used to generate the request.
  • +
  • statusText{string} – HTTP status text of the response.
  • +
  • xhrStatus{string} – Status of the XMLHttpRequest (complete, error, timeout or abort).
  • +
+

A response status code between 200 and 299 is considered a success status and will result in +the success callback being called. Any response status code outside of that range is +considered an error status and will result in the error callback being called. +Also, status codes less than -1 are normalized to zero. -1 usually means the request was +aborted, e.g. using a config.timeout. +Note that if the response is a redirect, XMLHttpRequest will transparently follow it, meaning +that the outcome (success or error) will be determined by the final response status code.

+

Shortcut methods

+

Shortcut methods are also available. All shortcut methods require passing in the URL, and +request data must be passed in for POST/PUT requests. An optional config can be passed as the +last argument.

+
$http.get('/someUrl', config).then(successCallback, errorCallback);
+$http.post('/someUrl', data, config).then(successCallback, errorCallback);
+
+

Complete list of shortcut methods:

+ +

Writing Unit Tests that use $http

+

When unit testing (using ngMock), it is necessary to call +$httpBackend.flush() to flush each pending +request using trained responses.

+
$httpBackend.expectGET(...);
+$http.get(...);
+$httpBackend.flush();
+
+

Setting HTTP Headers

+

The $http service will automatically add certain HTTP headers to all requests. These defaults +can be fully configured by accessing the $httpProvider.defaults.headers configuration +object, which currently contains this default configuration:

+
    +
  • $httpProvider.defaults.headers.common (headers that are common for all requests):
      +
    • Accept: application/json, text/plain, */*
    • +
    +
  • +
  • $httpProvider.defaults.headers.post: (header defaults for POST requests)
      +
    • Content-Type: application/json
    • +
    +
  • +
  • $httpProvider.defaults.headers.put (header defaults for PUT requests)
      +
    • Content-Type: application/json
    • +
    +
  • +
+

To add or overwrite these defaults, simply add or remove a property from these configuration +objects. To add headers for an HTTP method other than POST or PUT, simply add a new object +with the lowercased HTTP method name as the key, e.g. +$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }.

+

The defaults can also be set at runtime via the $http.defaults object in the same +fashion. For example:

+
module.run(function($http) {
+  $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w';
+});
+
+

In addition, you can supply a headers property in the config object passed when +calling $http(config), which overrides the defaults without changing them globally.

+

To explicitly remove a header automatically added via $httpProvider.defaults.headers on a per request basis, +Use the headers property, setting the desired header to undefined. For example:

+
var req = {
+ method: 'POST',
+ url: 'http://example.com',
+ headers: {
+   'Content-Type': undefined
+ },
+ data: { test: 'test' }
+}
+
+$http(req).then(function(){...}, function(){...});
+
+

Transforming Requests and Responses

+

Both requests and responses can be transformed using transformation functions: transformRequest +and transformResponse. These properties can be a single function that returns +the transformed value (function(data, headersGetter, status)) or an array of such transformation functions, +which allows you to push or unshift a new transformation function into the transformation chain.

+
+Note: Angular does not make a copy of the data parameter before it is passed into the transformRequest pipeline. +That means changes to the properties of data are not local to the transform function (since Javascript passes objects by reference). +For example, when calling $http.get(url, $scope.myObject), modifications to the object's properties in a transformRequest +function will be reflected on the scope and in any templates where the object is data-bound. +To prevent this, transform functions should have no side-effects. +If you need to modify properties, it is recommended to make a copy of the data, or create new object to return. +
+ +

Default Transformations

+

The $httpProvider provider and $http service expose defaults.transformRequest and +defaults.transformResponse properties. If a request does not provide its own transformations +then these will be applied.

+

You can augment or replace the default transformations by modifying these properties by adding to or +replacing the array.

+

Angular provides the following default transformations:

+

Request transformations ($httpProvider.defaults.transformRequest and $http.defaults.transformRequest) is +an array with one function that does the following:

+
    +
  • If the data property of the request configuration object contains an object, serialize it +into JSON format.
  • +
+

Response transformations ($httpProvider.defaults.transformResponse and $http.defaults.transformResponse) is +an array with one function that does the following:

+
    +
  • If XSRF prefix is detected, strip it (see Security Considerations section below).
  • +
  • If the Content-Type is application/json or the response looks like JSON, + deserialize it using a JSON parser.
  • +
+

Overriding the Default Transformations Per Request

+

If you wish to override the request/response transformations only for a single request then provide +transformRequest and/or transformResponse properties on the configuration object passed +into $http.

+

Note that if you provide these properties on the config object the default transformations will be +overwritten. If you wish to augment the default transformations then you must include them in your +local transformation array.

+

The following code demonstrates adding a new response transformation to be run after the default response +transformations have been run.

+
function appendTransform(defaults, transform) {
+
+  // We can't guarantee that the default transformation is an array
+  defaults = angular.isArray(defaults) ? defaults : [defaults];
+
+  // Append the new transformation to the defaults
+  return defaults.concat(transform);
+}
+
+$http({
+  url: '...',
+  method: 'GET',
+  transformResponse: appendTransform($http.defaults.transformResponse, function(value) {
+    return doTransform(value);
+  })
+});
+
+

Caching

+

$http responses are not cached by default. To enable caching, you must +set the config.cache value or the default cache value to TRUE or to a cache object (created +with $cacheFactory). If defined, the value of config.cache takes +precedence over the default cache value.

+

In order to:

+
    +
  • cache all responses - set the default cache value to TRUE or to a cache object
  • +
  • cache a specific response - set config.cache value to TRUE or to a cache object
  • +
+

If caching is enabled, but neither the default cache nor config.cache are set to a cache object, +then the default $cacheFactory("$http") object is used.

+

The default cache value can be set by updating the +$http.defaults.cache property or the +$httpProvider.defaults.cache property.

+

When caching is enabled, $http stores the response from the server using +the relevant cache object. The next time the same request is made, the response is returned +from the cache without sending a request to the server.

+

Take note that:

+
    +
  • Only GET and JSONP requests are cached.
  • +
  • The cache key is the request URL including search parameters; headers are not considered.
  • +
  • Cached responses are returned asynchronously, in the same way as responses from the server.
  • +
  • If multiple identical requests are made using the same cache, which is not yet populated, +one request will be made to the server and remaining requests will return the same response.
  • +
  • A cache-control header on the response does not affect if or how responses are cached.
  • +
+

Interceptors

+

Before you start creating interceptors, be sure to understand the +$q and deferred/promise APIs.

+

For purposes of global error handling, authentication, or any kind of synchronous or +asynchronous pre-processing of request or postprocessing of responses, it is desirable to be +able to intercept requests before they are handed to the server and +responses before they are handed over to the application code that +initiated these requests. The interceptors leverage the promise APIs to fulfill this need for both synchronous and asynchronous pre-processing.

+

The interceptors are service factories that are registered with the $httpProvider by +adding them to the $httpProvider.interceptors array. The factory is called and +injected with dependencies (if specified) and returns the interceptor.

+

There are two kinds of interceptors (and two kinds of rejection interceptors):

+
    +
  • request: interceptors get called with a http config object. The function is free to +modify the config object or create a new one. The function needs to return the config +object directly, or a promise containing the config or a new config object.
  • +
  • requestError: interceptor gets called when a previous interceptor threw an error or +resolved with a rejection.
  • +
  • response: interceptors get called with http response object. The function is free to +modify the response object or create a new one. The function needs to return the response +object directly, or as a promise containing the response or a new response object.
  • +
  • responseError: interceptor gets called when a previous interceptor threw an error or +resolved with a rejection.
  • +
+
// register the interceptor as a service
+$provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {
+  return {
+    // optional method
+    'request': function(config) {
+      // do something on success
+      return config;
+    },
+
+    // optional method
+   'requestError': function(rejection) {
+      // do something on error
+      if (canRecover(rejection)) {
+        return responseOrNewPromise
+      }
+      return $q.reject(rejection);
+    },
+
+
+
+    // optional method
+    'response': function(response) {
+      // do something on success
+      return response;
+    },
+
+    // optional method
+   'responseError': function(rejection) {
+      // do something on error
+      if (canRecover(rejection)) {
+        return responseOrNewPromise
+      }
+      return $q.reject(rejection);
+    }
+  };
+});
+
+$httpProvider.interceptors.push('myHttpInterceptor');
+
+
+// alternatively, register the interceptor via an anonymous factory
+$httpProvider.interceptors.push(function($q, dependency1, dependency2) {
+  return {
+   'request': function(config) {
+       // same as above
+    },
+
+    'response': function(response) {
+       // same as above
+    }
+  };
+});
+
+

Security Considerations

+

When designing web applications, consider security threats from:

+ +

Both server and the client must cooperate in order to eliminate these threats. Angular comes +pre-configured with strategies that address these issues, but for this to work backend server +cooperation is required.

+

JSON Vulnerability Protection

+

A JSON vulnerability +allows third party website to turn your JSON resource URL into +JSONP request under some conditions. To +counter this your server can prefix all JSON requests with following string ")]}',\n". +Angular will automatically strip the prefix before processing it as JSON.

+

For example if your server needs to return:

+
['one','two']
+
+

which is vulnerable to attack, your server can return:

+
)]}',
+['one','two']
+
+

Angular will strip the prefix, before processing the JSON.

+

Cross Site Request Forgery (XSRF) Protection

+

XSRF is an attack technique by +which the attacker can trick an authenticated user into unknowingly executing actions on your +website. Angular provides a mechanism to counter XSRF. When performing XHR requests, the +$http service reads a token from a cookie (by default, XSRF-TOKEN) and sets it as an HTTP +header (X-XSRF-TOKEN). Since only JavaScript that runs on your domain could read the +cookie, your server can be assured that the XHR came from JavaScript running on your domain. +The header will not be set for cross-domain requests.

+

To take advantage of this, your server needs to set a token in a JavaScript readable session +cookie called XSRF-TOKEN on the first HTTP GET request. On subsequent XHR requests the +server can verify that the cookie matches X-XSRF-TOKEN HTTP header, and therefore be sure +that only JavaScript running on your domain could have sent the request. The token must be +unique for each user and must be verifiable by the server (to prevent the JavaScript from +making up its own tokens). We recommend that the token is a digest of your site's +authentication cookie with a salt +for added security.

+

The name of the headers can be specified using the xsrfHeaderName and xsrfCookieName +properties of either $httpProvider.defaults at config-time, $http.defaults at run-time, +or the per-request config object.

+

In order to prevent collisions in environments where multiple Angular apps share the +same domain or subdomain, we recommend that each application uses unique cookie name.

+ +
+ + + + +
+ +

Dependencies

+ + + + + +

Usage

+ +

$http(config);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ config + + + + object + +

Object describing the request to be made and how it should be + processed. The object has following properties:

+
    +
  • method{string} – HTTP method (e.g. 'GET', 'POST', etc)
  • +
  • url{string|TrustedObject} – Absolute or relative URL of the resource that is being requested; +or an object created by a call to $sce.trustAsResourceUrl(url).
  • +
  • params{Object.<string|Object>} – Map of strings or objects which will be serialized +with the paramSerializer and appended as GET parameters.
  • +
  • data{string|Object} – Data to be sent as the request message data.
  • +
  • headers{Object} – Map of strings or functions which return strings representing +HTTP headers to send to the server. If the return value of a function is null, the +header will not be sent. Functions accept a config object as an argument.
  • +
  • eventHandlers - {Object} - Event listeners to be bound to the XMLHttpRequest object. +To bind events to the XMLHttpRequest upload object, use uploadEventHandlers. +The handler will be called in the context of a $apply block.
  • +
  • uploadEventHandlers - {Object} - Event listeners to be bound to the XMLHttpRequest upload +object. To bind events to the XMLHttpRequest object, use eventHandlers. +The handler will be called in the context of a $apply block.
  • +
  • xsrfHeaderName{string} – Name of HTTP header to populate with the XSRF token.
  • +
  • xsrfCookieName{string} – Name of cookie containing the XSRF token.
  • +
  • transformRequest – +{function(data, headersGetter)|Array.<function(data, headersGetter)>} – +transform function or an array of such functions. The transform function takes the http +request body and headers and returns its transformed (typically serialized) version. +See Overriding the Default Transformations
  • +
  • transformResponse – +{function(data, headersGetter, status)|Array.<function(data, headersGetter, status)>} – +transform function or an array of such functions. The transform function takes the http +response body, headers and status and returns its transformed (typically deserialized) version. +See Overriding the Default Transformations
  • +
  • paramSerializer - {string|function(Object<string,string>):string} - A function used to +prepare the string representation of request parameters (specified as an object). +If specified as string, it is interpreted as function registered with the +$injector, which means you can create your own serializer +by registering it as a service. +The default serializer is the $httpParamSerializer; +alternatively, you can use the $httpParamSerializerJQLike
  • +
  • cache{boolean|Object} – A boolean value or object created with +$cacheFactory to enable or disable caching of the HTTP response. +See $http Caching for more information.
  • +
  • timeout{number|Promise} – timeout in milliseconds, or promise +that should abort the request when resolved.
  • +
  • withCredentials - {boolean} - whether to set the withCredentials flag on the +XHR object. See requests with credentials +for more information.
  • +
  • responseType - {string} - see +XMLHttpRequest.responseType.
  • +
+ + +
+ +
+ +

Returns

+ + + + + +
HttpPromise

Returns a Promise that will be resolved to a response object + when the request succeeds or fails.

+
+ + +

Methods

+
    +
  • +

    get(url, [config]);

    + +

    +

    Shortcut method to perform GET request.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringTrustedObject + +

    Absolute or relative URL of the resource that is being requested; + or an object created by a call to $sce.trustAsResourceUrl(url).

    + + +
    + config + +
    (optional)
    +
    + Object + +

    Optional configuration object

    + + +
    + + + + + + +

    Returns

    + + + + + +
    HttpPromise

    Future object

    +
    +
  • + +
  • +

    delete(url, [config]);

    + +

    +

    Shortcut method to perform DELETE request.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringTrustedObject + +

    Absolute or relative URL of the resource that is being requested; + or an object created by a call to $sce.trustAsResourceUrl(url).

    + + +
    + config + +
    (optional)
    +
    + Object + +

    Optional configuration object

    + + +
    + + + + + + +

    Returns

    + + + + + +
    HttpPromise

    Future object

    +
    +
  • + + + +
  • +

    jsonp(url, [config]);

    + +

    +

    Shortcut method to perform JSONP request.

    +

    Note that, since JSONP requests are sensitive because the response is given full access to the browser, +the url must be declared, via $sce as a trusted resource URL. +You can trust a URL by adding it to the whitelist via +$sceDelegateProvider.resourceUrlWhitelist or +by explicitly trusting the URL via $sce.trustAsResourceUrl(url).

    +

    JSONP requests must specify a callback to be used in the response from the server. This callback +is passed as a query parameter in the request. You must specify the name of this parameter by +setting the jsonpCallbackParam property on the request config object.

    +
    $http.jsonp('some/trusted/url', {jsonpCallbackParam: 'callback'})
    +
    +

    You can also specify a default callback parameter name in $http.defaults.jsonpCallbackParam. +Initially this is set to 'callback'.

    +
    +You can no longer use the JSON_CALLBACK string as a placeholder for specifying where the callback +parameter value should go. +
    + +

    If you would like to customise where and how the callbacks are stored then try overriding +or decorating the $jsonpCallbacks service.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringTrustedObject + +

    Absolute or relative URL of the resource that is being requested; + or an object created by a call to $sce.trustAsResourceUrl(url).

    + + +
    + config + +
    (optional)
    +
    + Object + +

    Optional configuration object

    + + +
    + + + + + + +

    Returns

    + + + + + +
    HttpPromise

    Future object

    +
    +
  • + +
  • +

    post(url, data, [config]);

    + +

    +

    Shortcut method to perform POST request.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + string + +

    Relative or absolute URL specifying the destination of the request

    + + +
    + data + + + + * + +

    Request content

    + + +
    + config + +
    (optional)
    +
    + Object + +

    Optional configuration object

    + + +
    + + + + + + +

    Returns

    + + + + + +
    HttpPromise

    Future object

    +
    +
  • + +
  • +

    put(url, data, [config]);

    + +

    +

    Shortcut method to perform PUT request.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + string + +

    Relative or absolute URL specifying the destination of the request

    + + +
    + data + + + + * + +

    Request content

    + + +
    + config + +
    (optional)
    +
    + Object + +

    Optional configuration object

    + + +
    + + + + + + +

    Returns

    + + + + + +
    HttpPromise

    Future object

    +
    +
  • + +
  • +

    patch(url, data, [config]);

    + +

    +

    Shortcut method to perform PATCH request.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + string + +

    Relative or absolute URL specifying the destination of the request

    + + +
    + data + + + + * + +

    Request content

    + + +
    + config + +
    (optional)
    +
    + Object + +

    Optional configuration object

    + + +
    + + + + + + +

    Returns

    + + + + + +
    HttpPromise

    Future object

    +
    +
  • +
+ + +

Properties

+
    +
  • +

    pendingRequests

    + + + + + +
    Array.<Object>

    Array of config objects for currently pending + requests. This is primarily meant to be used for debugging purposes.

    +
    + +
  • + +
  • +

    defaults

    + + + + + +

    Runtime equivalent of the $httpProvider.defaults property. Allows configuration of +default headers, withCredentials as well as request and response transformations.

    +

    See "Setting HTTP Headers" and "Transforming Requests and Responses" sections above.

    +
    + +
  • +
+ + + + +

Examples

+ +

+ + +
+ + +
+
<div ng-controller="FetchController">
  <select ng-model="method" aria-label="Request method">
    <option>GET</option>
    <option>JSONP</option>
  </select>
  <input type="text" ng-model="url" size="80" aria-label="URL" />
  <button id="fetchbtn" ng-click="fetch()">fetch</button><br>
  <button id="samplegetbtn" ng-click="updateModel('GET', 'http-hello.html')">Sample GET</button>
  <button id="samplejsonpbtn"
    ng-click="updateModel('JSONP',
                  'https://angularjs.org/greet.php?name=Super%20Hero')">
    Sample JSONP
  </button>
  <button id="invalidjsonpbtn"
    ng-click="updateModel('JSONP', 'https://angularjs.org/doesntexist')">
      Invalid JSONP
    </button>
  <pre>http status code: {{status}}</pre>
  <pre>http response data: {{data}}</pre>
</div>
+
+ +
+
angular.module('httpExample', [])
.config(['$sceDelegateProvider', function($sceDelegateProvider) {
  // We must whitelist the JSONP endpoint that we are using to show that we trust it
  $sceDelegateProvider.resourceUrlWhitelist([
    'self',
    'https://angularjs.org/**'
  ]);
}])
.controller('FetchController', ['$scope', '$http', '$templateCache',
  function($scope, $http, $templateCache) {
    $scope.method = 'GET';
    $scope.url = 'http-hello.html';

    $scope.fetch = function() {
      $scope.code = null;
      $scope.response = null;

      $http({method: $scope.method, url: $scope.url, cache: $templateCache}).
        then(function(response) {
          $scope.status = response.status;
          $scope.data = response.data;
        }, function(response) {
          $scope.data = response.data || 'Request failed';
          $scope.status = response.status;
      });
    };

    $scope.updateModel = function(method, url) {
      $scope.method = method;
      $scope.url = url;
    };
  }]);
+
+ +
+
Hello, $http!
+
+ +
+
  var status = element(by.binding('status'));
  var data = element(by.binding('data'));
  var fetchBtn = element(by.id('fetchbtn'));
  var sampleGetBtn = element(by.id('samplegetbtn'));
  var invalidJsonpBtn = element(by.id('invalidjsonpbtn'));

  it('should make an xhr GET request', function() {
    sampleGetBtn.click();
    fetchBtn.click();
    expect(status.getText()).toMatch('200');
    expect(data.getText()).toMatch(/Hello, \$http!/);
  });

// Commented out due to flakes. See https://github.com/angular/angular.js/issues/9185
// it('should make a JSONP request to angularjs.org', function() {
//   var sampleJsonpBtn = element(by.id('samplejsonpbtn'));
//   sampleJsonpBtn.click();
//   fetchBtn.click();
//   expect(status.getText()).toMatch('200');
//   expect(data.getText()).toMatch(/Super Hero!/);
// });

  it('should make JSONP request to invalid URL and invoke the error handler',
      function() {
    invalidJsonpBtn.click();
    fetchBtn.click();
    expect(status.getText()).toMatch('0');
    expect(data.getText()).toMatch('Request failed');
  });
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$httpBackend.html b/1.6.6/docs/partials/api/ng/service/$httpBackend.html new file mode 100644 index 000000000..45fdab27a --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$httpBackend.html @@ -0,0 +1,60 @@ + Improve this Doc + + + + +  View Source + + + +
+

$httpBackend

+
    + + + +
  1. + - service in module ng +
  2. +
+
+ + + + + +
+

HTTP backend used by the service that delegates to +XMLHttpRequest object or JSONP and deals with browser incompatibilities.

+

You should never need to use this service directly, instead use the higher-level abstractions: +$http or $resource.

+

During testing this implementation is swapped with mock +$httpBackend which can be trained with responses.

+ +
+ + + + +
+ +

Dependencies

+ + + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$httpParamSerializer.html b/1.6.6/docs/partials/api/ng/service/$httpParamSerializer.html new file mode 100644 index 000000000..a97f9c218 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$httpParamSerializer.html @@ -0,0 +1,58 @@ + Improve this Doc + + + + +  View Source + + + +
+

$httpParamSerializer

+
    + + + +
  1. + - service in module ng +
  2. +
+
+ + + + + +
+

Default $http params serializer that converts objects to strings +according to the following rules:

+
    +
  • {'foo': 'bar'} results in foo=bar
  • +
  • {'foo': Date.now()} results in foo=2015-04-01T09%3A50%3A49.262Z (toISOString() and encoded representation of a Date object)
  • +
  • {'foo': ['bar', 'baz']} results in foo=bar&foo=baz (repeated key for each array element)
  • +
  • {'foo': {'bar':'baz'}} results in foo=%7B%22bar%22%3A%22baz%22%7D (stringified and encoded representation of an object)
  • +
+

Note that serializer will sort the request parameters alphabetically.

+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$httpParamSerializerJQLike.html b/1.6.6/docs/partials/api/ng/service/$httpParamSerializerJQLike.html new file mode 100644 index 000000000..ffe0338e8 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$httpParamSerializerJQLike.html @@ -0,0 +1,78 @@ + Improve this Doc + + + + +  View Source + + + +
+

$httpParamSerializerJQLike

+
    + + + +
  1. + - service in module ng +
  2. +
+
+ + + + + +
+

Alternative $http params serializer that follows +jQuery's param() method logic. +The serializer will also sort the params alphabetically.

+

To use it for serializing $http request parameters, set it as the paramSerializer property:

+
$http({
+  url: myUrl,
+  method: 'GET',
+  params: myParams,
+  paramSerializer: '$httpParamSerializerJQLike'
+});
+
+

It is also possible to set it as the default paramSerializer in the +$httpProvider.

+

Additionally, you can inject the serializer and use it explicitly, for example to serialize +form data for submission:

+
.controller(function($http, $httpParamSerializerJQLike) {
+  //...
+
+  $http({
+    url: myUrl,
+    method: 'POST',
+    data: $httpParamSerializerJQLike(myData),
+    headers: {
+      'Content-Type': 'application/x-www-form-urlencoded'
+    }
+  });
+
+});
+
+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$interpolate.html b/1.6.6/docs/partials/api/ng/service/$interpolate.html new file mode 100644 index 000000000..488683d64 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$interpolate.html @@ -0,0 +1,306 @@ + Improve this Doc + + + + +  View Source + + + +
+

$interpolate

+
    + +
  1. + - $interpolateProvider +
  2. + +
  3. + - service in module ng +
  4. +
+
+ + + + + +
+

Compiles a string with markup into an interpolation function. This service is used by the +HTML $compile service for data binding. See +$interpolateProvider for configuring the +interpolation markup.

+
var $interpolate = ...; // injected
+var exp = $interpolate('Hello {{name | uppercase}}!');
+expect(exp({name:'Angular'})).toEqual('Hello ANGULAR!');
+
+

$interpolate takes an optional fourth argument, allOrNothing. If allOrNothing is +true, the interpolation function will return undefined unless all embedded expressions +evaluate to a value other than undefined.

+
var $interpolate = ...; // injected
+var context = {greeting: 'Hello', name: undefined };
+
+// default "forgiving" mode
+var exp = $interpolate('{{greeting}} {{name}}!');
+expect(exp(context)).toEqual('Hello !');
+
+// "allOrNothing" mode
+exp = $interpolate('{{greeting}} {{name}}!', false, null, true);
+expect(exp(context)).toBeUndefined();
+context.name = 'Angular';
+expect(exp(context)).toEqual('Hello Angular!');
+
+

allOrNothing is useful for interpolating URLs. ngSrc and ngSrcset use this behavior.

+

Escaped Interpolation

+

$interpolate provides a mechanism for escaping interpolation markers. Start and end markers +can be escaped by preceding each of their characters with a REVERSE SOLIDUS U+005C (backslash). +It will be rendered as a regular start/end marker, and will not be interpreted as an expression +or binding.

+

This enables web-servers to prevent script injection attacks and defacing attacks, to some +degree, while also enabling code examples to work without relying on the +ngNonBindable directive.

+

For security purposes, it is strongly encouraged that web servers escape user-supplied data, +replacing angle brackets (<, >) with &lt; and &gt; respectively, and replacing all +interpolation start/end markers with their escaped counterparts.

+

Escaped interpolation markers are only replaced with the actual interpolation markers in rendered +output when the $interpolate service processes the text. So, for HTML elements interpolated +by $compile, or otherwise interpolated with the mustHaveExpression parameter +set to true, the interpolated text must contain an unescaped interpolation expression. As such, +this is typically useful only when user-data is used in rendering a template from the server, or +when otherwise untrusted data is used by a directive.

+

+ +

+ + +
+ + +
+
<div ng-init="username='A user'">
  <p ng-init="apptitle='Escaping demo'">{{apptitle}}: \{\{ username = "defaced value"; \}\}
    </p>
  <p><strong>{{username}}</strong> attempts to inject code which will deface the
    application, but fails to accomplish their task, because the server has correctly
    escaped the interpolation start/end markers with REVERSE SOLIDUS U+005C (backslash)
    characters.</p>
  <p>Instead, the result of the attempted script injection is visible, and can be removed
    from the database by an administrator.</p>
</div>
+
+ + + +
+
+ + +

+ +
+ + + +

Known Issues

+
+

It is currently not possible for an interpolated expression to contain the interpolation end +symbol. For example, {{ '}}' }} will be incorrectly interpreted as {{ ' }} + ' }}, i.e. +an interpolated expression consisting of a single-quote (') and the ' }} string.

+ +
+
+

All directives and components must use the standard {{ }} interpolation symbols +in their templates. If you change the application interpolation symbols the $compile +service will attempt to denormalize the standard symbols to the custom symbols. +The denormalization process is not clever enough to know not to replace instances of the standard +symbols where they would not normally be treated as interpolation symbols. For example in the following +code snippet the closing braces of the literal object will get incorrectly denormalized:

+
<div data-context='{"context":{"id":3,"type":"page"}}">
+
+

The workaround is to ensure that such instances are separated by whitespace:

+
<div data-context='{"context":{"id":3,"type":"page"} }">
+
+

See https://github.com/angular/angular.js/pull/14610#issuecomment-219401099 for more information.

+ +
+ + +
+ +

Dependencies

+ + + + + +

Usage

+ +

$interpolate(text, [mustHaveExpression], [trustedContext], [allOrNothing]);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ text + + + + string + +

The text with markup to interpolate.

+ + +
+ mustHaveExpression + +
(optional)
+
+ boolean + +

if set to true then the interpolation string must have + embedded expression in order to return an interpolation function. Strings with no + embedded expression will return null for the interpolation function.

+ + +
+ trustedContext + +
(optional)
+
+ string + +

when provided, the returned function passes the interpolated + result through $sce.getTrusted(interpolatedResult, + trustedContext) before returning it. Refer to the $sce service that + provides Strict Contextual Escaping for details.

+ + +
+ allOrNothing + +
(optional)
+
+ boolean + +

if true, then the returned function returns undefined + unless all embedded expressions evaluate to a value other than undefined.

+ + +
+ +
+ +

Returns

+ + + + + +
function(context)

an interpolation function which is used to compute the + interpolated string. The function has these parameters:

+
    +
  • context: evaluation context for all expressions embedded in the interpolated text
  • +
+
+ + +

Methods

+
    +
  • +

    startSymbol();

    + +

    +

    Symbol to denote the start of expression in the interpolated string. Defaults to {{.

    +

    Use $interpolateProvider.startSymbol to change +the symbol.

    +
    + + + + + + + + +

    Returns

    + + + + + +
    string

    start symbol.

    +
    +
  • + +
  • +

    endSymbol();

    + +

    +

    Symbol to denote the end of expression in the interpolated string. Defaults to }}.

    +

    Use $interpolateProvider.endSymbol to change +the symbol.

    +
    + + + + + + + + +

    Returns

    + + + + + +
    string

    end symbol.

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$interval.html b/1.6.6/docs/partials/api/ng/service/$interval.html new file mode 100644 index 000000000..595cf8b0d --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$interval.html @@ -0,0 +1,265 @@ + Improve this Doc + + + + +  View Source + + + +
+

$interval

+
    + + + +
  1. + - service in module ng +
  2. +
+
+ + + + + +
+

Angular's wrapper for window.setInterval. The fn function is executed every delay +milliseconds.

+

The return value of registering an interval function is a promise. This promise will be +notified upon each tick of the interval, and will be resolved after count iterations, or +run indefinitely if count is not defined. The value of the notification will be the +number of iterations that have run. +To cancel an interval, call $interval.cancel(promise).

+

In tests you can use $interval.flush(millis) to +move forward by millis milliseconds and trigger any functions scheduled to run in that +time.

+
+Note: Intervals created by this service must be explicitly destroyed when you are finished +with them. In particular they are not automatically destroyed when a controller's scope or a +directive's element are destroyed. +You should take this into consideration and make sure to always cancel the interval at the +appropriate moment. See the example below for more details on how and when to do this. +
+
+ + + + +
+ + + + +

Usage

+ +

$interval(fn, delay, [count], [invokeApply], [Pass]);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ fn + + + + function() + +

A function that should be called repeatedly. If no additional arguments + are passed (see below), the function is called with the current iteration count.

+ + +
+ delay + + + + number + +

Number of milliseconds between each function call.

+ + +
+ count + +
(optional)
+
+ number + +

Number of times to repeat. If not set, or 0, will repeat + indefinitely.

+ +

(default: 0)

+
+ invokeApply + +
(optional)
+
+ boolean + +

If set to false skips model dirty checking, otherwise + will invoke fn within the $apply block.

+ +

(default: true)

+
+ Pass + +
(optional)
+
+ * + +

additional parameters to the executed function.

+ + +
+ +
+ +

Returns

+ + + + + +
promise

A promise which will be notified on each iteration. It will resolve once all iterations of the interval complete.

+
+ + +

Methods

+
    +
  • +

    cancel([promise]);

    + +

    +

    Cancels a task associated with the promise.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + promise + +
    (optional)
    +
    + Promise + +

    returned by the $interval function.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    boolean

    Returns true if the task was successfully canceled.

    +
    +
  • +
+ + + + + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('intervalExample', [])
    .controller('ExampleController', ['$scope', '$interval',
      function($scope, $interval) {
        $scope.format = 'M/d/yy h:mm:ss a';
        $scope.blood_1 = 100;
        $scope.blood_2 = 120;

        var stop;
        $scope.fight = function() {
          // Don't start a new fight if we are already fighting
          if ( angular.isDefined(stop) ) return;

          stop = $interval(function() {
            if ($scope.blood_1 > 0 && $scope.blood_2 > 0) {
              $scope.blood_1 = $scope.blood_1 - 3;
              $scope.blood_2 = $scope.blood_2 - 4;
            } else {
              $scope.stopFight();
            }
          }, 100);
        };

        $scope.stopFight = function() {
          if (angular.isDefined(stop)) {
            $interval.cancel(stop);
            stop = undefined;
          }
        };

        $scope.resetFight = function() {
          $scope.blood_1 = 100;
          $scope.blood_2 = 120;
        };

        $scope.$on('$destroy', function() {
          // Make sure that the interval is destroyed too
          $scope.stopFight();
        });
      }])
    // Register the 'myCurrentTime' directive factory method.
    // We inject $interval and dateFilter service since the factory method is DI.
    .directive('myCurrentTime', ['$interval', 'dateFilter',
      function($interval, dateFilter) {
        // return the directive link function. (compile function not needed)
        return function(scope, element, attrs) {
          var format,  // date format
              stopTime; // so that we can cancel the time updates

          // used to update the UI
          function updateTime() {
            element.text(dateFilter(new Date(), format));
          }

          // watch the expression, and update the UI on change.
          scope.$watch(attrs.myCurrentTime, function(value) {
            format = value;
            updateTime();
          });

          stopTime = $interval(updateTime, 1000);

          // listen on DOM destroy (removal) event, and cancel the next UI update
          // to prevent updating time after the DOM element was removed.
          element.on('$destroy', function() {
            $interval.cancel(stopTime);
          });
        }
      }]);
</script>

<div>
  <div ng-controller="ExampleController">
    <label>Date format: <input ng-model="format"></label> <hr/>
    Current time is: <span my-current-time="format"></span>
    <hr/>
    Blood 1 : <font color='red'>{{blood_1}}</font>
    Blood 2 : <font color='red'>{{blood_2}}</font>
    <button type="button" data-ng-click="fight()">Fight</button>
    <button type="button" data-ng-click="stopFight()">StopFight</button>
    <button type="button" data-ng-click="resetFight()">resetFight</button>
  </div>
</div>
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$jsonpCallbacks.html b/1.6.6/docs/partials/api/ng/service/$jsonpCallbacks.html new file mode 100644 index 000000000..8fb309735 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$jsonpCallbacks.html @@ -0,0 +1,278 @@ + Improve this Doc + + + + +  View Source + + + +
+

$jsonpCallbacks

+
    + + + +
  1. + - service in module ng +
  2. +
+
+ + + + + +
+

This service handles the lifecycle of callbacks to handle JSONP requests. +Override this service if you wish to customise where the callbacks are stored and +how they vary compared to the requested url.

+ +
+ + + + +
+ +

Dependencies

+ + + + + + + + +

Methods

+
    +
  • +

    createCallback(url);

    + +

    +

    $httpBackend calls this method to create a callback and get hold of the path to the callback +to pass to the server, which will be used to call the callback with its payload in the JSONP response.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + string + +

    the url of the JSONP request

    + + +
    + + + + + + +

    Returns

    + + + + + +
    string

    the callback path to send to the server as part of the JSONP request

    +
    +
  • + +
  • +

    wasCalled(callbackPath);

    + +

    +

    $httpBackend calls this method to find out whether the JSONP response actually called the +callback that was passed in the request.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + callbackPath + + + + string + +

    the path to the callback that was sent in the JSONP request

    + + +
    + + + + + + +

    Returns

    + + + + + +
    boolean

    whether the callback has been called, as a result of the JSONP response

    +
    +
  • + +
  • +

    getResponse(callbackPath);

    + +

    +

    $httpBackend calls this method to get hold of the data that was provided to the callback +in the JSONP response.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + callbackPath + + + + string + +

    the path to the callback that was sent in the JSONP request

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    the data received from the response via the registered callback

    +
    +
  • + +
  • +

    removeCallback(callbackPath);

    + +

    +

    $httpBackend calls this method to remove the callback after the JSONP request has +completed or timed-out.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + callbackPath + + + + string + +

    the path to the callback that was sent in the JSONP request

    + + +
    + + + + + +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$locale.html b/1.6.6/docs/partials/api/ng/service/$locale.html new file mode 100644 index 000000000..ad0ff6f91 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$locale.html @@ -0,0 +1,54 @@ + Improve this Doc + + + + +  View Source + + + +
+

$locale

+
    + + + +
  1. + - service in module ng +
  2. +
+
+ + + + + +
+

$locale service provides localization rules for various Angular components. As of right now the +only public api is:

+
    +
  • id{string} – locale id formatted as languageId-countryId (e.g. en-us)
  • +
+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$location.html b/1.6.6/docs/partials/api/ng/service/$location.html new file mode 100644 index 000000000..41a081a19 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$location.html @@ -0,0 +1,799 @@ + Improve this Doc + + + + +  View Source + + + +
+

$location

+
    + +
  1. + - $locationProvider +
  2. + +
  3. + - service in module ng +
  4. +
+
+ + + + + +
+

The $location service parses the URL in the browser address bar (based on the +window.location) and makes the URL +available to your application. Changes to the URL in the address bar are reflected into +$location service and changes to $location are reflected into the browser address bar.

+

The $location service:

+
    +
  • Exposes the current URL in the browser address bar, so you can
      +
    • Watch and observe the URL.
    • +
    • Change the URL.
    • +
    +
  • +
  • Synchronizes the URL with the browser when the user
      +
    • Changes the address bar.
    • +
    • Clicks the back or forward button (or clicks a History link).
    • +
    • Clicks on a link.
    • +
    +
  • +
  • Represents the URL object as a set of methods (protocol, host, port, path, search, hash).
  • +
+

For more information see Developer Guide: Using $location

+ +
+ + + + +
+ +

Dependencies

+ + + + + + + + +

Methods

+
    +
  • +

    absUrl();

    + +

    +

    This method is getter only.

    +

    Return full URL representation with all segments encoded according to rules specified in +RFC 3986.

    +
    // given URL http://example.com/#/some/path?foo=bar&baz=xoxo
    +var absUrl = $location.absUrl();
    +// => "http://example.com/#/some/path?foo=bar&baz=xoxo"
    +
    +
    + + + + + + + + +

    Returns

    + + + + + +
    string

    full URL

    +
    +
  • + +
  • +

    url([url]);

    + +

    +

    This method is getter / setter.

    +

    Return URL (e.g. /path?a=b#hash) when called without any parameter.

    +

    Change path, search and hash, when called with parameter and return $location.

    +
    // given URL http://example.com/#/some/path?foo=bar&baz=xoxo
    +var url = $location.url();
    +// => "/some/path?foo=bar&baz=xoxo"
    +
    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + +
    (optional)
    +
    + string + +

    New URL without base prefix (e.g. /path?a=b#hash)

    + + +
    + + + + + + +

    Returns

    + + + + + +
    string

    url

    +
    +
  • + +
  • +

    protocol();

    + +

    +

    This method is getter only.

    +

    Return protocol of current URL.

    +
    // given URL http://example.com/#/some/path?foo=bar&baz=xoxo
    +var protocol = $location.protocol();
    +// => "http"
    +
    +
    + + + + + + + + +

    Returns

    + + + + + +
    string

    protocol of current URL

    +
    +
  • + +
  • +

    host();

    + +

    +

    This method is getter only.

    +

    Return host of current URL.

    +

    Note: compared to the non-angular version location.host which returns hostname:port, this returns the hostname portion only.

    +
    // given URL http://example.com/#/some/path?foo=bar&baz=xoxo
    +var host = $location.host();
    +// => "example.com"
    +
    +// given URL http://user:password@example.com:8080/#/some/path?foo=bar&baz=xoxo
    +host = $location.host();
    +// => "example.com"
    +host = location.host;
    +// => "example.com:8080"
    +
    +
    + + + + + + + + +

    Returns

    + + + + + +
    string

    host of current URL.

    +
    +
  • + +
  • +

    port();

    + +

    +

    This method is getter only.

    +

    Return port of current URL.

    +
    // given URL http://example.com/#/some/path?foo=bar&baz=xoxo
    +var port = $location.port();
    +// => 80
    +
    +
    + + + + + + + + +

    Returns

    + + + + + +
    Number

    port

    +
    +
  • + +
  • +

    path([path]);

    + +

    +

    This method is getter / setter.

    +

    Return path of current URL when called without any parameter.

    +

    Change path when called with parameter and return $location.

    +

    Note: Path should always begin with forward slash (/), this method will add the forward slash +if it is missing.

    +
    // given URL http://example.com/#/some/path?foo=bar&baz=xoxo
    +var path = $location.path();
    +// => "/some/path"
    +
    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + path + +
    (optional)
    +
    + stringnumber + +

    New path

    + + +
    + + + + + + +

    Returns

    + + + + + +
    stringobject

    path if called with no parameters, or $location if called with a parameter

    +
    +
  • + + + +
  • +

    hash([hash]);

    + +

    +

    This method is getter / setter.

    +

    Returns the hash fragment when called without any parameters.

    +

    Changes the hash fragment when called with a parameter and returns $location.

    +
    // given URL http://example.com/#/some/path?foo=bar&baz=xoxo#hashValue
    +var hash = $location.hash();
    +// => "hashValue"
    +
    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + hash + +
    (optional)
    +
    + stringnumber + +

    New hash fragment

    + + +
    + + + + + + +

    Returns

    + + + + + +
    string

    hash

    +
    +
  • + +
  • +

    replace();

    + +

    +

    If called, all changes to $location during the current $digest will replace the current history +record, instead of adding a new one.

    +
    + + + + + + + +
  • + +
  • +

    state([state]);

    + +

    +

    This method is getter / setter.

    +

    Return the history state object when called without any parameter.

    +

    Change the history state object when called with one parameter and return $location. +The state object is later passed to pushState or replaceState.

    +

    NOTE: This method is supported only in HTML5 mode and only in browsers supporting +the HTML5 History API (i.e. methods pushState and replaceState). If you need to support +older browsers (like IE9 or Android < 4.0), don't use this method.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + state + +
    (optional)
    +
    + object + +

    State object for pushState or replaceState

    + + +
    + + + + + + +

    Returns

    + + + + + +
    object

    state

    +
    +
  • +
+ +

Events

+
    +
  • +

    $locationChangeStart

    +

    Broadcasted before a URL will change.

    +

    This change can be prevented by calling +preventDefault method of the event. See $rootScope.Scope for more +details about event object. Upon successful change +$locationChangeSuccess is fired.

    +

    The newState and oldState parameters may be defined only in HTML5 mode and when +the browser supports the HTML5 History API.

    +
    + + +
    +

    Type:

    +
    broadcast
    +
    +
    +

    Target:

    +
    root scope
    +
    + +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + angularEvent + + + + Object + +

    Synthetic event object.

    + + +
    + newUrl + + + + string + +

    New URL

    + + +
    + oldUrl + +
    (optional)
    +
    + string + +

    URL that was before it was changed.

    + + +
    + newState + +
    (optional)
    +
    + string + +

    New history state object

    + + +
    + oldState + +
    (optional)
    +
    + string + +

    History state object that was before it was changed.

    + + +
    + +
  • + +
  • +

    $locationChangeSuccess

    +

    Broadcasted after a URL was changed.

    +

    The newState and oldState parameters may be defined only in HTML5 mode and when +the browser supports the HTML5 History API.

    +
    + + +
    +

    Type:

    +
    broadcast
    +
    +
    +

    Target:

    +
    root scope
    +
    + +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + angularEvent + + + + Object + +

    Synthetic event object.

    + + +
    + newUrl + + + + string + +

    New URL

    + + +
    + oldUrl + +
    (optional)
    +
    + string + +

    URL that was before it was changed.

    + + +
    + newState + +
    (optional)
    +
    + string + +

    New history state object

    + + +
    + oldState + +
    (optional)
    +
    + string + +

    History state object that was before it was changed.

    + + +
    + +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$log.html b/1.6.6/docs/partials/api/ng/service/$log.html new file mode 100644 index 000000000..fce41914c --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$log.html @@ -0,0 +1,176 @@ + Improve this Doc + + + + +  View Source + + + +
+

$log

+
    + +
  1. + - $logProvider +
  2. + +
  3. + - service in module ng +
  4. +
+
+ + + + + +
+

Simple service for logging. Default implementation safely writes the message +into the browser's console (if present).

+

The main purpose of this service is to simplify debugging and troubleshooting.

+

To reveal the location of the calls to $log in the JavaScript console, +you can "blackbox" the AngularJS source in your browser:

+

Mozilla description of blackboxing. +Chrome description of blackboxing.

+

Note: Not all browsers support blackboxing.

+

The default is to log debug messages. You can use +ng.$logProvider#debugEnabled to change this.

+ +
+ + + + +
+ +

Dependencies

+ + + + + + + + +

Methods

+
    +
  • +

    log();

    + +

    +

    Write a log message

    +
    + + + + + + + +
  • + +
  • +

    info();

    + +

    +

    Write an information message

    +
    + + + + + + + +
  • + +
  • +

    warn();

    + +

    +

    Write a warning message

    +
    + + + + + + + +
  • + +
  • +

    error();

    + +

    +

    Write an error message

    +
    + + + + + + + +
  • + +
  • +

    debug();

    + +

    +

    Write a debug message

    +
    + + + + + + + +
  • +
+ + + + + + +

Examples

+ +

+ + +
+ + +
+
angular.module('logExample', [])
.controller('LogController', ['$scope', '$log', function($scope, $log) {
  $scope.$log = $log;
  $scope.message = 'Hello World!';
}]);
+
+ +
+
<div ng-controller="LogController">
  <p>Reload this page with open console, enter text and hit the log button...</p>
  <label>Message:
  <input type="text" ng-model="message" /></label>
  <button ng-click="$log.log(message)">log</button>
  <button ng-click="$log.warn(message)">warn</button>
  <button ng-click="$log.info(message)">info</button>
  <button ng-click="$log.error(message)">error</button>
  <button ng-click="$log.debug(message)">debug</button>
</div>
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$parse.html b/1.6.6/docs/partials/api/ng/service/$parse.html new file mode 100644 index 000000000..313b9b7c8 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$parse.html @@ -0,0 +1,127 @@ + Improve this Doc + + + + +  View Source + + + +
+

$parse

+
    + +
  1. + - $parseProvider +
  2. + +
  3. + - service in module ng +
  4. +
+
+ + + + + +
+

Converts Angular expression into a function.

+
var getter = $parse('user.name');
+var setter = getter.assign;
+var context = {user:{name:'angular'}};
+var locals = {user:{name:'local'}};
+
+expect(getter(context)).toEqual('angular');
+setter(context, 'newValue');
+expect(context.user.name).toEqual('newValue');
+expect(getter(context, locals)).toEqual('local');
+
+ +
+ + + + +
+ + + + +

Usage

+ +

$parse(expression);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ expression + + + + string + +

String expression to compile.

+ + +
+ +
+ +

Returns

+ + + + + +
function(context, locals)

a function which represents the compiled expression:

+
    +
  • context{object} – an object against which any expressions embedded in the strings +are evaluated against (typically a scope object).
  • +
  • locals{object=} – local variables context object, useful for overriding values in +context.

    +

    The returned function also has the following properties:

    +
      +
    • literal{boolean} – whether the expression's top-level node is a JavaScript +literal.
    • +
    • constant{boolean} – whether the expression is made entirely of JavaScript +constant literals.
    • +
    • assign{?function(context, value)} – if the expression is assignable, this will be +set to a function to change its value on the given context.
    • +
    +
  • +
+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$q.html b/1.6.6/docs/partials/api/ng/service/$q.html new file mode 100644 index 000000000..c056d58bd --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$q.html @@ -0,0 +1,703 @@ + Improve this Doc + + + + +  View Source + + + +
+

$q

+
    + +
  1. + - $qProvider +
  2. + +
  3. + - service in module ng +
  4. +
+
+ + + + + +
+

A service that helps you run functions asynchronously, and use their return values (or exceptions) +when they are done processing.

+

This is a Promises/A+-compliant implementation of promises/deferred +objects inspired by Kris Kowal's Q.

+

$q can be used in two fashions --- one which is more similar to Kris Kowal's Q or jQuery's Deferred +implementations, and the other which resembles ES6 (ES2015) promises to some degree.

+

$q constructor

+

The streamlined ES6 style promise is essentially just using $q as a constructor which takes a resolver +function as the first argument. This is similar to the native Promise implementation from ES6, +see MDN.

+

While the constructor-style use is supported, not all of the supporting methods from ES6 promises are +available yet.

+

It can be used like so:

+
// for the purpose of this example let's assume that variables `$q` and `okToGreet`
+// are available in the current lexical scope (they could have been injected or passed in).
+
+function asyncGreet(name) {
+  // perform some asynchronous operation, resolve or reject the promise when appropriate.
+  return $q(function(resolve, reject) {
+    setTimeout(function() {
+      if (okToGreet(name)) {
+        resolve('Hello, ' + name + '!');
+      } else {
+        reject('Greeting ' + name + ' is not allowed.');
+      }
+    }, 1000);
+  });
+}
+
+var promise = asyncGreet('Robin Hood');
+promise.then(function(greeting) {
+  alert('Success: ' + greeting);
+}, function(reason) {
+  alert('Failed: ' + reason);
+});
+
+

Note: progress/notify callbacks are not currently supported via the ES6-style interface.

+

Note: unlike ES6 behavior, an exception thrown in the constructor function will NOT implicitly reject the promise.

+

However, the more traditional CommonJS-style usage is still available, and documented below.

+

The CommonJS Promise proposal describes a promise as an +interface for interacting with an object that represents the result of an action that is +performed asynchronously, and may or may not be finished at any given point in time.

+

From the perspective of dealing with error handling, deferred and promise APIs are to +asynchronous programming what try, catch and throw keywords are to synchronous programming.

+
// for the purpose of this example let's assume that variables `$q` and `okToGreet`
+// are available in the current lexical scope (they could have been injected or passed in).
+
+function asyncGreet(name) {
+  var deferred = $q.defer();
+
+  setTimeout(function() {
+    deferred.notify('About to greet ' + name + '.');
+
+    if (okToGreet(name)) {
+      deferred.resolve('Hello, ' + name + '!');
+    } else {
+      deferred.reject('Greeting ' + name + ' is not allowed.');
+    }
+  }, 1000);
+
+  return deferred.promise;
+}
+
+var promise = asyncGreet('Robin Hood');
+promise.then(function(greeting) {
+  alert('Success: ' + greeting);
+}, function(reason) {
+  alert('Failed: ' + reason);
+}, function(update) {
+  alert('Got notification: ' + update);
+});
+
+

At first it might not be obvious why this extra complexity is worth the trouble. The payoff +comes in the way of guarantees that promise and deferred APIs make, see +https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md.

+

Additionally the promise api allows for composition that is very hard to do with the +traditional callback (CPS) approach. +For more on this please see the Q documentation especially the +section on serial or parallel joining of promises.

+

The Deferred API

+

A new instance of deferred is constructed by calling $q.defer().

+

The purpose of the deferred object is to expose the associated Promise instance as well as APIs +that can be used for signaling the successful or unsuccessful completion, as well as the status +of the task.

+

Methods

+
    +
  • resolve(value) – resolves the derived promise with the value. If the value is a rejection +constructed via $q.reject, the promise will be rejected instead.
  • +
  • reject(reason) – rejects the derived promise with the reason. This is equivalent to +resolving it with a rejection constructed via $q.reject.
  • +
  • notify(value) - provides updates on the status of the promise's execution. This may be called +multiple times before the promise is either resolved or rejected.
  • +
+

Properties

+
    +
  • promise – {Promise} – promise object associated with this deferred.
  • +
+

The Promise API

+

A new promise instance is created when a deferred instance is created and can be retrieved by +calling deferred.promise.

+

The purpose of the promise object is to allow for interested parties to get access to the result +of the deferred task when it completes.

+

Methods

+
    +
  • then(successCallback, [errorCallback], [notifyCallback]) – regardless of when the promise was or +will be resolved or rejected, then calls one of the success or error callbacks asynchronously +as soon as the result is available. The callbacks are called with a single argument: the result +or rejection reason. Additionally, the notify callback may be called zero or more times to +provide a progress indication, before the promise is resolved or rejected.

    +

    This method returns a new promise which is resolved or rejected via the return value of the +successCallback, errorCallback (unless that value is a promise, in which case it is resolved +with the value which is resolved in that promise using +promise chaining). +It also notifies via the return value of the notifyCallback method. The promise cannot be +resolved or rejected from the notifyCallback method. The errorCallback and notifyCallback +arguments are optional.

    +
  • +
  • catch(errorCallback) – shorthand for promise.then(null, errorCallback)

    +
  • +
  • finally(callback, notifyCallback) – allows you to observe either the fulfillment or rejection of a promise, +but to do so without modifying the final value. This is useful to release resources or do some +clean-up that needs to be done whether the promise was rejected or resolved. See the full +specification for +more information.

    +
  • +
+

Chaining promises

+

Because calling the then method of a promise returns a new derived promise, it is easily +possible to create a chain of promises:

+
promiseB = promiseA.then(function(result) {
+  return result + 1;
+});
+
+// promiseB will be resolved immediately after promiseA is resolved and its value
+// will be the result of promiseA incremented by 1
+
+

It is possible to create chains of any length and since a promise can be resolved with another +promise (which will defer its resolution further), it is possible to pause/defer resolution of +the promises at any point in the chain. This makes it possible to implement powerful APIs like +$http's response interceptors.

+

Differences between Kris Kowal's Q and $q

+

There are two main differences:

+
    +
  • $q is integrated with the $rootScope.Scope Scope model observation +mechanism in angular, which means faster propagation of resolution or rejection into your +models and avoiding unnecessary browser repaints, which would result in flickering UI.
  • +
  • Q has many more features than $q, but that comes at a cost of bytes. $q is tiny, but contains +all the important functionality needed for common async tasks.
  • +
+

Testing

+
it('should simulate promise', inject(function($q, $rootScope) {
+  var deferred = $q.defer();
+  var promise = deferred.promise;
+  var resolvedValue;
+
+  promise.then(function(value) { resolvedValue = value; });
+  expect(resolvedValue).toBeUndefined();
+
+  // Simulate resolving of promise
+  deferred.resolve(123);
+  // Note that the 'then' function does not get called synchronously.
+  // This is because we want the promise API to always be async, whether or not
+  // it got called synchronously or asynchronously.
+  expect(resolvedValue).toBeUndefined();
+
+  // Propagate promise resolution to 'then' functions using $apply().
+  $rootScope.$apply();
+  expect(resolvedValue).toEqual(123);
+}));
+
+ +
+ + + + +
+ +

Dependencies

+ + + + + +

Usage

+ +

$q(resolver);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ resolver + + + + function(function, function) + +

Function which is responsible for resolving or + rejecting the newly created promise. The first parameter is a function which resolves the + promise, the second parameter is a function which rejects the promise.

+ + +
+ +
+ +

Returns

+ + + + + +
Promise

The newly created promise.

+
+ + +

Methods

+
    +
  • +

    defer();

    + +

    +

    Creates a Deferred object which represents a task which will finish in the future.

    +
    + + + + + + + + +

    Returns

    + + + + + +
    Deferred

    Returns a new instance of deferred.

    +
    +
  • + +
  • +

    reject(reason);

    + +

    +

    Creates a promise that is resolved as rejected with the specified reason. This api should be +used to forward rejection in a chain of promises. If you are dealing with the last promise in +a promise chain, you don't need to worry about it.

    +

    When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of +reject as the throw keyword in JavaScript. This also means that if you "catch" an error via +a promise error callback and you want to forward the error to the promise derived from the +current promise, you have to "rethrow" the error by returning a rejection constructed via +reject.

    +
    promiseB = promiseA.then(function(result) {
    +  // success: do something and resolve promiseB
    +  //          with the old or a new result
    +  return result;
    +}, function(reason) {
    +  // error: handle the error if possible and
    +  //        resolve promiseB with newPromiseOrValue,
    +  //        otherwise forward the rejection to promiseB
    +  if (canHandle(reason)) {
    +   // handle the error and recover
    +   return newPromiseOrValue;
    +  }
    +  return $q.reject(reason);
    +});
    +
    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + reason + + + + * + +

    Constant, message, exception or an object representing the rejection reason.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    Promise

    Returns a promise that was already resolved as rejected with the reason.

    +
    +
  • + +
  • +

    when(value, [successCallback], [errorCallback], [progressCallback]);

    + +

    +

    Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. +This is useful when you are dealing with an object that might or might not be a promise, or if +the promise comes from a source that can't be trusted.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + value + + + + * + +

    Value or a promise

    + + +
    + successCallback + +
    (optional)
    +
    + Function= + + + +
    + errorCallback + +
    (optional)
    +
    + Function= + + + +
    + progressCallback + +
    (optional)
    +
    + Function= + + + +
    + + + + + + +

    Returns

    + + + + + +
    Promise

    Returns a promise of the passed value or promise

    +
    +
  • + +
  • +

    resolve(value, [successCallback], [errorCallback], [progressCallback]);

    + +

    +

    Alias of when to maintain naming consistency with ES6.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + value + + + + * + +

    Value or a promise

    + + +
    + successCallback + +
    (optional)
    +
    + Function= + + + +
    + errorCallback + +
    (optional)
    +
    + Function= + + + +
    + progressCallback + +
    (optional)
    +
    + Function= + + + +
    + + + + + + +

    Returns

    + + + + + +
    Promise

    Returns a promise of the passed value or promise

    +
    +
  • + +
  • +

    all(promises);

    + +

    +

    Combines multiple promises into a single promise that is resolved when all of the input +promises are resolved.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + promises + + + + Array.<Promise>Object.<Promise> + +

    An array or hash of promises.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    Promise

    Returns a single promise that will be resolved with an array/hash of values, + each value corresponding to the promise at the same index/key in the promises array/hash. + If any of the promises is resolved with a rejection, this resulting promise will be rejected + with the same rejection value.

    +
    +
  • + +
  • +

    race(promises);

    + +

    +

    Returns a promise that resolves or rejects as soon as one of those promises +resolves or rejects, with the value or reason from that promise.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + promises + + + + Array.<Promise>Object.<Promise> + +

    An array or hash of promises.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    Promise

    a promise that resolves or rejects as soon as one of the promises +resolves or rejects, with the value or reason from that promise.

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$rootElement.html b/1.6.6/docs/partials/api/ng/service/$rootElement.html new file mode 100644 index 000000000..aaac5efc6 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$rootElement.html @@ -0,0 +1,53 @@ + Improve this Doc + + + + +  View Source + + + +
+

$rootElement

+
    + + + +
  1. + - service in module ng +
  2. +
+
+ + + + + +
+

The root element of Angular application. This is either the element where ngApp was declared or the element passed into +angular.bootstrap. The element represents the root element of application. It is also the +location where the application's $injector service gets +published, and can be retrieved using $rootElement.injector().

+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$rootScope.html b/1.6.6/docs/partials/api/ng/service/$rootScope.html new file mode 100644 index 000000000..ff02c7a63 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$rootScope.html @@ -0,0 +1,56 @@ + Improve this Doc + + + + +  View Source + + + +
+

$rootScope

+
    + +
  1. + - $rootScopeProvider +
  2. + +
  3. + - service in module ng +
  4. +
+
+ + + + + +
+

Every application has a single root scope. +All other scopes are descendant scopes of the root scope. Scopes provide separation +between the model and the view, via a mechanism for watching the model for changes. +They also provide event emission/broadcast and subscription facility. See the +developer guide on scopes.

+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$sce.html b/1.6.6/docs/partials/api/ng/service/$sce.html new file mode 100644 index 000000000..698bd0940 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$sce.html @@ -0,0 +1,1457 @@ + Improve this Doc + + + + +  View Source + + + +
+

$sce

+
    + +
  1. + - $sceProvider +
  2. + +
  3. + - service in module ng +
  4. +
+
+ + + + + +
+

$sce is a service that provides Strict Contextual Escaping services to AngularJS.

+

Strict Contextual Escaping

+

Strict Contextual Escaping (SCE) is a mode in which AngularJS constrains bindings to only render +trusted values. Its goal is to assist in writing code in a way that (a) is secure by default, and +(b) makes auditing for security vulnerabilities such as XSS, clickjacking, etc. a lot easier.

+

Overview

+

To systematically block XSS security bugs, AngularJS treats all values as untrusted by default in +HTML or sensitive URL bindings. When binding untrusted values, AngularJS will automatically +run security checks on them (sanitizations, whitelists, depending on context), or throw when it +cannot guarantee the security of the result. That behavior depends strongly on contexts: HTML +can be sanitized, but template URLs cannot, for instance.

+

To illustrate this, consider the ng-bind-html directive. It renders its value directly as HTML: +we call that the context. When given an untrusted input, AngularJS will attempt to sanitize it +before rendering if a sanitizer is available, and throw otherwise. To bypass sanitization and +render the input as-is, you will need to mark it as trusted for that context before attempting +to bind it.

+

As of version 1.2, AngularJS ships with SCE enabled by default.

+

In practice

+

Here's an example of a binding in a privileged context:

+
<input ng-model="userHtml" aria-label="User input">
+<div ng-bind-html="userHtml"></div>
+
+

Notice that ng-bind-html is bound to userHtml controlled by the user. With SCE +disabled, this application allows the user to render arbitrary HTML into the DIV, which would +be an XSS security bug. In a more realistic example, one may be rendering user comments, blog +articles, etc. via bindings. (HTML is just one example of a context where rendering user +controlled input creates security vulnerabilities.)

+

For the case of HTML, you might use a library, either on the client side, or on the server side, +to sanitize unsafe HTML before binding to the value and rendering it in the document.

+

How would you ensure that every place that used these types of bindings was bound to a value that +was sanitized by your library (or returned as safe for rendering by your server?) How can you +ensure that you didn't accidentally delete the line that sanitized the value, or renamed some +properties/fields and forgot to update the binding to the sanitized value?

+

To be secure by default, AngularJS makes sure bindings go through that sanitization, or +any similar validation process, unless there's a good reason to trust the given value in this +context. That trust is formalized with a function call. This means that as a developer, you +can assume all untrusted bindings are safe. Then, to audit your code for binding security issues, +you just need to ensure the values you mark as trusted indeed are safe - because they were +received from your server, sanitized by your library, etc. You can organize your codebase to +help with this - perhaps allowing only the files in a specific directory to do this. +Ensuring that the internal API exposed by that code doesn't markup arbitrary values as safe then +becomes a more manageable task.

+

In the case of AngularJS' SCE service, one uses $sce.trustAs +(and shorthand methods such as $sce.trustAsHtml, etc.) to +build the trusted versions of your values.

+

How does it work?

+

In privileged contexts, directives and code will bind to the result of $sce.getTrusted(context, value) rather than to the value directly. Think of this function as +a way to enforce the required security context in your data sink. Directives use $sce.parseAs rather than $parse to watch attribute bindings, which performs +the $sce.getTrusted behind the scenes on non-constant literals. Also, +when binding without directives, AngularJS will understand the context of your bindings +automatically.

+

As an example, ngBindHtml uses $sce.parseAsHtml(binding expression). Here's the actual code (slightly +simplified):

+
var ngBindHtmlDirective = ['$sce', function($sce) {
+  return function(scope, element, attr) {
+    scope.$watch($sce.parseAsHtml(attr.ngBindHtml), function(value) {
+      element.html(value || '');
+    });
+  };
+}];
+
+

Impact on loading templates

+

This applies both to the ng-include directive as well as +templateUrl's specified by directives.

+

By default, Angular only loads templates from the same domain and protocol as the application +document. This is done by calling $sce.getTrustedResourceUrl on the template URL. To load templates from other domains and/or +protocols, you may either whitelist +them or wrap it into a trusted value.

+

Please note: +The browser's +Same Origin Policy +and Cross-Origin Resource Sharing (CORS) +policy apply in addition to this and may further restrict whether the template is successfully +loaded. This means that without the right CORS policy, loading templates from a different domain +won't work on all browsers. Also, loading templates from file:// URL does not work on some +browsers.

+

This feels like too much overhead

+

It's important to remember that SCE only applies to interpolation expressions.

+

If your expressions are constant literals, they're automatically trusted and you don't need to +call $sce.trustAs on them (e.g. +<div ng-bind-html="'<b>implicitly trusted</b>'"></div>) just works. The $sceDelegate will +also use the $sanitize service if it is available when binding untrusted values to +$sce.HTML context. AngularJS provides an implementation in angular-sanitize.js, and if you +wish to use it, you will also need to depend on the ngSanitize module in +your application.

+

The included $sceDelegate comes with sane defaults to allow you to load +templates in ng-include from your application's domain without having to even know about SCE. +It blocks loading templates from other domains or loading templates over http from an https +served document. You can change these by setting your own custom whitelists and blacklists for matching such URLs.

+

This significantly reduces the overhead. It is far easier to pay the small overhead and have an +application that's secure and can be audited to verify that with much more ease than bolting +security onto an application later.

+

+

What trusted context types are supported?

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ContextNotes
$sce.HTMLFor HTML that's safe to source into the application. The ngBindHtml directive uses this context for bindings. If an unsafe value is encountered, and the $sanitize service is available (implemented by the ngSanitize module) this will sanitize the value instead of throwing an error.
$sce.CSSFor CSS that's safe to source into the application. Currently, no bindings require this context. Feel free to use it in your own directives.
$sce.URLFor URLs that are safe to follow as links. Currently unused (<a href=, <img src=, and some others sanitize their urls and don't constitute an SCE context.)
$sce.RESOURCE_URLFor URLs that are not only safe to follow as links, but whose contents are also safe to include in your application. Examples include ng-include, src / ngSrc bindings for tags other than IMG, VIDEO, AUDIO, SOURCE, and TRACK (e.g. IFRAME, OBJECT, etc.)

Note that $sce.RESOURCE_URL makes a stronger statement about the URL than $sce.URL does (it's not just the URL that matters, but also what is at the end of it), and therefore contexts requiring values trusted for $sce.RESOURCE_URL can be used anywhere that values trusted for $sce.URL are required.
$sce.JSFor JavaScript that is safe to execute in your application's context. Currently, no bindings require this context. Feel free to use it in your own directives.
+

Be aware that a[href] and img[src] automatically sanitize their URLs and do not pass them +through $sce.getTrusted. There's no CSS-, URL-, or JS-context bindings +in AngularJS currently, so their corresponding $sce.trustAs functions aren't useful yet. This +might evolve.

+ +

Each element in these arrays must be one of the following:

+
    +
  • 'self'
      +
    • The special string, 'self', can be used to match against all URLs of the same +domain as the application document using the same protocol.
    • +
    +
  • +
  • String (except the special value 'self')
      +
    • The string is matched against the full normalized / absolute URL of the resource +being tested (substring matches are not good enough.)
    • +
    • There are exactly two wildcard sequences - * and **. All other characters +match themselves.
    • +
    • *: matches zero or more occurrences of any character other than one of the following 6 +characters: ':', '/', '.', '?', '&' and ';'. It's a useful wildcard for use +in a whitelist.
    • +
    • **: matches zero or more occurrences of any character. As such, it's not +appropriate for use in a scheme, domain, etc. as it would match too much. (e.g. +http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might +not have been the intention.) Its usage at the very end of the path is ok. (e.g. +http://foo.example.com/templates/**).
    • +
    +
  • +
  • RegExp (see caveat below)
      +
    • Caveat: While regular expressions are powerful and offer great flexibility, their syntax +(and all the inevitable escaping) makes them harder to maintain. It's easy to +accidentally introduce a bug when one updates a complex expression (imho, all regexes should +have good test coverage). For instance, the use of . in the regex is correct only in a +small number of cases. A . character in the regex used when matching the scheme or a +subdomain could be matched against a : or literal . that was likely not intended. It +is highly recommended to use the string patterns and only fall back to regular expressions +as a last resort.
    • +
    • The regular expression must be an instance of RegExp (i.e. not a string.) It is +matched against the entire normalized / absolute URL of the resource being tested +(even when the RegExp did not have the ^ and $ codes.) In addition, any flags +present on the RegExp (such as multiline, global, ignoreCase) are ignored.
    • +
    • If you are generating your JavaScript from some other templating engine (not +recommended, e.g. in issue #4006), +remember to escape your regular expression (and be aware that you might need more than +one level of escaping depending on your templating engine and the way you interpolated +the value.) Do make use of your platform's escaping mechanism as it might be good +enough before coding your own. E.g. Ruby has +Regexp.escape(str) +and Python has re.escape. +Javascript lacks a similar built in function for escaping. Take a look at Google +Closure library's goog.string.regExpEscape(s).
    • +
    +
  • +
+

Refer $sceDelegateProvider for an example.

+

Show me an example using SCE.

+

+ +

+ + +
+ + +
+
<div ng-controller="AppController as myCtrl">
  <i ng-bind-html="myCtrl.explicitlyTrustedHtml" id="explicitlyTrustedHtml"></i><br><br>
  <b>User comments</b><br>
  By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when
  $sanitize is available.  If $sanitize isn't available, this results in an error instead of an
  exploit.
  <div class="well">
    <div ng-repeat="userComment in myCtrl.userComments">
      <b>{{userComment.name}}</b>:
      <span ng-bind-html="userComment.htmlComment" class="htmlComment"></span>
      <br>
    </div>
  </div>
</div>
+
+ +
+
angular.module('mySceApp', ['ngSanitize'])
.controller('AppController', ['$http', '$templateCache', '$sce',
  function AppController($http, $templateCache, $sce) {
    var self = this;
    $http.get('test_data.json', {cache: $templateCache}).then(function(response) {
      self.userComments = response.data;
    });
    self.explicitlyTrustedHtml = $sce.trustAsHtml(
        '<span onmouseover="this.textContent=&quot;Explicitly trusted HTML bypasses ' +
        'sanitization.&quot;">Hover over this text.</span>');
  }]);
+
+ +
+
[
  { "name": "Alice",
    "htmlComment":
        "<span onmouseover='this.textContent=\"PWN3D!\"'>Is <i>anyone</i> reading this?</span>"
  },
  { "name": "Bob",
    "htmlComment": "<i>Yes!</i>  Am I the only other one?"
  }
]
+
+ +
+
describe('SCE doc demo', function() {
  it('should sanitize untrusted values', function() {
    expect(element.all(by.css('.htmlComment')).first().getAttribute('innerHTML'))
        .toBe('<span>Is <i>anyone</i> reading this?</span>');
  });

  it('should NOT sanitize explicitly trusted values', function() {
    expect(element(by.id('explicitlyTrustedHtml')).getAttribute('innerHTML')).toBe(
        '<span onmouseover="this.textContent=&quot;Explicitly trusted HTML bypasses ' +
        'sanitization.&quot;">Hover over this text.</span>');
  });
});
+
+ + + +
+
+ + +

+

Can I disable SCE completely?

+

Yes, you can. However, this is strongly discouraged. SCE gives you a lot of security benefits +for little coding overhead. It will be much harder to take an SCE disabled application and +either secure it on your own or enable SCE at a later stage. It might make sense to disable SCE +for cases where you have a lot of existing code that was written before SCE was introduced and +you're migrating them a module at a time. Also do note that this is an app-wide setting, so if +you are writing a library, you will cause security bugs applications using it.

+

That said, here's how you can completely disable SCE:

+
angular.module('myAppWithSceDisabledmyApp', []).config(function($sceProvider) {
+  // Completely disable SCE.  For demonstration purposes only!
+  // Do not use in new projects or libraries.
+  $sceProvider.enabled(false);
+});
+
+ +
+ + + + +
+ + + + +

Usage

+ +

$sce();

+ + + + + + + + + +

Methods

+
    +
  • +

    isEnabled();

    + +

    +

    Returns a boolean indicating if SCE is enabled.

    +
    + + + + + + + + +

    Returns

    + + + + + +
    Boolean

    True if SCE is enabled, false otherwise. If you want to set the value, you + have to do it at module config time on $sceProvider.

    +
    +
  • + +
  • +

    parseAs(type, expression);

    + +

    +

    Converts Angular expression into a function. This is like $parse and is identical when the expression is a literal constant. Otherwise, it +wraps the expression in a call to $sce.getTrusted(type, +result)

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + type + + + + string + +

    The SCE context in which this result will be used.

    + + +
    + expression + + + + string + +

    String expression to compile.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    function(context, locals)

    A function which represents the compiled expression:

    +
      +
    • context{object} – an object against which any expressions embedded in the +strings are evaluated against (typically a scope object).
    • +
    • locals{object=} – local variables context object, useful for overriding values +in context.
    • +
    +
    +
  • + +
  • +

    trustAs(type, value);

    + +

    +

    Delegates to $sceDelegate.trustAs. As such, returns a +wrapped object that represents your value, and the trust you have in its safety for the given +context. AngularJS can then use that value as-is in bindings of the specified secure context. +This is used in bindings for ng-bind-html, ng-include, and most src attribute +interpolations. See $sce for strict contextual escaping.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + type + + + + string + +

    The context in which this value is safe for use, e.g. $sce.URL, + $sce.RESOURCE_URL, $sce.HTML, $sce.JS or $sce.CSS.

    + + +
    + value + + + + * + +

    The value that that should be considered trusted.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    A wrapped version of value that can be used as a trusted variant of your value + in the context you specified.

    +
    +
  • + +
  • +

    trustAsHtml(value);

    + +

    +

    Shorthand method. $sce.trustAsHtml(value) → + $sceDelegate.trustAs($sce.HTML, value)

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + value + + + + * + +

    The value to mark as trusted for $sce.HTML context.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    A wrapped version of value that can be used as a trusted variant of your value + in $sce.HTML context (like ng-bind-html).

    +
    +
  • + +
  • +

    trustAsCss(value);

    + +

    +

    Shorthand method. $sce.trustAsCss(value) → + $sceDelegate.trustAs($sce.CSS, value)

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + value + + + + * + +

    The value to mark as trusted for $sce.CSS context.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    A wrapped version of value that can be used as a trusted variant + of your value in $sce.CSS context. This context is currently unused, so there are + almost no reasons to use this function so far.

    +
    +
  • + +
  • +

    trustAsUrl(value);

    + +

    +

    Shorthand method. $sce.trustAsUrl(value) → + $sceDelegate.trustAs($sce.URL, value)

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + value + + + + * + +

    The value to mark as trusted for $sce.URL context.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    A wrapped version of value that can be used as a trusted variant of your value + in $sce.URL context. That context is currently unused, so there are almost no reasons + to use this function so far.

    +
    +
  • + +
  • +

    trustAsResourceUrl(value);

    + +

    +

    Shorthand method. $sce.trustAsResourceUrl(value) → + $sceDelegate.trustAs($sce.RESOURCE_URL, value)

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + value + + + + * + +

    The value to mark as trusted for $sce.RESOURCE_URL context.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    A wrapped version of value that can be used as a trusted variant of your value + in $sce.RESOURCE_URL context (template URLs in ng-include, most src attribute + bindings, ...)

    +
    +
  • + +
  • +

    trustAsJs(value);

    + +

    +

    Shorthand method. $sce.trustAsJs(value) → + $sceDelegate.trustAs($sce.JS, value)

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + value + + + + * + +

    The value to mark as trusted for $sce.JS context.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    A wrapped version of value that can be used as a trusted variant of your value + in $sce.JS context. That context is currently unused, so there are almost no reasons to + use this function so far.

    +
    +
  • + +
  • +

    getTrusted(type, maybeTrusted);

    + +

    +

    Delegates to $sceDelegate.getTrusted. As such, +takes any input, and either returns a value that's safe to use in the specified context, +or throws an exception. This function is aware of trusted values created by the trustAs +function and its shorthands, and when contexts are appropriate, returns the unwrapped value +as-is. Finally, this function can also throw when there is no way to turn maybeTrusted in a +safe value (e.g., no sanitization is available or possible.)

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + type + + + + string + +

    The context in which this value is to be used.

    + + +
    + maybeTrusted + + + + * + +

    The result of a prior $sce.trustAs call, or anything else (which will not be considered trusted.)

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    A version of the value that's safe to use in the given context, or throws an + exception if this is impossible.

    +
    +
  • + +
  • +

    getTrustedHtml(value);

    + +

    +

    Shorthand method. $sce.getTrustedHtml(value) → + $sceDelegate.getTrusted($sce.HTML, value)

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + value + + + + * + +

    The value to pass to $sce.getTrusted.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    The return value of $sce.getTrusted($sce.HTML, value)

    +
    +
  • + +
  • +

    getTrustedCss(value);

    + +

    +

    Shorthand method. $sce.getTrustedCss(value) → + $sceDelegate.getTrusted($sce.CSS, value)

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + value + + + + * + +

    The value to pass to $sce.getTrusted.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    The return value of $sce.getTrusted($sce.CSS, value)

    +
    +
  • + +
  • +

    getTrustedUrl(value);

    + +

    +

    Shorthand method. $sce.getTrustedUrl(value) → + $sceDelegate.getTrusted($sce.URL, value)

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + value + + + + * + +

    The value to pass to $sce.getTrusted.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    The return value of $sce.getTrusted($sce.URL, value)

    +
    +
  • + +
  • +

    getTrustedResourceUrl(value);

    + +

    +

    Shorthand method. $sce.getTrustedResourceUrl(value) → + $sceDelegate.getTrusted($sce.RESOURCE_URL, value)

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + value + + + + * + +

    The value to pass to $sceDelegate.getTrusted.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    The return value of $sce.getTrusted($sce.RESOURCE_URL, value)

    +
    +
  • + +
  • +

    getTrustedJs(value);

    + +

    +

    Shorthand method. $sce.getTrustedJs(value) → + $sceDelegate.getTrusted($sce.JS, value)

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + value + + + + * + +

    The value to pass to $sce.getTrusted.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    The return value of $sce.getTrusted($sce.JS, value)

    +
    +
  • + +
  • +

    parseAsHtml(expression);

    + +

    +

    Shorthand method. $sce.parseAsHtml(expression string) → + $sce.parseAs($sce.HTML, value)

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + expression + + + + string + +

    String expression to compile.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    function(context, locals)

    A function which represents the compiled expression:

    +
      +
    • context{object} – an object against which any expressions embedded in the +strings are evaluated against (typically a scope object).
    • +
    • locals{object=} – local variables context object, useful for overriding values +in context.
    • +
    +
    +
  • + +
  • +

    parseAsCss(expression);

    + +

    +

    Shorthand method. $sce.parseAsCss(value) → + $sce.parseAs($sce.CSS, value)

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + expression + + + + string + +

    String expression to compile.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    function(context, locals)

    A function which represents the compiled expression:

    +
      +
    • context{object} – an object against which any expressions embedded in the +strings are evaluated against (typically a scope object).
    • +
    • locals{object=} – local variables context object, useful for overriding values +in context.
    • +
    +
    +
  • + +
  • +

    parseAsUrl(expression);

    + +

    +

    Shorthand method. $sce.parseAsUrl(value) → + $sce.parseAs($sce.URL, value)

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + expression + + + + string + +

    String expression to compile.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    function(context, locals)

    A function which represents the compiled expression:

    +
      +
    • context{object} – an object against which any expressions embedded in the +strings are evaluated against (typically a scope object).
    • +
    • locals{object=} – local variables context object, useful for overriding values +in context.
    • +
    +
    +
  • + +
  • +

    parseAsResourceUrl(expression);

    + +

    +

    Shorthand method. $sce.parseAsResourceUrl(value) → + $sce.parseAs($sce.RESOURCE_URL, value)

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + expression + + + + string + +

    String expression to compile.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    function(context, locals)

    A function which represents the compiled expression:

    +
      +
    • context{object} – an object against which any expressions embedded in the +strings are evaluated against (typically a scope object).
    • +
    • locals{object=} – local variables context object, useful for overriding values +in context.
    • +
    +
    +
  • + +
  • +

    parseAsJs(expression);

    + +

    +

    Shorthand method. $sce.parseAsJs(value) → + $sce.parseAs($sce.JS, value)

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + expression + + + + string + +

    String expression to compile.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    function(context, locals)

    A function which represents the compiled expression:

    +
      +
    • context{object} – an object against which any expressions embedded in the +strings are evaluated against (typically a scope object).
    • +
    • locals{object=} – local variables context object, useful for overriding values +in context.
    • +
    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$sceDelegate.html b/1.6.6/docs/partials/api/ng/service/$sceDelegate.html new file mode 100644 index 000000000..3dce74ee9 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$sceDelegate.html @@ -0,0 +1,305 @@ + Improve this Doc + + + + +  View Source + + + +
+

$sceDelegate

+
    + +
  1. + - $sceDelegateProvider +
  2. + +
  3. + - service in module ng +
  4. +
+
+ + + + + +
+

$sceDelegate is a service that is used by the $sce service to provide Strict +Contextual Escaping (SCE) services to AngularJS.

+

For an overview of this service and the functionnality it provides in AngularJS, see the main +page for SCE. The current page is targeted for developers who need to alter how +SCE works in their application, which shouldn't be needed in most cases.

+
+AngularJS strongly relies on contextual escaping for the security of bindings: disabling or +modifying this might cause cross site scripting (XSS) vulnerabilities. For libraries owners, +changes to this service will also influence users, so be extra careful and document your changes. +
+ +

Typically, you would configure or override the $sceDelegate instead of +the $sce service to customize the way Strict Contextual Escaping works in AngularJS. This is +because, while the $sce provides numerous shorthand methods, etc., you really only need to +override 3 core functions (trustAs, getTrusted and valueOf) to replace the way things +work because $sce delegates to $sceDelegate for these operations.

+

Refer $sceDelegateProvider to configure this service.

+

The default instance of $sceDelegate should work out of the box with little pain. While you +can override it completely to change the behavior of $sce, the common case would +involve configuring the $sceDelegateProvider instead by setting +your own whitelists and blacklists for trusting URLs used for loading AngularJS resources such as +templates. Refer $sceDelegateProvider.resourceUrlWhitelist and $sceDelegateProvider.resourceUrlBlacklist

+ +
+ + + + +
+ + + + +

Usage

+ +

$sceDelegate();

+ + + + + + + + + +

Methods

+
    +
  • +

    trustAs(type, value);

    + +

    +

    Returns a trusted representation of the parameter for the specified context. This trusted +object will later on be used as-is, without any security check, by bindings or directives +that require this security context. +For instance, marking a string as trusted for the $sce.HTML context will entirely bypass +the potential $sanitize call in corresponding $sce.HTML bindings or directives, such as +ng-bind-html. Note that in most cases you won't need to call this function: if you have the +sanitizer loaded, passing the value itself will render all the HTML that does not pose a +security risk.

    +

    See getTrusted for the function that will consume those +trusted values, and $sce for general documentation about strict contextual +escaping.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + type + + + + string + +

    The context in which this value is safe for use, e.g. $sce.URL, + $sce.RESOURCE_URL, $sce.HTML, $sce.JS or $sce.CSS.

    + + +
    + value + + + + * + +

    The value that should be considered trusted.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    A trusted representation of value, that can be used in the given context.

    +
    +
  • + +
  • +

    valueOf(value);

    + +

    +

    If the passed parameter had been returned by a prior call to $sceDelegate.trustAs, returns the value that had been passed to $sceDelegate.trustAs.

    +

    If the passed parameter is not a value that had been returned by $sceDelegate.trustAs, it must be returned as-is.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + value + + + + * + +

    The result of a prior $sceDelegate.trustAs + call or anything else.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    The value that was originally provided to $sceDelegate.trustAs if value is the result of such a call. Otherwise, returns + value unchanged.

    +
    +
  • + +
  • +

    getTrusted(type, maybeTrusted);

    + +

    +

    Takes any input, and either returns a value that's safe to use in the specified context, or +throws an exception.

    +

    In practice, there are several cases. When given a string, this function runs checks +and sanitization to make it safe without prior assumptions. When given the result of a $sceDelegate.trustAs call, it returns the originally supplied +value if that value's context is valid for this call's context. Finally, this function can +also throw when there is no way to turn maybeTrusted in a safe value (e.g., no sanitization +is available or possible.)

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + type + + + + string + +

    The context in which this value is to be used (such as $sce.HTML).

    + + +
    + maybeTrusted + + + + * + +

    The result of a prior $sceDelegate.trustAs call, or anything else (which will not be considered trusted.)

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    A version of the value that's safe to use in the given context, or throws an + exception if this is impossible.

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$templateCache.html b/1.6.6/docs/partials/api/ng/service/$templateCache.html new file mode 100644 index 000000000..c9d8aaab8 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$templateCache.html @@ -0,0 +1,75 @@ + Improve this Doc + + + + +  View Source + + + +
+

$templateCache

+
    + + + +
  1. + - service in module ng +
  2. +
+
+ + + + + +
+

The first time a template is used, it is loaded in the template cache for quick retrieval. You +can load templates directly into the cache in a script tag, or by consuming the +$templateCache service directly.

+

Adding via the script tag:

+
<script type="text/ng-template" id="templateId.html">
+  <p>This is the content of the template</p>
+</script>
+
+

Note: the script tag containing the template does not need to be included in the head of +the document, but it must be a descendent of the $rootElement (IE, +element with ng-app attribute), otherwise the template will be ignored.

+

Adding via the $templateCache service:

+
var myApp = angular.module('myApp', []);
+myApp.run(function($templateCache) {
+  $templateCache.put('templateId.html', 'This is the content of the template');
+});
+
+

To retrieve the template later, simply use it in your component:

+
myApp.component('myComponent', {
+   templateUrl: 'templateId.html'
+});
+
+

or get it via the $templateCache service:

+
$templateCache.get('templateId.html')
+
+

See $cacheFactory.

+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$templateRequest.html b/1.6.6/docs/partials/api/ng/service/$templateRequest.html new file mode 100644 index 000000000..8dd7e893a --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$templateRequest.html @@ -0,0 +1,138 @@ + Improve this Doc + + + + +  View Source + + + +
+

$templateRequest

+
    + +
  1. + - $templateRequestProvider +
  2. + +
  3. + - service in module ng +
  4. +
+
+ + + + + +
+

The $templateRequest service runs security checks then downloads the provided template using +$http and, upon success, stores the contents inside of $templateCache. If the HTTP request +fails or the response data of the HTTP request is empty, a $compile error will be thrown (the +exception can be thwarted by setting the 2nd parameter of the function to true). Note that the +contents of $templateCache are trusted, so the call to $sce.getTrustedUrl(tpl) is omitted +when tpl is of type string and $templateCache has the matching entry.

+

If you want to pass custom options to the $http service, such as setting the Accept header you +can configure this via $templateRequestProvider.

+ +
+ + + + +
+ + + + +

Usage

+ +

$templateRequest(tpl, [ignoreRequestError]);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ tpl + + + + stringTrustedResourceUrl + +

The HTTP request template URL

+ + +
+ ignoreRequestError + +
(optional)
+
+ boolean + +

Whether or not to ignore the exception when the request fails or the template is empty

+ + +
+ +
+ +

Returns

+ + + + + +
Promise

a promise for the HTTP response data of the given URL.

+
+ + + + +

Properties

+
    +
  • +

    totalPendingRequests

    + + + + + +
    number

    total amount of pending template requests being downloaded.

    +
    + +
  • +
+ + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$timeout.html b/1.6.6/docs/partials/api/ng/service/$timeout.html new file mode 100644 index 000000000..cab19f13d --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$timeout.html @@ -0,0 +1,218 @@ + Improve this Doc + + + + +  View Source + + + +
+

$timeout

+
    + + + +
  1. + - service in module ng +
  2. +
+
+ + + + + +
+

Angular's wrapper for window.setTimeout. The fn function is wrapped into a try/catch +block and delegates any exceptions to +$exceptionHandler service.

+

The return value of calling $timeout is a promise, which will be resolved when +the delay has passed and the timeout function, if provided, is executed.

+

To cancel a timeout request, call $timeout.cancel(promise).

+

In tests you can use $timeout.flush() to +synchronously flush the queue of deferred functions.

+

If you only want a promise that will be resolved after some specified delay +then you can call $timeout without the fn function.

+ +
+ + + + +
+ + + + +

Usage

+ +

$timeout([fn], [delay], [invokeApply], [Pass]);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ fn + +
(optional)
+
+ function()= + +

A function, whose execution should be delayed.

+ + +
+ delay + +
(optional)
+
+ number + +

Delay in milliseconds.

+ +

(default: 0)

+
+ invokeApply + +
(optional)
+
+ boolean + +

If set to false skips model dirty checking, otherwise + will invoke fn within the $apply block.

+ +

(default: true)

+
+ Pass + +
(optional)
+
+ * + +

additional parameters to the executed function.

+ + +
+ +
+ +

Returns

+ + + + + +
Promise

Promise that will be resolved when the timeout is reached. The promise + will be resolved with the return value of the fn function.

+
+ + +

Methods

+
    +
  • +

    cancel([promise]);

    + +

    +

    Cancels a task associated with the promise. As a result of this, the promise will be +resolved with a rejection.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + promise + +
    (optional)
    +
    + Promise + +

    Promise returned by the $timeout function.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    boolean

    Returns true if the task hasn't executed yet and was successfully + canceled.

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$window.html b/1.6.6/docs/partials/api/ng/service/$window.html new file mode 100644 index 000000000..729330140 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$window.html @@ -0,0 +1,90 @@ + Improve this Doc + + + + +  View Source + + + +
+

$window

+
    + + + +
  1. + - service in module ng +
  2. +
+
+ + + + + +
+

A reference to the browser's window object. While window +is globally available in JavaScript, it causes testability problems, because +it is a global variable. In angular we always refer to it through the +$window service, so it may be overridden, removed or mocked for testing.

+

Expressions, like the one defined for the ngClick directive in the example +below, are evaluated with respect to the current scope. Therefore, there is +no risk of inadvertently coding in a dependency on a global value in such an +expression.

+ +
+ + + + +
+ + + + + + + + + + + + + +

Examples

+ +

+ + +
+ + +
+
<script>
  angular.module('windowExample', [])
    .controller('ExampleController', ['$scope', '$window', function($scope, $window) {
      $scope.greeting = 'Hello, World!';
      $scope.doGreeting = function(greeting) {
        $window.alert(greeting);
      };
    }]);
</script>
<div ng-controller="ExampleController">
  <input type="text" ng-model="greeting" aria-label="greeting" />
  <button ng-click="doGreeting(greeting)">ALERT</button>
</div>
+
+ +
+
it('should display the greeting in the input box', function() {
 element(by.model('greeting')).sendKeys('Hello, E2E Tests');
 // If we click the button it will block the test runner
 // element(':button').click();
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/service/$xhrFactory.html b/1.6.6/docs/partials/api/ng/service/$xhrFactory.html new file mode 100644 index 000000000..d9c8c7a00 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/service/$xhrFactory.html @@ -0,0 +1,116 @@ + Improve this Doc + + + + +  View Source + + + +
+

$xhrFactory

+
    + + + +
  1. + - service in module ng +
  2. +
+
+ + + + + +
+

Factory function used to create XMLHttpRequest objects.

+

Replace or decorate this service to create your own custom XMLHttpRequest objects.

+
angular.module('myApp', [])
+.factory('$xhrFactory', function() {
+  return function createXhr(method, url) {
+    return new window.XMLHttpRequest({mozSystem: true});
+  };
+});
+
+ +
+ + + + +
+ + + + +

Usage

+ +

$xhrFactory(method, url);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ method + + + + string + +

HTTP method of the request (GET, POST, PUT, ..)

+ + +
+ url + + + + string + +

URL of the request.

+ + +
+ +
+ + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/type.html b/1.6.6/docs/partials/api/ng/type.html new file mode 100644 index 000000000..456d4d3a1 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/type.html @@ -0,0 +1,83 @@ + +

Type components in ng

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
angular.Module

Interface for configuring angular modules.

+
$cacheFactory.Cache

A cache object used to store and retrieve data, primarily used by +$http and the script directive to cache +templates and other data.

+
$compile.directive.Attributes

A shared object between directive compile / linking functions which contains normalized DOM +element attributes. The values reflect current binding state {{ }}. The normalization is +needed since all of these are treated as equivalent in Angular:

+
form.FormController

FormController keeps track of all its controls and nested forms as well as the state of them, +such as being valid/invalid or dirty/pristine.

+
ngModel.NgModelController

NgModelController provides API for the ngModel directive. +The controller contains services for data-binding, validation, CSS updates, and value formatting +and parsing. It purposefully does not contain any logic which deals with DOM rendering or +listening to DOM events. +Such DOM related logic should be provided by other directives which make use of +NgModelController for data-binding to control elements. +Angular provides this DOM logic for most input elements. +At the end of this page you can find a custom control example that uses ngModelController to bind to contenteditable elements.

+
ModelOptions

A container for the options set by the ngModelOptions directive

+
select.SelectController

The controller for the select directive. The controller exposes +a few utility methods that can be used to augment the behavior of a regular or an +ngOptions select element.

+
$rootScope.Scope

A root scope can be retrieved using the $rootScope key from the +$injector. Child scopes are created using the +$new() method. (Most scopes are created automatically when +compiled HTML template is executed.) See also the Scopes guide for +an in-depth introduction and usage examples.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ng/type/$cacheFactory.Cache.html b/1.6.6/docs/partials/api/ng/type/$cacheFactory.Cache.html new file mode 100644 index 000000000..e1a908818 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/type/$cacheFactory.Cache.html @@ -0,0 +1,318 @@ + Improve this Doc + + + + +  View Source + + + +
+

$cacheFactory.Cache

+
    + +
  1. + - type in module ng +
  2. +
+
+ + + + + +
+

A cache object used to store and retrieve data, primarily used by +$http and the script directive to cache +templates and other data.

+
angular.module('superCache')
+  .factory('superCache', ['$cacheFactory', function($cacheFactory) {
+    return $cacheFactory('super-cache');
+  }]);
+
+

Example test:

+
it('should behave like a cache', inject(function(superCache) {
+  superCache.put('key', 'value');
+  superCache.put('another key', 'another value');
+
+  expect(superCache.info()).toEqual({
+    id: 'super-cache',
+    size: 2
+  });
+
+  superCache.remove('another key');
+  expect(superCache.get('another key')).toBeUndefined();
+
+  superCache.removeAll();
+  expect(superCache.info()).toEqual({
+    id: 'super-cache',
+    size: 0
+  });
+}));
+
+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    put(key, value);

    + +

    +

    Inserts a named entry into the Cache object to be +retrieved later, and incrementing the size of the cache if the key was not already +present in the cache. If behaving like an LRU cache, it will also remove stale +entries from the set.

    +

    It will not insert undefined values into the cache.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + key + + + + string + +

    the key under which the cached data is stored.

    + + +
    + value + + + + * + +

    the value to store alongside the key. If it is undefined, the key + will not be stored.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    the value stored.

    +
    +
  • + +
  • +

    get(key);

    + +

    +

    Retrieves named data stored in the Cache object.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + key + + + + string + +

    the key of the data to be retrieved

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    the value stored.

    +
    +
  • + +
  • +

    remove(key);

    + +

    +

    Removes an entry from the Cache object.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + key + + + + string + +

    the key of the entry to be removed

    + + +
    + + + + + +
  • + +
  • +

    removeAll();

    + +

    +

    Clears the cache object of any entries.

    +
    + + + + + + + +
  • + +
  • +

    destroy();

    + +

    +

    Destroys the Cache object entirely, +removing it from the $cacheFactory set.

    +
    + + + + + + + +
  • + +
  • +

    info();

    + +

    +

    Retrieve information regarding a particular Cache.

    +
    + + + + + + + + +

    Returns

    + + + + + +
    object

    an object with the following properties: +

      +
    • id: the id of the cache instance
    • +
    • size: the number of entries kept in the cache instance
    • +
    • ...: any additional properties from the options object when creating the + cache.
    • +

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/type/$compile.directive.Attributes.html b/1.6.6/docs/partials/api/ng/type/$compile.directive.Attributes.html new file mode 100644 index 000000000..c45b8062c --- /dev/null +++ b/1.6.6/docs/partials/api/ng/type/$compile.directive.Attributes.html @@ -0,0 +1,422 @@ + Improve this Doc + + + + +  View Source + + + +
+

$compile.directive.Attributes

+
    + +
  1. + - type in module ng +
  2. +
+
+ + + + + +
+

A shared object between directive compile / linking functions which contains normalized DOM +element attributes. The values reflect current binding state {{ }}. The normalization is +needed since all of these are treated as equivalent in Angular:

+
<span ng:bind="a" ng-bind="a" data-ng-bind="a" x-ng-bind="a">
+
+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    $normalize(name);

    + +

    +

    Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with x- or +data-) to its normalized, camelCase form.

    +

    Also there is special case for Moz prefix starting with upper case letter.

    +

    For further information check out the guide on Matching Directives

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + string + +

    Name to normalize

    + + +
    + + + + + +
  • + +
  • +

    $addClass(classVal);

    + +

    +

    Adds the CSS class value specified by the classVal parameter to the element. If animations +are enabled then an animation will be triggered for the class addition.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + classVal + + + + string + +

    The className value that will be added to the element

    + + +
    + + + + + +
  • + +
  • +

    $removeClass(classVal);

    + +

    +

    Removes the CSS class value specified by the classVal parameter from the element. If +animations are enabled then an animation will be triggered for the class removal.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + classVal + + + + string + +

    The className value that will be removed from the element

    + + +
    + + + + + +
  • + +
  • +

    $updateClass(newClasses, oldClasses);

    + +

    +

    Adds and removes the appropriate CSS class values to the element based on the difference +between the new and old CSS class values (specified as newClasses and oldClasses).

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + newClasses + + + + string + +

    The current CSS className value

    + + +
    + oldClasses + + + + string + +

    The former CSS className value

    + + +
    + + + + + +
  • + +
  • +

    $observe(key, fn);

    + +

    +

    Observes an interpolated attribute.

    +

    The observer function will be invoked once during the next $digest following +compilation. The observer is then invoked whenever the interpolated value +changes.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + key + + + + string + +

    Normalized key. (ie ngAttribute) .

    + + +
    + fn + + + + function(interpolatedValue) + +

    Function that will be called whenever + the interpolated value of the attribute changes. + See the Interpolation + guide for more info.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    function()

    Returns a deregistration function for this observer.

    +
    +
  • + +
  • +

    $set(name, value);

    + +

    +

    Set DOM element attribute value.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + string + +

    Normalized element attribute name of the property to modify. The name is + reverse-translated using the $attr + property to the original name.

    + + +
    + value + + + + string + +

    Value to set the attribute to. The value can be an interpolated string.

    + + +
    + + + + + +
  • +
+ + +

Properties

+
    +
  • +

    $attr

    + + + + + +

    A map of DOM element attribute names to the normalized name. This is +needed to do reverse lookup from normalized name back to actual name.

    +
    + +
  • +
+ + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/type/$rootScope.Scope.html b/1.6.6/docs/partials/api/ng/type/$rootScope.Scope.html new file mode 100644 index 000000000..0e7a796ca --- /dev/null +++ b/1.6.6/docs/partials/api/ng/type/$rootScope.Scope.html @@ -0,0 +1,1319 @@ + Improve this Doc + + + + +  View Source + + + +
+

$rootScope.Scope

+
    + +
  1. + - type in module ng +
  2. +
+
+ + + + + +
+

A root scope can be retrieved using the $rootScope key from the +$injector. Child scopes are created using the +$new() method. (Most scopes are created automatically when +compiled HTML template is executed.) See also the Scopes guide for +an in-depth introduction and usage examples.

+

Inheritance

+

A scope can inherit from a parent scope, as in this example:

+
var parent = $rootScope;
+var child = parent.$new();
+
+parent.salutation = "Hello";
+expect(child.salutation).toEqual('Hello');
+
+child.salutation = "Welcome";
+expect(child.salutation).toEqual('Welcome');
+expect(parent.salutation).toEqual('Hello');
+
+

When interacting with Scope in tests, additional helper methods are available on the +instances of Scope type. See ngMock Scope for additional +details.

+ +
+ + + + +
+ + + + +

Usage

+ +

$rootScope.Scope([providers], [instanceCache]);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ providers + +
(optional)
+
+ Object.<string, function()>= + +

Map of service factory which need to be + provided for the current scope. Defaults to ng.

+ + +
+ instanceCache + +
(optional)
+
+ Object.<string, *>= + +

Provides pre-instantiated services which should + append/override services provided by providers. This is handy + when unit-testing and having the need to override a default + service.

+ + +
+ +
+ +

Returns

+ + + + + +
Object

Newly created scope.

+
+ + +

Methods

+
    +
  • +

    $new(isolate, parent);

    + +

    +

    Creates a new child scope.

    +

    The parent scope will propagate the $digest() event. +The scope can be removed from the scope hierarchy using $destroy().

    +

    $destroy() must be called on a scope when it is +desired for the scope and its child scopes to be permanently detached from the parent and +thus stop participating in model change detection and listener notification by invoking.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + isolate + + + + boolean + +

    If true, then the scope does not prototypically inherit from the + parent scope. The scope is isolated, as it can not see parent scope properties. + When creating widgets, it is useful for the widget to not accidentally read parent + state.

    + + +
    + parent + +
    (optional)
    +
    + Scope + +

    The Scope that will be the $parent + of the newly created scope. Defaults to this scope if not provided. + This is used when creating a transclude scope to correctly place it + in the scope hierarchy while maintaining the correct prototypical + inheritance.

    + +

    (default: this)

    +
    + + + + + + +

    Returns

    + + + + + +
    Object

    The newly created child scope.

    +
    +
  • + +
  • +

    $watch(watchExpression, listener, [objectEquality]);

    + +

    +

    Registers a listener callback to be executed whenever the watchExpression changes.

    +
      +
    • The watchExpression is called on every call to $digest() and should return the value that will be watched. (watchExpression should not change +its value when executed multiple times with the same input because it may be executed multiple +times by $digest(). That is, watchExpression should be +idempotent.)
    • +
    • The listener is called only when the value from the current watchExpression and the +previous call to watchExpression are not equal (with the exception of the initial run, +see below). Inequality is determined according to reference inequality, +strict comparison + via the !== Javascript operator, unless objectEquality == true +(see next point)
    • +
    • When objectEquality == true, inequality of the watchExpression is determined +according to the angular.equals function. To save the value of the object for +later comparison, the angular.copy function is used. This therefore means that +watching complex objects will have adverse memory and performance implications.
    • +
    • This should not be used to watch for changes in objects that are +or contain File objects due to limitations with angular.copy.
    • +
    • The watch listener may change the model, which may trigger other listeners to fire. +This is achieved by rerunning the watchers until no changes are detected. The rerun +iteration limit is 10 to prevent an infinite loop deadlock.
    • +
    +

    If you want to be notified whenever $digest is called, +you can register a watchExpression function with no listener. (Be prepared for +multiple calls to your watchExpression because it will execute multiple times in a +single $digest cycle if a change is detected.)

    +

    After a watcher is registered with the scope, the listener fn is called asynchronously +(via $evalAsync) to initialize the +watcher. In rare cases, this is undesirable because the listener is called when the result +of watchExpression didn't change. To detect this scenario within the listener fn, you +can compare the newVal and oldVal. If these two values are identical (===) then the +listener was called due to initialization.

    +

    Example

    +
    // let's assume that scope was dependency injected as the $rootScope
    +var scope = $rootScope;
    +scope.name = 'misko';
    +scope.counter = 0;
    +
    +expect(scope.counter).toEqual(0);
    +scope.$watch('name', function(newValue, oldValue) {
    +  scope.counter = scope.counter + 1;
    +});
    +expect(scope.counter).toEqual(0);
    +
    +scope.$digest();
    +// the listener is always called during the first $digest loop after it was registered
    +expect(scope.counter).toEqual(1);
    +
    +scope.$digest();
    +// but now it will not be called unless the value changes
    +expect(scope.counter).toEqual(1);
    +
    +scope.name = 'adam';
    +scope.$digest();
    +expect(scope.counter).toEqual(2);
    +
    +
    +
    +// Using a function as a watchExpression
    +var food;
    +scope.foodCounter = 0;
    +expect(scope.foodCounter).toEqual(0);
    +scope.$watch(
    +  // This function returns the value being watched. It is called for each turn of the $digest loop
    +  function() { return food; },
    +  // This is the change listener, called when the value returned from the above function changes
    +  function(newValue, oldValue) {
    +    if ( newValue !== oldValue ) {
    +      // Only increment the counter if the value changed
    +      scope.foodCounter = scope.foodCounter + 1;
    +    }
    +  }
    +);
    +// No digest has been run so the counter will be zero
    +expect(scope.foodCounter).toEqual(0);
    +
    +// Run the digest but since food has not changed count will still be zero
    +scope.$digest();
    +expect(scope.foodCounter).toEqual(0);
    +
    +// Update food and run digest.  Now the counter will increment
    +food = 'cheeseburger';
    +scope.$digest();
    +expect(scope.foodCounter).toEqual(1);
    +
    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + watchExpression + + + + function()string + +

    Expression that is evaluated on each + $digest cycle. A change in the return value triggers + a call to the listener.

    +
      +
    • string: Evaluated as expression
    • +
    • function(scope): called with current scope as a parameter.
    • +
    + + +
    + listener + + + + function(newVal, oldVal, scope) + +

    Callback called whenever the value + of watchExpression changes.

    +
      +
    • newVal contains the current value of the watchExpression
    • +
    • oldVal contains the previous value of the watchExpression
    • +
    • scope refers to the current scope
    • +
    + + +
    + objectEquality + +
    (optional)
    +
    + boolean + +

    Compare for object equality using angular.equals instead of + comparing for reference equality.

    + +

    (default: false)

    +
    + + + + + + +

    Returns

    + + + + + +
    function()

    Returns a deregistration function for this listener.

    +
    +
  • + +
  • +

    $watchGroup(watchExpressions, listener);

    + +

    +

    A variant of $watch() where it watches an array of watchExpressions. +If any one expression in the collection changes the listener is executed.

    +
      +
    • The items in the watchExpressions array are observed via the standard $watch operation. Their return +values are examined for changes on every call to $digest.
    • +
    • The listener is called whenever any expression in the watchExpressions array changes.
    • +
    +

    $watchGroup is more performant than watching each expression individually, and should be +used when the listener does not need to know which expression has changed. +If the listener needs to know which expression has changed, +$watch() or +$watchCollection() should be used.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + watchExpressions + + + + Array.<string|Function(scope)> + +

    Array of expressions that will be individually +watched using $watch()

    + + +
    + listener + + + + function(newValues, oldValues, scope) + +

    Callback called whenever the return value of any + expression in watchExpressions changes + The newValues array contains the current values of the watchExpressions, with the indexes matching + those of watchExpression + and the oldValues array contains the previous values of the watchExpressions, with the indexes matching + those of watchExpression.

    +

    Note that newValues and oldValues reflect the differences in each individual + expression, and not the difference of the values between each call of the listener. + That means the difference between newValues and oldValues cannot be used to determine + which expression has changed / remained stable:

    +
    $scope.$watchGroup(['v1', 'v2'], function(newValues, oldValues) {
    +  console.log(newValues, oldValues);
    +});
    +
    +// newValues, oldValues initially
    +// [undefined, undefined], [undefined, undefined]
    +
    +$scope.v1 = 'a';
    +$scope.v2 = 'a';
    +
    +// ['a', 'a'], [undefined, undefined]
    +
    +$scope.v2 = 'b'
    +
    +// v1 hasn't changed since it became `'a'`, therefore its oldValue is still `undefined`
    +// ['a', 'b'], [undefined, 'a']
    +
    +

    The scope refers to the current scope.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    function()

    Returns a de-registration function for all listeners.

    +
    +
  • + +
  • +

    $watchCollection(obj, listener);

    + +

    +

    Shallow watches the properties of an object and fires whenever any of the properties change +(for arrays, this implies watching the array items; for object maps, this implies watching +the properties). If a change is detected, the listener callback is fired.

    +
      +
    • The obj collection is observed via standard $watch operation and is examined on every +call to $digest() to see if any items have been added, removed, or moved.
    • +
    • The listener is called whenever anything within the obj has changed. Examples include +adding, removing, and moving items belonging to an object or array.
    • +
    +

    Example

    +
    $scope.names = ['igor', 'matias', 'misko', 'james'];
    +$scope.dataCount = 4;
    +
    +$scope.$watchCollection('names', function(newNames, oldNames) {
    +  $scope.dataCount = newNames.length;
    +});
    +
    +expect($scope.dataCount).toEqual(4);
    +$scope.$digest();
    +
    +//still at 4 ... no changes
    +expect($scope.dataCount).toEqual(4);
    +
    +$scope.names.pop();
    +$scope.$digest();
    +
    +//now there's been a change
    +expect($scope.dataCount).toEqual(3);
    +
    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + obj + + + + stringfunction(scope) + +

    Evaluated as expression. The + expression value should evaluate to an object or an array which is observed on each + $digest cycle. Any shallow change within the + collection will trigger a call to the listener.

    + + +
    + listener + + + + function(newCollection, oldCollection, scope) + +

    a callback function called + when a change is detected.

    +
      +
    • The newCollection object is the newly modified data obtained from the obj expression
    • +
    • The oldCollection object is a copy of the former collection data. +Due to performance considerations, theoldCollection value is computed only if the +listener function declares two or more arguments.
    • +
    • The scope argument refers to the current scope.
    • +
    + + +
    + + + + + + +

    Returns

    + + + + + +
    function()

    Returns a de-registration function for this listener. When the + de-registration function is executed, the internal watch operation is terminated.

    +
    +
  • + +
  • +

    $digest();

    + +

    +

    Processes all of the watchers of the current scope and +its children. Because a watcher's listener can change +the model, the $digest() keeps calling the watchers +until no more listeners are firing. This means that it is possible to get into an infinite +loop. This function will throw 'Maximum iteration limit exceeded.' if the number of +iterations exceeds 10.

    +

    Usually, you don't call $digest() directly in +controllers or in +directives. +Instead, you should call $apply() (typically from within +a directive), which will force a $digest().

    +

    If you want to be notified whenever $digest() is called, +you can register a watchExpression function with +$watch() with no listener.

    +

    In unit tests, you may need to call $digest() to simulate the scope life cycle.

    +

    Example

    +
    var scope = ...;
    +scope.name = 'misko';
    +scope.counter = 0;
    +
    +expect(scope.counter).toEqual(0);
    +scope.$watch('name', function(newValue, oldValue) {
    +  scope.counter = scope.counter + 1;
    +});
    +expect(scope.counter).toEqual(0);
    +
    +scope.$digest();
    +// the listener is always called during the first $digest loop after it was registered
    +expect(scope.counter).toEqual(1);
    +
    +scope.$digest();
    +// but now it will not be called unless the value changes
    +expect(scope.counter).toEqual(1);
    +
    +scope.name = 'adam';
    +scope.$digest();
    +expect(scope.counter).toEqual(2);
    +
    +
    + + + + + + + +
  • + +
  • +

    $destroy();

    + +

    +

    Removes the current scope (and all of its children) from the parent scope. Removal implies +that calls to $digest() will no longer +propagate to the current scope and its children. Removal also implies that the current +scope is eligible for garbage collection.

    +

    The $destroy() is usually used by directives such as +ngRepeat for managing the +unrolling of the loop.

    +

    Just before a scope is destroyed, a $destroy event is broadcasted on this scope. +Application code can register a $destroy event handler that will give it a chance to +perform any necessary cleanup.

    +

    Note that, in AngularJS, there is also a $destroy jQuery event, which can be used to +clean up DOM bindings before an element is removed from the DOM.

    +
    + + + + + + + +
  • + +
  • +

    $eval([expression], [locals]);

    + +

    +

    Executes the expression on the current scope and returns the result. Any exceptions in +the expression are propagated (uncaught). This is useful when evaluating Angular +expressions.

    +

    Example

    +
    var scope = ng.$rootScope.Scope();
    +scope.a = 1;
    +scope.b = 2;
    +
    +expect(scope.$eval('a+b')).toEqual(3);
    +expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3);
    +
    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + expression + +
    (optional)
    +
    + stringfunction() + +

    An angular expression to be executed.

    +
      +
    • string: execute using the rules as defined in expression.
    • +
    • function(scope): execute the function with the current scope parameter.
    • +
    + + +
    + locals + +
    (optional)
    +
    + object + +

    Local variables object, useful for overriding values in scope.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    The result of evaluating the expression.

    +
    +
  • + +
  • +

    $evalAsync([expression], [locals]);

    + +

    +

    Executes the expression on the current scope at a later point in time.

    +

    The $evalAsync makes no guarantees as to when the expression will be executed, only +that:

    +
      +
    • it will execute after the function that scheduled the evaluation (preferably before DOM +rendering).
    • +
    • at least one $digest cycle will be performed after +expression execution.
    • +
    +

    Any exceptions from the execution of the expression are forwarded to the +$exceptionHandler service.

    +

    Note: if this function is called outside of a $digest cycle, a new $digest cycle +will be scheduled. However, it is encouraged to always call code that changes the model +from within an $apply call. That includes code evaluated via $evalAsync.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + expression + +
    (optional)
    +
    + stringfunction() + +

    An angular expression to be executed.

    +
      +
    • string: execute using the rules as defined in expression.
    • +
    • function(scope): execute the function with the current scope parameter.
    • +
    + + +
    + locals + +
    (optional)
    +
    + object + +

    Local variables object, useful for overriding values in scope.

    + + +
    + + + + + +
  • + +
  • +

    $apply([exp]);

    + +

    +

    $apply() is used to execute an expression in angular from outside of the angular +framework. (For example from browser DOM events, setTimeout, XHR or third party libraries). +Because we are calling into the angular framework we need to perform proper scope life +cycle of exception handling, +executing watches.

    +

    Life cycle

    +

    Pseudo-Code of $apply()

    +
    function $apply(expr) {
    +  try {
    +    return $eval(expr);
    +  } catch (e) {
    +    $exceptionHandler(e);
    +  } finally {
    +    $root.$digest();
    +  }
    +}
    +
    +

    Scope's $apply() method transitions through the following stages:

    +
      +
    1. The expression is executed using the +$eval() method.
    2. +
    3. Any exceptions from the execution of the expression are forwarded to the +$exceptionHandler service.
    4. +
    5. The watch listeners are fired immediately after the +expression was executed using the $digest() method.
    6. +
    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + exp + +
    (optional)
    +
    + stringfunction() + +

    An angular expression to be executed.

    +
      +
    • string: execute using the rules as defined in expression.
    • +
    • function(scope): execute the function with current scope parameter.
    • +
    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    The result of evaluating the expression.

    +
    +
  • + +
  • +

    $applyAsync([exp]);

    + +

    +

    Schedule the invocation of $apply to occur at a later time. The actual time difference +varies across browsers, but is typically around ~10 milliseconds.

    +

    This can be used to queue up multiple expressions which need to be evaluated in the same +digest.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + exp + +
    (optional)
    +
    + stringfunction() + +

    An angular expression to be executed.

    +
      +
    • string: execute using the rules as defined in expression.
    • +
    • function(scope): execute the function with current scope parameter.
    • +
    + + +
    + + + + + +
  • + +
  • +

    $on(name, listener);

    + +

    +

    Listens on events of a given type. See $emit for +discussion of event life cycle.

    +

    The event listener function format is: function(event, args...). The event object +passed into the listener has the following attributes:

    +
      +
    • targetScope - {Scope}: the scope on which the event was $emit-ed or +$broadcast-ed.
    • +
    • currentScope - {Scope}: the scope that is currently handling the event. Once the +event propagates through the scope hierarchy, this property is set to null.
    • +
    • name - {string}: name of the event.
    • +
    • stopPropagation - {function=}: calling stopPropagation function will cancel +further event propagation (available only for events that were $emit-ed).
    • +
    • preventDefault - {function}: calling preventDefault sets defaultPrevented flag +to true.
    • +
    • defaultPrevented - {boolean}: true if preventDefault was called.
    • +
    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + string + +

    Event name to listen on.

    + + +
    + listener + + + + function(event, ...args) + +

    Function to call when the event is emitted.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    function()

    Returns a deregistration function for this listener.

    +
    +
  • + +
  • +

    $emit(name, args);

    + +

    +

    Dispatches an event name upwards through the scope hierarchy notifying the +registered $rootScope.Scope listeners.

    +

    The event life cycle starts at the scope on which $emit was called. All +listeners listening for name event on this scope get +notified. Afterwards, the event traverses upwards toward the root scope and calls all +registered listeners along the way. The event will stop propagating if one of the listeners +cancels it.

    +

    Any exception emitted from the listeners will be passed +onto the $exceptionHandler service.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + string + +

    Event name to emit.

    + + +
    + args + + + + * + +

    Optional one or more arguments which will be passed onto the event listeners.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    Object

    Event object (see $rootScope.Scope).

    +
    +
  • + +
  • +

    $broadcast(name, args);

    + +

    +

    Dispatches an event name downwards to all child scopes (and their children) notifying the +registered $rootScope.Scope listeners.

    +

    The event life cycle starts at the scope on which $broadcast was called. All +listeners listening for name event on this scope get +notified. Afterwards, the event propagates to all direct and indirect scopes of the current +scope and calls all registered listeners along the way. The event cannot be canceled.

    +

    Any exception emitted from the listeners will be passed +onto the $exceptionHandler service.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + string + +

    Event name to broadcast.

    + + +
    + args + + + + * + +

    Optional one or more arguments which will be passed onto the event listeners.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    Object

    Event object, see $rootScope.Scope

    +
    +
  • +
+ +

Events

+
    +
  • +

    $destroy

    +

    Broadcasted when a scope and its children are being destroyed.

    +

    Note that, in AngularJS, there is also a $destroy jQuery event, which can be used to +clean up DOM bindings before an element is removed from the DOM.

    +
    + + +
    +

    Type:

    +
    broadcast
    +
    +
    +

    Target:

    +
    scope being destroyed +
    +
    +
  • +
+ + +

Properties

+
    +
  • +

    $id

    + + + + + +

    Unique scope ID (monotonically increasing) useful for debugging.

    +
    + +
  • + +
  • +

    $parent

    + + + + + +

    Reference to the parent scope.

    +
    + +
  • + +
  • +

    $root

    + + + + + +

    Reference to the root scope.

    +
    + +
  • +
+ + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/type/ModelOptions.html b/1.6.6/docs/partials/api/ng/type/ModelOptions.html new file mode 100644 index 000000000..b99e64311 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/type/ModelOptions.html @@ -0,0 +1,161 @@ + Improve this Doc + + + + +  View Source + + + +
+

ModelOptions

+
    + +
  1. + - type in module ng +
  2. +
+
+ + + + + +
+

A container for the options set by the ngModelOptions directive

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    getOption(name);

    + +

    +

    Returns the value of the given option

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + string + +

    the name of the option to retrieve

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    the value of the option

    +
    +
  • + +
  • +

    createChild(options);

    + +

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + options + + + + Object + +

    a hash of options for the new child that will override the parent's options

    + + +
    + + + + + + +

    Returns

    + + + + + +
    ModelOptions

    a new ModelOptions object initialized with the given options.

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/type/angular.Module.html b/1.6.6/docs/partials/api/ng/type/angular.Module.html new file mode 100644 index 000000000..e6f4d7b84 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/type/angular.Module.html @@ -0,0 +1,965 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.Module

+
    + +
  1. + - type in module ng +
  2. +
+
+ + + + + +
+

Interface for configuring angular modules.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    info([info]);

    + +

    +

    Read and write custom information about this module. +For example you could put the version of the module in here.

    +
    angular.module('myModule', []).info({ version: '1.0.0' });
    +
    +

    The version could then be read back out by accessing the module elsewhere:

    +
    var version = angular.module('myModule').info().version;
    +
    +

    You can also retrieve this information during runtime via the +$injector.modules property:

    +
    var version = $injector.modules['myModule'].info().version;
    +
    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + info + +
    (optional)
    +
    + Object + +

    Information about the module

    + + +
    + + + + + + +

    Returns

    + + + + + +
    ObjectModule

    The current info object for this module if called as a getter, + or this if called as a setter.

    +
    +
  • + +
  • +

    provider(name, providerType);

    + +

    + + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + string + +

    service name

    + + +
    + providerType + + + + Function + +

    Construction function for creating new instance of the + service.

    + + +
    + + + + + +
  • + +
  • +

    factory(name, providerFunction);

    + +

    + + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + string + +

    service name

    + + +
    + providerFunction + + + + Function + +

    Function for creating new instance of the service.

    + + +
    + + + + + +
  • + +
  • +

    service(name, constructor);

    + +

    + + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + string + +

    service name

    + + +
    + constructor + + + + Function + +

    A constructor function that will be instantiated.

    + + +
    + + + + + +
  • + +
  • +

    value(name, object);

    + +

    + + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + string + +

    service name

    + + +
    + object + + + + * + +

    Service instance object.

    + + +
    + + + + + +
  • + +
  • +

    constant(name, object);

    + +

    +

    Because the constants are fixed, they get applied before other provide methods. +See $provide.constant().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + string + +

    constant name

    + + +
    + object + + + + * + +

    Constant value.

    + + +
    + + + + + +
  • + +
  • +

    decorator(name, decorFn);

    + +

    + + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + string + +

    The name of the service to decorate.

    + + +
    + decorFn + + + + Function + +

    This function will be invoked when the service needs to be + instantiated and should return the decorated service instance.

    + + +
    + + + + + +
  • + +
  • +

    animation(name, animationFactory);

    + +

    +

    NOTE: animations take effect only if the ngAnimate module is loaded.

    +

    Defines an animation hook that can be later used with +$animate service and directives that use this service.

    +
    module.animation('.animation-name', function($inject1, $inject2) {
    +  return {
    +    eventName : function(element, done) {
    +      //code to run the animation
    +      //once complete, then run done()
    +      return function cancellationFunction(element) {
    +        //code to cancel the animation
    +      }
    +    }
    +  }
    +})
    +
    +

    See $animateProvider.register() and +ngAnimate module for more information.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + string + +

    animation name

    + + +
    + animationFactory + + + + Function + +

    Factory function for creating new instance of an + animation.

    + + +
    + + + + + +
  • + +
  • +

    filter(name, filterFactory);

    + +

    +

    See $filterProvider.register().

    +
    +Note: Filter names must be valid angular Expressions identifiers, such as uppercase or orderBy. +Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace +your filters, then you can use capitalization (myappSubsectionFilterx) or underscores +(myapp_subsection_filterx). +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + string + +

    Filter name - this must be a valid angular expression identifier

    + + +
    + filterFactory + + + + Function + +

    Factory function for creating new instance of filter.

    + + +
    + + + + + +
  • + +
  • +

    controller(name, constructor);

    + +

    + + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + stringObject + +

    Controller name, or an object map of controllers where the + keys are the names and the values are the constructors.

    + + +
    + constructor + + + + Function + +

    Controller constructor function.

    + + +
    + + + + + +
  • + +
  • +

    directive(name, directiveFactory);

    + +

    + + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + stringObject + +

    Directive name, or an object map of directives where the + keys are the names and the values are the factories.

    + + +
    + directiveFactory + + + + Function + +

    Factory function for creating new instance of +directives.

    + + +
    + + + + + +
  • + +
  • +

    component(name, options);

    + +

    + + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + name + + + + string + +

    Name of the component in camel-case (i.e. myComp which will match as my-comp)

    + + +
    + options + + + + Object + +

    Component definition object (a simplified + directive definition object)

    + + +
    + + + + + +
  • + +
  • +

    config(configFn);

    + +

    +

    Use this method to register work which needs to be performed on module loading. +For more about how to configure services, see +Provider Recipe.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + configFn + + + + Function + +

    Execute this function on module load. Useful for service + configuration.

    + + +
    + + + + + +
  • + +
  • +

    run(initializationFn);

    + +

    +

    Use this method to register work which should be performed when the injector is done +loading all modules.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + initializationFn + + + + Function + +

    Execute this function after injector creation. + Useful for application initialization.

    + + +
    + + + + + +
  • +
+ + +

Properties

+
    +
  • +

    requires

    + + + + + +

    Holds the list of modules which the injector will load before the current module is +loaded.

    +
    + +
  • + +
  • +

    name

    + + + + + +

    Name of the module.

    +
    + +
  • +
+ + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/type/form.FormController.html b/1.6.6/docs/partials/api/ng/type/form.FormController.html new file mode 100644 index 000000000..39686e639 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/type/form.FormController.html @@ -0,0 +1,475 @@ + Improve this Doc + + + + +  View Source + + + +
+

form.FormController

+
    + +
  1. + - type in module ng +
  2. +
+
+ + + + + +
+

FormController keeps track of all its controls and nested forms as well as the state of them, +such as being valid/invalid or dirty/pristine.

+

Each form directive creates an instance +of FormController.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    $rollbackViewValue();

    + +

    +

    Rollback all form controls pending updates to the $modelValue.

    +

    Updates may be pending by a debounced event or because the input is waiting for a some future +event defined in ng-model-options. This method is typically needed by the reset button of +a form that uses ng-model-options to pend updates.

    +
    + + + + + + + +
  • + +
  • +

    $commitViewValue();

    + +

    +

    Commit all form controls pending updates to the $modelValue.

    +

    Updates may be pending by a debounced event or because the input is waiting for a some future +event defined in ng-model-options. This method is rarely needed as NgModelController +usually handles calling this in response to input events.

    +
    + + + + + + + +
  • + +
  • +

    $addControl(control);

    + +

    +

    Register a control with the form. Input elements using ngModelController do this automatically +when they are linked.

    +

    Note that the current state of the control will not be reflected on the new parent form. This +is not an issue with normal use, as freshly compiled and linked controls are in a $pristine +state.

    +

    However, if the method is used programmatically, for example by adding dynamically created controls, +or controls that have been previously removed without destroying their corresponding DOM element, +it's the developers responsibility to make sure the current state propagates to the parent form.

    +

    For example, if an input control is added that is already $dirty and has $error properties, +calling $setDirty() and $validate() afterwards will propagate the state to the parent form.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + control + + + + object + +

    control object, either a form.FormController or an +ngModel.NgModelController

    + + +
    + + + + + +
  • + +
  • +

    $removeControl(control);

    + +

    +

    Deregister a control from the form.

    +

    Input elements using ngModelController do this automatically when they are destroyed.

    +

    Note that only the removed control's validation state ($errorsetc.) will be removed from the +form. $dirty, $submitted states will not be changed, because the expected behavior can be +different from case to case. For example, removing the only $dirty control from a form may or +may not mean that the form is still $dirty.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + control + + + + object + +

    control object, either a form.FormController or an +ngModel.NgModelController

    + + +
    + + + + + +
  • + +
  • +

    $setDirty();

    + +

    +

    Sets the form to a dirty state.

    +

    This method can be called to add the 'ng-dirty' class and set the form to a dirty +state (ng-dirty class). This method will also propagate to parent forms.

    +
    + + + + + + + +
  • + +
  • +

    $setPristine();

    + +

    +

    Sets the form to its pristine state.

    +

    This method sets the form's $pristine state to true, the $dirty state to false, removes +the ng-dirty class and adds the ng-pristine class. Additionally, it sets the $submitted +state to false.

    +

    This method will also propagate to all the controls contained in this form.

    +

    Setting a form back to a pristine state is often useful when we want to 'reuse' a form after +saving or resetting it.

    +
    + + + + + + + +
  • + +
  • +

    $setUntouched();

    + +

    +

    Sets the form to its untouched state.

    +

    This method can be called to remove the 'ng-touched' class and set the form controls to their +untouched state (ng-untouched class).

    +

    Setting a form controls back to their untouched state is often useful when setting the form +back to its pristine state.

    +
    + + + + + + + +
  • + +
  • +

    $setSubmitted();

    + +

    +

    Sets the form to its submitted state.

    +
    + + + + + + + +
  • + +
  • +

    $setValidity(validationErrorKey, isValid, controller);

    + +

    +

    Change the validity state of the form, and notify the parent form (if any).

    +

    Application developers will rarely need to call this method directly. It is used internally, by +NgModelController.$setValidity(), to propagate a +control's validity state to the parent FormController.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + validationErrorKey + + + + string + +

    Name of the validator. The validationErrorKey will be + assigned to either $error[validationErrorKey] or $pending[validationErrorKey] (for + unfulfilled $asyncValidators), so that it is available for data-binding. The + validationErrorKey should be in camelCase and will get converted into dash-case for + class name. Example: myError will result in ng-valid-my-error and + ng-invalid-my-error classes and can be bound to as {{ someForm.$error.myError }}.

    + + +
    + isValid + + + + boolean + +

    Whether the current state is valid (true), invalid (false), pending + (undefined), or skipped (null). Pending is used for unfulfilled $asyncValidators. + Skipped is used by AngularJS when validators do not run because of parse errors and when + $asyncValidators do not run because any of the $validators failed.

    + + +
    + controller + + + + NgModelControllerFormController + +

    The controller whose validity state is + triggering the change.

    + + +
    + + + + + +
  • +
+ + +

Properties

+
    +
  • +

    $pristine

    + + + + + +
    boolean

    True if user has not interacted with the form yet.

    +
    + +
  • + +
  • +

    $dirty

    + + + + + +
    boolean

    True if user has already interacted with the form.

    +
    + +
  • + +
  • +

    $valid

    + + + + + +
    boolean

    True if all of the containing forms and controls are valid.

    +
    + +
  • + +
  • +

    $invalid

    + + + + + +
    boolean

    True if at least one containing control or form is invalid.

    +
    + +
  • + +
  • +

    $submitted

    + + + + + +
    boolean

    True if user has submitted the form even if its invalid.

    +
    + +
  • + +
  • +

    $pending

    + + + + + +
    Object

    An object hash, containing references to controls or forms with + pending validators, where:

    +
      +
    • keys are validations tokens (error names).
    • +
    • values are arrays of controls or forms that have a pending validator for the given error name.
    • +
    +

    See $error for a list of built-in validation tokens.

    +
    + +
  • + +
  • +

    $error

    + + + + + +
    Object

    An object hash, containing references to controls or forms with failing + validators, where:

    +
      +
    • keys are validation tokens (error names),
    • +
    • values are arrays of controls or forms that have a failing validator for the given error name.

      +

      Built-in validation tokens:

      +
    • +
    • email
    • +
    • max
    • +
    • maxlength
    • +
    • min
    • +
    • minlength
    • +
    • number
    • +
    • pattern
    • +
    • required
    • +
    • url
    • +
    • date
    • +
    • datetimelocal
    • +
    • time
    • +
    • week
    • +
    • month
    • +
    +
    + +
  • +
+ + + + +
+ + diff --git a/1.6.6/docs/partials/api/ng/type/ngModel.NgModelController.html b/1.6.6/docs/partials/api/ng/type/ngModel.NgModelController.html new file mode 100644 index 000000000..cef321234 --- /dev/null +++ b/1.6.6/docs/partials/api/ng/type/ngModel.NgModelController.html @@ -0,0 +1,870 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngModel.NgModelController

+
    + +
  1. + - type in module ng +
  2. +
+
+ + + + + +
+

NgModelController provides API for the ngModel directive. +The controller contains services for data-binding, validation, CSS updates, and value formatting +and parsing. It purposefully does not contain any logic which deals with DOM rendering or +listening to DOM events. +Such DOM related logic should be provided by other directives which make use of +NgModelController for data-binding to control elements. +Angular provides this DOM logic for most input elements. +At the end of this page you can find a custom control example that uses ngModelController to bind to contenteditable elements.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    $render();

    + +

    +

    Called when the view needs to be updated. It is expected that the user of the ng-model +directive will implement this method.

    +

    The $render() method is invoked in the following situations:

    +
      +
    • $rollbackViewValue() is called. If we are rolling back the view value to the last +committed value then $render() is called to update the input control.
    • +
    • The value referenced by ng-model is changed programmatically and both the $modelValue and +the $viewValue are different from last time.
    • +
    +

    Since ng-model does not do a deep watch, $render() is only invoked if the values of +$modelValue and $viewValue are actually different from their previous values. If $modelValue +or $viewValue are objects (rather than a string or number) then $render() will not be +invoked if you only change a property on the objects.

    +
    + + + + + + + +
  • + +
  • +

    $isEmpty(value);

    + +

    +

    This is called when we need to determine if the value of an input is empty.

    +

    For instance, the required directive does this to work out if the input has data or not.

    +

    The default $isEmpty function checks whether the value is undefined, '', null or NaN.

    +

    You can override this for input directives whose concept of being empty is different from the +default. The checkboxInputType directive does this because in its case a value of false +implies empty.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + value + + + + * + +

    The value of the input to check for emptiness.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    boolean

    True if value is "empty".

    +
    +
  • + +
  • +

    $setPristine();

    + +

    +

    Sets the control to its pristine state.

    +

    This method can be called to remove the ng-dirty class and set the control to its pristine +state (ng-pristine class). A model is considered to be pristine when the control +has not been changed from when first compiled.

    +
    + + + + + + + +
  • + +
  • +

    $setDirty();

    + +

    +

    Sets the control to its dirty state.

    +

    This method can be called to remove the ng-pristine class and set the control to its dirty +state (ng-dirty class). A model is considered to be dirty when the control has been changed +from when first compiled.

    +
    + + + + + + + +
  • + +
  • +

    $setUntouched();

    + +

    +

    Sets the control to its untouched state.

    +

    This method can be called to remove the ng-touched class and set the control to its +untouched state (ng-untouched class). Upon compilation, a model is set as untouched +by default, however this function can be used to restore that state if the model has +already been touched by the user.

    +
    + + + + + + + +
  • + +
  • +

    $setTouched();

    + +

    +

    Sets the control to its touched state.

    +

    This method can be called to remove the ng-untouched class and set the control to its +touched state (ng-touched class). A model is considered to be touched when the user has +first focused the control element and then shifted focus away from the control (blur event).

    +
    + + + + + + + +
  • + +
  • +

    $rollbackViewValue();

    + +

    +

    Cancel an update and reset the input element's value to prevent an update to the $modelValue, +which may be caused by a pending debounced event or because the input is waiting for some +future event.

    +

    If you have an input that uses ng-model-options to set up debounced updates or updates that +depend on special events such as blur, there can be a period when the $viewValue is out of +sync with the ngModel's $modelValue.

    +

    In this case, you can use $rollbackViewValue() to manually cancel the debounced / future update +and reset the input to the last committed view value.

    +

    It is also possible that you run into difficulties if you try to update the ngModel's $modelValue +programmatically before these debounced/future events have resolved/occurred, because Angular's +dirty checking mechanism is not able to tell whether the model has actually changed or not.

    +

    The $rollbackViewValue() method should be called before programmatically changing the model of an +input which may have such events pending. This is important in order to make sure that the +input field will be updated with the new model value and any pending operations are cancelled.

    +

    + +

    + + +
    + + +
    +
    angular.module('cancel-update-example', [])
    
    .controller('CancelUpdateController', ['$scope', function($scope) {
      $scope.model = {value1: '', value2: ''};
    
      $scope.setEmpty = function(e, value, rollback) {
        if (e.keyCode === 27) {
          e.preventDefault();
          if (rollback) {
            $scope.myForm[value].$rollbackViewValue();
          }
          $scope.model[value] = '';
        }
      };
    }]);
    +
    + +
    +
    <div ng-controller="CancelUpdateController">
      <p>Both of these inputs are only updated if they are blurred. Hitting escape should
      empty them. Follow these steps and observe the difference:</p>
      <ol>
        <li>Type something in the input. You will see that the model is not yet updated</li>
        <li>Press the Escape key.
          <ol>
            <li> In the first example, nothing happens, because the model is already '', and no
            update is detected. If you blur the input, the model will be set to the current view.
            </li>
            <li> In the second example, the pending update is cancelled, and the input is set back
            to the last committed view value (''). Blurring the input does nothing.
            </li>
          </ol>
        </li>
      </ol>
    
      <form name="myForm" ng-model-options="{ updateOn: 'blur' }">
        <div>
          <p id="inputDescription1">Without $rollbackViewValue():</p>
          <input name="value1" aria-describedby="inputDescription1" ng-model="model.value1"
                 ng-keydown="setEmpty($event, 'value1')">
          value1: "{{ model.value1 }}"
        </div>
    
        <div>
          <p id="inputDescription2">With $rollbackViewValue():</p>
          <input name="value2" aria-describedby="inputDescription2" ng-model="model.value2"
                 ng-keydown="setEmpty($event, 'value2', true)">
          value2: "{{ model.value2 }}"
        </div>
      </form>
    </div>
    +
    + +
    +
    div {
      display: table-cell;
    }
    div:nth-child(1) {
      padding-right: 30px;
    }
    +
    + + + +
    +
    + + +

    +
    + + + + + + + +
  • + +
  • +

    $validate();

    + +

    +

    Runs each of the registered validators (first synchronous validators and then +asynchronous validators). +If the validity changes to invalid, the model will be set to undefined, +unless ngModelOptions.allowInvalid is true. +If the validity changes to valid, it will set the model to the last available valid +$modelValue, i.e. either the last parsed value or the last value set from the scope.

    +
    + + + + + + + +
  • + +
  • +

    $commitViewValue();

    + +

    +

    Commit a pending update to the $modelValue.

    +

    Updates may be pending by a debounced event or because the input is waiting for a some future +event defined in ng-model-options. this method is rarely needed as NgModelController +usually handles calling this in response to input events.

    +
    + + + + + + + +
  • + +
  • +

    $setViewValue(value, trigger);

    + +

    +

    Update the view value.

    +

    This method should be called when a control wants to change the view value; typically, +this is done from within a DOM event handler. For example, the input +directive calls it when the value of the input changes and select +calls it when an option is selected.

    +

    When $setViewValue is called, the new value will be staged for committing through the $parsers +and $validators pipelines. If there are no special ngModelOptions specified then the staged +value is sent directly for processing through the $parsers pipeline. After this, the $validators and +$asyncValidators are called and the value is applied to $modelValue. +Finally, the value is set to the expression specified in the ng-model attribute and +all the registered change listeners, in the $viewChangeListeners list are called.

    +

    In case the ngModelOptions directive is used with updateOn +and the default trigger is not listed, all those actions will remain pending until one of the +updateOn events is triggered on the DOM element. +All these actions will be debounced if the ngModelOptions +directive is used with a custom debounce for this particular event. +Note that a $digest is only triggered once the updateOn events are fired, or if debounce +is specified, once the timer runs out.

    +

    When used with standard inputs, the view value will always be a string (which is in some cases +parsed into another type, such as a Date object for input[date].) +However, custom controls might also pass objects to this method. In this case, we should make +a copy of the object before passing it to $setViewValue. This is because ngModel does not +perform a deep watch of objects, it only looks for a change of identity. If you only change +the property of the object then ngModel will not realize that the object has changed and +will not invoke the $parsers and $validators pipelines. For this reason, you should +not change properties of the copy once it has been passed to $setViewValue. +Otherwise you may cause the model value on the scope to change incorrectly.

    +
    +In any case, the value passed to the method should always reflect the current value +of the control. For example, if you are calling $setViewValue for an input element, +you should pass the input DOM value. Otherwise, the control and the scope model become +out of sync. It's also important to note that $setViewValue does not call $render or change +the control's DOM value in any way. If we want to change the control's DOM value +programmatically, we should update the ngModel scope expression. Its new value will be +picked up by the model controller, which will run it through the $formatters, $render it +to update the DOM, and finally call $validate on it. +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + value + + + + * + +

    value from the view.

    + + +
    + trigger + + + + string + +

    Event that triggered the update.

    + + +
    + + + + + +
  • + +
  • +

    $overrideModelOptions(options);

    + +

    +

    Override the current model options settings programmatically.

    +

    The previous ModelOptions value will not be modified. Instead, a +new ModelOptions object will inherit from the previous one overriding +or inheriting settings that are defined in the given parameter.

    +

    See ngModelOptions for information about what options can be specified +and how model option inheritance works.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + options + + + + Object + +

    a hash of settings to override the previous options

    + + +
    + + + + + +
  • + +
  • +

    $setValidity(validationErrorKey, isValid);

    + +

    +

    Change the validity state, and notify the form.

    +

    This method can be called within $parsers/$formatters or a custom validation implementation. +However, in most cases it should be sufficient to use the ngModel.$validators and +ngModel.$asyncValidators collections which will call $setValidity automatically.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + validationErrorKey + + + + string + +

    Name of the validator. The validationErrorKey will be assigned + to either $error[validationErrorKey] or $pending[validationErrorKey] + (for unfulfilled $asyncValidators), so that it is available for data-binding. + The validationErrorKey should be in camelCase and will get converted into dash-case + for class name. Example: myError will result in ng-valid-my-error and ng-invalid-my-error + classes and can be bound to as {{ someForm.someControl.$error.myError }}.

    + + +
    + isValid + + + + boolean + +

    Whether the current state is valid (true), invalid (false), pending (undefined), + or skipped (null). Pending is used for unfulfilled $asyncValidators. + Skipped is used by Angular when validators do not run because of parse errors and + when $asyncValidators do not run because any of the $validators failed.

    + + +
    + + + + + +
  • +
+ + +

Properties

+
    +
  • +

    $viewValue

    + + + + + +
    *

    The actual value from the control's view. For input elements, this is a +String. See ngModel.NgModelController for information about when the $viewValue +is set.

    +
    + +
  • + +
  • +

    $modelValue

    + + + + + +
    *

    The value in the model that the control is bound to.

    +
    + +
  • + +
  • +

    $parsers

    + + + + + +
    Array.<Function>

    Array of functions to execute, as a pipeline, whenever + the control updates the ngModelController with a new $viewValue from the DOM, usually via user input. + See $setViewValue() for a detailed lifecycle explanation. + Note that the $parsers are not called when the bound ngModel expression changes programmatically.

    +

    The functions are called in array order, each passing + its return value through to the next. The last return value is forwarded to the + $validators collection.

    +

    Parsers are used to sanitize / convert the $viewValue.

    +

    Returning undefined from a parser means a parse error occurred. In that case, + no $validators will run and the ngModel + will be set to undefined unless ngModelOptions.allowInvalid + is set to true. The parse error is stored in ngModel.$error.parse.

    +

    This simple example shows a parser that would convert text input value to lowercase:

    +
    function parse(value) {
    +  if (value) {
    +    return value.toLowerCase();
    +  }
    +}
    +ngModelController.$parsers.push(parse);
    +
    +
    + +
  • + +
  • +

    $formatters

    + + + + + +
    Array.<Function>

    Array of functions to execute, as a pipeline, whenever + the bound ngModel expression changes programmatically. The $formatters are not called when the + value of the control is changed by user interaction.

    +

    Formatters are used to format / convert the $modelValue for display in the control.

    +

    The functions are called in reverse array order, each passing the value through to the + next. The last return value is used as the actual DOM value.

    +

    This simple example shows a formatter that would convert the model value to uppercase:

    +
    function format(value) {
    +  if (value) {
    +    return value.toUpperCase();
    +  }
    +}
    +ngModel.$formatters.push(format);
    +
    +
    + +
  • + +
  • +

    $validators

    + + + + + +
    Object.<string, function>

    A collection of validators that are applied + whenever the model value changes. The key value within the object refers to the name of the + validator while the function refers to the validation operation. The validation operation is + provided with the model value as an argument and must return a true or false value depending + on the response of that validation.

    +
    ngModel.$validators.validCharacters = function(modelValue, viewValue) {
    +  var value = modelValue || viewValue;
    +  return /[0-9]+/.test(value) &&
    +         /[a-z]+/.test(value) &&
    +         /[A-Z]+/.test(value) &&
    +         /\W+/.test(value);
    +};
    +
    +
    + +
  • + +
  • +

    $asyncValidators

    + + + + + +
    Object.<string, function>

    A collection of validations that are expected to + perform an asynchronous validation (e.g. a HTTP request). The validation function that is provided + is expected to return a promise when it is run during the model validation process. Once the promise + is delivered then the validation status will be set to true when fulfilled and false when rejected. + When the asynchronous validators are triggered, each of the validators will run in parallel and the model + value will only be updated once all validators have been fulfilled. As long as an asynchronous validator + is unfulfilled, its key will be added to the controllers $pending property. Also, all asynchronous validators + will only run once all synchronous validators have passed.

    +

    Please note that if $http is used then it is important that the server returns a success HTTP response code +in order to fulfill the validation and a status level of 4xx in order to reject the validation.

    +
    ngModel.$asyncValidators.uniqueUsername = function(modelValue, viewValue) {
    +  var value = modelValue || viewValue;
    +
    +  // Lookup user by username
    +  return $http.get('/api/users/' + value).
    +     then(function resolved() {
    +       //username exists, this means validation fails
    +       return $q.reject('exists');
    +     }, function rejected() {
    +       //username does not exist, therefore this validation passes
    +       return true;
    +     });
    +};
    +
    +
    + +
  • + +
  • +

    $viewChangeListeners

    + + + + + +
    Array.<Function>

    Array of functions to execute whenever the + view value has changed. It is called with no arguments, and its return value is ignored. + This can be used in place of additional $watches against the model value.

    +
    + +
  • + +
  • +

    $error

    + + + + + +
    Object

    An object hash with all failing validator ids as keys.

    +
    + +
  • + +
  • +

    $pending

    + + + + + +
    Object

    An object hash with all pending validator ids as keys.

    +
    + +
  • + +
  • +

    $untouched

    + + + + + +
    boolean

    True if control has not lost focus yet.

    +
    + +
  • + +
  • +

    $touched

    + + + + + +
    boolean

    True if control has lost focus.

    +
    + +
  • + +
  • +

    $pristine

    + + + + + +
    boolean

    True if user has not interacted with the control yet.

    +
    + +
  • + +
  • +

    $dirty

    + + + + + +
    boolean

    True if user has already interacted with the control.

    +
    + +
  • + +
  • +

    $valid

    + + + + + +
    boolean

    True if there is no error.

    +
    + +
  • + +
  • +

    $invalid

    + + + + + +
    boolean

    True if at least one error on the control.

    +
    + +
  • + +
  • +

    $name

    + + + + + +
    string

    The name attribute of the control.

    +
    + +
  • +
+ + + + +

Examples

Custom Control Example

+

This example shows how to use NgModelController with a custom control to achieve +data-binding. Notice how different directives (contenteditable, ng-model, and required) +collaborate together to achieve the desired result.

+

contenteditable is an HTML5 attribute, which tells the browser to let the element +contents be edited in place by the user.

+

We are using the $sce service here and include the $sanitize +module to automatically remove "bad" content like inline event listener (e.g. <span onclick="...">). +However, as we are using $sce the model can still decide to provide unsafe content if it marks +that content using the $sce service.

+

+ +

+ + +
+ + +
+
[contenteditable] {
  border: 1px solid black;
  background-color: white;
  min-height: 20px;
}

.ng-invalid {
  border: 1px solid red;
}
+
+ +
+
angular.module('customControl', ['ngSanitize']).
directive('contenteditable', ['$sce', function($sce) {
  return {
    restrict: 'A', // only activate on element attribute
    require: '?ngModel', // get a hold of NgModelController
    link: function(scope, element, attrs, ngModel) {
      if (!ngModel) return; // do nothing if no ng-model

      // Specify how UI should be updated
      ngModel.$render = function() {
        element.html($sce.getTrustedHtml(ngModel.$viewValue || ''));
      };

      // Listen for change events to enable binding
      element.on('blur keyup change', function() {
        scope.$evalAsync(read);
      });
      read(); // initialize

      // Write data to the model
      function read() {
        var html = element.html();
        // When we clear the content editable the browser leaves a <br> behind
        // If strip-br attribute is provided then we strip this out
        if (attrs.stripBr && html === '<br>') {
          html = '';
        }
        ngModel.$setViewValue(html);
      }
    }
  };
}]);
+
+ +
+
<form name="myForm">
 <div contenteditable
      name="myWidget" ng-model="userContent"
      strip-br="true"
      required>Change me!</div>
  <span ng-show="myForm.myWidget.$error.required">Required!</span>
 <hr>
 <textarea ng-model="userContent" aria-label="Dynamic textarea"></textarea>
</form>
+
+ +
+
it('should data-bind and become invalid', function() {
  if (browser.params.browser === 'safari' || browser.params.browser === 'firefox') {
    // SafariDriver can't handle contenteditable
    // and Firefox driver can't clear contenteditables very well
    return;
  }
  var contentEditable = element(by.css('[contenteditable]'));
  var content = 'Change me!';

  expect(contentEditable.getText()).toEqual(content);

  contentEditable.clear();
  contentEditable.sendKeys(protractor.Key.BACK_SPACE);
  expect(contentEditable.getText()).toEqual('');
  expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/);
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ng/type/select.SelectController.html b/1.6.6/docs/partials/api/ng/type/select.SelectController.html new file mode 100644 index 000000000..4460909fa --- /dev/null +++ b/1.6.6/docs/partials/api/ng/type/select.SelectController.html @@ -0,0 +1,173 @@ + Improve this Doc + + + + +  View Source + + + +
+

select.SelectController

+
    + +
  1. + - type in module ng +
  2. +
+
+ + + + + +
+

The controller for the select directive. The controller exposes +a few utility methods that can be used to augment the behavior of a regular or an +ngOptions select element.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    $hasEmptyOption();

    + +

    +

    Returns true if the select element currently has an empty option +element, i.e. an option that signifies that the select is empty / the selection is null.

    +
    + + + + + + + +
  • + +
  • +

    $isUnknownOptionSelected();

    + +

    +

    Returns true if the select element's unknown option is selected. The unknown option is added +and automatically selected whenever the select model doesn't match any option.

    +
    + + + + + + + +
  • + +
  • +

    $isEmptyOptionSelected();

    + +

    +

    Returns true if the select element has an empty option and this empty option is currently +selected. Returns false if the select element has no empty option or it is not selected.

    +
    + + + + + + + +
  • +
+ + + + + + +

Examples

Set a custom error when the unknown option is selected

+

This example sets a custom error "unknownValue" on the ngModelController +when the select element's unknown option is selected, i.e. when the model is set to a value +that is not matched by any option.

+

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <form name="myForm">
    <label for="testSelect"> Single select: </label><br>
    <select name="testSelect" ng-model="selected" unknown-value-error>
      <option value="option-1">Option 1</option>
      <option value="option-2">Option 2</option>
    </select><br>
    <span ng-if="myForm.testSelect.$error.unknownValue">Error: The current model doesn't match any option</span>

    <button ng-click="forceUnknownOption()">Force unknown option</button><br>
  </form>
</div>
+
+ +
+
angular.module('staticSelect', [])
 .controller('ExampleController', ['$scope', function($scope) {
   $scope.selected = null;

   $scope.forceUnknownOption = function() {
     $scope.selected = 'nonsense';
   };
}])
.directive('unknownValueError', function() {
  return {
    require: ['ngModel', 'select'],
    link: function(scope, element, attrs, ctrls) {
      var ngModelCtrl = ctrls[0];
      var selectCtrl = ctrls[1];

      ngModelCtrl.$validators.unknownValue = function(modelValue, viewValue) {
        if (selectCtrl.$isUnknownOptionSelected()) {
          return false;
        }

        return true;
      };
    }

  };
});
+
+ + + +
+
+ + +

+

Set the "required" error when the unknown option is selected.

+

By default, the "required" error on the ngModelController is only set on a required select +when the empty option is selected. This example adds a custom directive that also sets the +error when the unknown option is selected.

+

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <form name="myForm">
    <label for="testSelect"> Select: </label><br>
    <select name="testSelect" ng-model="selected" unknown-value-required>
      <option value="option-1">Option 1</option>
      <option value="option-2">Option 2</option>
    </select><br>
    <span ng-if="myForm.testSelect.$error.required">Error: Please select a value</span><br>

    <button ng-click="forceUnknownOption()">Force unknown option</button><br>
  </form>
</div>
+
+ +
+
angular.module('staticSelect', [])
 .controller('ExampleController', ['$scope', function($scope) {
   $scope.selected = null;

   $scope.forceUnknownOption = function() {
     $scope.selected = 'nonsense';
   };
}])
.directive('unknownValueRequired', function() {
  return {
    priority: 1, // This directive must run after the required directive has added its validator
    require: ['ngModel', 'select'],
    link: function(scope, element, attrs, ctrls) {
      var ngModelCtrl = ctrls[0];
      var selectCtrl = ctrls[1];

      var originalRequiredValidator = ngModelCtrl.$validators.required;

      ngModelCtrl.$validators.required = function() {
        if (attrs.required && selectCtrl.$isUnknownOptionSelected()) {
          return false;
        }

        return originalRequiredValidator.apply(this, arguments);
      };
    }
  };
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ngAnimate.html b/1.6.6/docs/partials/api/ngAnimate.html new file mode 100644 index 000000000..98d70d1e2 --- /dev/null +++ b/1.6.6/docs/partials/api/ngAnimate.html @@ -0,0 +1,684 @@ + Improve this Doc + + +

+ ngAnimate +

+ + + +

Installation

+ + +

First, get the file:

+
    +
  • + Google CDN e.g. +
    "//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-animate.js"
    +
  • +
  • + NPM e.g. +
    npm install --save angular-animate@X.Y.Z
    + or +
    yarn add angular-animate@X.Y.Z
    +
  • +
  • + Bower e.g. +
    bower install angular-animate#X.Y.Z
    +
  • +
  • + code.angularjs.org + (discouraged for production use) e.g. +
    "//code.angularjs.org/X.Y.Z/angular-animate.js"
    +
  • +
+

where X.Y.Z is the AngularJS version you are running.

+ +

Then, include angular-animate.js in your HTML:

+ +
<script src="path/to/angular.js"></script>
<script src="path/to/angular-animate.js"></script>
+ +

Finally, load the module in your application by adding it as a dependent module:

+
angular.module('app', ['ngAnimate']);
+ +

With that you're ready to get started!

+ + +

The ngAnimate module provides support for CSS-based animations (keyframes and transitions) as well as JavaScript-based animations via +callback hooks. Animations are not enabled by default, however, by including ngAnimate the animation hooks are enabled for an Angular app.

+
+ +

Usage

+

Simply put, there are two ways to make use of animations when ngAnimate is used: by using CSS and JavaScript. The former works purely based +using CSS (by using matching CSS selectors/styles) and the latter triggers animations that are registered via module.animation(). For +both CSS and JS animations the sole requirement is to have a matching CSS class that exists both in the registered animation and within +the HTML element that the animation will be triggered on.

+

Directive Support

+

The following directives are "animation aware":

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectiveSupported Animations
ngRepeatenter, leave and move
ngViewenter and leave
ngIncludeenter and leave
ngSwitchenter and leave
ngIfenter and leave
ngClassadd and remove (the CSS class(es) present)
ngShow & ngHideadd and remove (the ng-hide class value)
form & ngModeladd and remove (dirty, pristine, valid, invalid & all other validations)
ngMessagesadd and remove (ng-active & ng-inactive)
ngMessageenter and leave
+

(More information can be found by visiting each the documentation associated with each directive.)

+

CSS-based Animations

+

CSS-based animations with ngAnimate are unique since they require no JavaScript code at all. By using a CSS class that we reference between our HTML +and CSS code we can create an animation that will be picked up by Angular when an underlying directive performs an operation.

+

The example below shows how an enter animation can be made possible on an element using ng-if:

+
<div ng-if="bool" class="fade">
+   Fade me in out
+</div>
+<button ng-click="bool=true">Fade In!</button>
+<button ng-click="bool=false">Fade Out!</button>
+
+

Notice the CSS class fade? We can now create the CSS transition code that references this class:

+
/* The starting CSS styles for the enter animation */
+.fade.ng-enter {
+  transition:0.5s linear all;
+  opacity:0;
+}
+
+/* The finishing CSS styles for the enter animation */
+.fade.ng-enter.ng-enter-active {
+  opacity:1;
+}
+
+

The key thing to remember here is that, depending on the animation event (which each of the directives above trigger depending on what's going on) two +generated CSS classes will be applied to the element; in the example above we have .ng-enter and .ng-enter-active. For CSS transitions, the transition +code must be defined within the starting CSS class (in this case .ng-enter). The destination class is what the transition will animate towards.

+

If for example we wanted to create animations for leave and move (ngRepeat triggers move) then we can do so using the same CSS naming conventions:

+
/* now the element will fade out before it is removed from the DOM */
+.fade.ng-leave {
+  transition:0.5s linear all;
+  opacity:1;
+}
+.fade.ng-leave.ng-leave-active {
+  opacity:0;
+}
+
+

We can also make use of CSS Keyframes by referencing the keyframe animation within the starting CSS class:

+
/* there is no need to define anything inside of the destination
+CSS class since the keyframe will take charge of the animation */
+.fade.ng-leave {
+  animation: my_fade_animation 0.5s linear;
+  -webkit-animation: my_fade_animation 0.5s linear;
+}
+
+@keyframes my_fade_animation {
+  from { opacity:1; }
+  to { opacity:0; }
+}
+
+@-webkit-keyframes my_fade_animation {
+  from { opacity:1; }
+  to { opacity:0; }
+}
+
+

Feel free also mix transitions and keyframes together as well as any other CSS classes on the same element.

+

CSS Class-based Animations

+

Class-based animations (animations that are triggered via ngClass, ngShow, ngHide and some other directives) have a slightly different +naming convention. Class-based animations are basic enough that a standard transition or keyframe can be referenced on the class being added +and removed.

+

For example if we wanted to do a CSS animation for ngHide then we place an animation on the .ng-hide CSS class:

+
<div ng-show="bool" class="fade">
+  Show and hide me
+</div>
+<button ng-click="bool=!bool">Toggle</button>
+
+<style>
+.fade.ng-hide {
+  transition:0.5s linear all;
+  opacity:0;
+}
+</style>
+
+

All that is going on here with ngShow/ngHide behind the scenes is the .ng-hide class is added/removed (when the hidden state is valid). Since +ngShow and ngHide are animation aware then we can match up a transition and ngAnimate handles the rest.

+

In addition the addition and removal of the CSS class, ngAnimate also provides two helper methods that we can use to further decorate the animation +with CSS styles.

+
<div ng-class="{on:onOff}" class="highlight">
+  Highlight this box
+</div>
+<button ng-click="onOff=!onOff">Toggle</button>
+
+<style>
+.highlight {
+  transition:0.5s linear all;
+}
+.highlight.on-add {
+  background:white;
+}
+.highlight.on {
+  background:yellow;
+}
+.highlight.on-remove {
+  background:black;
+}
+</style>
+
+

We can also make use of CSS keyframes by placing them within the CSS classes.

+

CSS Staggering Animations

+

A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a +curtain-like effect. The ngAnimate module (versions >=1.2) supports staggering animations and the stagger effect can be +performed by creating a ng-EVENT-stagger CSS class and attaching that class to the base CSS class used for +the animation. The style property expected within the stagger class can either be a transition-delay or an +animation-delay property (or both if your animation contains both transitions and keyframe animations).

+
.my-animation.ng-enter {
+  /* standard transition code */
+  transition: 1s linear all;
+  opacity:0;
+}
+.my-animation.ng-enter-stagger {
+  /* this will have a 100ms delay between each successive leave animation */
+  transition-delay: 0.1s;
+
+  /* As of 1.4.4, this must always be set: it signals ngAnimate
+    to not accidentally inherit a delay property from another CSS class */
+  transition-duration: 0s;
+
+  /* if you are using animations instead of transitions you should configure as follows:
+    animation-delay: 0.1s;
+    animation-duration: 0s; */
+}
+.my-animation.ng-enter.ng-enter-active {
+  /* standard transition styles */
+  opacity:1;
+}
+
+

Staggering animations work by default in ngRepeat (so long as the CSS class is defined). Outside of ngRepeat, to use staggering animations +on your own, they can be triggered by firing multiple calls to the same event on $animate. However, the restrictions surrounding this +are that each of the elements must have the same CSS className value as well as the same parent element. A stagger operation +will also be reset if one or more animation frames have passed since the multiple calls to $animate were fired.

+

The following code will issue the ng-leave-stagger event on the element provided:

+
var kids = parent.children();
+
+$animate.leave(kids[0]); //stagger index=0
+$animate.leave(kids[1]); //stagger index=1
+$animate.leave(kids[2]); //stagger index=2
+$animate.leave(kids[3]); //stagger index=3
+$animate.leave(kids[4]); //stagger index=4
+
+window.requestAnimationFrame(function() {
+  //stagger has reset itself
+  $animate.leave(kids[5]); //stagger index=0
+  $animate.leave(kids[6]); //stagger index=1
+
+  $scope.$digest();
+});
+
+

Stagger animations are currently only supported within CSS-defined animations.

+

The ng-animate CSS class

+

When ngAnimate is animating an element it will apply the ng-animate CSS class to the element for the duration of the animation. +This is a temporary CSS class and it will be removed once the animation is over (for both JavaScript and CSS-based animations).

+

Therefore, animations can be applied to an element using this temporary class directly via CSS.

+
.zipper.ng-animate {
+  transition:0.5s linear all;
+}
+.zipper.ng-enter {
+  opacity:0;
+}
+.zipper.ng-enter.ng-enter-active {
+  opacity:1;
+}
+.zipper.ng-leave {
+  opacity:1;
+}
+.zipper.ng-leave.ng-leave-active {
+  opacity:0;
+}
+
+

(Note that the ng-animate CSS class is reserved and it cannot be applied on an element directly since ngAnimate will always remove +the CSS class once an animation has completed.)

+

The ng-[event]-prepare class

+

This is a special class that can be used to prevent unwanted flickering / flash of content before +the actual animation starts. The class is added as soon as an animation is initialized, but removed +before the actual animation starts (after waiting for a $digest). +It is also only added for structural animations (enter, move, and leave).

+

In practice, flickering can appear when nesting elements with structural animations such as ngIf +into elements that have class-based animations such as ngClass.

+
<div ng-class="{red: myProp}">
+  <div ng-class="{blue: myProp}">
+    <div class="message" ng-if="myProp"></div>
+  </div>
+</div>
+
+

It is possible that during the enter animation, the .message div will be briefly visible before it starts animating. +In that case, you can add styles to the CSS that make sure the element stays hidden before the animation starts:

+
.message.ng-enter-prepare {
+  opacity: 0;
+}
+
+

JavaScript-based Animations

+

ngAnimate also allows for animations to be consumed by JavaScript code. The approach is similar to CSS-based animations (where there is a shared +CSS class that is referenced in our HTML code) but in addition we need to register the JavaScript animation on the module. By making use of the +module.animation() module function we can register the animation.

+

Let's see an example of a enter/leave animation using ngRepeat:

+
<div ng-repeat="item in items" class="slide">
+  {{ item }}
+</div>
+
+

See the slide CSS class? Let's use that class to define an animation that we'll structure in our module code by using module.animation:

+
myModule.animation('.slide', [function() {
+  return {
+    // make note that other events (like addClass/removeClass)
+    // have different function input parameters
+    enter: function(element, doneFn) {
+      jQuery(element).fadeIn(1000, doneFn);
+
+      // remember to call doneFn so that angular
+      // knows that the animation has concluded
+    },
+
+    move: function(element, doneFn) {
+      jQuery(element).fadeIn(1000, doneFn);
+    },
+
+    leave: function(element, doneFn) {
+      jQuery(element).fadeOut(1000, doneFn);
+    }
+  }
+}]);
+
+

The nice thing about JS-based animations is that we can inject other services and make use of advanced animation libraries such as +greensock.js and velocity.js.

+

If our animation code class-based (meaning that something like ngClass, ngHide and ngShow triggers it) then we can still define +our animations inside of the same registered animation, however, the function input arguments are a bit different:

+
<div ng-class="color" class="colorful">
+  this box is moody
+</div>
+<button ng-click="color='red'">Change to red</button>
+<button ng-click="color='blue'">Change to blue</button>
+<button ng-click="color='green'">Change to green</button>
+
+
myModule.animation('.colorful', [function() {
+  return {
+    addClass: function(element, className, doneFn) {
+      // do some cool animation and call the doneFn
+    },
+    removeClass: function(element, className, doneFn) {
+      // do some cool animation and call the doneFn
+    },
+    setClass: function(element, addedClass, removedClass, doneFn) {
+      // do some cool animation and call the doneFn
+    }
+  }
+}]);
+
+

CSS + JS Animations Together

+

AngularJS 1.4 and higher has taken steps to make the amalgamation of CSS and JS animations more flexible. However, unlike earlier versions of Angular, +defining CSS and JS animations to work off of the same CSS class will not work anymore. Therefore the example below will only result in JS animations taking +charge of the animation:

+
<div ng-if="bool" class="slide">
+  Slide in and out
+</div>
+
+
myModule.animation('.slide', [function() {
+  return {
+    enter: function(element, doneFn) {
+      jQuery(element).slideIn(1000, doneFn);
+    }
+  }
+}]);
+
+
.slide.ng-enter {
+  transition:0.5s linear all;
+  transform:translateY(-100px);
+}
+.slide.ng-enter.ng-enter-active {
+  transform:translateY(0);
+}
+
+

Does this mean that CSS and JS animations cannot be used together? Do JS-based animations always have higher priority? We can make up for the +lack of CSS animations by using the $animateCss service to trigger our own tweaked-out, CSS-based animations directly from +our own JS-based animation code:

+
myModule.animation('.slide', ['$animateCss', function($animateCss) {
+  return {
+    enter: function(element) {
+       // this will trigger `.slide.ng-enter` and `.slide.ng-enter-active`.
+      return $animateCss(element, {
+        event: 'enter',
+        structural: true
+      });
+    }
+  }
+}]);
+
+

The nice thing here is that we can save bandwidth by sticking to our CSS-based animation code and we don't need to rely on a 3rd-party animation framework.

+

The $animateCss service is very powerful since we can feed in all kinds of extra properties that will be evaluated and fed into a CSS transition or +keyframe animation. For example if we wanted to animate the height of an element while adding and removing classes then we can do so by providing that +data into $animateCss directly:

+
myModule.animation('.slide', ['$animateCss', function($animateCss) {
+  return {
+    enter: function(element) {
+      return $animateCss(element, {
+        event: 'enter',
+        structural: true,
+        addClass: 'maroon-setting',
+        from: { height:0 },
+        to: { height: 200 }
+      });
+    }
+  }
+}]);
+
+

Now we can fill in the rest via our transition CSS code:

+
/* the transition tells ngAnimate to make the animation happen */
+.slide.ng-enter { transition:0.5s linear all; }
+
+/* this extra CSS class will be absorbed into the transition
+since the $animateCss code is adding the class */
+.maroon-setting { background:red; }
+
+

And $animateCss will figure out the rest. Just make sure to have the done() callback fire the doneFn function to signal when the animation is over.

+

To learn more about what's possible be sure to visit the $animateCss service.

+

Animation Anchoring (via ng-animate-ref)

+

ngAnimate in AngularJS 1.4 comes packed with the ability to cross-animate elements between +structural areas of an application (like views) by pairing up elements using an attribute +called ng-animate-ref.

+

Let's say for example we have two views that are managed by ng-view and we want to show +that there is a relationship between two components situated in within these views. By using the +ng-animate-ref attribute we can identify that the two components are paired together and we +can then attach an animation, which is triggered when the view changes.

+

Say for example we have the following template code:

+
<!-- index.html -->
+<div ng-view class="view-animation">
+</div>
+
+<!-- home.html -->
+<a href="#/banner-page">
+  <img src="./banner.jpg" class="banner" ng-animate-ref="banner">
+</a>
+
+<!-- banner-page.html -->
+<img src="./banner.jpg" class="banner" ng-animate-ref="banner">
+
+

Now, when the view changes (once the link is clicked), ngAnimate will examine the +HTML contents to see if there is a match reference between any components in the view +that is leaving and the view that is entering. It will scan both the view which is being +removed (leave) and inserted (enter) to see if there are any paired DOM elements that +contain a matching ref value.

+

The two images match since they share the same ref value. ngAnimate will now create a +transport element (which is a clone of the first image element) and it will then attempt +to animate to the position of the second image element in the next view. For the animation to +work a special CSS class called ng-anchor will be added to the transported element.

+

We can now attach a transition onto the .banner.ng-anchor CSS class and then +ngAnimate will handle the entire transition for us as well as the addition and removal of +any changes of CSS classes between the elements:

+
.banner.ng-anchor {
+  /* this animation will last for 1 second since there are
+         two phases to the animation (an `in` and an `out` phase) */
+  transition:0.5s linear all;
+}
+
+

We also must include animations for the views that are being entered and removed +(otherwise anchoring wouldn't be possible since the new view would be inserted right away).

+
.view-animation.ng-enter, .view-animation.ng-leave {
+  transition:0.5s linear all;
+  position:fixed;
+  left:0;
+  top:0;
+  width:100%;
+}
+.view-animation.ng-enter {
+  transform:translateX(100%);
+}
+.view-animation.ng-leave,
+.view-animation.ng-enter.ng-enter-active {
+  transform:translateX(0%);
+}
+.view-animation.ng-leave.ng-leave-active {
+  transform:translateX(-100%);
+}
+
+

Now we can jump back to the anchor animation. When the animation happens, there are two stages that occur: +an out and an in stage. The out stage happens first and that is when the element is animated away +from its origin. Once that animation is over then the in stage occurs which animates the +element to its destination. The reason why there are two animations is to give enough time +for the enter animation on the new element to be ready.

+

The example above sets up a transition for both the in and out phases, but we can also target the out or +in phases directly via ng-anchor-out and ng-anchor-in.

+
.banner.ng-anchor-out {
+  transition: 0.5s linear all;
+
+  /* the scale will be applied during the out animation,
+         but will be animated away when the in animation runs */
+  transform: scale(1.2);
+}
+
+.banner.ng-anchor-in {
+  transition: 1s linear all;
+}
+
+

Anchoring Demo

+

+ +

+ + +
+ + +
+
<a href="#!/">Home</a>
<hr />
<div class="view-container">
  <div ng-view class="view"></div>
</div>
+
+ +
+
angular.module('anchoringExample', ['ngAnimate', 'ngRoute'])
.config(['$routeProvider', function($routeProvider) {
  $routeProvider.when('/', {
    templateUrl: 'home.html',
    controller: 'HomeController as home'
  });
  $routeProvider.when('/profile/:id', {
    templateUrl: 'profile.html',
    controller: 'ProfileController as profile'
  });
}])
.run(['$rootScope', function($rootScope) {
  $rootScope.records = [
    { id: 1, title: 'Miss Beulah Roob' },
    { id: 2, title: 'Trent Morissette' },
    { id: 3, title: 'Miss Ava Pouros' },
    { id: 4, title: 'Rod Pouros' },
    { id: 5, title: 'Abdul Rice' },
    { id: 6, title: 'Laurie Rutherford Sr.' },
    { id: 7, title: 'Nakia McLaughlin' },
    { id: 8, title: 'Jordon Blanda DVM' },
    { id: 9, title: 'Rhoda Hand' },
    { id: 10, title: 'Alexandrea Sauer' }
  ];
}])
.controller('HomeController', [function() {
  //empty
}])
.controller('ProfileController', ['$rootScope', '$routeParams',
    function ProfileController($rootScope, $routeParams) {
  var index = parseInt($routeParams.id, 10);
  var record = $rootScope.records[index - 1];

  this.title = record.title;
  this.id = record.id;
}]);
+
+ +
+
<h2>Welcome to the home page</h1>
<p>Please click on an element</p>
<a class="record"
   ng-href="#!/profile/{{ record.id }}"
   ng-animate-ref="{{ record.id }}"
   ng-repeat="record in records">
  {{ record.title }}
</a>
+
+ +
+
<div class="profile record" ng-animate-ref="{{ profile.id }}">
  {{ profile.title }}
</div>
+
+ +
+
.record {
  display:block;
  font-size:20px;
}
.profile {
  background:black;
  color:white;
  font-size:100px;
}
.view-container {
  position:relative;
}
.view-container > .view.ng-animate {
  position:absolute;
  top:0;
  left:0;
  width:100%;
  min-height:500px;
}
.view.ng-enter, .view.ng-leave,
.record.ng-anchor {
  transition:0.5s linear all;
}
.view.ng-enter {
  transform:translateX(100%);
}
.view.ng-enter.ng-enter-active, .view.ng-leave {
  transform:translateX(0%);
}
.view.ng-leave.ng-leave-active {
  transform:translateX(-100%);
}
.record.ng-anchor-out {
  background:red;
}
+
+ + + +
+
+ + +

+

How is the element transported?

+

When an anchor animation occurs, ngAnimate will clone the starting element and position it exactly where the starting +element is located on screen via absolute positioning. The cloned element will be placed inside of the root element +of the application (where ng-app was defined) and all of the CSS classes of the starting element will be applied. The +element will then animate into the out and in animations and will eventually reach the coordinates and match +the dimensions of the destination element. During the entire animation a CSS class of .ng-animate-shim will be applied +to both the starting and destination elements in order to hide them from being visible (the CSS styling for the class +is: visibility:hidden). Once the anchor reaches its destination then it will be removed and the destination element +will become visible since the shim class will be removed.

+

How is the morphing handled?

+

CSS Anchoring relies on transitions and keyframes and the internal code is intelligent enough to figure out +what CSS classes differ between the starting element and the destination element. These different CSS classes +will be added/removed on the anchor element and a transition will be applied (the transition that is provided +in the anchor class). Long story short, ngAnimate will figure out what classes to add and remove which will +make the transition of the element as smooth and automatic as possible. Be sure to use simple CSS classes that +do not rely on DOM nesting structure so that the anchor element appears the same as the starting element (since +the cloned element is placed inside of root element which is likely close to the body element).

+

Note that if the root element is on the <html> element then the cloned node will be placed inside of body.

+

Using $animate in your directive code

+

So far we've explored how to feed in animations into an Angular application, but how do we trigger animations within our own directives in our application? +By injecting the $animate service into our directive code, we can trigger structural and class-based hooks which can then be consumed by animations. Let's +imagine we have a greeting box that shows and hides itself when the data changes

+
<greeting-box active="onOrOff">Hi there</greeting-box>
+
+
ngModule.directive('greetingBox', ['$animate', function($animate) {
+  return function(scope, element, attrs) {
+    attrs.$observe('active', function(value) {
+      value ? $animate.addClass(element, 'on') : $animate.removeClass(element, 'on');
+    });
+  });
+}]);
+
+

Now the on CSS class is added and removed on the greeting box component. Now if we add a CSS class on top of the greeting box element +in our HTML code then we can trigger a CSS or JS animation to happen.

+
/* normally we would create a CSS class to reference on the element */
+greeting-box.on { transition:0.5s linear all; background:green; color:white; }
+
+

The $animate service contains a variety of other methods like enter, leave, animate and setClass. To learn more about what's +possible be sure to visit the $animate service API page.

+

Callbacks and Promises

+

When $animate is called it returns a promise that can be used to capture when the animation has ended. Therefore if we were to trigger +an animation (within our directive code) then we can continue performing directive and scope related activities after the animation has +ended by chaining onto the returned promise that animation method returns.

+
// somewhere within the depths of the directive
+$animate.enter(element, parent).then(function() {
+  //the animation has completed
+});
+
+

(Note that earlier versions of Angular prior to v1.4 required the promise code to be wrapped using $scope.$apply(...). This is not the case +anymore.)

+

In addition to the animation promise, we can also make use of animation-related callbacks within our directives and controller code by registering +an event listener using the $animate service. Let's say for example that an animation was triggered on our view +routing controller to hook into that:

+
ngModule.controller('HomePageController', ['$animate', function($animate) {
+  $animate.on('enter', ngViewElement, function(element) {
+    // the animation for this route has completed
+  }]);
+}])
+
+

(Note that you will need to trigger a digest within the callback to get angular to notice any scope-related changes.)

+ + + + + + +
+

Module Components

+ +
+

Directive

+ + + + + + + + + + + + + + + + +
NameDescription
ngAnimateChildren

ngAnimateChildren allows you to specify that children of this element should animate even if any +of the children's parents are currently animating. By default, when an element has an active enter, leave, or move +(structural) animation, child elements that also have an active structural animation are not animated.

+
ngAnimateSwap

ngAnimateSwap is a animation-oriented directive that allows for the container to +be removed and entered in whenever the associated expression changes. A +common usecase for this directive is a rotating banner or slider component which +contains one image being present at a time. When the active image changes +then the old image will perform a leave animation and the new element +will be inserted via an enter animation.

+
+
+ +
+

Service

+ + + + + + + + + + + + + + + + +
NameDescription
$animateCss

The $animateCss service is a useful utility to trigger customized CSS-based transitions/keyframes +from a JavaScript-based animation or directly from a directive. The purpose of $animateCss is NOT +to side-step how $animate and ngAnimate work, but the goal is to allow pre-existing animations or +directives to create more complex animations that can be purely driven using CSS code.

+
$animate

The ngAnimate $animate service documentation is the same for the core $animate service.

+
+
+ +
+ + + + + diff --git a/1.6.6/docs/partials/api/ngAnimate/directive.html b/1.6.6/docs/partials/api/ngAnimate/directive.html new file mode 100644 index 000000000..d14fe6488 --- /dev/null +++ b/1.6.6/docs/partials/api/ngAnimate/directive.html @@ -0,0 +1,36 @@ + +

Directive components in ngAnimate

+ + + +
+
+ + + + + + + + + + + + + + + + +
NameDescription
ngAnimateChildren

ngAnimateChildren allows you to specify that children of this element should animate even if any +of the children's parents are currently animating. By default, when an element has an active enter, leave, or move +(structural) animation, child elements that also have an active structural animation are not animated.

+
ngAnimateSwap

ngAnimateSwap is a animation-oriented directive that allows for the container to +be removed and entered in whenever the associated expression changes. A +common usecase for this directive is a rotating banner or slider component which +contains one image being present at a time. When the active image changes +then the old image will perform a leave animation and the new element +will be inserted via an enter animation.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngAnimate/directive/ngAnimateChildren.html b/1.6.6/docs/partials/api/ngAnimate/directive/ngAnimateChildren.html new file mode 100644 index 000000000..9c51855bc --- /dev/null +++ b/1.6.6/docs/partials/api/ngAnimate/directive/ngAnimateChildren.html @@ -0,0 +1,142 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngAnimateChildren

+
    + +
  1. + - directive in module ngAnimate +
  2. +
+
+ + + + + +
+

ngAnimateChildren allows you to specify that children of this element should animate even if any +of the children's parents are currently animating. By default, when an element has an active enter, leave, or move +(structural) animation, child elements that also have an active structural animation are not animated.

+

Note that even if ngAnimateChildren is set, no child animations will run when the parent element is removed from the DOM (leave animation).

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-animate-children
      ng-animate-children="string">
    ...
    </ng-animate-children>
    +
  • +
  • as attribute: +
    <ANY
      ng-animate-children="string">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngAnimateChildren + + + + string + +

If the value is empty, true or on, + then child animations are allowed. If the value is false, child animations are not allowed.

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<div ng-controller="MainController as main">
  <label>Show container? <input type="checkbox" ng-model="main.enterElement" /></label>
  <label>Animate children? <input type="checkbox" ng-model="main.animateChildren" /></label>
  <hr>
  <div ng-animate-children="{{main.animateChildren}}">
    <div ng-if="main.enterElement" class="container">
      List of items:
      <div ng-repeat="item in [0, 1, 2, 3]" class="item">Item {{item}}</div>
    </div>
  </div>
</div>
+
+ +
+
.container.ng-enter,
.container.ng-leave {
  transition: all ease 1.5s;
}

.container.ng-enter,
.container.ng-leave-active {
  opacity: 0;
}

.container.ng-leave,
.container.ng-enter-active {
  opacity: 1;
}

.item {
  background: firebrick;
  color: #FFF;
  margin-bottom: 10px;
}

.item.ng-enter,
.item.ng-leave {
  transition: transform 1.5s ease;
}

.item.ng-enter {
  transform: translateX(50px);
}

.item.ng-enter-active {
  transform: translateX(0);
}
+
+ +
+
angular.module('ngAnimateChildren', ['ngAnimate'])
.controller('MainController', function MainController() {
  this.animateChildren = false;
  this.enterElement = false;
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ngAnimate/directive/ngAnimateSwap.html b/1.6.6/docs/partials/api/ngAnimate/directive/ngAnimateSwap.html new file mode 100644 index 000000000..91de51b59 --- /dev/null +++ b/1.6.6/docs/partials/api/ngAnimate/directive/ngAnimateSwap.html @@ -0,0 +1,128 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngAnimateSwap

+
    + +
  1. + - directive in module ngAnimate +
  2. +
+
+ + + + + +
+

ngAnimateSwap is a animation-oriented directive that allows for the container to +be removed and entered in whenever the associated expression changes. A +common usecase for this directive is a rotating banner or slider component which +contains one image being present at a time. When the active image changes +then the old image will perform a leave animation and the new element +will be inserted via an enter animation.

+ +
+ + + + +
+ + + +

Directive Info

+
    +
  • This directive creates new scope.
  • +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    +
  • as attribute: +
    <ANY>
    ...
    </ANY>
    +
  • + +
+ + +

Animations

+ + + + + + + + + + + + + + + + + +
AnimationOccurs
enterwhen the new element is inserted to the DOM
leavewhen the old element is removed from the DOM
+ + Click here to learn more about the steps involved in the animation. + + +

Examples

+ +

+ + +
+ + +
+
<div class="container" ng-controller="AppCtrl">
  <div ng-animate-swap="number" class="cell swap-animation" ng-class="colorClass(number)">
    {{ number }}
  </div>
</div>
+
+ +
+
angular.module('ngAnimateSwapExample', ['ngAnimate'])
.controller('AppCtrl', ['$scope', '$interval', function($scope, $interval) {
  $scope.number = 0;
  $interval(function() {
    $scope.number++;
  }, 1000);

  var colors = ['red','blue','green','yellow','orange'];
  $scope.colorClass = function(number) {
    return colors[number % colors.length];
  };
}]);
+
+ +
+
.container {
  height:250px;
  width:250px;
  position:relative;
  overflow:hidden;
  border:2px solid black;
}
.container .cell {
  font-size:150px;
  text-align:center;
  line-height:250px;
  position:absolute;
  top:0;
  left:0;
  right:0;
  border-bottom:2px solid black;
}
.swap-animation.ng-enter, .swap-animation.ng-leave {
  transition:0.5s linear all;
}
.swap-animation.ng-enter {
  top:-250px;
}
.swap-animation.ng-enter-active {
  top:0px;
}
.swap-animation.ng-leave {
  top:0px;
}
.swap-animation.ng-leave-active {
  top:250px;
}
.red { background:red; }
.green { background:green; }
.blue { background:blue; }
.yellow { background:yellow; }
.orange { background:orange; }
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ngAnimate/service.html b/1.6.6/docs/partials/api/ngAnimate/service.html new file mode 100644 index 000000000..3f3f74dec --- /dev/null +++ b/1.6.6/docs/partials/api/ngAnimate/service.html @@ -0,0 +1,32 @@ + +

Service components in ngAnimate

+ + + +
+
+ + + + + + + + + + + + + + + + +
NameDescription
$animateCss

The $animateCss service is a useful utility to trigger customized CSS-based transitions/keyframes +from a JavaScript-based animation or directly from a directive. The purpose of $animateCss is NOT +to side-step how $animate and ngAnimate work, but the goal is to allow pre-existing animations or +directives to create more complex animations that can be purely driven using CSS code.

+
$animate

The ngAnimate $animate service documentation is the same for the core $animate service.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngAnimate/service/$animate.html b/1.6.6/docs/partials/api/ngAnimate/service/$animate.html new file mode 100644 index 000000000..bca4c6164 --- /dev/null +++ b/1.6.6/docs/partials/api/ngAnimate/service/$animate.html @@ -0,0 +1,51 @@ + Improve this Doc + + + + +  View Source + + + +
+

$animate

+
    + + + +
  1. + - service in module ngAnimate +
  2. +
+
+ + + + + +
+

The ngAnimate $animate service documentation is the same for the core $animate service.

+

Click here to learn more about animations with $animate.

+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngAnimate/service/$animateCss.html b/1.6.6/docs/partials/api/ngAnimate/service/$animateCss.html new file mode 100644 index 000000000..2874e62d1 --- /dev/null +++ b/1.6.6/docs/partials/api/ngAnimate/service/$animateCss.html @@ -0,0 +1,283 @@ + Improve this Doc + + + + +  View Source + + + +
+

$animateCss

+
    + + + +
  1. + - service in module ngAnimate +
  2. +
+
+ + + + + +
+

The $animateCss service is a useful utility to trigger customized CSS-based transitions/keyframes +from a JavaScript-based animation or directly from a directive. The purpose of $animateCss is NOT +to side-step how $animate and ngAnimate work, but the goal is to allow pre-existing animations or +directives to create more complex animations that can be purely driven using CSS code.

+

Note that only browsers that support CSS transitions and/or keyframe animations are capable of +rendering animations triggered via $animateCss (bad news for IE9 and lower).

+

Usage

+

Once again, $animateCss is designed to be used inside of a registered JavaScript animation that +is powered by ngAnimate. It is possible to use $animateCss directly inside of a directive, however, +any automatic control over cancelling animations and/or preventing animations from being run on +child elements will not be handled by Angular. For this to work as expected, please use $animate to +trigger the animation and then setup a JavaScript animation that injects $animateCss to trigger +the CSS animation.

+

The example below shows how we can create a folding animation on an element using ng-if:

+
<!-- notice the `fold-animation` CSS class -->
+<div ng-if="onOff" class="fold-animation">
+  This element will go BOOM
+</div>
+<button ng-click="onOff=true">Fold In</button>
+
+

Now we create the JavaScript animation that will trigger the CSS transition:

+
ngModule.animation('.fold-animation', ['$animateCss', function($animateCss) {
+  return {
+    enter: function(element, doneFn) {
+      var height = element[0].offsetHeight;
+      return $animateCss(element, {
+        from: { height:'0px' },
+        to: { height:height + 'px' },
+        duration: 1 // one second
+      });
+    }
+  }
+}]);
+
+

More Advanced Uses

+

$animateCss is the underlying code that ngAnimate uses to power CSS-based animations behind the scenes. Therefore CSS hooks +like .ng-EVENT, .ng-EVENT-active, .ng-EVENT-stagger are all features that can be triggered using $animateCss via JavaScript code.

+

This also means that just about any combination of adding classes, removing classes, setting styles, dynamically setting a keyframe animation, +applying a hardcoded duration or delay value, changing the animation easing or applying a stagger animation are all options that work with +$animateCss. The service itself is smart enough to figure out the combination of options and examine the element styling properties in order +to provide a working animation that will run in CSS.

+

The example below showcases a more advanced version of the .fold-animation from the example above:

+
ngModule.animation('.fold-animation', ['$animateCss', function($animateCss) {
+  return {
+    enter: function(element, doneFn) {
+      var height = element[0].offsetHeight;
+      return $animateCss(element, {
+        addClass: 'red large-text pulse-twice',
+        easing: 'ease-out',
+        from: { height:'0px' },
+        to: { height:height + 'px' },
+        duration: 1 // one second
+      });
+    }
+  }
+}]);
+
+

Since we're adding/removing CSS classes then the CSS transition will also pick those up:

+
/* since a hardcoded duration value of 1 was provided in the JavaScript animation code,
+the CSS classes below will be transitioned despite them being defined as regular CSS classes */
+.red { background:red; }
+.large-text { font-size:20px; }
+
+/* we can also use a keyframe animation and $animateCss will make it work alongside the transition */
+.pulse-twice {
+  animation: 0.5s pulse linear 2;
+  -webkit-animation: 0.5s pulse linear 2;
+}
+
+@keyframes pulse {
+  from { transform: scale(0.5); }
+  to { transform: scale(1.5); }
+}
+
+@-webkit-keyframes pulse {
+  from { -webkit-transform: scale(0.5); }
+  to { -webkit-transform: scale(1.5); }
+}
+
+

Given this complex combination of CSS classes, styles and options, $animateCss will figure everything out and make the animation happen.

+

How the Options are handled

+

$animateCss is very versatile and intelligent when it comes to figuring out what configurations to apply to the element to ensure the animation +works with the options provided. Say for example we were adding a class that contained a keyframe value and we wanted to also animate some inline +styles using the from and to properties.

+
var animator = $animateCss(element, {
+  from: { background:'red' },
+  to: { background:'blue' }
+});
+animator.start();
+
+
.rotating-animation {
+  animation:0.5s rotate linear;
+  -webkit-animation:0.5s rotate linear;
+}
+
+@keyframes rotate {
+  from { transform: rotate(0deg); }
+  to { transform: rotate(360deg); }
+}
+
+@-webkit-keyframes rotate {
+  from { -webkit-transform: rotate(0deg); }
+  to { -webkit-transform: rotate(360deg); }
+}
+
+

The missing pieces here are that we do not have a transition set (within the CSS code nor within the $animateCss options) and the duration of the animation is +going to be detected from what the keyframe styles on the CSS class are. In this event, $animateCss will automatically create an inline transition +style matching the duration detected from the keyframe style (which is present in the CSS class that is being added) and then prepare both the transition +and keyframe animations to run in parallel on the element. Then when the animation is underway the provided from and to CSS styles will be applied +and spread across the transition and keyframe animation.

+

What is returned

+

$animateCss works in two stages: a preparation phase and an animation phase. Therefore when $animateCss is first called it will NOT actually +start the animation. All that is going on here is that the element is being prepared for the animation (which means that the generated CSS classes are +added and removed on the element). Once $animateCss is called it will return an object with the following properties:

+
var animator = $animateCss(element, { ... });
+
+

Now what do the contents of our animator variable look like:

+
{
+  // starts the animation
+  start: Function,
+
+  // ends (aborts) the animation
+  end: Function
+}
+
+

To actually start the animation we need to run animation.start() which will then return a promise that we can hook into to detect when the animation ends. +If we choose not to run the animation then we MUST run animation.end() to perform a cleanup on the element (since some CSS classes and styles may have been +applied to the element during the preparation phase). Note that all other properties such as duration, delay, transitions and keyframes are just properties +and that changing them will not reconfigure the parameters of the animation.

+

runner.done() vs runner.then()

+

It is documented that animation.start() will return a promise object and this is true, however, there is also an additional method available on the +runner called .done(callbackFn). The done method works the same as .finally(callbackFn), however, it does not trigger a digest to occur. +Therefore, for performance reasons, it's always best to use runner.done(callback) instead of runner.then(), runner.catch() or runner.finally() +unless you really need a digest to kick off afterwards.

+

Keep in mind that, to make this easier, ngAnimate has tweaked the JS animations API to recognize when a runner instance is returned from $animateCss +(so there is no need to call runner.done(doneFn) inside of your JavaScript animation code). +Check the animation code above to see how this works.

+ +
+ + + + +
+ + + + +

Usage

+ +

$animateCss(element, options);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ element + + + + DOMElement + +

the element that will be animated

+ + +
+ options + + + + object + +

the animation-related options that will be applied during the animation

+
    +
  • event - The DOM event (e.g. enter, leave, move). When used, a generated CSS class of ng-EVENT and ng-EVENT-active will be applied +to the element during the animation. Multiple events can be provided when spaces are used as a separator. (Note that this will not perform any DOM operation.)
  • +
  • structural - Indicates that the ng- prefix will be added to the event class. Setting to false or omitting will turn ng-EVENT and +ng-EVENT-active in EVENT and EVENT-active. Unused if event is omitted.
  • +
  • easing - The CSS easing value that will be applied to the transition or keyframe animation (or both).
  • +
  • transitionStyle - The raw CSS transition style that will be used (e.g. 1s linear all).
  • +
  • keyframeStyle - The raw CSS keyframe animation style that will be used (e.g. 1s my_animation linear).
  • +
  • from - The starting CSS styles (a key/value object) that will be applied at the start of the animation.
  • +
  • to - The ending CSS styles (a key/value object) that will be applied across the animation via a CSS transition.
  • +
  • addClass - A space separated list of CSS classes that will be added to the element and spread across the animation.
  • +
  • removeClass - A space separated list of CSS classes that will be removed from the element and spread across the animation.
  • +
  • duration - A number value representing the total duration of the transition and/or keyframe (note that a value of 1 is 1000ms). If a value of 0 +is provided then the animation will be skipped entirely.
  • +
  • delay - A number value representing the total delay of the transition and/or keyframe (note that a value of 1 is 1000ms). If a value of true is +used then whatever delay value is detected from the CSS classes will be mirrored on the elements styles (e.g. by setting delay true then the style value +of the element will be transition-delay: DETECTED_VALUE). Using true is useful when you want the CSS classes and inline styles to all share the same +CSS delay value.
  • +
  • stagger - A numeric time value representing the delay between successively animated elements +(Click here to learn how CSS-based staggering works in ngAnimate.)
  • +
  • staggerIndex - The numeric index representing the stagger item (e.g. a value of 5 is equal to the sixth item in the stagger; therefore when a +stagger option value of 0.1 is used then there will be a stagger delay of 600ms)
  • +
  • applyClassesEarly - Whether or not the classes being added or removed will be used when detecting the animation. This is set by $animate when enter/leave/move animations are fired to ensure that the CSS classes are resolved in time. (Note that this will prevent any transitions from occurring on the classes being added and removed.)
  • +
  • cleanupStyles - Whether or not the provided from and to styles will be removed once + the animation is closed. This is useful for when the styles are used purely for the sake of + the animation and do not have a lasting visual effect on the element (e.g. a collapse and open animation). + By default this value is set to false.
  • +
+ + +
+ +
+ +

Returns

+ + + + + +
object

an object with start and end methods and details about the animation.

+
    +
  • start - The method to start the animation. This will return a Promise when called.
  • +
  • end - This method will cancel the animation and remove all applied CSS classes and styles.
  • +
+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngAria.html b/1.6.6/docs/partials/api/ngAria.html new file mode 100644 index 000000000..62b725ba8 --- /dev/null +++ b/1.6.6/docs/partials/api/ngAria.html @@ -0,0 +1,173 @@ + Improve this Doc + + +

+ ngAria +

+ + + +

Installation

+ + +

First, get the file:

+
    +
  • + Google CDN e.g. +
    "//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-aria.js"
    +
  • +
  • + NPM e.g. +
    npm install --save angular-aria@X.Y.Z
    + or +
    yarn add angular-aria@X.Y.Z
    +
  • +
  • + Bower e.g. +
    bower install angular-aria#X.Y.Z
    +
  • +
  • + code.angularjs.org + (discouraged for production use) e.g. +
    "//code.angularjs.org/X.Y.Z/angular-aria.js"
    +
  • +
+

where X.Y.Z is the AngularJS version you are running.

+ +

Then, include angular-aria.js in your HTML:

+ +
<script src="path/to/angular.js"></script>
<script src="path/to/angular-aria.js"></script>
+ +

Finally, load the module in your application by adding it as a dependent module:

+
angular.module('app', ['ngAria']);
+ +

With that you're ready to get started!

+ + +

The ngAria module provides support for common +ARIA +attributes that convey state or semantic information about the application for users +of assistive technologies, such as screen readers.

+
+ +

Usage

+

For ngAria to do its magic, simply include the module ngAria as a dependency. The following +directives are supported: +ngModel, ngChecked, ngReadonly, ngRequired, ngValue, ngDisabled, ngShow, ngHide, ngClick, +ngDblClick, and ngMessages.

+

Below is a more detailed breakdown of the attributes handled by ngAria:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectiveSupported Attributes
ngModelaria-checked, aria-valuemin, aria-valuemax, aria-valuenow, aria-invalid, aria-required, input roles
ngDisabledaria-disabled
ngRequiredaria-required
ngCheckedaria-checked
ngReadonlyaria-readonly
ngValuearia-checked
ngShowaria-hidden
ngHidearia-hidden
ngDblclicktabindex
ngMessagesaria-live
ngClicktabindex, keydown event, button role
+

Find out more information about each directive by reading the +ngAria Developer Guide.

+

Example

+

Using ngDisabled with ngAria:

+
<md-checkbox ng-disabled="disabled">
+
+

Becomes:

+
<md-checkbox ng-disabled="disabled" aria-disabled="true">
+
+

Disabling Attributes

+

It's possible to disable individual attributes added by ngAria with the +config method. For more details, see the +Developer Guide.

+ + + + + + +
+

Module Components

+ +
+

Provider

+ + + + + + + + + + + +
NameDescription
$ariaProvider

Used for configuring the ARIA attributes injected and managed by ngAria.

+
+
+ +
+

Service

+ + + + + + + + + + + +
NameDescription
$aria
+
+ +
+ + + + + diff --git a/1.6.6/docs/partials/api/ngAria/provider.html b/1.6.6/docs/partials/api/ngAria/provider.html new file mode 100644 index 000000000..8238b91ff --- /dev/null +++ b/1.6.6/docs/partials/api/ngAria/provider.html @@ -0,0 +1,23 @@ + +

Provider components in ngAria

+ + + +
+
+ + + + + + + + + + + +
NameDescription
$ariaProvider

Used for configuring the ARIA attributes injected and managed by ngAria.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngAria/provider/$ariaProvider.html b/1.6.6/docs/partials/api/ngAria/provider/$ariaProvider.html new file mode 100644 index 000000000..1a00b205e --- /dev/null +++ b/1.6.6/docs/partials/api/ngAria/provider/$ariaProvider.html @@ -0,0 +1,127 @@ + Improve this Doc + + + + +  View Source + + + +
+

$ariaProvider

+
    + +
  1. + - $aria +
  2. + +
  3. + - provider in module ngAria +
  4. +
+
+ + + + + +
+

Used for configuring the ARIA attributes injected and managed by ngAria.

+
angular.module('myApp', ['ngAria'], function config($ariaProvider) {
+  $ariaProvider.config({
+    ariaValue: true,
+    tabindex: false
+  });
+});
+
+

Dependencies

+

Requires the ngAria module to be installed.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    config(config);

    + +

    +

    Enables/disables various ARIA attributes

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + config + + + + object + +

    object to enable/disable specific ARIA attributes

    +
      +
    • ariaHidden{boolean} – Enables/disables aria-hidden tags
    • +
    • ariaChecked{boolean} – Enables/disables aria-checked tags
    • +
    • ariaReadonly{boolean} – Enables/disables aria-readonly tags
    • +
    • ariaDisabled{boolean} – Enables/disables aria-disabled tags
    • +
    • ariaRequired{boolean} – Enables/disables aria-required tags
    • +
    • ariaInvalid{boolean} – Enables/disables aria-invalid tags
    • +
    • ariaValue{boolean} – Enables/disables aria-valuemin, aria-valuemax and +aria-valuenow tags
    • +
    • tabindex{boolean} – Enables/disables tabindex tags
    • +
    • bindKeydown{boolean} – Enables/disables keyboard event binding on non-interactive +elements (such as div or li) using ng-click, making them more accessible to users of +assistive technologies
    • +
    • bindRoleForClick{boolean} – Adds role=button to non-interactive elements (such as +div or li) using ng-click, making them more accessible to users of assistive +technologies
    • +
    + + +
    + + + + + +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngAria/service.html b/1.6.6/docs/partials/api/ngAria/service.html new file mode 100644 index 000000000..6e8b6c88c --- /dev/null +++ b/1.6.6/docs/partials/api/ngAria/service.html @@ -0,0 +1,22 @@ + +

Service components in ngAria

+ + + +
+
+ + + + + + + + + + + +
NameDescription
$aria
+
+
+ diff --git a/1.6.6/docs/partials/api/ngAria/service/$aria.html b/1.6.6/docs/partials/api/ngAria/service/$aria.html new file mode 100644 index 000000000..39414a487 --- /dev/null +++ b/1.6.6/docs/partials/api/ngAria/service/$aria.html @@ -0,0 +1,51 @@ + Improve this Doc + + + + +  View Source + + + +
+

$aria

+
    + +
  1. + - $ariaProvider +
  2. + +
  3. + - service in module ngAria +
  4. +
+
+ + + + + +
+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngComponentRouter.html b/1.6.6/docs/partials/api/ngComponentRouter.html new file mode 100644 index 000000000..712be0009 --- /dev/null +++ b/1.6.6/docs/partials/api/ngComponentRouter.html @@ -0,0 +1,149 @@ + Improve this Doc + + +

+ ngComponentRouter +

+ + +
+
Deprecated: + + +
+

In an effort to keep synchronized with router changes in Angular 2, this implementation of the +Component Router (ngComponentRouter module) has been deprecated and will not receive further updates.

+

We are investigating backporting the Angular 2 Router to Angular 1, but alternatively, use the +ngRoute module or community developed projects (e.g. ui-router).

+ +
+ + +

Installation

+ +

Currently, the Component Router module must be installed via npm/yarn, it is not available +on Bower or the Google CDN.

+
yarn add @angular/router@0.2.0
+
+

Include angular_1_router.js in your HTML:

+
<script src="/node_modules/@angular/router/angular1/angular_1_router.js"></script>
+
+

You also need to include ES6 shims for browsers that do not support ES6 code (Internet Explorer, + iOs < 8, Android < 5.0, Windows Mobile < 10):

+
<!-- IE required polyfills, in this exact order -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.33.3/es6-shim.min.js"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.20/system-polyfills.js"></script>
+<script src="https://unpkg.com/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
+
+

Then load the module in your application by adding it as a dependent module:

+
angular.module('app', ['ngComponentRouter']);
+
+ + + + + + + + + +
+

Module Components

+ +
+

Type

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
Router

A Router is responsible for mapping URLs to components.

+
ChildRouter

This type extends the Router.

+
RootRouter

This type extends the Router.

+
ComponentInstruction

A ComponentInstruction represents the route state for a single component. An Instruction is +composed of a tree of these ComponentInstructions.

+
RouteDefinition

Each item in the RouteConfig for a Routing Component is an instance of +this type. It can have the following properties:

+
RouteParams

A map of parameters for a given route, passed as part of the ComponentInstruction to +the Lifecycle Hooks, such as $routerOnActivate and $routerOnDeactivate.

+
+
+ +
+

Directive

+ + + + + + + + + + + +
NameDescription
ngOutlet

The directive that identifies where the Router should render its Components.

+
+
+ +
+

Service

+ + + + + + + + + + + + + + + + +
NameDescription
$rootRouter

The singleton instance of the RootRouter type, which is associated +with the top level $routerRootComponent.

+
$routerRootComponent

The top level Routing Component associated with the $rootRouter.

+
+
+ +
+ + + + + diff --git a/1.6.6/docs/partials/api/ngComponentRouter/directive.html b/1.6.6/docs/partials/api/ngComponentRouter/directive.html new file mode 100644 index 000000000..bc44fde36 --- /dev/null +++ b/1.6.6/docs/partials/api/ngComponentRouter/directive.html @@ -0,0 +1,23 @@ + +

Directive components in ngComponentRouter

+ + + +
+
+ + + + + + + + + + + +
NameDescription
ngOutlet

The directive that identifies where the Router should render its Components.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngComponentRouter/directive/ngOutlet.html b/1.6.6/docs/partials/api/ngComponentRouter/directive/ngOutlet.html new file mode 100644 index 000000000..71819c02e --- /dev/null +++ b/1.6.6/docs/partials/api/ngComponentRouter/directive/ngOutlet.html @@ -0,0 +1,76 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngOutlet

+
    + +
  1. + - directive in module ngComponentRouter +
  2. +
+
+ + + +
+
Deprecated: + + +
+

In an effort to keep synchronized with router changes in Angular 2, this implementation of the Component Router (ngComponentRouter module) +has been deprecated and will not receive further updates. +We are investigating backporting the Angular 2 Router to Angular 1, but alternatively, use the ngRoute module or community developed +projects (e.g. ui-router).

+ +
+ + + +
+

The directive that identifies where the Router should render its Components.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 400 +restrict: AE.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-outlet>
    ...
    </ng-outlet>
    +
  • +
  • as attribute: +
    <ANY>
    ...
    </ANY>
    +
  • + +
+ + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngComponentRouter/service.html b/1.6.6/docs/partials/api/ngComponentRouter/service.html new file mode 100644 index 000000000..6fb66e9fd --- /dev/null +++ b/1.6.6/docs/partials/api/ngComponentRouter/service.html @@ -0,0 +1,30 @@ + +

Service components in ngComponentRouter

+ + + +
+
+ + + + + + + + + + + + + + + + +
NameDescription
$rootRouter

The singleton instance of the RootRouter type, which is associated +with the top level $routerRootComponent.

+
$routerRootComponent

The top level Routing Component associated with the $rootRouter.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngComponentRouter/service/$rootRouter.html b/1.6.6/docs/partials/api/ngComponentRouter/service/$rootRouter.html new file mode 100644 index 000000000..e6a4b8765 --- /dev/null +++ b/1.6.6/docs/partials/api/ngComponentRouter/service/$rootRouter.html @@ -0,0 +1,63 @@ + Improve this Doc + + + + +  View Source + + + +
+

$rootRouter

+
    + + + +
  1. + - service in module ngComponentRouter +
  2. +
+
+ + + +
+
Deprecated: + + +
+

In an effort to keep synchronized with router changes in Angular 2, this implementation of the Component Router (ngComponentRouter module) +has been deprecated and will not receive further updates. +We are investigating backporting the Angular 2 Router to Angular 1, but alternatively, use the ngRoute module or community developed +projects (e.g. ui-router).

+ +
+ + + +
+

The singleton instance of the RootRouter type, which is associated +with the top level $routerRootComponent.

+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngComponentRouter/service/$routerRootComponent.html b/1.6.6/docs/partials/api/ngComponentRouter/service/$routerRootComponent.html new file mode 100644 index 000000000..679619285 --- /dev/null +++ b/1.6.6/docs/partials/api/ngComponentRouter/service/$routerRootComponent.html @@ -0,0 +1,62 @@ + Improve this Doc + + + + +  View Source + + + +
+

$routerRootComponent

+
    + + + +
  1. + - service in module ngComponentRouter +
  2. +
+
+ + + +
+
Deprecated: + + +
+

In an effort to keep synchronized with router changes in Angular 2, this implementation of the Component Router (ngComponentRouter module) +has been deprecated and will not receive further updates. +We are investigating backporting the Angular 2 Router to Angular 1, but alternatively, use the ngRoute module or community developed +projects (e.g. ui-router).

+ +
+ + + +
+

The top level Routing Component associated with the $rootRouter.

+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngComponentRouter/type.html b/1.6.6/docs/partials/api/ngComponentRouter/type.html new file mode 100644 index 000000000..a36f8d97c --- /dev/null +++ b/1.6.6/docs/partials/api/ngComponentRouter/type.html @@ -0,0 +1,56 @@ + +

Type components in ngComponentRouter

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
Router

A Router is responsible for mapping URLs to components.

+
ChildRouter

This type extends the Router.

+
RootRouter

This type extends the Router.

+
ComponentInstruction

A ComponentInstruction represents the route state for a single component. An Instruction is +composed of a tree of these ComponentInstructions.

+
RouteDefinition

Each item in the RouteConfig for a Routing Component is an instance of +this type. It can have the following properties:

+
RouteParams

A map of parameters for a given route, passed as part of the ComponentInstruction to +the Lifecycle Hooks, such as $routerOnActivate and $routerOnDeactivate.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngComponentRouter/type/ChildRouter.html b/1.6.6/docs/partials/api/ngComponentRouter/type/ChildRouter.html new file mode 100644 index 000000000..f71c7f8c7 --- /dev/null +++ b/1.6.6/docs/partials/api/ngComponentRouter/type/ChildRouter.html @@ -0,0 +1,63 @@ + Improve this Doc + + + + +  View Source + + + +
+

ChildRouter

+
    + +
  1. + - type in module ngComponentRouter +
  2. +
+
+ + + +
+
Deprecated: + + +
+

In an effort to keep synchronized with router changes in Angular 2, this implementation of the Component Router (ngComponentRouter module) +has been deprecated and will not receive further updates. +We are investigating backporting the Angular 2 Router to Angular 1, but alternatively, use the ngRoute module or community developed +projects (e.g. ui-router).

+ +
+ + + +
+

This type extends the Router.

+

Apart from the Top Level Component ($routerRootComponent) which is associated with +the $rootRouter, every Routing Component is associated with a ChildRouter, +which manages the routing for that Routing Component.

+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngComponentRouter/type/ComponentInstruction.html b/1.6.6/docs/partials/api/ngComponentRouter/type/ComponentInstruction.html new file mode 100644 index 000000000..ca977ef9b --- /dev/null +++ b/1.6.6/docs/partials/api/ngComponentRouter/type/ComponentInstruction.html @@ -0,0 +1,64 @@ + Improve this Doc + + + + +  View Source + + + +
+

ComponentInstruction

+
    + +
  1. + - type in module ngComponentRouter +
  2. +
+
+ + + +
+
Deprecated: + + +
+

In an effort to keep synchronized with router changes in Angular 2, this implementation of the Component Router (ngComponentRouter module) +has been deprecated and will not receive further updates. +We are investigating backporting the Angular 2 Router to Angular 1, but alternatively, use the ngRoute module or community developed +projects (e.g. ui-router).

+ +
+ + + +
+

A ComponentInstruction represents the route state for a single component. An Instruction is +composed of a tree of these ComponentInstructions.

+

ComponentInstructions is a public API. Instances of ComponentInstruction are passed +to route lifecycle hooks, like $routerCanActivate.

+

You should not modify this object. It should be treated as immutable.

+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngComponentRouter/type/RootRouter.html b/1.6.6/docs/partials/api/ngComponentRouter/type/RootRouter.html new file mode 100644 index 000000000..77ecd2875 --- /dev/null +++ b/1.6.6/docs/partials/api/ngComponentRouter/type/RootRouter.html @@ -0,0 +1,63 @@ + Improve this Doc + + + + +  View Source + + + +
+

RootRouter

+
    + +
  1. + - type in module ngComponentRouter +
  2. +
+
+ + + +
+
Deprecated: + + +
+

In an effort to keep synchronized with router changes in Angular 2, this implementation of the Component Router (ngComponentRouter module) +has been deprecated and will not receive further updates. +We are investigating backporting the Angular 2 Router to Angular 1, but alternatively, use the ngRoute module or community developed +projects (e.g. ui-router).

+ +
+ + + +
+

This type extends the Router.

+

There is only one instance of this type in a Component Router application injectable as the +$rootRouter service. This Router is associate with the Top Level Component +($routerRootComponent). It acts as the connection between the Routers and the Location.

+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngComponentRouter/type/RouteDefinition.html b/1.6.6/docs/partials/api/ngComponentRouter/type/RouteDefinition.html new file mode 100644 index 000000000..93937ec9e --- /dev/null +++ b/1.6.6/docs/partials/api/ngComponentRouter/type/RouteDefinition.html @@ -0,0 +1,67 @@ + Improve this Doc + + + + +  View Source + + + +
+

RouteDefinition

+
    + +
  1. + - type in module ngComponentRouter +
  2. +
+
+ + + +
+
Deprecated: + + +
+

In an effort to keep synchronized with router changes in Angular 2, this implementation of the Component Router (ngComponentRouter module) +has been deprecated and will not receive further updates. +We are investigating backporting the Angular 2 Router to Angular 1, but alternatively, use the ngRoute module or community developed +projects (e.g. ui-router).

+ +
+ + + +
+

Each item in the RouteConfig for a Routing Component is an instance of +this type. It can have the following properties:

+
    +
  • path or (regex and serializer) - defines how to recognize and generate this route
  • +
  • component, loader, redirectTo (requires exactly one of these)
  • +
  • name - the name used to identify the Route Definition when generating links
  • +
  • data (optional)
  • +
+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngComponentRouter/type/RouteParams.html b/1.6.6/docs/partials/api/ngComponentRouter/type/RouteParams.html new file mode 100644 index 000000000..d06d9212d --- /dev/null +++ b/1.6.6/docs/partials/api/ngComponentRouter/type/RouteParams.html @@ -0,0 +1,61 @@ + Improve this Doc + + + + +  View Source + + + +
+

RouteParams

+
    + +
  1. + - type in module ngComponentRouter +
  2. +
+
+ + + +
+
Deprecated: + + +
+

In an effort to keep synchronized with router changes in Angular 2, this implementation of the Component Router (ngComponentRouter module) +has been deprecated and will not receive further updates. +We are investigating backporting the Angular 2 Router to Angular 1, but alternatively, use the ngRoute module or community developed +projects (e.g. ui-router).

+ +
+ + + +
+

A map of parameters for a given route, passed as part of the ComponentInstruction to +the Lifecycle Hooks, such as $routerOnActivate and $routerOnDeactivate.

+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngComponentRouter/type/Router.html b/1.6.6/docs/partials/api/ngComponentRouter/type/Router.html new file mode 100644 index 000000000..c675f4eac --- /dev/null +++ b/1.6.6/docs/partials/api/ngComponentRouter/type/Router.html @@ -0,0 +1,67 @@ + Improve this Doc + + + + +  View Source + + + +
+

Router

+
    + +
  1. + - type in module ngComponentRouter +
  2. +
+
+ + + +
+
Deprecated: + + +
+

In an effort to keep synchronized with router changes in Angular 2, this implementation of the Component Router (ngComponentRouter module) +has been deprecated and will not receive further updates. +We are investigating backporting the Angular 2 Router to Angular 1, but alternatively, use the ngRoute module or community developed +projects (e.g. ui-router).

+ +
+ + + +
+

A Router is responsible for mapping URLs to components.

+
    +
  • Routers and "Routing Component" instances have a 1:1 correspondence.
  • +
  • The Router holds reference to one or more of Outlets.
  • +
  • There are two kinds of Router: RootRouter and ChildRouter.
  • +
+

You can see the state of a router by inspecting the read-only field router.navigating. +This may be useful for showing a spinner, for instance.

+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngCookies.html b/1.6.6/docs/partials/api/ngCookies.html new file mode 100644 index 000000000..c9ac2a9d3 --- /dev/null +++ b/1.6.6/docs/partials/api/ngCookies.html @@ -0,0 +1,108 @@ + Improve this Doc + + +

+ ngCookies +

+ + + +

Installation

+ + +

First, get the file:

+
    +
  • + Google CDN e.g. +
    "//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-cookies.js"
    +
  • +
  • + NPM e.g. +
    npm install --save angular-cookies@X.Y.Z
    + or +
    yarn add angular-cookies@X.Y.Z
    +
  • +
  • + Bower e.g. +
    bower install angular-cookies#X.Y.Z
    +
  • +
  • + code.angularjs.org + (discouraged for production use) e.g. +
    "//code.angularjs.org/X.Y.Z/angular-cookies.js"
    +
  • +
+

where X.Y.Z is the AngularJS version you are running.

+ +

Then, include angular-cookies.js in your HTML:

+ +
<script src="path/to/angular.js"></script>
<script src="path/to/angular-cookies.js"></script>
+ +

Finally, load the module in your application by adding it as a dependent module:

+
angular.module('app', ['ngCookies']);
+ +

With that you're ready to get started!

+ + +

ngCookies

+

The ngCookies module provides a convenient wrapper for reading and writing browser cookies.

+
+ +

See $cookies for usage.

+ + + + + + +
+

Module Components

+ +
+

Provider

+ + + + + + + + + + + +
NameDescription
$cookiesProvider

Use $cookiesProvider to change the default behavior of the $cookies service.

+
+
+ +
+

Service

+ + + + + + + + + + + + + + + + +
NameDescription
$cookies

Provides read/write access to browser's cookies.

+
$cookieStore

Provides a key-value (string-object) storage, that is backed by session cookies. +Objects put or retrieved from this storage are automatically serialized or +deserialized by angular's toJson/fromJson.

+
+
+ +
+ + + + + diff --git a/1.6.6/docs/partials/api/ngCookies/provider.html b/1.6.6/docs/partials/api/ngCookies/provider.html new file mode 100644 index 000000000..8e33f91aa --- /dev/null +++ b/1.6.6/docs/partials/api/ngCookies/provider.html @@ -0,0 +1,23 @@ + +

Provider components in ngCookies

+ + + +
+
+ + + + + + + + + + + +
NameDescription
$cookiesProvider

Use $cookiesProvider to change the default behavior of the $cookies service.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngCookies/provider/$cookiesProvider.html b/1.6.6/docs/partials/api/ngCookies/provider/$cookiesProvider.html new file mode 100644 index 000000000..931250e53 --- /dev/null +++ b/1.6.6/docs/partials/api/ngCookies/provider/$cookiesProvider.html @@ -0,0 +1,80 @@ + Improve this Doc + + + + +  View Source + + + +
+

$cookiesProvider

+
    + +
  1. + - $cookies +
  2. + +
  3. + - provider in module ngCookies +
  4. +
+
+ + + + + +
+

Use $cookiesProvider to change the default behavior of the $cookies service.

+ +
+ + + + +
+ + + + + + + + + +

Properties

+
    +
  • +

    defaults

    + + + + + +

    Object containing default options to pass when setting cookies.

    +

    The object may have following properties:

    +
      +
    • path - {string} - The cookie will be available only for this path and its +sub-paths. By default, this is the URL that appears in your <base> tag.
    • +
    • domain - {string} - The cookie will be available only for this domain and +its sub-domains. For security reasons the user agent will not accept the cookie +if the current domain is not a sub-domain of this domain or equal to it.
    • +
    • expires - {string|Date} - String of the form "Wdy, DD Mon YYYY HH:MM:SS GMT" +or a Date object indicating the exact date/time this cookie will expire.
    • +
    • secure - {boolean} - If true, then the cookie will only be available through a +secured connection.
    • +
    +

    Note: By default, the address that appears in your <base> tag will be used as the path. +This is important so that cookies will be visible for all routes when html5mode is enabled.

    +
    + +
  • +
+ + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngCookies/service.html b/1.6.6/docs/partials/api/ngCookies/service.html new file mode 100644 index 000000000..2da6d2938 --- /dev/null +++ b/1.6.6/docs/partials/api/ngCookies/service.html @@ -0,0 +1,31 @@ + +

Service components in ngCookies

+ + + +
+
+ + + + + + + + + + + + + + + + +
NameDescription
$cookies

Provides read/write access to browser's cookies.

+
$cookieStore

Provides a key-value (string-object) storage, that is backed by session cookies. +Objects put or retrieved from this storage are automatically serialized or +deserialized by angular's toJson/fromJson.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngCookies/service/$cookieStore.html b/1.6.6/docs/partials/api/ngCookies/service/$cookieStore.html new file mode 100644 index 000000000..cd79885e5 --- /dev/null +++ b/1.6.6/docs/partials/api/ngCookies/service/$cookieStore.html @@ -0,0 +1,246 @@ + Improve this Doc + + + + +  View Source + + + +
+

$cookieStore

+
    + + + +
  1. + - service in module ngCookies +
  2. +
+
+ + + +
+
Deprecated: + (since v1.4.0) + +
+

Please use the $cookies service instead.

+ +
+ + + +
+

Provides a key-value (string-object) storage, that is backed by session cookies. +Objects put or retrieved from this storage are automatically serialized or +deserialized by angular's toJson/fromJson.

+

Requires the ngCookies module to be installed.

+ +
+ + + + +
+ +

Dependencies

+ + + + + + + + +

Methods

+
    +
  • +

    get(key);

    + +

    +

    Returns the value of given cookie key

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + key + + + + string + +

    Id to use for lookup.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    Object

    Deserialized cookie value, undefined if the cookie does not exist.

    +
    +
  • + +
  • +

    put(key, value);

    + +

    +

    Sets a value for given cookie key

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + key + + + + string + +

    Id for the value.

    + + +
    + value + + + + Object + +

    Value to be stored.

    + + +
    + + + + + +
  • + +
  • +

    remove(key);

    + +

    +

    Remove given cookie

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + key + + + + string + +

    Id of the key-value pair to delete.

    + + +
    + + + + + +
  • +
+ + + + + + +

Examples

angular.module('cookieStoreExample', ['ngCookies'])
+.controller('ExampleController', ['$cookieStore', function($cookieStore) {
+  // Put cookie
+  $cookieStore.put('myFavorite','oatmeal');
+  // Get cookie
+  var favoriteCookie = $cookieStore.get('myFavorite');
+  // Removing a cookie
+  $cookieStore.remove('myFavorite');
+}]);
+
+ +
+ + diff --git a/1.6.6/docs/partials/api/ngCookies/service/$cookies.html b/1.6.6/docs/partials/api/ngCookies/service/$cookies.html new file mode 100644 index 000000000..1d92b012e --- /dev/null +++ b/1.6.6/docs/partials/api/ngCookies/service/$cookies.html @@ -0,0 +1,430 @@ + Improve this Doc + + + + +  View Source + + + +
+

$cookies

+
    + +
  1. + - $cookiesProvider +
  2. + +
  3. + - service in module ngCookies +
  4. +
+
+ + + + + +
+

Provides read/write access to browser's cookies.

+
+Up until Angular 1.3, $cookies exposed properties that represented the +current browser cookie values. In version 1.4, this behavior has changed, and +$cookies now provides a standard api of getters, setters etc. +
+ +

Requires the ngCookies module to be installed.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    get(key);

    + +

    +

    Returns the value of given cookie key

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + key + + + + string + +

    Id to use for lookup.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    string

    Raw cookie value.

    +
    +
  • + +
  • +

    getObject(key);

    + +

    +

    Returns the deserialized value of given cookie key

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + key + + + + string + +

    Id to use for lookup.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    Object

    Deserialized cookie value.

    +
    +
  • + +
  • +

    getAll();

    + +

    +

    Returns a key value object with all the cookies

    +
    + + + + + + + + +

    Returns

    + + + + + +
    Object

    All cookies

    +
    +
  • + +
  • +

    put(key, value, [options]);

    + +

    +

    Sets a value for given cookie key

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + key + + + + string + +

    Id for the value.

    + + +
    + value + + + + string + +

    Raw value to be stored.

    + + +
    + options + +
    (optional)
    +
    + Object + +

    Options object. + See $cookiesProvider.defaults

    + + +
    + + + + + +
  • + +
  • +

    putObject(key, value, [options]);

    + +

    +

    Serializes and sets a value for given cookie key

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + key + + + + string + +

    Id for the value.

    + + +
    + value + + + + Object + +

    Value to be stored.

    + + +
    + options + +
    (optional)
    +
    + Object + +

    Options object. + See $cookiesProvider.defaults

    + + +
    + + + + + +
  • + +
  • +

    remove(key, [options]);

    + +

    +

    Remove given cookie

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + key + + + + string + +

    Id of the key-value pair to delete.

    + + +
    + options + +
    (optional)
    +
    + Object + +

    Options object. + See $cookiesProvider.defaults

    + + +
    + + + + + +
  • +
+ + + + + + +

Examples

angular.module('cookiesExample', ['ngCookies'])
+.controller('ExampleController', ['$cookies', function($cookies) {
+  // Retrieving a cookie
+  var favoriteCookie = $cookies.get('myFavorite');
+  // Setting a cookie
+  $cookies.put('myFavorite', 'oatmeal');
+}]);
+
+ +
+ + diff --git a/1.6.6/docs/partials/api/ngMessageFormat.html b/1.6.6/docs/partials/api/ngMessageFormat.html new file mode 100644 index 000000000..0c7223174 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMessageFormat.html @@ -0,0 +1,178 @@ + Improve this Doc + + +

+ ngMessageFormat +

+ + + +

Installation

+ + +

First, get the file:

+
    +
  • + Google CDN e.g. +
    "//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-message-format.js"
    +
  • +
  • + NPM e.g. +
    npm install --save angular-message-format@X.Y.Z
    + or +
    yarn add angular-message-format@X.Y.Z
    +
  • +
  • + Bower e.g. +
    bower install angular-message-format#X.Y.Z
    +
  • +
  • + code.angularjs.org + (discouraged for production use) e.g. +
    "//code.angularjs.org/X.Y.Z/angular-message-format.js"
    +
  • +
+

where X.Y.Z is the AngularJS version you are running.

+ +

Then, include angular-message-format.js in your HTML:

+ +
<script src="path/to/angular.js"></script>
<script src="path/to/angular-message-format.js"></script>
+ +

Finally, load the module in your application by adding it as a dependent module:

+
angular.module('app', ['ngMessageFormat']);
+ +

With that you're ready to get started!

+ + +

What is ngMessageFormat?

+

The ngMessageFormat module extends the Angular $interpolate service +with a syntax for handling pluralization and gender specific messages, which is based on the +ICU MessageFormat syntax.

+

See the design doc for more information.

+

Examples

+

Gender

+

This example uses the "select" keyword to specify the message based on gender.

+

+ +

+ + +
+ + +
+
<div ng-controller="AppController">
  Select Recipient:<br>
     <select ng-model="recipient" ng-options="person as person.name for person in recipients">
     </select>
     <p>{{recipient.gender, select,
               male {{{recipient.name}} unwrapped his gift. }
               female {{{recipient.name}} unwrapped her gift. }
               other {{{recipient.name}} unwrapped their gift. }
     }}</p>
</div>
+
+ +
+
function Person(name, gender) {
  this.name = name;
  this.gender = gender;
}

var alice   = new Person('Alice', 'female'),
    bob     = new Person('Bob', 'male'),
    ashley = new Person('Ashley', '');

angular.module('msgFmtExample', ['ngMessageFormat'])
  .controller('AppController', ['$scope', function($scope) {
      $scope.recipients = [alice, bob, ashley];
      $scope.recipient = $scope.recipients[0];
    }]);
+
+ + + +
+
+ + +

+

Plural

+

This example shows how the "plural" keyword is used to account for a variable number of entities. +The "#" variable holds the current number and can be embedded in the message.

+

Note that "=1" takes precedence over "one".

+

The example also shows the "offset" keyword, which allows you to offset the value of the "#" variable.

+

+ +

+ + +
+ + +
+
<div ng-controller="AppController">
 <button ng-click="recipients.pop()" id="decreaseRecipients">decreaseRecipients</button><br>
 Select recipients:<br>
 <select multiple size=5 ng-model="recipients" ng-options="person as person.name for person in people">
 </select><br>
  <p>{{recipients.length, plural, offset:1
          =0    {{{sender.name}} gave no gifts (\#=#)}
          =1    {{{sender.name}} gave a gift to {{recipients[0].name}} (\#=#)}
          one   {{{sender.name}} gave {{recipients[0].name}} and one other person a gift (\#=#)}
          other {{{sender.name}} gave {{recipients[0].name}} and # other people a gift (\#=#)}
        }}</p>
</div>
+
+ +
+
function Person(name, gender) {
  this.name = name;
  this.gender = gender;
}

var alice   = new Person('Alice', 'female'),
    bob     = new Person('Bob', 'male'),
    sarah     = new Person('Sarah', 'female'),
    harry   = new Person('Harry Potter', 'male'),
    ashley   = new Person('Ashley', '');

angular.module('msgFmtExample', ['ngMessageFormat'])
  .controller('AppController', ['$scope', function($scope) {
      $scope.people = [alice, bob, sarah, ashley];
      $scope.recipients = [alice, bob, sarah];
      $scope.sender = harry;
    }]);
+
+ +
+
describe('MessageFormat plural', function() {

  it('should pluralize initial values', function() {
    var messageElem = element(by.binding('recipients.length')),
        decreaseRecipientsBtn = element(by.id('decreaseRecipients'));

    expect(messageElem.getText()).toEqual('Harry Potter gave Alice and 2 other people a gift (#=2)');
    decreaseRecipientsBtn.click();
    expect(messageElem.getText()).toEqual('Harry Potter gave Alice and one other person a gift (#=1)');
    decreaseRecipientsBtn.click();
    expect(messageElem.getText()).toEqual('Harry Potter gave a gift to Alice (#=0)');
    decreaseRecipientsBtn.click();
    expect(messageElem.getText()).toEqual('Harry Potter gave no gifts (#=-1)');
  });
});
+
+ + + +
+
+ + +

+

Plural and Gender together

+

This example shows how you can specify gender rules for specific plural matches - in this case, +=1 is special cased for gender. + + +

+ + +
+ + +
+
<div ng-controller="AppController">
Select recipients:<br>
<select multiple size=5 ng-model="recipients" ng-options="person as person.name for person in people">
</select><br>
 <p>{{recipients.length, plural,
   =0 {{{sender.name}} has not given any gifts to anyone.}
   =1 {  {{recipients[0].gender, select,
          female { {{sender.name}} gave {{recipients[0].name}} her gift.}
          male { {{sender.name}} gave {{recipients[0].name}} his gift.}
          other { {{sender.name}} gave {{recipients[0].name}} their gift.}
         }}
       }
   other {{{sender.name}} gave {{recipients.length}} people gifts.}
   }}</p>
+
+ +
+
function Person(name, gender) {
  this.name = name;
  this.gender = gender;
}

var alice   = new Person('Alice', 'female'),
    bob     = new Person('Bob', 'male'),
    harry   = new Person('Harry Potter', 'male'),
    ashley   = new Person('Ashley', '');

angular.module('msgFmtExample', ['ngMessageFormat'])
  .controller('AppController', ['$scope', function($scope) {
      $scope.people = [alice, bob, ashley];
      $scope.recipients = [alice];
      $scope.sender = harry;
    }]);
+
+ + + +
+
+ + +

+ + + + + + + + + + diff --git a/1.6.6/docs/partials/api/ngMessages.html b/1.6.6/docs/partials/api/ngMessages.html new file mode 100644 index 000000000..ab75deefb --- /dev/null +++ b/1.6.6/docs/partials/api/ngMessages.html @@ -0,0 +1,307 @@ + Improve this Doc + + +

+ ngMessages +

+ + + +

Installation

+ + +

First, get the file:

+
    +
  • + Google CDN e.g. +
    "//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-messages.js"
    +
  • +
  • + NPM e.g. +
    npm install --save angular-messages@X.Y.Z
    + or +
    yarn add angular-messages@X.Y.Z
    +
  • +
  • + Bower e.g. +
    bower install angular-messages#X.Y.Z
    +
  • +
  • + code.angularjs.org + (discouraged for production use) e.g. +
    "//code.angularjs.org/X.Y.Z/angular-messages.js"
    +
  • +
+

where X.Y.Z is the AngularJS version you are running.

+ +

Then, include angular-messages.js in your HTML:

+ +
<script src="path/to/angular.js"></script>
<script src="path/to/angular-messages.js"></script>
+ +

Finally, load the module in your application by adding it as a dependent module:

+
angular.module('app', ['ngMessages']);
+ +

With that you're ready to get started!

+ + +

The ngMessages module provides enhanced support for displaying messages within templates +(typically within forms or when rendering message objects that return key/value data). +Instead of relying on JavaScript code and/or complex ng-if statements within your form template to +show and hide error messages specific to the state of an input field, the ngMessages and +ngMessage directives are designed to handle the complexity, inheritance and priority +sequencing based on the order of how the messages are defined in the template.

+

Currently, the ngMessages module only contains the code for the ngMessages, ngMessagesInclude +ngMessage and ngMessageExp directives.

+

Usage

+

The ngMessages directive allows keys in a key/value collection to be associated with a child element +(or 'message') that will show or hide based on the truthiness of that key's value in the collection. A common use +case for ngMessages is to display error messages for inputs using the $error object exposed by the +ngModel directive.

+

The child elements of the ngMessages directive are matched to the collection keys by a ngMessage or +ngMessageExp directive. The value of these attributes must match a key in the collection that is provided by +the ngMessages directive.

+

Consider the following example, which illustrates a typical use case of ngMessages. Within the form myForm we +have a text input named myField which is bound to the scope variable field using the ngModel +directive.

+

The myField field is a required input of type email with a maximum length of 15 characters.

+
<form name="myForm">
+  <label>
+    Enter text:
+    <input type="email" ng-model="field" name="myField" required maxlength="15" />
+  </label>
+  <div ng-messages="myForm.myField.$error" role="alert">
+    <div ng-message="required">Please enter a value for this field.</div>
+    <div ng-message="email">This field must be a valid email address.</div>
+    <div ng-message="maxlength">This field can be at most 15 characters long.</div>
+  </div>
+</form>
+
+

In order to show error messages corresponding to myField we first create an element with an ngMessages attribute +set to the $error object owned by the myField input in our myForm form.

+

Within this element we then create separate elements for each of the possible errors that myField could have. +The ngMessage attribute is used to declare which element(s) will appear for which error - for example, +setting ng-message="required" specifies that this particular element should be displayed when there +is no value present for the required field myField (because the key required will be true in the object +myForm.myField.$error).

+

Message order

+

By default, ngMessages will only display one message for a particular key/value collection at any time. If more +than one message (or error) key is currently true, then which message is shown is determined by the order of messages +in the HTML template code (messages declared first are prioritised). This mechanism means the developer does not have +to prioritize messages using custom JavaScript code.

+

Given the following error object for our example (which informs us that the field myField currently has both the +required and email errors):

+
<!-- keep in mind that ngModel automatically sets these error flags -->
+myField.$error = { required : true, email: true, maxlength: false };
+
+

The required message will be displayed to the user since it appears before the email message in the DOM. +Once the user types a single character, the required message will disappear (since the field now has a value) +but the email message will be visible because it is still applicable.

+

Displaying multiple messages at the same time

+

While ngMessages will by default only display one error element at a time, the ng-messages-multiple attribute can +be applied to the ngMessages container element to cause it to display all applicable error messages at once:

+
<!-- attribute-style usage -->
+<div ng-messages="myForm.myField.$error" ng-messages-multiple>...</div>
+
+<!-- element-style usage -->
+<ng-messages for="myForm.myField.$error" multiple>...</ng-messages>
+
+

Reusing and Overriding Messages

+

In addition to prioritization, ngMessages also allows for including messages from a remote or an inline +template. This allows for generic collection of messages to be reused across multiple parts of an +application.

+
<script type="text/ng-template" id="error-messages">
+  <div ng-message="required">This field is required</div>
+  <div ng-message="minlength">This field is too short</div>
+</script>
+
+<div ng-messages="myForm.myField.$error" role="alert">
+  <div ng-messages-include="error-messages"></div>
+</div>
+
+

However, including generic messages may not be useful enough to match all input fields, therefore, +ngMessages provides the ability to override messages defined in the remote template by redefining +them within the directive container.

+
<!-- a generic template of error messages known as "my-custom-messages" -->
+<script type="text/ng-template" id="my-custom-messages">
+  <div ng-message="required">This field is required</div>
+  <div ng-message="minlength">This field is too short</div>
+</script>
+
+<form name="myForm">
+  <label>
+    Email address
+    <input type="email"
+           id="email"
+           name="myEmail"
+           ng-model="email"
+           minlength="5"
+           required />
+  </label>
+  <!-- any ng-message elements that appear BEFORE the ng-messages-include will
+       override the messages present in the ng-messages-include template -->
+  <div ng-messages="myForm.myEmail.$error" role="alert">
+    <!-- this required message has overridden the template message -->
+    <div ng-message="required">You did not enter your email address</div>
+
+    <!-- this is a brand new message and will appear last in the prioritization -->
+    <div ng-message="email">Your email address is invalid</div>
+
+    <!-- and here are the generic error messages -->
+    <div ng-messages-include="my-custom-messages"></div>
+  </div>
+</form>
+
+

In the example HTML code above the message that is set on required will override the corresponding +required message defined within the remote template. Therefore, with particular input fields (such +email addresses, date fields, autocomplete inputs, etc...), specialized error messages can be applied +while more generic messages can be used to handle other, more general input errors.

+

Dynamic Messaging

+

ngMessages also supports using expressions to dynamically change key values. Using arrays and +repeaters to list messages is also supported. This means that the code below will be able to +fully adapt itself and display the appropriate message when any of the expression data changes:

+
<form name="myForm">
+  <label>
+    Email address
+    <input type="email"
+           name="myEmail"
+           ng-model="email"
+           minlength="5"
+           required />
+  </label>
+  <div ng-messages="myForm.myEmail.$error" role="alert">
+    <div ng-message="required">You did not enter your email address</div>
+    <div ng-repeat="errorMessage in errorMessages">
+      <!-- use ng-message-exp for a message whose key is given by an expression -->
+      <div ng-message-exp="errorMessage.type">{{ errorMessage.text }}</div>
+    </div>
+  </div>
+</form>
+
+

The errorMessage.type expression can be a string value or it can be an array so +that multiple errors can be associated with a single error message:

+
<label>
+  Email address
+  <input type="email"
+         ng-model="data.email"
+         name="myEmail"
+         ng-minlength="5"
+         ng-maxlength="100"
+         required />
+</label>
+<div ng-messages="myForm.myEmail.$error" role="alert">
+  <div ng-message-exp="'required'">You did not enter your email address</div>
+  <div ng-message-exp="['minlength', 'maxlength']">
+    Your email must be between 5 and 100 characters long
+  </div>
+</div>
+
+

Feel free to use other structural directives such as ng-if and ng-switch to further control +what messages are active and when. Be careful, if you place ng-message on the same element +as these structural directives, Angular may not be able to determine if a message is active +or not. Therefore it is best to place the ng-message on a child element of the structural +directive.

+
<div ng-messages="myForm.myEmail.$error" role="alert">
+  <div ng-if="showRequiredError">
+    <div ng-message="required">Please enter something</div>
+  </div>
+</div>
+
+

Animations

+

If the ngAnimate module is active within the application then the ngMessages, ngMessage and +ngMessageExp directives will trigger animations whenever any messages are added and removed from +the DOM by the ngMessages directive.

+

Whenever the ngMessages directive contains one or more visible messages then the .ng-active CSS +class will be added to the element. The .ng-inactive CSS class will be applied when there are no +messages present. Therefore, CSS transitions and keyframes as well as JavaScript animations can +hook into the animations whenever these classes are added/removed.

+

Let's say that our HTML code for our messages container looks like so:

+
<div ng-messages="myMessages" class="my-messages" role="alert">
+  <div ng-message="alert" class="some-message">...</div>
+  <div ng-message="fail" class="some-message">...</div>
+</div>
+
+

Then the CSS animation code for the message container looks like so:

+
.my-messages {
+  transition:1s linear all;
+}
+.my-messages.ng-active {
+  // messages are visible
+}
+.my-messages.ng-inactive {
+  // messages are hidden
+}
+
+

Whenever an inner message is attached (becomes visible) or removed (becomes hidden) then the enter +and leave animation is triggered for each particular element bound to the ngMessage directive.

+

Therefore, the CSS code for the inner messages looks like so:

+
.some-message {
+  transition:1s linear all;
+}
+
+.some-message.ng-enter {}
+.some-message.ng-enter.ng-enter-active {}
+
+.some-message.ng-leave {}
+.some-message.ng-leave.ng-leave-active {}
+
+

Click here to learn how to use JavaScript animations or to learn more about ngAnimate.

+ + + + + + +
+

Module Components

+ +
+

Directive

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
ngMessages

ngMessages is a directive that is designed to show and hide messages based on the state +of a key/value object that it listens on. The directive itself complements error message +reporting with the ngModel $error object (which stores a key/value state of validation errors).

+
ngMessagesInclude

ngMessagesInclude is a directive with the purpose to import existing ngMessage template +code from a remote template and place the downloaded template code into the exact spot +that the ngMessagesInclude directive is placed within the ngMessages container. This allows +for a series of pre-defined messages to be reused and also allows for the developer to +determine what messages are overridden due to the placement of the ngMessagesInclude directive.

+
ngMessage

ngMessage is a directive with the purpose to show and hide a particular message. +For ngMessage to operate, a parent ngMessages directive on a parent DOM element +must be situated since it determines which messages are visible based on the state +of the provided key/value map that ngMessages listens on.

+
ngMessageExp

ngMessageExp is the same as ngMessage, but instead of a static +value, it accepts an expression to be evaluated for the message key.

+
+
+ +
+ + + + + diff --git a/1.6.6/docs/partials/api/ngMessages/directive.html b/1.6.6/docs/partials/api/ngMessages/directive.html new file mode 100644 index 000000000..d450a9ffa --- /dev/null +++ b/1.6.6/docs/partials/api/ngMessages/directive.html @@ -0,0 +1,51 @@ + +

Directive components in ngMessages

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
ngMessages

ngMessages is a directive that is designed to show and hide messages based on the state +of a key/value object that it listens on. The directive itself complements error message +reporting with the ngModel $error object (which stores a key/value state of validation errors).

+
ngMessagesInclude

ngMessagesInclude is a directive with the purpose to import existing ngMessage template +code from a remote template and place the downloaded template code into the exact spot +that the ngMessagesInclude directive is placed within the ngMessages container. This allows +for a series of pre-defined messages to be reused and also allows for the developer to +determine what messages are overridden due to the placement of the ngMessagesInclude directive.

+
ngMessage

ngMessage is a directive with the purpose to show and hide a particular message. +For ngMessage to operate, a parent ngMessages directive on a parent DOM element +must be situated since it determines which messages are visible based on the state +of the provided key/value map that ngMessages listens on.

+
ngMessageExp

ngMessageExp is the same as ngMessage, but instead of a static +value, it accepts an expression to be evaluated for the message key.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngMessages/directive/ngMessage.html b/1.6.6/docs/partials/api/ngMessages/directive/ngMessage.html new file mode 100644 index 000000000..da1fad6f2 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMessages/directive/ngMessage.html @@ -0,0 +1,106 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngMessage

+
    + +
  1. + - directive in module ngMessages +
  2. +
+
+ + + + + +
+

ngMessage is a directive with the purpose to show and hide a particular message. +For ngMessage to operate, a parent ngMessages directive on a parent DOM element +must be situated since it determines which messages are visible based on the state +of the provided key/value map that ngMessages listens on.

+

More information about using ngMessage can be found in the +ngMessages module documentation.

+ +
+ + + + +
+ + + +

Directive Info

+
    +
  • This directive creates new scope.
  • +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
<!-- using attribute directives -->
+<ANY ng-messages="expression" role="alert">
+  <ANY ng-message="stringValue">...</ANY>
+  <ANY ng-message="stringValue1, stringValue2, ...">...</ANY>
+</ANY>
+
+<!-- or by using element directives -->
+<ng-messages for="expression" role="alert">
+  <ng-message when="stringValue">...</ng-message>
+  <ng-message when="stringValue1, stringValue2, ...">...</ng-message>
+</ng-messages>
+
+ + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngMessage + | when + + + expression + +

a string value corresponding to the message key.

+ + +
+ +
+ + + +
+ + diff --git a/1.6.6/docs/partials/api/ngMessages/directive/ngMessageExp.html b/1.6.6/docs/partials/api/ngMessages/directive/ngMessageExp.html new file mode 100644 index 000000000..0701293e8 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMessages/directive/ngMessageExp.html @@ -0,0 +1,101 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngMessageExp

+
    + +
  1. + - directive in module ngMessages +
  2. +
+
+ + + + + +
+

ngMessageExp is the same as ngMessage, but instead of a static +value, it accepts an expression to be evaluated for the message key.

+ +
+ + + + +
+ + + +

Directive Info

+
    +
  • This directive creates new scope.
  • +
  • This directive executes at priority level 1.
  • + +
+ + +

Usage

+
+ +
<!-- using attribute directives -->
+<ANY ng-messages="expression">
+  <ANY ng-message-exp="expressionValue">...</ANY>
+</ANY>
+
+<!-- or by using element directives -->
+<ng-messages for="expression">
+  <ng-message when-exp="expressionValue">...</ng-message>
+</ng-messages>
+
+

Click here to learn more about ngMessages and ngMessage.

+ + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngMessageExp + | whenExp + + + expression + +

an expression value corresponding to the message key.

+ + +
+ +
+ + + +
+ + diff --git a/1.6.6/docs/partials/api/ngMessages/directive/ngMessages.html b/1.6.6/docs/partials/api/ngMessages/directive/ngMessages.html new file mode 100644 index 000000000..35fa0aee0 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMessages/directive/ngMessages.html @@ -0,0 +1,166 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngMessages

+
    + +
  1. + - directive in module ngMessages +
  2. +
+
+ + + + + +
+

ngMessages is a directive that is designed to show and hide messages based on the state +of a key/value object that it listens on. The directive itself complements error message +reporting with the ngModel $error object (which stores a key/value state of validation errors).

+

ngMessages manages the state of internal messages within its container element. The internal +messages use the ngMessage directive and will be inserted/removed from the page depending +on if they're present within the key/value object. By default, only one message will be displayed +at a time and this depends on the prioritization of the messages within the template. (This can +be changed by using the ng-messages-multiple or multiple attribute on the directive container.)

+

A remote template can also be used to promote message reusability and messages can also be +overridden.

+

Click here to learn more about ngMessages and ngMessage.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
<!-- using attribute directives -->
+<ANY ng-messages="expression" role="alert">
+  <ANY ng-message="stringValue">...</ANY>
+  <ANY ng-message="stringValue1, stringValue2, ...">...</ANY>
+  <ANY ng-message-exp="expressionValue">...</ANY>
+</ANY>
+
+<!-- or by using element directives -->
+<ng-messages for="expression" role="alert">
+  <ng-message when="stringValue">...</ng-message>
+  <ng-message when="stringValue1, stringValue2, ...">...</ng-message>
+  <ng-message when-exp="expressionValue">...</ng-message>
+</ng-messages>
+
+ + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngMessages + + + + string + +

an angular expression evaluating to a key/value object + (this is typically the $error object on an ngModel instance).

+ + +
+ ngMessagesMultiple + | multiple +
(optional)
+
+ string + +

when set, all messages will be displayed with true

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<form name="myForm">
  <label>
    Enter your name:
    <input type="text"
           name="myName"
           ng-model="name"
           ng-minlength="5"
           ng-maxlength="20"
           required />
  </label>
  <pre>myForm.myName.$error = {{ myForm.myName.$error | json }}</pre>

  <div ng-messages="myForm.myName.$error" style="color:maroon" role="alert">
    <div ng-message="required">You did not enter a field</div>
    <div ng-message="minlength">Your field is too short</div>
    <div ng-message="maxlength">Your field is too long</div>
  </div>
</form>
+
+ +
+
angular.module('ngMessagesExample', ['ngMessages']);
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ngMessages/directive/ngMessagesInclude.html b/1.6.6/docs/partials/api/ngMessages/directive/ngMessagesInclude.html new file mode 100644 index 000000000..2ecd8719a --- /dev/null +++ b/1.6.6/docs/partials/api/ngMessages/directive/ngMessagesInclude.html @@ -0,0 +1,104 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngMessagesInclude

+
    + +
  1. + - directive in module ngMessages +
  2. +
+
+ + + + + +
+

ngMessagesInclude is a directive with the purpose to import existing ngMessage template +code from a remote template and place the downloaded template code into the exact spot +that the ngMessagesInclude directive is placed within the ngMessages container. This allows +for a series of pre-defined messages to be reused and also allows for the developer to +determine what messages are overridden due to the placement of the ngMessagesInclude directive.

+ +
+ + + + +
+ + + +

Directive Info

+
    +
  • This directive creates new scope.
  • +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
<!-- using attribute directives -->
+<ANY ng-messages="expression" role="alert">
+  <ANY ng-messages-include="remoteTplString">...</ANY>
+</ANY>
+
+<!-- or by using element directives -->
+<ng-messages for="expression" role="alert">
+  <ng-messages-include src="expressionValue1">...</ng-messages-include>
+</ng-messages>
+
+

Click here to learn more about ngMessages and ngMessage.

+ + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngMessagesInclude + | src + + + string + +

a string value corresponding to the remote template.

+ + +
+ +
+ + + +
+ + diff --git a/1.6.6/docs/partials/api/ngMock.html b/1.6.6/docs/partials/api/ngMock.html new file mode 100644 index 000000000..21a2fae28 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock.html @@ -0,0 +1,221 @@ + Improve this Doc + + +

+ ngMock +

+ + + +

Installation

+ +

First, download the file:

+
    +
  • Google CDN e.g. +"//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-mocks.js"
  • +
  • NPM e.g. npm install angular-mocks@X.Y.Z
  • +
  • Yarn e.g. yarn add angular-mocks@X.Y.Z
  • +
  • Bower e.g. bower install angular-mocks#X.Y.Z
  • +
  • code.angularjs.org (discouraged for production use) e.g. +"//code.angularjs.org/X.Y.Z/angular-mocks.js"
  • +
+

where X.Y.Z is the AngularJS version you are running.

+

Then, configure your test runner to load angular-mocks.js after angular.js. +This example uses Karma:

+
config.set({
+  files: [
+    'build/angular.js', // and other module files you need
+    'build/angular-mocks.js',
+    '<path/to/application/files>',
+    '<path/to/spec/files>'
+  ]
+});
+
+

Including the angular-mocks.js file automatically adds the ngMock module, so your tests + are ready to go!

+ + + +

ngMock

+

The ngMock module provides support to inject and mock Angular services into unit tests. +In addition, ngMock also extends various core ng services such that they can be +inspected and controlled in a synchronous manner within test code.

+
+ + + + + +
+

Module Components

+ +
+

Object

+ + + + + + + + + + + +
NameDescription
angular.mock

Namespace from 'angular-mocks.js' which contains testing related code.

+
+
+ +
+

Provider

+ + + + + + + + + + + +
NameDescription
$exceptionHandlerProvider

Configures the mock implementation of $exceptionHandler to rethrow or to log errors +passed to the $exceptionHandler.

+
+
+ +
+

Service

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
$exceptionHandler

Mock implementation of $exceptionHandler that rethrows or logs errors passed +to it. See $exceptionHandlerProvider for configuration +information.

+
$log

Mock implementation of $log that gathers all logged messages in arrays +(one array per logging level). These arrays are exposed as logs property of each of the +level-specific log function, e.g. for level error the array is exposed as $log.error.logs.

+
$interval

Mock implementation of the $interval service.

+
$animate

Mock implementation of the $animate service. Exposes two additional methods +for testing animations.

+
$httpBackend

Fake HTTP backend implementation suitable for unit testing applications that use the +$http service.

+
$timeout

This service is just a simple decorator for $timeout service +that adds a "flush" and "verifyNoPendingTasks" methods.

+
$controller

A decorator for $controller with additional bindings parameter, useful when testing +controllers of directives that use bindToController.

+
$componentController

A service that can be used to create instances of component controllers. Useful for unit-testing.

+
+
+ +
+

Type

+ + + + + + + + + + + + + + + + +
NameDescription
angular.mock.TzDate

NOTE: this is not an injectable instance, just a globally available mock class of Date.

+
$rootScope.Scope

Scope type decorated with helper methods useful for testing. These +methods are automatically available on any Scope instance when +ngMock module is loaded.

+
+
+ +
+

Function

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
angular.mock.dump

NOTE: This is not an injectable instance, just a globally available function.

+
angular.mock.module

NOTE: This function is also published on window for easy access.
+NOTE: This function is declared ONLY WHEN running tests with jasmine or mocha

+
angular.mock.module.sharedInjector

NOTE: This function is declared ONLY WHEN running tests with jasmine or mocha

+
angular.mock.inject

NOTE: This function is also published on window for easy access.
+NOTE: This function is declared ONLY WHEN running tests with jasmine or mocha

+
+
+ +
+ + + + + diff --git a/1.6.6/docs/partials/api/ngMock/function.html b/1.6.6/docs/partials/api/ngMock/function.html new file mode 100644 index 000000000..6e643f474 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock/function.html @@ -0,0 +1,43 @@ + +

Function components in ngMock

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
angular.mock.dump

NOTE: This is not an injectable instance, just a globally available function.

+
angular.mock.module

NOTE: This function is also published on window for easy access.
+NOTE: This function is declared ONLY WHEN running tests with jasmine or mocha

+
angular.mock.module.sharedInjector

NOTE: This function is declared ONLY WHEN running tests with jasmine or mocha

+
angular.mock.inject

NOTE: This function is also published on window for easy access.
+NOTE: This function is declared ONLY WHEN running tests with jasmine or mocha

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngMock/function/angular.mock.dump.html b/1.6.6/docs/partials/api/ngMock/function/angular.mock.dump.html new file mode 100644 index 000000000..3438841f6 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock/function/angular.mock.dump.html @@ -0,0 +1,99 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.mock.dump

+
    + +
  1. + - function in module ngMock +
  2. +
+
+ + + + + +
+

NOTE: This is not an injectable instance, just a globally available function.

+

Method for serializing common angular objects (scope, elements, etc..) into strings. +It is useful for logging objects to the console when debugging.

+ +
+ + + + +
+ + + + +

Usage

+ +

angular.mock.dump(object);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ object + + + + * + +

any object to turn into string.

+ + +
+ +
+ +

Returns

+ + + + + +
string

a serialized string of the argument

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngMock/function/angular.mock.inject.html b/1.6.6/docs/partials/api/ngMock/function/angular.mock.inject.html new file mode 100644 index 000000000..b85bb6c11 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock/function/angular.mock.inject.html @@ -0,0 +1,153 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.mock.inject

+
    + +
  1. + - function in module ngMock +
  2. +
+
+ + + + + +
+

NOTE: This function is also published on window for easy access.
+NOTE: This function is declared ONLY WHEN running tests with jasmine or mocha

+

The inject function wraps a function into an injectable function. The inject() creates new +instance of $injector per test, which is then used for +resolving references.

+

Resolving References (Underscore Wrapping)

+

Often, we would like to inject a reference once, in a beforeEach() block and reuse this +in multiple it() clauses. To be able to do this we must assign the reference to a variable +that is declared in the scope of the describe() block. Since we would, most likely, want +the variable to have the same name of the reference we have a problem, since the parameter +to the inject() function would hide the outer variable.

+

To help with this, the injected parameters can, optionally, be enclosed with underscores. +These are ignored by the injector when the reference name is resolved.

+

For example, the parameter _myService_ would be resolved as the reference myService. +Since it is available in the function body as _myService_, we can then assign it to a variable +defined in an outer scope.

+
// Defined out reference variable outside
+var myService;
+
+// Wrap the parameter in underscores
+beforeEach( inject( function(_myService_){
+  myService = _myService_;
+}));
+
+// Use myService in a series of tests.
+it('makes use of myService', function() {
+  myService.doStuff();
+});
+
+

See also angular.mock.module

+

Example

+

Example of what a typical jasmine tests looks like with the inject method.

+
angular.module('myApplicationModule', [])
+    .value('mode', 'app')
+    .value('version', 'v1.0.1');
+
+
+describe('MyApp', function() {
+
+  // You need to load modules that you want to test,
+  // it loads only the "ng" module by default.
+  beforeEach(module('myApplicationModule'));
+
+
+  // inject() is used to inject arguments of all given functions
+  it('should provide a version', inject(function(mode, version) {
+    expect(version).toEqual('v1.0.1');
+    expect(mode).toEqual('app');
+  }));
+
+
+  // The inject and module method can also be used inside of the it or beforeEach
+  it('should override a version and test the new version is injected', function() {
+    // module() takes functions or strings (module aliases)
+    module(function($provide) {
+      $provide.value('version', 'overridden'); // override version here
+    });
+
+    inject(function(version) {
+      expect(version).toEqual('overridden');
+    });
+  });
+});
+
+ +
+ + + + +
+ + + + +

Usage

+ +

angular.mock.inject(fns);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ fns + + + + ...Function + +

any number of functions which will be injected using the injector.

+ + +
+ +
+ + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngMock/function/angular.mock.module.html b/1.6.6/docs/partials/api/ngMock/function/angular.mock.module.html new file mode 100644 index 000000000..a98529ddc --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock/function/angular.mock.module.html @@ -0,0 +1,99 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.mock.module

+
    + +
  1. + - function in module ngMock +
  2. +
+
+ + + + + +
+

NOTE: This function is also published on window for easy access.
+NOTE: This function is declared ONLY WHEN running tests with jasmine or mocha

+

This function registers a module configuration code. It collects the configuration information +which will be used when the injector is created by inject.

+

See inject for usage example

+ +
+ + + + +
+ + + + +

Usage

+ +

angular.mock.module(fns);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ fns + + + + stringfunction()Object + +

any number of modules which are represented as string + aliases or as anonymous module initialization functions. The modules are used to + configure the injector. The 'ng' and 'ngMock' modules are automatically loaded. If an + object literal is passed each key-value pair will be registered on the module via + $provide.value, the key being the string name (or token) to associate + with the value on the injector.

+ + +
+ +
+ + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngMock/function/angular.mock.module.sharedInjector.html b/1.6.6/docs/partials/api/ngMock/function/angular.mock.module.sharedInjector.html new file mode 100644 index 000000000..1f0cad8d0 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock/function/angular.mock.module.sharedInjector.html @@ -0,0 +1,85 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.mock.module.sharedInjector

+
    + +
  1. + - function in module ngMock +
  2. +
+
+ + + + + +
+

NOTE: This function is declared ONLY WHEN running tests with jasmine or mocha

+

This function ensures a single injector will be used for all tests in a given describe context. +This contrasts with the default behaviour where a new injector is created per test case.

+

Use sharedInjector when you want to take advantage of Jasmine's beforeAll(), or mocha's +before() methods. Call module.sharedInjector() before you setup any other hooks that +will create (i.e call module()) or use (i.e call inject()) the injector.

+

You cannot call sharedInjector() from within a context already using sharedInjector().

+

Example

+

Typically beforeAll is used to make many assertions about a single operation. This can +cut down test run-time as the test setup doesn't need to be re-run, and enabling focussed +tests each with a single assertion.

+
describe("Deep Thought", function() {
+
+  module.sharedInjector();
+
+  beforeAll(module("UltimateQuestion"));
+
+  beforeAll(inject(function(DeepThought) {
+    expect(DeepThought.answer).toBeUndefined();
+    DeepThought.generateAnswer();
+  }));
+
+  it("has calculated the answer correctly", inject(function(DeepThought) {
+    // Because of sharedInjector, we have access to the instance of the DeepThought service
+    // that was provided to the beforeAll() hook. Therefore we can test the generated answer
+    expect(DeepThought.answer).toBe(42);
+  }));
+
+  it("has calculated the answer within the expected time", inject(function(DeepThought) {
+    expect(DeepThought.runTimeMillennia).toBeLessThan(8000);
+  }));
+
+  it("has double checked the answer", inject(function(DeepThought) {
+    expect(DeepThought.absolutelySureItIsTheRightAnswer).toBe(true);
+  }));
+
+});
+
+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngMock/object.html b/1.6.6/docs/partials/api/ngMock/object.html new file mode 100644 index 000000000..7576f74dc --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock/object.html @@ -0,0 +1,23 @@ + +

Object components in ngMock

+ + + +
+
+ + + + + + + + + + + +
NameDescription
angular.mock

Namespace from 'angular-mocks.js' which contains testing related code.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngMock/object/angular.mock.html b/1.6.6/docs/partials/api/ngMock/object/angular.mock.html new file mode 100644 index 000000000..8ca2ddd6d --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock/object/angular.mock.html @@ -0,0 +1,48 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.mock

+
    + +
  1. + - object in module ngMock +
  2. +
+
+ + + + + +
+

Namespace from 'angular-mocks.js' which contains testing related code.

+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngMock/provider.html b/1.6.6/docs/partials/api/ngMock/provider.html new file mode 100644 index 000000000..68267aa83 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock/provider.html @@ -0,0 +1,24 @@ + +

Provider components in ngMock

+ + + +
+
+ + + + + + + + + + + +
NameDescription
$exceptionHandlerProvider

Configures the mock implementation of $exceptionHandler to rethrow or to log errors +passed to the $exceptionHandler.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngMock/provider/$exceptionHandlerProvider.html b/1.6.6/docs/partials/api/ngMock/provider/$exceptionHandlerProvider.html new file mode 100644 index 000000000..18c6b8254 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock/provider/$exceptionHandlerProvider.html @@ -0,0 +1,112 @@ + Improve this Doc + + + + +  View Source + + + +
+

$exceptionHandlerProvider

+
    + +
  1. + - $exceptionHandler +
  2. + +
  3. + - provider in module ngMock +
  4. +
+
+ + + + + +
+

Configures the mock implementation of $exceptionHandler to rethrow or to log errors +passed to the $exceptionHandler.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    mode(mode);

    + +

    +

    Sets the logging mode.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + mode + + + + string + +

    Mode of operation, defaults to rethrow.

    +
      +
    • log: Sometimes it is desirable to test that an error is thrown, for this case the log +mode stores an array of errors in $exceptionHandler.errors, to allow later assertion of +them. See assertEmpty() and +reset().
    • +
    • rethrow: If any errors are passed to the handler in tests, it typically means that there +is a bug in the application or test, so this mock will make these tests fail. For any +implementations that expect exceptions to be thrown, the rethrow mode will also maintain +a log of thrown errors in $exceptionHandler.errors.
    • +
    + + +
    + + + + + +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngMock/service.html b/1.6.6/docs/partials/api/ngMock/service.html new file mode 100644 index 000000000..b641d8e10 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock/service.html @@ -0,0 +1,73 @@ + +

Service components in ngMock

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
$exceptionHandler

Mock implementation of $exceptionHandler that rethrows or logs errors passed +to it. See $exceptionHandlerProvider for configuration +information.

+
$log

Mock implementation of $log that gathers all logged messages in arrays +(one array per logging level). These arrays are exposed as logs property of each of the +level-specific log function, e.g. for level error the array is exposed as $log.error.logs.

+
$interval

Mock implementation of the $interval service.

+
$animate

Mock implementation of the $animate service. Exposes two additional methods +for testing animations.

+
$httpBackend

Fake HTTP backend implementation suitable for unit testing applications that use the +$http service.

+
$timeout

This service is just a simple decorator for $timeout service +that adds a "flush" and "verifyNoPendingTasks" methods.

+
$controller

A decorator for $controller with additional bindings parameter, useful when testing +controllers of directives that use bindToController.

+
$componentController

A service that can be used to create instances of component controllers. Useful for unit-testing.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngMock/service/$animate.html b/1.6.6/docs/partials/api/ngMock/service/$animate.html new file mode 100644 index 000000000..a06c38904 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock/service/$animate.html @@ -0,0 +1,87 @@ + Improve this Doc + + + + +  View Source + + + +
+

$animate

+
    + + + +
  1. + - service in module ngMock +
  2. +
+
+ + + + + +
+

Mock implementation of the $animate service. Exposes two additional methods +for testing animations.

+

You need to require the ngAnimateMock module in your test suite for instance beforeEach(module('ngAnimateMock'))

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    closeAndFlush();

    + +

    +

    This method will close all pending animations (both Javascript +and CSS) and it will also flush any remaining animation frames and/or callbacks.

    +
    + + + + + + + +
  • + +
  • +

    flush();

    + +

    +

    This method is used to flush the pending callbacks and animation frames to either start +an animation or conclude an animation. Note that this will not actually close an +actively running animation (see closeAndFlush() for that).

    +
    + + + + + + + +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngMock/service/$componentController.html b/1.6.6/docs/partials/api/ngMock/service/$componentController.html new file mode 100644 index 000000000..7f4cf4ff5 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock/service/$componentController.html @@ -0,0 +1,158 @@ + Improve this Doc + + + + +  View Source + + + +
+

$componentController

+
    + + + +
  1. + - service in module ngMock +
  2. +
+
+ + + + + +
+

A service that can be used to create instances of component controllers. Useful for unit-testing.

+

Be aware that the controller will be instantiated and attached to the scope as specified in +the component definition object. If you do not provide a $scope object in the locals param +then the helper will create a new isolated scope as a child of $rootScope.

+

If you are using $element or $attrs in the controller, make sure to provide them as locals. +The $element must be a jqLite-wrapped DOM element, and $attrs should be an object that +has all properties / functions that you are using in the controller. If this is getting too complex, +you should compile the component instead and access the component's controller via the +controller function.

+

See also the section on unit-testing component controllers +in the guide.

+ +
+ + + + +
+ + + + +

Usage

+ +

$componentController(componentName, locals, [bindings], [ident]);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ componentName + + + + string + +

the name of the component whose controller we want to instantiate

+ + +
+ locals + + + + Object + +

Injection locals for Controller.

+ + +
+ bindings + +
(optional)
+
+ Object + +

Properties to add to the controller before invoking the constructor. This is used + to simulate the bindToController feature and simplify certain kinds of tests.

+ + +
+ ident + +
(optional)
+
+ string + +

Override the property name to use when attaching the controller to the scope.

+ + +
+ +
+ +

Returns

+ + + + + +
Object

Instance of requested controller.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngMock/service/$controller.html b/1.6.6/docs/partials/api/ngMock/service/$controller.html new file mode 100644 index 000000000..06afd219c --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock/service/$controller.html @@ -0,0 +1,182 @@ + Improve this Doc + + + + +  View Source + + + +
+

$controller

+
    + + + +
  1. + - service in module ngMock +
  2. +
+
+ + + + + +
+

A decorator for $controller with additional bindings parameter, useful when testing +controllers of directives that use bindToController.

+

Depending on the value of +preAssignBindingsEnabled(), the properties +will be bound before or after invoking the constructor.

+

Example

+
// Directive definition ...
+
+myMod.directive('myDirective', {
+  controller: 'MyDirectiveController',
+  bindToController: {
+    name: '@'
+  }
+});
+
+
+// Controller definition ...
+
+myMod.controller('MyDirectiveController', ['$log', function($log) {
+  this.log = function() {
+    $log.info(this.name);
+  };
+}]);
+
+
+// In a test ...
+
+describe('myDirectiveController', function() {
+  describe('log()', function() {
+    it('should write the bound name to the log', inject(function($controller, $log) {
+      var ctrl = $controller('MyDirectiveController', { /* no locals */ }, { name: 'Clark Kent' });
+      ctrl.log();
+
+      expect(ctrl.name).toEqual('Clark Kent');
+      expect($log.info.logs).toEqual(['Clark Kent']);
+    }));
+  });
+});
+
+ +
+ + + + +
+ + + + +

Usage

+ +

$controller(constructor, locals, [bindings]);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ constructor + + + + function()string + +

If called with a function then it's considered to be the + controller constructor function. Otherwise it's considered to be a string which is used + to retrieve the controller constructor using the following steps:

+
    +
  • check if a controller with given name is registered via $controllerProvider
  • +
  • check if evaluating the string on the current scope returns a constructor
  • +
  • if $controllerProvider#allowGlobals, check window[constructor] on the global +window object (deprecated, not recommended)

    +

    The string can use the controller as property syntax, where the controller instance is published +as the specified property on the scope; the scope must be injected into locals param for this +to work correctly.

    +
  • +
+ + +
+ locals + + + + Object + +

Injection locals for Controller.

+ + +
+ bindings + +
(optional)
+
+ Object + +

Properties to add to the controller instance. This is used to simulate + the bindToController feature and simplify certain kinds of tests.

+ + +
+ +
+ +

Returns

+ + + + + +
Object

Instance of given controller.

+
+ + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngMock/service/$exceptionHandler.html b/1.6.6/docs/partials/api/ngMock/service/$exceptionHandler.html new file mode 100644 index 000000000..101c89b66 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock/service/$exceptionHandler.html @@ -0,0 +1,75 @@ + Improve this Doc + + + + +  View Source + + + +
+

$exceptionHandler

+
    + +
  1. + - $exceptionHandlerProvider +
  2. + +
  3. + - service in module ngMock +
  4. +
+
+ + + + + +
+

Mock implementation of $exceptionHandler that rethrows or logs errors passed +to it. See $exceptionHandlerProvider for configuration +information.

+
describe('$exceptionHandlerProvider', function() {
+
+  it('should capture log messages and exceptions', function() {
+
+    module(function($exceptionHandlerProvider) {
+      $exceptionHandlerProvider.mode('log');
+    });
+
+    inject(function($log, $exceptionHandler, $timeout) {
+      $timeout(function() { $log.log(1); });
+      $timeout(function() { $log.log(2); throw 'banana peel'; });
+      $timeout(function() { $log.log(3); });
+      expect($exceptionHandler.errors).toEqual([]);
+      expect($log.assertEmpty());
+      $timeout.flush();
+      expect($exceptionHandler.errors).toEqual(['banana peel']);
+      expect($log.log.logs).toEqual([[1], [2], [3]]);
+    });
+  });
+});
+
+ +
+ + + + +
+ + + + + + + + + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngMock/service/$httpBackend.html b/1.6.6/docs/partials/api/ngMock/service/$httpBackend.html new file mode 100644 index 000000000..9cab803b2 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock/service/$httpBackend.html @@ -0,0 +1,2091 @@ + Improve this Doc + + + + +  View Source + + + +
+

$httpBackend

+
    + + + +
  1. + - service in module ngMock +
  2. +
+
+ + + + + +
+

Fake HTTP backend implementation suitable for unit testing applications that use the +$http service.

+
+Note: For fake HTTP backend implementation suitable for end-to-end testing or backend-less +development please see e2e $httpBackend mock. +
+ +

During unit testing, we want our unit tests to run quickly and have no external dependencies so +we don’t want to send XHR or +JSONP requests to a real server. All we really need is +to verify whether a certain request has been sent or not, or alternatively just let the +application make requests, respond with pre-trained responses and assert that the end result is +what we expect it to be.

+

This mock implementation can be used to respond with static or dynamic responses via the +expect and when apis and their shortcuts (expectGET, whenPOST, etc).

+

When an Angular application needs some data from a server, it calls the $http service, which +sends the request to a real server using $httpBackend service. With dependency injection, it is +easy to inject $httpBackend mock (which has the same API as $httpBackend) and use it to verify +the requests and respond with some testing data without sending a request to a real server.

+

There are two ways to specify what test data should be returned as http responses by the mock +backend when the code under test makes http requests:

+
    +
  • $httpBackend.expect - specifies a request expectation
  • +
  • $httpBackend.when - specifies a backend definition
  • +
+

Request Expectations vs Backend Definitions

+

Request expectations provide a way to make assertions about requests made by the application and +to define responses for those requests. The test will fail if the expected requests are not made +or they are made in the wrong order.

+

Backend definitions allow you to define a fake backend for your application which doesn't assert +if a particular request was made or not, it just returns a trained response if a request is made. +The test will pass whether or not the request gets made during testing.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Request expectationsBackend definitions
Syntax.expect(...).respond(...).when(...).respond(...)
Typical usagestrict unit testsloose (black-box) unit testing
Fulfills multiple requestsNOYES
Order of requests mattersYESNO
Request requiredYESNO
Response requiredoptional (see below)YES
+ +

In cases where both backend definitions and request expectations are specified during unit +testing, the request expectations are evaluated first.

+

If a request expectation has no response specified, the algorithm will search your backend +definitions for an appropriate response.

+

If a request didn't match any expectation or if the expectation doesn't have the response +defined, the backend definitions are evaluated in sequential order to see if any of them match +the request. The response from the first matched definition is returned.

+

Flushing HTTP requests

+

The $httpBackend used in production always responds to requests asynchronously. If we preserved +this behavior in unit testing, we'd have to create async unit tests, which are hard to write, +to follow and to maintain. But neither can the testing mock respond synchronously; that would +change the execution of the code under test. For this reason, the mock $httpBackend has a +flush() method, which allows the test to explicitly flush pending requests. This preserves +the async api of the backend, while allowing the test to execute synchronously.

+

Unit testing with mock $httpBackend

+

The following code shows how to setup and use the mock backend when unit testing a controller. +First we create the controller under test:

+
// The module code
+angular
+  .module('MyApp', [])
+  .controller('MyController', MyController);
+
+// The controller code
+function MyController($scope, $http) {
+  var authToken;
+
+  $http.get('/auth.py').then(function(response) {
+    authToken = response.headers('A-Token');
+    $scope.user = response.data;
+  }).catch(function() {
+    $scope.status = 'Failed...';
+  });
+
+  $scope.saveMessage = function(message) {
+    var headers = { 'Authorization': authToken };
+    $scope.status = 'Saving...';
+
+    $http.post('/add-msg.py', message, { headers: headers } ).then(function(response) {
+      $scope.status = '';
+    }).catch(function() {
+      $scope.status = 'Failed...';
+    });
+  };
+}
+
+

Now we setup the mock backend and create the test specs:

+
// testing controller
+describe('MyController', function() {
+   var $httpBackend, $rootScope, createController, authRequestHandler;
+
+   // Set up the module
+   beforeEach(module('MyApp'));
+
+   beforeEach(inject(function($injector) {
+     // Set up the mock http service responses
+     $httpBackend = $injector.get('$httpBackend');
+     // backend definition common for all tests
+     authRequestHandler = $httpBackend.when('GET', '/auth.py')
+                            .respond({userId: 'userX'}, {'A-Token': 'xxx'});
+
+     // Get hold of a scope (i.e. the root scope)
+     $rootScope = $injector.get('$rootScope');
+     // The $controller service is used to create instances of controllers
+     var $controller = $injector.get('$controller');
+
+     createController = function() {
+       return $controller('MyController', {'$scope' : $rootScope });
+     };
+   }));
+
+
+   afterEach(function() {
+     $httpBackend.verifyNoOutstandingExpectation();
+     $httpBackend.verifyNoOutstandingRequest();
+   });
+
+
+   it('should fetch authentication token', function() {
+     $httpBackend.expectGET('/auth.py');
+     var controller = createController();
+     $httpBackend.flush();
+   });
+
+
+   it('should fail authentication', function() {
+
+     // Notice how you can change the response even after it was set
+     authRequestHandler.respond(401, '');
+
+     $httpBackend.expectGET('/auth.py');
+     var controller = createController();
+     $httpBackend.flush();
+     expect($rootScope.status).toBe('Failed...');
+   });
+
+
+   it('should send msg to server', function() {
+     var controller = createController();
+     $httpBackend.flush();
+
+     // now you don’t care about the authentication, but
+     // the controller will still send the request and
+     // $httpBackend will respond without you having to
+     // specify the expectation and response for this request
+
+     $httpBackend.expectPOST('/add-msg.py', 'message content').respond(201, '');
+     $rootScope.saveMessage('message content');
+     expect($rootScope.status).toBe('Saving...');
+     $httpBackend.flush();
+     expect($rootScope.status).toBe('');
+   });
+
+
+   it('should send auth header', function() {
+     var controller = createController();
+     $httpBackend.flush();
+
+     $httpBackend.expectPOST('/add-msg.py', undefined, function(headers) {
+       // check if the header was sent, if it wasn't the expectation won't
+       // match the request and the test will fail
+       return headers['Authorization'] === 'xxx';
+     }).respond(201, '');
+
+     $rootScope.saveMessage('whatever');
+     $httpBackend.flush();
+   });
+});
+
+

Dynamic responses

+

You define a response to a request by chaining a call to respond() onto a definition or expectation. +If you provide a callback as the first parameter to respond(callback) then you can dynamically generate +a response based on the properties of the request.

+

The callback function should be of the form function(method, url, data, headers, params).

+

Query parameters

+

By default, query parameters on request URLs are parsed into the params object. So a request URL +of /list?q=searchstr&orderby=-name would set params to be {q: 'searchstr', orderby: '-name'}.

+

Regex parameter matching

+

If an expectation or definition uses a regex to match the URL, you can provide an array of keys via a +params argument. The index of each key in the array will match the index of a group in the +regex.

+

The params object in the callback will now have properties with these keys, which hold the value of the +corresponding group in the regex.

+

This also applies to the when and expect shortcut methods.

+
$httpBackend.expect('GET', /\/user\/(.+)/, undefined, undefined, ['id'])
+  .respond(function(method, url, data, headers, params) {
+    // for requested url of '/user/1234' params is {id: '1234'}
+  });
+
+$httpBackend.whenPATCH(/\/user\/(.+)\/article\/(.+)/, undefined, undefined, ['user', 'article'])
+  .respond(function(method, url, data, headers, params) {
+    // for url of '/user/1234/article/567' params is {user: '1234', article: '567'}
+  });
+
+

Matching route requests

+

For extra convenience, whenRoute and expectRoute shortcuts are available. These methods offer colon +delimited matching of the url path, ignoring the query string. This allows declarations +similar to how application routes are configured with $routeProvider. Because these methods convert +the definition url to regex, declaration order is important. Combined with query parameter parsing, +the following is possible:

+
$httpBackend.whenRoute('GET', '/users/:id')
+  .respond(function(method, url, data, headers, params) {
+    return [200, MockUserList[Number(params.id)]];
+  });
+
+$httpBackend.whenRoute('GET', '/users')
+  .respond(function(method, url, data, headers, params) {
+    var userList = angular.copy(MockUserList),
+      defaultSort = 'lastName',
+      count, pages, isPrevious, isNext;
+
+    // paged api response '/v1/users?page=2'
+    params.page = Number(params.page) || 1;
+
+    // query for last names '/v1/users?q=Archer'
+    if (params.q) {
+      userList = $filter('filter')({lastName: params.q});
+    }
+
+    pages = Math.ceil(userList.length / pagingLength);
+    isPrevious = params.page > 1;
+    isNext = params.page < pages;
+
+    return [200, {
+      count:    userList.length,
+      previous: isPrevious,
+      next:     isNext,
+      // sort field -> '/v1/users?sortBy=firstName'
+      results:  $filter('orderBy')(userList, params.sortBy || defaultSort)
+                  .splice((params.page - 1) * pagingLength, pagingLength)
+    }];
+  });
+
+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    when(method, url, [data], [headers], [keys]);

    + +

    +

    Creates a new backend definition.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + method + + + + string + +

    HTTP method.

    + + +
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + data + +
    (optional)
    +
    + stringRegExpfunction(string) + +

    HTTP request body or function that receives + data string and returns true if the data is as expected.

    + + +
    + headers + +
    (optional)
    +
    + Objectfunction(Object) + +

    HTTP headers or function that receives http header + object and returns true if the headers match the current definition.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described above.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond method that controls how a matched + request is handled. You can save this object for later use and invoke respond again in + order to change how a matched request is handled.

    +
      +
    • respond –
      {function([status,] data[, headers, statusText])
      +| function(function(method, url, data, headers, params)}
      +
      +– The respond method takes a set of static data to be returned or a function that can +return an array containing response status (number), response data (Array|Object|string), +response headers (Object), and the text for the status (string). The respond method returns +the requestHandler object for possible overrides.
    • +
    +
    +
  • + +
  • +

    whenGET(url, [headers], [keys]);

    + +

    +

    Creates a new backend definition for GET requests. For more info see when().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + headers + +
    (optional)
    +
    + Objectfunction(Object) + +

    HTTP headers.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described above.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond method that controls how a matched +request is handled. You can save this object for later use and invoke respond again in +order to change how a matched request is handled.

    +
    +
  • + +
  • +

    whenHEAD(url, [headers], [keys]);

    + +

    +

    Creates a new backend definition for HEAD requests. For more info see when().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + headers + +
    (optional)
    +
    + Objectfunction(Object) + +

    HTTP headers.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described above.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond method that controls how a matched +request is handled. You can save this object for later use and invoke respond again in +order to change how a matched request is handled.

    +
    +
  • + +
  • +

    whenDELETE(url, [headers], [keys]);

    + +

    +

    Creates a new backend definition for DELETE requests. For more info see when().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + headers + +
    (optional)
    +
    + Objectfunction(Object) + +

    HTTP headers.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described above.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond method that controls how a matched +request is handled. You can save this object for later use and invoke respond again in +order to change how a matched request is handled.

    +
    +
  • + +
  • +

    whenPOST(url, [data], [headers], [keys]);

    + +

    +

    Creates a new backend definition for POST requests. For more info see when().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + data + +
    (optional)
    +
    + stringRegExpfunction(string) + +

    HTTP request body or function that receives + data string and returns true if the data is as expected.

    + + +
    + headers + +
    (optional)
    +
    + Objectfunction(Object) + +

    HTTP headers.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described above.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond method that controls how a matched +request is handled. You can save this object for later use and invoke respond again in +order to change how a matched request is handled.

    +
    +
  • + +
  • +

    whenPUT(url, [data], [headers], [keys]);

    + +

    +

    Creates a new backend definition for PUT requests. For more info see when().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + data + +
    (optional)
    +
    + stringRegExpfunction(string) + +

    HTTP request body or function that receives + data string and returns true if the data is as expected.

    + + +
    + headers + +
    (optional)
    +
    + Objectfunction(Object) + +

    HTTP headers.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described above.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond method that controls how a matched +request is handled. You can save this object for later use and invoke respond again in +order to change how a matched request is handled.

    +
    +
  • + +
  • +

    whenJSONP(url, [keys]);

    + +

    +

    Creates a new backend definition for JSONP requests. For more info see when().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described above.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond method that controls how a matched +request is handled. You can save this object for later use and invoke respond again in +order to change how a matched request is handled.

    +
    +
  • + +
  • +

    whenRoute(method, url);

    + +

    +

    Creates a new backend definition that compares only with the requested route.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + method + + + + string + +

    HTTP method.

    + + +
    + url + + + + string + +

    HTTP url string that supports colon param matching.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond method that controls how a matched +request is handled. You can save this object for later use and invoke respond again in +order to change how a matched request is handled. See #when for more info.

    +
    +
  • + +
  • +

    expect(method, url, [data], [headers], [keys]);

    + +

    +

    Creates a new request expectation.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + method + + + + string + +

    HTTP method.

    + + +
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + data + +
    (optional)
    +
    + stringRegExpfunction(string)Object + +

    HTTP request body or function that + receives data string and returns true if the data is as expected, or Object if request body + is in JSON format.

    + + +
    + headers + +
    (optional)
    +
    + Objectfunction(Object) + +

    HTTP headers or function that receives http header + object and returns true if the headers match the current expectation.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described above.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond method that controls how a matched + request is handled. You can save this object for later use and invoke respond again in + order to change how a matched request is handled.

    +
      +
    • respond –
      { function([status,] data[, headers, statusText])
      +| function(function(method, url, data, headers, params)}
      +
      +– The respond method takes a set of static data to be returned or a function that can +return an array containing response status (number), response data (Array|Object|string), +response headers (Object), and the text for the status (string). The respond method returns +the requestHandler object for possible overrides.
    • +
    +
    +
  • + +
  • +

    expectGET(url, [headers], [keys]);

    + +

    +

    Creates a new request expectation for GET requests. For more info see expect().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + headers + +
    (optional)
    +
    + Object + +

    HTTP headers.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described above.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond method that controls how a matched +request is handled. You can save this object for later use and invoke respond again in +order to change how a matched request is handled. See #expect for more info.

    +
    +
  • + +
  • +

    expectHEAD(url, [headers], [keys]);

    + +

    +

    Creates a new request expectation for HEAD requests. For more info see expect().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + headers + +
    (optional)
    +
    + Object + +

    HTTP headers.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described above.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond method that controls how a matched + request is handled. You can save this object for later use and invoke respond again in + order to change how a matched request is handled.

    +
    +
  • + +
  • +

    expectDELETE(url, [headers], [keys]);

    + +

    +

    Creates a new request expectation for DELETE requests. For more info see expect().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + headers + +
    (optional)
    +
    + Object + +

    HTTP headers.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described above.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond method that controls how a matched + request is handled. You can save this object for later use and invoke respond again in + order to change how a matched request is handled.

    +
    +
  • + +
  • +

    expectPOST(url, [data], [headers], [keys]);

    + +

    +

    Creates a new request expectation for POST requests. For more info see expect().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + data + +
    (optional)
    +
    + stringRegExpfunction(string)Object + +

    HTTP request body or function that + receives data string and returns true if the data is as expected, or Object if request body + is in JSON format.

    + + +
    + headers + +
    (optional)
    +
    + Object + +

    HTTP headers.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described above.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond method that controls how a matched + request is handled. You can save this object for later use and invoke respond again in + order to change how a matched request is handled.

    +
    +
  • + +
  • +

    expectPUT(url, [data], [headers], [keys]);

    + +

    +

    Creates a new request expectation for PUT requests. For more info see expect().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + data + +
    (optional)
    +
    + stringRegExpfunction(string)Object + +

    HTTP request body or function that + receives data string and returns true if the data is as expected, or Object if request body + is in JSON format.

    + + +
    + headers + +
    (optional)
    +
    + Object + +

    HTTP headers.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described above.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond method that controls how a matched + request is handled. You can save this object for later use and invoke respond again in + order to change how a matched request is handled.

    +
    +
  • + +
  • +

    expectPATCH(url, [data], [headers], [keys]);

    + +

    +

    Creates a new request expectation for PATCH requests. For more info see expect().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + data + +
    (optional)
    +
    + stringRegExpfunction(string)Object + +

    HTTP request body or function that + receives data string and returns true if the data is as expected, or Object if request body + is in JSON format.

    + + +
    + headers + +
    (optional)
    +
    + Object + +

    HTTP headers.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described above.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond method that controls how a matched + request is handled. You can save this object for later use and invoke respond again in + order to change how a matched request is handled.

    +
    +
  • + +
  • +

    expectJSONP(url, [keys]);

    + +

    +

    Creates a new request expectation for JSONP requests. For more info see expect().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives an url + and returns true if the url matches the current definition.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described above.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond method that controls how a matched + request is handled. You can save this object for later use and invoke respond again in + order to change how a matched request is handled.

    +
    +
  • + +
  • +

    expectRoute(method, url);

    + +

    +

    Creates a new request expectation that compares only with the requested route.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + method + + + + string + +

    HTTP method.

    + + +
    + url + + + + string + +

    HTTP url string that supports colon param matching.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond method that controls how a matched +request is handled. You can save this object for later use and invoke respond again in +order to change how a matched request is handled. See #expect for more info.

    +
    +
  • + +
  • +

    flush([count], [skip]);

    + +

    +

    Flushes pending requests using the trained responses. Requests are flushed in the order they +were made, but it is also possible to skip one or more requests (for example to have them +flushed later). This is useful for simulating scenarios where responses arrive from the server +in any order.

    +

    If there are no pending requests to flush when the method is called, an exception is thrown (as +this is typically a sign of programming error).

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + count + +
    (optional)
    +
    + number + +

    Number of responses to flush. If undefined/null, all pending requests + (starting after skip) will be flushed.

    + + +
    + skip + +
    (optional)
    +
    + number + +

    Number of pending requests to skip. For example, a value of 5 + would skip the first 5 pending requests and start flushing from the 6th onwards.

    + +

    (default: 0)

    +
    + + + + + +
  • + +
  • +

    verifyNoOutstandingExpectation();

    + +

    +

    Verifies that all of the requests defined via the expect api were made. If any of the +requests were not made, verifyNoOutstandingExpectation throws an exception.

    +

    Typically, you would call this method following each test case that asserts requests using an +"afterEach" clause.

    +
    afterEach($httpBackend.verifyNoOutstandingExpectation);
    +
    +
    + + + + + + + +
  • + +
  • +

    verifyNoOutstandingRequest();

    + +

    +

    Verifies that there are no outstanding requests that need to be flushed.

    +

    Typically, you would call this method following each test case that asserts requests using an +"afterEach" clause.

    +
    afterEach($httpBackend.verifyNoOutstandingRequest);
    +
    +
    + + + + + + + +
  • + +
  • +

    resetExpectations();

    + +

    +

    Resets all request expectations, but preserves all backend definitions. Typically, you would +call resetExpectations during a multiple-phase test when you want to reuse the same instance of +$httpBackend mock.

    +
    + + + + + + + +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngMock/service/$interval.html b/1.6.6/docs/partials/api/ngMock/service/$interval.html new file mode 100644 index 000000000..389049400 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock/service/$interval.html @@ -0,0 +1,282 @@ + Improve this Doc + + + + +  View Source + + + +
+

$interval

+
    + + + +
  1. + - service in module ngMock +
  2. +
+
+ + + + + +
+

Mock implementation of the $interval service.

+

Use $interval.flush(millis) to +move forward by millis milliseconds and trigger any functions scheduled to run in that +time.

+ +
+ + + + +
+ + + + +

Usage

+ +

$interval(fn, delay, [count], [invokeApply], [Pass]);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ fn + + + + function() + +

A function that should be called repeatedly.

+ + +
+ delay + + + + number + +

Number of milliseconds between each function call.

+ + +
+ count + +
(optional)
+
+ number + +

Number of times to repeat. If not set, or 0, will repeat + indefinitely.

+ +

(default: 0)

+
+ invokeApply + +
(optional)
+
+ boolean + +

If set to false skips model dirty checking, otherwise + will invoke fn within the $apply block.

+ +

(default: true)

+
+ Pass + +
(optional)
+
+ * + +

additional parameters to the executed function.

+ + +
+ +
+ +

Returns

+ + + + + +
promise

A promise which will be notified on each iteration.

+
+ + +

Methods

+
    +
  • +

    cancel(promise);

    + +

    +

    Cancels a task associated with the promise.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + promise + + + + promise + +

    A promise from calling the $interval function.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    boolean

    Returns true if the task was successfully cancelled.

    +
    +
  • + +
  • +

    flush([millis]);

    + +

    +

    Runs interval tasks scheduled to be run in the next millis milliseconds.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + millis + +
    (optional)
    +
    + number + +

    maximum timeout amount to flush up until.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    number

    The amount of time moved forward.

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngMock/service/$log.html b/1.6.6/docs/partials/api/ngMock/service/$log.html new file mode 100644 index 000000000..f9db3ad29 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock/service/$log.html @@ -0,0 +1,147 @@ + Improve this Doc + + + + +  View Source + + + +
+

$log

+
    + + + +
  1. + - service in module ngMock +
  2. +
+
+ + + + + +
+

Mock implementation of $log that gathers all logged messages in arrays +(one array per logging level). These arrays are exposed as logs property of each of the +level-specific log function, e.g. for level error the array is exposed as $log.error.logs.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    reset();

    + +

    +

    Reset all of the logging arrays to empty.

    +
    + + + + + + + +
  • + +
  • +

    assertEmpty();

    + +

    +

    Assert that all of the logging methods have no logged messages. If any messages are present, +an exception is thrown.

    +
    + + + + + + + +
  • +
+ + +

Properties

+
    +
  • +

    log.logs

    + + + + + +

    Array of messages logged using log().

    +
    + +
  • + +
  • +

    info.logs

    + + + + + +

    Array of messages logged using info().

    +
    + +
  • + +
  • +

    warn.logs

    + + + + + +

    Array of messages logged using warn().

    +
    + +
  • + +
  • +

    error.logs

    + + + + + +

    Array of messages logged using error().

    +
    + +
  • + +
  • +

    debug.logs

    + + + + + +

    Array of messages logged using debug().

    +
    + +
  • +
+ + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngMock/service/$timeout.html b/1.6.6/docs/partials/api/ngMock/service/$timeout.html new file mode 100644 index 000000000..06aae2b81 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock/service/$timeout.html @@ -0,0 +1,115 @@ + Improve this Doc + + + + +  View Source + + + +
+

$timeout

+
    + + + +
  1. + - service in module ngMock +
  2. +
+
+ + + + + +
+

This service is just a simple decorator for $timeout service +that adds a "flush" and "verifyNoPendingTasks" methods.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    flush([delay]);

    + +

    +

    Flushes the queue of pending tasks.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + delay + +
    (optional)
    +
    + number + +

    maximum timeout amount to flush up until

    + + +
    + + + + + +
  • + +
  • +

    verifyNoPendingTasks();

    + +

    +

    Verifies that there are no pending tasks that need to be flushed.

    +
    + + + + + + + +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngMock/type.html b/1.6.6/docs/partials/api/ngMock/type.html new file mode 100644 index 000000000..cb38446a6 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock/type.html @@ -0,0 +1,31 @@ + +

Type components in ngMock

+ + + +
+
+ + + + + + + + + + + + + + + + +
NameDescription
angular.mock.TzDate

NOTE: this is not an injectable instance, just a globally available mock class of Date.

+
$rootScope.Scope

Scope type decorated with helper methods useful for testing. These +methods are automatically available on any Scope instance when +ngMock module is loaded.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngMock/type/$rootScope.Scope.html b/1.6.6/docs/partials/api/ngMock/type/$rootScope.Scope.html new file mode 100644 index 000000000..a63590161 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock/type/$rootScope.Scope.html @@ -0,0 +1,112 @@ + Improve this Doc + + + + +  View Source + + + +
+

$rootScope.Scope

+
    + +
  1. + - type in module ngMock +
  2. +
+
+ + + + + +
+

Scope type decorated with helper methods useful for testing. These +methods are automatically available on any Scope instance when +ngMock module is loaded.

+

In addition to all the regular Scope methods, the following helper methods are available:

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    $countChildScopes();

    + +

    +

    Counts all the direct and indirect child scopes of the current scope.

    +

    The current scope is excluded from the count. The count includes all isolate child scopes.

    +
    + + + + + + +

    Method's
    this

    +

    $rootScope.Scope

    + + + + +

    Returns

    + + + + + +
    number

    Total number of child scopes.

    +
    +
  • + +
  • +

    $countWatchers();

    + +

    +

    Counts all the watchers of direct and indirect child scopes of the current scope.

    +

    The watchers of the current scope are included in the count and so are all the watchers of +isolate child scopes.

    +
    + + + + + + +

    Method's
    this

    +

    $rootScope.Scope

    + + + + +

    Returns

    + + + + + +
    number

    Total number of watchers.

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngMock/type/angular.mock.TzDate.html b/1.6.6/docs/partials/api/ngMock/type/angular.mock.TzDate.html new file mode 100644 index 000000000..e6ed88450 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMock/type/angular.mock.TzDate.html @@ -0,0 +1,126 @@ + Improve this Doc + + + + +  View Source + + + +
+

angular.mock.TzDate

+
    + +
  1. + - type in module ngMock +
  2. +
+
+ + + + + +
+

NOTE: this is not an injectable instance, just a globally available mock class of Date.

+

Mock of the Date type which has its timezone specified via constructor arg.

+

The main purpose is to create Date-like instances with timezone fixed to the specified timezone +offset, so that we can test code that depends on local timezone settings without dependency on +the time zone settings of the machine where the code is running.

+ +
+ + + + +
+ + + + +

Usage

+ +

angular.mock.TzDate(offset, timestamp);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ offset + + + + number + +

Offset of the desired timezone in hours (fractions will be honored)

+ + +
+ timestamp + + + + numberstring + +

Timestamp representing the desired time in UTC

+ + +
+ +
+ + + + + + + + + + +

Examples

!!!! WARNING !!!!! +This is not a complete Date object so only methods that were implemented can be called safely. +To make matters worse, TzDate instances inherit stuff from Date via a prototype.

+

We do our best to intercept calls to "unimplemented" methods, but since the list of methods is +incomplete we might be missing some non-standard methods. This can result in errors like: +"Date.prototype.foo called on incompatible Object".

+
var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00Z');
+newYearInBratislava.getTimezoneOffset() => -60;
+newYearInBratislava.getFullYear() => 2010;
+newYearInBratislava.getMonth() => 0;
+newYearInBratislava.getDate() => 1;
+newYearInBratislava.getHours() => 0;
+newYearInBratislava.getMinutes() => 0;
+newYearInBratislava.getSeconds() => 0;
+
+ +
+ + diff --git a/1.6.6/docs/partials/api/ngMockE2E.html b/1.6.6/docs/partials/api/ngMockE2E.html new file mode 100644 index 000000000..ce6828e9a --- /dev/null +++ b/1.6.6/docs/partials/api/ngMockE2E.html @@ -0,0 +1,82 @@ + Improve this Doc + + +

+ ngMockE2E +

+ + + +

Installation

+ + +

First, get the file:

+
    +
  • + Google CDN e.g. +
    "//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-mocks.js"
    +
  • +
  • + NPM e.g. +
    npm install --save angular-mocks@X.Y.Z
    + or +
    yarn add angular-mocks@X.Y.Z
    +
  • +
  • + Bower e.g. +
    bower install angular-mocks#X.Y.Z
    +
  • +
  • + code.angularjs.org + (discouraged for production use) e.g. +
    "//code.angularjs.org/X.Y.Z/angular-mocks.js"
    +
  • +
+

where X.Y.Z is the AngularJS version you are running.

+ +

Then, include angular-mocks.js in your HTML:

+ +
<script src="path/to/angular.js"></script>
<script src="path/to/angular-mocks.js"></script>
+ +

Finally, load the module in your application by adding it as a dependent module:

+
angular.module('app', ['ngMockE2E']);
+ +

With that you're ready to get started!

+ + +

The ngMockE2E is an angular module which contains mocks suitable for end-to-end testing. +Currently there is only one mock present in this module - +the e2e $httpBackend mock.

+ + + + + + +
+

Module Components

+ +
+

Service

+ + + + + + + + + + + +
NameDescription
$httpBackend

Fake HTTP backend implementation suitable for end-to-end testing or backend-less development of +applications that use the $http service.

+
+
+ +
+ + + + + diff --git a/1.6.6/docs/partials/api/ngMockE2E/service.html b/1.6.6/docs/partials/api/ngMockE2E/service.html new file mode 100644 index 000000000..01e6db604 --- /dev/null +++ b/1.6.6/docs/partials/api/ngMockE2E/service.html @@ -0,0 +1,24 @@ + +

Service components in ngMockE2E

+ + + +
+
+ + + + + + + + + + + +
NameDescription
$httpBackend

Fake HTTP backend implementation suitable for end-to-end testing or backend-less development of +applications that use the $http service.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngMockE2E/service/$httpBackend.html b/1.6.6/docs/partials/api/ngMockE2E/service/$httpBackend.html new file mode 100644 index 000000000..b373f808a --- /dev/null +++ b/1.6.6/docs/partials/api/ngMockE2E/service/$httpBackend.html @@ -0,0 +1,1022 @@ + Improve this Doc + + + + +  View Source + + + +
+

$httpBackend

+
    + + + +
  1. + - service in module ngMockE2E +
  2. +
+
+ + + + + +
+

Fake HTTP backend implementation suitable for end-to-end testing or backend-less development of +applications that use the $http service.

+
+Note: For fake http backend implementation suitable for unit testing please see +unit-testing $httpBackend mock. +
+ +

This implementation can be used to respond with static or dynamic responses via the when api +and its shortcuts (whenGET, whenPOST, etc) and optionally pass through requests to the +real $httpBackend for specific requests (e.g. to interact with certain remote apis or to fetch +templates from a webserver).

+

As opposed to unit-testing, in an end-to-end testing scenario or in scenario when an application +is being developed with the real backend api replaced with a mock, it is often desirable for +certain category of requests to bypass the mock and issue a real http request (e.g. to fetch +templates or static files from the webserver). To configure the backend with this behavior +use the passThrough request handler of when instead of respond.

+

Additionally, we don't want to manually have to flush mocked out requests like we do during unit +testing. For this reason the e2e $httpBackend flushes mocked out requests +automatically, closely simulating the behavior of the XMLHttpRequest object.

+

To setup the application to run with this http backend, you have to create a module that depends +on the ngMockE2E and your application modules and defines the fake backend:

+
var myAppDev = angular.module('myAppDev', ['myApp', 'ngMockE2E']);
+myAppDev.run(function($httpBackend) {
+  var phones = [{name: 'phone1'}, {name: 'phone2'}];
+
+  // returns the current list of phones
+  $httpBackend.whenGET('/phones').respond(phones);
+
+  // adds a new phone to the phones array
+  $httpBackend.whenPOST('/phones').respond(function(method, url, data) {
+    var phone = angular.fromJson(data);
+    phones.push(phone);
+    return [200, phone, {}];
+  });
+  $httpBackend.whenGET(/^\/templates\//).passThrough(); // Requests for templates are handled by the real server
+  //...
+});
+
+

Afterwards, bootstrap your app with this new module.

+

Example

+

+ +

+ + +
+ + +
+
var myApp = angular.module('myApp', []);

myApp.controller('MainCtrl', function MainCtrl($http) {
  var ctrl = this;

  ctrl.phones = [];
  ctrl.newPhone = {
    name: ''
  };

  ctrl.getPhones = function() {
    $http.get('/phones').then(function(response) {
      ctrl.phones = response.data;
    });
  };

  ctrl.addPhone = function(phone) {
    $http.post('/phones', phone).then(function() {
      ctrl.newPhone = {name: ''};
      return ctrl.getPhones();
    });
  };

  ctrl.getPhones();
});
+
+ +
+
var myAppDev = angular.module('myAppE2E', ['myApp', 'ngMockE2E']);

myAppDev.run(function($httpBackend) {
  var phones = [{name: 'phone1'}, {name: 'phone2'}];

  // returns the current list of phones
  $httpBackend.whenGET('/phones').respond(phones);

  // adds a new phone to the phones array
  $httpBackend.whenPOST('/phones').respond(function(method, url, data) {
    var phone = angular.fromJson(data);
    phones.push(phone);
    return [200, phone, {}];
  });
});
+
+ +
+
<div ng-controller="MainCtrl as $ctrl">
<form name="newPhoneForm" ng-submit="$ctrl.addPhone($ctrl.newPhone)">
  <input type="text" ng-model="$ctrl.newPhone.name">
  <input type="submit" value="Add Phone">
</form>
<h1>Phones</h1>
<ul>
  <li ng-repeat="phone in $ctrl.phones">{{phone.name}}</li>
</ul>
</div>
+
+ + + +
+
+ + +

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    when(method, url, [data], [headers], [keys]);

    + +

    +

    Creates a new backend definition.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + method + + + + string + +

    HTTP method.

    + + +
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + data + +
    (optional)
    +
    + stringRegExpfunction(string) + +

    HTTP request body or function that receives + data string and returns true if the data is as expected.

    + + +
    + headers + +
    (optional)
    +
    + Objectfunction(Object) + +

    HTTP headers or function that receives http header + object and returns true if the headers match the current definition.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described on + $httpBackend mock.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond and passThrough methods that + control how a matched request is handled. You can save this object for later use and invoke + respond or passThrough again in order to change how a matched request is handled.

    +
      +
    • respond –
      { function([status,] data[, headers, statusText])
      +| function(function(method, url, data, headers, params)}
      +
      +– The respond method takes a set of static data to be returned or a function that can return +an array containing response status (number), response data (Array|Object|string), response +headers (Object), and the text for the status (string).
    • +
    • passThrough – {function()} – Any request matching a backend definition with +passThrough handler will be passed through to the real backend (an XHR request will be made +to the server.)
    • +
    • Both methods return the requestHandler object for possible overrides.
    • +
    +
    +
  • + +
  • +

    whenGET(url, [headers], [keys]);

    + +

    +

    Creates a new backend definition for GET requests. For more info see when().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + headers + +
    (optional)
    +
    + Objectfunction(Object) + +

    HTTP headers.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described on + $httpBackend mock.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond and passThrough methods that + control how a matched request is handled. You can save this object for later use and invoke + respond or passThrough again in order to change how a matched request is handled.

    +
    +
  • + +
  • +

    whenHEAD(url, [headers], [keys]);

    + +

    +

    Creates a new backend definition for HEAD requests. For more info see when().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + headers + +
    (optional)
    +
    + Objectfunction(Object) + +

    HTTP headers.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described on + $httpBackend mock.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond and passThrough methods that + control how a matched request is handled. You can save this object for later use and invoke + respond or passThrough again in order to change how a matched request is handled.

    +
    +
  • + +
  • +

    whenDELETE(url, [headers], [keys]);

    + +

    +

    Creates a new backend definition for DELETE requests. For more info see when().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + headers + +
    (optional)
    +
    + Objectfunction(Object) + +

    HTTP headers.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described on + $httpBackend mock.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond and passThrough methods that + control how a matched request is handled. You can save this object for later use and invoke + respond or passThrough again in order to change how a matched request is handled.

    +
    +
  • + +
  • +

    whenPOST(url, [data], [headers], [keys]);

    + +

    +

    Creates a new backend definition for POST requests. For more info see when().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + data + +
    (optional)
    +
    + stringRegExpfunction(string) + +

    HTTP request body or function that receives + data string and returns true if the data is as expected.

    + + +
    + headers + +
    (optional)
    +
    + Objectfunction(Object) + +

    HTTP headers.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described on + $httpBackend mock.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond and passThrough methods that + control how a matched request is handled. You can save this object for later use and invoke + respond or passThrough again in order to change how a matched request is handled.

    +
    +
  • + +
  • +

    whenPUT(url, [data], [headers], [keys]);

    + +

    +

    Creates a new backend definition for PUT requests. For more info see when().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + data + +
    (optional)
    +
    + stringRegExpfunction(string) + +

    HTTP request body or function that receives + data string and returns true if the data is as expected.

    + + +
    + headers + +
    (optional)
    +
    + Objectfunction(Object) + +

    HTTP headers.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described on + $httpBackend mock.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond and passThrough methods that + control how a matched request is handled. You can save this object for later use and invoke + respond or passThrough again in order to change how a matched request is handled.

    +
    +
  • + +
  • +

    whenPATCH(url, [data], [headers], [keys]);

    + +

    +

    Creates a new backend definition for PATCH requests. For more info see when().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + data + +
    (optional)
    +
    + stringRegExpfunction(string) + +

    HTTP request body or function that receives + data string and returns true if the data is as expected.

    + + +
    + headers + +
    (optional)
    +
    + Objectfunction(Object) + +

    HTTP headers.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described on + $httpBackend mock.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond and passThrough methods that + control how a matched request is handled. You can save this object for later use and invoke + respond or passThrough again in order to change how a matched request is handled.

    +
    +
  • + +
  • +

    whenJSONP(url, [keys]);

    + +

    +

    Creates a new backend definition for JSONP requests. For more info see when().

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + url + + + + stringRegExpfunction(string)= + +

    HTTP url or function that receives a url + and returns true if the url matches the current definition.

    + + +
    + keys + +
    (optional)
    +
    + Array + +

    Array of keys to assign to regex matches in request url described on + $httpBackend mock.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond and passThrough methods that + control how a matched request is handled. You can save this object for later use and invoke + respond or passThrough again in order to change how a matched request is handled.

    +
    +
  • + +
  • +

    whenRoute(method, url);

    + +

    +

    Creates a new backend definition that compares only with the requested route.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + method + + + + string + +

    HTTP method.

    + + +
    + url + + + + string + +

    HTTP url string that supports colon param matching.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    requestHandler

    Returns an object with respond and passThrough methods that + control how a matched request is handled. You can save this object for later use and invoke + respond or passThrough again in order to change how a matched request is handled.

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngParseExt.html b/1.6.6/docs/partials/api/ngParseExt.html new file mode 100644 index 000000000..d6145475f --- /dev/null +++ b/1.6.6/docs/partials/api/ngParseExt.html @@ -0,0 +1,64 @@ + Improve this Doc + + +

+ ngParseExt +

+ + + +

Installation

+ + +

First, get the file:

+
    +
  • + Google CDN e.g. +
    "//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-parse-ext.js"
    +
  • +
  • + NPM e.g. +
    npm install --save angular-parse-ext@X.Y.Z
    + or +
    yarn add angular-parse-ext@X.Y.Z
    +
  • +
  • + Bower e.g. +
    bower install angular-parse-ext#X.Y.Z
    +
  • +
  • + code.angularjs.org + (discouraged for production use) e.g. +
    "//code.angularjs.org/X.Y.Z/angular-parse-ext.js"
    +
  • +
+

where X.Y.Z is the AngularJS version you are running.

+ +

Then, include angular-parse-ext.js in your HTML:

+ +
<script src="path/to/angular.js"></script>
<script src="path/to/angular-parse-ext.js"></script>
+ +

Finally, load the module in your application by adding it as a dependent module:

+
angular.module('app', ['ngParseExt']);
+ +

With that you're ready to get started!

+ + +

ngParseExt

+

The ngParseExt module provides functionality to allow Unicode characters in +identifiers inside Angular expressions.

+
+ +

This module allows the usage of any identifier that follows ES6 identifier naming convention +to be used as an identifier in an Angular expression. ES6 delegates some of the identifier +rules definition to Unicode, this module uses ES6 and Unicode 8.0 identifiers convention.

+ + + + + + + + + + diff --git a/1.6.6/docs/partials/api/ngResource.html b/1.6.6/docs/partials/api/ngResource.html new file mode 100644 index 000000000..8f3da8750 --- /dev/null +++ b/1.6.6/docs/partials/api/ngResource.html @@ -0,0 +1,103 @@ + Improve this Doc + + +

+ ngResource +

+ + + +

Installation

+ + +

First, get the file:

+
    +
  • + Google CDN e.g. +
    "//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-resource.js"
    +
  • +
  • + NPM e.g. +
    npm install --save angular-resource@X.Y.Z
    + or +
    yarn add angular-resource@X.Y.Z
    +
  • +
  • + Bower e.g. +
    bower install angular-resource#X.Y.Z
    +
  • +
  • + code.angularjs.org + (discouraged for production use) e.g. +
    "//code.angularjs.org/X.Y.Z/angular-resource.js"
    +
  • +
+

where X.Y.Z is the AngularJS version you are running.

+ +

Then, include angular-resource.js in your HTML:

+ +
<script src="path/to/angular.js"></script>
<script src="path/to/angular-resource.js"></script>
+ +

Finally, load the module in your application by adding it as a dependent module:

+
angular.module('app', ['ngResource']);
+ +

With that you're ready to get started!

+ + +

ngResource

+

The ngResource module provides interaction support with RESTful services +via the $resource service.

+
+ +

See $resourceProvider and $resource for usage.

+ + + + + + +
+

Module Components

+ +
+

Provider

+ + + + + + + + + + + +
NameDescription
$resourceProvider

Use $resourceProvider to change the default behavior of the $resource +service.

+
+
+ +
+

Service

+ + + + + + + + + + + +
NameDescription
$resource

A factory which creates a resource object that lets you interact with +RESTful server-side data sources.

+
+
+ +
+ + + + + diff --git a/1.6.6/docs/partials/api/ngResource/provider.html b/1.6.6/docs/partials/api/ngResource/provider.html new file mode 100644 index 000000000..bed54cbfe --- /dev/null +++ b/1.6.6/docs/partials/api/ngResource/provider.html @@ -0,0 +1,24 @@ + +

Provider components in ngResource

+ + + +
+
+ + + + + + + + + + + +
NameDescription
$resourceProvider

Use $resourceProvider to change the default behavior of the $resource +service.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngResource/provider/$resourceProvider.html b/1.6.6/docs/partials/api/ngResource/provider/$resourceProvider.html new file mode 100644 index 000000000..5e723b847 --- /dev/null +++ b/1.6.6/docs/partials/api/ngResource/provider/$resourceProvider.html @@ -0,0 +1,119 @@ + Improve this Doc + + + + +  View Source + + + +
+

$resourceProvider

+
    + +
  1. + - $resource +
  2. + +
  3. + - provider in module ngResource +
  4. +
+
+ + + + + +
+

Use $resourceProvider to change the default behavior of the $resource +service.

+

Dependencies

+

Requires the ngResource module to be installed.

+ +
+ + + + +
+ + + + + + + + + +

Properties

+
    +
  • +

    defaults

    + + + + + +

    Object containing default options used when creating $resource instances.

    +

    The default values satisfy a wide range of usecases, but you may choose to overwrite any of +them to further customize your instances. The available properties are:

    +
      +
    • stripTrailingSlashes{boolean} – If true, then the trailing slashes from any +calculated URL will be stripped.
      +(Defaults to true.)
    • +
    • cancellable{boolean} – If true, the request made by a "non-instance" call will be +cancelled (if not already completed) by calling $cancelRequest() on the call's return +value. For more details, see $resource. This can be overwritten per +resource class or action.
      +(Defaults to false.)
    • +
    • actions - {Object.<Object>} - A hash with default actions declarations. Actions are +high-level methods corresponding to RESTful actions/methods on resources. An action may +specify what HTTP method to use, what URL to hit, if the return value will be a single +object or a collection (array) of objects etc. For more details, see +$resource. The actions can also be enhanced or overwritten per resource +class.
      +The default actions are:
      {
      +  get: {method: 'GET'},
      +  save: {method: 'POST'},
      +  query: {method: 'GET', isArray: true},
      +  remove: {method: 'DELETE'},
      +  delete: {method: 'DELETE'}
      +}
      +
      +
    • +
    +

    Example

    +

    For example, you can specify a new update action that uses the PUT HTTP verb:

    +
    angular.
    +  module('myApp').
    +  config(['$resourceProvider', function ($resourceProvider) {
    +    $resourceProvider.defaults.actions.update = {
    +      method: 'PUT'
    +    };
    +  }]);
    +
    +

    Or you can even overwrite the whole actions list and specify your own:

    +
    angular.
    +  module('myApp').
    +  config(['$resourceProvider', function ($resourceProvider) {
    +    $resourceProvider.defaults.actions = {
    +      create: {method: 'POST'},
    +      get:    {method: 'GET'},
    +      getAll: {method: 'GET', isArray:true},
    +      update: {method: 'PUT'},
    +      delete: {method: 'DELETE'}
    +    };
    +  });
    +
    +
    + +
  • +
+ + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngResource/service.html b/1.6.6/docs/partials/api/ngResource/service.html new file mode 100644 index 000000000..14f3d2e8c --- /dev/null +++ b/1.6.6/docs/partials/api/ngResource/service.html @@ -0,0 +1,24 @@ + +

Service components in ngResource

+ + + +
+
+ + + + + + + + + + + +
NameDescription
$resource

A factory which creates a resource object that lets you interact with +RESTful server-side data sources.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngResource/service/$resource.html b/1.6.6/docs/partials/api/ngResource/service/$resource.html new file mode 100644 index 000000000..54a80e910 --- /dev/null +++ b/1.6.6/docs/partials/api/ngResource/service/$resource.html @@ -0,0 +1,448 @@ + Improve this Doc + + + + +  View Source + + + +
+

$resource

+
    + +
  1. + - $resourceProvider +
  2. + +
  3. + - service in module ngResource +
  4. +
+
+ + + + + +
+

A factory which creates a resource object that lets you interact with +RESTful server-side data sources.

+

The returned resource object has action methods which provide high-level behaviors without +the need to interact with the low level $http service.

+

Requires the ngResource module to be installed.

+

By default, trailing slashes will be stripped from the calculated URLs, +which can pose problems with server backends that do not expect that +behavior. This can be disabled by configuring the $resourceProvider like +this:

+
app.config(['$resourceProvider', function($resourceProvider) {
+  // Don't strip trailing slashes from calculated URLs
+  $resourceProvider.defaults.stripTrailingSlashes = false;
+}]);
+
+ +
+ + + + +
+ +

Dependencies

+ + + + + +

Usage

+ +

$resource(url, [paramDefaults], [actions], options);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ url + + + + string + +

A parameterized URL template with parameters prefixed by : as in + /user/:username. If you are using a URL with a port number (e.g. + http://example.com:8080/api), it will be respected.

+

If you are using a url with a suffix, just add the suffix, like this: + $resource('http://example.com/resource.json') or $resource('http://example.com/:id.json') + or even $resource('http://example.com/resource/:resource_id.:format') + If the parameter before the suffix is empty, :resource_id in this case, then the /. will be + collapsed down to a single .. If you need this sequence to appear and not collapse then you + can escape it with /\..

+ + +
+ paramDefaults + +
(optional)
+
+ Object + +

Default values for url parameters. These can be overridden in + actions methods. If a parameter value is a function, it will be called every time + a param value needs to be obtained for a request (unless the param was overridden). The function + will be passed the current data value as an argument.

+

Each key value in the parameter object is first bound to url template if present and then any + excess keys are appended to the url search query after the ?.

+

Given a template /path/:verb and parameter {verb:'greet', salutation:'Hello'} results in + URL /path/greet?salutation=Hello.

+

If the parameter value is prefixed with @, then the value for that parameter will be + extracted from the corresponding property on the data object (provided when calling actions + with a request body). + For example, if the defaultParam object is {someParam: '@someProp'} then the value of + someParam will be data.someProp. + Note that the parameter will be ignored, when calling a "GET" action method (i.e. an action + method that does not accept a request body)

+ + +
+ actions + +
(optional)
+
+ Object.<Object>= + +

Hash with declaration of custom actions that will be available + in addition to the default set of resource actions (see below). If a custom action has the same + key as a default action (e.g. save), then the default action will be overwritten, and not + extended.

+

The declaration should be created in the format of $http.config:

+
{action1: {method:?, params:?, isArray:?, headers:?, ...},
+ action2: {method:?, params:?, isArray:?, headers:?, ...},
+ ...}
+
+

Where:

+
    +
  • action – {string} – The name of action. This name becomes the name of the method on +your resource object.
  • +
  • method – {string} – Case insensitive HTTP method (e.g. GET, POST, PUT, +DELETE, JSONP, etc).
  • +
  • params – {Object=} – Optional set of pre-bound parameters for this action. If any of +the parameter value is a function, it will be called every time when a param value needs to +be obtained for a request (unless the param was overridden). The function will be passed the +current data value as an argument.
  • +
  • url – {string} – action specific url override. The url templating is supported just +like for the resource-level urls.
  • +
  • isArray – {boolean=} – If true then the returned object for this action is an array, +see returns section.
  • +
  • transformRequest – +{function(data, headersGetter)|Array.<function(data, headersGetter)>} – +transform function or an array of such functions. The transform function takes the http +request body and headers and returns its transformed (typically serialized) version. +By default, transformRequest will contain one function that checks if the request data is +an object and serializes it using angular.toJson. To prevent this behavior, set +transformRequest to an empty array: transformRequest: []
  • +
  • transformResponse – +{function(data, headersGetter, status)|Array.<function(data, headersGetter, status)>} – +transform function or an array of such functions. The transform function takes the http +response body, headers and status and returns its transformed (typically deserialized) +version. +By default, transformResponse will contain one function that checks if the response looks +like a JSON string and deserializes it using angular.fromJson. To prevent this behavior, +set transformResponse to an empty array: transformResponse: []
  • +
  • cache{boolean|Cache} – If true, a default $http cache will be used to cache the +GET request, otherwise if a cache instance built with +$cacheFactory is supplied, this cache will be used for +caching.
  • +
  • timeout{number} – timeout in milliseconds.
    +Note: In contrast to $http.config, promises are +not supported in $resource, because the same value would be used for multiple requests. +If you are looking for a way to cancel requests, you should use the cancellable option.
  • +
  • cancellable{boolean} – if set to true, the request made by a "non-instance" call +will be cancelled (if not already completed) by calling $cancelRequest() on the call's +return value. Calling $cancelRequest() for a non-cancellable or an already +completed/cancelled request will have no effect.
  • +
  • withCredentials - {boolean} - whether to set the withCredentials flag on the +XHR object. See +requests with credentials +for more information.
  • +
  • responseType - {string} - see +requestType.
  • +
  • interceptor - {Object=} - The interceptor object has two optional methods - +response and responseError. Both response and responseError interceptors get called +with http response object. See $http interceptors. In addition, the +resource instance or array object is accessible by the resource property of the +http response object. +Keep in mind that the associated promise will be resolved with the value returned by the +response interceptor, if one is specified. The default response interceptor returns +response.resource (i.e. the resource instance or array).
  • +
  • hasBody - {boolean} - allows to specify if a request body should be included or not. +If not specified only POST, PUT and PATCH requests will have a body.
  • +
+ + +
+ options + + + + Object + +

Hash with custom settings that should extend the + default $resourceProvider behavior. The supported options are:

+
    +
  • stripTrailingSlashes – {boolean} – If true then the trailing +slashes from any calculated URL will be stripped. (Defaults to true.)
  • +
  • cancellable – {boolean} – If true, the request made by a "non-instance" call will be +cancelled (if not already completed) by calling $cancelRequest() on the call's return value. +This can be overwritten per action. (Defaults to false.)
  • +
+ + +
+ +
+ +

Returns

+ + + + + +
Object

A resource "class" object with methods for the default set of resource actions + optionally extended with custom actions. The default set contains these actions:

+
{ 'get':    {method:'GET'},
+  'save':   {method:'POST'},
+  'query':  {method:'GET', isArray:true},
+  'remove': {method:'DELETE'},
+  'delete': {method:'DELETE'} };
+
+

Calling these methods invoke an $http with the specified http method, + destination and parameters. When the data is returned from the server then the object is an + instance of the resource class. The actions save, remove and delete are available on it + as methods with the $ prefix. This allows you to easily perform CRUD operations (create, + read, update, delete) on server-side data like this:

+
var User = $resource('/user/:userId', {userId:'@id'});
+var user = User.get({userId:123}, function() {
+  user.abc = true;
+  user.$save();
+});
+
+

It is important to realize that invoking a $resource object method immediately returns an + empty reference (object or array depending on isArray). Once the data is returned from the + server the existing reference is populated with the actual data. This is a useful trick since + usually the resource is assigned to a model which is then rendered by the view. Having an empty + object results in no rendering, once the data arrives from the server then the object is + populated with the data and the view automatically re-renders itself showing the new data. This + means that in most cases one never has to write a callback function for the action methods.

+

The action methods on the class object or instance object can be invoked with the following + parameters:

+
    +
  • "class" actions without a body: Resource.action([parameters], [success], [error])
  • +
  • "class" actions with a body: Resource.action([parameters], postData, [success], [error])
  • +
  • instance actions: instance.$action([parameters], [success], [error])
  • +
+

When calling instance methods, the instance itself is used as the request body (if the action + should have a body). By default, only actions using POST, PUT or PATCH have request + bodies, but you can use the hasBody configuration option to specify whether an action + should have a body or not (regardless of its HTTP method).

+

Success callback is called with (value (Object|Array), responseHeaders (Function), + status (number), statusText (string)) arguments, where the value is the populated resource + instance or collection object. The error callback is called with (httpResponse) argument.

+

Class actions return empty instance (with additional properties below). + Instance actions return promise of the action.

+

The Resource instances and collections have these additional properties:

+
    +
  • $promise: the promise of the original server interaction that created this +instance or collection.

    +

    On success, the promise is resolved with the same resource instance or collection object, +updated with data from server. This makes it easy to use in +resolve section of $routeProvider.when() to defer view +rendering until the resource(s) are loaded.

    +

    On failure, the promise is rejected with the http response object.

    +

    If an interceptor object was provided, the promise will instead be resolved with the value +returned by the interceptor.

    +
  • +
  • $resolved: true after first server interaction is completed (either with success or + rejection), false before that. Knowing if the Resource has been resolved is useful in + data-binding.

    +

    The Resource instances and collections have these additional methods:

    +
  • +
  • $cancelRequest: If there is a cancellable, pending request related to the instance or + collection, calling this method will abort the request.

    +

    The Resource instances have these additional methods:

    +
  • +
  • toJSON: It returns a simple object without any of the extra properties added as part of +the Resource API. This object can be serialized through angular.toJson safely +without attaching Angular-specific fields. Notice that JSON.stringify (and +angular.toJson) automatically use this method when serializing a Resource instance +(see MDN).

    +
  • +
+
+ + + + + + + + +

Examples

Credit card resource

+
// Define CreditCard class
+var CreditCard = $resource('/user/:userId/card/:cardId',
+ {userId:123, cardId:'@id'}, {
+  charge: {method:'POST', params:{charge:true}}
+ });
+
+// We can retrieve a collection from the server
+var cards = CreditCard.query(function() {
+  // GET: /user/123/card
+  // server returns: [ {id:456, number:'1234', name:'Smith'} ];
+
+  var card = cards[0];
+  // each item is an instance of CreditCard
+  expect(card instanceof CreditCard).toEqual(true);
+  card.name = "J. Smith";
+  // non GET methods are mapped onto the instances
+  card.$save();
+  // POST: /user/123/card/456 {id:456, number:'1234', name:'J. Smith'}
+  // server returns: {id:456, number:'1234', name: 'J. Smith'};
+
+  // our custom method is mapped as well.
+  card.$charge({amount:9.99});
+  // POST: /user/123/card/456?amount=9.99&charge=true {id:456, number:'1234', name:'J. Smith'}
+});
+
+// we can create an instance as well
+var newCard = new CreditCard({number:'0123'});
+newCard.name = "Mike Smith";
+newCard.$save();
+// POST: /user/123/card {number:'0123', name:'Mike Smith'}
+// server returns: {id:789, number:'0123', name: 'Mike Smith'};
+expect(newCard.id).toEqual(789);
+
+

The object returned from this function execution is a resource "class" which has "static" method +for each action in the definition.

+

Calling these methods invoke $http on the url template with the given method, params and +headers.

+

User resource

+

When the data is returned from the server then the object is an instance of the resource type and +all of the non-GET methods are available with $ prefix. This allows you to easily support CRUD +operations (create, read, update, delete) on server-side data.

+
var User = $resource('/user/:userId', {userId:'@id'});
+User.get({userId:123}, function(user) {
+  user.abc = true;
+  user.$save();
+});
+
+

It's worth noting that the success callback for get, query and other methods gets passed +in the response that came from the server as well as $http header getter function, so one +could rewrite the above example and get access to http headers as:

+
var User = $resource('/user/:userId', {userId:'@id'});
+User.get({userId:123}, function(user, getResponseHeaders){
+  user.abc = true;
+  user.$save(function(user, putResponseHeaders) {
+    //user => saved user object
+    //putResponseHeaders => $http header getter
+  });
+});
+
+

You can also access the raw $http promise via the $promise property on the object returned

+
var User = $resource('/user/:userId', {userId:'@id'});
+User.get({userId:123})
+    .$promise.then(function(user) {
+      $scope.user = user;
+    });
+
+

Creating a custom 'PUT' request

+

In this example we create a custom method on our resource to make a PUT request

+
var app = angular.module('app', ['ngResource', 'ngRoute']);
+
+// Some APIs expect a PUT request in the format URL/object/ID
+// Here we are creating an 'update' method
+app.factory('Notes', ['$resource', function($resource) {
+return $resource('/notes/:id', null,
+    {
+        'update': { method:'PUT' }
+    });
+}]);
+
+// In our controller we get the ID from the URL using ngRoute and $routeParams
+// We pass in $routeParams and our Notes factory along with $scope
+app.controller('NotesCtrl', ['$scope', '$routeParams', 'Notes',
+                                   function($scope, $routeParams, Notes) {
+// First get a note object from the factory
+var note = Notes.get({ id:$routeParams.id });
+$id = note.id;
+
+// Now call update passing in the ID first then the object you are updating
+Notes.update({ id:$id }, note);
+
+// This will PUT /notes/ID with the note object in the request payload
+}]);
+
+

Cancelling requests

+

If an action's configuration specifies that it is cancellable, you can cancel the request related +to an instance or collection (as long as it is a result of a "non-instance" call):

+
// ...defining the `Hotel` resource...
+var Hotel = $resource('/api/hotel/:id', {id: '@id'}, {
+  // Let's make the `query()` method cancellable
+  query: {method: 'get', isArray: true, cancellable: true}
+});
+
+// ...somewhere in the PlanVacationController...
+...
+this.onDestinationChanged = function onDestinationChanged(destination) {
+  // We don't care about any pending request for hotels
+  // in a different destination any more
+  this.availableHotels.$cancelRequest();
+
+  // Let's query for hotels in '<destination>'
+  // (calls: /api/hotel?location=<destination>)
+  this.availableHotels = Hotel.query({location: destination});
+};
+
+ +
+ + diff --git a/1.6.6/docs/partials/api/ngRoute.html b/1.6.6/docs/partials/api/ngRoute.html new file mode 100644 index 000000000..bd863b70b --- /dev/null +++ b/1.6.6/docs/partials/api/ngRoute.html @@ -0,0 +1,127 @@ + Improve this Doc + + +

+ ngRoute +

+ + + +

Installation

+ + +

First, get the file:

+
    +
  • + Google CDN e.g. +
    "//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-route.js"
    +
  • +
  • + NPM e.g. +
    npm install --save angular-route@X.Y.Z
    + or +
    yarn add angular-route@X.Y.Z
    +
  • +
  • + Bower e.g. +
    bower install angular-route#X.Y.Z
    +
  • +
  • + code.angularjs.org + (discouraged for production use) e.g. +
    "//code.angularjs.org/X.Y.Z/angular-route.js"
    +
  • +
+

where X.Y.Z is the AngularJS version you are running.

+ +

Then, include angular-route.js in your HTML:

+ +
<script src="path/to/angular.js"></script>
<script src="path/to/angular-route.js"></script>
+ +

Finally, load the module in your application by adding it as a dependent module:

+
angular.module('app', ['ngRoute']);
+ +

With that you're ready to get started!

+ + +

ngRoute

+

The ngRoute module provides routing and deeplinking services and directives for angular apps.

+

Example

+

See $route for an example of configuring and using ngRoute.

+
+ + + + + +
+

Module Components

+ +
+

Directive

+ + + + + + + + + + + +
NameDescription
ngView

Overview

+

ngView is a directive that complements the $route service by +including the rendered template of the current route into the main layout (index.html) file. +Every time the current route changes, the included view changes with it according to the +configuration of the $route service.

+
+
+ +
+

Provider

+ + + + + + + + + + + +
NameDescription
$routeProvider

Used for configuring routes.

+
+
+ +
+

Service

+ + + + + + + + + + + + + + + + +
NameDescription
$route

$route is used for deep-linking URLs to controllers and views (HTML partials). +It watches $location.url() and tries to map the path to an existing route definition.

+
$routeParams

The $routeParams service allows you to retrieve the current set of route parameters.

+
+
+ +
+ + + + + diff --git a/1.6.6/docs/partials/api/ngRoute/directive.html b/1.6.6/docs/partials/api/ngRoute/directive.html new file mode 100644 index 000000000..75b9f809d --- /dev/null +++ b/1.6.6/docs/partials/api/ngRoute/directive.html @@ -0,0 +1,27 @@ + +

Directive components in ngRoute

+ + + +
+
+ + + + + + + + + + + +
NameDescription
ngView

Overview

+

ngView is a directive that complements the $route service by +including the rendered template of the current route into the main layout (index.html) file. +Every time the current route changes, the included view changes with it according to the +configuration of the $route service.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngRoute/directive/ngView.html b/1.6.6/docs/partials/api/ngRoute/directive/ngView.html new file mode 100644 index 000000000..6b0d026b8 --- /dev/null +++ b/1.6.6/docs/partials/api/ngRoute/directive/ngView.html @@ -0,0 +1,230 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngView

+
    + +
  1. + - directive in module ngRoute +
  2. +
+
+ + + + + +
+

Overview

+

ngView is a directive that complements the $route service by +including the rendered template of the current route into the main layout (index.html) file. +Every time the current route changes, the included view changes with it according to the +configuration of the $route service.

+

Requires the ngRoute module to be installed.

+ +
+ + + + +
+ + + +

Directive Info

+
    +
  • This directive creates new scope.
  • +
  • This directive executes at priority level 400.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-view
      [onload="string"]
      [autoscroll="string"]>
    ...
    </ng-view>
    +
  • +
  • as attribute: +
    <ANY
      [onload="string"]
      [autoscroll="string"]>
    ...
    </ANY>
    +
  • +
  • as CSS class: +
    <ANY class="[onload: string;] [autoscroll: string;]"> ... </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ onload + +
(optional)
+
+ string + +

Expression to evaluate whenever the view updates.

+ + +
+ autoscroll + +
(optional)
+
+ string + +

Whether ngView should call $anchorScroll to scroll the viewport after the view is updated.

+
- If the attribute is not set, disable scrolling.
+- If the attribute is set without value, enable scrolling.
+- Otherwise enable scrolling only if the `autoscroll` attribute value evaluated
+  as an expression yields a truthy value.
+
+ + +
+ +
+ +

Events

+
    +
  • +

    $viewContentLoaded

    +

    Emitted every time the ngView content is reloaded.

    +
    + + +
    +

    Type:

    +
    emit
    +
    +
    +

    Target:

    +
    the current ngView scope
    +
    +
  • +
+ +

Animations

+ + + + + + + + + + + + + + + + + +
AnimationOccurs
enterwhen the new element is inserted to the DOM
leavewhen the old element is removed from to the DOM
+

The enter and leave animation occur concurrently.

+ + Click here to learn more about the steps involved in the animation. + + +

Examples

+ +

+ + +
+ + +
+
<div ng-controller="MainCtrl as main">
  Choose:
  <a href="Book/Moby">Moby</a> |
  <a href="Book/Moby/ch/1">Moby: Ch1</a> |
  <a href="Book/Gatsby">Gatsby</a> |
  <a href="Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> |
  <a href="Book/Scarlet">Scarlet Letter</a><br/>

  <div class="view-animate-container">
    <div ng-view class="view-animate"></div>
  </div>
  <hr />

  <pre>$location.path() = {{main.$location.path()}}</pre>
  <pre>$route.current.templateUrl = {{main.$route.current.templateUrl}}</pre>
  <pre>$route.current.params = {{main.$route.current.params}}</pre>
  <pre>$routeParams = {{main.$routeParams}}</pre>
</div>
+
+ +
+
<div>
  controller: {{book.name}}<br />
  Book Id: {{book.params.bookId}}<br />
</div>
+
+ +
+
<div>
  controller: {{chapter.name}}<br />
  Book Id: {{chapter.params.bookId}}<br />
  Chapter Id: {{chapter.params.chapterId}}
</div>
+
+ +
+
.view-animate-container {
  position:relative;
  height:100px!important;
  background:white;
  border:1px solid black;
  height:40px;
  overflow:hidden;
}

.view-animate {
  padding:10px;
}

.view-animate.ng-enter, .view-animate.ng-leave {
  transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s;

  display:block;
  width:100%;
  border-left:1px solid black;

  position:absolute;
  top:0;
  left:0;
  right:0;
  bottom:0;
  padding:10px;
}

.view-animate.ng-enter {
  left:100%;
}
.view-animate.ng-enter.ng-enter-active {
  left:0;
}
.view-animate.ng-leave.ng-leave-active {
  left:-100%;
}
+
+ +
+
angular.module('ngViewExample', ['ngRoute', 'ngAnimate'])
.config(['$routeProvider', '$locationProvider',
  function($routeProvider, $locationProvider) {
    $routeProvider
      .when('/Book/:bookId', {
        templateUrl: 'book.html',
        controller: 'BookCtrl',
        controllerAs: 'book'
      })
      .when('/Book/:bookId/ch/:chapterId', {
        templateUrl: 'chapter.html',
        controller: 'ChapterCtrl',
        controllerAs: 'chapter'
      });

    $locationProvider.html5Mode(true);
}])
.controller('MainCtrl', ['$route', '$routeParams', '$location',
  function MainCtrl($route, $routeParams, $location) {
    this.$route = $route;
    this.$location = $location;
    this.$routeParams = $routeParams;
}])
.controller('BookCtrl', ['$routeParams', function BookCtrl($routeParams) {
  this.name = 'BookCtrl';
  this.params = $routeParams;
}])
.controller('ChapterCtrl', ['$routeParams', function ChapterCtrl($routeParams) {
  this.name = 'ChapterCtrl';
  this.params = $routeParams;
}]);
+
+ +
+
it('should load and compile correct template', function() {
  element(by.linkText('Moby: Ch1')).click();
  var content = element(by.css('[ng-view]')).getText();
  expect(content).toMatch(/controller: ChapterCtrl/);
  expect(content).toMatch(/Book Id: Moby/);
  expect(content).toMatch(/Chapter Id: 1/);

  element(by.partialLinkText('Scarlet')).click();

  content = element(by.css('[ng-view]')).getText();
  expect(content).toMatch(/controller: BookCtrl/);
  expect(content).toMatch(/Book Id: Scarlet/);
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ngRoute/provider.html b/1.6.6/docs/partials/api/ngRoute/provider.html new file mode 100644 index 000000000..971959757 --- /dev/null +++ b/1.6.6/docs/partials/api/ngRoute/provider.html @@ -0,0 +1,23 @@ + +

Provider components in ngRoute

+ + + +
+
+ + + + + + + + + + + +
NameDescription
$routeProvider

Used for configuring routes.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngRoute/provider/$routeProvider.html b/1.6.6/docs/partials/api/ngRoute/provider/$routeProvider.html new file mode 100644 index 000000000..f1d4d63fe --- /dev/null +++ b/1.6.6/docs/partials/api/ngRoute/provider/$routeProvider.html @@ -0,0 +1,394 @@ + Improve this Doc + + + + +  View Source + + + +
+

$routeProvider

+
    + +
  1. + - $route +
  2. + +
  3. + - provider in module ngRoute +
  4. +
+
+ + + + + +
+

Used for configuring routes.

+

Example

+

See $route for an example of configuring and using ngRoute.

+

Dependencies

+

Requires the ngRoute module to be installed.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    when(path, route);

    + +

    +

    Adds a new route definition to the $route service.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + path + + + + string + +

    Route path (matched against $location.path). If $location.path + contains redundant trailing slash or is missing one, the route will still match and the + $location.path will be updated to add or drop the trailing slash to exactly match the + route definition.

    +
      +
    • path can contain named groups starting with a colon: e.g. :name. All characters up + to the next slash are matched and stored in $routeParams under the given name + when the route matches.
    • +
    • path can contain named groups starting with a colon and ending with a star: + e.g.:name*. All characters are eagerly stored in $routeParams under the given name + when the route matches.
    • +
    • path can contain optional named groups with a question mark: e.g.:name?.

      +

      For example, routes like /color/:color/largecode/:largecode*\/edit will match +/color/brown/largecode/code/with/slashes/edit and extract:

      +
    • +
    • color: brown

      +
    • +
    • largecode: code/with/slashes.
    • +
    + + +
    + route + + + + Object + +

    Mapping information to be assigned to $route.current on route + match.

    +

    Object properties:

    +
      +
    • controller{(string|Function)=} – Controller fn that should be associated with +newly created scope or the name of a registered +controller if passed as a string.
    • +
    • controllerAs{string=} – An identifier name for a reference to the controller. +If present, the controller will be published to scope under the controllerAs name.
    • +
    • template{(string|Function)=} – html template as a string or a function that +returns an html template as a string which should be used by ngView or ngInclude directives. +This property takes precedence over templateUrl.

      +

      If template is a function, it will be called with the following parameters:

      +
        +
      • {Array.<Object>} - route parameters extracted from the current +$location.path() by applying the current route
      • +
      +

      One of template or templateUrl is required.

      +
    • +
    • templateUrl{(string|Function)=} – path or function that returns a path to an html +template that should be used by ngView.

      +

      If templateUrl is a function, it will be called with the following parameters:

      +
        +
      • {Array.<Object>} - route parameters extracted from the current +$location.path() by applying the current route
      • +
      +

      One of templateUrl or template is required.

      +
    • +
    • resolve - {Object.<string, Function>=} - An optional map of dependencies which should +be injected into the controller. If any of these dependencies are promises, the router +will wait for them all to be resolved or one to be rejected before the controller is +instantiated. +If all the promises are resolved successfully, the values of the resolved promises are +injected and $routeChangeSuccess event is +fired. If any of the promises are rejected the +$routeChangeError event is fired. +For easier access to the resolved dependencies from the template, the resolve map will +be available on the scope of the route, under $resolve (by default) or a custom name +specified by the resolveAs property (see below). This can be particularly useful, when +working with components as route templates.
      +

      + Note: If your scope already contains a property with this name, it will be hidden + or overwritten. Make sure, you specify an appropriate name for this property, that + does not collide with other properties on the scope. +
      +The map object is:

      +
        +
      • key{string}: a name of a dependency to be injected into the controller.
      • +
      • factory - {string|Function}: If string then it is an alias for a service. +Otherwise if function, then it is injected +and the return value is treated as the dependency. If the result is a promise, it is +resolved before its value is injected into the controller. Be aware that +ngRoute.$routeParams will still refer to the previous route within these resolve +functions. Use $route.current.params to access the new route parameters, instead.
      • +
      +
    • +
    • resolveAs - {string=} - The name under which the resolve map will be available on +the scope of the route. If omitted, defaults to $resolve.

      +
    • +
    • redirectTo{(string|Function)=} – value to update +$location path with and trigger route redirection.

      +

      If redirectTo is a function, it will be called with the following parameters:

      +
        +
      • {Object.<string>} - route parameters extracted from the current +$location.path() by applying the current route templateUrl.
      • +
      • {string} - current $location.path()
      • +
      • {Object} - current $location.search()
      • +
      +

      The custom redirectTo function is expected to return a string which will be used +to update $location.url(). If the function throws an error, no further processing will +take place and the $routeChangeError event will +be fired.

      +

      Routes that specify redirectTo will not have their controllers, template functions +or resolves called, the $location will be changed to the redirect url and route +processing will stop. The exception to this is if the redirectTo is a function that +returns undefined. In this case the route transition occurs as though there was no +redirection.

      +
    • +
    • resolveRedirectTo{Function=} – a function that will (eventually) return the value +to update $location URL with and trigger route redirection. In +contrast to redirectTo, dependencies can be injected into resolveRedirectTo and the +return value can be either a string or a promise that will be resolved to a string.

      +

      Similar to redirectTo, if the return value is undefined (or a promise that gets +resolved to undefined), no redirection takes place and the route transition occurs as +though there was no redirection.

      +

      If the function throws an error or the returned promise gets rejected, no further +processing will take place and the +$routeChangeError event will be fired.

      +

      redirectTo takes precedence over resolveRedirectTo, so specifying both on the same +route definition, will cause the latter to be ignored.

      +
    • +
    • [reloadOnSearch=true] - {boolean=} - reload route when only $location.search() +or $location.hash() changes.

      +

      If the option is set to false and url in the browser changes, then +$routeUpdate event is broadcasted on the root scope.

      +
    • +
    • [caseInsensitiveMatch=false] - {boolean=} - match routes without being case sensitive

      +

      If the option is set to true, then the particular route can be matched without being +case sensitive

      +
    • +
    + + +
    + + + + + + +

    Returns

    + + + + + +
    Object

    self

    +
    +
  • + +
  • +

    otherwise(params);

    + +

    +

    Sets route definition that will be used on route change when no other route definition +is matched.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + params + + + + Objectstring + +

    Mapping information to be assigned to $route.current. +If called with a string, the value maps to redirectTo.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    Object

    self

    +
    +
  • + +
  • +

    eagerInstantiationEnabled([enabled]);

    + +

    +

    Call this method as a setter to enable/disable eager instantiation of the +$route service upon application bootstrap. You can also call it as a +getter (i.e. without any arguments) to get the current value of the +eagerInstantiationEnabled flag.

    +

    Instantiating $route early is necessary for capturing the initial +$locationChangeStart event and navigating to the +appropriate route. Usually, $route is instantiated in time by the +ngView directive. Yet, in cases where ngView is included in an +asynchronously loaded template (e.g. in another directive's template), the directive factory +might not be called soon enough for $route to be instantiated before the initial +$locationChangeSuccess event is fired. Eager instantiation ensures that $route is always +instantiated in time, regardless of when ngView will be loaded.

    +

    The default value is true.

    +

    Note:
    +You may want to disable the default behavior when unit-testing modules that depend on +ngRoute, in order to avoid an unexpected request for the default route's template.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + enabled + +
    (optional)
    +
    + boolean + +

    If provided, update the internal eagerInstantiationEnabled flag.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    The current value of the eagerInstantiationEnabled flag if used as a getter or + itself (for chaining) if used as a setter.

    +
    +
  • +
+ + +

Properties

+
    +
  • +

    caseInsensitiveMatch

    + + + + + +

    A boolean property indicating if routes defined +using this provider should be matched using a case insensitive +algorithm. Defaults to false.

    +
    + +
  • +
+ + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngRoute/service.html b/1.6.6/docs/partials/api/ngRoute/service.html new file mode 100644 index 000000000..18e3c75cd --- /dev/null +++ b/1.6.6/docs/partials/api/ngRoute/service.html @@ -0,0 +1,30 @@ + +

Service components in ngRoute

+ + + +
+
+ + + + + + + + + + + + + + + + +
NameDescription
$route

$route is used for deep-linking URLs to controllers and views (HTML partials). +It watches $location.url() and tries to map the path to an existing route definition.

+
$routeParams

The $routeParams service allows you to retrieve the current set of route parameters.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngRoute/service/$route.html b/1.6.6/docs/partials/api/ngRoute/service/$route.html new file mode 100644 index 000000000..dcb564b42 --- /dev/null +++ b/1.6.6/docs/partials/api/ngRoute/service/$route.html @@ -0,0 +1,574 @@ + Improve this Doc + + + + +  View Source + + + +
+

$route

+
    + +
  1. + - $routeProvider +
  2. + +
  3. + - service in module ngRoute +
  4. +
+
+ + + + + +
+

$route is used for deep-linking URLs to controllers and views (HTML partials). +It watches $location.url() and tries to map the path to an existing route definition.

+

Requires the ngRoute module to be installed.

+

You can define routes through $routeProvider's API.

+

The $route service is typically used in conjunction with the +ngView directive and the +$routeParams service.

+ +
+ + + + +
+ +

Dependencies

+ + + + + + + + +

Methods

+
    +
  • +

    reload();

    + +

    +

    Causes $route service to reload the current route even if +$location hasn't changed.

    +

    As a result of that, ngView +creates new scope and reinstantiates the controller.

    +
    + + + + + + + +
  • + +
  • +

    updateParams(newParams);

    + +

    +

    Causes $route service to update the current URL, replacing +current route parameters with those specified in newParams. +Provided property names that match the route's path segment +definitions will be interpolated into the location's path, while +remaining properties will be treated as query params.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + newParams + + + + !Object<string, string> + +

    mapping of URL parameter names to values

    + + +
    + + + + + +
  • +
+ +

Events

+
    +
  • +

    $routeChangeStart

    +

    Broadcasted before a route change. At this point the route services starts +resolving all of the dependencies needed for the route change to occur. +Typically this involves fetching the view template as well as any dependencies +defined in resolve route property. Once all of the dependencies are resolved +$routeChangeSuccess is fired.

    +

    The route change (and the $location change that triggered it) can be prevented +by calling preventDefault method of the event. See $rootScope.Scope +for more details about event object.

    +
    + + +
    +

    Type:

    +
    broadcast
    +
    +
    +

    Target:

    +
    root scope
    +
    + +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + angularEvent + + + + Object + +

    Synthetic event object.

    + + +
    + next + + + + Route + +

    Future route information.

    + + +
    + current + + + + Route + +

    Current route information.

    + + +
    + +
  • + +
  • +

    $routeChangeSuccess

    +

    Broadcasted after a route change has happened successfully. +The resolve dependencies are now available in the current.locals property.

    +

    ngView listens for the directive +to instantiate the controller and render the view.

    +
    + + +
    +

    Type:

    +
    broadcast
    +
    +
    +

    Target:

    +
    root scope
    +
    + +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + angularEvent + + + + Object + +

    Synthetic event object.

    + + +
    + current + + + + Route + +

    Current route information.

    + + +
    + previous + + + + RouteUndefined + +

    Previous route information, or undefined if current is +first route entered.

    + + +
    + +
  • + +
  • +

    $routeChangeError

    +

    Broadcasted if a redirection function fails or any redirection or resolve promises are +rejected.

    +
    + + +
    +

    Type:

    +
    broadcast
    +
    +
    +

    Target:

    +
    root scope
    +
    + +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + angularEvent + + + + Object + +

    Synthetic event object

    + + +
    + current + + + + Route + +

    Current route information.

    + + +
    + previous + + + + Route + +

    Previous route information.

    + + +
    + rejection + + + + Route + +

    The thrown error or the rejection reason of the promise. Usually +the rejection reason is the error that caused the promise to get rejected.

    + + +
    + +
  • + +
  • +

    $routeUpdate

    +

    The reloadOnSearch property has been set to false, and we are reusing the same +instance of the Controller.

    +
    + + +
    +

    Type:

    +
    broadcast
    +
    +
    +

    Target:

    +
    root scope
    +
    + +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + angularEvent + + + + Object + +

    Synthetic event object

    + + +
    + current + + + + Route + +

    Current/previous route information.

    + + +
    + +
  • +
+ + +

Properties

+
    +
  • +

    current

    + + + + + +
    Object

    Reference to the current route definition. +The route definition contains:

    +
      +
    • controller: The controller constructor as defined in the route definition.
    • +
    • locals: A map of locals which is used by $controller service for +controller instantiation. The locals contain +the resolved values of the resolve map. Additionally the locals also contain:

      +
        +
      • $scope - The current route scope.
      • +
      • $template - The current route template HTML.
      • +
      +

      The locals will be assigned to the route scope's $resolve property. You can override +the property name, using resolveAs in the route definition. See +$routeProvider for more info.

      +
    • +
    +
    + +
  • + +
  • +

    routes

    + + + + + +
    Object

    Object with all route configuration Objects as its properties.

    +
    + +
  • +
+ + + + +

Examples

This example shows how changing the URL hash causes the $route to match a route against the +URL, and the ngView pulls in the partial.

+

+ +

+ + +
+ + +
+
<div ng-controller="MainController">
  Choose:
  <a href="Book/Moby">Moby</a> |
  <a href="Book/Moby/ch/1">Moby: Ch1</a> |
  <a href="Book/Gatsby">Gatsby</a> |
  <a href="Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> |
  <a href="Book/Scarlet">Scarlet Letter</a><br/>

  <div ng-view></div>

  <hr />

  <pre>$location.path() = {{$location.path()}}</pre>
  <pre>$route.current.templateUrl = {{$route.current.templateUrl}}</pre>
  <pre>$route.current.params = {{$route.current.params}}</pre>
  <pre>$route.current.scope.name = {{$route.current.scope.name}}</pre>
  <pre>$routeParams = {{$routeParams}}</pre>
</div>
+
+ +
+
controller: {{name}}<br />
Book Id: {{params.bookId}}<br />
+
+ +
+
controller: {{name}}<br />
Book Id: {{params.bookId}}<br />
Chapter Id: {{params.chapterId}}
+
+ +
+
angular.module('ngRouteExample', ['ngRoute'])

 .controller('MainController', function($scope, $route, $routeParams, $location) {
     $scope.$route = $route;
     $scope.$location = $location;
     $scope.$routeParams = $routeParams;
 })

 .controller('BookController', function($scope, $routeParams) {
     $scope.name = 'BookController';
     $scope.params = $routeParams;
 })

 .controller('ChapterController', function($scope, $routeParams) {
     $scope.name = 'ChapterController';
     $scope.params = $routeParams;
 })

.config(function($routeProvider, $locationProvider) {
  $routeProvider
   .when('/Book/:bookId', {
    templateUrl: 'book.html',
    controller: 'BookController',
    resolve: {
      // I will cause a 1 second delay
      delay: function($q, $timeout) {
        var delay = $q.defer();
        $timeout(delay.resolve, 1000);
        return delay.promise;
      }
    }
  })
  .when('/Book/:bookId/ch/:chapterId', {
    templateUrl: 'chapter.html',
    controller: 'ChapterController'
  });

  // configure html5 to get links working on jsfiddle
  $locationProvider.html5Mode(true);
});
+
+ +
+
it('should load and compile correct template', function() {
  element(by.linkText('Moby: Ch1')).click();
  var content = element(by.css('[ng-view]')).getText();
  expect(content).toMatch(/controller: ChapterController/);
  expect(content).toMatch(/Book Id: Moby/);
  expect(content).toMatch(/Chapter Id: 1/);

  element(by.partialLinkText('Scarlet')).click();

  content = element(by.css('[ng-view]')).getText();
  expect(content).toMatch(/controller: BookController/);
  expect(content).toMatch(/Book Id: Scarlet/);
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ngRoute/service/$routeParams.html b/1.6.6/docs/partials/api/ngRoute/service/$routeParams.html new file mode 100644 index 000000000..48b9b1c7e --- /dev/null +++ b/1.6.6/docs/partials/api/ngRoute/service/$routeParams.html @@ -0,0 +1,73 @@ + Improve this Doc + + + + +  View Source + + + +
+

$routeParams

+
    + + + +
  1. + - service in module ngRoute +
  2. +
+
+ + + + + +
+

The $routeParams service allows you to retrieve the current set of route parameters.

+

Requires the ngRoute module to be installed.

+

The route parameters are a combination of $location's +search() and path(). +The path parameters are extracted when the $route path is matched.

+

In case of parameter name collision, path params take precedence over search params.

+

The service guarantees that the identity of the $routeParams object will remain unchanged +(but its properties will likely change) even when a route change occurs.

+

Note that the $routeParams are only updated after a route change completes successfully. +This means that you cannot rely on $routeParams being correct in route resolve functions. +Instead you can use $route.current.params to access the new route's parameters.

+ +
+ + + + +
+ +

Dependencies

+ + + + + + + + + + + + + + +

Examples

// Given:
+// URL: http://server.com/index.html#/Chapter/1/Section/2?search=moby
+// Route: /Chapter/:chapterId/Section/:sectionId
+//
+// Then
+$routeParams ==> {chapterId:'1', sectionId:'2', search:'moby'}
+
+ +
+ + diff --git a/1.6.6/docs/partials/api/ngSanitize.html b/1.6.6/docs/partials/api/ngSanitize.html new file mode 100644 index 000000000..2c2020751 --- /dev/null +++ b/1.6.6/docs/partials/api/ngSanitize.html @@ -0,0 +1,118 @@ + Improve this Doc + + +

+ ngSanitize +

+ + + +

Installation

+ + +

First, get the file:

+
    +
  • + Google CDN e.g. +
    "//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-sanitize.js"
    +
  • +
  • + NPM e.g. +
    npm install --save angular-sanitize@X.Y.Z
    + or +
    yarn add angular-sanitize@X.Y.Z
    +
  • +
  • + Bower e.g. +
    bower install angular-sanitize#X.Y.Z
    +
  • +
  • + code.angularjs.org + (discouraged for production use) e.g. +
    "//code.angularjs.org/X.Y.Z/angular-sanitize.js"
    +
  • +
+

where X.Y.Z is the AngularJS version you are running.

+ +

Then, include angular-sanitize.js in your HTML:

+ +
<script src="path/to/angular.js"></script>
<script src="path/to/angular-sanitize.js"></script>
+ +

Finally, load the module in your application by adding it as a dependent module:

+
angular.module('app', ['ngSanitize']);
+ +

With that you're ready to get started!

+ + +

ngSanitize

+

The ngSanitize module provides functionality to sanitize HTML.

+
+ +

See $sanitize for usage.

+ + + + + + +
+

Module Components

+ +
+

Filter

+ + + + + + + + + + + +
NameDescription
linky

Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and +plain email address links.

+
+
+ +
+

Service

+ + + + + + + + + + + +
NameDescription
$sanitize

Sanitizes an html string by stripping all potentially dangerous tokens.

+
+
+ +
+

Provider

+ + + + + + + + + + + +
NameDescription
$sanitizeProvider

Creates and configures $sanitize instance.

+
+
+ +
+ + + + + diff --git a/1.6.6/docs/partials/api/ngSanitize/filter.html b/1.6.6/docs/partials/api/ngSanitize/filter.html new file mode 100644 index 000000000..436dd4f19 --- /dev/null +++ b/1.6.6/docs/partials/api/ngSanitize/filter.html @@ -0,0 +1,24 @@ + +

Filter components in ngSanitize

+ + + +
+
+ + + + + + + + + + + +
NameDescription
linky

Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and +plain email address links.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngSanitize/filter/linky.html b/1.6.6/docs/partials/api/ngSanitize/filter/linky.html new file mode 100644 index 000000000..38e01da36 --- /dev/null +++ b/1.6.6/docs/partials/api/ngSanitize/filter/linky.html @@ -0,0 +1,176 @@ + Improve this Doc + + + + +  View Source + + + +
+

linky

+
    + +
  1. + - filter in module ngSanitize +
  2. +
+
+ + + + + +
+

Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and +plain email address links.

+

Requires the ngSanitize module to be installed.

+ +
+ + + + +
+ + + +

Usage

+

In HTML Template Binding

+ + <span ng-bind-html="linky_expression | linky"></span> + + +

In JavaScript

+
$filter('linky')(text, target, attributes)
+ + +
+

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ text + + + + string + +

Input text.

+ + +
+ target + + + + string + +

Window (_blank|_self|_parent|_top) or named frame to open links in.

+ + +
+ attributes + +
(optional)
+
+ objectfunction(url) + +

Add custom attributes to the link element.

+

Can be one of:

+
    +
  • object: A map of attributes
  • +
  • function: Takes the url as a parameter and returns a map of attributes

    +

    If the map of attributes contains a value for target, it overrides the value of +the target parameter.

    +
  • +
+ + +
+ +
+ +

Returns

+ + + + + +
string

Html-linkified and sanitized text.

+
+ + + +

Examples

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
Snippet: <textarea ng-model="snippet" cols="60" rows="3"></textarea>
<table>
  <tr>
    <th>Filter</th>
    <th>Source</th>
    <th>Rendered</th>
  </tr>
  <tr id="linky-filter">
    <td>linky filter</td>
    <td>
      <pre>&lt;div ng-bind-html="snippet | linky"&gt;<br>&lt;/div&gt;</pre>
    </td>
    <td>
      <div ng-bind-html="snippet | linky"></div>
    </td>
  </tr>
  <tr id="linky-target">
   <td>linky target</td>
   <td>
     <pre>&lt;div ng-bind-html="snippetWithSingleURL | linky:'_blank'"&gt;<br>&lt;/div&gt;</pre>
   </td>
   <td>
     <div ng-bind-html="snippetWithSingleURL | linky:'_blank'"></div>
   </td>
  </tr>
  <tr id="linky-custom-attributes">
   <td>linky custom attributes</td>
   <td>
     <pre>&lt;div ng-bind-html="snippetWithSingleURL | linky:'_self':{rel: 'nofollow'}"&gt;<br>&lt;/div&gt;</pre>
   </td>
   <td>
     <div ng-bind-html="snippetWithSingleURL | linky:'_self':{rel: 'nofollow'}"></div>
   </td>
  </tr>
  <tr id="escaped-html">
    <td>no filter</td>
    <td><pre>&lt;div ng-bind="snippet"&gt;<br>&lt;/div&gt;</pre></td>
    <td><div ng-bind="snippet"></div></td>
  </tr>
</table>
+
+ +
+
angular.module('linkyExample', ['ngSanitize'])
.controller('ExampleController', ['$scope', function($scope) {
  $scope.snippet =
    'Pretty text with some links:\n' +
    'http://angularjs.org/,\n' +
    'mailto:us@somewhere.org,\n' +
    'another@somewhere.org,\n' +
    'and one more: ftp://127.0.0.1/.';
  $scope.snippetWithSingleURL = 'http://angularjs.org/';
}]);
+
+ +
+
it('should linkify the snippet with urls', function() {
  expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()).
      toBe('Pretty text with some links: http://angularjs.org/, us@somewhere.org, ' +
           'another@somewhere.org, and one more: ftp://127.0.0.1/.');
  expect(element.all(by.css('#linky-filter a')).count()).toEqual(4);
});

it('should not linkify snippet without the linky filter', function() {
  expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()).
      toBe('Pretty text with some links: http://angularjs.org/, mailto:us@somewhere.org, ' +
           'another@somewhere.org, and one more: ftp://127.0.0.1/.');
  expect(element.all(by.css('#escaped-html a')).count()).toEqual(0);
});

it('should update', function() {
  element(by.model('snippet')).clear();
  element(by.model('snippet')).sendKeys('new http://link.');
  expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()).
      toBe('new http://link.');
  expect(element.all(by.css('#linky-filter a')).count()).toEqual(1);
  expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText())
      .toBe('new http://link.');
});

it('should work with the target property', function() {
 expect(element(by.id('linky-target')).
     element(by.binding("snippetWithSingleURL | linky:'_blank'")).getText()).
     toBe('http://angularjs.org/');
 expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank');
});

it('should optionally add custom attributes', function() {
 expect(element(by.id('linky-custom-attributes')).
     element(by.binding("snippetWithSingleURL | linky:'_self':{rel: 'nofollow'}")).getText()).
     toBe('http://angularjs.org/');
 expect(element(by.css('#linky-custom-attributes a')).getAttribute('rel')).toEqual('nofollow');
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ngSanitize/provider.html b/1.6.6/docs/partials/api/ngSanitize/provider.html new file mode 100644 index 000000000..26c8db4bd --- /dev/null +++ b/1.6.6/docs/partials/api/ngSanitize/provider.html @@ -0,0 +1,23 @@ + +

Provider components in ngSanitize

+ + + +
+
+ + + + + + + + + + + +
NameDescription
$sanitizeProvider

Creates and configures $sanitize instance.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngSanitize/provider/$sanitizeProvider.html b/1.6.6/docs/partials/api/ngSanitize/provider/$sanitizeProvider.html new file mode 100644 index 000000000..783e6557d --- /dev/null +++ b/1.6.6/docs/partials/api/ngSanitize/provider/$sanitizeProvider.html @@ -0,0 +1,127 @@ + Improve this Doc + + + + +  View Source + + + +
+

$sanitizeProvider

+
    + +
  1. + - $sanitize +
  2. + +
  3. + - provider in module ngSanitize +
  4. +
+
+ + + + + +
+

Creates and configures $sanitize instance.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    enableSvg([flag]);

    + +

    +

    Enables a subset of svg to be supported by the sanitizer.

    +
    +

    By enabling this setting without taking other precautions, you might expose your + application to click-hijacking attacks. In these attacks, sanitized svg elements could be positioned + outside of the containing element and be rendered over other elements on the page (e.g. a login + link). Such behavior can then result in phishing incidents.

    + +

    To protect against these, explicitly setup overflow: hidden css rule for all potential svg + tags within the sanitized content:

    + +
    + +
    
    +  .rootOfTheIncludedContent svg {
    +    overflow: hidden !important;
    +  }
    +  
    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + flag + +
    (optional)
    +
    + boolean + +

    Enable or disable SVG support in the sanitizer.

    + + +
    + + + + + + +

    Returns

    + + + + + +
    booleanng.$sanitizeProvider

    Returns the currently configured value if called + without an argument or self for chaining otherwise.

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngSanitize/service.html b/1.6.6/docs/partials/api/ngSanitize/service.html new file mode 100644 index 000000000..a76a56687 --- /dev/null +++ b/1.6.6/docs/partials/api/ngSanitize/service.html @@ -0,0 +1,23 @@ + +

Service components in ngSanitize

+ + + +
+
+ + + + + + + + + + + +
NameDescription
$sanitize

Sanitizes an html string by stripping all potentially dangerous tokens.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngSanitize/service/$sanitize.html b/1.6.6/docs/partials/api/ngSanitize/service/$sanitize.html new file mode 100644 index 000000000..e5da57e9c --- /dev/null +++ b/1.6.6/docs/partials/api/ngSanitize/service/$sanitize.html @@ -0,0 +1,141 @@ + Improve this Doc + + + + +  View Source + + + +
+

$sanitize

+
    + +
  1. + - $sanitizeProvider +
  2. + +
  3. + - service in module ngSanitize +
  4. +
+
+ + + + + +
+

Sanitizes an html string by stripping all potentially dangerous tokens.

+

The input is sanitized by parsing the HTML into tokens. All safe tokens (from a whitelist) are + then serialized back to properly escaped html string. This means that no unsafe input can make + it into the returned string.

+

The whitelist for URL sanitization of attribute values is configured using the functions + aHrefSanitizationWhitelist and imgSrcSanitizationWhitelist of $compileProvider.

+

The input may also contain SVG markup if this is enabled via $sanitizeProvider.

+ +
+ + + + +
+ + + + +

Usage

+ +

$sanitize(html);

+ + + + + +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ html + + + + string + +

HTML input.

+ + +
+ +
+ +

Returns

+ + + + + +
string

Sanitized HTML.

+
+ + + + + + + + +

Examples

+ +

+ + +
+ + +
+
     <script>
         angular.module('sanitizeExample', ['ngSanitize'])
           .controller('ExampleController', ['$scope', '$sce', function($scope, $sce) {
             $scope.snippet =
               '<p style="color:blue">an html\n' +
               '<em onmouseover="this.textContent=\'PWN3D!\'">click here</em>\n' +
               'snippet</p>';
             $scope.deliberatelyTrustDangerousSnippet = function() {
               return $sce.trustAsHtml($scope.snippet);
             };
           }]);
     </script>
     <div ng-controller="ExampleController">
        Snippet: <textarea ng-model="snippet" cols="60" rows="3"></textarea>
       <table>
         <tr>
           <td>Directive</td>
           <td>How</td>
           <td>Source</td>
           <td>Rendered</td>
         </tr>
         <tr id="bind-html-with-sanitize">
           <td>ng-bind-html</td>
           <td>Automatically uses $sanitize</td>
           <td><pre>&lt;div ng-bind-html="snippet"&gt;<br/>&lt;/div&gt;</pre></td>
           <td><div ng-bind-html="snippet"></div></td>
         </tr>
         <tr id="bind-html-with-trust">
           <td>ng-bind-html</td>
           <td>Bypass $sanitize by explicitly trusting the dangerous value</td>
           <td>
           <pre>&lt;div ng-bind-html="deliberatelyTrustDangerousSnippet()"&gt;
&lt;/div&gt;</pre>
           </td>
           <td><div ng-bind-html="deliberatelyTrustDangerousSnippet()"></div></td>
         </tr>
         <tr id="bind-default">
           <td>ng-bind</td>
           <td>Automatically escapes</td>
           <td><pre>&lt;div ng-bind="snippet"&gt;<br/>&lt;/div&gt;</pre></td>
           <td><div ng-bind="snippet"></div></td>
         </tr>
       </table>
       </div>
+
+ +
+
it('should sanitize the html snippet by default', function() {
  expect(element(by.css('#bind-html-with-sanitize div')).getAttribute('innerHTML')).
    toBe('<p>an html\n<em>click here</em>\nsnippet</p>');
});

it('should inline raw snippet if bound to a trusted value', function() {
  expect(element(by.css('#bind-html-with-trust div')).getAttribute('innerHTML')).
    toBe("<p style=\"color:blue\">an html\n" +
         "<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" +
         "snippet</p>");
});

it('should escape snippet without any filter', function() {
  expect(element(by.css('#bind-default div')).getAttribute('innerHTML')).
    toBe("&lt;p style=\"color:blue\"&gt;an html\n" +
         "&lt;em onmouseover=\"this.textContent='PWN3D!'\"&gt;click here&lt;/em&gt;\n" +
         "snippet&lt;/p&gt;");
});

it('should update', function() {
  element(by.model('snippet')).clear();
  element(by.model('snippet')).sendKeys('new <b onclick="alert(1)">text</b>');
  expect(element(by.css('#bind-html-with-sanitize div')).getAttribute('innerHTML')).
    toBe('new <b>text</b>');
  expect(element(by.css('#bind-html-with-trust div')).getAttribute('innerHTML')).toBe(
    'new <b onclick="alert(1)">text</b>');
  expect(element(by.css('#bind-default div')).getAttribute('innerHTML')).toBe(
    "new &lt;b onclick=\"alert(1)\"&gt;text&lt;/b&gt;");
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ngTouch.html b/1.6.6/docs/partials/api/ngTouch.html new file mode 100644 index 000000000..392179ef2 --- /dev/null +++ b/1.6.6/docs/partials/api/ngTouch.html @@ -0,0 +1,145 @@ + Improve this Doc + + +

+ ngTouch +

+ + + +

Installation

+ + +

First, get the file:

+
    +
  • + Google CDN e.g. +
    "//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-touch.js"
    +
  • +
  • + NPM e.g. +
    npm install --save angular-touch@X.Y.Z
    + or +
    yarn add angular-touch@X.Y.Z
    +
  • +
  • + Bower e.g. +
    bower install angular-touch#X.Y.Z
    +
  • +
  • + code.angularjs.org + (discouraged for production use) e.g. +
    "//code.angularjs.org/X.Y.Z/angular-touch.js"
    +
  • +
+

where X.Y.Z is the AngularJS version you are running.

+ +

Then, include angular-touch.js in your HTML:

+ +
<script src="path/to/angular.js"></script>
<script src="path/to/angular-touch.js"></script>
+ +

Finally, load the module in your application by adding it as a dependent module:

+
angular.module('app', ['ngTouch']);
+ +

With that you're ready to get started!

+ + +

ngTouch

+

The ngTouch module provides touch events and other helpers for touch-enabled devices. +The implementation is based on jQuery Mobile touch event handling +(jquerymobile.com).

+

See $swipe for usage.

+
+ + + + + +
+

Module Components

+ +
+

Directive

+ + + + + + + + + + + + + + + + + + + + + +
NameDescription
ngClick

A more powerful replacement for the default ngClick designed to be used on touchscreen +devices. Most mobile browsers wait about 300ms after a tap-and-release before sending +the click event. This version handles them immediately, and then prevents the +following click event from propagating.

+
ngSwipeLeft

Specify custom behavior when an element is swiped to the left on a touchscreen device. +A leftward swipe is a quick, right-to-left slide of the finger. +Though ngSwipeLeft is designed for touch-based devices, it will work with a mouse click and drag +too.

+
ngSwipeRight

Specify custom behavior when an element is swiped to the right on a touchscreen device. +A rightward swipe is a quick, left-to-right slide of the finger. +Though ngSwipeRight is designed for touch-based devices, it will work with a mouse click and drag +too.

+
+
+ +
+

Service

+ + + + + + + + + + + + + + + + +
NameDescription
$swipe

The $swipe service is a service that abstracts the messier details of hold-and-drag swipe +behavior, to make implementing swipe-related directives more convenient.

+
$touch

Provides the ngClickOverrideEnabled method.

+
+
+ +
+

Provider

+ + + + + + + + + + + +
NameDescription
$touchProvider

The $touchProvider allows enabling / disabling ngTouch's ngClick directive.

+
+
+ +
+ + + + + diff --git a/1.6.6/docs/partials/api/ngTouch/directive.html b/1.6.6/docs/partials/api/ngTouch/directive.html new file mode 100644 index 000000000..95e6f173a --- /dev/null +++ b/1.6.6/docs/partials/api/ngTouch/directive.html @@ -0,0 +1,44 @@ + +

Directive components in ngTouch

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + +
NameDescription
ngClick

A more powerful replacement for the default ngClick designed to be used on touchscreen +devices. Most mobile browsers wait about 300ms after a tap-and-release before sending +the click event. This version handles them immediately, and then prevents the +following click event from propagating.

+
ngSwipeLeft

Specify custom behavior when an element is swiped to the left on a touchscreen device. +A leftward swipe is a quick, right-to-left slide of the finger. +Though ngSwipeLeft is designed for touch-based devices, it will work with a mouse click and drag +too.

+
ngSwipeRight

Specify custom behavior when an element is swiped to the right on a touchscreen device. +A rightward swipe is a quick, left-to-right slide of the finger. +Though ngSwipeRight is designed for touch-based devices, it will work with a mouse click and drag +too.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngTouch/directive/ngClick.html b/1.6.6/docs/partials/api/ngTouch/directive/ngClick.html new file mode 100644 index 000000000..829c2aa3c --- /dev/null +++ b/1.6.6/docs/partials/api/ngTouch/directive/ngClick.html @@ -0,0 +1,153 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngClick

+
    + +
  1. + - directive in module ngTouch +
  2. +
+
+ + + +
+
Deprecated: + (since v1.5.0) + +
+

This directive is deprecated and disabled by default. +The directive will receive no further support and might be removed from future releases. +If you need the directive, you can enable it with the $touchProvider#ngClickOverrideEnabled +function. We also recommend that you migrate to FastClick. +To learn more about the 300ms delay, this Telerik article +gives a good overview.

+ +
+ + + +
+

A more powerful replacement for the default ngClick designed to be used on touchscreen +devices. Most mobile browsers wait about 300ms after a tap-and-release before sending +the click event. This version handles them immediately, and then prevents the +following click event from propagating.

+

Requires the ngTouch module to be installed.

+

This directive can fall back to using an ordinary click event, and so works on desktop +browsers as well as mobile.

+

This directive also sets the CSS class ng-click-active while the element is being held +down (by a mouse click or touch) so you can restyle the depressed element if you wish.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-click
      ng-click="expression">
    ...
    </ng-click>
    +
  • +
  • as attribute: +
    <ANY
      ng-click="expression">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngClick + + + + expression + +

Expression to evaluate +upon tap. (Event object is available as $event)

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<button ng-click="count = count + 1" ng-init="count=0">
  Increment
</button>
count: {{ count }}
+
+ +
+
angular.module('ngClickExample', ['ngTouch']);
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ngTouch/directive/ngSwipeLeft.html b/1.6.6/docs/partials/api/ngTouch/directive/ngSwipeLeft.html new file mode 100644 index 000000000..e2c965de2 --- /dev/null +++ b/1.6.6/docs/partials/api/ngTouch/directive/ngSwipeLeft.html @@ -0,0 +1,137 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngSwipeLeft

+
    + +
  1. + - directive in module ngTouch +
  2. +
+
+ + + + + +
+

Specify custom behavior when an element is swiped to the left on a touchscreen device. +A leftward swipe is a quick, right-to-left slide of the finger. +Though ngSwipeLeft is designed for touch-based devices, it will work with a mouse click and drag +too.

+

To disable the mouse click and drag functionality, add ng-swipe-disable-mouse to +the ng-swipe-left or ng-swipe-right DOM Element.

+

Requires the ngTouch module to be installed.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-swipe-left
      ng-swipe-left="expression">
    ...
    </ng-swipe-left>
    +
  • +
  • as attribute: +
    <ANY
      ng-swipe-left="expression">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngSwipeLeft + + + + expression + +

Expression to evaluate +upon left swipe. (Event object is available as $event)

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<div ng-show="!showActions" ng-swipe-left="showActions = true">
  Some list content, like an email in the inbox
</div>
<div ng-show="showActions" ng-swipe-right="showActions = false">
  <button ng-click="reply()">Reply</button>
  <button ng-click="delete()">Delete</button>
</div>
+
+ +
+
angular.module('ngSwipeLeftExample', ['ngTouch']);
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ngTouch/directive/ngSwipeRight.html b/1.6.6/docs/partials/api/ngTouch/directive/ngSwipeRight.html new file mode 100644 index 000000000..ac09d706b --- /dev/null +++ b/1.6.6/docs/partials/api/ngTouch/directive/ngSwipeRight.html @@ -0,0 +1,135 @@ + Improve this Doc + + + + +  View Source + + + +
+

ngSwipeRight

+
    + +
  1. + - directive in module ngTouch +
  2. +
+
+ + + + + +
+

Specify custom behavior when an element is swiped to the right on a touchscreen device. +A rightward swipe is a quick, left-to-right slide of the finger. +Though ngSwipeRight is designed for touch-based devices, it will work with a mouse click and drag +too.

+

Requires the ngTouch module to be installed.

+ +
+ + + + +
+ + + +

Directive Info

+
    + +
  • This directive executes at priority level 0.
  • + +
+ + +

Usage

+
+ +
    + +
  • as element: +
    <ng-swipe-right
      ng-swipe-right="expression">
    ...
    </ng-swipe-right>
    +
  • +
  • as attribute: +
    <ANY
      ng-swipe-right="expression">
    ...
    </ANY>
    +
  • + +
+ +
+

Arguments

+ + + + + + + + + + + + + + + + + + +
ParamTypeDetails
+ ngSwipeRight + + + + expression + +

Expression to evaluate +upon right swipe. (Event object is available as $event)

+ + +
+ +
+ + + +

Examples

+ +

+ + +
+ + +
+
<div ng-show="!showActions" ng-swipe-left="showActions = true">
  Some list content, like an email in the inbox
</div>
<div ng-show="showActions" ng-swipe-right="showActions = false">
  <button ng-click="reply()">Reply</button>
  <button ng-click="delete()">Delete</button>
</div>
+
+ +
+
angular.module('ngSwipeRightExample', ['ngTouch']);
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/api/ngTouch/provider.html b/1.6.6/docs/partials/api/ngTouch/provider.html new file mode 100644 index 000000000..592934d41 --- /dev/null +++ b/1.6.6/docs/partials/api/ngTouch/provider.html @@ -0,0 +1,23 @@ + +

Provider components in ngTouch

+ + + +
+
+ + + + + + + + + + + +
NameDescription
$touchProvider

The $touchProvider allows enabling / disabling ngTouch's ngClick directive.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngTouch/provider/$touchProvider.html b/1.6.6/docs/partials/api/ngTouch/provider/$touchProvider.html new file mode 100644 index 000000000..b160e723b --- /dev/null +++ b/1.6.6/docs/partials/api/ngTouch/provider/$touchProvider.html @@ -0,0 +1,114 @@ + Improve this Doc + + + + +  View Source + + + +
+

$touchProvider

+
    + +
  1. + - $touch +
  2. + +
  3. + - provider in module ngTouch +
  4. +
+
+ + + + + +
+

The $touchProvider allows enabling / disabling ngTouch's ngClick directive.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    ngClickOverrideEnabled([enabled]);

    + +

    +

    Call this method to enable/disable ngTouch's ngClick directive. If enabled, +the default ngClick directive will be replaced by a version that eliminates the 300ms delay for +click events on browser for touch-devices.

    +

    The default is false.

    +
    + + + + +

    Parameters

    + + + + + + + + + + + + + + + + + + +
    ParamTypeDetails
    + enabled + +
    (optional)
    +
    + boolean + +

    update the ngClickOverrideEnabled state if provided, otherwise just return the +current ngClickOverrideEnabled state

    + + +
    + + + + + + +

    Returns

    + + + + + +
    *

    current value if used as getter or itself (chaining) if used as setter

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngTouch/service.html b/1.6.6/docs/partials/api/ngTouch/service.html new file mode 100644 index 000000000..61986355b --- /dev/null +++ b/1.6.6/docs/partials/api/ngTouch/service.html @@ -0,0 +1,30 @@ + +

Service components in ngTouch

+ + + +
+
+ + + + + + + + + + + + + + + + +
NameDescription
$swipe

The $swipe service is a service that abstracts the messier details of hold-and-drag swipe +behavior, to make implementing swipe-related directives more convenient.

+
$touch

Provides the ngClickOverrideEnabled method.

+
+
+
+ diff --git a/1.6.6/docs/partials/api/ngTouch/service/$swipe.html b/1.6.6/docs/partials/api/ngTouch/service/$swipe.html new file mode 100644 index 000000000..95e3fb771 --- /dev/null +++ b/1.6.6/docs/partials/api/ngTouch/service/$swipe.html @@ -0,0 +1,95 @@ + Improve this Doc + + + + +  View Source + + + +
+

$swipe

+
    + + + +
  1. + - service in module ngTouch +
  2. +
+
+ + + + + +
+

The $swipe service is a service that abstracts the messier details of hold-and-drag swipe +behavior, to make implementing swipe-related directives more convenient.

+

Requires the ngTouch module to be installed.

+

$swipe is used by the ngSwipeLeft and ngSwipeRight directives in ngTouch.

+

Usage

+

The $swipe service is an object with a single method: bind. bind takes an element +which is to be watched for swipes, and an object with four handler functions. See the +documentation for bind below.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    bind();

    + +

    +

    The main method of $swipe. It takes an element to be watched for swipe motions, and an +object containing event handlers. +The pointer types that should be used can be specified via the optional +third argument, which is an array of strings 'mouse', 'touch' and 'pointer'. By default, +$swipe will listen for mouse, touch and pointer events.

    +

    The four events are start, move, end, and cancel. start, move, and end +receive as a parameter a coordinates object of the form { x: 150, y: 310 } and the raw +event. cancel receives the raw event as its single parameter.

    +

    start is called on either mousedown, touchstart or pointerdown. After this event, $swipe is +watching for touchmove, mousemove or pointermove events. These events are ignored until the total +distance moved in either dimension exceeds a small threshold.

    +

    Once this threshold is exceeded, either the horizontal or vertical delta is greater.

    +
      +
    • If the horizontal distance is greater, this is a swipe and move and end events follow.
    • +
    • If the vertical distance is greater, this is a scroll, and we let the browser take over. +A cancel event is sent.
    • +
    +

    move is called on mousemove, touchmove and pointermove after the above logic has determined that +a swipe is in progress.

    +

    end is called when a swipe is successfully completed with a touchend, mouseup or pointerup.

    +

    cancel is called either on a touchcancel or pointercancel from the browser, or when we begin scrolling +as described above.

    +
    + + + + + + + +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/api/ngTouch/service/$touch.html b/1.6.6/docs/partials/api/ngTouch/service/$touch.html new file mode 100644 index 000000000..b6f0c2e2c --- /dev/null +++ b/1.6.6/docs/partials/api/ngTouch/service/$touch.html @@ -0,0 +1,78 @@ + Improve this Doc + + + + +  View Source + + + +
+

$touch

+
    + +
  1. + - $touchProvider +
  2. + +
  3. + - service in module ngTouch +
  4. +
+
+ + + + + +
+

Provides the ngClickOverrideEnabled method.

+ +
+ + + + +
+ + + + + + + +

Methods

+
    +
  • +

    ngClickOverrideEnabled();

    + +

    +
    + + + + + + + + +

    Returns

    + + + + + +
    *

    current value of ngClickOverrideEnabled set in the $touchProvider, +i.e. if ngTouch's ngClick directive is enabled.

    +
    +
  • +
+ + + + + + +
+ + diff --git a/1.6.6/docs/partials/error.html b/1.6.6/docs/partials/error.html new file mode 100644 index 000000000..4ee1eb003 --- /dev/null +++ b/1.6.6/docs/partials/error.html @@ -0,0 +1,15 @@ + Improve this Doc + + +

Error Reference

+

Use the Error Reference manual to find information about error conditions in +your AngularJS app. Errors thrown in production builds of AngularJS will log +links to this site on the console.

+

Other useful references for debugging your app include:

+ + + diff --git a/1.6.6/docs/partials/error/$animate.html b/1.6.6/docs/partials/error/$animate.html new file mode 100644 index 000000000..86513a190 --- /dev/null +++ b/1.6.6/docs/partials/error/$animate.html @@ -0,0 +1,31 @@ + Improve this Doc + + +

$animate

+ +
+ Here are the list of errors in the $animate namespace. + +
+ +
+
+ + + + + + + + + + + + + + +
NameDescription
nongcls`ng-animate` class not allowed
notcselNot class CSS selector
+
+
+ + diff --git a/1.6.6/docs/partials/error/$animate/nongcls.html b/1.6.6/docs/partials/error/$animate/nongcls.html new file mode 100644 index 000000000..24f89baed --- /dev/null +++ b/1.6.6/docs/partials/error/$animate/nongcls.html @@ -0,0 +1,20 @@ + Improve this Doc + + +

Error: $animate:nongcls +
`ng-animate` class not allowed
+

+ +
+
$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.
+
+ +

Description

+
+

This error occurs, when trying to set $animateProvider.classNameFilter() to a RegExp containing +the reserved ng-animate class. Since .ng-animate will be added/removed by $animate itself, +using it as part of the classNameFilter RegExp is not allowed.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$animate/notcsel.html b/1.6.6/docs/partials/error/$animate/notcsel.html new file mode 100644 index 000000000..c38d81dca --- /dev/null +++ b/1.6.6/docs/partials/error/$animate/notcsel.html @@ -0,0 +1,18 @@ + Improve this Doc + + +

Error: $animate:notcsel +
Not class CSS selector
+

+ +
+
Expecting class selector starting with '.' got '{0}'.
+
+ +

Description

+
+

Expecting a CSS selector for class. Class selectors must start with ., for example: .my-class-name.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$cacheFactory.html b/1.6.6/docs/partials/error/$cacheFactory.html new file mode 100644 index 000000000..a88f1566e --- /dev/null +++ b/1.6.6/docs/partials/error/$cacheFactory.html @@ -0,0 +1,27 @@ + Improve this Doc + + +

$cacheFactory

+ +
+ Here are the list of errors in the $cacheFactory namespace. + +
+ +
+
+ + + + + + + + + + +
NameDescription
iidInvalid ID
+
+
+ + diff --git a/1.6.6/docs/partials/error/$cacheFactory/iid.html b/1.6.6/docs/partials/error/$cacheFactory/iid.html new file mode 100644 index 000000000..04834aac1 --- /dev/null +++ b/1.6.6/docs/partials/error/$cacheFactory/iid.html @@ -0,0 +1,19 @@ + Improve this Doc + + +

Error: $cacheFactory:iid +
Invalid ID
+

+ +
+
CacheId '{0}' is already taken!
+
+ +

Description

+
+

This error occurs when trying to create a new cache object via $cacheFactory with an ID that was already used to create another cache object.

+

To resolve the error please use a different cache ID when calling $cacheFactory.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$compile.html b/1.6.6/docs/partials/error/$compile.html new file mode 100644 index 000000000..fd76dca7d --- /dev/null +++ b/1.6.6/docs/partials/error/$compile.html @@ -0,0 +1,91 @@ + Improve this Doc + + +

$compile

+ +
+ Here are the list of errors in the $compile namespace. + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
baddirInvalid Directive/Component Name
badrestrictInvalid Directive Restrict
ctreqMissing Required Controller
infchngUnstable `$onChanges` hooks
iscpInvalid Isolate Scope Definition
missingattrMissing required attribute
multidirMultiple Directive Resource Contention
multilinkLinking Element Multiple Times
noctrlController is required.
nodomeventsInterpolated Event Attributes
nonassignNon-Assignable Expression
noslotNo matching slot in parent directive
reqslotRequired transclusion slot
selmultiBinding to Multiple Attribute
tploadError Loading Template
tplrtInvalid Template Root
uterdirUnterminated Directive
+
+
+ + diff --git a/1.6.6/docs/partials/error/$compile/baddir.html b/1.6.6/docs/partials/error/$compile/baddir.html new file mode 100644 index 000000000..7fbb1e404 --- /dev/null +++ b/1.6.6/docs/partials/error/$compile/baddir.html @@ -0,0 +1,19 @@ + Improve this Doc + + +

Error: $compile:baddir +
Invalid Directive/Component Name
+

+ +
+
Directive/Component name '{0}' is invalid. The name should not contain leading or trailing whitespaces
+
+ +

Description

+
+

This error occurs when the name of a directive or component is not valid.

+

Directives and Components must start with a lowercase character and must not contain leading or trailing whitespaces.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$compile/badrestrict.html b/1.6.6/docs/partials/error/$compile/badrestrict.html new file mode 100644 index 000000000..9c2c96991 --- /dev/null +++ b/1.6.6/docs/partials/error/$compile/badrestrict.html @@ -0,0 +1,29 @@ + Improve this Doc + + +

Error: $compile:badrestrict +
Invalid Directive Restrict
+

+ +
+
Restrict property '{0}' of directive '{1}' is invalid
+
+ +

Description

+
+

This error occurs when the restrict property of a directive is not valid.

+

The directive restrict property must be a string including one or more of the following characters:

+
    +
  • E (element)
  • +
  • A (attribute)
  • +
  • C (class)
  • +
  • M (comment)
  • +
+

For example:

+
restrict: 'E'
+restrict: 'EAC'
+
+ +
+ + diff --git a/1.6.6/docs/partials/error/$compile/ctreq.html b/1.6.6/docs/partials/error/$compile/ctreq.html new file mode 100644 index 000000000..e9009f284 --- /dev/null +++ b/1.6.6/docs/partials/error/$compile/ctreq.html @@ -0,0 +1,48 @@ + Improve this Doc + + +

Error: $compile:ctreq +
Missing Required Controller
+

+ +
+
Controller '{0}', required by directive '{1}', can't be found!
+
+ +

Description

+
+

This error occurs when HTML compiler tries to process a directive that specifies the require option in a directive definition, +but the required directive controller is not present on the current DOM element (or its ancestor element, if ^ was specified).

+

To resolve this error ensure that there is no typo in the required controller name and that the required directive controller is present on the current element.

+

If the required controller is expected to be on an ancestor element, make sure that you prefix the controller name in the require definition with ^.

+

If the required controller is optionally requested, use ? or ^? to specify that.

+

Example of a directive that requires ngModel controller:

+
myApp.directive('myDirective', function() {
+  return {
+    require: 'ngModel',
+    ...
+  }
+}
+
+

This directive can then be used as:

+
<input ng-model="some.path" my-directive>
+
+

Example of a directive that optionally requires a form controller from an ancestor:

+
myApp.directive('myDirective', function() {
+  return {
+    require: '^?form',
+    ...
+  }
+}
+
+

This directive can then be used as:

+
<form name="myForm">
+  <div>
+    <span my-directive></span>
+  </div>
+</form>
+
+ +
+ + diff --git a/1.6.6/docs/partials/error/$compile/infchng.html b/1.6.6/docs/partials/error/$compile/infchng.html new file mode 100644 index 000000000..e7b8138f2 --- /dev/null +++ b/1.6.6/docs/partials/error/$compile/infchng.html @@ -0,0 +1,38 @@ + Improve this Doc + + +

Error: $compile:infchng +
Unstable `$onChanges` hooks
+

+ +
+
{0} $onChanges() iterations reached. Aborting!
+
+
+ +

Description

+
+

This error occurs when the application's model becomes unstable because some $onChanges hooks are causing updates which then trigger +further calls to $onChanges that can never complete. +Angular detects this situation and prevents an infinite loop from causing the browser to become unresponsive.

+

For example, the situation can occur by setting up a $onChanges() hook which triggers an event on the component, which subsequently +triggers the component's bound inputs to be updated:

+
<c1 prop="a" on-change="a = -a"></c1>
+
+
function Controller1() {}
+Controller1.$onChanges = function() {
+  this.onChange();
+};
+
+mod.component('c1', {
+  controller: Controller1,
+  bindings: {'prop': '<', onChange: '&'}
+}
+
+

The maximum number of allowed iterations of the $onChanges hooks is controlled via TTL setting which can be configured via +$compileProvider.onChangesTtl.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$compile/iscp.html b/1.6.6/docs/partials/error/$compile/iscp.html new file mode 100644 index 000000000..209db572f --- /dev/null +++ b/1.6.6/docs/partials/error/$compile/iscp.html @@ -0,0 +1,35 @@ + Improve this Doc + + +

Error: $compile:iscp +
Invalid Isolate Scope Definition
+

+ +
+
Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}
+
+ +

Description

+
+

When declaring isolate scope the scope definition object must be in specific format which starts with mode character (@&=<), after which comes an optional ?, and it ends with an optional local name.

+
myModule.directive('directiveName', function factory() {
+  return {
+    ...
+    scope: {
+      'attrName': '@', // OK
+      'attrName2': '=localName', // OK
+      'attrName3': '<?localName', // OK
+      'attrName4': ' = name', // OK
+      'attrName5': 'name',    // ERROR: missing mode @&=
+      'attrName6': 'name=',   // ERROR: must be prefixed with @&=
+      'attrName7': '=name?',  // ERROR: ? must come directly after the mode
+    }
+    ...
+  }
+});
+
+

Please refer to the scope option of the directive definition documentation to learn more about the API.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$compile/missingattr.html b/1.6.6/docs/partials/error/$compile/missingattr.html new file mode 100644 index 000000000..d6b8ffc05 --- /dev/null +++ b/1.6.6/docs/partials/error/$compile/missingattr.html @@ -0,0 +1,20 @@ + Improve this Doc + + +

Error: $compile:missingattr +
Missing required attribute
+

+ +
+
Attribute '{0}' of '{1}' is non-optional and must be set!
+
+ +

Description

+
+

This error may occur only when $compileProvider.strictComponentBindingsEnabled is set to true. +Then all attributes mentioned in bindings without ? must be set. If one or more aren't set, +the first one will throw an error.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$compile/multidir.html b/1.6.6/docs/partials/error/$compile/multidir.html new file mode 100644 index 000000000..a661aefa9 --- /dev/null +++ b/1.6.6/docs/partials/error/$compile/multidir.html @@ -0,0 +1,27 @@ + Improve this Doc + + +

Error: $compile:multidir +
Multiple Directive Resource Contention
+

+ +
+
Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}
+
+ +

Description

+
+

This error occurs when multiple directives are applied to the same DOM element, and +processing them would result in a collision or an unsupported configuration.

+

To resolve this issue remove one of the directives which is causing the collision.

+

Example scenarios of multiple incompatible directives applied to the same element include:

+
    +
  • Multiple directives requesting isolated scope.
  • +
  • Multiple directives publishing a controller under the same name.
  • +
  • Multiple directives declared with the transclusion option.
  • +
  • Multiple directives attempting to define a template or templateURL.
  • +
+ +
+ + diff --git a/1.6.6/docs/partials/error/$compile/multilink.html b/1.6.6/docs/partials/error/$compile/multilink.html new file mode 100644 index 000000000..62a863038 --- /dev/null +++ b/1.6.6/docs/partials/error/$compile/multilink.html @@ -0,0 +1,33 @@ + Improve this Doc + + +

Error: $compile:multilink +
Linking Element Multiple Times
+

+ +
+
This element has already been linked.
+
+ +

Description

+
+

This error occurs when a single element is linked more then once.

+

For example, if an element is compiled and linked twice without cloning:

+
var linker = $compile(template);
+linker($scope); //=> ok
+linker($scope); //=> multilink error
+
+

Linking an element as a clone multiple times is ok:

+
var linker = $compile(template);
+linker($scope, function() { ... });     //=> ok
+linker($scope, function() { ... });     //=> ok
+
+

However once an element has been linked it can not be re-linked as a clone:

+
var linker = $compile(template);
+linker($scope);                       //=> ok
+linker($scope, function() { ... });   //=> multilink error
+
+ +
+ + diff --git a/1.6.6/docs/partials/error/$compile/noctrl.html b/1.6.6/docs/partials/error/$compile/noctrl.html new file mode 100644 index 000000000..4f4f8cc85 --- /dev/null +++ b/1.6.6/docs/partials/error/$compile/noctrl.html @@ -0,0 +1,23 @@ + Improve this Doc + + +

Error: $compile:noctrl +
Controller is required.
+

+ +
+
Cannot bind to controller without directive '{0}'s controller.
+
+ +

Description

+
+

When using the bindToController feature of AngularJS, a directive is required +to have a Controller. A controller may be specified by adding a "controller" +property to the directive definition object. Its value should be either a +string, or an invokable object (a function, or an array whose last element is a +function).

+

For more information, see the directives guide.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$compile/nodomevents.html b/1.6.6/docs/partials/error/$compile/nodomevents.html new file mode 100644 index 000000000..0379fba34 --- /dev/null +++ b/1.6.6/docs/partials/error/$compile/nodomevents.html @@ -0,0 +1,25 @@ + Improve this Doc + + +

Error: $compile:nodomevents +
Interpolated Event Attributes
+

+ +
+
Interpolations for HTML DOM event attributes are disallowed.  Please use the ng- versions (such as ng-click instead of onclick) instead.
+
+ +

Description

+
+

This error occurs when one tries to create a binding for event handler attributes like onclick, onload, onsubmit, etc.

+

There is no practical value in binding to these attributes and doing so only exposes your application to security vulnerabilities like XSS. +For these reasons binding to event handler attributes (all attributes that start with on and formaction attribute) is not supported.

+

An example code that would allow XSS vulnerability by evaluating user input in the window context could look like this:

+
<input ng-model="username">
+<div onclick="{{username}}">click me</div>
+
+

Since the onclick evaluates the value as JavaScript code in the window context, setting the username model to a value like javascript:alert('PWND') would result in script injection when the div is clicked.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$compile/nonassign.html b/1.6.6/docs/partials/error/$compile/nonassign.html new file mode 100644 index 000000000..a304c3bf9 --- /dev/null +++ b/1.6.6/docs/partials/error/$compile/nonassign.html @@ -0,0 +1,61 @@ + Improve this Doc + + +

Error: $compile:nonassign +
Non-Assignable Expression
+

+ +
+
Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!
+
+ +

Description

+
+

This error occurs when a directive defines an isolate scope property +(using the = mode in the scope option of a directive definition) but the directive is used with an expression that is not-assignable.

+

In order for the two-way data-binding to work, it must be possible to write new values back into the path defined with the expression.

+

For example, given a directive:

+
myModule.directive('myDirective', function factory() {
+  return {
+    ...
+    scope: {
+      localValue: '=bind'
+    }
+    ...
+  }
+});
+
+

Following are invalid uses of this directive:

+
<!-- ERROR because `1+2=localValue` is an invalid statement -->
+<my-directive bind="1+2">
+
+<!-- ERROR because `myFn()=localValue` is an invalid statement -->
+<my-directive bind="myFn()">
+
+<!-- ERROR because attribute bind wasn't provided -->
+<my-directive>
+
+

To resolve this error, do one of the following options:

+
    +
  • use path expressions with scope properties that are two-way data-bound like so:
  • +
+
<my-directive bind="some.property">
+<my-directive bind="some[3]['property']">
+
+
    +
  • Make the binding optional
  • +
+
myModule.directive('myDirective', function factory() {
+  return {
+    ...
+    scope: {
+      localValue: '=?bind' // <-- the '?' makes it optional
+    }
+    ...
+  }
+});
+
+ +
+ + diff --git a/1.6.6/docs/partials/error/$compile/noslot.html b/1.6.6/docs/partials/error/$compile/noslot.html new file mode 100644 index 000000000..704f6bddd --- /dev/null +++ b/1.6.6/docs/partials/error/$compile/noslot.html @@ -0,0 +1,45 @@ + Improve this Doc + + +

Error: $compile:noslot +
No matching slot in parent directive
+

+ +
+
No parent directive that requires a transclusion with slot name "{0}". Element: {1}
+
+ +

Description

+
+

This error occurs when declaring a specific slot in a ngTransclude +which does not map to a specific slot defined in the transclude property of the directive.

+

In this example the template has declared a slot missing from the transclude definition. +This example will generate a noslot error.

+
var componentConfig = {
+  template: '<div>' +
+                '<div ng-transclude="slotProvided"></div>' +
+                '<div ng-transclude="noSlotProvided"></div>' +
+            '</div>',
+  transclude: {
+      // The key value pairs here are considered "slots" that are provided for components to slot into.
+    slotProvided: 'slottedComponent', // mandatory transclusion
+    // There is no slot provided here for the transclude 'noSlotProvided' declared in the above template.
+  }
+};
+
+

If we make the following change we will no longer get the noslot error.

+
var componentConfig = {
+  template: '<div>' +
+                '<div ng-transclude="slotProvided"></div>' +
+                '<div ng-transclude="noSlotProvided"></div>' +
+            '</div>',
+  transclude: {
+    slotProvided: 'slottedComponent',
+    noSlotProvided: 'otherComponent' // now it is declared and the error should cease
+  }
+};
+
+ +
+ + diff --git a/1.6.6/docs/partials/error/$compile/reqslot.html b/1.6.6/docs/partials/error/$compile/reqslot.html new file mode 100644 index 000000000..5a25b809e --- /dev/null +++ b/1.6.6/docs/partials/error/$compile/reqslot.html @@ -0,0 +1,53 @@ + Improve this Doc + + +

Error: $compile:reqslot +
Required transclusion slot
+

+ +
+
Required transclusion slot `{0}` was not filled.
+
+ +

Description

+
+

This error occurs when a directive or component try to transclude a slot that is not provided.

+

Transcluded elements must contain something. This error could happen when you try to transclude a self closing tag element. +Also you can make a transclusion slot optional with a ? prefix.

+
// In this example the <my-component> must have an <important-component> inside to transclude it.
+// If not, a reqslot error will be generated.
+
+var componentConfig = {
+  template: 'path/to/template.html',
+  transclude: {
+    importantSlot: 'importantComponent', // mandatory transclusion
+    optionalSlot: '?optionalComponent',  // optional transclusion
+  }
+};
+
+angular
+  .module('doc')
+  .component('myComponent', componentConfig)
+
+
<!-- Will not work because <important-component> is missing -->
+<my-component>
+</my-component>
+
+<my-component>
+  <optional-component></optional-component>
+</my-component>
+
+<!-- Will work -->
+<my-component>
+  <important-component></important-component>
+</my-component>
+
+<my-component>
+  <optional-component></optional-component>
+  <important-component></important-component>
+</my-component>
+
+ +
+ + diff --git a/1.6.6/docs/partials/error/$compile/selmulti.html b/1.6.6/docs/partials/error/$compile/selmulti.html new file mode 100644 index 000000000..f10efdf26 --- /dev/null +++ b/1.6.6/docs/partials/error/$compile/selmulti.html @@ -0,0 +1,26 @@ + Improve this Doc + + +

Error: $compile:selmulti +
Binding to Multiple Attribute
+

+ +
+
Binding to the 'multiple' attribute is not supported. Element: {0}
+
+ +

Description

+
+

Binding to the multiple attribute of select element is not supported since switching between multiple and single mode changes the ngModel object type from instance to array of instances which breaks the model semantics.

+

If you need to use different types of select elements in your template based on some variable, please use ngIf or ngSwitch directives to select one of them to be used at runtime.

+

Example with invalid usage:

+
<select ng-model="some.model" multiple="{{mode}}"></select>
+
+

Example that uses ngIf to pick one of the select elements based on a variable:

+
<select ng-if="mode == 'multiple'" ng-model="some.model" multiple></select>
+<select ng-if="mode != 'multiple'" ng-model="some.model"></select>
+
+ +
+ + diff --git a/1.6.6/docs/partials/error/$compile/tpload.html b/1.6.6/docs/partials/error/$compile/tpload.html new file mode 100644 index 000000000..bcc4e6aaf --- /dev/null +++ b/1.6.6/docs/partials/error/$compile/tpload.html @@ -0,0 +1,21 @@ + Improve this Doc + + +

Error: $compile:tpload +
Error Loading Template
+

+ +
+

+
+ +

Description

+
+

This error occurs when $compile attempts to fetch a template from some URL, and the request fails.

+

To resolve this error, ensure that the URL of the template is spelled correctly and resolves to correct absolute URL. +The Chrome Developer Tools might also be helpful in determining why the request failed.

+

If you are using $templateCache to pre-load templates, ensure that the cache was populated with the template.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$compile/tplrt.html b/1.6.6/docs/partials/error/$compile/tplrt.html new file mode 100644 index 000000000..2cc7a6f65 --- /dev/null +++ b/1.6.6/docs/partials/error/$compile/tplrt.html @@ -0,0 +1,51 @@ + Improve this Doc + + +

Error: $compile:tplrt +
Invalid Template Root
+

+ +
+
Template for directive '{0}' must have exactly one root element. {1}
+
+ +

Description

+
+

When a directive is declared with template (or templateUrl) and replace mode on, the template +must have exactly one root element. That is, the text of the template property or the content +referenced by the templateUrl must be contained within a single html element. +For example, <p>blah <em>blah</em> blah</p> instead of simply blah <em>blah</em> blah. +Otherwise, the replacement operation would result in a single element (the directive) being replaced +with multiple elements or nodes, which is unsupported and not commonly needed in practice.

+

For example a directive with definition:

+
myModule.directive('myDirective', function factory() {
+  return {
+    ...
+    replace: true,
+    templateUrl: 'someUrl'
+    ...
+  }
+});
+
+

And a template provided at URL someUrl. The template must be an html fragment that has only a +single root element, like the div element in this template:

+
<div><b>Hello</b> World!</div>
+
+

An invalid template to be used with this directive is one that defines multiple root nodes or +elements. For example:

+
<b>Hello</b> World!
+
+

Watch out for html comments at the beginning or end of templates, as these can cause this error as +well. Consider the following template:

+
<div class='container'>
+  <div class='wrapper'>
+     ...
+  </div> <!-- wrapper -->
+</div> <!-- container -->
+
+

The <!-- container --> comment is interpreted as a second root element and causes the template to +be invalid.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$compile/uterdir.html b/1.6.6/docs/partials/error/$compile/uterdir.html new file mode 100644 index 000000000..a045a5674 --- /dev/null +++ b/1.6.6/docs/partials/error/$compile/uterdir.html @@ -0,0 +1,36 @@ + Improve this Doc + + +

Error: $compile:uterdir +
Unterminated Directive
+

+ +
+
Unterminated attribute, found '{0}' but no matching '{1}' found.
+
+ +

Description

+
+

This error occurs when using multi-element directives and a directive-start attribute fails to form a matching pair with a corresponding directive-end attribute. +A directive-start should have a matching directive-end on a sibling node in the DOM. For instance,

+
<table>
+  <tr ng-repeat-start="item in list">I get repeated</tr>
+  <tr ng-repeat-end>I also get repeated</tr>
+</table>
+
+

is a valid example.

+

This error can occur in several different ways. One is by leaving out the directive-end attribute, like so:

+
<div>
+  <span foo-start></span>
+</div>
+
+

Another is by nesting a directive-end inside of directive-start, or vice versa:

+
<div>
+  <span foo-start><span foo-end></span></span>
+</div>
+
+

To avoid this error, make sure each directive-start you use has a matching directive-end on a sibling node in the DOM.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$controller.html b/1.6.6/docs/partials/error/$controller.html new file mode 100644 index 000000000..2c82f2c49 --- /dev/null +++ b/1.6.6/docs/partials/error/$controller.html @@ -0,0 +1,35 @@ + Improve this Doc + + +

$controller

+ +
+ Here are the list of errors in the $controller namespace. + +
+ +
+
+ + + + + + + + + + + + + + + + + + +
NameDescription
ctrlfmtBadly formed controller string
ctrlregA controller with this name is not registered.
noscpMissing $scope object
+
+
+ + diff --git a/1.6.6/docs/partials/error/$controller/ctrlfmt.html b/1.6.6/docs/partials/error/$controller/ctrlfmt.html new file mode 100644 index 000000000..021d6e068 --- /dev/null +++ b/1.6.6/docs/partials/error/$controller/ctrlfmt.html @@ -0,0 +1,46 @@ + Improve this Doc + + +

Error: $controller:ctrlfmt +
Badly formed controller string
+

+ +
+
Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.
+
+ +

Description

+
+

This error occurs when $controller service is called +with a string that does not match the supported controller string formats.

+

Supported formats:

+
    +
  1. __name__
  2. +
  3. __name__ as __identifier__
  4. +
+

Neither __name__ or __identifier__ may contain spaces.

+

Example of incorrect usage that leads to this error:

+
<!-- unclosed ng-controller attribute messes up the format -->
+<div ng-controller="myController>
+
+

or

+
// does not match `__name__` or `__name__ as __identifier__`
+var myCtrl = $controller("mY contRoller", { $scope: newScope });
+
+

or

+
directive("myDirective", function() {
+  return {
+    // does not match `__name__` or `__name__ as __identifier__`
+    controller: "mY contRoller",
+    link: function() {}
+  };
+});
+
+

To fix the examples above, ensure that the controller string matches the supported +formats, and that any html attributes which are used as controller expressions are +closed.

+

Please consult the $controller service api docs to learn more.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$controller/ctrlreg.html b/1.6.6/docs/partials/error/$controller/ctrlreg.html new file mode 100644 index 000000000..1cc517fb9 --- /dev/null +++ b/1.6.6/docs/partials/error/$controller/ctrlreg.html @@ -0,0 +1,33 @@ + Improve this Doc + + +

Error: $controller:ctrlreg +
A controller with this name is not registered.
+

+ +
+
The controller with the name '{0}' is not registered.
+
+ +

Description

+
+

This error occurs when the $controller() service is called +with a string that does not match any of the registered controllers. The controller service may have +been invoked directly, or indirectly, for example through the ngController directive, +or inside a component / directive / +route definition (when using a string for the controller property). +Third-party modules can also instantiate controllers with the $controller() service.

+

Causes for this error can be:

+
    +
  1. Your reference to the controller has a typo. For example, in +the ngController directive attribute, in a component +definition's controller property, or in the call to $controller().
  2. +
  3. You have not registered the controller (neither via Module.controller +nor $controllerProvider.register().
  4. +
  5. You have a typo in the registered controller name.
  6. +
+

Please consult the $controller service api docs to learn more.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$controller/noscp.html b/1.6.6/docs/partials/error/$controller/noscp.html new file mode 100644 index 000000000..0b2f49a58 --- /dev/null +++ b/1.6.6/docs/partials/error/$controller/noscp.html @@ -0,0 +1,27 @@ + Improve this Doc + + +

Error: $controller:noscp +
Missing $scope object
+

+ +
+
Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.
+
+ +

Description

+
+

This error occurs when $controller service is called in order to instantiate a new controller but no scope is provided via $scope property of the locals map.

+

Example of incorrect usage that leads to this error:

+
$controller(MyController);
+//or
+$controller(MyController, {scope: newScope});
+
+

To fix the example above please provide a scope (using the $scope property in the locals object) to the $controller call:

+
$controller(MyController, {$scope: newScope});
+
+

Please consult the $controller service api docs to learn more.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$http.html b/1.6.6/docs/partials/error/$http.html new file mode 100644 index 000000000..85465ad1c --- /dev/null +++ b/1.6.6/docs/partials/error/$http.html @@ -0,0 +1,35 @@ + Improve this Doc + + +

$http

+ +
+ Here are the list of errors in the $http namespace. + +
+ +
+
+ + + + + + + + + + + + + + + + + + +
NameDescription
baddataBad JSON Data
badjsonpBad JSONP Request Configuration
badreqBad Request Configuration
+
+
+ + diff --git a/1.6.6/docs/partials/error/$http/baddata.html b/1.6.6/docs/partials/error/$http/baddata.html new file mode 100644 index 000000000..c5098c2d7 --- /dev/null +++ b/1.6.6/docs/partials/error/$http/baddata.html @@ -0,0 +1,25 @@ + Improve this Doc + + +

Error: $http:baddata +
Bad JSON Data
+

+ +
+
Data must be a valid JSON object. Received: "{0}". Parse error: "{1}"
+
+ +

Description

+
+

The default transformResponse will try to parse the +response as JSON if the Content-Type header is application/json, or the response looks like a +valid JSON-stringified object or array. +This error occurs when that data is not a valid JSON object.

+

To resolve this error, make sure you pass valid JSON data to transformResponse. If the response +data looks like JSON, but has a different Content-Type header, you must +implement your own response +transformer on a per request basis, or modify the default $http responseTransform.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$http/badjsonp.html b/1.6.6/docs/partials/error/$http/badjsonp.html new file mode 100644 index 000000000..7bc5bc56e --- /dev/null +++ b/1.6.6/docs/partials/error/$http/badjsonp.html @@ -0,0 +1,28 @@ + Improve this Doc + + +

Error: $http:badjsonp +
Bad JSONP Request Configuration
+

+ +
+
Illegal use of callback param, "{0}", in url, "{1}"
+
+ +

Description

+
+

This error occurs when the URL generated from the configuration object contains a parameter with the +same name as the configured jsonpCallbackParam property; or when it contains a parameter whose +value is JSON_CALLBACK.

+

$http JSONP requests need to attach a callback query parameter to the URL. The name of this +parameter is specified in the configuration object (or in the defaults) via the jsonpCallbackParam +property. You must not provide your own parameter with this name in the configuratio of the request.

+

In previous versions of Angular, you specified where to add the callback parameter value via the +JSON_CALLBACK placeholder. This is no longer allowed.

+

To resolve this error, remove any parameters that have the same name as the jsonpCallbackParam; +and/or remove any parameters that have a value of JSON_CALLBACK.

+

For more information, see the $http.jsonp() method API documentation.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$http/badreq.html b/1.6.6/docs/partials/error/$http/badreq.html new file mode 100644 index 000000000..97c8e76f8 --- /dev/null +++ b/1.6.6/docs/partials/error/$http/badreq.html @@ -0,0 +1,23 @@ + Improve this Doc + + +

Error: $http:badreq +
Bad Request Configuration
+

+ +
+
Http request configuration url must be a string or a $sce trusted object.  Received: {0}
+
+ +

Description

+
+

This error occurs when the request configuration parameter passed to the $http service is not a valid object. +$http expects a single parameter, the request configuration object, but received a parameter that was not an object or did not contain valid properties.

+

The error message should provide additional context such as the actual value of the parameter that was received. +If you passed a string parameter, perhaps you meant to call one of the shorthand methods on $http such as $http.get(…), etc.

+

To resolve this error, make sure you pass a valid request configuration object to $http.

+

For more information, see the $http service API documentation.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$injector.html b/1.6.6/docs/partials/error/$injector.html new file mode 100644 index 000000000..ab49ea303 --- /dev/null +++ b/1.6.6/docs/partials/error/$injector.html @@ -0,0 +1,55 @@ + Improve this Doc + + +

$injector

+ +
+ Here are the list of errors in the $injector namespace. + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
cdepCircular Dependency
itknBad Injection Token
modulerrModule Error
nomodModule Unavailable
pgetProvider Missing $get
strictdiExplicit annotation required
undefUndefined Value
unprUnknown Provider
+
+
+ + diff --git a/1.6.6/docs/partials/error/$injector/cdep.html b/1.6.6/docs/partials/error/$injector/cdep.html new file mode 100644 index 000000000..2504b4f91 --- /dev/null +++ b/1.6.6/docs/partials/error/$injector/cdep.html @@ -0,0 +1,33 @@ + Improve this Doc + + +

Error: $injector:cdep +
Circular Dependency
+

+ +
+
Circular dependency found: {0}
+
+ +

Description

+
+

This error occurs when the $injector tries to get +a service that depends on itself, either directly or indirectly. To fix this, +construct your dependency chain such that there are no circular dependencies.

+

For example:

+
angular.module('myApp', [])
+.factory('myService', function (myService) {
+  // ...
+})
+.controller('MyCtrl', function ($scope, myService) {
+  // ...
+});
+
+

When an instance of MyCtrl is created, the service myService will be created +by the $injector. myService depends on itself, which causes the $injector +to detect a circular dependency and throw the error.

+

For more information, see the Dependency Injection Guide.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$injector/itkn.html b/1.6.6/docs/partials/error/$injector/itkn.html new file mode 100644 index 000000000..f2134aef9 --- /dev/null +++ b/1.6.6/docs/partials/error/$injector/itkn.html @@ -0,0 +1,33 @@ + Improve this Doc + + +

Error: $injector:itkn +
Bad Injection Token
+

+ +
+
Incorrect injection token! Expected service name as string, got {0}
+
+ +

Description

+
+

This error occurs when using a bad token as a dependency injection annotation. +Dependency injection annotation tokens should always be strings. Using any other +type will cause this error to be thrown.

+

Examples of code with bad injection tokens include:

+
var myCtrl = function ($scope, $http) { /* ... */ };
+myCtrl.$inject = ['$scope', 42];
+
+myAppModule.controller('MyCtrl', ['$scope', {}, function ($scope, $timeout) {
+  // ...
+}]);
+
+

The bad injection tokens are 42 in the first example and {} in the second. +To avoid the error, always use string literals for dependency injection annotation +tokens.

+

For an explanation of what injection annotations are and how to use them, refer +to the Dependency Injection Guide.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$injector/modulerr.html b/1.6.6/docs/partials/error/$injector/modulerr.html new file mode 100644 index 000000000..6c2a2a6d7 --- /dev/null +++ b/1.6.6/docs/partials/error/$injector/modulerr.html @@ -0,0 +1,36 @@ + Improve this Doc + + +

Error: $injector:modulerr +
Module Error
+

+ +
+
Failed to instantiate module {0} due to:
+{1}
+
+ +

Description

+
+

This error occurs when a module fails to load due to some exception. The error +message above should provide additional context.

+

A common reason why the module fails to load is that you've forgotten to +include the file with the defined module or that the file couldn't be loaded.

+

Using ngRoute

+

In AngularJS 1.2.0 and later, ngRoute has been moved to its own module. +If you are getting this error after upgrading to 1.2.x or later, be sure that you've +installed ngRoute.

+

Monkey-patching Angular's ng module

+

This error can also occur if you have tried to add your own components to the ng module. +This has never been supported and from 1.3.0 it will actually trigger this error. +For instance the following code could trigger this error.

+
angular.module('ng').filter('tel', function (){});
+
+

Instead create your own module and add it as a dependency to your application's top-level module. +See #9692 and +#7709 for more information

+ +
+ + diff --git a/1.6.6/docs/partials/error/$injector/nomod.html b/1.6.6/docs/partials/error/$injector/nomod.html new file mode 100644 index 000000000..6b385aad8 --- /dev/null +++ b/1.6.6/docs/partials/error/$injector/nomod.html @@ -0,0 +1,36 @@ + Improve this Doc + + +

Error: $injector:nomod +
Module Unavailable
+

+ +
+
Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
+
+ +

Description

+
+

This error occurs when you declare a dependency on a module that isn't defined anywhere or hasn't +been loaded in the current browser context.

+

When you receive this error, check that the name of the module in question is correct and that the +file in which this module is defined has been loaded (either via <script> tag, loader like +require.js, or testing harness like karma).

+

A less common reason for this error is trying to "re-open" a module that has not yet been defined.

+

To define a new module, call angular.module with a name +and an array of dependent modules, like so:

+
// When defining a module with no module dependencies,
+// the array of dependencies should be defined and empty.
+var myApp = angular.module('myApp', []);
+
+

To retrieve a reference to the same module for further configuration, call +angular.module without the array argument.

+
var myApp = angular.module('myApp');
+
+

Calling angular.module without the array of dependencies when the module has not yet been defined +causes this error to be thrown. To fix it, define your module with a name and an empty array, as in +the first example above.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$injector/pget.html b/1.6.6/docs/partials/error/$injector/pget.html new file mode 100644 index 000000000..867823067 --- /dev/null +++ b/1.6.6/docs/partials/error/$injector/pget.html @@ -0,0 +1,31 @@ + Improve this Doc + + +

Error: $injector:pget +
Provider Missing $get
+

+ +
+
Provider '{0}' must define $get factory method.
+
+ +

Description

+
+

This error occurs when attempting to register a provider that does not have a +$get method. For example:

+
function BadProvider() {} // No $get method!
+angular.module("myApp", [])
+  .provider('bad', BadProvider);  // this throws the error
+
+

To fix the error, fill in the $get method on the provider like so:

+
function GoodProvider() {
+  this.$get = angular.noop;
+}
+angular.module("myApp", [])
+  .provider('good', GoodProvider);
+
+

For more information, refer to the $provide.provider api doc.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$injector/strictdi.html b/1.6.6/docs/partials/error/$injector/strictdi.html new file mode 100644 index 000000000..7d25c9f1c --- /dev/null +++ b/1.6.6/docs/partials/error/$injector/strictdi.html @@ -0,0 +1,58 @@ + Improve this Doc + + +

Error: $injector:strictdi +
Explicit annotation required
+

+ +
+
{0} is not using explicit annotation and cannot be invoked in strict mode
+
+ +

Description

+
+

This error occurs when attempting to invoke a function or provider which +has not been explicitly annotated, while the application is running with +strict-di mode enabled.

+

For example:

+
angular.module("myApp", [])
+// BadController cannot be invoked, because
+// the dependencies to be injected are not
+// explicitly listed.
+.controller("BadController", function($scope, $http, $filter) {
+  // ...
+});
+
+

To fix the error, explicitly annotate the function using either the inline +bracket notation, or with the $inject property:

+
function GoodController1($scope, $http, $filter) {
+  // ...
+}
+GoodController1.$inject = ["$scope", "$http", "$filter"];
+
+angular.module("myApp", [])
+  // GoodController1 can be invoked because it
+  // had an $inject property, which is an array
+  // containing the dependency names to be
+  // injected.
+  .controller("GoodController1", GoodController1)
+
+  // GoodController2 can also be invoked, because
+  // the dependencies to inject are listed, in
+  // order, in the array, with the function to be
+  // invoked trailing on the end.
+  .controller("GoodController2", [
+    "$scope",
+    "$http",
+    "$filter",
+    function($scope, $http, $filter) {
+      // ...
+    }
+  ]);
+
+

For more information about strict-di mode, see ngApp +and angular.bootstrap.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$injector/undef.html b/1.6.6/docs/partials/error/$injector/undef.html new file mode 100644 index 000000000..34ce15e67 --- /dev/null +++ b/1.6.6/docs/partials/error/$injector/undef.html @@ -0,0 +1,38 @@ + Improve this Doc + + +

Error: $injector:undef +
Undefined Value
+

+ +
+
Provider '{0}' must return a value from $get factory method.
+
+ +

Description

+
+

This error results from registering a factory which does not return a value (or whose return value is undefined).

+

The following is an example of a factory which will throw this error upon injection:

+
angular.module("badModule", []).
+factory("badFactory", function() {
+  doLotsOfThings();
+  butDontReturnAValue();
+});
+
+

In order to prevent the error, return a value of some sort, such as an object which exposes an API for working +with the injected object.

+
angular.module("goodModule", []).
+factory("goodFactory", function() {
+  doLotsOfThings();
+  butDontReturnAValue();
+
+  return {
+      doTheThing: function methodThatDoesAThing() {
+      }
+  };
+});
+
+ +
+ + diff --git a/1.6.6/docs/partials/error/$injector/unpr.html b/1.6.6/docs/partials/error/$injector/unpr.html new file mode 100644 index 000000000..c9a96c205 --- /dev/null +++ b/1.6.6/docs/partials/error/$injector/unpr.html @@ -0,0 +1,77 @@ + Improve this Doc + + +

Error: $injector:unpr +
Unknown Provider
+

+ +
+
Unknown provider: {0}
+
+ +

Description

+
+

This error results from the $injector being unable to resolve a required +dependency. To fix this, make sure the dependency is defined and spelled +correctly. For example:

+
angular.module('myApp', [])
+.controller('MyController', ['myService', function (myService) {
+  // Do something with myService
+}]);
+
+

The above code will fail with $injector:unpr if myService is not defined.

+

Making sure each dependency is defined will fix the problem, as noted below.

+
angular.module('myApp', [])
+.service('myService', function () { /* ... */ })
+.controller('MyController', ['myService', function (myService) {
+  // Do something with myService
+}]);
+
+

An unknown provider error can also be caused by accidentally redefining a +module using the angular.module API, as shown in the following example.

+
angular.module('myModule', [])
+  .service('myCoolService', function () { /* ... */ });
+
+angular.module('myModule', [])
+  // myModule has already been created! This is not what you want!
+  .directive('myDirective', ['myCoolService', function (myCoolService) {
+    // This directive definition throws unknown provider, because myCoolService
+    // has been destroyed.
+  }]);
+
+

To fix this problem, make sure you only define each module with the +angular.module(name, [requires]) syntax once across your entire project. +Retrieve it for subsequent use with angular.module(name). The fixed example +is shown below.

+
angular.module('myModule', [])
+  .service('myCoolService', function () { /* ... */ });
+
+angular.module('myModule')
+  .directive('myDirective', ['myCoolService', function (myCoolService) {
+    // This directive definition does not throw unknown provider.
+  }]);
+
+

Attempting to inject one controller into another will also throw an Unknown provider error:

+
angular.module('myModule', [])
+.controller('MyFirstController', function() { /* ... */ })
+.controller('MySecondController', ['MyFirstController', function(MyFirstController) {
+  // This controller throws an unknown provider error because
+  // MyFirstController cannot be injected.
+}]);
+
+

Use the $controller service if you want to instantiate controllers yourself.

+

Attempting to inject a scope object into anything that's not a controller or a directive, +for example a service, will also throw an Unknown provider: $scopeProvider <- $scope error. +This might happen if one mistakenly registers a controller as a service, ex.:

+
angular.module('myModule', [])
+.service('MyController', ['$scope', function($scope) {
+  // This controller throws an unknown provider error because
+  // a scope object cannot be injected into a service.
+}]);
+
+

If you encounter this error only with minified code, consider using ngStrictDi (see +ngApp) to provoke the error with the non-minified source.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$interpolate.html b/1.6.6/docs/partials/error/$interpolate.html new file mode 100644 index 000000000..5f1d3dc18 --- /dev/null +++ b/1.6.6/docs/partials/error/$interpolate.html @@ -0,0 +1,87 @@ + Improve this Doc + + +

$interpolate

+ +
+ Here are the list of errors in the $interpolate namespace. + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
badexprExpecting end operator
dupvalueDuplicate choice in plural/select
interrInterpolation Error
logicbugBug in ngMessageFormat module
nochgmustacheRedefinition of start/endSymbol incompatible with MessageFormat extensions
noconcatMultiple Expressions
reqargMissing required argument for MessageFormat
reqcommaMissing comma following MessageFormat plural/select keyword
reqendbraceUnterminated message for plural/select value
reqendinterpUnterminated interpolation
reqopenbraceAn opening brace was expected but not found
reqotherRequired choice "other" for select/plural in MessageFormat
unknargUnrecognized MessageFormat extension
unsafeMessageFormat extensions not allowed in secure context
untermstrUnterminated string literal
wantstringExpected the beginning of a string
+
+
+ + diff --git a/1.6.6/docs/partials/error/$interpolate/badexpr.html b/1.6.6/docs/partials/error/$interpolate/badexpr.html new file mode 100644 index 000000000..daf48c93c --- /dev/null +++ b/1.6.6/docs/partials/error/$interpolate/badexpr.html @@ -0,0 +1,18 @@ + Improve this Doc + + +

Error: $interpolate:badexpr +
Expecting end operator
+

+ +
+
Unexpected operator “{0}” at line {1}, column {2} in text. Was expecting “{3}”. Text: “{4}”
+
+ +

Description

+
+

The Angular expression is missing the corresponding closing operator.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$interpolate/dupvalue.html b/1.6.6/docs/partials/error/$interpolate/dupvalue.html new file mode 100644 index 000000000..af7d8502b --- /dev/null +++ b/1.6.6/docs/partials/error/$interpolate/dupvalue.html @@ -0,0 +1,22 @@ + Improve this Doc + + +

Error: $interpolate:dupvalue +
Duplicate choice in plural/select
+

+ +
+
The choice “{0}” is specified more than once. Duplicate key is at line {1}, column {2} in text “{3}”
+
+ +

Description

+
+

You have repeated a match selection for your plural or select MessageFormat +extension in your interpolation expression. The different choices have to be unique.

+

For more information about the MessageFormat syntax in interpolation +expressions, please refer to MessageFormat extensions section at +Angular i18n MessageFormat

+ +
+ + diff --git a/1.6.6/docs/partials/error/$interpolate/interr.html b/1.6.6/docs/partials/error/$interpolate/interr.html new file mode 100644 index 000000000..63858d09b --- /dev/null +++ b/1.6.6/docs/partials/error/$interpolate/interr.html @@ -0,0 +1,21 @@ + Improve this Doc + + +

Error: $interpolate:interr +
Interpolation Error
+

+ +
+
Can't interpolate: {0}
+{1}
+
+ +

Description

+
+

This error occurs when interpolation fails due to some exception. The error +message above should provide additional context.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$interpolate/logicbug.html b/1.6.6/docs/partials/error/$interpolate/logicbug.html new file mode 100644 index 000000000..1b400d2a8 --- /dev/null +++ b/1.6.6/docs/partials/error/$interpolate/logicbug.html @@ -0,0 +1,23 @@ + Improve this Doc + + +

Error: $interpolate:logicbug +
Bug in ngMessageFormat module
+

+ +
+
The messageformat parser has encountered an internal error.  Please file a github issue against the AngularJS project and provide this message text that triggers the bug.  Text: “{0}”
+
+ +

Description

+
+

You've just hit a bug in the ngMessageFormat module provided by angular-message-format.min.js. +Please file a github issue for this and provide the interpolation text that caused you to hit this +bug mentioning the exact version of AngularJS used and we will fix it!

+

For more information about the MessageFormat syntax in interpolation +expressions, please refer to MessageFormat extensions section at +Angular i18n MessageFormat

+ +
+ + diff --git a/1.6.6/docs/partials/error/$interpolate/nochgmustache.html b/1.6.6/docs/partials/error/$interpolate/nochgmustache.html new file mode 100644 index 000000000..69160495d --- /dev/null +++ b/1.6.6/docs/partials/error/$interpolate/nochgmustache.html @@ -0,0 +1,27 @@ + Improve this Doc + + +

Error: $interpolate:nochgmustache +
Redefinition of start/endSymbol incompatible with MessageFormat extensions
+

+ +
+
angular-message-format.js currently does not allow you to use custom start and end symbols for interpolation.
+
+ +

Description

+
+

You have redefined $interpolate.startSymbol/$interpolate.endSymbol and also +loaded the ngMessageFormat module (provided by angular-message-format.min.js) +while creating your injector.

+

ngMessageFormat currently does not support redefinition of the +startSymbol/endSymbol used by $interpolate. If this is affecting you, please +file an issue and mention @chirayuk on it. This is intended to be fixed in a +future commit and the github issue will help gauge urgency.

+

For more information about the MessageFormat syntax in interpolation +expressions, please refer to MessageFormat extensions section at +Angular i18n MessageFormat

+ +
+ + diff --git a/1.6.6/docs/partials/error/$interpolate/noconcat.html b/1.6.6/docs/partials/error/$interpolate/noconcat.html new file mode 100644 index 000000000..739c49679 --- /dev/null +++ b/1.6.6/docs/partials/error/$interpolate/noconcat.html @@ -0,0 +1,25 @@ + Improve this Doc + + +

Error: $interpolate:noconcat +
Multiple Expressions
+

+ +
+
Error while interpolating: {0}
+Strict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required.  See http://docs.angularjs.org/api/ng.$sce
+
+ +

Description

+
+

This error occurs when performing an interpolation that concatenates multiple +expressions when a trusted value is required. Concatenating expressions makes +it hard to reason about whether some combination of concatenated values are +unsafe to use and could easily lead to XSS.

+

For more information about how AngularJS helps keep your app secure, refer to +the $sce API doc.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$interpolate/reqarg.html b/1.6.6/docs/partials/error/$interpolate/reqarg.html new file mode 100644 index 000000000..a166ad203 --- /dev/null +++ b/1.6.6/docs/partials/error/$interpolate/reqarg.html @@ -0,0 +1,23 @@ + Improve this Doc + + +

Error: $interpolate:reqarg +
Missing required argument for MessageFormat
+

+ +
+
Expected one of “plural” or “select” at line {0}, column {1} of text “{2}”
+
+ +

Description

+
+

You must specify the MessageFormat function that you're using right after the +comma following the Angular expression. Currently, the supported functions are +"plural" and "select" (for gender selections.)

+

For more information about the MessageFormat syntax in interpolation +expressions, please refer to MessageFormat extensions section at +Angular i18n MessageFormat

+ +
+ + diff --git a/1.6.6/docs/partials/error/$interpolate/reqcomma.html b/1.6.6/docs/partials/error/$interpolate/reqcomma.html new file mode 100644 index 000000000..d1409a881 --- /dev/null +++ b/1.6.6/docs/partials/error/$interpolate/reqcomma.html @@ -0,0 +1,22 @@ + Improve this Doc + + +

Error: $interpolate:reqcomma +
Missing comma following MessageFormat plural/select keyword
+

+ +
+
Expected a comma after the keyword “{0}” at line {1}, column {2} of text “{3}”
+
+ +

Description

+
+

The MessageFormat syntax requires a comma following the "plural" or "select" +extension keyword in the extended interpolation syntax.

+

For more information about the MessageFormat syntax in interpolation +expressions, please refer to MessageFormat extensions section at +Angular i18n MessageFormat

+ +
+ + diff --git a/1.6.6/docs/partials/error/$interpolate/reqendbrace.html b/1.6.6/docs/partials/error/$interpolate/reqendbrace.html new file mode 100644 index 000000000..5504121bb --- /dev/null +++ b/1.6.6/docs/partials/error/$interpolate/reqendbrace.html @@ -0,0 +1,22 @@ + Improve this Doc + + +

Error: $interpolate:reqendbrace +
Unterminated message for plural/select value
+

+ +
+
The plural/select choice “{0}” message starting at line {1}, column {2} does not have an ending closing brace. Text “{3}”
+
+ +

Description

+
+

The plural or select message for a value or keyword choice has no matching end +brace to mark the end of the message.

+

For more information about the MessageFormat syntax in interpolation +expressions, please refer to MessageFormat extensions section at +Angular i18n MessageFormat

+ +
+ + diff --git a/1.6.6/docs/partials/error/$interpolate/reqendinterp.html b/1.6.6/docs/partials/error/$interpolate/reqendinterp.html new file mode 100644 index 000000000..2c997e13e --- /dev/null +++ b/1.6.6/docs/partials/error/$interpolate/reqendinterp.html @@ -0,0 +1,18 @@ + Improve this Doc + + +

Error: $interpolate:reqendinterp +
Unterminated interpolation
+

+ +
+
Expecting end of interpolation symbol, “{0}”, at line {1}, column {2} in text “{3}”
+
+ +

Description

+
+

The interpolation text does not have an ending endSymbol ("}}" by default) and is unterminated.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$interpolate/reqopenbrace.html b/1.6.6/docs/partials/error/$interpolate/reqopenbrace.html new file mode 100644 index 000000000..e07b8d331 --- /dev/null +++ b/1.6.6/docs/partials/error/$interpolate/reqopenbrace.html @@ -0,0 +1,23 @@ + Improve this Doc + + +

Error: $interpolate:reqopenbrace +
An opening brace was expected but not found
+

+ +
+
The plural choice “{0}” must be followed by a message in braces at line {1}, column {2} in text “{3}”
+
+ +

Description

+
+

The plural or select extension keyword or values (such as "other", "male", +"female", "=0", "one", "many", etc.) MUST be followed by a message enclosed in +braces.

+

For more information about the MessageFormat syntax in interpolation +expressions, please refer to MessageFormat extensions section at +Angular i18n MessageFormat

+ +
+ + diff --git a/1.6.6/docs/partials/error/$interpolate/reqother.html b/1.6.6/docs/partials/error/$interpolate/reqother.html new file mode 100644 index 000000000..891173401 --- /dev/null +++ b/1.6.6/docs/partials/error/$interpolate/reqother.html @@ -0,0 +1,24 @@ + Improve this Doc + + +

Error: $interpolate:reqother +
Required choice "other" for select/plural in MessageFormat
+

+ +
+
“other” is a required option.
+
+ +

Description

+
+

Your interpolation expression with a MessageFormat extension for either +"plural" or "select" (typically used for gender selection) does not contain a +message for the choice "other". Using either select or plural MessageFormat +extensions require that you provide a message for the selection "other".

+

For more information about the MessageFormat syntax in interpolation +expressions, please refer to MessageFormat extensions section at +Angular i18n MessageFormat

+ +
+ + diff --git a/1.6.6/docs/partials/error/$interpolate/unknarg.html b/1.6.6/docs/partials/error/$interpolate/unknarg.html new file mode 100644 index 000000000..72e4502e3 --- /dev/null +++ b/1.6.6/docs/partials/error/$interpolate/unknarg.html @@ -0,0 +1,23 @@ + Improve this Doc + + +

Error: $interpolate:unknarg +
Unrecognized MessageFormat extension
+

+ +
+
Unsupported keyword “{0}” at line {0}, column {1}. Only “plural” and “select” are currently supported.  Text: “{3}”
+
+ +

Description

+
+

The MessageFormat extensions provided by ngMessageFormat are currently +limited to "plural" and "select". The extension that you have used is either +unsupported or invalid.

+

For more information about the MessageFormat syntax in interpolation +expressions, please refer to MessageFormat extensions section at +Angular i18n MessageFormat

+ +
+ + diff --git a/1.6.6/docs/partials/error/$interpolate/unsafe.html b/1.6.6/docs/partials/error/$interpolate/unsafe.html new file mode 100644 index 000000000..6282731a6 --- /dev/null +++ b/1.6.6/docs/partials/error/$interpolate/unsafe.html @@ -0,0 +1,20 @@ + Improve this Doc + + +

Error: $interpolate:unsafe +
MessageFormat extensions not allowed in secure context
+

+ +
+
Use of select/plural MessageFormat syntax is currently disallowed in a secure context ({0}).  At line {1}, column {2} of text “{3}”
+
+ +

Description

+
+

You have attempted to use a MessageFormat extension in your interpolation expression that is marked as a secure context. For security purposes, this is not supported.

+

Read more about secure contexts at Strict Contextual Escaping +(SCE) and about the MessageFormat extensions at Angular i18n MessageFormat.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$interpolate/untermstr.html b/1.6.6/docs/partials/error/$interpolate/untermstr.html new file mode 100644 index 000000000..8e6afd3f6 --- /dev/null +++ b/1.6.6/docs/partials/error/$interpolate/untermstr.html @@ -0,0 +1,18 @@ + Improve this Doc + + +

Error: $interpolate:untermstr +
Unterminated string literal
+

+ +
+
The string beginning at line {0}, column {1} is unterminated in text “{2}”
+
+ +

Description

+
+

The string literal was not terminated in your Angular expression.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$interpolate/wantstring.html b/1.6.6/docs/partials/error/$interpolate/wantstring.html new file mode 100644 index 000000000..d5b6a50ae --- /dev/null +++ b/1.6.6/docs/partials/error/$interpolate/wantstring.html @@ -0,0 +1,20 @@ + Improve this Doc + + +

Error: $interpolate:wantstring +
Expected the beginning of a string
+

+ +
+
Expected the beginning of a string at line {0}, column {1} in text “{2}”
+
+ +

Description

+
+

We expected to see the beginning of a string (either a single quote or a double +quote character) in the expression but it was not found. The expression is +invalid. If this is incorrect, please file an issue on github.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$location.html b/1.6.6/docs/partials/error/$location.html new file mode 100644 index 000000000..81868904b --- /dev/null +++ b/1.6.6/docs/partials/error/$location.html @@ -0,0 +1,43 @@ + Improve this Doc + + +

$location

+ +
+ Here are the list of errors in the $location namespace. + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
badpathInvalid Path
ipthprfxInvalid or Missing Path Prefix
isrchargWrong $location.search() argument type
nobase$location in HTML5 mode requires a <base> tag to be present!
nostateHistory API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API
+
+
+ + diff --git a/1.6.6/docs/partials/error/$location/badpath.html b/1.6.6/docs/partials/error/$location/badpath.html new file mode 100644 index 000000000..2d4c3642b --- /dev/null +++ b/1.6.6/docs/partials/error/$location/badpath.html @@ -0,0 +1,21 @@ + Improve this Doc + + +

Error: $location:badpath +
Invalid Path
+

+ +
+
Invalid url "{0}".
+
+ +

Description

+
+

This error occurs when the path of a location contains invalid characters. +The most common fault is when the path starts with double slashes (//) or backslashes ('\'). +For example if the base path of an application is https://a.b.c/ then the following path is +invalid https://a.b.c///d/e/f.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$location/ipthprfx.html b/1.6.6/docs/partials/error/$location/ipthprfx.html new file mode 100644 index 000000000..a16071f17 --- /dev/null +++ b/1.6.6/docs/partials/error/$location/ipthprfx.html @@ -0,0 +1,19 @@ + Improve this Doc + + +

Error: $location:ipthprfx +
Invalid or Missing Path Prefix
+

+ +
+
Invalid url "{0}", missing path prefix "{1}".
+
+ +

Description

+
+

This error occurs when you configure the $location service in the html5 mode, specify a base url for your application via <base> element and try to update the location with a path that doesn't match the base prefix.

+

To resolve this issue, please check the base url specified via the <base> tag in the head of your main html document, as well as the url that you tried to set the location to.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$location/isrcharg.html b/1.6.6/docs/partials/error/$location/isrcharg.html new file mode 100644 index 000000000..2933da52e --- /dev/null +++ b/1.6.6/docs/partials/error/$location/isrcharg.html @@ -0,0 +1,20 @@ + Improve this Doc + + +

Error: $location:isrcharg +
Wrong $location.search() argument type
+

+ +
+
The first argument of the `$location#search()` call must be a string or an object.
+
+ +

Description

+
+

To resolve this error, ensure that the first argument for the $location.search call is a string or an object. +You can use the stack trace associated with this error to identify the call site that caused this issue.

+

To learn more, please consult the $location api docs.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$location/nobase.html b/1.6.6/docs/partials/error/$location/nobase.html new file mode 100644 index 000000000..abcacf3ca --- /dev/null +++ b/1.6.6/docs/partials/error/$location/nobase.html @@ -0,0 +1,59 @@ + Improve this Doc + + +

Error: $location:nobase +
$location in HTML5 mode requires a <base> tag to be present!
+

+ +
+
$location in HTML5 mode requires a  tag to be present!
+
+ +

Description

+
+

If you configure $location to use +html5Mode (history.pushState), you need to specify the base URL for the application with a <base href=""> tag or configure +$locationProvider to not require a base tag by passing a definition object with +requireBase:false to $locationProvider.html5Mode():

+
$locationProvider.html5Mode({
+  enabled: true,
+  requireBase: false
+});
+
+

Note that removing the requirement for a <base> tag will have adverse side effects when resolving +relative paths with $location in IE9.

+

The base URL is then used to resolve all relative URLs throughout the application regardless of the +entry point into the app.

+

If you are deploying your app into the root context (e.g. https://myapp.com/), set the base URL to /:

+
<head>
+  <base href="/">
+  ...
+</head>
+
+

If you are deploying your app into a sub-context (e.g. https://myapp.com/subapp/), set the base URL to the +URL of the subcontext:

+
<head>
+  <base href="/subapp/">
+  ...
+</head>
+
+

Before Angular 1.3 we didn't have this hard requirement and it was easy to write apps that worked +when deployed in the root context but were broken when moved to a sub-context because in the +sub-context all absolute urls would resolve to the root context of the app. To prevent this, +use relative URLs throughout your app:

+
<!-- wrong: -->
+<a href="/userProfile">User Profile</a>
+
+
+<!-- correct: -->
+<a href="userProfile">User Profile</a>
+
+

Additionally, if you want to support browsers that don't have the history.pushState +API, the fallback mechanism provided by $location +won't work well without specifying the base url of the application.

+

In order to make it easier to migrate from hashbang mode to html5 mode, we require that the base +URL is always specified when $location's html5mode is enabled.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$location/nostate.html b/1.6.6/docs/partials/error/$location/nostate.html new file mode 100644 index 000000000..8233b5c11 --- /dev/null +++ b/1.6.6/docs/partials/error/$location/nostate.html @@ -0,0 +1,19 @@ + Improve this Doc + + +

Error: $location:nostate +
History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API
+

+ +
+
History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API
+
+ +

Description

+
+

This error occurs when the $location.state method is used when $locationProvider.html5Mode is not turned on or the browser used doesn't support the HTML5 History API (for example, IE9 or Android 2.3).

+

To avoid this error, either drop support for those older browsers or avoid using this method.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$parse.html b/1.6.6/docs/partials/error/$parse.html new file mode 100644 index 000000000..047b31344 --- /dev/null +++ b/1.6.6/docs/partials/error/$parse.html @@ -0,0 +1,35 @@ + Improve this Doc + + +

$parse

+ +
+ Here are the list of errors in the $parse namespace. + +
+ +
+
+ + + + + + + + + + + + + + + + + + +
NameDescription
lexerrLexer Error
syntaxSyntax Error
ueoeUnexpected End of Expression
+
+
+ + diff --git a/1.6.6/docs/partials/error/$parse/lexerr.html b/1.6.6/docs/partials/error/$parse/lexerr.html new file mode 100644 index 000000000..4193e21b3 --- /dev/null +++ b/1.6.6/docs/partials/error/$parse/lexerr.html @@ -0,0 +1,20 @@ + Improve this Doc + + +

Error: $parse:lexerr +
Lexer Error
+

+ +
+
Lexer Error: {0} at column{1} in expression [{2}].
+
+ +

Description

+
+

Occurs when an expression has a lexical error, for example a malformed number (0.5e-) or an invalid unicode escape.

+

The error message contains a more precise error.

+

To resolve, learn more about Angular expressions, identify the error and fix the expression's syntax.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$parse/syntax.html b/1.6.6/docs/partials/error/$parse/syntax.html new file mode 100644 index 000000000..01eb7570c --- /dev/null +++ b/1.6.6/docs/partials/error/$parse/syntax.html @@ -0,0 +1,20 @@ + Improve this Doc + + +

Error: $parse:syntax +
Syntax Error
+

+ +
+
Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].
+
+ +

Description

+
+

Occurs when there is a syntax error in an expression. These errors are thrown while compiling the expression. +The error message contains a more precise description of the error, including the location (column) in the expression where the error occurred.

+

To resolve, learn more about Angular expressions, identify the error and fix the expression's syntax.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$parse/ueoe.html b/1.6.6/docs/partials/error/$parse/ueoe.html new file mode 100644 index 000000000..f353ce27a --- /dev/null +++ b/1.6.6/docs/partials/error/$parse/ueoe.html @@ -0,0 +1,22 @@ + Improve this Doc + + +

Error: $parse:ueoe +
Unexpected End of Expression
+

+ +
+
Unexpected end of expression: {0}
+
+ +

Description

+
+

Occurs when an expression is missing tokens at the end of the expression.

+

For example, forgetting to close a bracket or failing to properly escape quotes in an expression +will trigger this error.

+

To resolve, learn more about Angular expressions, identify the error and +fix the expression's syntax.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$q.html b/1.6.6/docs/partials/error/$q.html new file mode 100644 index 000000000..e06b22ca0 --- /dev/null +++ b/1.6.6/docs/partials/error/$q.html @@ -0,0 +1,31 @@ + Improve this Doc + + +

$q

+ +
+ Here are the list of errors in the $q namespace. + +
+ +
+
+ + + + + + + + + + + + + + +
NameDescription
norslvrNo resolver function passed to $Q
qcycleCannot resolve a promise with itself
+
+
+ + diff --git a/1.6.6/docs/partials/error/$q/norslvr.html b/1.6.6/docs/partials/error/$q/norslvr.html new file mode 100644 index 000000000..47902ac22 --- /dev/null +++ b/1.6.6/docs/partials/error/$q/norslvr.html @@ -0,0 +1,27 @@ + Improve this Doc + + +

Error: $q:norslvr +
No resolver function passed to $Q
+

+ +
+
Expected resolverFn, got '{0}'
+
+ +

Description

+
+

Occurs when calling creating a promise using $q as a constructor, without providing the +required resolver function.

+
//bad
+var promise = $q().then(doSomething);
+
+//good
+var promise = $q(function(resolve, reject) {
+  waitForSomethingAsync.then(resolve);
+}).then(doSomething);
+
+ +
+ + diff --git a/1.6.6/docs/partials/error/$q/qcycle.html b/1.6.6/docs/partials/error/$q/qcycle.html new file mode 100644 index 000000000..64293c099 --- /dev/null +++ b/1.6.6/docs/partials/error/$q/qcycle.html @@ -0,0 +1,33 @@ + Improve this Doc + + +

Error: $q:qcycle +
Cannot resolve a promise with itself
+

+ +
+
Expected promise to be resolved with value other than itself '{0}'
+
+ +

Description

+
+

Occurs when resolving a promise with itself as the value, including returning the promise in a +function passed to then. The A+ 1.1 spec mandates that this behavior throw a TypeError. +https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure

+
var promise = $q.defer().promise;
+
+//bad
+promise.then(function (val) {
+  //Cannot return self
+  return promise;
+});
+
+//good
+promise.then(function (val) {
+  return 'some other value';
+});
+
+ +
+ + diff --git a/1.6.6/docs/partials/error/$resource.html b/1.6.6/docs/partials/error/$resource.html new file mode 100644 index 000000000..e7dcacbc0 --- /dev/null +++ b/1.6.6/docs/partials/error/$resource.html @@ -0,0 +1,39 @@ + Improve this Doc + + +

$resource

+ +
+ Here are the list of errors in the $resource namespace. + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
NameDescription
badargsToo Many Arguments
badcfgResponse does not match configured parameter
badmemberSyntax error in param value using @member lookup
badnameCannot use hasOwnProperty as a parameter name
+
+
+ + diff --git a/1.6.6/docs/partials/error/$resource/badargs.html b/1.6.6/docs/partials/error/$resource/badargs.html new file mode 100644 index 000000000..2c065904f --- /dev/null +++ b/1.6.6/docs/partials/error/$resource/badargs.html @@ -0,0 +1,20 @@ + Improve this Doc + + +

Error: $resource:badargs +
Too Many Arguments
+

+ +
+
Expected up to 4 arguments [params, data, success, error], got {0} arguments
+
+ +

Description

+
+

This error occurs when specifying too many arguments to a $resource action, such as get, query or any user-defined custom action. +These actions may take up to 4 arguments.

+

For more information, refer to the $resource API reference documentation.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$resource/badcfg.html b/1.6.6/docs/partials/error/$resource/badcfg.html new file mode 100644 index 000000000..3c03f2de5 --- /dev/null +++ b/1.6.6/docs/partials/error/$resource/badcfg.html @@ -0,0 +1,21 @@ + Improve this Doc + + +

Error: $resource:badcfg +
Response does not match configured parameter
+

+ +
+
Error in resource configuration for action `{0}`. Expected response to contain an {1} but got an {2} (Request: {3} {4})
+
+ +

Description

+
+

This error occurs when the $resource service expects a response that can be deserialized as an array but receives an object, or vice versa. +By default, all resource actions expect objects, except query which expects arrays.

+

To resolve this error, make sure your $resource configuration matches the actual format of the data returned from the server.

+

For more information, see the $resource API reference documentation.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$resource/badmember.html b/1.6.6/docs/partials/error/$resource/badmember.html new file mode 100644 index 000000000..c57881ec7 --- /dev/null +++ b/1.6.6/docs/partials/error/$resource/badmember.html @@ -0,0 +1,54 @@ + Improve this Doc + + +

Error: $resource:badmember +
Syntax error in param value using @member lookup
+

+ +
+
Dotted member path "@{0}" is invalid.
+
+ +

Description

+
+

Occurs when there is a syntax error when attempting to extract a param +value from the data object.

+

Here's an example of valid syntax for params or paramsDefault:

+
{
+  bar: '@foo.bar'
+}
+
+

The part following the @, foo.bar in this case, should be a simple +dotted member lookup using only ASCII identifiers. This error occurs +when there is an error in that expression. The following are all syntax +errors

+ + + + + + + + + + + + + + + + + + + + + + + + + +
ValueError
@Empty expression following @.
@1.a1 is an invalid javascript identifier.
@.aLeading . is invalid.
@a[1]Only dotted lookups are supported (no index operator)
+ +
+ + diff --git a/1.6.6/docs/partials/error/$resource/badname.html b/1.6.6/docs/partials/error/$resource/badname.html new file mode 100644 index 000000000..a4d67796d --- /dev/null +++ b/1.6.6/docs/partials/error/$resource/badname.html @@ -0,0 +1,20 @@ + Improve this Doc + + +

Error: $resource:badname +
Cannot use hasOwnProperty as a parameter name
+

+ +
+
hasOwnProperty is not a valid parameter name.
+
+ +

Description

+
+

Occurs when you try to use the name hasOwnProperty as a name of a parameter. +Generally, a name cannot be hasOwnProperty because it is used, internally, on a object +and allowing such a name would break lookups on this object.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$rootScope.html b/1.6.6/docs/partials/error/$rootScope.html new file mode 100644 index 000000000..b6edaca68 --- /dev/null +++ b/1.6.6/docs/partials/error/$rootScope.html @@ -0,0 +1,31 @@ + Improve this Doc + + +

$rootScope

+ +
+ Here are the list of errors in the $rootScope namespace. + +
+ +
+
+ + + + + + + + + + + + + + +
NameDescription
infdigInfinite $digest Loop
inprogAction Already In Progress
+
+
+ + diff --git a/1.6.6/docs/partials/error/$rootScope/infdig.html b/1.6.6/docs/partials/error/$rootScope/infdig.html new file mode 100644 index 000000000..2d984669f --- /dev/null +++ b/1.6.6/docs/partials/error/$rootScope/infdig.html @@ -0,0 +1,45 @@ + Improve this Doc + + +

Error: $rootScope:infdig +
Infinite $digest Loop
+

+ +
+
{0} $digest() iterations reached. Aborting!
+Watchers fired in the last 5 iterations: {1}
+
+ +

Description

+
+

This error occurs when the application's model becomes unstable and each $digest cycle triggers a state change and subsequent $digest cycle. +Angular detects this situation and prevents an infinite loop from causing the browser to become unresponsive.

+

For example, the situation can occur by setting up a watch on a path and subsequently updating the same path when the value changes.

+
$scope.$watch('foo', function() {
+  $scope.foo = $scope.foo + 1;
+});
+
+

One common mistake is binding to a function which generates a new array every time it is called. For example:

+
<div ng-repeat="user in getUsers()">{{ user.name }}</div>
+
+...
+
+$scope.getUsers = function() {
+  return [ { name: 'Hank' }, { name: 'Francisco' } ];
+};
+
+

Since getUsers() returns a new array, Angular determines that the model is different on each $digest +cycle, resulting in the error. The solution is to return the same array object if the elements have +not changed:

+
var users = [ { name: 'Hank' }, { name: 'Francisco' } ];
+
+$scope.getUsers = function() {
+  return users;
+};
+
+

The maximum number of allowed iterations of the $digest cycle is controlled via TTL setting which can be configured via $rootScopeProvider.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$rootScope/inprog.html b/1.6.6/docs/partials/error/$rootScope/inprog.html new file mode 100644 index 000000000..367622630 --- /dev/null +++ b/1.6.6/docs/partials/error/$rootScope/inprog.html @@ -0,0 +1,285 @@ + Improve this Doc + + +

Error: $rootScope:inprog +
Action Already In Progress
+

+ +
+
{0} already in progress
+
+ +

Description

+
+

At any point in time there can be only one $digest or $apply operation in progress. This is to +prevent very hard to detect bugs from entering your application. The stack trace of this error +allows you to trace the origin of the currently executing $apply or $digest call, which caused +the error.

+

Background

+

Angular uses a dirty-checking digest mechanism to monitor and update values of the scope during +the processing of your application. The digest works by checking all the values that are being +watched against their previous value and running any watch handlers that have been defined for those +values that have changed.

+

This digest mechanism is triggered by calling $digest on a scope object. Normally you do not need +to trigger a digest manually, because every external action that can trigger changes in your +application, such as mouse events, timeouts or server responses, wrap the Angular application code +in a block of code that will run $digest when the code completes.

+

You wrap Angular code in a block that will be followed by a $digest by calling $apply on a scope +object. So, in pseudo-code, the process looks like this:

+
element.on('mouseup', function() {
+  scope.$apply(function() {
+    $scope.doStuff();
+  });
+});
+
+

where $apply() looks something like:

+
$apply = function(fn) {
+  try {
+    fn();
+  } finally() {
+    $digest();
+  }
+}
+
+

Digest Phases

+

Angular keeps track of what phase of processing we are in, the relevant ones being $apply and +$digest. Trying to reenter a $digest or $apply while one of them is already in progress is +typically a sign of programming error that needs to be fixed. So Angular will throw this error when +that occurs.

+

In most situations it should be well defined whether a piece of code will be run inside an $apply, +in which case you should not be calling $apply or $digest, or it will be run outside, in which +case you should wrap any code that will be interacting with Angular scope or services, in a call to +$apply.

+

As an example, all Controller code should expect to be run within Angular, so it should have no need +to call $apply or $digest. Conversely, code that is being trigger directly as a call back to +some external event, from the DOM or 3rd party library, should expect that it is never called from +within Angular, and so any Angular application code that it calls should first be wrapped in a call +to $apply.

+

Common Causes

+

Apart from simply incorrect calls to $apply or $digest there are some cases when you may get +this error through no fault of your own.

+

Inconsistent API (Sync/Async)

+

This error is often seen when interacting with an API that is sometimes sync and sometimes async.

+

For example, imagine a 3rd party library that has a method which will retrieve data for us. Since it +may be making an asynchronous call to a server, it accepts a callback function, which will be called +when the data arrives.

+
function MyController($scope, thirdPartyComponent) {
+  thirdPartyComponent.getData(function(someData) {
+    $scope.$apply(function() {
+      $scope.someData = someData;
+    });
+  });
+}
+
+

We expect that our callback will be called asynchronously, and so from outside Angular. Therefore, we +correctly wrap our application code that interacts with Angular in a call to $apply.

+

The problem comes if getData() decides to call the callback handler synchronously; perhaps it has +the data already cached in memory and so it immediately calls the callback to return the data, +synchronously.

+

Since, the MyController constructor is always instantiated from within an $apply call, our +handler is trying to enter a new $apply block from within one.

+

This is not an ideal design choice on the part of the 3rd party library.

+

To resolve this type of issue, either fix the api to be always synchronous or asynchronous or force +your callback handler to always run asynchronously by using the $timeout service.

+
function MyController($scope, $timeout, thirdPartyComponent) {
+  thirdPartyComponent.getData(function(someData) {
+    $timeout(function() {
+      $scope.someData = someData;
+    }, 0);
+  });
+}
+
+

Here we have used $timeout to schedule the changes to the scope in a future call stack. +By providing a timeout period of 0ms, this will occur as soon as possible and $timeout will ensure +that the code will be called in a single $apply block.

+

Triggering Events Programmatically

+

The other situation that often leads to this error is when you trigger code (such as a DOM event) +programmatically (from within Angular), which is normally called by an external trigger.

+

For example, consider a directive that will set focus on an input control when a value in the scope +is true:

+
myApp.directive('setFocusIf', function() {
+  return {
+    link: function($scope, $element, $attr) {
+      $scope.$watch($attr.setFocusIf, function(value) {
+        if ( value ) { $element[0].focus(); }
+      });
+    }
+  };
+});
+
+

If we applied this directive to an input which also used the ngFocus directive to trigger some +work when the element receives focus we will have a problem:

+
<input set-focus-if="hasFocus" ng-focus="msg='has focus'">
+<button ng-click="hasFocus = true">Focus</button>
+
+

In this setup, there are two ways to trigger ngFocus. First from a user interaction:

+
    +
  • Click on the input control
  • +
  • The input control gets focus
  • +
  • The ngFocus directive is triggered, setting $scope.msg='has focus' from within a new call to +$apply()
  • +
+

Second programmatically:

+
    +
  • Click the button
  • +
  • The ngClick directive sets the value of $scope.hasFocus to true inside a call to $apply
  • +
  • The $digest runs, which triggers the watch inside the setFocusIf directive
  • +
  • The watch's handle runs, which gives the focus to the input
  • +
  • The ngFocus directive is triggered, setting $scope.msg='has focus' from within a new call to +$apply()
  • +
+

In this second scenario, we are already inside a $digest when the ngFocus directive makes another +call to $apply(), causing this error to be thrown.

+

It is possible to workaround this problem by moving the call to set the focus outside of the digest, +by using $timeout(fn, 0, false), where the false value tells Angular not to wrap this fn in an +$apply block:

+
myApp.directive('setFocusIf', function($timeout) {
+  return {
+    link: function($scope, $element, $attr) {
+      $scope.$watch($attr.setFocusIf, function(value) {
+        if ( value ) {
+          $timeout(function() {
+            // We must reevaluate the value in case it was changed by a subsequent
+            // watch handler in the digest.
+            if ( $scope.$eval($attr.setFocusIf) ) {
+              $element[0].focus();
+            }
+          }, 0, false);
+        }
+      });
+    }
+  }
+});
+
+

Diagnosing This Error

+

When you get this error it can be rather daunting to diagnose the cause of the issue. The best +course of action is to investigate the stack trace from the error. You need to look for places +where $apply or $digest have been called and find the context in which this occurred.

+

There should be two calls:

+
    +
  • The first call is the good $apply/$digest and would normally be triggered by some event near +the top of the call stack.

    +
  • +
  • The second call is the bad $apply/$digest and this is the one to investigate.

    +
  • +
+

Once you have identified this call you work your way up the stack to see what the problem is.

+
    +
  • If the second call was made in your application code then you should look at why this code has been +called from within an $apply/$digest. It may be a simple oversight or maybe it fits with the +sync/async scenario described earlier.

    +
  • +
  • If the second call was made inside an Angular directive then it is likely that it matches the second +programmatic event trigger scenario described earlier. In this case you may need to look further up +the tree to what triggered the event in the first place.

    +
  • +
+

Example Problem

+

Let's look at how to investigate this error using the setFocusIf example from above. This example +defines a new setFocusIf directive that sets the focus on the element where it is defined when the +value of its attribute becomes true.

+

+ +

+ + +
+ + +
+
<button ng-click="focusInput = true">Focus</button>
<input ng-focus="count = count + 1" set-focus-if="focusInput" />
+
+ +
+
angular.module('app', []).directive('setFocusIf', function() {
  return function link($scope, $element, $attr) {
    $scope.$watch($attr.setFocusIf, function(value) {
      if (value) { $element[0].focus(); }
    });
  };
});
+
+ + + +
+
+ + +

+

When you click on the button to cause the focus to occur we get our $rootScope:inprog error. The +stacktrace looks like this:

+
Error: [$rootScope:inprog]
+    at Error (native)
+    at angular.min.js:6:467
+    at n (angular.min.js:105:60)
+    at g.$get.g.$apply (angular.min.js:113:195)
+    at HTMLInputElement.<anonymous> (angular.min.js:198:401)
+    at angular.min.js:32:32
+    at Array.forEach (native)
+    at q (angular.min.js:7:295)
+    at HTMLInputElement.c (angular.min.js:32:14)
+    at Object.fn (app.js:12:38) angular.js:10111
+(anonymous function) angular.js:10111
+$get angular.js:7412
+$get.g.$apply angular.js:12738                   <--- $apply
+(anonymous function) angular.js:19833            <--- called here
+(anonymous function) angular.js:2890
+q angular.js:320
+c angular.js:2889
+(anonymous function) app.js:12
+$get.g.$digest angular.js:12469
+$get.g.$apply angular.js:12742                   <--- $apply
+(anonymous function) angular.js:19833            <--- called here
+(anonymous function) angular.js:2890
+q angular.js:320
+
+

We can see (even though the Angular code is minified) that there were two calls to $apply, first +on line 19833, then on line 12738 of angular.js.

+

It is this second call that caused the error. If we look at the angular.js code, we can see that +this call is made by an Angular directive.

+
var ngEventDirectives = {};
+forEach(
+  'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste'.split(' '),
+  function(name) {
+    var directiveName = directiveNormalize('ng-' + name);
+    ngEventDirectives[directiveName] = ['$parse', function($parse) {
+      return {
+        compile: function($element, attr) {
+          var fn = $parse(attr[directiveName]);
+          return function(scope, element, attr) {
+            element.on(lowercase(name), function(event) {
+              scope.$apply(function() {
+                fn(scope, {$event:event});
+              });
+            });
+          };
+        }
+      };
+    }];
+  }
+);
+
+

It is not possible to tell which from the stack trace, but we happen to know in this case that it is +the ngFocus directive.

+

Now look up the stack to see that our application code is only entered once in app.js at line 12. +This is where our problem is:

+
10: link: function($scope, $element, $attr) {
+11:   $scope.$watch($attr.setFocusIf, function(value) {
+12:     if ( value ) { $element[0].focus(); }    <---- This is the source of the problem
+13:   });
+14: }
+
+

We can now see that the second $apply was caused by us programmatically triggering a DOM event +(i.e. focus) to occur. We must fix this by moving the code outside of the $apply block using +$timeout as described above.

+

Further Reading

+

To learn more about Angular processing model please check out the +concepts doc as well as the api doc.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$sanitize.html b/1.6.6/docs/partials/error/$sanitize.html new file mode 100644 index 000000000..b01bd42a3 --- /dev/null +++ b/1.6.6/docs/partials/error/$sanitize.html @@ -0,0 +1,35 @@ + Improve this Doc + + +

$sanitize

+ +
+ Here are the list of errors in the $sanitize namespace. + +
+ +
+
+ + + + + + + + + + + + + + + + + + +
NameDescription
elclobFailed to sanitize html because the element is clobbered
noinertCan't create an inert html document
uinputFailed to sanitize html because the input is unstable
+
+
+ + diff --git a/1.6.6/docs/partials/error/$sanitize/elclob.html b/1.6.6/docs/partials/error/$sanitize/elclob.html new file mode 100644 index 000000000..9c2745db8 --- /dev/null +++ b/1.6.6/docs/partials/error/$sanitize/elclob.html @@ -0,0 +1,22 @@ + Improve this Doc + + +

Error: $sanitize:elclob +
Failed to sanitize html because the element is clobbered
+

+ +
+
Failed to sanitize html because the element is clobbered: {0}
+
+ +

Description

+
+

This error occurs when $sanitize sanitizer is unable to traverse the HTML because one or more of the elements in the +HTML have been "clobbered". This could be a sign that the payload contains code attempting to cause a DoS attack on the +browser.

+

Typically clobbering breaks the nextSibling property on an element so that it points to one of its child nodes. This +makes it impossible to walk the HTML tree without getting stuck in an infinite loop, which causes the browser to freeze.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$sanitize/noinert.html b/1.6.6/docs/partials/error/$sanitize/noinert.html new file mode 100644 index 000000000..8852799d0 --- /dev/null +++ b/1.6.6/docs/partials/error/$sanitize/noinert.html @@ -0,0 +1,20 @@ + Improve this Doc + + +

Error: $sanitize:noinert +
Can't create an inert html document
+

+ +
+
Can't create an inert html document
+
+ +

Description

+
+

This error occurs when $sanitize sanitizer determines that document.implementation.createHTMLDocument api is not supported by the current browser.

+

This api is necessary for safe parsing of HTML strings into DOM trees and without it the sanitizer can't sanitize the input.

+

The api is present in all supported browsers including IE 9.0, so the presence of this error usually indicates that Angular's $sanitize is being used on an unsupported platform.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$sanitize/uinput.html b/1.6.6/docs/partials/error/$sanitize/uinput.html new file mode 100644 index 000000000..0ddae6c70 --- /dev/null +++ b/1.6.6/docs/partials/error/$sanitize/uinput.html @@ -0,0 +1,24 @@ + Improve this Doc + + +

Error: $sanitize:uinput +
Failed to sanitize html because the input is unstable
+

+ +
+
Failed to sanitize html because the input is unstable
+
+ +

Description

+
+

This error occurs when $sanitize sanitizer tries to check the input for possible mXSS payload and the verification +errors due to the input mutating indefinitely. This could be a sign that the payload contains code exploiting an mXSS +vulnerability in the browser.

+

mXSS attack exploit browser bugs that cause some browsers parse a certain html strings into DOM, which once serialized +doesn't match the original input. These browser bugs can be exploited by attackers to create payload which looks +harmless to sanitizers, but due to mutations caused by the browser are turned into dangerous code once processed after +sanitization.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$sce.html b/1.6.6/docs/partials/error/$sce.html new file mode 100644 index 000000000..e89fa895a --- /dev/null +++ b/1.6.6/docs/partials/error/$sce.html @@ -0,0 +1,51 @@ + Improve this Doc + + +

$sce

+ +
+ Here are the list of errors in the $sce namespace. + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
icontextInvalid / Unknown SCE context
iequirksIE<11 in quirks mode is unsupported
imatcherInvalid matcher (only string patterns and RegExp instances are supported)
insecurlProcessing of a Resource from Untrusted Source Blocked
itypeString Value is Required for SCE Trust Call
iwcardThe sequence *** is not a valid pattern wildcard
unsafeRequire a safe/trusted value
+
+
+ + diff --git a/1.6.6/docs/partials/error/$sce/icontext.html b/1.6.6/docs/partials/error/$sce/icontext.html new file mode 100644 index 000000000..622b70c92 --- /dev/null +++ b/1.6.6/docs/partials/error/$sce/icontext.html @@ -0,0 +1,19 @@ + Improve this Doc + + +

Error: $sce:icontext +
Invalid / Unknown SCE context
+

+ +
+
Attempted to trust a value in invalid context. Context: {0}; Value: {1}
+
+ +

Description

+
+

The context enum passed to $sce.trustAs was not recognized.

+

Please consult the list of supported Strict Contextual Escaping (SCE) contexts.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$sce/iequirks.html b/1.6.6/docs/partials/error/$sce/iequirks.html new file mode 100644 index 000000000..a975b16f3 --- /dev/null +++ b/1.6.6/docs/partials/error/$sce/iequirks.html @@ -0,0 +1,25 @@ + Improve this Doc + + +

Error: $sce:iequirks +
IE<11 in quirks mode is unsupported
+

+ +
+
Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode.  You can fix this by adding the text  to the top of your HTML document.  See http://docs.angularjs.org/api/ng.$sce for more information.
+
+ +

Description

+
+

This error occurs when you are using AngularJS with Strict Contextual Escaping (SCE) mode enabled (the default) on IE10 or lower in quirks mode.

+

In this mode, IE<11 allow one to execute arbitrary javascript by the use of the expression() syntax and is not supported. +Refer +CSS expressions no longer supported for the Internet zone.aspx) +to learn more about them.

+

To resolve this error please specify the proper doctype at the top of your main html document:

+
<!doctype html>
+
+ +
+ + diff --git a/1.6.6/docs/partials/error/$sce/imatcher.html b/1.6.6/docs/partials/error/$sce/imatcher.html new file mode 100644 index 000000000..c9a130c27 --- /dev/null +++ b/1.6.6/docs/partials/error/$sce/imatcher.html @@ -0,0 +1,19 @@ + Improve this Doc + + +

Error: $sce:imatcher +
Invalid matcher (only string patterns and RegExp instances are supported)
+

+ +
+
Matchers may only be "self", string patterns or RegExp objects
+
+ +

Description

+
+

Please see $sceDelegateProvider.resourceUrlWhitelist and $sceDelegateProvider.resourceUrlBlacklist for the +list of acceptable items.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$sce/insecurl.html b/1.6.6/docs/partials/error/$sce/insecurl.html new file mode 100644 index 000000000..c993dc618 --- /dev/null +++ b/1.6.6/docs/partials/error/$sce/insecurl.html @@ -0,0 +1,29 @@ + Improve this Doc + + +

Error: $sce:insecurl +
Processing of a Resource from Untrusted Source Blocked
+

+ +
+
Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}
+
+ +

Description

+
+

AngularJS' Strict Contextual Escaping (SCE) mode (enabled by default) has blocked loading a resource from an insecure URL.

+

Typically, this would occur if you're attempting to load an Angular template from an untrusted source. +It's also possible that a custom directive threw this error for a similar reason.

+

Angular only loads templates from trusted URLs (by calling $sce.getTrustedResourceUrl on the template URL).

+

By default, only URLs that belong to the same origin are trusted. These are urls with the same domain, protocol and port as the application document.

+

The ngInclude directive and directives that specify a templateUrl require a trusted resource URL.

+

To load templates from other domains and/or protocols, either adjust the whitelist/ blacklist or wrap the URL with a call to $sce.trustAsResourceUrl.

+

Note: The browser's Same Origin +Policy and +Cross-Origin Resource Sharing (CORS) policy apply +that may further restrict whether the template is successfully loaded. (e.g. neither cross-domain +requests won't work on all browsers nor file:// requests on some browsers)

+ +
+ + diff --git a/1.6.6/docs/partials/error/$sce/itype.html b/1.6.6/docs/partials/error/$sce/itype.html new file mode 100644 index 000000000..f902dff9a --- /dev/null +++ b/1.6.6/docs/partials/error/$sce/itype.html @@ -0,0 +1,19 @@ + Improve this Doc + + +

Error: $sce:itype +
String Value is Required for SCE Trust Call
+

+ +
+
Attempted to trust a non-string value in a content requiring a string: Context: {0}
+
+ +

Description

+
+

$sce.trustAs requires a string value.

+

Read more about Strict Contextual Escaping (SCE) in AngularJS.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$sce/iwcard.html b/1.6.6/docs/partials/error/$sce/iwcard.html new file mode 100644 index 000000000..26742c3fa --- /dev/null +++ b/1.6.6/docs/partials/error/$sce/iwcard.html @@ -0,0 +1,19 @@ + Improve this Doc + + +

Error: $sce:iwcard +
The sequence *** is not a valid pattern wildcard
+

+ +
+
Illegal sequence *** in string matcher.  String: {0}
+
+ +

Description

+
+

The strings in $sceDelegateProvider.resourceUrlWhitelist and $sceDelegateProvider.resourceUrlBlacklist may not +contain the undefined sequence ***. Only * and ** wildcard patterns are defined.

+ +
+ + diff --git a/1.6.6/docs/partials/error/$sce/unsafe.html b/1.6.6/docs/partials/error/$sce/unsafe.html new file mode 100644 index 000000000..095381c99 --- /dev/null +++ b/1.6.6/docs/partials/error/$sce/unsafe.html @@ -0,0 +1,25 @@ + Improve this Doc + + +

Error: $sce:unsafe +
Require a safe/trusted value
+

+ +
+
Attempting to use an unsafe value in a safe context.
+
+ +

Description

+
+

The value provided for use in a specific context was not found to be safe/trusted for use.

+

Angular's Strict Contextual Escaping (SCE) mode +(enabled by default), requires bindings in certain +contexts to result in a value that is trusted as safe for use in such a context. (e.g. loading an +Angular template from a URL requires that the URL is one considered safe for loading resources.)

+

This helps prevent XSS and other security issues. Read more at +Strict Contextual Escaping (SCE)

+

You may want to include the ngSanitize module to use the automatic sanitizing.

+ +
+ + diff --git a/1.6.6/docs/partials/error/filter.html b/1.6.6/docs/partials/error/filter.html new file mode 100644 index 000000000..d920fb127 --- /dev/null +++ b/1.6.6/docs/partials/error/filter.html @@ -0,0 +1,27 @@ + Improve this Doc + + +

filter

+ +
+ Here are the list of errors in the filter namespace. + +
+ +
+
+ + + + + + + + + + +
NameDescription
notarrayNot an array
+
+
+ + diff --git a/1.6.6/docs/partials/error/filter/notarray.html b/1.6.6/docs/partials/error/filter/notarray.html new file mode 100644 index 000000000..f8e047eda --- /dev/null +++ b/1.6.6/docs/partials/error/filter/notarray.html @@ -0,0 +1,56 @@ + Improve this Doc + + +

Error: filter:notarray +
Not an array
+

+ +
+
Expected array but received: {0}
+
+ +

Description

+
+

This error occurs when filter is not used with an array:

+
<input ng-model="search">
+<div ng-repeat="(key, value) in myObj | filter:search">
+  {{ key }} : {{ value }}
+</div>
+
+

Filter must be used with an array so a subset of items can be returned. +The array can be initialized asynchronously and therefore null or undefined won't throw this error.

+

To filter an object by the value of its properties you can create your own custom filter:

+
angular.module('customFilter',[])
+.filter('custom', function() {
+  return function(input, search) {
+    if (!input) return input;
+    if (!search) return input;
+    var expected = ('' + search).toLowerCase();
+    var result = {};
+    angular.forEach(input, function(value, key) {
+      var actual = ('' + value).toLowerCase();
+      if (actual.indexOf(expected) !== -1) {
+        result[key] = value;
+      }
+    });
+    return result;
+  }
+});
+
+

That can be used as:

+
<input ng-model="search">
+<div ng-repeat="(key, value) in myObj | custom:search">
+  {{ key }} : {{ value }}
+</div>
+
+

You could as well convert the object to an array using a filter such as +toArrayFilter:

+
<input ng-model="search">
+<div ng-repeat="item in myObj | toArray:false | filter:search">
+  {{ item }}
+</div>
+
+ +
+ + diff --git a/1.6.6/docs/partials/error/jqLite.html b/1.6.6/docs/partials/error/jqLite.html new file mode 100644 index 000000000..3a37c25aa --- /dev/null +++ b/1.6.6/docs/partials/error/jqLite.html @@ -0,0 +1,35 @@ + Improve this Doc + + +

jqLite

+ +
+ Here are the list of errors in the jqLite namespace. + +
+ +
+
+ + + + + + + + + + + + + + + + + + +
NameDescription
noselUnsupported Selector Lookup
offargsInvalid jqLite#off() parameter
onargsInvalid jqLite#on() Parameters
+
+
+ + diff --git a/1.6.6/docs/partials/error/jqLite/nosel.html b/1.6.6/docs/partials/error/jqLite/nosel.html new file mode 100644 index 000000000..2ca44c48e --- /dev/null +++ b/1.6.6/docs/partials/error/jqLite/nosel.html @@ -0,0 +1,21 @@ + Improve this Doc + + +

Error: jqLite:nosel +
Unsupported Selector Lookup
+

+ +
+
Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element
+
+ +

Description

+
+

In order to keep Angular small, Angular implements only a subset of the selectors in jqLite. +This error occurs when a jqLite instance is invoked with a selector other than this subset.

+

In order to resolve this error, rewrite your code to only use tag name selectors and manually traverse the DOM using the APIs provided by jqLite.

+

Alternatively, you can include a full version of jQuery, which Angular will automatically use and that will make all selectors available.

+ +
+ + diff --git a/1.6.6/docs/partials/error/jqLite/offargs.html b/1.6.6/docs/partials/error/jqLite/offargs.html new file mode 100644 index 000000000..f0780c3f4 --- /dev/null +++ b/1.6.6/docs/partials/error/jqLite/offargs.html @@ -0,0 +1,19 @@ + Improve this Doc + + +

Error: jqLite:offargs +
Invalid jqLite#off() parameter
+

+ +
+
jqLite#off() does not support the `selector` argument
+
+ +

Description

+
+

This error occurs when trying to pass too many arguments to jqLite#off. Note +that jqLite#off does not support namespaces or selectors like jQuery.

+ +
+ + diff --git a/1.6.6/docs/partials/error/jqLite/onargs.html b/1.6.6/docs/partials/error/jqLite/onargs.html new file mode 100644 index 000000000..fbe8539d5 --- /dev/null +++ b/1.6.6/docs/partials/error/jqLite/onargs.html @@ -0,0 +1,20 @@ + Improve this Doc + + +

Error: jqLite:onargs +
Invalid jqLite#on() Parameters
+

+ +
+
jqLite#on() does not support the `selector` or `eventData` parameters
+
+ +

Description

+
+

This error occurs when trying to pass too many arguments to jqLite#on. Note +that jqLite#on does not support the selector or eventData parameters as +jQuery does.

+ +
+ + diff --git a/1.6.6/docs/partials/error/linky.html b/1.6.6/docs/partials/error/linky.html new file mode 100644 index 000000000..9637a11de --- /dev/null +++ b/1.6.6/docs/partials/error/linky.html @@ -0,0 +1,27 @@ + Improve this Doc + + +

linky

+ +
+ Here are the list of errors in the linky namespace. + +
+ +
+
+ + + + + + + + + + +
NameDescription
notstringNot a string
+
+
+ + diff --git a/1.6.6/docs/partials/error/linky/notstring.html b/1.6.6/docs/partials/error/linky/notstring.html new file mode 100644 index 000000000..30a1f6584 --- /dev/null +++ b/1.6.6/docs/partials/error/linky/notstring.html @@ -0,0 +1,25 @@ + Improve this Doc + + +

Error: linky:notstring +
Not a string
+

+ +
+
Expected string but received: {0}
+
+ +

Description

+
+

This error occurs when linky is used with a non-empty, non-string value:

+
<div ng-bind-html="42 | linky"></div>
+
+

linky is supposed to be used with string values only, and therefore assumes that several methods +(such as .match()) are available on the passed in value. +The value can be initialized asynchronously and therefore null or undefined won't throw this error.

+

If you want to pass non-string values to linky (e.g. Objects whose .toString() should be +utilized), you need to manually convert them to strings.

+ +
+ + diff --git a/1.6.6/docs/partials/error/ng.html b/1.6.6/docs/partials/error/ng.html new file mode 100644 index 000000000..34eea5274 --- /dev/null +++ b/1.6.6/docs/partials/error/ng.html @@ -0,0 +1,55 @@ + Improve this Doc + + +

ng

+ +
+ Here are the list of errors in the ng namespace. + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
aobjInvalid Argument
areqBad Argument
badnameBad `hasOwnProperty` Name
btstrpdApp Already Bootstrapped with this Element
cpiBad Copy
cptaCopying TypedArray
cpwsCopying Window or Scope
testTestability Not Found
+
+
+ + diff --git a/1.6.6/docs/partials/error/ng/aobj.html b/1.6.6/docs/partials/error/ng/aobj.html new file mode 100644 index 000000000..504ba8f8c --- /dev/null +++ b/1.6.6/docs/partials/error/ng/aobj.html @@ -0,0 +1,19 @@ + Improve this Doc + + +

Error: ng:aobj +
Invalid Argument
+

+ +
+
Argument '{0}' must be an object
+
+ +

Description

+
+

The argument passed should be an object. Check the value that was passed to the function where +this error was thrown.

+ +
+ + diff --git a/1.6.6/docs/partials/error/ng/areq.html b/1.6.6/docs/partials/error/ng/areq.html new file mode 100644 index 000000000..39d722a51 --- /dev/null +++ b/1.6.6/docs/partials/error/ng/areq.html @@ -0,0 +1,22 @@ + Improve this Doc + + +

Error: ng:areq +
Bad Argument
+

+ +
+
Argument '{0}' is {1}
+
+ +

Description

+
+

AngularJS often asserts that certain values will be present and truthy using a helper function. If +the assertion fails, this error is thrown. To fix this problem, make sure that the value the +assertion expects is defined and matches the type mentioned in the error.

+

If the type is undefined, make sure any newly added controllers/directives/services are properly +defined and included in the script(s) loaded by your page.

+ +
+ + diff --git a/1.6.6/docs/partials/error/ng/badname.html b/1.6.6/docs/partials/error/ng/badname.html new file mode 100644 index 000000000..32153fd55 --- /dev/null +++ b/1.6.6/docs/partials/error/ng/badname.html @@ -0,0 +1,20 @@ + Improve this Doc + + +

Error: ng:badname +
Bad `hasOwnProperty` Name
+

+ +
+
hasOwnProperty is not a valid {0} name
+
+ +

Description

+
+

Occurs when you try to use the name hasOwnProperty in a context where it is not allowed. +Generally, a name cannot be hasOwnProperty because it is used, internally, on a object +and allowing such a name would break lookups on this object.

+ +
+ + diff --git a/1.6.6/docs/partials/error/ng/btstrpd.html b/1.6.6/docs/partials/error/ng/btstrpd.html new file mode 100644 index 000000000..7fd687e46 --- /dev/null +++ b/1.6.6/docs/partials/error/ng/btstrpd.html @@ -0,0 +1,54 @@ + Improve this Doc + + +

Error: ng:btstrpd +
App Already Bootstrapped with this Element
+

+ +
+
App already bootstrapped with this element '{0}'
+
+ +

Description

+
+

Occurs when calling angular.bootstrap on an element that has already been bootstrapped.

+

This usually happens when you accidentally use both ng-app and angular.bootstrap to bootstrap an +application.

+
<html>
+...
+  <body ng-app="myApp">
+    <script>
+      angular.bootstrap(document.body, ['myApp']);
+    </script>
+  </body>
+</html>
+
+

Note that for bootstrapping purposes, the <html> element is the same as document, so the following +will also throw an error.

+
<html>
+...
+<script>
+  angular.bootstrap(document, ['myApp']);
+</script>
+</html>
+
+

You can also get this error if you accidentally load AngularJS itself more than once.

+
<html ng-app>
+  <head>
+    <script src="angular.js"></script>
+
+    ...
+
+  </head>
+  <body>
+
+    ...
+
+    <script src="angular.js"></script>
+  </body>
+</html>
+
+ +
+ + diff --git a/1.6.6/docs/partials/error/ng/cpi.html b/1.6.6/docs/partials/error/ng/cpi.html new file mode 100644 index 000000000..b634f1212 --- /dev/null +++ b/1.6.6/docs/partials/error/ng/cpi.html @@ -0,0 +1,21 @@ + Improve this Doc + + +

Error: ng:cpi +
Bad Copy
+

+ +
+
Can't copy! Source and destination are identical.
+
+ +

Description

+
+

This error occurs when attempting to copy an object to itself. Calling angular.copy with a destination object deletes +all of the elements or properties on destination before copying to it. Copying +an object to itself is not supported. Make sure to check your calls to +angular.copy and avoid copying objects or arrays to themselves.

+ +
+ + diff --git a/1.6.6/docs/partials/error/ng/cpta.html b/1.6.6/docs/partials/error/ng/cpta.html new file mode 100644 index 000000000..2e63914e8 --- /dev/null +++ b/1.6.6/docs/partials/error/ng/cpta.html @@ -0,0 +1,19 @@ + Improve this Doc + + +

Error: ng:cpta +
Copying TypedArray
+

+ +
+
Can't copy! TypedArray destination cannot be mutated.
+
+ +

Description

+
+

Copying TypedArray's with a destination is not supported because TypedArray +objects can not be mutated, they are fixed length.

+ +
+ + diff --git a/1.6.6/docs/partials/error/ng/cpws.html b/1.6.6/docs/partials/error/ng/cpws.html new file mode 100644 index 000000000..0df1a379b --- /dev/null +++ b/1.6.6/docs/partials/error/ng/cpws.html @@ -0,0 +1,22 @@ + Improve this Doc + + +

Error: ng:cpws +
Copying Window or Scope
+

+ +
+
Can't copy! Making copies of Window or Scope instances is not supported.
+
+ +

Description

+
+

Copying Window or Scope instances is not supported because of cyclical and self +references. Avoid copying windows and scopes, as well as any other cyclical or +self-referential structures. Note that trying to deep copy an object containing +cyclical references that is neither a window nor a scope will cause infinite +recursion and a stack overflow.

+ +
+ + diff --git a/1.6.6/docs/partials/error/ng/test.html b/1.6.6/docs/partials/error/ng/test.html new file mode 100644 index 000000000..39f9038f7 --- /dev/null +++ b/1.6.6/docs/partials/error/ng/test.html @@ -0,0 +1,21 @@ + Improve this Doc + + +

Error: ng:test +
Testability Not Found
+

+ +
+
no injector found for element argument to getTestability
+
+ +

Description

+
+

Angular's testability helper, getTestability, requires a root element to be +passed in. This helps differentiate between different Angular apps on the same +page. This error is thrown when no injector is found for root element. It is +often because the root element is outside of the ng-app.

+ +
+ + diff --git a/1.6.6/docs/partials/error/ngModel.html b/1.6.6/docs/partials/error/ngModel.html new file mode 100644 index 000000000..c61912a35 --- /dev/null +++ b/1.6.6/docs/partials/error/ngModel.html @@ -0,0 +1,43 @@ + Improve this Doc + + +

ngModel

+ +
+ Here are the list of errors in the ngModel namespace. + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
constexprNon-Constant Expression
datefmtModel is not a date object
nonassignNon-Assignable Expression
nopromiseNo promise
numfmtModel is not of type `number`
+
+
+ + diff --git a/1.6.6/docs/partials/error/ngModel/constexpr.html b/1.6.6/docs/partials/error/ngModel/constexpr.html new file mode 100644 index 000000000..0340ea7db --- /dev/null +++ b/1.6.6/docs/partials/error/ngModel/constexpr.html @@ -0,0 +1,27 @@ + Improve this Doc + + +

Error: ngModel:constexpr +
Non-Constant Expression
+

+ +
+
Expected constant expression for `{0}`, but saw `{1}`.
+
+ +

Description

+
+

Some attributes used in conjunction with ngModel (such as ngTrueValue or ngFalseValue) will only +accept constant expressions.

+

Examples using constant expressions include:

+
<input type="checkbox" ng-model="..." ng-true-value="'truthyValue'">
+<input type="checkbox" ng-model="..." ng-false-value="0">
+
+

Examples of non-constant expressions include:

+
<input type="checkbox" ng-model="..." ng-true-value="someValue">
+<input type="checkbox" ng-model="..." ng-false-value="{foo: someScopeValue}">
+
+ +
+ + diff --git a/1.6.6/docs/partials/error/ngModel/datefmt.html b/1.6.6/docs/partials/error/ngModel/datefmt.html new file mode 100644 index 000000000..fc4eac539 --- /dev/null +++ b/1.6.6/docs/partials/error/ngModel/datefmt.html @@ -0,0 +1,22 @@ + Improve this Doc + + +

Error: ngModel:datefmt +
Model is not a date object
+

+ +
+
Expected `{0}` to be a date
+
+ +

Description

+
+

All date-related inputs like <input type="date"> require the model to be a Date object. +If the model is something else, this error will be thrown. +Angular does not set validation errors on the <input> in this case +as those errors are shown to the user, but the erroneous state was +caused by incorrect application logic and not by the user.

+ +
+ + diff --git a/1.6.6/docs/partials/error/ngModel/nonassign.html b/1.6.6/docs/partials/error/ngModel/nonassign.html new file mode 100644 index 000000000..5749ca69c --- /dev/null +++ b/1.6.6/docs/partials/error/ngModel/nonassign.html @@ -0,0 +1,31 @@ + Improve this Doc + + +

Error: ngModel:nonassign +
Non-Assignable Expression
+

+ +
+
Expression '{0}' is non-assignable. Element: {1}
+
+ +

Description

+
+

This error occurs when expression the ngModel directive is bound to is a non-assignable expression.

+

Examples using assignable expressions include:

+
<input ng-model="namedVariable">
+<input ng-model="myObj.someProperty">
+<input ng-model="indexedArray[0]">
+
+

Examples of non-assignable expressions include:

+
<input ng-model="foo + bar">
+<input ng-model="42">
+<input ng-model="'oops'">
+<input ng-model="myFunc()">
+
+

Always make sure that the expression bound via ngModel directive can be assigned to.

+

For more information, see the ngModel API doc.

+ +
+ + diff --git a/1.6.6/docs/partials/error/ngModel/nopromise.html b/1.6.6/docs/partials/error/ngModel/nopromise.html new file mode 100644 index 000000000..2974a0b4d --- /dev/null +++ b/1.6.6/docs/partials/error/ngModel/nopromise.html @@ -0,0 +1,37 @@ + Improve this Doc + + +

Error: ngModel:nopromise +
No promise
+

+ +
+
Expected asynchronous validator to return a promise but got '{0}' instead.
+
+ +

Description

+
+

The return value of an async validator, must always be a promise. If you want to return a +non-promise value, you can convert it to a promise using $q.resolve() or +$q.reject().

+

Example:

+
.directive('asyncValidator', function($q) {
+  return {
+    require: 'ngModel',
+    link: function(scope, elem, attrs, ngModel) {
+      ngModel.$asyncValidators.myAsyncValidation = function(modelValue, viewValue) {
+        if (/* I don't need to hit the backend API */) {
+          return $q.resolve();     // to mark as valid or
+          // return $q.reject();   // to mark as invalid
+        } else {
+          // ...send a request to the backend and return a promise
+        }
+      };
+    }
+  };
+})
+
+ +
+ + diff --git a/1.6.6/docs/partials/error/ngModel/numfmt.html b/1.6.6/docs/partials/error/ngModel/numfmt.html new file mode 100644 index 000000000..88f3688bc --- /dev/null +++ b/1.6.6/docs/partials/error/ngModel/numfmt.html @@ -0,0 +1,59 @@ + Improve this Doc + + +

Error: ngModel:numfmt +
Model is not of type `number`
+

+ +
+
Expected `{0}` to be a number
+
+ +

Description

+
+

The input[number] and input[range] directives require the model to be a number.

+

If the model is something else, this error will be thrown.

+

Angular does not set validation errors on the <input> in this case +as this error is caused by incorrect application logic and not by bad input from the user.

+

If your model does not contain actual numbers then it is up to the application developer +to use a directive that will do the conversion in the ngModel $formatters and $parsers +pipeline.

+

Example

+

In this example, our model stores the number as a string, so we provide the stringToNumber +directive to convert it into the format the input[number] directive expects.

+

+ +

+ + +
+ + +
+
<table>
  <tr ng-repeat="x in ['0', '1']">
    <td>
      <input type="number" string-to-number ng-model="x" /> {{ x }} : {{ typeOf(x) }}
    </td>
  </tr>
</table>
+
+ +
+
angular.module('numfmt-error-module', [])

.run(function($rootScope) {
  $rootScope.typeOf = function(value) {
    return typeof value;
  };
})

.directive('stringToNumber', function() {
  return {
    require: 'ngModel',
    link: function(scope, element, attrs, ngModel) {
      ngModel.$parsers.push(function(value) {
        return '' + value;
      });
      ngModel.$formatters.push(function(value) {
        return parseFloat(value);
      });
    }
  };
});
+
+ + + +
+
+ + +

+ +
+ + diff --git a/1.6.6/docs/partials/error/ngOptions.html b/1.6.6/docs/partials/error/ngOptions.html new file mode 100644 index 000000000..2e75c5b5b --- /dev/null +++ b/1.6.6/docs/partials/error/ngOptions.html @@ -0,0 +1,27 @@ + Improve this Doc + + +

ngOptions

+ +
+ Here are the list of errors in the ngOptions namespace. + +
+ +
+
+ + + + + + + + + + +
NameDescription
iexpInvalid Expression
+
+
+ + diff --git a/1.6.6/docs/partials/error/ngOptions/iexp.html b/1.6.6/docs/partials/error/ngOptions/iexp.html new file mode 100644 index 000000000..11533572c --- /dev/null +++ b/1.6.6/docs/partials/error/ngOptions/iexp.html @@ -0,0 +1,22 @@ + Improve this Doc + + +

Error: ngOptions:iexp +
Invalid Expression
+

+ +
+
Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}
+
+ +

Description

+
+

This error occurs when 'ngOptions' is passed an expression that isn't in an expected form.

+

Here's an example of correct syntax:

+
<select ng-model="color" ng-options="c.name for c in colors">
+
+

For more information on valid expression syntax, see 'ngOptions' in select directive docs.

+ +
+ + diff --git a/1.6.6/docs/partials/error/ngPattern.html b/1.6.6/docs/partials/error/ngPattern.html new file mode 100644 index 000000000..88c62b5bb --- /dev/null +++ b/1.6.6/docs/partials/error/ngPattern.html @@ -0,0 +1,27 @@ + Improve this Doc + + +

ngPattern

+ +
+ Here are the list of errors in the ngPattern namespace. + +
+ +
+
+ + + + + + + + + + +
NameDescription
noregexpExpected Regular Expression
+
+
+ + diff --git a/1.6.6/docs/partials/error/ngPattern/noregexp.html b/1.6.6/docs/partials/error/ngPattern/noregexp.html new file mode 100644 index 000000000..b61781ac8 --- /dev/null +++ b/1.6.6/docs/partials/error/ngPattern/noregexp.html @@ -0,0 +1,19 @@ + Improve this Doc + + +

Error: ngPattern:noregexp +
Expected Regular Expression
+

+ +
+
Expected {0} to be a RegExp but was {1}. Element: {2}
+
+ +

Description

+
+

This error occurs when 'ngPattern' is passed an expression that isn't a regular expression or doesn't have the expected format.

+

For more information on valid expression syntax, see 'ngPattern' in input directive docs.

+ +
+ + diff --git a/1.6.6/docs/partials/error/ngRepeat.html b/1.6.6/docs/partials/error/ngRepeat.html new file mode 100644 index 000000000..190be67b0 --- /dev/null +++ b/1.6.6/docs/partials/error/ngRepeat.html @@ -0,0 +1,39 @@ + Improve this Doc + + +

ngRepeat

+ +
+ Here are the list of errors in the ngRepeat namespace. + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
NameDescription
badidentInvalid identifier expression
dupesDuplicate Key in Repeater
iexpInvalid Expression
iidexpInvalid Identifier
+
+
+ + diff --git a/1.6.6/docs/partials/error/ngRepeat/badident.html b/1.6.6/docs/partials/error/ngRepeat/badident.html new file mode 100644 index 000000000..0c66b8040 --- /dev/null +++ b/1.6.6/docs/partials/error/ngRepeat/badident.html @@ -0,0 +1,45 @@ + Improve this Doc + + +

Error: ngRepeat:badident +
Invalid identifier expression
+

+ +
+
alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.
+
+ +

Description

+
+

Occurs when an invalid identifier is specified in an ngRepeat expression.

+

The ngRepeat directive's alias as syntax is used to assign an alias for the processed collection in scope.

+

If the expression is not a simple identifier (such that you could declare it with var {name}, or if the expression is a reserved name, +this error is thrown.

+

Reserved names include:

+
    +
  • null
  • +
  • this
  • +
  • undefined
  • +
  • $parent
  • +
  • $id
  • +
  • $root
  • +
  • $even
  • +
  • $odd
  • +
  • $first
  • +
  • $last
  • +
  • $middle
  • +
+

Invalid expressions might look like this:

+
<li ng-repeat="item in items | filter:searchString as this">{{item}}</li>
+<li ng-repeat="item in items | filter:searchString as some.objects["property"]">{{item}}</li>
+<li ng-repeat="item in items | filter:searchString as resultOfSomeMethod()">{{item}}</li>
+<li ng-repeat="item in items | filter:searchString as foo=6">{{item}}</li>
+
+

Valid expressions might look like this:

+
<li ng-repeat="item in items | filter:searchString as collections">{{item}}</li>
+<li ng-repeat="item in items | filter:searchString as filteredCollection">{{item}}</li>
+
+ +
+ + diff --git a/1.6.6/docs/partials/error/ngRepeat/dupes.html b/1.6.6/docs/partials/error/ngRepeat/dupes.html new file mode 100644 index 000000000..39c8ff9d5 --- /dev/null +++ b/1.6.6/docs/partials/error/ngRepeat/dupes.html @@ -0,0 +1,26 @@ + Improve this Doc + + +

Error: ngRepeat:dupes +
Duplicate Key in Repeater
+

+ +
+
Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}
+
+ +

Description

+
+

Occurs if there are duplicate keys in an ngRepeat expression. Duplicate keys are banned because AngularJS uses keys to associate DOM nodes with items.

+

By default, collections are keyed by reference which is desirable for most common models but can be problematic for primitive types that are interned (share references).

+

For example the issue can be triggered by this invalid code:

+
<div ng-repeat="value in [4, 4]"></div>
+
+

To resolve this error either ensure that the items in the collection have unique identity or use the track by syntax to specify how to track the association between models and DOM.

+

The example above can be resolved by using track by $index, which will cause the items to be keyed by their position in the array instead of their value:

+
<div ng-repeat="value in [4, 4] track by $index"></div>
+
+ +
+ + diff --git a/1.6.6/docs/partials/error/ngRepeat/iexp.html b/1.6.6/docs/partials/error/ngRepeat/iexp.html new file mode 100644 index 000000000..d3e05ec1c --- /dev/null +++ b/1.6.6/docs/partials/error/ngRepeat/iexp.html @@ -0,0 +1,21 @@ + Improve this Doc + + +

Error: ngRepeat:iexp +
Invalid Expression
+

+ +
+
Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.
+
+ +

Description

+
+

Occurs when there is a syntax error in an ngRepeat's expression. The expression should be in the form 'item in collection[ track by id]'.

+

Be aware, the ngRepeat directive parses the expression using a regex before sending collection and optionally id to the AngularJS parser. This error comes from the regex parsing.

+

To resolve, identify and fix errors in the expression, paying special attention to the 'in' and 'track by' keywords in the expression.

+

Please consult the api documentation of ngRepeat to learn more about valid syntax.

+ +
+ + diff --git a/1.6.6/docs/partials/error/ngRepeat/iidexp.html b/1.6.6/docs/partials/error/ngRepeat/iidexp.html new file mode 100644 index 000000000..f69cb7ee8 --- /dev/null +++ b/1.6.6/docs/partials/error/ngRepeat/iidexp.html @@ -0,0 +1,29 @@ + Improve this Doc + + +

Error: ngRepeat:iidexp +
Invalid Identifier
+

+ +
+
'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.
+
+ +

Description

+
+

Occurs when there is an error in the identifier part of ngRepeat's expression.

+

To resolve, use either a valid identifier or a tuple (key, value) where both key and value are valid identifiers.

+

Examples of invalid syntax:

+
<div ng-repeat="33 in users"></div>
+<div ng-repeat="someFn() in users"></div>
+<div ng-repeat="some user in users"></div>
+
+

Examples of valid syntax:

+
<div ng-repeat="user in users"></div>
+<div ng-repeat="(id, user) in userMap"></div>
+
+

Please consult the api documentation of ngRepeat to learn more about valid syntax.

+ +
+ + diff --git a/1.6.6/docs/partials/error/ngTransclude.html b/1.6.6/docs/partials/error/ngTransclude.html new file mode 100644 index 000000000..79a0fa668 --- /dev/null +++ b/1.6.6/docs/partials/error/ngTransclude.html @@ -0,0 +1,27 @@ + Improve this Doc + + +

ngTransclude

+ +
+ Here are the list of errors in the ngTransclude namespace. + +
+ +
+
+ + + + + + + + + + +
NameDescription
orphanOrphan ngTransclude Directive
+
+
+ + diff --git a/1.6.6/docs/partials/error/ngTransclude/orphan.html b/1.6.6/docs/partials/error/ngTransclude/orphan.html new file mode 100644 index 000000000..d0d8559a4 --- /dev/null +++ b/1.6.6/docs/partials/error/ngTransclude/orphan.html @@ -0,0 +1,21 @@ + Improve this Doc + + +

Error: ngTransclude:orphan +
Orphan ngTransclude Directive
+

+ +
+
Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}
+
+ +

Description

+
+

Occurs when an ngTransclude occurs without a transcluded ancestor element.

+

This error often occurs when you have forgotten to set transclude: true in some directive definition, and then used ngTransclude in the directive's template.

+

To resolve, either remove the offending ngTransclude or check that transclude: true is included in the intended directive definition.

+

Consult the API documentation for writing directives to learn more.

+ +
+ + diff --git a/1.6.6/docs/partials/error/orderBy.html b/1.6.6/docs/partials/error/orderBy.html new file mode 100644 index 000000000..dfc22c10f --- /dev/null +++ b/1.6.6/docs/partials/error/orderBy.html @@ -0,0 +1,27 @@ + Improve this Doc + + +

orderBy

+ +
+ Here are the list of errors in the orderBy namespace. + +
+ +
+
+ + + + + + + + + + +
NameDescription
notarrayValue is not array-like
+
+
+ + diff --git a/1.6.6/docs/partials/error/orderBy/notarray.html b/1.6.6/docs/partials/error/orderBy/notarray.html new file mode 100644 index 000000000..611630ece --- /dev/null +++ b/1.6.6/docs/partials/error/orderBy/notarray.html @@ -0,0 +1,57 @@ + Improve this Doc + + +

Error: orderBy:notarray +
Value is not array-like
+

+ +
+
Expected array but received: {0}
+
+ +

Description

+
+

This error occurs when orderBy is not passed an array-like value:

+
<div ng-repeat="(key, value) in myObj | orderBy:someProp">
+  {{ key }} : {{ value }}
+</div>
+
+

orderBy must be used with an array-like value so a subset of items can be returned. +The array can be initialized asynchronously and therefore null or undefined won't throw this error.

+

To use orderBy to order the properties of an object, you can create your own array based on that object:

+
angular.module('aModule', [])
+.controller('aController', function($scope) {
+  var myObj = {
+    one: {id: 1, name: 'Some thing'},
+    two: {id: 2, name: 'Another thing'},
+    three: {id: 3, name: 'A third thing'}
+  };
+
+  $scope.arrFromMyObj = Object.keys(myObj).map(function(key) {
+    return myObj[key];
+  });
+});
+
+

That can be used as:

+
<label>
+  Order by:
+  <select ng-model="orderProp" ng-options="prop for prop in ['id', 'name']"></select>
+</label>
+<div ng-repeat="item in arrFromMyObj | orderBy:orderProp">
+  [{{ item.id }}] {{ item.name }}
+</div>
+
+

You could as well convert the object to an array using a filter such as +toArrayFilter:

+
<label>
+  Order by:
+  <select ng-model="orderProp" ng-options="prop for prop in ['id', 'name']"></select>
+</label>
+<div ng-repeat="item in myObj | toArray:false | orderBy:orderProp">
+  [{{ item.id }}] {{ item.name }}
+</div>
+
+ +
+ + diff --git a/1.6.6/docs/partials/guide.html b/1.6.6/docs/partials/guide.html new file mode 100644 index 000000000..0bb7af58d --- /dev/null +++ b/1.6.6/docs/partials/guide.html @@ -0,0 +1,79 @@ + Improve this Doc + + +

Guide to Angular 1 Documentation

+

On this page, you will find a list of official Angular resources on various topics.

+

Just starting out with Angular 1? Try working through our step by step tutorial or try +building on our seed project.

+ +

Ready to find out more about Angular 1?

+ +

Core Concepts

+

Templates

+

In Angular applications, you move the job of filling page templates with data from the server to the client. The result is a system better structured for dynamic page updates. Below are the core features you'll use.

+ +

Application Structure

+ +

Other Features

+ +

Testing

+ +

Community Resources

+

We have set up a guide to many resources provided by the community, where you can find lots +of additional information and material on these topics, a list of complimentary libraries, and much more.

+ +

Getting Help

+

The recipe for getting help on your unique issue is to create an example that could work (even if it doesn't) in a shareable example on Plunker, JSFiddle, or similar site and then post to one of the following:

+ +

Official Communications

+

Official announcements, news and releases are posted to our blog, G+ and Twitter:

+ +

Contributing to Angular 1

+

Though we have a core group of core contributors at Google, Angular is an open source project with hundreds of contributors. +We'd love you to be one of them. When you're ready, please read the Guide for contributing to Angular.

+

Something Missing?

+

Didn't find what you're looking for here? Check out the External Angular 1 resources guide.

+

If you have awesome Angular 1 resources that belong on that page, please tell us about them on +Google+ or Twitter.

+ + diff --git a/1.6.6/docs/partials/guide/$location.html b/1.6.6/docs/partials/guide/$location.html new file mode 100644 index 000000000..f923bffe7 --- /dev/null +++ b/1.6.6/docs/partials/guide/$location.html @@ -0,0 +1,627 @@ + Improve this Doc + + +

What does it do?

+

The $location service parses the URL in the browser address bar (based on window.location) and makes the URL available to +your application. Changes to the URL in the address bar are reflected into the $location service and +changes to $location are reflected into the browser address bar.

+

The $location service:

+
    +
  • Exposes the current URL in the browser address bar, so you can
      +
    • Watch and observe the URL.
    • +
    • Change the URL.
    • +
    +
  • +
  • Maintains synchronization between itself and the browser's URL when the user
      +
    • Changes the address in the browser's address bar.
    • +
    • Clicks the back or forward button in the browser (or clicks a History link).
    • +
    • Clicks on a link in the page.
    • +
    +
  • +
  • Represents the URL object as a set of methods (protocol, host, port, path, search, hash).
  • +
+

Comparing $location to window.location

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
window.location$location service
purposeallow read/write access to the current browser locationsame
APIexposes "raw" object with properties that can be directly modifiedexposes jQuery-style getters and setters
integration with angular application life-cyclenoneknows about all internal life-cycle phases, integrates with $watch, ...
seamless integration with HTML5 APInoyes (with a fallback for legacy browsers)
aware of docroot/context from which the application is loadedno - window.location.pathname returns "/docroot/actual/path"yes - $location.path() returns "/actual/path"
+ +

When should I use $location?

+

Any time your application needs to react to a change in the current URL or if you want to change +the current URL in the browser.

+

What does it not do?

+

It does not cause a full page reload when the browser URL is changed. To reload the page after +changing the URL, use the lower-level API, $window.location.href.

+

General overview of the API

+

The $location service can behave differently, depending on the configuration that was provided to +it when it was instantiated. The default configuration is suitable for many applications, for +others customizing the configuration can enable new features.

+

Once the $location service is instantiated, you can interact with it via jQuery-style getter and +setter methods that allow you to get or change the current URL in the browser.

+

$location service configuration

+

To configure the $location service, retrieve the +$locationProvider and set the parameters as follows:

+
    +
  • html5Mode(mode): {boolean|Object}
    +false or {enabled: false} (default) - + see Hashbang mode
    +true or {enabled: true} - + see HTML5 mode
    +{..., requireBase: true/false} (only affects HTML5 mode) - + see Relative links
    +{..., rewriteLinks: true/false/'string'} (only affects HTML5 mode) - + see HTML link rewriting
    +Default:

    +
    {
    +  enabled: false,
    +  requireBase: true,
    +  rewriteLinks: true
    +}
    +
    +
  • +
  • hashPrefix(prefix): {string}
    +Prefix used for Hashbang URLs (used in Hashbang mode or in legacy browsers in HTML5 mode).
    +Default: '!'

    +
  • +
+

Example configuration

+
$locationProvider.html5Mode(true).hashPrefix('*');
+
+

Getter and setter methods

+

$location service provides getter methods for read-only parts of the URL (absUrl, protocol, host, +port) and getter / setter methods for url, path, search, hash:

+
// get the current path
+$location.path();
+
+// change the path
+$location.path('/newValue')
+
+

All of the setter methods return the same $location object to allow chaining. For example, to +change multiple segments in one go, chain setters like this:

+
$location.path('/newValue').search({key: value});
+
+

Replace method

+

There is a special replace method which can be used to tell the $location service that the next +time the $location service is synced with the browser, the last history record should be replaced +instead of creating a new one. This is useful when you want to implement redirection, which would +otherwise break the back button (navigating back would retrigger the redirection). To change the +current URL without creating a new browser history record you can call:

+
$location.path('/someNewPath');
+$location.replace();
+// or you can chain these as: $location.path('/someNewPath').replace();
+
+

Note that the setters don't update window.location immediately. Instead, the $location service is +aware of the scope life-cycle and coalesces multiple $location +mutations into one "commit" to the window.location object during the scope $digest phase. Since +multiple changes to the $location's state will be pushed to the browser as a single change, it's +enough to call the replace() method just once to make the entire "commit" a replace operation +rather than an addition to the browser history. Once the browser is updated, the $location service +resets the flag set by replace() method and future mutations will create new history records, +unless replace() is called again.

+

Setters and character encoding

+

You can pass special characters to $location service and it will encode them according to rules +specified in RFC 3986. When you access the methods:

+
    +
  • All values that are passed to $location setter methods, path(), search(), hash(), are +encoded.
  • +
  • Getters (calls to methods without parameters) return decoded values for the following methods +path(), search(), hash().
  • +
  • When you call the absUrl() method, the returned value is a full url with its segments encoded.
  • +
  • When you call the url() method, the returned value is path, search and hash, in the form +/path?search=a&b=c#hash. The segments are encoded as well.
  • +
+

Hashbang and HTML5 Modes

+

$location service has two configuration modes which control the format of the URL in the browser +address bar: Hashbang mode (the default) and the HTML5 mode which is based on using the +HTML5 History API. Applications use the same API in +both modes and the $location service will work with appropriate URL segments and browser APIs to +facilitate the browser URL change and history management.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Hashbang modeHTML5 mode
configurationthe default{ html5Mode: true }
URL formathashbang URLs in all browsersregular URLs in modern browser, hashbang URLs in old browser
<a href=""> link rewritingnoyes
requires server-side configurationnoyes
+ +

Hashbang mode (default mode)

+

In this mode, $location uses Hashbang URLs in all browsers. +Angular also does not intercept and rewrite links in this mode. I.e. links work +as expected and also perform full page reloads when other parts of the url +than the hash fragment was changed.

+

Example

+
it('should show example', function() {
+  module(function($locationProvider) {
+    $locationProvider.html5Mode(false);
+    $locationProvider.hashPrefix('!');
+  });
+  inject(function($location) {
+    // open http://example.com/base/index.html#!/a
+    expect($location.absUrl()).toBe('http://example.com/base/index.html#!/a');
+    expect($location.path()).toBe('/a');
+
+    $location.path('/foo');
+    expect($location.absUrl()).toBe('http://example.com/base/index.html#!/foo');
+
+    expect($location.search()).toEqual({});
+    $location.search({a: 'b', c: true});
+    expect($location.absUrl()).toBe('http://example.com/base/index.html#!/foo?a=b&c');
+
+    $location.path('/new').search('x=y');
+    expect($location.absUrl()).toBe('http://example.com/base/index.html#!/new?x=y');
+  });
+});
+
+

HTML5 mode

+

In HTML5 mode, the $location service getters and setters interact with the browser URL address +through the HTML5 history API. This allows for use of regular URL path and search segments, +instead of their hashbang equivalents. If the HTML5 History API is not supported by a browser, the +$location service will fall back to using the hashbang URLs automatically. This frees you from +having to worry about whether the browser displaying your app supports the history API or not; the +$location service transparently uses the best available option.

+
    +
  • Opening a regular URL in a legacy browser -> redirects to a hashbang URL
  • +
  • Opening hashbang URL in a modern browser -> rewrites to a regular URL
  • +
+

Note that in this mode, Angular intercepts all links (subject to the "Html link rewriting" rules below) +and updates the url in a way that never performs a full page reload.

+

Example

+
it('should show example', function() {
+  module(function($locationProvider) {
+    $locationProvider.html5Mode(true);
+    $locationProvider.hashPrefix('!');
+  });
+  inject(function($location) {
+    // in browser with HTML5 history support:
+    // open http://example.com/#!/a -> rewrite to http://example.com/a
+    // (replacing the http://example.com/#!/a history record)
+    expect($location.path()).toBe('/a');
+
+    $location.path('/foo');
+    expect($location.absUrl()).toBe('http://example.com/foo');
+
+    expect($location.search()).toEqual({});
+    $location.search({a: 'b', c: true});
+    expect($location.absUrl()).toBe('http://example.com/foo?a=b&c');
+
+    $location.path('/new').search('x=y');
+    expect($location.url()).toBe('/new?x=y');
+    expect($location.absUrl()).toBe('http://example.com/new?x=y');
+  });
+});
+
+it('should show example (when browser doesn\'t support HTML5 mode', function() {
+  module(function($provide, $locationProvider) {
+    $locationProvider.html5Mode(true);
+    $locationProvider.hashPrefix('!');
+    $provide.value('$sniffer', {history: false});
+  });
+  inject(initBrowser({ url: 'http://example.com/new?x=y', basePath: '/' }),
+    function($location) {
+    // in browser without html5 history support:
+    // open http://example.com/new?x=y -> redirect to http://example.com/#!/new?x=y
+    // (again replacing the http://example.com/new?x=y history item)
+    expect($location.path()).toBe('/new');
+    expect($location.search()).toEqual({x: 'y'});
+
+    $location.path('/foo/bar');
+    expect($location.path()).toBe('/foo/bar');
+    expect($location.url()).toBe('/foo/bar?x=y');
+    expect($location.absUrl()).toBe('http://example.com/#!/foo/bar?x=y');
+  });
+});
+
+

Fallback for legacy browsers

+

For browsers that support the HTML5 history API, $location uses the HTML5 history API to write +path and search. If the history API is not supported by a browser, $location supplies a Hashbang +URL. This frees you from having to worry about whether the browser viewing your app supports the +history API or not; the $location service makes this transparent to you.

+ +

When you use HTML5 history API mode, you will not need special hashbang links. All you have to do +is specify regular URL links, such as: <a href="/some?foo=bar">link</a>

+

When a user clicks on this link,

+
    +
  • In a legacy browser, the URL changes to /index.html#!/some?foo=bar
  • +
  • In a modern browser, the URL changes to /some?foo=bar
  • +
+

In cases like the following, links are not rewritten; instead, the browser will perform a full page +reload to the original link.

+
    +
  • Links that contain target element
    +Example: <a href="/ext/link?a=b" target="_self">link</a>
  • +
  • Absolute links that go to a different domain
    +Example: <a href="http://angularjs.org/">link</a>
  • +
  • Links starting with '/' that lead to a different base path
    +Example: <a href="/not-my-base/link">link</a>
  • +
+

If mode.rewriteLinks is set to false in the mode configuration object passed to +$locationProvider.html5Mode(), the browser will perform a full page reload for every link. +mode.rewriteLinks can also be set to a string, which will enable link rewriting only on anchor +elements that have the given attribute.

+

For example, if mode.rewriteLinks is set to 'internal-link':

+
    +
  • <a href="/some/path" internal-link>link</a> will be rewritten
  • +
  • <a href="/some/path">link</a> will perform a full page reload
  • +
+

Note that attribute name normalization does not apply here, so +'internalLink' will not match 'internal-link'.

+ +

Be sure to check all relative links, images, scripts etc. Angular requires you to specify the url +base in the head of your main html file (<base href="/my-base/index.html">) unless html5Mode.requireBase +is set to false in the html5Mode definition object passed to $locationProvider.html5Mode(). With +that, relative urls will always be resolved to this base url, even if the initial url of the +document was different.

+

There is one exception: Links that only contain a hash fragment (e.g. <a href="#target">) +will only change $location.hash() and not modify the url otherwise. This is useful for scrolling +to anchors on the same page without needing to know on which page the user currently is.

+

Server side

+

Using this mode requires URL rewriting on server side, basically you have to rewrite all your links +to entry point of your application (e.g. index.html). Requiring a <base> tag is also important for +this case, as it allows Angular to differentiate between the part of the url that is the application +base and the path that should be handled by the application.

+

Base href constraints

+

The $location service is not able to function properly if the current URL is outside the URL given +as the base href. This can have subtle confusing consequences...

+

Consider a base href set as follows: <base href="/base/"> (i.e. the application exists in the "folder" +called /base). The URL /base is actually outside the application (it refers to the base file found +in the root / folder).

+

If you wish to be able to navigate to the application via a URL such as /base then you should ensure that +you server is setup to redirect such requests to /base/.

+

See https://github.com/angular/angular.js/issues/14018 for more information.

+ +

Because of rewriting capability in HTML5 mode, your users will be able to open regular url links in +legacy browsers and hashbang links in modern browser:

+
    +
  • Modern browser will rewrite hashbang URLs to regular URLs.
  • +
  • Older browsers will redirect regular URLs to hashbang URLs.
  • +
+

Example

+

Here you can see two $location instances that show the difference between Html5 mode and Html5 Fallback mode. +Note that to simulate different levels of browser support, the $location instances are connected to +a fakeBrowser service, which you don't have to set up in actual projects.

+

Note that when you type hashbang url into the first browser (or vice versa) it doesn't rewrite / +redirect to regular / hashbang url, as this conversion happens only during parsing the initial URL += on page reload.

+

In these examples we use <base href="/base/index.html" />. The inputs represent the address bar of the browser.

+

Browser in HTML5 mode

+

+ +

+ + +
+ + +
+
<div ng-controller="LocationController">
  <div ng-address-bar></div><br><br>
  <div>
    $location.protocol() = <span ng-bind="$location.protocol()"></span> <br>
    $location.host() = <span ng-bind="$location.host()"></span> <br>
    $location.port() = <span ng-bind="$location.port()"></span> <br>
    $location.path() = <span ng-bind="$location.path()"></span> <br>
    $location.search() = <span ng-bind="$location.search()"></span> <br>
    $location.hash() = <span ng-bind="$location.hash()"></span> <br>
  </div>
  <div id="navigation">
    <a href="http://www.example.com/base/first?a=b">/base/first?a=b</a> |
    <a href="http://www.example.com/base/sec/ond?flag#hash">sec/ond?flag#hash</a> |
    <a href="/other-base/another?search">external</a>
  </div>
</div>
+
+ +
+
angular.module('html5-mode', ['fake-browser', 'address-bar'])

// Configure the fakeBrowser. Do not set these values in actual projects.
.constant('initUrl', 'http://www.example.com/base/path?a=b#h')
.constant('baseHref', '/base/index.html')
.value('$sniffer', { history: true })

.controller('LocationController', function($scope, $location) {
  $scope.$location = {};
  angular.forEach('protocol host port path search hash'.split(' '), function(method) {
   $scope.$location[method] = function() {
     var result = $location[method]();
     return angular.isObject(result) ? angular.toJson(result) : result;
   };
  });
})

.config(function($locationProvider) {
  $locationProvider.html5Mode(true).hashPrefix('!');
})

.run(function($rootElement) {
  $rootElement.on('click', function(e) { e.stopPropagation(); });
});
+
+ +
+
angular.module('fake-browser', [])

.config(function($provide) {
 $provide.decorator('$browser', function($delegate, baseHref, initUrl) {

  $delegate.onUrlChange = function(fn) {
     this.urlChange = fn;
   };

  $delegate.url = function() {
     return initUrl;
  };

  $delegate.defer = function(fn, delay) {
     setTimeout(function() { fn(); }, delay || 0);
   };

  $delegate.baseHref = function() {
     return baseHref;
   };

   return $delegate;
 });
});
+
+ +
+
angular.module('address-bar', [])
.directive('ngAddressBar', function($browser, $timeout) {
   return {
     template: 'Address: <input id="addressBar" type="text" style="width: 400px" >',
     link: function(scope, element, attrs) {
       var input = element.children('input'), delay;

       input.on('keypress keyup keydown', function(event) {
               delay = (!delay ? $timeout(fireUrlChange, 250) : null);
               event.stopPropagation();
             })
            .val($browser.url());

       $browser.url = function(url) {
         return url ? input.val(url) : input.val();
       };

       function fireUrlChange() {
         delay = null;
         $browser.urlChange(input.val());
       }
     }
   };
 });
+
+ +
+
var addressBar = element(by.css("#addressBar")),
    url = 'http://www.example.com/base/path?a=b#h';


it("should show fake browser info on load", function() {
  expect(addressBar.getAttribute('value')).toBe(url);

  expect(element(by.binding('$location.protocol()')).getText()).toBe('http');
  expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com');
  expect(element(by.binding('$location.port()')).getText()).toBe('80');
  expect(element(by.binding('$location.path()')).getText()).toBe('/path');
  expect(element(by.binding('$location.search()')).getText()).toBe('{"a":"b"}');
  expect(element(by.binding('$location.hash()')).getText()).toBe('h');

});

it("should change $location accordingly", function() {
  var navigation = element.all(by.css("#navigation a"));

  navigation.get(0).click();

  expect(addressBar.getAttribute('value')).toBe("http://www.example.com/base/first?a=b");

  expect(element(by.binding('$location.protocol()')).getText()).toBe('http');
  expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com');
  expect(element(by.binding('$location.port()')).getText()).toBe('80');
  expect(element(by.binding('$location.path()')).getText()).toBe('/first');
  expect(element(by.binding('$location.search()')).getText()).toBe('{"a":"b"}');
  expect(element(by.binding('$location.hash()')).getText()).toBe('');


  navigation.get(1).click();

  expect(addressBar.getAttribute('value')).toBe("http://www.example.com/base/sec/ond?flag#hash");

  expect(element(by.binding('$location.protocol()')).getText()).toBe('http');
  expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com');
  expect(element(by.binding('$location.port()')).getText()).toBe('80');
  expect(element(by.binding('$location.path()')).getText()).toBe('/sec/ond');
  expect(element(by.binding('$location.search()')).getText()).toBe('{"flag":true}');
  expect(element(by.binding('$location.hash()')).getText()).toBe('hash');
});
+
+ + + +
+
+ + +

+

Browser in HTML5 Fallback mode (Hashbang mode)

+

+ +

+ + +
+ + +
+
<div ng-controller="LocationController">
  <div ng-address-bar></div><br><br>
  <div>
    $location.protocol() = <span ng-bind="$location.protocol()"></span> <br>
    $location.host() = <span ng-bind="$location.host()"></span> <br>
    $location.port() = <span ng-bind="$location.port()"></span> <br>
    $location.path() = <span ng-bind="$location.path()"></span> <br>
    $location.search() = <span ng-bind="$location.search()"></span> <br>
    $location.hash() = <span ng-bind="$location.hash()"></span> <br>
  </div>
  <div id="navigation">
    <a href="http://www.example.com/base/first?a=b">/base/first?a=b</a> |
    <a href="http://www.example.com/base/sec/ond?flag#hash">sec/ond?flag#hash</a> |
    <a href="/other-base/another?search">external</a>
  </div>
</div>
+
+ +
+
angular.module('hashbang-mode', ['fake-browser', 'address-bar'])

// Configure the fakeBrowser. Do not set these values in actual projects.
.constant('initUrl', 'http://www.example.com/base/index.html#!/path?a=b#h')
.constant('baseHref', '/base/index.html')
.value('$sniffer', { history: false })

.config(function($locationProvider) {
  $locationProvider.html5Mode(true).hashPrefix('!');
})

.controller('LocationController', function($scope, $location) {
  $scope.$location = {};
  angular.forEach('protocol host port path search hash'.split(' '), function(method) {
    $scope.$location[method] = function() {
      var result = $location[method]();
      return angular.isObject(result) ? angular.toJson(result) : result;
    };
  });
})

.run(function($rootElement) {
  $rootElement.on('click', function(e) {
    e.stopPropagation();
  });
});
+
+ +
+
angular.module('fake-browser', [])

.config(function($provide) {
 $provide.decorator('$browser', function($delegate, baseHref, initUrl) {

  $delegate.onUrlChange = function(fn) {
     this.urlChange = fn;
   };

  $delegate.url = function() {
     return initUrl;
  };

  $delegate.defer = function(fn, delay) {
     setTimeout(function() { fn(); }, delay || 0);
   };

  $delegate.baseHref = function() {
     return baseHref;
   };

   return $delegate;
 });
});
+
+ +
+
angular.module('address-bar', [])
.directive('ngAddressBar', function($browser, $timeout) {
   return {
     template: 'Address: <input id="addressBar" type="text" style="width: 400px" >',
     link: function(scope, element, attrs) {
       var input = element.children('input'), delay;

       input.on('keypress keyup keydown', function(event) {
               delay = (!delay ? $timeout(fireUrlChange, 250) : null);
               event.stopPropagation();
             })
            .val($browser.url());

       $browser.url = function(url) {
         return url ? input.val(url) : input.val();
       };

       function fireUrlChange() {
         delay = null;
         $browser.urlChange(input.val());
       }
     }
   };
 });
+
+ +
+
var addressBar = element(by.css("#addressBar")),
     url = 'http://www.example.com/base/index.html#!/path?a=b#h';

it("should show fake browser info on load", function() {
  expect(addressBar.getAttribute('value')).toBe(url);

  expect(element(by.binding('$location.protocol()')).getText()).toBe('http');
  expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com');
  expect(element(by.binding('$location.port()')).getText()).toBe('80');
  expect(element(by.binding('$location.path()')).getText()).toBe('/path');
  expect(element(by.binding('$location.search()')).getText()).toBe('{"a":"b"}');
  expect(element(by.binding('$location.hash()')).getText()).toBe('h');

});

it("should change $location accordingly", function() {
  var navigation = element.all(by.css("#navigation a"));

  navigation.get(0).click();

  expect(addressBar.getAttribute('value')).toBe("http://www.example.com/base/index.html#!/first?a=b");

  expect(element(by.binding('$location.protocol()')).getText()).toBe('http');
  expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com');
  expect(element(by.binding('$location.port()')).getText()).toBe('80');
  expect(element(by.binding('$location.path()')).getText()).toBe('/first');
  expect(element(by.binding('$location.search()')).getText()).toBe('{"a":"b"}');
  expect(element(by.binding('$location.hash()')).getText()).toBe('');


  navigation.get(1).click();

  expect(addressBar.getAttribute('value')).toBe("http://www.example.com/base/index.html#!/sec/ond?flag#hash");

  expect(element(by.binding('$location.protocol()')).getText()).toBe('http');
  expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com');
  expect(element(by.binding('$location.port()')).getText()).toBe('80');
  expect(element(by.binding('$location.path()')).getText()).toBe('/sec/ond');
  expect(element(by.binding('$location.search()')).getText()).toBe('{"flag":true}');
  expect(element(by.binding('$location.hash()')).getText()).toBe('hash');

});
+
+ + + +
+
+ + +

+

Caveats

+

Page reload navigation

+

The $location service allows you to change only the URL; it does not allow you to reload the +page. When you need to change the URL and reload the page or navigate to a different page, please +use a lower level API, $window.location.href.

+

Using $location outside of the scope life-cycle

+

$location knows about Angular's scope life-cycle. When a URL changes in +the browser it updates the $location and calls $apply so that all +$watchers / +$observers are notified. +When you change the $location inside the $digest phase everything is ok; $location will +propagate this change into browser and will notify all the $watchers / +$observers. +When you want to change the $location from outside Angular (for example, through a DOM Event or +during testing) - you must call $apply to propagate the changes.

+

$location.path() and ! or / prefixes

+

A path should always begin with forward slash (/); the $location.path() setter will add the +forward slash if it is missing.

+

Note that the ! prefix in the hashbang mode is not part of $location.path(); it is actually +hashPrefix.

+

Crawling your app

+

To allow indexing of your AJAX application, you have to add special meta tag in the head section of +your document:

+
<meta name="fragment" content="!" />
+
+

This will cause crawler bot to request links with _escaped_fragment_ param so that your server +can recognize the crawler and serve a HTML snapshots. For more information about this technique, +see Making AJAX Applications +Crawlable.

+

Testing with the $location service

+

When using $location service during testing, you are outside of the angular's scope life-cycle. This means it's your responsibility to call scope.$apply().

+
describe('serviceUnderTest', function() {
+  beforeEach(module(function($provide) {
+    $provide.factory('serviceUnderTest', function($location) {
+      // whatever it does...
+    });
+  });
+
+  it('should...', inject(function($location, $rootScope, serviceUnderTest) {
+    $location.path('/new/path');
+    $rootScope.$apply();
+
+    // test whatever the service should do...
+
+  }));
+});
+
+

Migrating from earlier AngularJS releases

+

In earlier releases of Angular, $location used hashPath or hashSearch to process path and +search methods. With this release, the $location service processes path and search methods and +then uses the information it obtains to compose hashbang URLs (such as +http://server.com/#!/path?search=a), when necessary.

+

Changes to your code

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Navigation inside the appChange to
$location.href = value
$location.hash = value
$location.update(value)
$location.updateHash(value)
$location.path(path).search(search)
$location.hashPath = path$location.path(path)
$location.hashSearch = search$location.search(search)
Navigation outside the app + Use lower level API +
$location.href = value
$location.update(value)
$window.location.href = value
$location[protocol | host | port | path | search]$window.location[protocol | host | port | path | search]
Read access + Change to +
$location.hashPath$location.path()
$location.hashSearch$location.search()
$location.href
$location.protocol
$location.host
$location.port
$location.hash
$location.absUrl()
$location.protocol()
$location.host()
$location.port()
$location.path() + $location.search()
$location.path
$location.search
$window.location.path
$window.location.search
+ +

Two-way binding to $location

+

Because $location uses getters/setters, you can use ng-model-options="{ getterSetter: true }" +to bind it to ngModel:

+

+ +

+ + +
+ + +
+
<div ng-controller="LocationController">
  <input type="text" ng-model="locationPath" ng-model-options="{ getterSetter: true }" />
</div>
+
+ +
+
angular.module('locationExample', [])
.controller('LocationController', ['$scope', '$location', function($scope, $location) {
  $scope.locationPath = function(newLocation) {
    return $location.path(newLocation);
  };
}]);
+
+ + + +
+
+ + +

+

Related API

+ + + diff --git a/1.6.6/docs/partials/guide/accessibility.html b/1.6.6/docs/partials/guide/accessibility.html new file mode 100644 index 000000000..ec0459ea2 --- /dev/null +++ b/1.6.6/docs/partials/guide/accessibility.html @@ -0,0 +1,309 @@ + Improve this Doc + + +

Accessibility with ngAria

+

The goal of ngAria is to improve Angular's default accessibility by enabling common +ARIA attributes that convey state or semantic information for +assistive technologies used by persons with disabilities.

+

Including ngAria

+

Using ngAria is as simple as requiring the ngAria module in your application. ngAria hooks into +standard AngularJS directives and quietly injects accessibility support into your application +at runtime.

+
angular.module('myApp', ['ngAria'])...
+
+

Using ngAria

+

Most of what ngAria does is only visible "under the hood". To see the module in action, once you've +added it as a dependency, you can test a few things:

+
    +
  • Using your favorite element inspector, look for attributes added by ngAria in your own code.
  • +
  • Test using your keyboard to ensure tabindex is used correctly.
  • +
  • Fire up a screen reader such as VoiceOver or NVDA to check for ARIA support. +Helpful screen reader tips.
  • +
+

Supported directives

+

Currently, ngAria interfaces with the following directives:

+ +

ngModel

+ +

Much of ngAria's heavy lifting happens in the ngModel +directive. For elements using ngModel, special attention is paid by ngAria if that element also +has a role or type of checkbox, radio, range or textbox.

+

For those elements using ngModel, ngAria will dynamically bind and update the following ARIA +attributes (if they have not been explicitly specified by the developer):

+
    +
  • aria-checked
  • +
  • aria-valuemin
  • +
  • aria-valuemax
  • +
  • aria-valuenow
  • +
  • aria-invalid
  • +
  • aria-required
  • +
  • aria-readonly
  • +
  • aria-disabled
  • +
+

Example

+

+ +

+ + +
+ + +
+
<form>
  <custom-checkbox role="checkbox" ng-model="checked" required
      aria-label="Custom checkbox" show-attrs>
    Custom checkbox
  </custom-checkbox>
</form>
<hr />
<b>Is checked:</b> {{ !!checked }}
+
+ +
+
angular.
  module('ngAria_ngModelExample', ['ngAria']).
  directive('customCheckbox', customCheckboxDirective).
  directive('showAttrs', showAttrsDirective);

function customCheckboxDirective() {
  return {
    restrict: 'E',
    require: 'ngModel',
    transclude: true,
    template:
        '<span class="icon" aria-hidden="true"></span> ' +
        '<ng-transclude></ng-transclude>',
    link: function(scope, elem, attrs, ctrl) {
      // Overwrite necessary `NgModelController` methods
      ctrl.$isEmpty = isEmpty;
      ctrl.$render = render;

      // Bind to events
      elem.on('click', function(event) {
        event.preventDefault();
        scope.$apply(toggleCheckbox);
      });
      elem.on('keypress', function(event) {
        event.preventDefault();
        if (event.keyCode === 32 || event.keyCode === 13) {
          scope.$apply(toggleCheckbox);
        }
      });

      // Helpers
      function isEmpty(value) {
        return !value;
      }
      
      function render() {
        elem[ctrl.$viewValue ? 'addClass' : 'removeClass']('checked');
      }
 
      function toggleCheckbox() {
        ctrl.$setViewValue(!ctrl.$viewValue);
        ctrl.$render();
      }
    }
  };
}

function showAttrsDirective($timeout) {
  return function(scope, elem, attrs) {
    var pre = document.createElement('pre');
    elem.after(pre);

    scope.$watchCollection(function() {
      return Array.prototype.slice.call(elem[0].attributes).reduce(function(aggr, attr) {
        if (attr.name !== attrs.$attr.showAttrs) aggr[attr.name] = attr.value;
        return aggr;
      }, {});
    }, function(newValues) {
      $timeout(function() {
        pre.textContent = angular.toJson(newValues, 2);
      });
    });
  };
}
+
+ +
+
custom-checkbox {
  cursor: pointer;
  display: inline-block;
}

custom-checkbox .icon:before {
  content: '\2610';
  display: inline-block;
  font-size: 2em;
  line-height: 1;
  speak: none;
  vertical-align: middle;
}

custom-checkbox.checked .icon:before {
  content: '\2611';
}
+
+ +
+
var checkbox = element(by.css('custom-checkbox'));
var checkedCheckbox = element(by.css('custom-checkbox.checked'));

it('should have the `checked` class only when checked', function() {
  expect(checkbox.isPresent()).toBe(true);
  expect(checkedCheckbox.isPresent()).toBe(false);

  checkbox.click();
  expect(checkedCheckbox.isPresent()).toBe(true);

  checkbox.click();
  expect(checkedCheckbox.isPresent()).toBe(false);
});

it('should have the `aria-checked` attribute set to the appropriate value', function() {
  expect(checkedCheckbox.isPresent()).toBe(false);
  expect(checkbox.getAttribute('aria-checked')).toBe('false');

  checkbox.click();
  expect(checkedCheckbox.isPresent()).toBe(true);
  expect(checkbox.getAttribute('aria-checked')).toBe('true');

  checkbox.click();
  expect(checkedCheckbox.isPresent()).toBe(false);
  expect(checkbox.getAttribute('aria-checked')).toBe('false');
});
+
+ + + +
+
+ + +

+

ngAria will also add tabIndex, ensuring custom elements with these roles will be reachable from +the keyboard. It is still up to you as a developer to ensure custom controls will be +accessible. As a rule, any time you create a widget involving user interaction, be sure to test +it with your keyboard and at least one mobile and desktop screen reader.

+

ngValue and ngChecked

+ +

To ease the transition between native inputs and custom controls, ngAria now supports +ngValue and ngChecked. +The original directives were created for native inputs only, so ngAria extends +support to custom elements by managing aria-checked for accessibility.

+

Example

+
<custom-checkbox ng-checked="val"></custom-checkbox>
+<custom-radio-button ng-value="val"></custom-radio-button>
+
+

Becomes:

+
<custom-checkbox ng-checked="val" aria-checked="true"></custom-checkbox>
+<custom-radio-button ng-value="val" aria-checked="true"></custom-radio-button>
+
+

ngDisabled

+ +

The disabled attribute is only valid for certain elements such as button, input and +textarea. To properly disable custom element directives such as <md-checkbox> or <taco-tab>, +using ngAria with ngDisabled will also +add aria-disabled. This tells assistive technologies when a non-native input is disabled, helping +custom controls to be more accessible.

+

Example

+
<md-checkbox ng-disabled="disabled"></md-checkbox>
+
+

Becomes:

+
<md-checkbox disabled aria-disabled="true"></md-checkbox>
+
+
+You can check whether a control is legitimately disabled for a screen reader by visiting +chrome://accessibility and inspecting the accessibility tree. +
+ +

ngRequired

+ +

The boolean required attribute is only valid for native form controls such as input and +textarea. To properly indicate custom element directives such as <md-checkbox> or <custom-input> +as required, using ngAria with ngRequired will also add +aria-required. This tells accessibility APIs when a custom control is required.

+

Example

+
<md-checkbox ng-required="val"></md-checkbox>
+
+

Becomes:

+
<md-checkbox ng-required="val" aria-required="true"></md-checkbox>
+
+

ngReadonly

+ +

The boolean readonly attribute is only valid for native form controls such as input and +textarea. To properly indicate custom element directives such as <md-checkbox> or <custom-input> +as required, using ngAria with ngReadonly will also add +aria-readonly. This tells accessibility APIs when a custom control is read-only.

+

Example

+
<md-checkbox ng-readonly="val"></md-checkbox>
+
+

Becomes:

+
<md-checkbox ng-readonly="val" aria-readonly="true"></md-checkbox>
+
+

ngShow

+ +

The ngShow directive shows or hides the +given HTML element based on the expression provided to the ngShow attribute. The element is +shown or hidden by removing or adding the .ng-hide CSS class onto the element.

+

In its default setup, ngAria for ngShow is actually redundant. It toggles aria-hidden on the +directive when it is hidden or shown. However, the default CSS of display: none !important, +already hides child elements from a screen reader. It becomes more useful when the default +CSS is overridden with properties that don’t affect assistive technologies, such as opacity +or transform. By toggling aria-hidden dynamically with ngAria, we can ensure content visually +hidden with this technique will not be read aloud in a screen reader.

+

One caveat with this combination of CSS and aria-hidden: you must also remove links and other +interactive child elements from the tab order using tabIndex=“-1” on each control. This ensures +screen reader users won't accidentally focus on "mystery elements". Managing tab index on every +child control can be complex and affect performance, so it’s best to just stick with the default +display: none CSS. See the fourth rule of ARIA use.

+

Example

+
.ng-hide {
+  display: block;
+  opacity: 0;
+}
+
+
<div ng-show="false" class="ng-hide" aria-hidden="true"></div>
+
+

Becomes:

+
<div ng-show="true" aria-hidden="false"></div>
+
+

Note: Child links, buttons or other interactive controls must also be removed from the tab order.

+

ngHide

+ +

The ngHide directive shows or hides the +given HTML element based on the expression provided to the ngHide attribute. The element is +shown or hidden by removing or adding the .ng-hide CSS class onto the element.

+

The default CSS for ngHide, the inverse method to ngShow, makes ngAria redundant. It toggles +aria-hidden on the directive when it is hidden or shown, but the content is already hidden with +display: none. See explanation for ngShow when overriding the default CSS.

+

ngClick and ngDblclick

+If ng-click or ng-dblclick is encountered, ngAria will add tabindex="0" to any element not in +a node blacklist: + + Button + Anchor + Input + Textarea + Select + Details/Summary + +To fix widespread accessibility problems with ng-click on div elements, ngAria will +dynamically bind a keypress event by default as long as the element isn't in the node blacklist. +You can turn this functionality on or off with the bindKeypress configuration option. + +ngAria will also add the button role to communicate to users of assistive technologies. This can +be disabled with the bindRoleForClick configuration option. + +For ng-dblclick, you must still manually add ng-keypress and a role to non-interactive elements +such as div or taco-button to enable keyboard access. + +

Example

+html +<div ng-click="toggleMenu()"></div> + +Becomes: +html +<div ng-click="toggleMenu()" tabindex="0"></div> + +

ngMessages

+ +

The ngMessages module makes it easy to display form validation or other messages with priority +sequencing and animation. To expose these visual messages to screen readers, +ngAria injects aria-live="assertive", causing them to be read aloud any time a message is shown, +regardless of the user's focus location.

+

Example

+
<div ng-messages="myForm.myName.$error">
+  <div ng-message="required">You did not enter a field</div>
+  <div ng-message="maxlength">Your field is too long</div>
+</div>
+
+

Becomes:

+
<div ng-messages="myForm.myName.$error" aria-live="assertive">
+  <div ng-message="required">You did not enter a field</div>
+  <div ng-message="maxlength">Your field is too long</div>
+</div>
+
+

Disabling attributes

+

The attribute magic of ngAria may not work for every scenario. To disable individual attributes, +you can use the config method. Just keep in mind this will +tell ngAria to ignore the attribute globally.

+

+ +

+ + +
+ + +
+
 <div ng-click="someFunction" show-attrs>
   &lt;div&gt; with ng-click and bindRoleForClick, tabindex set to false
 </div>
<script>
 angular.module('ngAria_ngClickExample', ['ngAria'], function config($ariaProvider) {
   $ariaProvider.config({
     bindRoleForClick: false,
     tabindex: false
   });
 })
 .directive('showAttrs', function() {
   return function(scope, el, attrs) {
     var pre = document.createElement('pre');
     el.after(pre);
     scope.$watch(function() {
       var attrs = {};
       Array.prototype.slice.call(el[0].attributes, 0).forEach(function(item) {
         if (item.name !== 'show-attrs') {
           attrs[item.name] = item.value;
         }
       });
       return attrs;
     }, function(newAttrs, oldAttrs) {
       pre.textContent = JSON.stringify(newAttrs, null, 2);
     }, true);
   }
 });
</script>
+
+ + + +
+
+ + +

+

Common Accessibility Patterns

+

Accessibility best practices that apply to web apps in general also apply to Angular.

+
    +
  • Text alternatives: Add alternate text content to make visual information accessible using +these W3C guidelines. The appropriate technique +depends on the specific markup but can be accomplished using offscreen spans, aria-label or +label elements, image alt attributes, figure/figcaption elements and more.
  • +
  • HTML Semantics: If you're creating custom element directives, Web Components or HTML in +general, use native elements wherever possible to utilize built-in events and properties. +Alternatively, use ARIA to communicate semantic meaning. See notes on ARIA use.
  • +
  • Focus management: Guide the user around the app as views are appended/removed. +Focus should never be lost, as this causes unexpected behavior and much confusion (referred to +as "freak-out mode").
  • +
  • Announcing changes: When filtering or other UI messaging happens away from the user's focus, +notify with ARIA Live Regions.
  • +
  • Color contrast and scale: Make sure content is legible and interactive controls are usable +at all screen sizes. Consider configurable UI themes for people with color blindness, low vision +or other visual impairments.
  • +
  • Progressive enhancement: Some users do not browse with JavaScript enabled or do not have +the latest browser. An accessible message about site requirements can inform users and improve +the experience.
  • +
+

Additional Resources

+ + + diff --git a/1.6.6/docs/partials/guide/animations.html b/1.6.6/docs/partials/guide/animations.html new file mode 100644 index 000000000..ba458f09e --- /dev/null +++ b/1.6.6/docs/partials/guide/animations.html @@ -0,0 +1,456 @@ + Improve this Doc + + +

Animations

+

AngularJS provides animation hooks for common directives such as +ngRepeat, ngSwitch, and +ngView, as well as custom directives via the $animate service. +These animation hooks are set in place to trigger animations during the life cycle of various +directives and when triggered, will attempt to perform a CSS Transition, CSS Keyframe Animation or a +JavaScript callback Animation (depending on whether an animation is placed on the given directive). +Animations can be placed using vanilla CSS by following the naming conventions set in place by +AngularJS or with JavaScript code, defined as a factory.

+
+ Note that we have used non-prefixed CSS transition properties in our examples as the major + browsers now support non-prefixed properties. If you intend to support older browsers or certain + mobile browsers then you will need to include prefixed versions of the transition properties. Take + a look at http://caniuse.com/#feat=css-transitions for what browsers require prefixes, and + https://github.com/postcss/autoprefixer for a tool that can automatically generate the prefixes + for you. +
+ +

Animations are not available unless you include the ngAnimate module as a +dependency of your application.

+

Below is a quick example of animations being enabled for ngShow and ngHide:

+

+ +

+ + +
+ + +
+
<div ng-init="checked = true">
  <label>
    <input type="checkbox" ng-model="checked" />
    Is visible
  </label>
  <div class="content-area sample-show-hide" ng-show="checked">
    Content...
  </div>
</div>
+
+ +
+
.content-area {
  border: 1px solid black;
  margin-top: 10px;
  padding: 10px;
}

.sample-show-hide {
  transition: all linear 0.5s;
}
.sample-show-hide.ng-hide {
  opacity: 0;
}
+
+ + + +
+
+ + +

+

Installation

+

See the API docs for ngAnimate for instructions on installing the module.

+

You may also want to setup a separate CSS file for defining CSS-based animations.

+

How they work

+

Animations in AngularJS are completely based on CSS classes. As long as you have a CSS class +attached to a HTML element within your application, you can apply animations to it. Lets say for +example that we have an HTML template with a repeater like so:

+
<div ng-repeat="item in items" class="repeated-item">
+  {{ item.id }}
+</div>
+
+

As you can see, the repeated-item class is present on the element that will be repeated and this +class will be used as a reference within our application's CSS and/or JavaScript animation code to +tell AngularJS to perform an animation.

+

As ngRepeat does its thing, each time a new item is added into the list, ngRepeat will add an +ng-enter class to the element that is being added. When removed it will apply an ng-leave class +and when moved around it will apply an ng-move class.

+

Taking a look at the following CSS code, we can see some transition and keyframe animation code set +up for each of those events that occur when ngRepeat triggers them:

+
/*
+  We are using CSS transitions for when the enter and move events
+  are triggered for the element that has the `repeated-item` class
+*/
+.repeated-item.ng-enter, .repeated-item.ng-move {
+  transition: all 0.5s linear;
+  opacity: 0;
+}
+
+/*
+  `.ng-enter-active` and `.ng-move-active` are where the transition destination
+  properties are set so that the animation knows what to animate
+*/
+.repeated-item.ng-enter.ng-enter-active,
+.repeated-item.ng-move.ng-move-active {
+  opacity: 1;
+}
+
+/*
+  We are using CSS keyframe animations for when the `leave` event
+  is triggered for the element that has the `repeated-item` class
+*/
+.repeated-item.ng-leave {
+  animation: 0.5s my_animation;
+}
+
+@keyframes my_animation {
+  from { opacity: 1; }
+  to   { opacity: 0; }
+}
+
+

The same approach to animation can be used using JavaScript code +(for simplicity, we rely on jQuery to perform animations here):

+
myModule.animation('.repeated-item', function() {
+  return {
+    enter: function(element, done) {
+      // Initialize the element's opacity
+      element.css('opacity', 0);
+
+      // Animate the element's opacity
+      // (`element.animate()` is provided by jQuery)
+      element.animate({opacity: 1}, done);
+
+      // Optional `onDone`/`onCancel` callback function
+      // to handle any post-animation cleanup operations
+      return function(isCancelled) {
+        if (isCancelled) {
+          // Abort the animation if cancelled
+          // (`element.stop()` is provided by jQuery)
+          element.stop();
+        }
+      };
+    },
+    leave: function(element, done) {
+      // Initialize the element's opacity
+      element.css('opacity', 1);
+
+      // Animate the element's opacity
+      // (`element.animate()` is provided by jQuery)
+      element.animate({opacity: 0}, done);
+
+      // Optional `onDone`/`onCancel` callback function
+      // to handle any post-animation cleanup operations
+      return function(isCancelled) {
+        if (isCancelled) {
+          // Abort the animation if cancelled
+          // (`element.stop()` is provided by jQuery)
+          element.stop();
+        }
+      };
+    },
+
+    // We can also capture the following animation events:
+    move: function(element, done) {},
+    addClass: function(element, className, done) {},
+    removeClass: function(element, className, done) {}
+  }
+});
+
+

With these generated CSS class names present on the element at the time, AngularJS automatically +figures out whether to perform a CSS and/or JavaScript animation. Note that you can't have both CSS +and JavaScript animations based on the same CSS class. See +here for more details.

+

Class and ngClass animation hooks

+

AngularJS also pays attention to CSS class changes on elements by triggering the add and +remove hooks. This means that if a CSS class is added to or removed from an element then an +animation can be executed in between, before the CSS class addition or removal is finalized. +(Keep in mind that AngularJS will only be able to capture class changes if an +interpolated expression or the ng-class directive is used on the element.)

+

The example below shows how to perform animations during class changes:

+

+ +

+ + +
+ + +
+
<p>
  <button ng-click="myCssVar='css-class'">Set</button>
  <button ng-click="myCssVar=''">Clear</button>
  <br>
  <span ng-class="myCssVar">CSS-Animated Text</span>
</p>
+
+ +
+
.css-class-add, .css-class-remove {
  transition: all 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940);
}

.css-class,
.css-class-add.css-class-add-active {
  color: red;
  font-size: 3em;
}

.css-class-remove.css-class-remove-active {
  font-size: 1em;
  color: black;
}
+
+ + + +
+
+ + +

+

Although the CSS is a little different than what we saw before, the idea is the same.

+

Which directives support animations?

+

A handful of common AngularJS directives support and trigger animation hooks whenever any major +event occurs during their life cycle. The table below explains in detail which animation events are +triggered:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectiveSupported Animations
ngRepeatenter, leave, and move
ngIfenter and leave
ngSwitchenter and leave
ngIncludeenter and leave
ngViewenter and leave
ngMessage / ngMessageExpenter and leave
ngClass / {{class}​}add and remove
ngClassEven / ngClassOddadd and remove
ngHideadd and remove (the ng-hide class)
ngShowadd and remove (the ng-hide class)
ngModeladd and remove (various classes)
form / ngFormadd and remove (various classes)
ngMessagesadd and remove (the ng-active/ng-inactive classes)
+

For a full breakdown of the steps involved during each animation event, refer to the +API docs.

+

How do I use animations in my own directives?

+

Animations within custom directives can also be established by injecting $animate directly into +your directive and making calls to it when needed.

+
myModule.directive('my-directive', ['$animate', function($animate) {
+  return function(scope, element) {
+    element.on('click', function() {
+      if (element.hasClass('clicked')) {
+        $animate.removeClass(element, 'clicked');
+      } else {
+        $animate.addClass(element, 'clicked');
+      }
+    });
+  };
+}]);
+
+

Animations on app bootstrap / page load

+

By default, animations are disabled when the AngularJS app bootstraps. If you +are using the ngApp directive, this happens in the DOMContentLoaded event, so immediately +after the page has been loaded. Animations are disabled, so that UI and content are instantly +visible. Otherwise, with many animations on the page, the loading process may become too visually +overwhelming, and the performance may suffer.

+

Internally, ngAnimate waits until all template downloads that are started right after bootstrap +have finished. Then, it waits for the currently running $digest +and one more after that, to finish. This ensures that the whole app has been compiled fully before +animations are attempted.

+

If you do want your animations to play when the app bootstraps, you can enable animations globally +in your main module's run function:

+
myModule.run(function($animate) {
+  $animate.enabled(true);
+});
+
+

How to (selectively) enable, disable and skip animations

+

There are several different ways to disable animations, both globally and for specific animations. +Disabling specific animations can help to speed up the render performance, for example for large +ngRepeat lists that don't actually have animations. Because ngAnimate checks at runtime if +animations are present, performance will take a hit even if an element has no animation.

+ +

This function can be called during the config phase of an app. It +takes a filter function as the only argument, which will then be used to "filter" animations (based +on the animated element, the event type, and the animation options). Only when the filter function +returns true, will the animation be performed. This allows great flexibility - you can easily +create complex rules, such as allowing specific events only or enabling animations on specific +subtrees of the DOM, and dynamically modify them, for example disabling animations at certain points +in time or under certain circumstances.

+
app.config(function($animateProvider) {
+  $animateProvider.customFilter(function(node, event, options) {
+    // Example: Only animate `enter` and `leave` operations.
+    return event === 'enter' || event === 'leave';
+  });
+});
+
+

The customFilter approach generally gives a big speed boost compared to other strategies, because +the matching is done before other animation disabling strategies are checked.

+
+ Best Practice: + Keep the filtering function as lean as possible, because it will be called for each DOM + action (e.g. insertion, removal, class change) performed by "animation-aware" directives. + See here for a list of built-in + directives that support animations. + Performing computationally expensive or time-consuming operations on each call of the + filtering function can make your animations sluggish. +
+ + +

This function too can be called during the config phase of an app. It +takes a regex as the only argument, which will then be matched against the classes of any element +that is about to be animated. The regex allows a lot of flexibility - you can either allow +animations for specific classes only (useful when you are working with 3rd party animations), or +exclude specific classes from getting animated.

+
app.config(function($animateProvider) {
+  $animateProvider.classNameFilter(/animate-/);
+});
+
+
/* prefixed with `animate-` */
+.animate-fade-add.animate-fade-add-active {
+  transition: all 1s linear;
+  opacity: 0;
+}
+
+

The classNameFilter approach generally gives a big speed boost compared to other strategies, +because the matching is done before other animation disabling strategies are checked. However, that +also means it is not possible to override class name matching with the two following strategies. +It's of course still possible to enable / disable animations by changing an element's class name at +runtime.

+ +

This function can be used to enable / disable animations in two different ways:

+

With a single boolean argument, it enables / disables animations globally: +$animate.enabled(false) disables all animations in your app.

+

When the first argument is a native DOM or jqLite/jQuery element, the function enables / disables +animations on this element and all its children: $animate.enabled(myElement, false). You can +still use it to re-enable animations for a child element, even if you have disabled them on a parent +element. And compared to the classNameFilter, you can change the animation status at runtime +instead of during the config phase.

+

Note however that the $animate.enabled() state for individual elements does not overwrite +disabling rules that have been set in the classNameFilter.

+

Via CSS styles: overwriting styles in the ng-animate CSS class

+

Whenever an animation is started, ngAnimate applies the ng-animate class to the element for the +whole duration of the animation. By applying CSS transition / animation styling to that class, you +can skip an animation:

+
.my-class {
+  transition: transform 2s;
+}
+
+.my-class:hover {
+  transform: translateX(50px);
+}
+
+my-class.ng-animate {
+  transition: 0s;
+}
+
+

By setting transition: 0s, ngAnimate will ignore the existing transition styles, and not try to +animate them (Javascript animations will still execute, though). This can be used to prevent +issues with existing animations interfering with ngAnimate.

+

Preventing flicker before an animation starts

+

When nesting elements with structural animations, such as ngIf, into elements that have +class-based animations such as ngClass, it sometimes happens that before the actual animation +starts, there is a brief flicker or flash of content where the animated element is briefly visible.

+

To prevent this, you can apply styles to the ng-[event]-prepare class, which is added as soon as +an animation is initialized, but removed before the actual animation starts (after waiting for a +$digest). This class is only added for structural animations (enter, move, and leave).

+

Here's an example where you might see flickering:

+
<div ng-class="{red: myProp}">
+  <div ng-class="{blue: myProp}">
+    <div class="message" ng-if="myProp"></div>
+  </div>
+</div>
+
+

It is possible that during the enter event, the .message div will be briefly visible before it +starts animating. In that case, you can add styles to the CSS that make sure the element stays +hidden before the animation starts:

+
.message.ng-enter-prepare {
+  opacity: 0;
+}
+
+/* Other animation styles ... */
+
+

Preventing collisions with existing animations and third-party libraries

+

By default, any ngAnimate-enabled directives will assume that transition / animation styles on +the element are part of an ngAnimate animation. This can lead to problems when the styles are +actually for animations that are independent of ngAnimate.

+

For example, an element acts as a loading spinner. It has an infinite css animation on it, and also +an ngIf directive, for which no animations are defined:

+
.spinner {
+  animation: rotating 2s linear infinite;
+}
+
+@keyframes rotating {
+  from { transform: rotate(0deg); }
+  to { transform: rotate(360deg); }
+}
+
+

Now, when the ngIf expression changes, ngAnimate will see the spinner animation and use it to +animate the enter/leave event, which doesn't work because the animation is infinite. The element +will still be added / removed after a timeout, but there will be a noticeable delay.

+

This might also happen because some third-party frameworks place animation duration defaults across +many element or className selectors in order to make their code small and reusable.

+

You can prevent this unwanted behavior by adding CSS to the .ng-animate class, that is added for +the whole duration of each animation. Simply overwrite the transition / animation duration. In the +case of the spinner, this would be:

+
.spinner.ng-animate {
+  animation: 0s none;
+  transition: 0s none;
+}
+
+

If you do have CSS transitions / animations defined for the animation events, make sure they have a +higher priority than any styles that are not related to ngAnimate.

+

You can also use one of the other +strategies to disable animations.

+ +

Before animating, ngAnimate checks if the animated element is inside the application DOM tree. If +not, no animation is run. Usually, this is not a problem since most apps use the html or body +elements as their root.

+

Problems arise when the application is bootstrapped on a different element, and animations are +attempted on elements that are outside the application tree, e.g. when libraries append popup or +modal elements to the body tag.

+

You can use $animate.pin(element, parentHost) to associate an element with +another element that belongs to your application. Simply call it before the element is added to the +DOM / before the animation starts, with the element you want to animate, and the element which +should be its assumed parent.

+

More about animations

+

For a full breakdown of each method available on $animate, see the +API documentation.

+

To see a complete demo, see the animation step in the phonecat tutorial.

+ + diff --git a/1.6.6/docs/partials/guide/bootstrap.html b/1.6.6/docs/partials/guide/bootstrap.html new file mode 100644 index 000000000..e3de95b13 --- /dev/null +++ b/1.6.6/docs/partials/guide/bootstrap.html @@ -0,0 +1,143 @@ + Improve this Doc + + +

Bootstrap

+

This page explains the Angular initialization process and how you can manually initialize Angular +if necessary.

+

Angular <script> Tag

+

This example shows the recommended path for integrating Angular with what we call automatic +initialization.

+
<!doctype html>
+<html xmlns:ng="http://angularjs.org" ng-app>
+  <body>
+    ...
+    <script src="angular.js"></script>
+  </body>
+</html>
+
+
    +
  1. Place the script tag at the bottom of the page. Placing script tags at the end of the page +improves app load time because the HTML loading is not blocked by loading of the angular.js +script. You can get the latest bits from http://code.angularjs.org. Please don't link +your production code to this URL, as it will expose a security hole on your site. For +experimental development linking to our site is fine.
      +
    • Choose: angular-[version].js for a human-readable file, suitable for development and +debugging.
    • +
    • Choose: angular-[version].min.js for a compressed and obfuscated file, suitable for use in +production.
    • +
    +
  2. +
  3. Place ng-app to the root of your application, typically on the <html> tag if you want +angular to auto-bootstrap your application.

    + +
  4. +
  5. If you choose to use the old style directive syntax ng: then include xml-namespace in html +when running the page in the XHTML mode. (This is here for historical reasons, and we no longer +recommend use of ng:.)

    + + + + +
  6. +
+

Automatic Initialization

+

+

Angular initializes automatically upon DOMContentLoaded event or when the angular.js script is +evaluated if at that time document.readyState is set to 'complete'. At this point Angular looks +for the ngApp directive which designates your application root. +If the ngApp directive is found then Angular will:

+
    +
  • load the module associated with the directive.
  • +
  • create the application injector
  • +
  • compile the DOM treating the ngApp directive as the root of the compilation. This allows you to tell it to treat only a +portion of the DOM as an Angular application.
  • +
+
<!doctype html>
+<html ng-app="optionalModuleName">
+  <body>
+    I can add: {{ 1+2 }}.
+    <script src="angular.js"></script>
+  </body>
+</html>
+
+

As a best practice, consider adding an ng-strict-di directive on the same element as +ng-app:

+
<!doctype html>
+<html ng-app="optionalModuleName" ng-strict-di>
+  <body>
+    I can add: {{ 1+2 }}.
+    <script src="angular.js"></script>
+  </body>
+</html>
+
+

This will ensure that all services in your application are properly annotated. +See the dependency injection strict mode docs +for more.

+

Manual Initialization

+

If you need to have more control over the initialization process, you can use a manual +bootstrapping method instead. Examples of when you'd need to do this include using script loaders +or the need to perform an operation before Angular compiles a page.

+

Here is an example of manually initializing Angular:

+
<!doctype html>
+<html>
+<body>
+  <div ng-controller="MyController">
+    Hello {{greetMe}}!
+  </div>
+  <script src="http://code.angularjs.org/snapshot/angular.js"></script>
+
+  <script>
+    angular.module('myApp', [])
+      .controller('MyController', ['$scope', function ($scope) {
+        $scope.greetMe = 'World';
+      }]);
+
+    angular.element(function() {
+      angular.bootstrap(document, ['myApp']);
+    });
+  </script>
+</body>
+</html>
+
+

Note that we provided the name of our application module to be loaded into the injector as the second +parameter of the angular.bootstrap function. Notice that angular.bootstrap will not create modules +on the fly. You must create any custom modules before you pass them as a parameter.

+

You should call angular.bootstrap() after you've loaded or defined your modules. +You cannot add controllers, services, directives, etc after an application bootstraps.

+
+Note: You should not use the ng-app directive when manually bootstrapping your app. +
+ +

This is the sequence that your code should follow:

+
    +
  1. After the page and all of the code is loaded, find the root element of your AngularJS +application, which is typically the root of the document.

    +
  2. +
  3. Call angular.bootstrap to compile the element into an +executable, bi-directionally bound application.

    +
  4. +
+

Things to keep in mind

+

There a few things to keep in mind regardless of automatic or manual bootstrapping:

+
    +
  • While it's possible to bootstrap more than one AngularJS application per page, we don't actively +test against this scenario. It's possible that you'll run into problems, especially with complex apps, so +caution is advised.
  • +
  • Do not bootstrap your app on an element with a directive that uses transclusion, such as +ngIf, ngInclude and ngView. +Doing this misplaces the app $rootElement and the app's injector, +causing animations to stop working and making the injector inaccessible from outside the app.
  • +
+

Deferred Bootstrap

+

This feature enables tools like Batarang and test runners +to hook into angular's bootstrap process and sneak in more modules +into the DI registry which can replace or augment DI services for +the purpose of instrumentation or mocking out heavy dependencies.

+

If window.name contains prefix NG_DEFER_BOOTSTRAP! when +angular.bootstrap is called, the bootstrap process will be paused +until angular.resumeBootstrap() is called.

+

angular.resumeBootstrap() takes an optional array of modules that +should be added to the original list of modules that the app was +about to be bootstrapped with.

+ + diff --git a/1.6.6/docs/partials/guide/compiler.html b/1.6.6/docs/partials/guide/compiler.html new file mode 100644 index 000000000..dd627a88e --- /dev/null +++ b/1.6.6/docs/partials/guide/compiler.html @@ -0,0 +1,380 @@ + Improve this Doc + + +

HTML Compiler

+
+Note: this guide is targeted towards developers who are already familiar with AngularJS basics. + +If you're just getting started, we recommend the tutorial first. +If you just want to create custom directives, we recommend the directives guide. +If you want a deeper look into Angular's compilation process, you're in the right place. +
+ + +

Overview

+

Angular's HTML compiler allows the developer to teach the +browser new HTML syntax. The compiler allows you to attach behavior to any HTML element or attribute +and even create new HTML elements or attributes with custom behavior. Angular calls these behavior +extensions directives.

+

HTML has a lot of constructs for formatting the HTML for static documents in a declarative fashion. +For example if something needs to be centered, there is no need to provide instructions to the +browser how the window size needs to be divided in half so that the center is found, and that this +center needs to be aligned with the text's center. Simply add an align="center" attribute to any +element to achieve the desired behavior. Such is the power of declarative language.

+

However, the declarative language is also limited, as it does not allow you to teach the browser new +syntax. For example, there is no easy way to get the browser to align the text at 1/3 the position +instead of 1/2. What is needed is a way to teach the browser new HTML syntax.

+

Angular comes pre-bundled with common directives which are useful for building any app. We also +expect that you will create directives that are specific to your app. These extensions become a +Domain Specific Language for building your application.

+

All of this compilation takes place in the web browser; no server side or pre-compilation step is +involved.

+

Compiler

+

Compiler is an Angular service which traverses the DOM looking for attributes. The compilation +process happens in two phases.

+
    +
  1. Compile: traverse the DOM and collect all of the directives. The result is a linking +function.

    +
  2. +
  3. Link: combine the directives with a scope and produce a live view. Any changes in the +scope model are reflected in the view, and any user interactions with the view are reflected +in the scope model. This makes the scope model the single source of truth.

    +
  4. +
+

Some directives such as ng-repeat clone DOM elements once +for each item in a collection. Having a compile and link phase improves performance since the +cloned template only needs to be compiled once, and then linked once for each clone instance.

+

Directive

+

A directive is a behavior which should be triggered when specific HTML constructs are encountered +during the compilation process. The directives can be placed in element names, attributes, class +names, as well as comments. Here are some equivalent examples of invoking the ng-bind directive.

+
<span ng-bind="exp"></span>
+<span class="ng-bind: exp;"></span>
+<ng-bind></ng-bind>
+<!-- directive: ng-bind exp -->
+
+

A directive is just a function which executes when the compiler encounters it in the DOM. See directive API for in-depth documentation on how +to write directives.

+

Here is a directive which makes any element draggable. Notice the draggable attribute on the +<span> element.

+

+ +

+ + +
+ + +
+
angular.module('drag', []).
directive('draggable', function($document) {
  return function(scope, element, attr) {
    var startX = 0, startY = 0, x = 0, y = 0;
    element.css({
     position: 'relative',
     border: '1px solid red',
     backgroundColor: 'lightgrey',
     cursor: 'pointer',
     display: 'block',
     width: '65px'
    });
    element.on('mousedown', function(event) {
      // Prevent default dragging of selected content
      event.preventDefault();
      startX = event.screenX - x;
      startY = event.screenY - y;
      $document.on('mousemove', mousemove);
      $document.on('mouseup', mouseup);
    });

    function mousemove(event) {
      y = event.screenY - startY;
      x = event.screenX - startX;
      element.css({
        top: y + 'px',
        left:  x + 'px'
      });
    }

    function mouseup() {
      $document.off('mousemove', mousemove);
      $document.off('mouseup', mouseup);
    }
  };
});
+
+ +
+
<span draggable>Drag ME</span>
+
+ + + +
+
+ + +

+

The presence of the draggable attribute on any element gives the element new behavior. +We extended the vocabulary of the browser in a way which is natural to anyone who is familiar with the principles of HTML.

+

Understanding View

+

Most other templating systems consume a static string template and +combine it with data, resulting in a new string. The resulting text is then innerHTMLed into +an element.

+

+

This means that any changes to the data need to be re-merged with the template and then +innerHTMLed into the DOM. Some of the issues with this approach are:

+
    +
  1. reading user input and merging it with data
  2. +
  3. clobbering user input by overwriting it
  4. +
  5. managing the whole update process
  6. +
  7. lack of behavior expressiveness
  8. +
+

Angular is different. The Angular compiler consumes the DOM, not string templates. +The result is a linking function, which when combined with a scope model results in a live view. The +view and scope model bindings are transparent. The developer does not need to make any special calls to update +the view. And because innerHTML is not used, you won't accidentally clobber user input. +Furthermore, Angular directives can contain not just text bindings, but behavioral constructs as +well.

+

+

The Angular approach produces a stable DOM. The DOM element instance bound to a model +item instance does not change for the lifetime of the binding. This means that the code can get +hold of the elements and register event handlers and know that the reference will not be destroyed +by template data merge.

+

How directives are compiled

+

It's important to note that Angular operates on DOM nodes rather than strings. Usually, you don't +notice this restriction because when a page loads, the web browser parses HTML into the DOM automatically.

+

HTML compilation happens in three phases:

+
    +
  1. $compile traverses the DOM and matches directives.

    +

    If the compiler finds that an element matches a directive, then the directive is added to the list of +directives that match the DOM element. A single element may match multiple directives.

    +
  2. +
  3. Once all directives matching a DOM element have been identified, the compiler sorts the directives +by their priority.

    +

    Each directive's compile functions are executed. Each compile function has a chance to +modify the DOM. Each compile function returns a link function. These functions are composed into +a "combined" link function, which invokes each directive's returned link function.

    +
  4. +
  5. $compile links the template with the scope by calling the combined linking function from the previous step. +This in turn will call the linking function of the individual directives, registering listeners on the elements +and setting up $watchs with the scope +as each directive is configured to do.

    +
  6. +
+

The result of this is a live binding between the scope and the DOM. So at this point, a change in +a model on the compiled scope will be reflected in the DOM.

+

Below is the corresponding code using the $compile service. +This should help give you an idea of what Angular does internally.

+
var $compile = ...; // injected into your code
+var scope = ...;
+var parent = ...; // DOM element where the compiled template can be appended
+
+var html = '<div ng-bind="exp"></div>';
+
+// Step 1: parse HTML into DOM element
+var template = angular.element(html);
+
+// Step 2: compile the template
+var linkFn = $compile(template);
+
+// Step 3: link the compiled template with the scope.
+var element = linkFn(scope);
+
+// Step 4: Append to DOM (optional)
+parent.appendChild(element);
+
+ +

At this point you may wonder why the compile process has separate compile and link phases. The +short answer is that compile and link separation is needed any time a change in a model causes +a change in the structure of the DOM.

+

It's rare for directives to have a compile function, since most directives are concerned with +working with a specific DOM element instance rather than changing its overall structure.

+

Directives often have a link function. A link function allows the directive to register +listeners to the specific cloned DOM element instance as well as to copy content into the DOM +from the scope.

+
+Best Practice: Any operation which can be shared among the instance of directives should be +moved to the compile function for performance reasons. +
+ + +

To understand, let's look at a real-world example with ngRepeat:

+
Hello {{user.name}}, you have these actions:
+<ul>
+  <li ng-repeat="action in user.actions">
+    {{action.description}}
+  </li>
+</ul>
+
+

When the above example is compiled, the compiler visits every node and looks for directives.

+

{{user.name}} matches the interpolation directive +and ng-repeat matches the ngRepeat directive.

+

But ngRepeat has a dilemma.

+

It needs to be able to clone new <li> elements for every action in user.actions. +This initially seems trivial, but it becomes more complicated when you consider that user.actions +might have items added to it later. This means that it needs to save a clean copy of the <li> +element for cloning purposes.

+

As new actions are inserted, the template <li> element needs to be cloned and inserted into ul. +But cloning the <li> element is not enough. It also needs to compile the <li> so that its +directives, like {{action.description}}, evaluate against the right scope.

+

A naive approach to solving this problem would be to simply insert a copy of the <li> element and +then compile it. +The problem with this approach is that compiling on every <li> element that we clone would duplicate +a lot of the work. Specifically, we'd be traversing <li> each time before cloning it to find the +directives. This would cause the compilation process to be slower, in turn making applications +less responsive when inserting new nodes.

+

The solution is to break the compilation process into two phases:

+

the compile phase where all of the directives are identified and sorted by priority, +and a linking phase where any work which "links" a specific instance of the +scope and the specific instance of an <li> is performed.

+
+Note: Link means setting up listeners on the DOM and setting up $watch on the Scope to +keep the two in sync. +
+ +

ngRepeat works by preventing the compilation process from +descending into the <li> element so it can make a clone of the original and handle inserting +and removing DOM nodes itself.

+

Instead the ngRepeat directive compiles <li> separately. +The result of the <li> element compilation is a linking function which contains all of the +directives contained in the <li> element, ready to be attached to a specific clone of the <li> +element.

+

At runtime the ngRepeat watches the expression and as items +are added to the array it clones the <li> element, creates a new +scope for the cloned <li> element and calls the link function +on the cloned <li>.

+

Understanding How Scopes Work with Transcluded Directives

+

One of the most common use cases for directives is to create reusable components.

+

Below is a pseudo code showing how a simplified dialog component may work.

+
<div>
+  <button ng-click="show=true">show</button>
+
+  <dialog title="Hello {{username}}."
+          visible="show"
+          on-cancel="show = false"
+          on-ok="show = false; doSomething()">
+     Body goes here: {{username}} is {{title}}.
+  </dialog>
+</div>
+
+

Clicking on the "show" button will open the dialog. The dialog will have a title, which is +data bound to username, and it will also have a body which we would like to transclude +into the dialog.

+

Here is an example of what the template definition for the dialog widget may look like.

+
<div ng-show="visible">
+  <h3>{{title}}</h3>
+  <div class="body" ng-transclude></div>
+  <div class="footer">
+    <button ng-click="onOk()">Save changes</button>
+    <button ng-click="onCancel()">Close</button>
+  </div>
+</div>
+
+

This will not render properly, unless we do some scope magic.

+

The first issue we have to solve is that the dialog box template expects title to be defined. +But we would like the template's scope property title to be the result of interpolating the +<dialog> element's title attribute (i.e. "Hello {{username}}"). Furthermore, the buttons expect +the onOk and onCancel functions to be present in the scope. This limits the usefulness of the +widget. To solve the mapping issue we use the scope to create local variables which the template +expects as follows:

+
scope: {
+  title: '@',             // the title uses the data-binding from the parent scope
+  onOk: '&',              // create a delegate onOk function
+  onCancel: '&',          // create a delegate onCancel function
+  visible: '='            // set up visible to accept data-binding
+}
+
+

Creating local properties on widget scope creates two problems:

+
    +
  1. isolation - if the user forgets to set title attribute of the dialog widget the dialog +template will bind to parent scope property. This is unpredictable and undesirable.

    +
  2. +
  3. transclusion - the transcluded DOM can see the widget locals, which may overwrite the +properties which the transclusion needs for data-binding. In our example the title +property of the widget clobbers the title property of the transclusion.

    +
  4. +
+

To solve the issue of lack of isolation, the directive declares a new isolated scope. An +isolated scope does not prototypically inherit from the parent scope, and therefore we don't have +to worry about accidentally clobbering any properties.

+

However isolated scope creates a new problem: if a transcluded DOM is a child of the widget +isolated scope then it will not be able to bind to anything. For this reason the transcluded scope +is a child of the original scope, before the widget created an isolated scope for its local +variables. This makes the transcluded and widget isolated scope siblings.

+

This may seem to be unexpected complexity, but it gives the widget user and developer the least +surprise.

+

Therefore the final directive definition looks something like this:

+
transclude: true,
+scope: {
+    title: '@',             // the title uses the data-binding from the parent scope
+    onOk: '&',              // create a delegate onOk function
+    onCancel: '&',          // create a delegate onCancel function
+    visible: '='            // set up visible to accept data-binding
+},
+restrict: 'E',
+replace: true
+
+

Double Compilation, and how to avoid it

+

Double compilation occurs when an already compiled part of the DOM gets compiled again. This is an +undesired effect and can lead to misbehaving directives, performance issues, and memory +leaks. +A common scenario where this happens is a directive that calls $compile in a directive link +function on the directive element. In the following faulty example, a directive adds a mouseover behavior +to a button with ngClick on it:

+
angular.module('app').directive('addMouseover', function($compile) {
+  return {
+    link: function(scope, element, attrs) {
+      var newEl = angular.element('<span ng-show="showHint"> My Hint</span>');
+      element.on('mouseenter mouseleave', function() {
+        scope.$apply('showHint = !showHint');
+      });
+
+      attrs.$set('addMouseover', null); // To stop infinite compile loop
+      element.append(newEl);
+      $compile(element)(scope); // Double compilation
+    }
+  }
+})
+
+

At first glance, it looks like removing the original addMouseover attribute is all there is needed +to make this example work. +However, if the directive element or its children have other directives attached, they will be compiled and +linked again, because the compiler doesn't keep track of which directives have been assigned to which +elements.

+

This can cause unpredictable behavior, e.g. ngClick or other event handlers will be attached +again. It can also degrade performance, as watchers for text interpolation are added twice to the scope.

+

Double compilation should therefore be avoided. In the above example, only the new element should +be compiled:

+
angular.module('app').directive('addMouseover', function($compile) {
+  return {
+    link: function(scope, element, attrs) {
+      var newEl = angular.element('<span ng-show="showHint"> My Hint</span>');
+      element.on('mouseenter mouseleave', function() {
+        scope.$apply('showHint = !showHint');
+      });
+
+      element.append(newEl);
+      $compile(newEl)(scope); // Only compile the new element
+    }
+  }
+})
+
+

Another scenario is adding a directive programmatically to a compiled element and then executing +compile again. See the following faulty example:

+
<input ng-model="$ctrl.value" add-options>
+
+
angular.module('app').directive('addOptions', function($compile) {
+  return {
+    link: function(scope, element, attrs) {
+      attrs.$set('addOptions', null) // To stop infinite compile loop
+      attrs.$set('ngModelOptions', '{debounce: 1000}');
+      $compile(element)(scope); // Double compilation
+    }
+  }
+});
+
+

In that case, it is necessary to intercept the initial compilation of the element:

+
    +
  1. Give your directive the terminal property and a higher priority than directives +that should not be compiled twice. In the example, the compiler will only compile directives +which have a priority of 100 or higher.
  2. +
  3. Inside this directive's compile function, add any other directive attributes to the template.
  4. +
  5. Compile the element, but restrict the maximum priority, so that any already compiled directives +(including the addOptions directive) are not compiled again.
  6. +
  7. In the link function, link the compiled element with the element's scope.
  8. +
+
angular.module('app').directive('addOptions', function($compile) {
+  return {
+    priority: 100, // ngModel has priority 1
+    terminal: true,
+    compile: function(templateElement, templateAttributes) {
+      templateAttributes.$set('ngModelOptions', '{debounce: 1000}');
+
+      // The third argument is the max priority. Only directives with priority < 100 will be compiled,
+      // therefore we don't need to remove the attribute
+      var compiled = $compile(templateElement, null, 100);
+
+      return function linkFn(scope) {
+        compiled(scope) // Link compiled element to scope
+      }
+    }
+  }
+});
+
+ + diff --git a/1.6.6/docs/partials/guide/component-router.html b/1.6.6/docs/partials/guide/component-router.html new file mode 100644 index 000000000..4b89c17f5 --- /dev/null +++ b/1.6.6/docs/partials/guide/component-router.html @@ -0,0 +1,619 @@ + Improve this Doc + + +

Component Router

+
+Deprecation Notice: In an effort to keep synchronized with router changes in the new Angular, this implementation of the Component Router (ngComponentRouter module) has been deprecated and will not receive further updates. +We are investigating backporting the new Angular Router to AngularJS, but alternatively, use the ngRoute module or community developed projects (e.g. ui-router). +
+ +

This guide describes the new Component Router for AngularJS 1.5.

+
+ If you are looking for information about the default router for AngularJS have a look at the ngRoute module. + + If you are looking for information about the Component Router for the new Angular then + check out the Angular Router Guide. +
+ +

Overview

+

Here is a table of the main concepts used in the Component Router.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ConceptDescription
RouterDisplays the Routing Components for the active Route. Manages navigation from one component to the next.
RootRouterThe top level Router that interacts with the current URL location
RouteConfigConfigures a Router with RouteDefinitions, each mapping a URL path to a component.
Routing ComponentAn Angular component with a RouteConfig and an associated Router.
RouteDefinitionDefines how the router should navigate to a component based on a URL pattern.
ngOutletThe directive (<ng-outlet>) that marks where the router should display a view.
ngLinkThe directive (ng-link="...") for binding a clickable HTML element to a route, via a Link Parameters Array.
Link Parameters ArrayAn array that the router interprets into a routing instruction. We can bind a RouterLink to that array or pass the array as an argument to the Router.navigate method.
+

Component-based Applications

+

It is recommended to develop AngularJS applications as a hierarchy of Components. Each Component +is an isolated part of the application, which is responsible for its own user interface and has +a well defined programmatic interface to the Component that contains it. Take a look at the +component guide for more information.

+

Component Based Architecture

+

URLs and Navigation

+

In most applications, users navigate from one view to the next as they perform application tasks. +The browser provides a familiar model of application navigation. We enter a URL in the address bar +or click on a link and the browser navigates to a new page. We click the browser's back and forward +buttons and the browser navigates backward and forward through the history of pages we've seen.

+

We understand that each view corresponds to a particular URL. In a Component-based application, +each of these views is implemented by one or more Components.

+

Component Routes

+

How do we choose which Components to display given a particular URL?

+

When using the Component Router, each Component in the application can have a Router associated +with it. This Router contains a mapping of URL segments to child Components.

+
$routeConfig: [
+  { path: '/a/b/c', component: 'someComponent' }, ...
+]
+
+

This means that for a given URL the Router will render an associated child Component.

+

Outlets

+

How do we know where to render a child Component?

+

Each Routing Component, needs to have a template that contains one or more Outlets, which is +where its child Components are rendered. We specify the Outlet in the template using the +<ng-outlet> directive.

+
<ng-outlet></ng-outlet>
+
+

In the future ng-outlet will be able to render different child Components for a given Route +by specifying a name attribute.

+

Root Router and Component

+

How does the Component Router know which Component to render first?

+

All Component Router applications must contain a top level Routing Component, which is associated with +a top level Root Router.

+

The Root Router is the starting point for all navigation. You can access this Router by injecting the +$rootRouter service.

+

We define the top level Root Component by providing a value for the $routerRootComponent service.

+
myModule.value('$routerRootComponent', 'myApp');
+
+

Here we have specified that the Root Component is the component directive with the name myApp.

+

Remember to instantiate this Root Component in our index.html file.

+
<my-app></my-app>
+
+

Route Matching

+

When we navigate to any given URL, the $rootRouter matches its Route Config against the URL. +If a Route Definition in the Route Config recognizes a part of the URL then the Component +associated with the Route Definition is instantiated and rendered in the Outlet.

+

If the new Component contains routes of its own then a new Router (ChildRouter) is created for +this Routing Component.

+

The ChildRouter for the new Routing Component then attempts to match its Route Config against +the parts of the URL that have not already been matched by the previous Router.

+

This process continues until we run out of Routing Components or consume the entire URL.

+

Routed Components

+

In the previous diagram, we can see that the URL /heros/4 has been matched against the App, Heroes and +HeroDetail Routing Components. The Routers for each of the Routing Components consumed a part +of the URL: "/", "/heroes" and "/4" respectively.

+

The result is that we end up with a hierarchy of Routing Components rendered in Outlets, via the +ngOutlet directive, in each Routing Component's template, as you can see in the following diagram.

+

Component Hierarchy

+

Example Heroes App

+

You can see the complete application running below.

+

+ +

+ + +
+ + +
+
<h1 class="title">Component Router</h1>
<app></app>

<!-- Load up the router library - normally you might use npm/yarn and host it locally -->
<script src="https://unpkg.com/@angular/router@0.2.0/angular1/angular_1_router.js"></script>
+
+ +
+
angular.module('app', ['ngComponentRouter', 'heroes', 'crisis-center'])

.config(function($locationProvider) {
  $locationProvider.html5Mode(true);
})

.value('$routerRootComponent', 'app')

.component('app', {
  template:
    '<nav>\n' +
    '  <a ng-link="[\'CrisisCenter\']">Crisis Center</a>\n' +
    '  <a ng-link="[\'Heroes\']">Heroes</a>\n' +
    '</nav>\n' +
    '<ng-outlet></ng-outlet>\n',
  $routeConfig: [
    {path: '/crisis-center/...', name: 'CrisisCenter', component: 'crisisCenter', useAsDefault: true},
    {path: '/heroes/...', name: 'Heroes', component: 'heroes' }
  ]
});
+
+ +
+
angular.module('heroes', [])
  .service('heroService', HeroService)

  .component('heroes', {
    template: '<h2>Heroes</h2><ng-outlet></ng-outlet>',
    $routeConfig: [
      {path: '/',    name: 'HeroList',   component: 'heroList', useAsDefault: true},
      {path: '/:id', name: 'HeroDetail', component: 'heroDetail'}
    ]
  })

  .component('heroList', {
    template:
      '<div ng-repeat="hero in $ctrl.heroes" ' +
      '     ng-class="{ selected: $ctrl.isSelected(hero) }">\n' +
        '<a ng-link="[\'HeroDetail\', {id: hero.id}]">{{hero.name}}</a>\n' +
      '</div>',
    controller: HeroListComponent
  })

  .component('heroDetail', {
    template:
      '<div ng-if="$ctrl.hero">\n' +
      '  <h3>"{{$ctrl.hero.name}}"</h3>\n' +
      '  <div>\n' +
      '    <label>Id: </label>{{$ctrl.hero.id}}</div>\n' +
      '  <div>\n' +
      '    <label>Name: </label>\n' +
      '    <input ng-model="$ctrl.hero.name" placeholder="name"/>\n' +
      '  </div>\n' +
      '  <button ng-click="$ctrl.gotoHeroes()">Back</button>\n' +
      '</div>\n',
    bindings: { $router: '<' },
    controller: HeroDetailComponent
  });


function HeroService($q) {
  var heroesPromise = $q.resolve([
    { id: 11, name: 'Mr. Nice' },
    { id: 12, name: 'Narco' },
    { id: 13, name: 'Bombasto' },
    { id: 14, name: 'Celeritas' },
    { id: 15, name: 'Magneta' },
    { id: 16, name: 'RubberMan' }
  ]);

  this.getHeroes = function() {
    return heroesPromise;
  };

  this.getHero = function(id) {
    return heroesPromise.then(function(heroes) {
      for (var i = 0; i < heroes.length; i++) {
        if (heroes[i].id === id) return heroes[i];
      }
    });
  };
}

function HeroListComponent(heroService) {
  var selectedId = null;
  var $ctrl = this;

  this.$routerOnActivate = function(next) {
    // Load up the heroes for this view
    heroService.getHeroes().then(function(heroes) {
      $ctrl.heroes = heroes;
      selectedId = next.params.id;
    });
  };

  this.isSelected = function(hero) {
    return (hero.id === selectedId);
  };
}

function HeroDetailComponent(heroService) {
  var $ctrl = this;

  this.$routerOnActivate = function(next) {
    // Get the hero identified by the route parameter
    var id = next.params.id;
    heroService.getHero(id).then(function(hero) {
      $ctrl.hero = hero;
    });
  };

  this.gotoHeroes = function() {
    var heroId = this.hero && this.hero.id;
    this.$router.navigate(['HeroList', {id: heroId}]);
  };
}
+
+ +
+
angular.module('crisis-center', ['dialog'])
  .service('crisisService', CrisisService)

  .component('crisisCenter', {
    template: '<h2>Crisis Center</h2><ng-outlet></ng-outlet>',
    $routeConfig: [
      {path:'/',    name: 'CrisisList',   component: 'crisisList', useAsDefault: true},
      {path:'/:id', name: 'CrisisDetail', component: 'crisisDetail'}
    ]
  })

  .component('crisisList', {
    template:
      '<ul>\n' +
      '  <li ng-repeat="crisis in $ctrl.crises"\n' +
      '    ng-class="{ selected: $ctrl.isSelected(crisis) }"\n' +
      '    ng-click="$ctrl.onSelect(crisis)">\n' +
      '    <span class="badge">{{crisis.id}}</span> {{crisis.name}}\n' +
      '  </li>\n' +
      '</ul>\n',
    bindings: { $router: '<' },
    controller: CrisisListComponent,
    $canActivate: function($nextInstruction, $prevInstruction) {
      console.log('$canActivate', arguments);
    }
  })

  .component('crisisDetail', {
    templateUrl: 'crisisDetail.html',
    bindings: { $router: '<' },
    controller: CrisisDetailComponent
  });


function CrisisService($q) {
  var crisesPromise = $q.resolve([
    {id: 1, name: 'Princess Held Captive'},
    {id: 2, name: 'Dragon Burning Cities'},
    {id: 3, name: 'Giant Asteroid Heading For Earth'},
    {id: 4, name: 'Release Deadline Looms'}
  ]);

  this.getCrises = function() {
    return crisesPromise;
  };

  this.getCrisis = function(id) {
    return crisesPromise.then(function(crises) {
      for (var i = 0; i < crises.length; i++) {
        if (crises[i].id === id) return crises[i];
      }
    });
  };
}

function CrisisListComponent(crisisService) {
  var selectedId = null;
  var ctrl = this;

  this.$routerOnActivate = function(next) {
    console.log('$routerOnActivate', this, arguments);
    // Load up the crises for this view
    crisisService.getCrises().then(function(crises) {
      ctrl.crises = crises;
      selectedId = next.params.id;
    });
  };

  this.isSelected = function(crisis) {
    return (crisis.id === selectedId);
  };

  this.onSelect = function(crisis) {
    this.$router.navigate(['CrisisDetail', { id: crisis.id }]);
  };
}

function CrisisDetailComponent(crisisService, dialogService) {
  var ctrl = this;
  this.$routerOnActivate = function(next) {
    // Get the crisis identified by the route parameter
    var id = next.params.id;
    crisisService.getCrisis(id).then(function(crisis) {
      if (crisis) {
        ctrl.editName = crisis.name;
        ctrl.crisis = crisis;
      } else { // id not found
        ctrl.gotoCrises();
      }
    });
  };

  this.$routerCanDeactivate = function() {
    // Allow synchronous navigation (`true`) if no crisis or the crisis is unchanged.
    if (!this.crisis || this.crisis.name === this.editName) {
      return true;
    }
    // Otherwise ask the user with the dialog service and return its
    // promise which resolves to true or false when the user decides
    return dialogService.confirm('Discard changes?');
  };

  this.cancel = function() {
    ctrl.editName = ctrl.crisis.name;
    ctrl.gotoCrises();
  };

  this.save = function() {
    ctrl.crisis.name = ctrl.editName;
    ctrl.gotoCrises();
  };

  this.gotoCrises = function() {
    var crisisId = ctrl.crisis && ctrl.crisis.id;
    // Pass along the hero id if available
    // so that the CrisisListComponent can select that hero.
    this.$router.navigate(['CrisisList', {id: crisisId}]);
  };
}
+
+ +
+
<div ng-if="$ctrl.crisis">
  <h3>"{{$ctrl.editName}}"</h3>
  <div>
    <label>Id: </label>{{$ctrl.crisis.id}}</div>
  <div>
    <label>Name: </label>
    <input ng-model="$ctrl.editName" placeholder="name"/>
  </div>
  <button ng-click="$ctrl.save()">Save</button>
  <button ng-click="$ctrl.cancel()">Cancel</button>
</div>
+
+ +
+
angular.module('dialog', [])

.service('dialogService', DialogService);

function DialogService($q) {
  this.confirm = function(message) {
    return $q.resolve(window.confirm(message || 'Is it OK?'));
  };
}
+
+ +
+
h1 {color: #369; font-family: Arial, Helvetica, sans-serif; font-size: 250%;}
h2 { color: #369; font-family: Arial, Helvetica, sans-serif;  }
h3 { color: #444; font-weight: lighter; }
body { margin: 2em; }
body, input[text], button { color: #888; font-family: Cambria, Georgia; }
button {padding: 0.2em; font-size: 14px}

ul {list-style-type: none; margin-left: 1em; padding: 0; width: 20em;}

li { cursor: pointer; position: relative; left: 0; transition: all 0.2s ease; }
li:hover {color: #369; background-color: #EEE; left: .2em;}

/* route-link anchor tags */
a {padding: 5px; text-decoration: none; font-family: Arial, Helvetica, sans-serif; }
a:visited, a:link {color: #444;}
a:hover {color: white; background-color: #1171a3; }
a.router-link-active {color: white; background-color: #52b9e9; }

.selected { background-color: #EEE; color: #369; }

.badge {
  font-size: small;
  color: white;
  padding: 0.1em 0.7em;
  background-color: #369;
  line-height: 1em;
  position: relative;
  left: -1px;
  top: -1px;
}

crisis-detail input {
  width: 20em;
}
+
+ + + +
+
+ + +

+

Getting Started

+

In the following sections we will step through building this application. The finished application has views +to display list and detail views of Heroes and Crises.

+

Install the libraries

+

It is easier to use Yarn or npm to install the +Component Router module. For this guide we will also install AngularJS itself via Yarn:

+
yarn init
+yarn add angular@1.5.x @angular/router@0.2.0
+
+

Load the scripts

+

Just like any Angular application, we load the JavaScript files into our index.html:

+
<script src="/node_modules/angular/angular.js"></script>
+<script src="/node_modules/@angular/router/angular1/angular_1_router.js"></script>
+<script src="/app/app.js"></script>
+
+

You also need to include ES6 shims for browsers that do not support ES6 code (Internet Explorer, + iOs < 8, Android < 5.0, Windows Mobile < 10):

+
<!-- IE required polyfills, in this exact order -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.33.3/es6-shim.min.js"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.20/system-polyfills.js"></script>
+<script src="https://unpkg.com/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
+
+

Create the app module

+

In the app.js file, create the main application module app which depends on the ngComponentRouter +module, which is provided by the Component Router script.

+
angular.module('app', ['ngComponentRouter'])
+
+

We must choose what Location Mode the Router should use. We are going to use HTML5 mode locations, +so that we will not have hash-based paths. We must rely on the browser to provide pushState support, +which is true for most modern browsers. See $locationProvider for more information.

+
+ Using HTML5 mode means that we can have clean URLs for our application routes. However, HTML5 mode does require that our + web server, which hosts the application, understands that it must respond with the index.html file for + requests to URLs that represent all our application routes. We are going to use the lite-server web server + to do this for us. +
+ +
.config(function($locationProvider) {
+  $locationProvider.html5Mode(true);
+})
+
+

Configure the top level routed App Component.

+
.value('$routerRootComponent', 'app')
+
+

Create a very simple App Component to test that the application is working.

+

We are using the Angular 1.5 .component() helper method to create +all the Components in our application. It is perfectly suited to this task.

+
.component('app', {
+  template: 'It worked!'
+});
+
+

Add a <base> element to the head of our index.html. +Remember that we have chosen to use HTML5 mode for the $location service. This means that our HTML +must have a base URL.

+
<head>
+<base href="/">
+...
+
+

Bootstrap AngularJS

+

Bootstrap the Angular application and add the top level App Component.

+
<body ng-app="app">
+  <h1 class="title">Component Router</h1>
+  <app></app>
+</body>
+
+

Implementing the AppComponent

+

In the previous section we have created a single top level App Component. Let's now create some more +Routing Components and wire up Route Config for those. We start with a Heroes Feature, which +will display one of two views.

+
    +
  • A list of Heroes that are available:
  • +
+

Heroes List View

+
    +
  • A detailed view of a single Hero:
  • +
+

Heroes List View

+

We are going to have a Heroes Component for the Heroes feature of our application, and then HeroList +and HeroDetail Components that will actually display the two different views.

+

App Component

+

Configure the App Component with a template and Route Config:

+
.component('app', {
+  template:
+    '<nav>\n' +
+    '  <a>Crisis Center</a>\n' +
+    '  <a ng-link="[\'Heroes\']">Heroes</a>\n' +
+    '</nav>\n' +
+    '<ng-outlet></ng-outlet>\n',
+  $routeConfig: [
+    {path: '/heroes/...', name: 'Heroes', component: 'heroes'},
+  ]
+});
+
+

The App Component has an <ng-outlet> directive in its template. This is where the child Components +of this view will be rendered.

+ +

We have used the ng-link directive to create a link to navigate to the Heroes Component. By using this +directive we don't need to know what the actual URL will be. We can let the Router generate that for us.

+

We have included a link to the Crisis Center but have not included the ng-link directive as we have not yet +implemented the CrisisCenter component.

+

Non-terminal Routes

+

We need to tell the Router that the Heroes Route Definition is non-terminal, that it should +continue to match Routes in its child Components. We do this by adding a continuation ellipsis +(...) to the path of the Heroes Route, /heroes/.... +Without the continuation ellipsis the HeroList Route will never be matched because the Router will +stop at the Heroes Routing Component and not try to match the rest of the URL.

+

Heroes Feature

+

Now we can implement our Heroes Feature which consists of three Components: Heroes, HeroList and +HeroDetail. The Heroes Routing Component simply provides a template containing the ngOutlet +directive and a Route Config that defines a set of child Routes which delegate through to the +HeroList and HeroDetail Components.

+

HeroesComponent

+

Create a new file heroes.js, which defines a new Angular module for the Components of this feature +and registers the Heroes Component.

+
angular.module('heroes', [])
+.component('heroes', {
+  template: '<h2>Heroes</h2><ng-outlet></ng-outlet>',
+  $routeConfig: [
+    {path: '/',    name: 'HeroList',   component: 'heroList', useAsDefault: true},
+    {path: '/:id', name: 'HeroDetail', component: 'heroDetail'}
+  ]
+})
+
+

Remember to load this file in the index.html:

+
<script src="/app/heroes.js"></script>
+
+

and also to add the module as a dependency of the app module:

+
angular.module('app', ['ngComponentRouter', 'heroes'])
+
+

Use As Default

+

The useAsDefault property on the HeroList Route Definition, indicates that if no other Route +Definition matches the URL, then this Route Definition should be used by default.

+

Route Parameters

+

The HeroDetail Route has a named parameter (id), indicated by prefixing the URL segment with a colon, +as part of its path property. The Router will match anything in this segment and make that value +available to the HeroDetail Component.

+

Terminal Routes

+

Both the Routes in the HeroesComponent are terminal, i.e. their routes do not end with .... This is +because the HeroList and HeroDetail will not contain any child routes.

+

Route Names

+

What is the difference between the name and component properties on a Route Definition?

+

The component property in a Route Definition defines the Component directive that will be rendered +into the DOM via the Outlet. For example the heroDetail Component will be rendered into the page +where the <ng-outlet></ng-outlet> lives as <hero-detail></hero-detail>.

+

The name property is used to reference the Route Definition when generating URLs or navigating to +Routes. For example this link will <a ng-link="['Heroes']">Heroes</a> navigate the Route Definition +that has the name property of "Heroes".

+

HeroList Component

+

The HeroList Component is the first component in the application that actually contains significant +functionality. It loads up a list of heroes from a heroService and displays them using ng-repeat. +Add it to the heroes.js file:

+
.component('heroList', {
+  template:
+    '<div ng-repeat="hero in $ctrl.heroes">\n' +
+      '<a ng-link="[\'HeroDetail\', {id: hero.id}]">{{hero.name}}</a>\n' +
+    '</div>',
+  controller: HeroListComponent
+})
+
+

The ng-link directive creates links to a more detailed view of each hero, via the expression +['HeroDetail', {id: hero.id}]. This expression is an array describing what Routes to use to generate +the link. The first item is the name of the HeroDetail Route Definition and the second is a parameter +object that will be available to the HeroDetail Component.

+

The HeroDetail section below explains how to get hold of the id parameter of the HeroDetail Route.

+

The template iterates through each hero object of the array in the $ctrl.heroes property.

+

Remember that the module.component() helper automatically provides the Component's Controller as +the $ctrl property on the scope of the template.

+

HeroService

+

Our HeroService simulates requesting a list of heroes from a server. In a real application this would be +making an actual server request, perhaps over HTTP.

+
function HeroService($q) {
+  var heroesPromise = $q.resolve([
+    { id: 11, name: 'Mr. Nice' },
+    ...
+  ]);
+
+  this.getHeroes = function() {
+    return heroesPromise;
+  };
+
+  this.getHero = function(id) {
+    return heroesPromise.then(function(heroes) {
+      for (var i = 0; i < heroes.length; i++) {
+        if (heroes[i].id === id) return heroes[i];
+      }
+    });
+  };
+}
+
+

Note that both the getHeroes() and getHero(id) methods return a promise for the data. This is because +in real-life we would have to wait for the server to respond with the data.

+

Router Lifecycle Hooks

+

How do I know when my Component is active?

+

To deal with initialization and tidy up of Components that are rendered by a Router, we can implement +one or more Lifecycle Hooks on the Component. These will be called at well defined points in the +lifecycle of the Component.

+

The Lifecycle Hooks that can be implemented as instance methods on the Component are as follows:

+
    +
  • $routerCanReuse : called to to determine whether a Component can be reused across Route Definitions +that match the same type of Component, or whether to destroy and instantiate a new Component every time.
  • +
  • $routerOnActivate / $routerOnReuse : called by the Router at the end of a successful navigation. Only +one of $routerOnActivate and $routerOnReuse will be called depending upon the result of a call to +$routerCanReuse.
  • +
  • $routerCanDeactivate : called by the Router to determine if a Component can be removed as part of a +navigation.
  • +
  • $routerOnDeactivate : called by the Router before destroying a Component as part of a navigation.
  • +
+

We can also provide an Injectable function ($routerCanActivate) on the Component Definition Object, +or as a static method on the Component, that will determine whether this Component is allowed to be +activated. If any of the $routerCan... methods return false or a promise that resolves to false, the +navigation will be cancelled.

+

For our HeroList Component we want to load up the list of heroes when the Component is activated. +So we implement the $routerOnActivate() instance method.

+
function HeroListComponent(heroService) {
+  var $ctrl = this;
+  this.$routerOnActivate = function() {
+    return heroService.getHeroes().then(function(heroes) {
+      $ctrl.heroes = heroes;
+    });
+  }
+}
+
+

Running the application should update the browser's location to /heroes and display the list of heroes +returned from the heroService.

+

By returning a promise for the list of heroes from $routerOnActivate() we can delay the activation of the +Route until the heroes have arrived successfully. This is similar to how a resolve works in ngRoute.

+

Route Parameters

+

How do I access parameters for the current route?

+

The HeroDetailComponent displays details of an individual hero. The id of the hero to display is passed +as part of the URL, for example /heroes/12.

+

The Router parses the id from the URL when it recognizes the Route Definition and provides it to the +Component as part of the parameters of the $routerOnActivate() hook.

+
function HeroDetailComponent(heroService) {
+var $ctrl = this;
+
+this.$routerOnActivate = function(next, previous) {
+  // Get the hero identified by the route parameter
+  var id = next.params.id;
+  return heroService.getHero(id).then(function(hero) {
+    $ctrl.hero = hero;
+  });
+};
+
+

The $routerOnActivate(next, previous) hook receives two parameters, which hold the next and previous +Instruction objects for the Route that is being activated.

+

These parameters have a property called params which will hold the id parameter extracted from the URL +by the Router. In this code it is used to identify a specific Hero to retrieve from the heroService. +This hero is then attached to the Component so that it can be accessed in the template.

+

Access to the Current Router

+

How do I get hold of the current router for my component?

+

Each component has its own Router. Unlike in Angular 2, we cannot use the dependency injector to get hold of a component's Router. +We can only inject the $rootRouter. Instead we use the fact that the ng-outlet directive binds the current router to a $router +attribute on our component.

+
<ng-outlet><hero-detail $router="$$router"></hero-detail></ng-outlet>
+
+

We can then specify a bindings property on our component definition to bind the current router to our component:

+
bindings: { $router: '<' }
+
+

This sets up a one-way binding of the current Router to the $router property of our Component. The binding is available once +the component has been activated, and the $routerOnActivate hook is called.

+

As you might know from reading the component guide, the binding is actually available by the time the $onInit +hook is called, which is before the call to $routerOnActivate.

+

HeroDetailComponent

+

The HeroDetailComponent displays a form that allows the Hero to be modified.

+
.component('heroDetail', {
+  template:
+    '<div ng-if="$ctrl.hero">\n' +
+    '  <h3>"{{$ctrl.hero.name}}"</h3>\n' +
+    '  <div>\n' +
+    '    <label>Id: </label>{{$ctrl.hero.id}}</div>\n' +
+    '  <div>\n' +
+    '    <label>Name: </label>\n' +
+    '    <input ng-model="$ctrl.hero.name" placeholder="name"/>\n' +
+    '  </div>\n' +
+    '  <button ng-click="$ctrl.gotoHeroes()">Back</button>\n' +
+    '</div>\n',
+  bindings: { $router: '<' },
+  controller: HeroDetailComponent
+});
+
+

The template contains a button to navigate back to the HeroList. We could have styled an anchor to look +like a button and used `ng-link="['HeroList']" but here we demonstrate programmatic navigation via the +Router itself, which was made available by the binding in the Component Definition Object.

+
function HeroDetailComponent(heroService) {
+...
+this.gotoHeroes = function() {
+  this.$router.navigate(['HeroList']);
+};
+
+

Here we are asking the Router to navigate to a route defined by ['HeroList']. +This is the same kind of array used by the ng-link directive.

+

Other options for generating this navigation are:

+
    +
  • manually create the URL and call this.$router.navigateByUrl(url) - this is discouraged because it +couples the code of your component to the router URLs.
  • +
  • generate an Instruction for a route and navigate directly with this instruction.
    var instruction = this.$router.generate(['HeroList']);
    +this.$router.navigateByInstruction(instruction);
    +
    +this form gives you the possibility of caching the instruction, but is more verbose.
  • +
+

Absolute vs Relative Navigation

+

Why not use $rootRouter to do the navigation?

+

Instead of binding to the current Router, we can inject the $rootRouter into our Component and +use that: $rootRouter.navigate(...).

+

The trouble with doing this is that navigation is always relative to the Router. So in order to navigate +to the HeroListComponent with the $rootRouter, we would have to provide a complete path of Routes: +['App','Heroes','HeroList'].

+

Extra Parameters

+

We can also pass additional optional parameters to routes, which get encoded into the URL and are again +available to the $routerOnActivate(next, previous) hook. If we pass the current id from the +HeroDetailComponent back to the HeroListComponent we can use it to highlight the previously selected hero.

+
this.gotoHeroes = function() {
+  var heroId = this.hero && this.hero.id;
+  this.$router.navigate(['HeroList', {id: heroId}]);
+};
+
+

Then in the HeroList component we can extract this id in the $routerOnActivate() hook.

+
function HeroListComponent(heroService) {
+  var selectedId = null;
+  var $ctrl = this;
+
+  this.$routerOnActivate = function(next) {
+    heroService.getHeroes().then(function(heroes) {
+      $ctrl.heroes = heroes;
+      selectedId = next.params.id;
+    });
+  };
+
+  this.isSelected = function(hero) {
+    return (hero.id === selectedId);
+  };
+}
+
+

Finally, we can use this information to highlight the current hero in the template.

+
<div ng-repeat="hero in $ctrl.heroes"
+       ng-class="{ selected: $ctrl.isSelected(hero) }">
+  <a ng-link="['HeroDetail', {id: hero.id}]">{{hero.name}}</a>
+</div>
+
+

Crisis Center

+

Let's implement the Crisis Center feature, which displays a list if crises that need to be dealt with by a hero. +The detailed crisis view has an additional feature where it blocks you from navigating if you have not saved +changes to the crisis being edited.

+
    +
  • A list of Crises that are happening:
  • +
+

Crisis List View

+
    +
  • A detailed view of a single Crisis:
  • +
+

Crisis Detail View

+

Crisis Feature

+

This feature is very similar to the Heroes feature. It contains the following Components:

+
    +
  • CrisisService: contains method for getting a list of crises and an individual crisis.
  • +
  • CrisisListComponent: displays the list of crises, similar to HeroListComponent.
  • +
  • CrisisDetailComponent: displays a specific crisis
  • +
+

CrisisService and CrisisListComponent are basically the same as HeroService and HeroListComponent +respectively.

+ +

How do I prevent navigation from occurring?

+

Each Component can provide the $canActivate and $routerCanDeactivate Lifecycle Hooks. The +$routerCanDeactivate hook is an instance method on the Component. The $canActivate hook is used as a +static method defined on the Component Definition Object.

+

The Router will call these hooks to control navigation from one Route to another. Each of these hooks can +return a boolean or a Promise that will resolve to a boolean.

+

During a navigation, some Components will become inactive and some will become active. Before the navigation +can complete, all the Components must agree that they can be deactivated or activated, respectively.

+

The Router will call the $routerCanDeactivate and $canActivate hooks, if they are provided. If any +of the hooks resolve to false then the navigation is cancelled.

+

Dialog Box Service

+

We can implement a very simple dialog box that will prompt the user whether they are happy to lose changes they +have made. The result of the prompt is a promise that can be used in a $routerCanDeactivate hook.

+
.service('dialogService', DialogService);
+
+function DialogService($q) {
+  this.confirm = function(message) {
+    return $q.resolve(window.confirm(message || 'Is it OK?'));
+  };
+}
+
+

CrisisDetailComponent

+

We put the template into its own file by using a templateUrl property in the Component Definition +Object:

+
.component('crisisDetail', {
+  templateUrl: 'app/crisisDetail.html',
+  bindings: { $router: '<' },
+  controller: CrisisDetailComponent
+});
+
+

In the $routerOnActivate hook, we make a local copy of the crisis.name property to compare with the +original value so that we can determine whether the name has changed.

+
this.$routerOnActivate = function(next) {
+  // Get the crisis identified by the route parameter
+  var id = next.params.id;
+  crisisService.getCrisis(id).then(function(crisis) {
+    if (crisis) {
+      ctrl.editName = crisis.name;  // Make a copy of the crisis name for editing
+      ctrl.crisis = crisis;
+    } else { // id not found
+      ctrl.gotoCrises();
+    }
+  });
+};
+
+

In the $routerCanDeactivate we check whether the name has been modified and ask whether the user +wishes to discard the changes.

+
this.$routerCanDeactivate = function() {
+  // Allow synchronous navigation (`true`) if no crisis or the crisis is unchanged.
+  if (!this.crisis || this.crisis.name === this.editName) {
+    return true;
+  }
+  // Otherwise ask the user with the dialog service and return its
+  // promise which resolves to true or false when the user decides
+  return dialogService.confirm('Discard changes?');
+};
+
+

You can test this check by navigating to a crisis detail page, modifying the name and then either +pressing the browser's back button to navigate back to the previous page, or by clicking on one of +the links to the Crisis Center or Heroes features.

+

The Save and Cancel buttons update the editName and/or crisis.name properties before navigating +to prevent the $routerCanDeactivate hook from displaying the dialog box.

+

Summary

+

This guide has given an overview of the features of the Component Router and how to implement a simple +application.

+ + diff --git a/1.6.6/docs/partials/guide/component.html b/1.6.6/docs/partials/guide/component.html new file mode 100644 index 000000000..7752945ab --- /dev/null +++ b/1.6.6/docs/partials/guide/component.html @@ -0,0 +1,486 @@ + Improve this Doc + + +

Understanding Components

+

In Angular, a Component is a special kind of directive that uses a simpler +configuration which is suitable for a component-based application structure.

+

This makes it easier to write an app in a way that's similar to using Web Components or using Angular +2's style of application architecture.

+

Advantages of Components:

+
    +
  • simpler configuration than plain directives
  • +
  • promote sane defaults and best practices
  • +
  • optimized for component-based architecture
  • +
  • writing component directives will make it easier to upgrade to Angular 2
  • +
+

When not to use Components:

+
    +
  • for directives that need to perform actions in compile and pre-link functions, because they aren't available
  • +
  • when you need advanced directive definition options like priority, terminal, multi-element
  • +
  • when you want a directive that is triggered by an attribute or CSS class, rather than an element
  • +
+

Creating and configuring a Component

+

Components can be registered using the .component() method of an Angular module (returned by angular.module()). The method takes two arguments:

+
    +
  • The name of the Component (as string).
  • +
  • The Component config object. (Note that, unlike the .directive() method, this method does not take a factory function.)
  • +
+

+ +

+ + +
+ + +
+
angular.module('heroApp', []).controller('MainCtrl', function MainCtrl() {
  this.hero = {
    name: 'Spawn'
  };
});
+
+ +
+
angular.module('heroApp').component('heroDetail', {
  templateUrl: 'heroDetail.html',
  bindings: {
    hero: '='
  }
});
+
+ +
+
<!-- components match only elements -->
<div ng-controller="MainCtrl as ctrl">
  <b>Hero</b><br>
  <hero-detail hero="ctrl.hero"></hero-detail>
</div>
+
+ +
+
<span>Name: {{$ctrl.hero.name}}</span>
+
+ + + +
+
+ + +

+

It's also possible to add components via $compileProvider in a module's config phase.

+

Comparison between Directive definition and Component definition

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectiveComponent
bindingsNoYes (binds to controller)
bindToControllerYes (default: false)No (use bindings instead)
compile functionYesNo
controllerYesYes (default function() {})
controllerAsYes (default: false)Yes (default: $ctrl)
link functionsYesNo
multiElementYesNo
priorityYesNo
replaceYes (deprecated)No
requireYesYes
restrictYesNo (restricted to elements only)
scopeYes (default: false)No (scope is always isolate)
templateYesYes, injectable
templateNamespaceYesNo
templateUrlYesYes, injectable
terminalYesNo
transcludeYes (default: false)Yes (default: false)
+

Component-based application architecture

+

As already mentioned, the component helper makes it easier to structure your application with +a component-based architecture. But what makes a component beyond the options that +the component helper has?

+
    +
  • Components only control their own View and Data: +Components should never modify any data or DOM that is out of their own scope. Normally, in Angular +it is possible to modify data anywhere in the application through scope inheritance and watches. This +is practical, but can also lead to problems when it is not clear which part of the application is +responsible for modifying the data. That is why component directives use an isolate scope, so a whole +class of scope manipulation is not possible.

    +
  • +
  • Components have a well-defined public API - Inputs and Outputs: +However, scope isolation only goes so far, because Angular uses two-way binding. So if you pass +an object to a component like this - bindings: {item: '='}, and modify one of its properties, the +change will be reflected in the parent component. For components however, only the component that owns +the data should modify it, to make it easy to reason about what data is changed, and when. For that reason, +components should follow a few simple conventions:

    +
      +
    • Inputs should be using < and @ bindings. The < symbol denotes one-way bindings which are +available since 1.5. The difference to = is that the bound properties in the component scope are not watched, which means +if you assign a new value to the property in the component scope, it will not update the parent scope. Note however, that both parent +and component scope reference the same object, so if you are changing object properties or array elements in the +component, the parent will still reflect that change. +The general rule should therefore be to never change an object or array property in the component scope. +@ bindings can be used when the input is a string, especially when the value of the binding doesn't change.
      bindings: {
      +  hero: '<',
      +  comment: '@'
      +}
      +
      +
    • +
    • Outputs are realized with & bindings, which function as callbacks to component events.
      bindings: {
      +  onDelete: '&',
      +  onUpdate: '&'
      +}
      +
      +
    • +
    • Instead of manipulating Input Data, the component calls the correct Output Event with the changed data. +For a deletion, that means the component doesn't delete the hero itself, but sends it back to +the owner component via the correct event.
      <!-- note that we use kebab-case for bindings in the template as usual -->
      +<editable-field on-update="$ctrl.update('location', value)"></editable-field><br>
      +<button ng-click="$ctrl.onDelete({hero: $ctrl.hero})">Delete</button>
      +
      +
    • +
    • That way, the parent component can decide what to do with the event (e.g. delete an item or update the properties)
      ctrl.deleteHero(hero) {
      +  $http.delete(...).then(function() {
      +    var idx = ctrl.list.indexOf(hero);
      +    if (idx >= 0) {
      +      ctrl.list.splice(idx, 1);
      +    }
      +  });
      +}
      +
      +
    • +
    +
  • +
  • Components have a well-defined lifecycle +Each component can implement "lifecycle hooks". These are methods that will be called at certain points in the life +of the component. The following hook methods can be implemented:

    +
      +
    • $onInit() - Called on each controller after all the controllers on an element have been constructed and +had their bindings initialized (and before the pre & post linking functions for the directives on +this element). This is a good place to put initialization code for your controller.
    • +
    • $onChanges(changesObj) - Called whenever one-way bindings are updated. The changesObj is a hash whose keys +are the names of the bound properties that have changed, and the values are an object of the form +{ currentValue, previousValue, isFirstChange() }. Use this hook to trigger updates within a component such as +cloning the bound value to prevent accidental mutation of the outer value.
    • +
    • $doCheck() - Called on each turn of the digest cycle. Provides an opportunity to detect and act on +changes. Any actions that you wish to take in response to the changes that you detect must be +invoked from this hook; implementing this has no effect on when $onChanges is called. For example, this hook +could be useful if you wish to perform a deep equality check, or to check a Date object, changes to which would not +be detected by Angular's change detector and thus not trigger $onChanges. This hook is invoked with no arguments; +if detecting changes, you must store the previous value(s) for comparison to the current values.
    • +
    • $onDestroy() - Called on a controller when its containing scope is destroyed. Use this hook for releasing +external resources, watches and event handlers.
    • +
    • $postLink() - Called after this controller's element and its children have been linked. Similar to the post-link +function this hook can be used to set up DOM event handlers and do direct DOM manipulation. +Note that child elements that contain templateUrl directives will not have been compiled and linked since +they are waiting for their template to load asynchronously and their own compilation and linking has been +suspended until that occurs. +This hook can be considered analogous to the ngAfterViewInit and ngAfterContentInit hooks in Angular 2. +Since the compilation process is rather different in Angular 1 there is no direct mapping and care should +be taken when upgrading.
    • +
    +
  • +
+

By implementing these methods, your component can hook into its lifecycle.

+
    +
  • An application is a tree of components: +Ideally, the whole application should be a tree of components that implement clearly defined inputs +and outputs, and minimize two-way data binding. That way, it's easier to predict when data changes and what the state +of a component is.
  • +
+

Example of a component tree

+

The following example expands on the simple component example and incorporates the concepts we introduced +above:

+

Instead of an ngController, we now have a heroList component that holds the data of +different heroes, and creates a heroDetail for each of them.

+

The heroDetail component now contains new functionality:

+
    +
  • a delete button that calls the bound onDelete function of the heroList component
  • +
  • an input to change the hero location, in the form of a reusable editableField component. Instead +of manipulating the hero object itself, it sends a changeset upwards to the heroDetail, which sends +it upwards to the heroList component, which updates the original data.
  • +
+

+ +

+ + +
+ + +
+
angular.module('heroApp', []);
+
+ +
+
function HeroListController($scope, $element, $attrs) {
  var ctrl = this;

  // This would be loaded by $http etc.
  ctrl.list = [
    {
      name: 'Superman',
      location: ''
    },
    {
      name: 'Batman',
      location: 'Wayne Manor'
    }
  ];

  ctrl.updateHero = function(hero, prop, value) {
    hero[prop] = value;
  };

  ctrl.deleteHero = function(hero) {
    var idx = ctrl.list.indexOf(hero);
    if (idx >= 0) {
      ctrl.list.splice(idx, 1);
    }
  };
}

angular.module('heroApp').component('heroList', {
  templateUrl: 'heroList.html',
  controller: HeroListController
});
+
+ +
+
function HeroDetailController() {
  var ctrl = this;

  ctrl.delete = function() {
    ctrl.onDelete({hero: ctrl.hero});
  };

  ctrl.update = function(prop, value) {
    ctrl.onUpdate({hero: ctrl.hero, prop: prop, value: value});
  };
}

angular.module('heroApp').component('heroDetail', {
  templateUrl: 'heroDetail.html',
  controller: HeroDetailController,
  bindings: {
    hero: '<',
    onDelete: '&',
    onUpdate: '&'
  }
});
+
+ +
+
function EditableFieldController($scope, $element, $attrs) {
  var ctrl = this;
  ctrl.editMode = false;

  ctrl.handleModeChange = function() {
    if (ctrl.editMode) {
      ctrl.onUpdate({value: ctrl.fieldValue});
      ctrl.fieldValueCopy = ctrl.fieldValue;
    }
    ctrl.editMode = !ctrl.editMode;
  };

  ctrl.reset = function() {
    ctrl.fieldValue = ctrl.fieldValueCopy;
  };

  ctrl.$onInit = function() {
    // Make a copy of the initial value to be able to reset it later
    ctrl.fieldValueCopy = ctrl.fieldValue;

    // Set a default fieldType
    if (!ctrl.fieldType) {
      ctrl.fieldType = 'text';
    }
  };
}

angular.module('heroApp').component('editableField', {
  templateUrl: 'editableField.html',
  controller: EditableFieldController,
  bindings: {
    fieldValue: '<',
    fieldType: '@?',
    onUpdate: '&'
  }
});
+
+ +
+
<hero-list></hero-list>
+
+ +
+
<b>Heroes</b><br>
<hero-detail ng-repeat="hero in $ctrl.list" hero="hero" on-delete="$ctrl.deleteHero(hero)" on-update="$ctrl.updateHero(hero, prop, value)"></hero-detail>
+
+ +
+
<hr>
<div>
  Name: {{$ctrl.hero.name}}<br>
  Location: <editable-field field-value="$ctrl.hero.location" field-type="text" on-update="$ctrl.update('location', value)"></editable-field><br>
  <button ng-click="$ctrl.delete()">Delete</button>
</div>
+
+ +
+
<span ng-switch="$ctrl.editMode">
  <input ng-switch-when="true" type="{{$ctrl.fieldType}}" ng-model="$ctrl.fieldValue">
  <span ng-switch-default>{{$ctrl.fieldValue}}</span>
</span>
<button ng-click="$ctrl.handleModeChange()">{{$ctrl.editMode ? 'Save' : 'Edit'}}</button>
<button ng-if="$ctrl.editMode" ng-click="$ctrl.reset()">Reset</button>
+
+ + + +
+
+ + +

+

Components as route templates

+

Components are also useful as route templates (e.g. when using ngRoute). In a component-based +application, every view is a component:

+
var myMod = angular.module('myMod', ['ngRoute']);
+myMod.component('home', {
+  template: '<h1>Home</h1><p>Hello, {{ $ctrl.user.name }} !</p>',
+  controller: function() {
+    this.user = {name: 'world'};
+  }
+});
+myMod.config(function($routeProvider) {
+  $routeProvider.when('/', {
+    template: '<home></home>'
+  });
+});
+
+


+When using $routeProvider, you can often avoid some +boilerplate, by passing the resolved route dependencies directly to the component. Since 1.5, +ngRoute automatically assigns the resolves to the route scope property $resolve (you can also +configure the property name via resolveAs). When using components, you can take advantage of this and pass resolves +directly into your component without creating an extra route controller:

+
var myMod = angular.module('myMod', ['ngRoute']);
+myMod.component('home', {
+  template: '<h1>Home</h1><p>Hello, {{ $ctrl.user.name }} !</p>',
+  bindings: {
+    user: '<'
+  }
+});
+myMod.config(function($routeProvider) {
+  $routeProvider.when('/', {
+    template: '<home user="$resolve.user"></home>',
+    resolve: {
+      user: function($http) { return $http.get('...'); }
+    }
+  });
+});
+
+

Intercomponent Communication

+

Directives can require the controllers of other directives to enable communication +between each other. This can be achieved in a component by providing an +object mapping for the require property. The object keys specify the property names under which +the required controllers (object values) will be bound to the requiring component's controller.

+
+Note that the required controllers will not be available during the instantiation of the controller, +but they are guaranteed to be available just before the $onInit method is executed! +
+ +

Here is a tab pane example built from components:

+

+ +

+ + +
+ + +
+
angular.module('docsTabsExample', [])
.component('myTabs', {
  transclude: true,
  controller: function MyTabsController() {
    var panes = this.panes = [];
    this.select = function(pane) {
      angular.forEach(panes, function(pane) {
        pane.selected = false;
      });
      pane.selected = true;
    };
    this.addPane = function(pane) {
      if (panes.length === 0) {
        this.select(pane);
      }
      panes.push(pane);
    };
  },
  templateUrl: 'my-tabs.html'
})
.component('myPane', {
  transclude: true,
  require: {
    tabsCtrl: '^myTabs'
  },
  bindings: {
    title: '@'
  },
  controller: function() {
    this.$onInit = function() {
      this.tabsCtrl.addPane(this);
      console.log(this);
    };
  },
  templateUrl: 'my-pane.html'
});
+
+ +
+
<my-tabs>
  <my-pane title="Hello">
    <h4>Hello</h4>
    <p>Lorem ipsum dolor sit amet</p>
  </my-pane>
  <my-pane title="World">
    <h4>World</h4>
    <em>Mauris elementum elementum enim at suscipit.</em>
    <p><a href ng-click="i = i + 1">counter: {{i || 0}}</a></p>
  </my-pane>
</my-tabs>
+
+ +
+
<div class="tabbable">
  <ul class="nav nav-tabs">
    <li ng-repeat="pane in $ctrl.panes" ng-class="{active:pane.selected}">
      <a href="" ng-click="$ctrl.select(pane)">{{pane.title}}</a>
    </li>
  </ul>
  <div class="tab-content" ng-transclude></div>
</div>
+
+ +
+
<div class="tab-pane" ng-show="$ctrl.selected" ng-transclude></div>
+
+ + + +
+
+ + +

+

Unit-testing Component Controllers

+

The easiest way to unit-test a component controller is by using the +$componentController that is included in ngMock. The +advantage of this method is that you do not have to create any DOM elements. The following example +shows how to do this for the heroDetail component from above.

+

The examples use the Jasmine testing framework.

+

Controller Test:

+
describe('HeroDetailController', function() {
+  var $componentController;
+
+  beforeEach(module('heroApp'));
+  beforeEach(inject(function(_$componentController_) {
+    $componentController = _$componentController_;
+  }));
+
+  it('should call the `onDelete` binding, when deleting the hero', function() {
+    var onDeleteSpy = jasmine.createSpy('onDelete');
+    var bindings = {hero: {}, onDelete: onDeleteSpy};
+    var ctrl = $componentController('heroDetail', null, bindings);
+
+    ctrl.delete();
+    expect(onDeleteSpy).toHaveBeenCalledWith({hero: ctrl.hero});
+  });
+
+  it('should call the `onUpdate` binding, when updating a property', function() {
+    var onUpdateSpy = jasmine.createSpy('onUpdate');
+    var bindings = {hero: {}, onUpdate: onUpdateSpy};
+    var ctrl = $componentController('heroDetail', null, bindings);
+
+    ctrl.update('foo', 'bar');
+    expect(onUpdateSpy).toHaveBeenCalledWith({
+      hero: ctrl.hero,
+      prop: 'foo',
+      value: 'bar'
+    });
+  });
+
+});
+
+ + diff --git a/1.6.6/docs/partials/guide/concepts.html b/1.6.6/docs/partials/guide/concepts.html new file mode 100644 index 000000000..ad8100a53 --- /dev/null +++ b/1.6.6/docs/partials/guide/concepts.html @@ -0,0 +1,331 @@ + Improve this Doc + + +

Conceptual Overview

+

This section briefly touches on all of the important parts of AngularJS using a simple example. +For a more in-depth explanation, see the tutorial.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ConceptDescription
TemplateHTML with additional markup
Directivesextend HTML with custom attributes and elements
Modelthe data shown to the user in the view and with which the user interacts
Scopecontext where the model is stored so that controllers, directives and expressions can access it
Expressionsaccess variables and functions from the scope
Compilerparses the template and instantiates directives and expressions
Filterformats the value of an expression for display to the user
Viewwhat the user sees (the DOM)
Data Bindingsync data between the model and the view
Controllerthe business logic behind views
Dependency InjectionCreates and wires objects and functions
Injectordependency injection container
Modulea container for the different parts of an app including controllers, services, filters, directives which configures the Injector
Servicereusable business logic independent of views
+

A first example: Data binding

+

In the following example we will build a form to calculate the costs of an invoice in different currencies.

+

Let's start with input fields for quantity and cost whose values are multiplied to produce the total of the invoice:

+

+ +

+ + +
+ + +
+
<div ng-app ng-init="qty=1;cost=2">
  <b>Invoice:</b>
  <div>
    Quantity: <input type="number" min="0" ng-model="qty">
  </div>
  <div>
    Costs: <input type="number" min="0" ng-model="cost">
  </div>
  <div>
    <b>Total:</b> {{qty * cost | currency}}
  </div>
</div>
+
+ + + +
+
+ + +

+

Try out the Live Preview above, and then let's walk through the example and describe what's going on.

+

+

This looks like normal HTML, with some new markup. In Angular, a file like this is called a +template. When Angular starts your application, it parses and +processes this new markup from the template using the compiler. +The loaded, transformed and rendered DOM is then called the view.

+

The first kind of new markup are the directives. +They apply special behavior to attributes or elements in the HTML. In the example above we use the +ng-app attribute, which is linked to a directive that automatically +initializes our application. Angular also defines a directive for the input +element that adds extra behavior to the element. The ng-model directive +stores/updates the value of the input field into/from a variable.

+
+Custom directives to access the DOM: In Angular, the only place where an application should access the DOM is + within directives. This is important because artifacts that access the DOM are hard to test. + If you need to access the DOM directly you should write a custom directive for this. The + directives guide explains how to do this. +
+ +

The second kind of new markup are the double curly braces {{ expression | filter }}: +When the compiler encounters this markup, it will replace it with the evaluated value of the markup. +An expression in a template is a JavaScript-like code snippet that allows +Angular to read and write variables. Note that those variables are not global variables. +Just like variables in a JavaScript function live in a scope, +Angular provides a scope for the variables accessible to expressions. +The values that are stored in variables on the scope are referred to as the model +in the rest of the documentation. +Applied to the example above, the markup directs Angular to "take the data we got from the input widgets +and multiply them together".

+

The example above also contains a filter. +A filter formats the value of an expression for display to the user. +In the example above, the filter currency formats a number +into an output that looks like money.

+

The important thing in the example is that Angular provides live bindings: +Whenever the input values change, the value of the expressions are automatically +recalculated and the DOM is updated with their values. +The concept behind this is two-way data binding.

+

Adding UI logic: Controllers

+

Let's add some more logic to the example that allows us to enter and calculate the costs in +different currencies and also pay the invoice.

+

+ +

+ + +
+ + +
+
angular.module('invoice1', [])
.controller('InvoiceController', function InvoiceController() {
  this.qty = 1;
  this.cost = 2;
  this.inCurr = 'EUR';
  this.currencies = ['USD', 'EUR', 'CNY'];
  this.usdToForeignRates = {
    USD: 1,
    EUR: 0.74,
    CNY: 6.09
  };

  this.total = function total(outCurr) {
    return this.convertCurrency(this.qty * this.cost, this.inCurr, outCurr);
  };
  this.convertCurrency = function convertCurrency(amount, inCurr, outCurr) {
    return amount * this.usdToForeignRates[outCurr] / this.usdToForeignRates[inCurr];
  };
  this.pay = function pay() {
    window.alert('Thanks!');
  };
});
+
+ +
+
<div ng-app="invoice1" ng-controller="InvoiceController as invoice">
  <b>Invoice:</b>
  <div>
    Quantity: <input type="number" min="0" ng-model="invoice.qty" required >
  </div>
  <div>
    Costs: <input type="number" min="0" ng-model="invoice.cost" required >
    <select ng-model="invoice.inCurr">
      <option ng-repeat="c in invoice.currencies">{{c}}</option>
    </select>
  </div>
  <div>
    <b>Total:</b>
    <span ng-repeat="c in invoice.currencies">
      {{invoice.total(c) | currency:c}}
    </span><br>
    <button class="btn" ng-click="invoice.pay()">Pay</button>
  </div>
</div>
+
+ + + +
+
+ + +

+

What changed?

+

First, there is a new JavaScript file that contains a controller. +More accurately, the file specifies a constructor function that will be used to create the actual +controller instance. The purpose of controllers is to expose variables and functionality to +expressions and directives.

+

Besides the new file that contains the controller code, we also added an +ng-controller directive to the HTML. +This directive tells Angular that the new InvoiceController is responsible for the element with the directive +and all of the element's children. +The syntax InvoiceController as invoice tells Angular to instantiate the controller +and save it in the variable invoice in the current scope.

+

We also changed all expressions in the page to read and write variables within that +controller instance by prefixing them with invoice. . The possible currencies are defined in the controller +and added to the template using ng-repeat. +As the controller contains a total function +we are also able to bind the result of that function to the DOM using {{ invoice.total(...) }}.

+

Again, this binding is live, i.e. the DOM will be automatically updated +whenever the result of the function changes. +The button to pay the invoice uses the directive ngClick. This will evaluate the +corresponding expression whenever the button is clicked.

+

In the new JavaScript file we are also creating a module +at which we register the controller. We will talk about modules in the next section.

+

The following graphic shows how everything works together after we introduced the controller:

+

+

View-independent business logic: Services

+

Right now, the InvoiceController contains all logic of our example. When the application grows it +is a good practice to move view-independent logic from the controller into a +service, so it can be reused by other parts +of the application as well. Later on, we could also change that service to load the exchange rates +from the web, e.g. by calling the Fixer.io exchange rate API, without changing the controller.

+

Let's refactor our example and move the currency conversion into a service in another file:

+

+ +

+ + +
+ + +
+
angular.module('finance2', [])
.factory('currencyConverter', function() {
  var currencies = ['USD', 'EUR', 'CNY'];
  var usdToForeignRates = {
    USD: 1,
    EUR: 0.74,
    CNY: 6.09
  };
  var convert = function(amount, inCurr, outCurr) {
    return amount * usdToForeignRates[outCurr] / usdToForeignRates[inCurr];
  };

  return {
    currencies: currencies,
    convert: convert
  };
});
+
+ +
+
angular.module('invoice2', ['finance2'])
.controller('InvoiceController', ['currencyConverter', function InvoiceController(currencyConverter) {
  this.qty = 1;
  this.cost = 2;
  this.inCurr = 'EUR';
  this.currencies = currencyConverter.currencies;

  this.total = function total(outCurr) {
    return currencyConverter.convert(this.qty * this.cost, this.inCurr, outCurr);
  };
  this.pay = function pay() {
    window.alert('Thanks!');
  };
}]);
+
+ +
+
<div ng-app="invoice2" ng-controller="InvoiceController as invoice">
  <b>Invoice:</b>
  <div>
    Quantity: <input type="number" min="0" ng-model="invoice.qty" required >
  </div>
  <div>
    Costs: <input type="number" min="0" ng-model="invoice.cost" required >
    <select ng-model="invoice.inCurr">
      <option ng-repeat="c in invoice.currencies">{{c}}</option>
    </select>
  </div>
  <div>
    <b>Total:</b>
    <span ng-repeat="c in invoice.currencies">
      {{invoice.total(c) | currency:c}}
    </span><br>
    <button class="btn" ng-click="invoice.pay()">Pay</button>
  </div>
</div>
+
+ + + +
+
+ + +

+

+

What changed?

+

We moved the convertCurrency function and the definition of the existing currencies +into the new file finance2.js. But how does the controller +get a hold of the now separated function?

+

This is where Dependency Injection comes into play. +Dependency Injection (DI) is a software design pattern that +deals with how objects and functions get created and how they get a hold of their dependencies. +Everything within Angular (directives, filters, controllers, +services, ...) is created and wired using dependency injection. Within Angular, +the DI container is called the injector.

+

To use DI, there needs to be a place where all the things that should work together are registered. +In Angular, this is the purpose of the modules. +When Angular starts, it will use the configuration of the module with the name defined by the ng-app directive, +including the configuration of all modules that this module depends on.

+

In the example above: +The template contains the directive ng-app="invoice2". This tells Angular +to use the invoice2 module as the main module for the application. +The code snippet angular.module('invoice2', ['finance2']) specifies that the invoice2 module depends on the +finance2 module. By this, Angular uses the InvoiceController as well as the currencyConverter service.

+

Now that Angular knows of all the parts of the application, it needs to create them. +In the previous section we saw that controllers are created using a constructor function. +For services, there are multiple ways to specify how they are created +(see the service guide). +In the example above, we are using an anonymous function as the factory function for the +currencyConverter service. +This function should return the currencyConverter service instance.

+

Back to the initial question: How does the InvoiceController get a reference to the currencyConverter function? +In Angular, this is done by simply defining arguments on the constructor function. With this, the injector +is able to create the objects in the right order and pass the previously created objects into the +factories of the objects that depend on them. +In our example, the InvoiceController has an argument named currencyConverter. By this, Angular knows about the +dependency between the controller and the service and calls the controller with the service instance as argument.

+

The last thing that changed in the example between the previous section and this section is that we +now pass an array to the module.controller function, instead of a plain function. The array first +contains the names of the service dependencies that the controller needs. The last entry +in the array is the controller constructor function. +Angular uses this array syntax to define the dependencies so that the DI also works after minifying +the code, which will most probably rename the argument name of the controller constructor function +to something shorter like a.

+

Accessing the backend

+

Let's finish our example by fetching the exchange rates from the Fixer.io exchange rate API. +The following example shows how this is done with Angular:

+

+ +

+ + +
+ + +
+
angular.module('invoice3', ['finance3'])
.controller('InvoiceController', ['currencyConverter', function InvoiceController(currencyConverter) {
  this.qty = 1;
  this.cost = 2;
  this.inCurr = 'EUR';
  this.currencies = currencyConverter.currencies;

  this.total = function total(outCurr) {
    return currencyConverter.convert(this.qty * this.cost, this.inCurr, outCurr);
  };
  this.pay = function pay() {
    window.alert('Thanks!');
  };
}]);
+
+ +
+
angular.module('finance3', [])
.factory('currencyConverter', ['$http', function($http) {
  var currencies = ['USD', 'EUR', 'CNY'];
  var usdToForeignRates = {};

  var convert = function(amount, inCurr, outCurr) {
    return amount * usdToForeignRates[outCurr] / usdToForeignRates[inCurr];
  };

  var refresh = function() {
    var url = 'https://api.fixer.io/latest?base=USD&symbols=' + currencies.join(",");
    return $http.get(url).then(function(response) {
      usdToForeignRates = response.data.rates;
      usdToForeignRates['USD'] = 1;
    });
  };

  refresh();

  return {
    currencies: currencies,
    convert: convert
  };
}]);
+
+ +
+
<div ng-app="invoice3" ng-controller="InvoiceController as invoice">
  <b>Invoice:</b>
  <div>
    Quantity: <input type="number" min="0" ng-model="invoice.qty" required >
  </div>
  <div>
    Costs: <input type="number" min="0" ng-model="invoice.cost" required >
    <select ng-model="invoice.inCurr">
      <option ng-repeat="c in invoice.currencies">{{c}}</option>
    </select>
  </div>
  <div>
    <b>Total:</b>
    <span ng-repeat="c in invoice.currencies">
      {{invoice.total(c) | currency:c}}
    </span><br>
    <button class="btn" ng-click="invoice.pay()">Pay</button>
  </div>
</div>
+
+ + + +
+
+ + +

+

What changed? +Our currencyConverter service of the finance module now uses the $http, a +built-in service provided by Angular for accessing a server backend. $http is a wrapper around +XMLHttpRequest +and JSONP transports.

+ + diff --git a/1.6.6/docs/partials/guide/controller.html b/1.6.6/docs/partials/guide/controller.html new file mode 100644 index 000000000..4155eb8f3 --- /dev/null +++ b/1.6.6/docs/partials/guide/controller.html @@ -0,0 +1,303 @@ + Improve this Doc + + +

Understanding Controllers

+

In Angular, a Controller is defined by a JavaScript constructor function that is used to augment the +Angular Scope.

+

When a Controller is attached to the DOM via the ng-controller +directive, Angular will instantiate a new Controller object, using the specified Controller's +constructor function. A new child scope will be created and made available as an injectable +parameter to the Controller's constructor function as $scope.

+

If the controller has been attached using the controller as syntax then the controller instance will +be assigned to a property on the new scope.

+

Use controllers to:

+
    +
  • Set up the initial state of the $scope object.
  • +
  • Add behavior to the $scope object.
  • +
+

Do not use controllers to:

+
    +
  • Manipulate DOM — Controllers should contain only business logic. +Putting any presentation logic into Controllers significantly affects its testability. Angular +has databinding for most cases and directives to +encapsulate manual DOM manipulation.
  • +
  • Format input — Use angular form controls instead.
  • +
  • Filter output — Use angular filters instead.
  • +
  • Share code or state across controllers — Use angular +services instead.
  • +
  • Manage the life-cycle of other components (for example, to create service instances).
  • +
+

Setting up the initial state of a $scope object

+

Typically, when you create an application you need to set up the initial state for the Angular +$scope. You set up the initial state of a scope by attaching properties to the $scope object. +The properties contain the view model (the model that will be presented by the view). All the +$scope properties will be available to the template at the point in the DOM where the Controller +is registered.

+

The following example demonstrates creating a GreetingController, which attaches a greeting +property containing the string 'Hola!' to the $scope:

+
var myApp = angular.module('myApp',[]);
+
+myApp.controller('GreetingController', ['$scope', function($scope) {
+  $scope.greeting = 'Hola!';
+}]);
+
+

We create an Angular Module, myApp, for our application. Then we add the controller's +constructor function to the module using the .controller() method. This keeps the controller's +constructor function out of the global scope.

+
+We have used an inline injection annotation to explicitly specify the dependency +of the Controller on the $scope service provided by Angular. See the guide on +Dependency Injection for more information. +
+ +

We attach our controller to the DOM using the ng-controller directive. The greeting property can +now be data-bound to the template:

+
<div ng-controller="GreetingController">
+  {{ greeting }}
+</div>
+
+

Adding Behavior to a Scope Object

+

In order to react to events or execute computation in the view we must provide behavior to the +scope. We add behavior to the scope by attaching methods to the $scope object. These methods are +then available to be called from the template/view.

+

The following example uses a Controller to add a method, which doubles a number, to the scope:

+
var myApp = angular.module('myApp',[]);
+
+myApp.controller('DoubleController', ['$scope', function($scope) {
+  $scope.double = function(value) { return value * 2; };
+}]);
+
+

Once the Controller has been attached to the DOM, the double method can be invoked in an Angular +expression in the template:

+
<div ng-controller="DoubleController">
+  Two times <input ng-model="num"> equals {{ double(num) }}
+</div>
+
+

As discussed in the Concepts section of this guide, any +objects (or primitives) assigned to the scope become model properties. Any methods assigned to +the scope are available in the template/view, and can be invoked via angular expressions +and ng event handler directives (e.g. ngClick).

+

Using Controllers Correctly

+

In general, a Controller shouldn't try to do too much. It should contain only the business logic +needed for a single view.

+

The most common way to keep Controllers slim is by encapsulating work that doesn't belong to +controllers into services and then using these services in Controllers via dependency injection. +This is discussed in the Dependency Injection and Services sections of this guide.

+

Associating Controllers with Angular Scope Objects

+

You can associate Controllers with scope objects implicitly via the ngController +directive or $route service.

+

Simple Spicy Controller Example

+

To illustrate further how Controller components work in Angular, let's create a little app with the +following components:

+
    +
  • A template with two buttons and a simple message
  • +
  • A model consisting of a string named spice
  • +
  • A Controller with two functions that set the value of spice
  • +
+

The message in our template contains a binding to the spice model which, by default, is set to the +string "very". Depending on which button is clicked, the spice model is set to chili or +jalapeño, and the message is automatically updated by data-binding.

+

+ +

+ + +
+ + +
+
<div ng-controller="SpicyController">
 <button ng-click="chiliSpicy()">Chili</button>
 <button ng-click="jalapenoSpicy()">Jalapeño</button>
 <p>The food is {{spice}} spicy!</p>
</div>
+
+ +
+
var myApp = angular.module('spicyApp1', []);

myApp.controller('SpicyController', ['$scope', function($scope) {
    $scope.spice = 'very';

    $scope.chiliSpicy = function() {
        $scope.spice = 'chili';
    };

    $scope.jalapenoSpicy = function() {
        $scope.spice = 'jalapeño';
    };
}]);
+
+ + + +
+
+ + +

+

Things to notice in the example above:

+
    +
  • The ng-controller directive is used to (implicitly) create a scope for our template, and the +scope is augmented (managed) by the SpicyController Controller.
  • +
  • SpicyController is just a plain JavaScript function. As an (optional) naming convention the name +starts with capital letter and ends with "Controller".
  • +
  • Assigning a property to $scope creates or updates the model.
  • +
  • Controller methods can be created through direct assignment to scope (see the chiliSpicy method)
  • +
  • The Controller methods and properties are available in the template (for both the <div> element and +its children).
  • +
+

Spicy Arguments Example

+

Controller methods can also take arguments, as demonstrated in the following variation of the +previous example.

+

+ +

+ + +
+ + +
+
<div ng-controller="SpicyController">
 <input ng-model="customSpice">
 <button ng-click="spicy('chili')">Chili</button>
 <button ng-click="spicy(customSpice)">Custom spice</button>
 <p>The food is {{spice}} spicy!</p>
</div>
+
+ +
+
var myApp = angular.module('spicyApp2', []);

myApp.controller('SpicyController', ['$scope', function($scope) {
    $scope.customSpice = 'wasabi';
    $scope.spice = 'very';

    $scope.spicy = function(spice) {
        $scope.spice = spice;
    };
}]);
+
+ + + +
+
+ + +

+

Notice that the SpicyController Controller now defines just one method called spicy, which takes one +argument called spice. The template then refers to this Controller method and passes in a string +constant 'chili' in the binding for the first button and a model property customSpice (bound to an +input box) in the second button.

+

Scope Inheritance Example

+

It is common to attach Controllers at different levels of the DOM hierarchy. Since the +ng-controller directive creates a new child scope, we get a +hierarchy of scopes that inherit from each other. The $scope that each Controller receives will +have access to properties and methods defined by Controllers higher up the hierarchy. +See Understanding Scopes for +more information about scope inheritance.

+

+ +

+ + +
+ + +
+
<div class="spicy">
  <div ng-controller="MainController">
    <p>Good {{timeOfDay}}, {{name}}!</p>

    <div ng-controller="ChildController">
      <p>Good {{timeOfDay}}, {{name}}!</p>

      <div ng-controller="GrandChildController">
        <p>Good {{timeOfDay}}, {{name}}!</p>
      </div>
    </div>
  </div>
</div>
+
+ +
+
div.spicy div {
  padding: 10px;
  border: solid 2px blue;
}
+
+ +
+
var myApp = angular.module('scopeInheritance', []);
myApp.controller('MainController', ['$scope', function($scope) {
  $scope.timeOfDay = 'morning';
  $scope.name = 'Nikki';
}]);
myApp.controller('ChildController', ['$scope', function($scope) {
  $scope.name = 'Mattie';
}]);
myApp.controller('GrandChildController', ['$scope', function($scope) {
  $scope.timeOfDay = 'evening';
  $scope.name = 'Gingerbread Baby';
}]);
+
+ + + +
+
+ + +

+

Notice how we nested three ng-controller directives in our template. This will result in four +scopes being created for our view:

+
    +
  • The root scope
  • +
  • The MainController scope, which contains timeOfDay and name properties
  • +
  • The ChildController scope, which inherits the timeOfDay property but overrides (shadows) the +name property from the previous scope
  • +
  • The GrandChildController scope, which overrides (shadows) both the timeOfDay property defined +in MainController and the name property defined in ChildController
  • +
+

Inheritance works with methods in the same way as it does with properties. So in our previous +examples, all of the properties could be replaced with methods that return string values.

+

Testing Controllers

+

Although there are many ways to test a Controller, one of the best conventions, shown below, +involves injecting the $rootScope and $controller:

+

Controller Definition:

+
var myApp = angular.module('myApp',[]);
+
+myApp.controller('MyController', function($scope) {
+  $scope.spices = [{"name":"pasilla", "spiciness":"mild"},
+                   {"name":"jalapeno", "spiciness":"hot hot hot!"},
+                   {"name":"habanero", "spiciness":"LAVA HOT!!"}];
+  $scope.spice = "habanero";
+});
+
+

Controller Test:

+
describe('myController function', function() {
+
+  describe('myController', function() {
+    var $scope;
+
+    beforeEach(module('myApp'));
+
+    beforeEach(inject(function($rootScope, $controller) {
+      $scope = $rootScope.$new();
+      $controller('MyController', {$scope: $scope});
+    }));
+
+    it('should create "spices" model with 3 spices', function() {
+      expect($scope.spices.length).toBe(3);
+    });
+
+    it('should set the default value of spice', function() {
+      expect($scope.spice).toBe('habanero');
+    });
+  });
+});
+
+

If you need to test a nested Controller you must create the same scope hierarchy +in your test that exists in the DOM:

+
describe('state', function() {
+    var mainScope, childScope, grandChildScope;
+
+    beforeEach(module('myApp'));
+
+    beforeEach(inject(function($rootScope, $controller) {
+        mainScope = $rootScope.$new();
+        $controller('MainController', {$scope: mainScope});
+        childScope = mainScope.$new();
+        $controller('ChildController', {$scope: childScope});
+        grandChildScope = childScope.$new();
+        $controller('GrandChildController', {$scope: grandChildScope});
+    }));
+
+    it('should have over and selected', function() {
+        expect(mainScope.timeOfDay).toBe('morning');
+        expect(mainScope.name).toBe('Nikki');
+        expect(childScope.timeOfDay).toBe('morning');
+        expect(childScope.name).toBe('Mattie');
+        expect(grandChildScope.timeOfDay).toBe('evening');
+        expect(grandChildScope.name).toBe('Gingerbread Baby');
+    });
+});
+
+ + diff --git a/1.6.6/docs/partials/guide/css-styling.html b/1.6.6/docs/partials/guide/css-styling.html new file mode 100644 index 000000000..7cf180ae6 --- /dev/null +++ b/1.6.6/docs/partials/guide/css-styling.html @@ -0,0 +1,52 @@ + Improve this Doc + + +

Angular sets these CSS classes. It is up to your application to provide useful styling.

+

CSS classes used by angular

+
    +
  • ng-scope

    +
      +
    • Usage: angular applies this class to any element for which a new scope +is defined. (see scope guide for more information about scopes)
    • +
    +
  • +
  • ng-isolate-scope

    +
      +
    • Usage: angular applies this class to any element for which a new +isolate scope is defined.
    • +
    +
  • +
  • ng-binding

    +
      +
    • Usage: angular applies this class to any element that is attached to a data binding, via ng-bind or +{{}} curly braces, for example. (see databinding guide)
    • +
    +
  • +
  • ng-invalid, ng-valid

    +
      +
    • Usage: angular applies this class to a form control widget element if that element's input does +not pass validation. (see input directive)
    • +
    +
  • +
  • ng-pristine, ng-dirty

    +
      +
    • Usage: angular ngModel directive applies ng-pristine class +to a new form control widget which did not have user interaction. Once the user interacts with +the form control, the class is changed to ng-dirty.
    • +
    +
  • +
  • ng-touched, ng-untouched

    +
      +
    • Usage: angular ngModel directive applies ng-untouched class +to a new form control widget which has not been blurred. Once the user blurs the form control, +the class is changed to ng-touched.
    • +
    +
  • +
+ + + + diff --git a/1.6.6/docs/partials/guide/databinding.html b/1.6.6/docs/partials/guide/databinding.html new file mode 100644 index 000000000..e83bfc8c4 --- /dev/null +++ b/1.6.6/docs/partials/guide/databinding.html @@ -0,0 +1,33 @@ + Improve this Doc + + +

Data Binding

+

Data-binding in Angular apps is the automatic synchronization of data between the model and view +components. The way that Angular implements data-binding lets you treat the model as the +single-source-of-truth in your application. The view is a projection of the model at all times. +When the model changes, the view reflects the change, and vice versa.

+

Data Binding in Classical Template Systems

+


+Most templating systems bind data in only one direction: they merge template and model components +together into a view. After the merge occurs, changes to the model +or related sections of the view are NOT automatically reflected in the view. Worse, any changes +that the user makes to the view are not reflected in the model. This means that the developer has +to write code that constantly syncs the view with the model and the model with the view.

+

Data Binding in Angular Templates

+


+Angular templates work differently. First the template (which is the uncompiled HTML along with +any additional markup or directives) is compiled on the browser. The compilation step produces a +live view. Any changes to the view are immediately reflected in the model, and any changes in +the model are propagated to the view. The model is the single-source-of-truth for the application +state, greatly simplifying the programming model for the developer. You can think of +the view as simply an instant projection of your model.

+

Because the view is just a projection of the model, the controller is completely separated from the +view and unaware of it. This makes testing a snap because it is easy to test your controller in +isolation without the view and the related DOM/browser dependency.

+ + + + diff --git a/1.6.6/docs/partials/guide/decorators.html b/1.6.6/docs/partials/guide/decorators.html new file mode 100644 index 000000000..11e4f1213 --- /dev/null +++ b/1.6.6/docs/partials/guide/decorators.html @@ -0,0 +1,322 @@ + Improve this Doc + + +

Decorators in AngularJS

+
+ NOTE: This guide is targeted towards developers who are already familiar with AngularJS basics. + If you're just getting started, we recommend the tutorial first. +
+ +

What are decorators?

+

Decorators are a design pattern that is used to separate modification or decoration of a class without modifying the +original source code. In Angular, decorators are functions that allow a service, directive or filter to be modified +prior to its usage.

+

How to use decorators

+

There are two ways to register decorators

+
    +
  • $provide.decorator, and
  • +
  • module.decorator
  • +
+

Each provide access to a $delegate, which is the instantiated service/directive/filter, prior to being passed to the +service that required it.

+

$provide.decorator

+

The decorator function allows access to a $delegate of the service once it +has been instantiated. For example:

+
angular.module('myApp', [])
+
+.config([ '$provide', function($provide) {
+
+  $provide.decorator('$log', [
+    '$delegate',
+    function $logDecorator($delegate) {
+
+      var originalWarn = $delegate.warn;
+      $delegate.warn = function decoratedWarn(msg) {
+        msg = 'Decorated Warn: ' + msg;
+        originalWarn.apply($delegate, arguments);
+      };
+
+      return $delegate;
+    }
+  ]);
+}]);
+
+

After the $log service has been instantiated the decorator is fired. The decorator function has a $delegate object +injected to provide access to the service that matches the selector in the decorator. This $delegate will be the +service you are decorating. The return value of the function provided to the decorator will take place of the service, +directive, or filter being decorated.

+
+ +

The $delegate may be either modified or completely replaced. Given a service myService with a method someFn, the +following could all be viable solutions:

+

Completely Replace the $delegate

+
angular.module('myApp', [])
+
+.config([ '$provide', function($provide) {
+
+  $provide.decorator('myService', [
+    '$delegate',
+    function myServiceDecorator($delegate) {
+
+      var myDecoratedService = {
+        // new service object to replace myService
+      };
+      return myDecoratedService;
+    }
+  ]);
+}]);
+
+

Patch the $delegate

+
angular.module('myApp', [])
+
+.config([ '$provide', function($provide) {
+
+  $provide.decorator('myService', [
+    '$delegate',
+    function myServiceDecorator($delegate) {
+
+      var someFn = $delegate.someFn;
+
+      function aNewFn() {
+        // new service function
+        someFn.apply($delegate, arguments);
+      }
+
+      $delegate.someFn = aNewFn;
+      return $delegate;
+    }
+  ]);
+}]);
+
+

Augment the $delegate

+
angular.module('myApp', [])
+
+.config([ '$provide', function($provide) {
+
+  $provide.decorator('myService', [
+    '$delegate',
+    function myServiceDecorator($delegate) {
+
+      function helperFn() {
+        // an additional fn to add to the service
+      }
+
+      $delegate.aHelpfulAddition = helperFn;
+      return $delegate;
+    }
+  ]);
+}]);
+
+
+ Note that whatever is returned by the decorator function will replace that which is being decorated. For example, a + missing return statement will wipe out the entire object being decorated. +
+ +
+ +

Decorators have different rules for different services. This is because services are registered in different ways. +Services are selected by name, however filters and directives are selected by appending "Filter" or "Directive" to +the end of the name. The $delegate provided is dictated by the type of service.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Service TypeSelector$delegate
ServiceserviceNameThe object or function returned by the service
DirectivedirectiveName + 'Directive'An Array.<DirectiveObject>1
FilterfilterName + 'Filter'The function returned by the filter
+

1. Multiple directives may be registered to the same selector/name

+
+ NOTE: Developers should take care in how and why they are modifying the $delegate for the service. Not only + should expectations for the consumer be kept, but some functionality (such as directive registration) does not take + place after decoration, but during creation/registration of the original service. This means, for example, that + an action such as pushing a directive object to a directive $delegate will likely result in unexpected behavior. + + Furthermore, great care should be taken when decorating core services, directives, or filters as this may unexpectedly + or adversely affect the functionality of the framework. +
+ +

module.decorator

+

This function is the same as the $provide.decorator function except it is +exposed through the module API. This allows you to separate your decorator patterns from your module config blocks.

+

Like with $provide.decorator, the module.decorator function runs during the config phase of the app. That means +you can define a module.decorator before the decorated service is defined.

+

Since you can apply multiple decorators, it is noteworthy that decorator application always follows order +of declaration:

+
    +
  • If a service is decorated by both $provide.decorator and module.decorator, the decorators are applied in order:
  • +
+
angular
+.module('theApp', [])
+.factory('theFactory', theFactoryFn)
+.config(function($provide) {
+  $provide.decorator('theFactory', provideDecoratorFn); // runs first
+})
+.decorator('theFactory', moduleDecoratorFn); // runs seconds
+
+
    +
  • If the service has been declared multiple times, a decorator will decorate the service that has been declared +last:
  • +
+
angular
+  .module('theApp', [])
+  .factory('theFactory', theFactoryFn)
+  .decorator('theFactory', moduleDecoratorFn)
+  .factory('theFactory', theOtherFactoryFn);
+
+// `theOtherFactoryFn` is selected as 'theFactory' provider and it is decorated via `moduleDecoratorFn`.
+
+

Example Applications

+

The following sections provide examples each of a service decorator, a directive decorator, and a filter decorator.

+

Service Decorator Example

+

This example shows how we can replace the $log service with our own to display log messages.

+

+ +

+ + +
+ + +
+
angular.module('myServiceDecorator', []).

controller('Ctrl', [
  '$scope',
  '$log',
  '$timeout',
  function($scope, $log, $timeout) {
    var types = ['error', 'warn', 'log', 'info' ,'debug'], i;

    for (i = 0; i < types.length; i++) {
      $log[types[i]](types[i] + ': message ' + (i + 1));
    }

    $timeout(function() {
      $log.info('info: message logged in timeout');
    });
  }
]).

directive('myLog', [
  '$log',
  function($log) {
    return {
      restrict: 'E',
      template: '<ul id="myLog"><li ng-repeat="l in myLog" class="{{l.type}}">{{l.message}}</li></ul>',
      scope: {},
      compile: function() {
        return function(scope) {
          scope.myLog = $log.stack;
        };
      }
    };
  }
]).

config([
  '$provide',
  function($provide) {

    $provide.decorator('$log', [
      '$delegate',
      function logDecorator($delegate) {

        var myLog = {
          warn: function(msg) {
            log(msg, 'warn');
          },
          error: function(msg) {
            log(msg, 'error');
          },
          info: function(msg) {
            log(msg, 'info');
          },
          debug: function(msg) {
            log(msg, 'debug');
          },
          log: function(msg) {
            log(msg, 'log');
          },
          stack: []
        };

        function log(msg, type) {
          myLog.stack.push({ type: type, message: msg.toString() });
          if (console && console[type]) console[type](msg);
        }

        return myLog;

      }
    ]);

  }
]);
+
+ +
+
<div ng-controller="Ctrl">
  <h1>Logs</h1>
  <my-log></my-log>
</div>
+
+ +
+
li.warn { color: yellow; }
li.error { color: red; }
li.info { color: blue }
li.log { color: black }
li.debug { color: green }
+
+ +
+
it('should display log messages in dom', function() {
  element.all(by.repeater('l in myLog')).count().then(function(count) {
    expect(count).toEqual(6);
  });
});
+
+ + + +
+
+ + +

+

Directive Decorator Example

+

Failed interpolated expressions in ng-href attributes can easily go unnoticed. We can decorate ngHref to warn us of +those conditions.

+

+ +

+ + +
+ + +
+
angular.module('urlDecorator', []).

controller('Ctrl', ['$scope', function($scope) {
  $scope.id = 3;
  $scope.warnCount = 0; // for testing
}]).

config(['$provide', function($provide) {

  // matchExpressions looks for interpolation markup in the directive attribute, extracts the expressions
  // from that markup (if they exist) and returns an array of those expressions
  function matchExpressions(str) {
    var exps = str.match(/{{([^}]+)}}/g);

    // if there isn't any, get out of here
    if (exps === null) return;

    exps = exps.map(function(exp) {
      var prop = exp.match(/[^{}]+/);
      return prop === null ? null : prop[0];
    });

    return exps;
  }

  // remember: directives must be selected by appending 'Directive' to the directive selector
  $provide.decorator('ngHrefDirective', [
    '$delegate',
    '$log',
    '$parse',
    function($delegate, $log, $parse) {

      // store the original link fn
      var originalLinkFn = $delegate[0].link;

      // replace the compile fn
      $delegate[0].compile = function(tElem, tAttr) {

        // store the original exp in the directive attribute for our warning message
        var originalExp = tAttr.ngHref;

        // get the interpolated expressions
        var exps = matchExpressions(originalExp);

        // create and store the getters using $parse
        var getters = exps.map(function(exp) {
          return exp && $parse(exp);
        });

        return function newLinkFn(scope, elem, attr) {
          // fire the originalLinkFn
          originalLinkFn.apply($delegate[0], arguments);

          // observe the directive attr and check the expressions
          attr.$observe('ngHref', function(val) {

            // if we have getters and getters is an array...
            if (getters && angular.isArray(getters)) {

              // loop through the getters and process them
              angular.forEach(getters, function(g, idx) {

                // if val is truthy, then the warning won't log
                var val = angular.isFunction(g) ? g(scope) : true;
                if (!val) {
                  $log.warn('NgHref Warning: "' + exps[idx] + '" in the expression "' + originalExp +
                    '" is falsy!');

                  scope.warnCount++; // for testing
                }

              });

            }

          });

        };

      };

      // get rid of the old link function since we return a link function in compile
      delete $delegate[0].link;

      // return the $delegate
      return $delegate;

    }

  ]);

}]);
+
+ +
+
<div ng-controller="Ctrl">
  <a ng-href="/products/{{ id }}/view" id="id3">View Product {{ id }}</a>
  - <strong>id === 3</strong>, so no warning<br>
  <a ng-href="/products/{{ id + 5 }}/view" id="id8">View Product {{ id + 5 }}</a>
  - <strong>id + 5 === 8</strong>, so no warning<br>
  <a ng-href="/products/{{ someOtherId }}/view" id="someOtherId">View Product {{ someOtherId }}</a>
  - <strong style="background-color: #ffff00;">someOtherId === undefined</strong>, so warn<br>
  <a ng-href="/products/{{ someOtherId + 5 }}/view" id="someOtherId5">View Product {{ someOtherId + 5 }}</a>
  - <strong>someOtherId + 5 === 5</strong>, so no warning<br>
  <div>Warn Count: {{ warnCount }}</div>
</div>
+
+ +
+
it('should warn when an expression in the interpolated value is falsy', function() {
  var id3 = element(by.id('id3'));
  var id8 = element(by.id('id8'));
  var someOther = element(by.id('someOtherId'));
  var someOther5 = element(by.id('someOtherId5'));

  expect(id3.getText()).toEqual('View Product 3');
  expect(id3.getAttribute('href')).toContain('/products/3/view');

  expect(id8.getText()).toEqual('View Product 8');
  expect(id8.getAttribute('href')).toContain('/products/8/view');

  expect(someOther.getText()).toEqual('View Product');
  expect(someOther.getAttribute('href')).toContain('/products//view');

  expect(someOther5.getText()).toEqual('View Product 5');
  expect(someOther5.getAttribute('href')).toContain('/products/5/view');

  expect(element(by.binding('warnCount')).getText()).toEqual('Warn Count: 1');
});
+
+ + + +
+
+ + +

+

Filter Decorator Example

+

Let's say we have created an app that uses the default format for many of our Date filters. Suddenly requirements have +changed (that never happens) and we need all of our default dates to be 'shortDate' instead of 'mediumDate'.

+

+ +

+ + +
+ + +
+
angular.module('filterDecorator', []).

controller('Ctrl', ['$scope', function($scope) {
  $scope.genesis = new Date(2010, 0, 5);
  $scope.ngConf = new Date(2016, 4, 4);
}]).

config(['$provide', function($provide) {

  $provide.decorator('dateFilter', [
    '$delegate',
    function dateDecorator($delegate) {

      // store the original filter
      var originalFilter = $delegate;

      // return our filter
      return shortDateDefault;

      // shortDateDefault sets the format to shortDate if it is falsy
      function shortDateDefault(date, format, timezone) {
        if (!format) format = 'shortDate';

        // return the result of the original filter
        return originalFilter(date, format, timezone);
      }

    }

  ]);

}]);
+
+ +
+
<div ng-controller="Ctrl">
  <div id="genesis">Initial Commit default to short date: {{ genesis | date }}</div>
  <div>ng-conf 2016 default short date: {{ ngConf | date }}</div>
  <div id="ngConf">ng-conf 2016 with full date format: {{ ngConf | date:'fullDate' }}</div>
</div>
+
+ +
+
it('should default date filter to short date format', function() {
  expect(element(by.id('genesis')).getText())
    .toMatch(/Initial Commit default to short date: \d{1,2}\/\d{1,2}\/\d{2}/);
});

it('should still allow dates to be formatted', function() {
  expect(element(by.id('ngConf')).getText())
    .toMatch(/ng-conf 2016 with full date format: [A-Za-z]+, [A-Za-z]+ \d{1,2}, \d{4}/);
});
+
+ + + +
+
+ + +

+ + diff --git a/1.6.6/docs/partials/guide/di.html b/1.6.6/docs/partials/guide/di.html new file mode 100644 index 000000000..8c3d6ec48 --- /dev/null +++ b/1.6.6/docs/partials/guide/di.html @@ -0,0 +1,247 @@ + Improve this Doc + + +

Dependency Injection

+

Dependency Injection (DI) is a software design pattern that deals with how components get hold of +their dependencies.

+

The Angular injector subsystem is in charge of creating components, resolving their dependencies, +and providing them to other components as requested.

+

Using Dependency Injection

+

DI is pervasive throughout Angular. You can use it when defining components or when providing run +and config blocks for a module.

+
    +
  • Components such as services, directives, filters, and animations are defined by an injectable +factory method or constructor function. These components can be injected with "service" and "value" +components as dependencies.

    +
  • +
  • Controllers are defined by a constructor function, which can be injected with any of the "service" +and "value" components as dependencies, but they can also be provided with special dependencies. See +Controllers below for a list of these special dependencies.

    +
  • +
  • The run method accepts a function, which can be injected with "service", "value" and "constant" +components as dependencies. Note that you cannot inject "providers" into run blocks.

    +
  • +
  • The config method accepts a function, which can be injected with "provider" and "constant" +components as dependencies. Note that you cannot inject "service" or "value" components into +configuration.

    +
  • +
+

See Modules for more details about run and config +blocks.

+

Factory Methods

+

The way you define a directive, service, or filter is with a factory function. +The factory methods are registered with modules. The recommended way of declaring factories is:

+
angular.module('myModule', [])
+.factory('serviceId', ['depService', function(depService) {
+  // ...
+}])
+.directive('directiveName', ['depService', function(depService) {
+  // ...
+}])
+.filter('filterName', ['depService', function(depService) {
+  // ...
+}]);
+
+

Module Methods

+

We can specify functions to run at configuration and run time for a module by calling the config +and run methods. These functions are injectable with dependencies just like the factory functions +above.

+
angular.module('myModule', [])
+.config(['depProvider', function(depProvider) {
+  // ...
+}])
+.run(['depService', function(depService) {
+  // ...
+}]);
+
+

Controllers

+

Controllers are "classes" or "constructor functions" that are responsible for providing the +application behavior that supports the declarative markup in the template. The recommended way of +declaring Controllers is using the array notation:

+
someModule.controller('MyController', ['$scope', 'dep1', 'dep2', function($scope, dep1, dep2) {
+  ...
+  $scope.aMethod = function() {
+    ...
+  }
+  ...
+}]);
+
+

Unlike services, there can be many instances of the same type of controller in an application.

+

Moreover, additional dependencies are made available to Controllers:

+
    +
  • $scope: Controllers are associated with an element in the DOM and so are +provided with access to the scope. Other components (like services) only have +access to the $rootScope service.
  • +
  • resolves: If a controller is instantiated as part of a route, +then any values that are resolved as part of the route are made available for injection into the +controller.
  • +
+

Dependency Annotation

+

Angular invokes certain functions (like service factories and controllers) via the injector. +You need to annotate these functions so that the injector knows what services to inject into +the function. There are three ways of annotating your code with service name information:

+
    +
  • Using the inline array annotation (preferred)
  • +
  • Using the $inject property annotation
  • +
  • Implicitly from the function parameter names (has caveats)
  • +
+

Inline Array Annotation

+

This is the preferred way to annotate application components. This is how the examples in the +documentation are written.

+

For example:

+
someModule.controller('MyController', ['$scope', 'greeter', function($scope, greeter) {
+  // ...
+}]);
+
+

Here we pass an array whose elements consist of a list of strings (the names of the dependencies) +followed by the function itself.

+

When using this type of annotation, take care to keep the annotation array in sync with the +parameters in the function declaration.

+

$inject Property Annotation

+

To allow the minifiers to rename the function parameters and still be able to inject the right services, +the function needs to be annotated with the $inject property. The $inject property is an array +of service names to inject.

+
var MyController = function($scope, greeter) {
+  // ...
+}
+MyController.$inject = ['$scope', 'greeter'];
+someModule.controller('MyController', MyController);
+
+

In this scenario the ordering of the values in the $inject array must match the ordering of the +parameters in MyController.

+

Just like with the array annotation, you'll need to take care to keep the $inject in sync with +the parameters in the function declaration.

+

Implicit Annotation

+
+Careful: If you plan to minify +your code, your service names will get renamed and break your app. +
+ +

The simplest way to get hold of the dependencies is to assume that the function parameter names +are the names of the dependencies.

+
someModule.controller('MyController', function($scope, greeter) {
+  // ...
+});
+
+

Given a function, the injector can infer the names of the services to inject by examining the +function declaration and extracting the parameter names. In the above example, $scope and +greeter are two services which need to be injected into the function.

+

One advantage of this approach is that there's no array of names to keep in sync with the +function parameters. You can also freely reorder dependencies.

+

However this method will not work with JavaScript minifiers/obfuscators because of how they +rename parameters.

+

Tools like ng-annotate let you use implicit dependency +annotations in your app and automatically add inline array annotations prior to minifying. +If you decide to take this approach, you probably want to use ng-strict-di.

+

Because of these caveats, we recommend avoiding this style of annotation.

+

Using Strict Dependency Injection

+

You can add an ng-strict-di directive on the same element as ng-app to opt into strict DI mode:

+
<!doctype html>
+<html ng-app="myApp" ng-strict-di>
+<body>
+  I can add: {{ 1 + 2 }}.
+  <script src="angular.js"></script>
+</body>
+</html>
+
+

Strict mode throws an error whenever a service tries to use implicit annotations.

+

Consider this module, which includes a willBreak service that uses implicit DI:

+
angular.module('myApp', [])
+.factory('willBreak', function($rootScope) {
+  // $rootScope is implicitly injected
+})
+.run(['willBreak', function(willBreak) {
+  // Angular will throw when this runs
+}]);
+
+

When the willBreak service is instantiated, Angular will throw an error because of strict mode. +This is useful when using a tool like ng-annotate to +ensure that all of your application components have annotations.

+

If you're using manual bootstrapping, you can also use strict DI by providing strictDi: true in +the optional config argument:

+
angular.bootstrap(document, ['myApp'], {
+  strictDi: true
+});
+
+

Why Dependency Injection?

+

This section motivates and explains Angular's use of DI. For how to use DI, see above.

+

For in-depth discussion about DI, see +Dependency Injection at Wikipedia, +Inversion of Control by Martin Fowler, +or read about DI in your favorite software design pattern book.

+

There are only three ways a component (object or function) can get a hold of its dependencies:

+
    +
  1. The component can create the dependency, typically using the new operator.
  2. +
  3. The component can look up the dependency, by referring to a global variable.
  4. +
  5. The component can have the dependency passed to it where it is needed.
  6. +
+

The first two options of creating or looking up dependencies are not optimal because they hard +code the dependency to the component. This makes it difficult, if not impossible, to modify the +dependencies. This is especially problematic in tests, where it is often desirable to provide mock +dependencies for test isolation.

+

The third option is the most viable, since it removes the responsibility of locating the +dependency from the component. The dependency is simply handed to the component.

+
function SomeClass(greeter) {
+  this.greeter = greeter;
+}
+
+SomeClass.prototype.doSomething = function(name) {
+  this.greeter.greet(name);
+}
+
+

In the above example SomeClass is not concerned with creating or locating the greeter +dependency, it is simply handed the greeter when it is instantiated.

+

This is desirable, but it puts the responsibility of getting hold of the dependency on the +code that constructs SomeClass.

+

+

To manage the responsibility of dependency creation, each Angular application has an injector. The injector is a +service locator that is responsible for +construction and lookup of dependencies.

+

Here is an example of using the injector service:

+
// Provide the wiring information in a module
+var myModule = angular.module('myModule', []);
+
+

Teach the injector how to build a greeter service. Notice that greeter is dependent on the +$window service. The greeter service is an object that contains a greet method.

+
myModule.factory('greeter', function($window) {
+  return {
+    greet: function(text) {
+      $window.alert(text);
+    }
+  };
+});
+
+

Create a new injector that can provide components defined in our myModule module and request our +greeter service from the injector. (This is usually done automatically by angular bootstrap).

+
var injector = angular.injector(['ng', 'myModule']);
+var greeter = injector.get('greeter');
+
+

Asking for dependencies solves the issue of hard coding, but it also means that the injector needs +to be passed throughout the application. Passing the injector breaks the +Law of Demeter. To remedy this, we use a declarative +notation in our HTML templates, to hand the responsibility of creating components over to the +injector, as in this example:

+
<div ng-controller="MyController">
+  <button ng-click="sayHello()">Hello</button>
+</div>
+
+
function MyController($scope, greeter) {
+  $scope.sayHello = function() {
+    greeter.greet('Hello World');
+  };
+}
+
+

When Angular compiles the HTML, it processes the ng-controller directive, which in turn +asks the injector to create an instance of the controller and its dependencies.

+
injector.instantiate(MyController);
+
+

This is all done behind the scenes. Notice that by having the ng-controller ask the injector to +instantiate the class, it can satisfy all of the dependencies of MyController without the +controller ever knowing about the injector.

+

This is the best outcome. The application code simply declares the dependencies it needs, without +having to deal with the injector. This setup does not break the Law of Demeter.

+
+Note: Angular uses +constructor injection. +
+ diff --git a/1.6.6/docs/partials/guide/directive.html b/1.6.6/docs/partials/guide/directive.html new file mode 100644 index 000000000..9f9894714 --- /dev/null +++ b/1.6.6/docs/partials/guide/directive.html @@ -0,0 +1,935 @@ + Improve this Doc + + +

Creating Custom Directives

+
+Note: this guide is targeted towards developers who are already familiar with AngularJS basics. +If you're just getting started, we recommend the tutorial first. +If you're looking for the directives API, you can find it in the +$compile API docs. +
+ + +

This document explains when you'd want to create your own directives in your AngularJS app, and +how to implement them.

+

What are Directives?

+

At a high level, directives are markers on a DOM element (such as an attribute, element +name, comment or CSS class) that tell AngularJS's HTML compiler ($compile) +to attach a specified behavior to that DOM element (e.g. via event listeners), or even to transform +the DOM element and its children.

+

Angular comes with a set of these directives built-in, like ngBind, ngModel, and ngClass. +Much like you create controllers and services, you can create your own directives for Angular to use. +When Angular bootstraps your application, the +HTML compiler traverses the DOM matching directives against the DOM elements.

+
+What does it mean to "compile" an HTML template? + +For AngularJS, "compilation" means attaching directives to the HTML to make it interactive. +The reason we use the term "compile" is that the recursive process of attaching directives +mirrors the process of compiling source code in +compiled programming languages. +
+ + +

Matching Directives

+

Before we can write a directive, we need to know how Angular's HTML compiler +determines when to use a given directive.

+

Similar to the terminology used when an element matches a selector, we say an element matches a +directive when the directive is part of its declaration.

+

In the following example, we say that the <input> element matches the ngModel directive

+
<input ng-model="foo">
+
+

The following <input> element also matches ngModel:

+
<input data-ng-model="foo">
+
+

And the following <person> element matches the person directive:

+
<person>{{name}}</person>
+
+

Normalization

+

Angular normalizes an element's tag and attribute name to determine which elements match which +directives. We typically refer to directives by their case-sensitive +camelCase normalized name (e.g. ngModel). +However, since HTML is case-insensitive, we refer to directives in the DOM by lower-case +forms, typically using dash-delimited +attributes on DOM elements (e.g. ng-model).

+

The normalization process is as follows:

+
    +
  1. Strip x- and data- from the front of the element/attributes.
  2. +
  3. Convert the :, -, or _-delimited name to camelCase.
  4. +
+

For example, the following forms are all equivalent and match the ngBind directive:

+

+ +

+ + +
+ + +
+
<div ng-controller="Controller">
  Hello <input ng-model='name'> <hr/>
  <span ng-bind="name"></span> <br/>
  <span ng:bind="name"></span> <br/>
  <span ng_bind="name"></span> <br/>
  <span data-ng-bind="name"></span> <br/>
  <span x-ng-bind="name"></span> <br/>
</div>
+
+ +
+
angular.module('docsBindExample', [])
.controller('Controller', ['$scope', function($scope) {
  $scope.name = 'Max Karl Ernst Ludwig Planck (April 23, 1858 – October 4, 1947)';
}]);
+
+ +
+
it('should show off bindings', function() {
  var containerElm = element(by.css('div[ng-controller="Controller"]'));
  var nameBindings = containerElm.all(by.binding('name'));

  expect(nameBindings.count()).toBe(5);
  nameBindings.each(function(elem) {
    expect(elem.getText()).toEqual('Max Karl Ernst Ludwig Planck (April 23, 1858 – October 4, 1947)');
  });
});
+
+ + + +
+
+ + +

+
+Best Practice: Prefer using the dash-delimited format (e.g. ng-bind for ngBind). +If you want to use an HTML validating tool, you can instead use the data-prefixed version (e.g. +data-ng-bind for ngBind). +The other forms shown above are accepted for legacy reasons but we advise you to avoid them. +
+ +

Directive types

+

$compile can match directives based on element names (E), attributes (A), class names (C), +and comments (M).

+

The built-in AngularJS directives show in their documentation page which type of matching they support.

+

The following demonstrates the various ways a directive that matches all 4 types +(myDir in this case) can be referenced from within a template.

+
<my-dir></my-dir>
+<span my-dir="exp"></span>
+<!-- directive: my-dir exp -->
+<span class="my-dir: exp;"></span>
+
+

A directive can specify which of the 4 matching types it supports in the +restrict property of the directive definition object. +The default is EA.

+
+Best Practice: Prefer using directives via tag name and attributes over comment and class names. +Doing so generally makes it easier to determine what directives a given element matches. +
+ +
+Best Practice: Comment directives were commonly used in places where the DOM API limits the +ability to create directives that spanned multiple elements (e.g. inside <table> elements). +AngularJS 1.2 introduces ng-repeat-start and ng-repeat-end +as a better solution to this problem. Developers are encouraged to use this over custom comment +directives when possible. +
+ + +

Creating Directives

+

First let's talk about the API for registering directives. Much like +controllers, directives are registered on modules. To register a directive, you use the +module.directive API. module.directive takes the +normalized directive name +followed by a factory function. This factory function should return an object with the different +options to tell $compile how the directive should behave when matched.

+

The factory function is invoked only once when the +compiler matches the directive for the first time. You can perform any +initialization work here. The function is invoked using +$injector.invoke which makes it injectable just like a +controller.

+

We'll go over a few common examples of directives, then dive deep into the different options +and compilation process.

+
+Best Practice: In order to avoid collisions with some future standard, it's best to prefix your own +directive names. For instance, if you created a <carousel> directive, it would be problematic if HTML7 +introduced the same element. A two or three letter prefix (e.g. btfCarousel) works well. Similarly, do +not prefix your own directives with ng or they might conflict with directives included in a future +version of Angular. +
+ +

For the following examples, we'll use the prefix my (e.g. myCustomer).

+

Template-expanding directive

+

Let's say you have a chunk of your template that represents a customer's information. This template +is repeated many times in your code. When you change it in one place, you have to change it in +several others. This is a good opportunity to use a directive to simplify your template.

+

Let's create a directive that simply replaces its contents with a static template:

+

+ +

+ + +
+ + +
+
angular.module('docsSimpleDirective', [])
.controller('Controller', ['$scope', function($scope) {
  $scope.customer = {
    name: 'Naomi',
    address: '1600 Amphitheatre'
  };
}])
.directive('myCustomer', function() {
  return {
    template: 'Name: {{customer.name}} Address: {{customer.address}}'
  };
});
+
+ +
+
<div ng-controller="Controller">
  <div my-customer></div>
</div>
+
+ + + +
+
+ + +

+

Notice that we have bindings in this directive. After $compile compiles and links +<div my-customer></div>, it will try to match directives on the element's children. This means you +can compose directives of other directives. We'll see how to do that in +an example +below.

+

In the example above we in-lined the value of the template option, but this will become annoying +as the size of your template grows.

+
+Best Practice: Unless your template is very small, it's typically better to break it apart into +its own HTML file and load it with the templateUrl option. +
+ +

If you are familiar with ngInclude, templateUrl works just like it. Here's the same example +using templateUrl instead:

+

+ +

+ + +
+ + +
+
angular.module('docsTemplateUrlDirective', [])
.controller('Controller', ['$scope', function($scope) {
  $scope.customer = {
    name: 'Naomi',
    address: '1600 Amphitheatre'
  };
}])
.directive('myCustomer', function() {
  return {
    templateUrl: 'my-customer.html'
  };
});
+
+ +
+
<div ng-controller="Controller">
  <div my-customer></div>
</div>
+
+ +
+
Name: {{customer.name}} Address: {{customer.address}}
+
+ + + +
+
+ + +

+

templateUrl can also be a function which returns the URL of an HTML template to be loaded and +used for the directive. Angular will call the templateUrl function with two parameters: the +element that the directive was called on, and an attr object associated with that element.

+
+Note: You do not currently have the ability to access scope variables from the templateUrl +function, since the template is requested before the scope is initialized. +
+ +

+ +

+ + +
+ + +
+
angular.module('docsTemplateUrlDirective', [])
.controller('Controller', ['$scope', function($scope) {
  $scope.customer = {
    name: 'Naomi',
    address: '1600 Amphitheatre'
  };
}])
.directive('myCustomer', function() {
  return {
    templateUrl: function(elem, attr) {
      return 'customer-' + attr.type + '.html';
    }
  };
});
+
+ +
+
<div ng-controller="Controller">
  <div my-customer type="name"></div>
  <div my-customer type="address"></div>
</div>
+
+ +
+
Name: {{customer.name}}
+
+ +
+
Address: {{customer.address}}
+
+ + + +
+
+ + +

+
+Note: When you create a directive, it is restricted to attribute and elements only by default. In order to +create directives that are triggered by class name, you need to use the restrict option. +
+ +

The restrict option is typically set to:

+
    +
  • 'A' - only matches attribute name
  • +
  • 'E' - only matches element name
  • +
  • 'C' - only matches class name
  • +
  • 'M' - only matches comment
  • +
+

These restrictions can all be combined as needed:

+
    +
  • 'AEC' - matches either attribute or element or class name
  • +
+

Let's change our directive to use restrict: 'E':

+

+ +

+ + +
+ + +
+
angular.module('docsRestrictDirective', [])
.controller('Controller', ['$scope', function($scope) {
  $scope.customer = {
    name: 'Naomi',
    address: '1600 Amphitheatre'
  };
}])
.directive('myCustomer', function() {
  return {
    restrict: 'E',
    templateUrl: 'my-customer.html'
  };
});
+
+ +
+
<div ng-controller="Controller">
  <my-customer></my-customer>
</div>
+
+ +
+
Name: {{customer.name}} Address: {{customer.address}}
+
+ + + +
+
+ + +

+

For more on the restrict property, see the +API docs.

+
+When should I use an attribute versus an element? + +Use an element when you are creating a component that is in control of the template. The common case +for this is when you are creating a Domain-Specific Language for parts of your template. + +Use an attribute when you are decorating an existing element with new functionality. +
+ +

Using an element for the myCustomer directive is clearly the right choice because you're not +decorating an element with some "customer" behavior; you're defining the core behavior of the +element as a customer component.

+

Isolating the Scope of a Directive

+

Our myCustomer directive above is great, but it has a fatal flaw. We can only use it once within a +given scope.

+

In its current implementation, we'd need to create a different controller each time in order to +re-use such a directive:

+

+ +

+ + +
+ + +
+
angular.module('docsScopeProblemExample', [])
.controller('NaomiController', ['$scope', function($scope) {
  $scope.customer = {
    name: 'Naomi',
    address: '1600 Amphitheatre'
  };
}])
.controller('IgorController', ['$scope', function($scope) {
  $scope.customer = {
    name: 'Igor',
    address: '123 Somewhere'
  };
}])
.directive('myCustomer', function() {
  return {
    restrict: 'E',
    templateUrl: 'my-customer.html'
  };
});
+
+ +
+
<div ng-controller="NaomiController">
  <my-customer></my-customer>
</div>
<hr>
<div ng-controller="IgorController">
  <my-customer></my-customer>
</div>
+
+ +
+
Name: {{customer.name}} Address: {{customer.address}}
+
+ + + +
+
+ + +

+

This is clearly not a great solution.

+

What we want to be able to do is separate the scope inside a directive from the scope +outside, and then map the outer scope to a directive's inner scope. We can do this by creating what +we call an isolate scope. To do this, we can use a directive's scope option:

+

+ +

+ + +
+ + +
+
angular.module('docsIsolateScopeDirective', [])
.controller('Controller', ['$scope', function($scope) {
  $scope.naomi = { name: 'Naomi', address: '1600 Amphitheatre' };
  $scope.igor = { name: 'Igor', address: '123 Somewhere' };
}])
.directive('myCustomer', function() {
  return {
    restrict: 'E',
    scope: {
      customerInfo: '=info'
    },
    templateUrl: 'my-customer-iso.html'
  };
});
+
+ +
+
<div ng-controller="Controller">
  <my-customer info="naomi"></my-customer>
  <hr>
  <my-customer info="igor"></my-customer>
</div>
+
+ +
+
Name: {{customerInfo.name}} Address: {{customerInfo.address}}
+
+ + + +
+
+ + +

+

Looking at index.html, the first <my-customer> element binds the info attribute to naomi, +which we have exposed on our controller's scope. The second binds info to igor.

+

Let's take a closer look at the scope option:

+
//...
+scope: {
+  customerInfo: '=info'
+},
+//...
+
+

The scope option is an object that contains a property for each isolate scope binding. In this +case it has just one property:

+
    +
  • Its name (customerInfo) corresponds to the directive's isolate scope property, +customerInfo.
  • +
  • Its value (=info) tells $compile to bind to the info attribute.
  • +
+
+Note: These =attr attributes in the scope option of directives are normalized just like +directive names. To bind to the attribute in <div bind-to-this="thing">, you'd specify a binding +of =bindToThis. +
+ +

For cases where the attribute name is the same as the value you want to bind to inside the +directive's scope, you can use this shorthand syntax:

+
...
+scope: {
+  // same as '=customer'
+  customer: '='
+},
+...
+
+

Besides making it possible to bind different data to the scope inside a directive, using an isolated +scope has another effect.

+

We can show this by adding another property, vojta, to our scope and trying to access it from +within our directive's template:

+

+ +

+ + +
+ + +
+
angular.module('docsIsolationExample', [])
.controller('Controller', ['$scope', function($scope) {
  $scope.naomi = { name: 'Naomi', address: '1600 Amphitheatre' };
  $scope.vojta = { name: 'Vojta', address: '3456 Somewhere Else' };
}])
.directive('myCustomer', function() {
  return {
    restrict: 'E',
    scope: {
      customerInfo: '=info'
    },
    templateUrl: 'my-customer-plus-vojta.html'
  };
});
+
+ +
+
<div ng-controller="Controller">
  <my-customer info="naomi"></my-customer>
</div>
+
+ +
+
Name: {{customerInfo.name}} Address: {{customerInfo.address}}
<hr>
Name: {{vojta.name}} Address: {{vojta.address}}
+
+ + + +
+
+ + +

+

Notice that {{vojta.name}} and {{vojta.address}} are empty, meaning they are undefined. +Although we defined vojta in the controller, it's not available within the directive.

+

As the name suggests, the isolate scope of the directive isolates everything except models that +you've explicitly added to the scope: {} hash object. This is helpful when building reusable +components because it prevents a component from changing your model state except for the models +that you explicitly pass in.

+
+Note: Normally, a scope prototypically inherits from its parent. An isolated scope does not. +See the "Directive Definition Object - scope" section +for more information about isolate scopes. +
+ +
+Best Practice: Use the scope option to create isolate scopes when making components that you +want to reuse throughout your app. +
+ + +

Creating a Directive that Manipulates the DOM

+

In this example we will build a directive that displays the current time. +Once a second, it updates the DOM to reflect the current time.

+

Directives that want to modify the DOM typically use the link option to register DOM listeners +as well as update the DOM. It is executed after the template has been cloned and is where +directive logic will be put.

+

link takes a function with the following signature, +function link(scope, element, attrs, controller, transcludeFn) { ... }, where:

+
    +
  • scope is an Angular scope object.
  • +
  • element is the jqLite-wrapped element that this directive matches.
  • +
  • attrs is a hash object with key-value pairs of normalized attribute names and their +corresponding attribute values.
  • +
  • controller is the directive's required controller instance(s) or its own controller (if any). +The exact value depends on the directive's require property.
  • +
  • transcludeFn is a transclude linking function pre-bound to the correct transclusion scope.
  • +
+
+For more details on the link option refer to the $compile API page. +
+ +

In our link function, we want to update the displayed time once a second, or whenever a user +changes the time formatting string that our directive binds to. We will use the $interval service +to call a handler on a regular basis. This is easier than using $timeout but also works better with +end-to-end testing, where we want to ensure that all $timeouts have completed before completing the test. +We also want to remove the $interval if the directive is deleted so we don't introduce a memory leak.

+

+ +

+ + +
+ + +
+
angular.module('docsTimeDirective', [])
.controller('Controller', ['$scope', function($scope) {
  $scope.format = 'M/d/yy h:mm:ss a';
}])
.directive('myCurrentTime', ['$interval', 'dateFilter', function($interval, dateFilter) {

  function link(scope, element, attrs) {
    var format,
        timeoutId;

    function updateTime() {
      element.text(dateFilter(new Date(), format));
    }

    scope.$watch(attrs.myCurrentTime, function(value) {
      format = value;
      updateTime();
    });

    element.on('$destroy', function() {
      $interval.cancel(timeoutId);
    });

    // start the UI update process; save the timeoutId for canceling
    timeoutId = $interval(function() {
      updateTime(); // update DOM
    }, 1000);
  }

  return {
    link: link
  };
}]);
+
+ +
+
<div ng-controller="Controller">
  Date format: <input ng-model="format"> <hr/>
  Current time is: <span my-current-time="format"></span>
</div>
+
+ + + +
+
+ + +

+

There are a couple of things to note here. +Just like the module.controller API, the function argument in module.directive is dependency +injected. Because of this, we can use $interval and dateFilter inside our directive's link +function.

+

We register an event element.on('$destroy', ...). What fires this $destroy event?

+

There are a few special events that AngularJS emits. When a DOM node that has been compiled +with Angular's compiler is destroyed, it emits a $destroy event. Similarly, when an AngularJS +scope is destroyed, it broadcasts a $destroy event to listening scopes.

+

By listening to this event, you can remove event listeners that might cause memory leaks. +Listeners registered to scopes and elements are automatically cleaned up when they are destroyed, +but if you registered a listener on a service, or registered a listener on a DOM node that isn't +being deleted, you'll have to clean it up yourself or you risk introducing a memory leak.

+
+Best Practice: Directives should clean up after themselves. You can use +element.on('$destroy', ...) or scope.$on('$destroy', ...) to run a clean-up function when the +directive is removed. +
+ + +

Creating a Directive that Wraps Other Elements

+

We've seen that you can pass in models to a directive using the isolate scope, but sometimes +it's desirable to be able to pass in an entire template rather than a string or an object. +Let's say that we want to create a "dialog box" component. The dialog box should be able to +wrap any arbitrary content.

+

To do this, we need to use the transclude option.

+

+ +

+ + +
+ + +
+
angular.module('docsTransclusionDirective', [])
.controller('Controller', ['$scope', function($scope) {
  $scope.name = 'Tobias';
}])
.directive('myDialog', function() {
  return {
    restrict: 'E',
    transclude: true,
    scope: {},
    templateUrl: 'my-dialog.html'
  };
});
+
+ +
+
<div ng-controller="Controller">
  <my-dialog>Check out the contents, {{name}}!</my-dialog>
</div>
+
+ +
+
<div class="alert" ng-transclude></div>
+
+ + + +
+
+ + +

+

What does this transclude option do, exactly? transclude makes the contents of a directive with +this option have access to the scope outside of the directive rather than inside.

+

To illustrate this, see the example below. Notice that we've added a link function in script.js +that redefines name as Jeff. What do you think the {{name}} binding will resolve to now?

+

+ +

+ + +
+ + +
+
angular.module('docsTransclusionExample', [])
.controller('Controller', ['$scope', function($scope) {
  $scope.name = 'Tobias';
}])
.directive('myDialog', function() {
  return {
    restrict: 'E',
    transclude: true,
    scope: {},
    templateUrl: 'my-dialog.html',
    link: function(scope) {
      scope.name = 'Jeff';
    }
  };
});
+
+ +
+
<div ng-controller="Controller">
  <my-dialog>Check out the contents, {{name}}!</my-dialog>
</div>
+
+ +
+
<div class="alert" ng-transclude></div>
+
+ + + +
+
+ + +

+

Ordinarily, we would expect that {{name}} would be Jeff. However, we see in this example that +the {{name}} binding is still Tobias.

+

The transclude option changes the way scopes are nested. It makes it so that the contents of a +transcluded directive have whatever scope is outside the directive, rather than whatever scope is on +the inside. In doing so, it gives the contents access to the outside scope.

+

Note that if the directive did not create its own scope, then scope in scope.name = 'Jeff' would +reference the outside scope and we would see Jeff in the output.

+

This behavior makes sense for a directive that wraps some content, because otherwise you'd have to +pass in each model you wanted to use separately. If you have to pass in each model that you want to +use, then you can't really have arbitrary contents, can you?

+
+Best Practice: only use transclude: true when you want to create a directive that wraps +arbitrary content. +
+ +

Next, we want to add buttons to this dialog box, and allow someone using the directive to bind their +own behavior to it.

+

+ +

+ + +
+ + +
+
angular.module('docsIsoFnBindExample', [])
.controller('Controller', ['$scope', '$timeout', function($scope, $timeout) {
  $scope.name = 'Tobias';
  $scope.message = '';
  $scope.hideDialog = function(message) {
    $scope.message = message;
    $scope.dialogIsHidden = true;
    $timeout(function() {
      $scope.message = '';
      $scope.dialogIsHidden = false;
    }, 2000);
  };
}])
.directive('myDialog', function() {
  return {
    restrict: 'E',
    transclude: true,
    scope: {
      'close': '&onClose'
    },
    templateUrl: 'my-dialog-close.html'
  };
});
+
+ +
+
<div ng-controller="Controller">
  {{message}}
  <my-dialog ng-hide="dialogIsHidden" on-close="hideDialog(message)">
    Check out the contents, {{name}}!
  </my-dialog>
</div>
+
+ +
+
<div class="alert">
  <a href class="close" ng-click="close({message: 'closing for now'})">&times;</a>
  <div ng-transclude></div>
</div>
+
+ + + +
+
+ + +

+

We want to run the function we pass by invoking it from the directive's scope, but have it run +in the context of the scope where it's registered.

+

We saw earlier how to use =attr in the scope option, but in the above example, we're using +&attr instead. The & binding allows a directive to trigger evaluation of an expression in +the context of the original scope, at a specific time. Any legal expression is allowed, including +an expression which contains a function call. Because of this, & bindings are ideal for binding +callback functions to directive behaviors.

+

When the user clicks the x in the dialog, the directive's close function is called, thanks to +ng-click. This call to close on the isolated scope actually evaluates the expression +hideDialog(message) in the context of the original scope, thus running Controller's hideDialog +function.

+

Often it's desirable to pass data from the isolate scope via an expression to the +parent scope, this can be done by passing a map of local variable names and values into the expression +wrapper function. For example, the hideDialog function takes a message to display when the dialog +is hidden. This is specified in the directive by calling close({message: 'closing for now'}). +Then the local variable message will be available within the on-close expression.

+
+Best Practice: use &attr in the scope option when you want your directive +to expose an API for binding to behaviors. +
+ + +

Creating a Directive that Adds Event Listeners

+

Previously, we used the link function to create a directive that manipulated its +DOM elements. Building upon that example, let's make a directive that reacts to events on +its elements.

+

For instance, what if we wanted to create a directive that lets a user drag an +element?

+

+ +

+ + +
+ + +
+
angular.module('dragModule', [])
.directive('myDraggable', ['$document', function($document) {
  return {
    link: function(scope, element, attr) {
      var startX = 0, startY = 0, x = 0, y = 0;

      element.css({
       position: 'relative',
       border: '1px solid red',
       backgroundColor: 'lightgrey',
       cursor: 'pointer'
      });

      element.on('mousedown', function(event) {
        // Prevent default dragging of selected content
        event.preventDefault();
        startX = event.pageX - x;
        startY = event.pageY - y;
        $document.on('mousemove', mousemove);
        $document.on('mouseup', mouseup);
      });

      function mousemove(event) {
        y = event.pageY - startY;
        x = event.pageX - startX;
        element.css({
          top: y + 'px',
          left:  x + 'px'
        });
      }

      function mouseup() {
        $document.off('mousemove', mousemove);
        $document.off('mouseup', mouseup);
      }
    }
  };
}]);
+
+ +
+
<span my-draggable>Drag Me</span>
+
+ + + +
+
+ + +

+

Creating Directives that Communicate

+

You can compose any directives by using them within templates.

+

Sometimes, you want a component that's built from a combination of directives.

+

Imagine you want to have a container with tabs in which the contents of the container correspond +to which tab is active.

+

+ +

+ + +
+ + +
+
angular.module('docsTabsExample', [])
.directive('myTabs', function() {
  return {
    restrict: 'E',
    transclude: true,
    scope: {},
    controller: ['$scope', function MyTabsController($scope) {
      var panes = $scope.panes = [];

      $scope.select = function(pane) {
        angular.forEach(panes, function(pane) {
          pane.selected = false;
        });
        pane.selected = true;
      };

      this.addPane = function(pane) {
        if (panes.length === 0) {
          $scope.select(pane);
        }
        panes.push(pane);
      };
    }],
    templateUrl: 'my-tabs.html'
  };
})
.directive('myPane', function() {
  return {
    require: '^^myTabs',
    restrict: 'E',
    transclude: true,
    scope: {
      title: '@'
    },
    link: function(scope, element, attrs, tabsCtrl) {
      tabsCtrl.addPane(scope);
    },
    templateUrl: 'my-pane.html'
  };
});
+
+ +
+
<my-tabs>
  <my-pane title="Hello">
    <p>Lorem ipsum dolor sit amet</p>
  </my-pane>
  <my-pane title="World">
    <em>Mauris elementum elementum enim at suscipit.</em>
    <p><a href ng-click="i = i + 1">counter: {{i || 0}}</a></p>
  </my-pane>
</my-tabs>
+
+ +
+
<div class="tabbable">
  <ul class="nav nav-tabs">
    <li ng-repeat="pane in panes" ng-class="{active:pane.selected}">
      <a href="" ng-click="select(pane)">{{pane.title}}</a>
    </li>
  </ul>
  <div class="tab-content" ng-transclude></div>
</div>
+
+ +
+
<div class="tab-pane" ng-show="selected">
  <h4>{{title}}</h4>
  <div ng-transclude></div>
</div>
+
+ + + +
+
+ + +

+

The myPane directive has a require option with value ^^myTabs. When a directive uses this +option, $compile will throw an error unless the specified controller is found. The ^^ prefix +means that this directive searches for the controller on its parents. (A ^ prefix would make the +directive look for the controller on its own element or its parents; without any prefix, the +directive would look on its own element only.)

+

So where does this myTabs controller come from? Directives can specify controllers using +the unsurprisingly named controller option. As you can see, the myTabs directive uses this +option. Just like ngController, this option attaches a controller to the template of the directive.

+

If it is necessary to reference the controller or any functions bound to the controller from the +template, you can use the option controllerAs to specify the name of the controller as an alias. +The directive needs to define a scope for this configuration to be used. This is particularly useful +in the case when the directive is used as a component.

+

Looking back at myPane's definition, notice the last argument in its link function: tabsCtrl. +When a directive requires a controller, it receives that controller as the fourth argument of its +link function. Taking advantage of this, myPane can call the addPane function of myTabs.

+

If multiple controllers are required, the require option of the directive can take an array argument. +The corresponding parameter being sent to the link function will also be an array.

+
angular.module('docsTabsExample', [])
+.directive('myPane', function() {
+  return {
+    require: ['^^myTabs', 'ngModel'],
+    restrict: 'E',
+    transclude: true,
+    scope: {
+      title: '@'
+    },
+    link: function(scope, element, attrs, controllers) {
+      var tabsCtrl = controllers[0],
+          modelCtrl = controllers[1];
+
+      tabsCtrl.addPane(scope);
+    },
+    templateUrl: 'my-pane.html'
+  };
+});
+
+

Savvy readers may be wondering what the difference is between link and controller. +The basic difference is that controller can expose an API, and link functions can interact with +controllers using require.

+
+Best Practice: use controller when you want to expose an API to other directives. +Otherwise use link. +
+ +

Summary

+

Here we've seen the main use cases for directives. Each of these samples acts as a good starting +point for creating your own directives.

+

You might also be interested in an in-depth explanation of the compilation process that's +available in the compiler guide.

+

The $compile API page has a comprehensive list of directive options for +reference.

+ + diff --git a/1.6.6/docs/partials/guide/e2e-testing.html b/1.6.6/docs/partials/guide/e2e-testing.html new file mode 100644 index 000000000..aa6e5fcd9 --- /dev/null +++ b/1.6.6/docs/partials/guide/e2e-testing.html @@ -0,0 +1,69 @@ + Improve this Doc + + +

E2E Testing

+
+Note: In the past, end-to-end testing could be done with a deprecated tool called +Angular Scenario Runner. That tool +is now in maintenance mode. +
+ +

As applications grow in size and complexity, it becomes unrealistic to rely on manual testing to +verify the correctness of new features, catch bugs and notice regressions. Unit tests +are the first line of defense for catching bugs, but sometimes issues come up with integration +between components which can't be captured in a unit test. End-to-end tests are made to find +these problems.

+

We have built Protractor, an end +to end test runner which simulates user interactions that will help you verify the health of your +Angular application.

+

Using Protractor

+

Protractor is a Node.js program, and runs end-to-end tests that are also +written in JavaScript and run with node. Protractor uses WebDriver +to control browsers and simulate user actions.

+

For more information on Protractor, view getting started +or the api docs.

+

Protractor uses Jasmine for its test syntax. +As in unit testing, a test file is comprised of one or +more it blocks that describe the requirements of your application. it blocks are made of +commands and expectations. Commands tell Protractor to do something with the application +such as navigate to a page or click on a button. Expectations tell Protractor to assert something +about the application's state, such as the value of a field or the current URL.

+

If any expectation within an it block fails, the runner marks the it as "failed" and continues +on to the next block.

+

Test files may also have beforeEach and afterEach blocks, which will be run before or after +each it block regardless of whether the block passes or fails.

+

+

In addition to the above elements, tests may also contain helper functions to avoid duplicating +code in the it blocks.

+

Here is an example of a simple test:

+
describe('TODO list', function() {
+  it('should filter results', function() {
+
+    // Find the element with ng-model="user" and type "jacksparrow" into it
+    element(by.model('user')).sendKeys('jacksparrow');
+
+    // Find the first (and only) button on the page and click it
+    element(by.css(':button')).click();
+
+    // Verify that there are 10 tasks
+    expect(element.all(by.repeater('task in tasks')).count()).toEqual(10);
+
+    // Enter 'groceries' into the element with ng-model="filterText"
+    element(by.model('filterText')).sendKeys('groceries');
+
+    // Verify that now there is only one item in the task list
+    expect(element.all(by.repeater('task in tasks')).count()).toEqual(1);
+  });
+});
+
+

This test describes the requirements of a ToDo list, specifically, that it should be able to +filter the list of items.

+

Example

+

See the angular-seed project for more examples, or look +at the embedded examples in the Angular documentation (For example, $http +has an end-to-end test in the example under the protractor.js tag).

+

Caveats

+

Protractor does not work out-of-the-box with apps that bootstrap manually using +angular.bootstrap. You must use the ng-app directive.

+ + diff --git a/1.6.6/docs/partials/guide/expression.html b/1.6.6/docs/partials/guide/expression.html new file mode 100644 index 000000000..d443d4de2 --- /dev/null +++ b/1.6.6/docs/partials/guide/expression.html @@ -0,0 +1,317 @@ + Improve this Doc + + +

Angular Expressions

+

Angular expressions are JavaScript-like code snippets that are mainly placed in +interpolation bindings such as <span title="{{ attrBinding }}">{{ textBinding }}</span>, +but also used directly in directive attributes such as ng-click="functionExpression()".

+

For example, these are valid expressions in Angular:

+
    +
  • 1+2
  • +
  • a+b
  • +
  • user.name
  • +
  • items[index]
  • +
+

Angular Expressions vs. JavaScript Expressions

+

Angular expressions are like JavaScript expressions with the following differences:

+
    +
  • Context: JavaScript expressions are evaluated against the global window. +In Angular, expressions are evaluated against a scope object.

    +
  • +
  • Forgiving: In JavaScript, trying to evaluate undefined properties generates ReferenceError +or TypeError. In Angular, expression evaluation is forgiving to undefined and null.

    +
  • +
  • Filters: You can use filters within expressions to format data before +displaying it.

    +
  • +
  • No Control Flow Statements: You cannot use the following in an Angular expression: +conditionals, loops, or exceptions.

    +
  • +
  • No Function Declarations: You cannot declare functions in an Angular expression, +even inside ng-init directive.

    +
  • +
  • No RegExp Creation With Literal Notation: You cannot create regular expressions +in an Angular expression.

    +
  • +
  • No Object Creation With New Operator: You cannot use new operator in an Angular expression.

    +
  • +
  • No Bitwise, Comma, And Void Operators: You cannot use +Bitwise, +, or void operators in an Angular expression.

    +
  • +
+

If you want to run more complex JavaScript code, you should make it a controller method and call +the method from your view. If you want to eval() an Angular expression yourself, use the +$eval() method.

+

Example

+

+ +

+ + +
+ + +
+
<span>
  1+2={{1+2}}
</span>
+
+ +
+
it('should calculate expression in binding', function() {
  expect(element(by.binding('1+2')).getText()).toEqual('1+2=3');
});
+
+ + + +
+
+ + +

+

You can try evaluating different expressions here:

+

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController" class="expressions">
  Expression:
  <input type='text' ng-model="expr" size="80"/>
  <button ng-click="addExp(expr)">Evaluate</button>
  <ul>
   <li ng-repeat="expr in exprs track by $index">
     [ <a href="" ng-click="removeExp($index)">X</a> ]
     <code>{{expr}}</code> => <span ng-bind="$parent.$eval(expr)"></span>
    </li>
  </ul>
</div>
+
+ +
+
angular.module('expressionExample', [])
.controller('ExampleController', ['$scope', function($scope) {
  var exprs = $scope.exprs = [];
  $scope.expr = '3*10|currency';
  $scope.addExp = function(expr) {
    exprs.push(expr);
  };

  $scope.removeExp = function(index) {
    exprs.splice(index, 1);
  };
}]);
+
+ +
+
it('should allow user expression testing', function() {
  element(by.css('.expressions button')).click();
  var lis = element(by.css('.expressions ul')).all(by.repeater('expr in exprs'));
  expect(lis.count()).toBe(1);
  expect(lis.get(0).getText()).toEqual('[ X ] 3*10|currency => $30.00');
});
+
+ + + +
+
+ + +

+

Context

+

Angular does not use JavaScript's eval() to evaluate expressions. Instead Angular's +$parse service processes these expressions.

+

Angular expressions do not have direct access to global variables like window, document or location. +This restriction is intentional. It prevents accidental access to the global state – a common source of subtle bugs.

+

Instead use services like $window and $location in functions on controllers, which are then called from expressions. +Such services provide mockable access to globals.

+

It is possible to access the context object using the identifier this and the locals object using the +identifier $locals.

+

+ +

+ + +
+ + +
+
<div class="example2" ng-controller="ExampleController">
  Name: <input ng-model="name" type="text"/>
  <button ng-click="greet()">Greet</button>
  <button ng-click="window.alert('Should not see me')">Won't greet</button>
</div>
+
+ +
+
angular.module('expressionExample', [])
.controller('ExampleController', ['$window', '$scope', function($window, $scope) {
  $scope.name = 'World';

  $scope.greet = function() {
    $window.alert('Hello ' + $scope.name);
  };
}]);
+
+ +
+
it('should calculate expression in binding', function() {
  if (browser.params.browser === 'safari') {
    // Safari can't handle dialogs.
    return;
  }
  element(by.css('[ng-click="greet()"]')).click();

  // We need to give the browser time to display the alert
  browser.wait(protractor.ExpectedConditions.alertIsPresent(), 1000);

  var alertDialog = browser.switchTo().alert();

  expect(alertDialog.getText()).toEqual('Hello World');

  alertDialog.accept();
});
+
+ + + +
+
+ + +

+

Forgiving

+

Expression evaluation is forgiving to undefined and null. In JavaScript, evaluating a.b.c throws +an exception if a is not an object. While this makes sense for a general purpose language, the +expression evaluations are primarily used for data binding, which often look like this:

+
{{a.b.c}}
+
+

It makes more sense to show nothing than to throw an exception if a is undefined (perhaps we are +waiting for the server response, and it will become defined soon). If expression evaluation wasn't +forgiving we'd have to write bindings that clutter the code, for example: {{((a||{}).b||{}).c}}

+

Similarly, invoking a function a.b.c() on undefined or null simply returns undefined.

+

No Control Flow Statements

+

Apart from the ternary operator (a ? b : c), you cannot write a control flow statement in an +expression. The reason behind this is core to the Angular philosophy that application logic should +be in controllers, not the views. If you need a real conditional, loop, or to throw from a view +expression, delegate to a JavaScript method instead.

+

No function declarations or RegExp creation with literal notation

+

You can't declare functions or create regular expressions from within AngularJS expressions. This is +to avoid complex model transformation logic inside templates. Such logic is better placed in a +controller or in a dedicated filter where it can be tested properly.

+

$event

+

Directives like ngClick and ngFocus +expose a $event object within the scope of that expression. The object is an instance of a jQuery +Event Object when jQuery is present or a +similar jqLite object.

+

+ +

+ + +
+ + +
+
<div ng-controller="EventController">
  <button ng-click="clickMe($event)">Event</button>
  <p><code>$event</code>: <pre> {{$event | json}}</pre></p>
  <p><code>clickEvent</code>: <pre>{{clickEvent | json}}</pre></p>
</div>
+
+ +
+
angular.module('eventExampleApp', []).
controller('EventController', ['$scope', function($scope) {
  /*
   * expose the event object to the scope
   */
  $scope.clickMe = function(clickEvent) {
    $scope.clickEvent = simpleKeys(clickEvent);
    console.log(clickEvent);
  };

  /*
   * return a copy of an object with only non-object keys
   * we need this to avoid circular references
   */
  function simpleKeys(original) {
    return Object.keys(original).reduce(function(obj, key) {
      obj[key] = typeof original[key] === 'object' ? '{ ... }' : original[key];
      return obj;
    }, {});
  }
}]);
+
+ + + +
+
+ + +

+

Note in the example above how we can pass in $event to clickMe, but how it does not show up +in {{$event}}. This is because $event is outside the scope of that binding.

+

One-time binding

+

An expression that starts with :: is considered a one-time expression. One-time expressions +will stop recalculating once they are stable, which happens after the first digest if the expression +result is a non-undefined value (see value stabilization algorithm below).

+

+ +

+ + +
+ + +
+
<div ng-controller="EventController">
  <button ng-click="clickMe($event)">Click Me</button>
  <p id="one-time-binding-example">One time binding: {{::name}}</p>
  <p id="normal-binding-example">Normal binding: {{name}}</p>
</div>
+
+ +
+
angular.module('oneTimeBindingExampleApp', []).
controller('EventController', ['$scope', function($scope) {
  var counter = 0;
  var names = ['Igor', 'Misko', 'Chirayu', 'Lucas'];
  /*
   * expose the event object to the scope
   */
  $scope.clickMe = function(clickEvent) {
    $scope.name = names[counter % names.length];
    counter++;
  };
}]);
+
+ +
+
it('should freeze binding after its value has stabilized', function() {
  var oneTimeBinding = element(by.id('one-time-binding-example'));
  var normalBinding = element(by.id('normal-binding-example'));

  expect(oneTimeBinding.getText()).toEqual('One time binding:');
  expect(normalBinding.getText()).toEqual('Normal binding:');
  element(by.buttonText('Click Me')).click();

  expect(oneTimeBinding.getText()).toEqual('One time binding: Igor');
  expect(normalBinding.getText()).toEqual('Normal binding: Igor');
  element(by.buttonText('Click Me')).click();

  expect(oneTimeBinding.getText()).toEqual('One time binding: Igor');
  expect(normalBinding.getText()).toEqual('Normal binding: Misko');

  element(by.buttonText('Click Me')).click();
  element(by.buttonText('Click Me')).click();

  expect(oneTimeBinding.getText()).toEqual('One time binding: Igor');
  expect(normalBinding.getText()).toEqual('Normal binding: Lucas');
});
+
+ + + +
+
+ + +

+

Reasons for using one-time binding

+

The main purpose of one-time binding expression is to provide a way to create a binding +that gets deregistered and frees up resources once the binding is stabilized. +Reducing the number of expressions being watched makes the digest loop faster and allows more +information to be displayed at the same time.

+

Value stabilization algorithm

+

One-time binding expressions will retain the value of the expression at the end of the +digest cycle as long as that value is not undefined. If the value of the expression is set +within the digest loop and later, within the same digest loop, it is set to undefined, +then the expression is not fulfilled and will remain watched.

+
    +
  1. Given an expression that starts with ::, when a digest loop is entered and expression +is dirty-checked, store the value as V
  2. +
  3. If V is not undefined, mark the result of the expression as stable and schedule a task +to deregister the watch for this expression when we exit the digest loop
  4. +
  5. Process the digest loop as normal
  6. +
  7. When digest loop is done and all the values have settled, process the queue of watch +deregistration tasks. For each watch to be deregistered, check if it still evaluates +to a value that is not undefined. If that's the case, deregister the watch. Otherwise, +keep dirty-checking the watch in the future digest loops by following the same +algorithm starting from step 1
  8. +
+

Special case for object literals

+

Unlike simple values, object-literals are watched until every key is defined. +See http://www.bennadel.com/blog/2760-one-time-data-bindings-for-object-literal-expressions-in-angularjs-1-3.htm

+

How to benefit from one-time binding

+

If the expression will not change once set, it is a candidate for one-time binding. +Here are three example cases.

+

When interpolating text or attributes:

+
<div name="attr: {{::color}}">text: {{::name | uppercase}}</div>
+
+

When using a directive with bidirectional binding and parameters that will not change:

+
someModule.directive('someDirective', function() {
+  return {
+    scope: {
+      name: '=',
+      color: '@'
+    },
+    template: '{{name}}: {{color}}'
+  };
+});
+
+
<div some-directive name="::myName" color="My color is {{::myColor}}"></div>
+
+

When using a directive that takes an expression:

+
<ul>
+  <li ng-repeat="item in ::items | orderBy:'name'">{{item.name}};</li>
+</ul>
+
+ + diff --git a/1.6.6/docs/partials/guide/external-resources.html b/1.6.6/docs/partials/guide/external-resources.html new file mode 100644 index 000000000..9058c2fa6 --- /dev/null +++ b/1.6.6/docs/partials/guide/external-resources.html @@ -0,0 +1,157 @@ + Improve this Doc + + +

External Angular 1 Resources

+

This is a collection of external, 3rd party resources for learning and developing Angular.

+

Articles, Videos, and Projects

+

Introductory Material

+ +

Specific Topics

+

Application Structure & Style Guides

+ +

Testing

+ +

Mobile

+ +

Deployment

+
General
+ +
Server-Specific
+ +

Other Languages

+ +

More Topics

+ +

Tools

+ +

Complementary Libraries

+

This is a list of libraries that enhance Angular, add common UI components or integrate with other libraries. +You can find a larger list of Angular external libraries at ngmodules.org.

+ +

General Learning Resources

+

Books

+ +

Videos:

+ +

Courses

+ + + diff --git a/1.6.6/docs/partials/guide/filter.html b/1.6.6/docs/partials/guide/filter.html new file mode 100644 index 000000000..246852bbe --- /dev/null +++ b/1.6.6/docs/partials/guide/filter.html @@ -0,0 +1,181 @@ + Improve this Doc + + +

Filters

+

Filters format the value of an expression for display to the user. They can be used in view +templates, controllers or services. Angular comes with a collection of +built-in filters, but it is easy to define your own as well.

+

The underlying API is the $filterProvider.

+

Using filters in view templates

+

Filters can be applied to expressions in view templates using the following syntax:

+
{{ expression | filter }}
+
+

E.g. the markup {{ 12 | currency }} formats the number 12 as a currency using the currency +filter. The resulting value is $12.00.

+

Filters can be applied to the result of another filter. This is called "chaining" and uses +the following syntax:

+
{{ expression | filter1 | filter2 | ... }}
+
+

Filters may have arguments. The syntax for this is

+
{{ expression | filter:argument1:argument2:... }}
+
+

E.g. the markup {{ 1234 | number:2 }} formats the number 1234 with 2 decimal points using the +number filter. The resulting value is 1,234.00.

+

When filters are executed

+

In templates, filters are only executed when their inputs have changed. This is more performant than executing +a filter on each $digest as is the case with expressions.

+

There are two exceptions to this rule:

+
    +
  1. In general, this applies only to filters that take primitive values +as inputs. Filters that receive Objects +as input are executed on each $digest, as it would be too costly to track if the inputs have changed.

    +
  2. +
  3. Filters that are marked as $stateful are also executed on each $digest. +See Stateful filters for more information. Note that no Angular +core filters are $stateful.

    +
  4. +
+

Using filters in controllers, services, and directives

+

You can also use filters in controllers, services, and directives.

+
+For this, inject a dependency with the name <filterName>Filter into your controller/service/directive. +E.g. a filter called number is injected by using the dependency numberFilter. The injected argument +is a function that takes the value to format as first argument, and filter parameters starting with the second argument. +
+ +

The example below uses the filter called filter. +This filter reduces arrays into sub arrays based on +conditions. The filter can be applied in the view template with markup like +{{ctrl.array | filter:'a'}}, which would do a fulltext search for "a". +However, using a filter in a view template will reevaluate the filter on +every digest, which can be costly if the array is big.

+

The example below therefore calls the filter directly in the controller. +By this, the controller is able to call the filter only when needed (e.g. when the data is loaded from the backend +or the filter expression is changed).

+

+ +

+ + +
+ + +
+
<div ng-controller="FilterController as ctrl">
  <div>
    All entries:
    <span ng-repeat="entry in ctrl.array">{{entry.name}} </span>
  </div>
  <div>
    Entries that contain an "a":
    <span ng-repeat="entry in ctrl.filteredArray">{{entry.name}} </span>
  </div>
</div>
+
+ +
+
angular.module('FilterInControllerModule', []).
controller('FilterController', ['filterFilter', function FilterController(filterFilter) {
  this.array = [
    {name: 'Tobias'},
    {name: 'Jeff'},
    {name: 'Brian'},
    {name: 'Igor'},
    {name: 'James'},
    {name: 'Brad'}
  ];
  this.filteredArray = filterFilter(this.array, 'a');
}]);
+
+ + + +
+
+ + +

+

Creating custom filters

+

Writing your own filter is very easy: just register a new filter factory function with +your module. Internally, this uses the filterProvider. +This factory function should return a new filter function which takes the input value +as the first argument. Any filter arguments are passed in as additional arguments to the filter +function.

+

The filter function should be a pure function, which +means that it should always return the same result given the same input arguments and should not affect +external state, for example, other Angular services. Angular relies on this contract and will by default +execute a filter only when the inputs to the function change. +Stateful filters are possible, but less performant.

+
+Note: Filter names must be valid angular Expressions identifiers, such as uppercase or orderBy. +Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace +your filters, then you can use capitalization (myappSubsectionFilterx) or underscores +(myapp_subsection_filterx). +
+ +

The following sample filter reverses a text string. In addition, it conditionally makes the +text upper-case.

+

+ +

+ + +
+ + +
+
<div ng-controller="MyController">
  <input ng-model="greeting" type="text"><br>
  No filter: {{greeting}}<br>
  Reverse: {{greeting|reverse}}<br>
  Reverse + uppercase: {{greeting|reverse:true}}<br>
  Reverse, filtered in controller: {{filteredGreeting}}<br>
</div>
+
+ +
+
angular.module('myReverseFilterApp', [])
.filter('reverse', function() {
  return function(input, uppercase) {
    input = input || '';
    var out = '';
    for (var i = 0; i < input.length; i++) {
      out = input.charAt(i) + out;
    }
    // conditional based on optional argument
    if (uppercase) {
      out = out.toUpperCase();
    }
    return out;
  };
})
.controller('MyController', ['$scope', 'reverseFilter', function($scope, reverseFilter) {
  $scope.greeting = 'hello';
  $scope.filteredGreeting = reverseFilter($scope.greeting);
}]);
+
+ + + +
+
+ + +

+

Stateful filters

+

It is strongly discouraged to write filters that are stateful, because the execution of those can't +be optimized by Angular, which often leads to performance issues. Many stateful filters can be +converted into stateless filters just by exposing the hidden state as a model and turning it into an +argument for the filter.

+

If you however do need to write a stateful filter, you have to mark the filter as $stateful, which +means that it will be executed one or more times during the each $digest cycle.

+

+ +

+ + +
+ + +
+
<div ng-controller="MyController">
  Input: <input ng-model="greeting" type="text"><br>
  Decoration: <input ng-model="decoration.symbol" type="text"><br>
  No filter: {{greeting}}<br>
  Decorated: {{greeting | decorate}}<br>
</div>
+
+ +
+
angular.module('myStatefulFilterApp', [])
.filter('decorate', ['decoration', function(decoration) {

  function decorateFilter(input) {
    return decoration.symbol + input + decoration.symbol;
  }
  decorateFilter.$stateful = true;

  return decorateFilter;
}])
.controller('MyController', ['$scope', 'decoration', function($scope, decoration) {
  $scope.greeting = 'hello';
  $scope.decoration = decoration;
}])
.value('decoration', {symbol: '*'});
+
+ + + +
+
+ + +

+

Testing custom filters

+

See the phonecat tutorial for an example.

+ + diff --git a/1.6.6/docs/partials/guide/forms.html b/1.6.6/docs/partials/guide/forms.html new file mode 100644 index 000000000..43738fd3e --- /dev/null +++ b/1.6.6/docs/partials/guide/forms.html @@ -0,0 +1,376 @@ + Improve this Doc + + +

Forms

+

Controls (input, select, textarea) are ways for a user to enter data. +A Form is a collection of controls for the purpose of grouping related controls together.

+

Form and controls provide validation services, so that the user can be notified of invalid input +before submitting a form. This provides a better user experience than server-side validation alone +because the user gets instant feedback on how to correct the error. Keep in mind that while +client-side validation plays an important role in providing good user experience, it can easily +be circumvented and thus can not be trusted. Server-side validation is still necessary for a +secure application.

+

Simple form

+

The key directive in understanding two-way data-binding is ngModel. +The ngModel directive provides the two-way data-binding by synchronizing the model to the view, +as well as view to the model. In addition it provides an API +for other directives to augment its behavior.

+

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <form novalidate class="simple-form">
    <label>Name: <input type="text" ng-model="user.name" /></label><br />
    <label>E-mail: <input type="email" ng-model="user.email" /></label><br />
    Best Editor: <label><input type="radio" ng-model="user.preference" value="vi" />vi</label>
    <label><input type="radio" ng-model="user.preference" value="emacs" />emacs</label><br />
    <input type="button" ng-click="reset()" value="Reset" />
    <input type="submit" ng-click="update(user)" value="Save" />
  </form>
  <pre>user = {{user | json}}</pre>
  <pre>master = {{master | json}}</pre>
</div>

<script>
  angular.module('formExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.master = {};

      $scope.update = function(user) {
        $scope.master = angular.copy(user);
      };

      $scope.reset = function() {
        $scope.user = angular.copy($scope.master);
      };

      $scope.reset();
    }]);
</script>
+
+ + + +
+
+ + +

+

Note that novalidate is used to disable browser's native form validation.

+

The value of ngModel won't be set unless it passes validation for the input field. +For example: inputs of type email must have a value in the form of user@domain.

+

Using CSS classes

+

To allow styling of form as well as controls, ngModel adds these CSS classes:

+
    +
  • ng-valid: the model is valid
  • +
  • ng-invalid: the model is invalid
  • +
  • ng-valid-[key]: for each valid key added by $setValidity
  • +
  • ng-invalid-[key]: for each invalid key added by $setValidity
  • +
  • ng-pristine: the control hasn't been interacted with yet
  • +
  • ng-dirty: the control has been interacted with
  • +
  • ng-touched: the control has been blurred
  • +
  • ng-untouched: the control hasn't been blurred
  • +
  • ng-pending: any $asyncValidators are unfulfilled
  • +
+

The following example uses the CSS to display validity of each form control. +In the example both user.name and user.email are required, but are rendered +with red background only after the input is blurred (loses focus). +This ensures that the user is not distracted with an error until after interacting with the control, +and failing to satisfy its validity.

+

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <form novalidate class="css-form">
    <label>Name: <input type="text" ng-model="user.name" required /></label><br />
    <label>E-mail: <input type="email" ng-model="user.email" required /></label><br />
    Gender: <label><input type="radio" ng-model="user.gender" value="male" />male</label>
    <label><input type="radio" ng-model="user.gender" value="female" />female</label><br />
    <input type="button" ng-click="reset()" value="Reset" />
    <input type="submit" ng-click="update(user)" value="Save" />
  </form>
  <pre>user = {{user | json}}</pre>
  <pre>master = {{master | json}}</pre>
</div>

<style type="text/css">
  .css-form input.ng-invalid.ng-touched {
    background-color: #FA787E;
  }

  .css-form input.ng-valid.ng-touched {
    background-color: #78FA89;
  }
</style>

<script>
  angular.module('formExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.master = {};

      $scope.update = function(user) {
        $scope.master = angular.copy(user);
      };

      $scope.reset = function() {
        $scope.user = angular.copy($scope.master);
      };

      $scope.reset();
    }]);
</script>
+
+ + + +
+
+ + +

+

Binding to form and control state

+

A form is an instance of FormController. +The form instance can optionally be published into the scope using the name attribute.

+

Similarly, an input control that has the ngModel directive holds an +instance of NgModelController. Such a control instance +can be published as a property of the form instance using the name attribute on the input control. +The name attribute specifies the name of the property on the form instance.

+

This implies that the internal state of both the form and the control is available for binding in +the view using the standard binding primitives.

+

This allows us to extend the above example with these features:

+
    +
  • Custom error message displayed after the user interacted with a control (i.e. when $touched is set)
  • +
  • Custom error message displayed upon submitting the form ($submitted is set), even if the user +didn't interact with a control
  • +
+

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <form name="form" class="css-form" novalidate>
    <label>Name:
      <input type="text" ng-model="user.name" name="uName" required="" />
    </label>
    <br />
    <div ng-show="form.$submitted || form.uName.$touched">
      <div ng-show="form.uName.$error.required">Tell us your name.</div>
    </div>

    <label>E-mail:
      <input type="email" ng-model="user.email" name="uEmail" required="" />
    </label>
    <br />
    <div ng-show="form.$submitted || form.uEmail.$touched">
      <span ng-show="form.uEmail.$error.required">Tell us your email.</span>
      <span ng-show="form.uEmail.$error.email">This is not a valid email.</span>
    </div>

    Gender:
    <label><input type="radio" ng-model="user.gender" value="male" />male</label>
    <label><input type="radio" ng-model="user.gender" value="female" />female</label>
    <br />
    <label>
    <input type="checkbox" ng-model="user.agree" name="userAgree" required="" />

    I agree:
    </label>
    <input ng-show="user.agree" type="text" ng-model="user.agreeSign" required="" />
    <br />
    <div ng-show="form.$submitted || form.userAgree.$touched">
      <div ng-show="!user.agree || !user.agreeSign">Please agree and sign.</div>
    </div>

    <input type="button" ng-click="reset(form)" value="Reset" />
    <input type="submit" ng-click="update(user)" value="Save" />
  </form>
  <pre>user = {{user | json}}</pre>
  <pre>master = {{master | json}}</pre>
</div>
+
+ +
+
angular.module('formExample', [])
.controller('ExampleController', ['$scope', function($scope) {
  $scope.master = {};

  $scope.update = function(user) {
    $scope.master = angular.copy(user);
  };

  $scope.reset = function(form) {
    if (form) {
      form.$setPristine();
      form.$setUntouched();
    }
    $scope.user = angular.copy($scope.master);
  };

  $scope.reset();
}]);
+
+ + + +
+
+ + +

+

Custom model update triggers

+

By default, any change to the content will trigger a model update and form validation. You can +override this behavior using the ngModelOptions directive to +bind only to specified list of events. I.e. ng-model-options="{ updateOn: 'blur' }" will update +and validate only after the control loses focus. You can set several events using a space delimited +list. I.e. ng-model-options="{ updateOn: 'mousedown blur' }"

+

animation showing debounced input

+

If you want to keep the default behavior and just add new events that may trigger the model update +and validation, add "default" as one of the specified events.

+

I.e. ng-model-options="{ updateOn: 'default blur' }"

+

The following example shows how to override immediate updates. Changes on the inputs within the form +will update the model only when the control loses focus (blur event).

+

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <form>
    <label>Name:
      <input type="text" ng-model="user.name" ng-model-options="{ updateOn: 'blur' }" /></label><br />
    <label>
    Other data:
    <input type="text" ng-model="user.data" /></label><br />
  </form>
  <pre>username = "{{user.name}}"</pre>
  <pre>userdata = "{{user.data}}"</pre>
</div>
+
+ +
+
angular.module('customTriggerExample', [])
.controller('ExampleController', ['$scope', function($scope) {
  $scope.user = {};
}]);
+
+ + + +
+
+ + +

+

Non-immediate (debounced) model updates

+

You can delay the model update/validation by using the debounce key with the +ngModelOptions directive. This delay will also apply to +parsers, validators and model flags like $dirty or $pristine.

+

animation showing debounced input

+

I.e. ng-model-options="{ debounce: 500 }" will wait for half a second since +the last content change before triggering the model update and form validation.

+

If custom triggers are used, custom debouncing timeouts can be set for each event using an object +in debounce. This can be useful to force immediate updates on some specific circumstances +(like blur events).

+

I.e. ng-model-options="{ updateOn: 'default blur', debounce: { default: 500, blur: 0 } }"

+

If those attributes are added to an element, they will be applied to all the child elements and +controls that inherit from it unless they are overridden.

+

This example shows how to debounce model changes. Model will be updated only 250 milliseconds +after last change.

+

+ +

+ + +
+ + +
+
<div ng-controller="ExampleController">
  <form>
    <label>Name:
    <input type="text" ng-model="user.name" ng-model-options="{ debounce: 250 }" /></label><br />
  </form>
  <pre>username = "{{user.name}}"</pre>
</div>
+
+ +
+
angular.module('debounceExample', [])
.controller('ExampleController', ['$scope', function($scope) {
  $scope.user = {};
}]);
+
+ + + +
+
+ + +

+

Custom Validation

+

Angular provides basic implementation for most common HTML5 input +types: (text, number, url, +email, date, radio, checkbox), +as well as some directives for validation (required, pattern, minlength, maxlength, +min, max).

+

With a custom directive, you can add your own validation functions to the $validators object on +the ngModelController. To get a hold of the controller, +you require it in the directive as shown in the example below.

+

Each function in the $validators object receives the modelValue and the viewValue +as parameters. Angular will then call $setValidity internally with the function's return value +(true: valid, false: invalid). The validation functions are executed every time an input +is changed ($setViewValue is called) or whenever the bound model changes. +Validation happens after successfully running $parsers and $formatters, respectively. +Failed validators are stored by key in +ngModelController.$error.

+

Additionally, there is the $asyncValidators object which handles asynchronous validation, +such as making an $http request to the backend. Functions added to the object must return +a promise that must be resolved when valid or rejected when invalid. +In-progress async validations are stored by key in +ngModelController.$pending.

+

In the following example we create two directives:

+
    +
  • An integer directive that validates whether the input is a valid integer. For example, +1.23 is an invalid value, since it contains a fraction. Note that we validate the viewValue +(the string value of the control), and not the modelValue. This is because input[number] converts +the viewValue to a number when running the $parsers.

    +
  • +
  • A username directive that asynchronously checks if a user-entered value is already taken. +We mock the server request with a $q deferred.

    +
  • +
+

+ +

+ + +
+ + +
+
<form name="form" class="css-form" novalidate>
  <div>
    <label>
    Size (integer 0 - 10):
    <input type="number" ng-model="size" name="size"
           min="0" max="10" integer />{{size}}</label><br />
    <span ng-show="form.size.$error.integer">The value is not a valid integer!</span>
    <span ng-show="form.size.$error.min || form.size.$error.max">
      The value must be in range 0 to 10!</span>
  </div>

  <div>
    <label>
    Username:
    <input type="text" ng-model="name" name="name" username />{{name}}</label><br />
    <span ng-show="form.name.$pending.username">Checking if this name is available...</span>
    <span ng-show="form.name.$error.username">This username is already taken!</span>
  </div>

</form>
+
+ +
+
var app = angular.module('form-example1', []);

var INTEGER_REGEXP = /^-?\d+$/;
app.directive('integer', function() {
  return {
    require: 'ngModel',
    link: function(scope, elm, attrs, ctrl) {
      ctrl.$validators.integer = function(modelValue, viewValue) {
        if (ctrl.$isEmpty(modelValue)) {
          // consider empty models to be valid
          return true;
        }

        if (INTEGER_REGEXP.test(viewValue)) {
          // it is valid
          return true;
        }

        // it is invalid
        return false;
      };
    }
  };
});

app.directive('username', function($q, $timeout) {
  return {
    require: 'ngModel',
    link: function(scope, elm, attrs, ctrl) {
      var usernames = ['Jim', 'John', 'Jill', 'Jackie'];

      ctrl.$asyncValidators.username = function(modelValue, viewValue) {

        if (ctrl.$isEmpty(modelValue)) {
          // consider empty model valid
          return $q.resolve();
        }

        var def = $q.defer();

        $timeout(function() {
          // Mock a delayed response
          if (usernames.indexOf(modelValue) === -1) {
            // The username is available
            def.resolve();
          } else {
            def.reject();
          }

        }, 2000);

        return def.promise;
      };
    }
  };
});
+
+ + + +
+
+ + +

+

Modifying built-in validators

+

Since Angular itself uses $validators, you can easily replace or remove built-in validators, +should you find it necessary. The following example shows you how to overwrite the email validator +in input[email] from a custom directive so that it requires a specific top-level domain, +example.com to be present. +Note that you can alternatively use ng-pattern to further restrict the validation.

+

+ +

+ + +
+ + +
+
<form name="form" class="css-form" novalidate>
  <div>
    <label>
      Overwritten Email:
      <input type="email" ng-model="myEmail" overwrite-email name="overwrittenEmail" />
    </label>
    <span ng-show="form.overwrittenEmail.$error.email">This email format is invalid!</span><br>
    Model: {{myEmail}}
    </div>
</form>
+
+ +
+
var app = angular.module('form-example-modify-validators', []);

app.directive('overwriteEmail', function() {
  var EMAIL_REGEXP = /^[a-z0-9!#$%&'*+/=?^_`{|}~.-]+@example\.com$/i;

  return {
    require: '?ngModel',
    link: function(scope, elm, attrs, ctrl) {
      // only apply the validator if ngModel is present and Angular has added the email validator
      if (ctrl && ctrl.$validators.email) {

        // this will overwrite the default Angular email validator
        ctrl.$validators.email = function(modelValue) {
          return ctrl.$isEmpty(modelValue) || EMAIL_REGEXP.test(modelValue);
        };
      }
    }
  };
});
+
+ + + +
+
+ + +

+

Implementing custom form controls (using ngModel)

+

Angular implements all of the basic HTML form controls (input, +select, textarea), +which should be sufficient for most cases. However, if you need more flexibility, +you can write your own form control as a directive.

+

In order for custom control to work with ngModel and to achieve two-way data-binding it needs to:

+
    +
  • implement $render method, which is responsible for rendering the data after it passed the +NgModelController.$formatters,
  • +
  • call $setViewValue method, whenever the user interacts with the control and model +needs to be updated. This is usually done inside a DOM Event listener.
  • +
+

See $compileProvider.directive for more info.

+

The following example shows how to add two-way data-binding to contentEditable elements.

+

+ +

+ + +
+ + +
+
<div contentEditable="true" ng-model="content" title="Click to edit">Some</div>
<pre>model = {{content}}</pre>

<style type="text/css">
  div[contentEditable] {
    cursor: pointer;
    background-color: #D0D0D0;
  }
</style>
+
+ +
+
angular.module('form-example2', []).directive('contenteditable', function() {
  return {
    require: 'ngModel',
    link: function(scope, elm, attrs, ctrl) {
      // view -> model
      elm.on('blur', function() {
        ctrl.$setViewValue(elm.html());
      });

      // model -> view
      ctrl.$render = function() {
        elm.html(ctrl.$viewValue);
      };

      // load init value from DOM
      ctrl.$setViewValue(elm.html());
    }
  };
});
+
+ + + +
+
+ + +

+ + diff --git a/1.6.6/docs/partials/guide/i18n.html b/1.6.6/docs/partials/guide/i18n.html new file mode 100644 index 000000000..b6d046c35 --- /dev/null +++ b/1.6.6/docs/partials/guide/i18n.html @@ -0,0 +1,302 @@ + Improve this Doc + + +

i18n and l10n

+

Internationalization (i18n) is the process of developing products in such a way that they can be +localized for languages and cultures easily. Localization (l10n), is the process of adapting +applications and text to enable their usability in a particular cultural or linguistic market. For +application developers, internationalizing an application means abstracting all of the strings and +other locale-specific bits (such as date or currency formats) out of the application. Localizing an +application means providing translations and localized formats for the abstracted bits.

+

How does Angular support i18n/l10n?

+

Angular supports i18n/l10n for date, number and +currency filters.

+

Localizable pluralization is supported via the ngPluralize +directive. Additionally, you can use MessageFormat extensions to +$interpolate for localizable pluralization and gender support in all interpolations via the +ngMessageFormat module.

+

All localizable Angular components depend on locale-specific rule sets managed by the $locale service.

+

There are a few examples that showcase how to use Angular filters with various locale rule sets in the +i18n/e2e directory of the Angular +source code.

+

What is a locale ID?

+

A locale is a specific geographical, political, or cultural region. The most commonly used locale +ID consists of two parts: language code and country code. For example, en-US, en-AU, and +zh-CN are all valid locale IDs that have both language codes and country codes. Because +specifying a country code in locale ID is optional, locale IDs such as en, zh, and sk are +also valid. See the ICU website for more information +about using locale IDs.

+

Supported locales in Angular

+

Angular separates number and datetime format rule sets into different files, each file for a +particular locale. You can find a list of currently supported locales +here

+

Providing locale rules to Angular

+

There are two approaches to providing locale rules to Angular:

+

1. Pre-bundled rule sets

+

You can pre-bundle the desired locale file with Angular by concatenating the content of the +locale-specific file to the end of angular.js or angular.min.js file.

+

For example on *nix, to create an angular.js file that contains localization rules for german +locale, you can do the following:

+

cat angular.js i18n/angular-locale_de-de.js > angular_de-de.js

+

When the application containing angular_de-de.js script instead of the generic angular.js script +starts, Angular is automatically pre-configured with localization rules for the german locale.

+

2. Including a locale script in index.html

+

You can also include the locale specific js file in the index.html page. For example, if one client +requires German locale, you would serve index_de-de.html which will look something like this:

+
<html ng-app>
+ <head>
+….
+   <script src="angular.js"></script>
+   <script src="i18n/angular-locale_de-de.js"></script>
+….
+ </head>
+</html>
+
+

Comparison of the two approaches

+

Both approaches described above require you to prepare different index.html pages or JavaScript +files for each locale that your app may use. You also need to configure your server to serve +the correct file that corresponds to the desired locale.

+

The second approach (including the locale JavaScript file in index.html) may be slower because +an extra script needs to be loaded.

+

Caveats

+

Although Angular makes i18n convenient, there are several things you need to be conscious of as you +develop your app.

+

Currency symbol

+

Angular's currency filter allows you to use the default currency symbol +from the locale service, or you can provide the filter with a custom currency +symbol.

+
+Best Practice: If your app will be used only in one locale, it is fine to rely on the default +currency symbol. If you anticipate that viewers in other locales might use your app, you should +explicitly provide a currency symbol. +
+ +

Let's say you are writing a banking app and you want to display an account balance of 1000 dollars. +You write the following binding using the currency filter:

+
{{ 1000 | currency }}
+
+

If your app is currently in the en-US locale, the browser will show $1000.00. If someone in the +Japanese locale (ja) views your app, their browser will show a balance of ¥1000.00 instead. +This is problematic because $1000 is not the same as ¥1000.

+

In this case, you need to override the default currency symbol by providing the +currency currency filter with a currency symbol as a parameter.

+

If we change the above to {{ 1000 | currency:"USD$"}}, Angular will always show a balance of +USD$1000 regardless of locale.

+

Translation length

+

Translated strings/datetime formats can vary greatly in length. For example, June 3, 1977 will be +translated to Spanish as 3 de junio de 1977.

+

When internationalizing your app, you need to do thorough testing to make sure UI components behave +as expected even when their contents vary greatly in content size.

+

Timezones

+

The Angular datetime filter uses the time zone settings of the browser. The same +application will show different time information depending on the time zone settings of the +computer that the application is running on. Neither JavaScript nor Angular currently supports +displaying the date with a timezone specified by the developer.

+

+

MessageFormat extensions

+

You can write localizable plural and gender based messages in Angular interpolation expressions and +$interpolate calls.

+

This syntax extension is provided by way of the ngMessageFormat module that your application can +depend upon (shipped separately as angular-message-format.min.js and angular-message-format.js.) +A current limitation of the ngMessageFormat module, is that it does not support redefining the +$interpolate start and end symbols. Only the default {{ and }} are allowed.

+

The syntax extension is based on a subset of the ICU MessageFormat syntax that covers plurals and +gender selections. Please refer to the links in the “Further Reading” section at the bottom of this +section.

+

You may find it helpful to play with the following example as you read the explanations below:

+

+ +

+ + +
+ + +
+
<div ng-controller="ckCtrl">
  <b>Set number of recipients</b>
  <button ng-click="setNumRecipients(0)">None</button>
  <button ng-click="setNumRecipients(1)">One</button>
  <button ng-click="setNumRecipients(2)">Two</button>
  <button ng-click="setNumRecipients(3)">Three</button>


  <br><br>
  <b>Sender's</b> name: <input ng-model="sender.name"> &nbsp;&nbsp;

  <br><br><b>Recipients</b><br>
  <div ng-repeat="recipient in recipients">
    Name: <input ng-model="recipient.name"> &nbsp;&nbsp;
    Gender: <button ng-click="setGender(recipient, 'male')">male</button>
            <button ng-click="setGender(recipient, 'female')">female</button>
            <button ng-click="setGender(recipient, 'other')">other</button>
  </div>

  <br><br><b>Message</b><br>
  {{recipients.length, plural, offset:1
      =0 {You ({{sender.name}}) gave no gifts}
      =1 { {{ recipients[0].gender, select,
                male {You ({{sender.name}}) gave him ({{recipients[0].name}}) a gift.}
                female {You ({{sender.name}}) gave her ({{recipients[0].name}}) a gift.}
                other {You ({{sender.name}}) gave them ({{recipients[0].name}}) a gift.}
            }}
         }
      one { {{ recipients[0].gender, select,
                male {You ({{sender.name}}) gave him ({{recipients[0].name}}) and one other person a gift.}
                female {You ({{sender.name}}) gave her ({{recipients[0].name}}) and one other person a gift.}
                other {You ({{sender.name}}) gave them ({{recipients[0].name}}) and one other person a gift.}
            }}
         }
         other {You ({{sender.name}}) gave {{recipients.length}} people gifts. }
  }}

  <br><br><b>In an attribute</b><br>
  <div attrib="{{recipients.length, plural, offset:1
                  =0 {You ({{sender.name}}) gave no gifts}
                  =1 { {{ recipients[0].gender, select,
                            male {You ({{sender.name}}) gave him ({{recipients[0].name}}) a gift.}
                            female {You ({{sender.name}}) gave her ({{recipients[0].name}}) a gift.}
                            other {You ({{sender.name}}) gave them ({{recipients[0].name}}) a gift.}
                        }}
                     }
                  one { {{ recipients[0].gender, select,
                            male {You ({{sender.name}}) gave him ({{recipients[0].name}}) and one other person a gift.}
                            female {You ({{sender.name}}) gave her ({{recipients[0].name}}) and one other person a gift.}
                            other {You ({{sender.name}}) gave them ({{recipients[0].name}}) and one other person a gift.}
                        }}
                     }
                     other {You ({{sender.name}}) gave {{recipients.length}} people gifts. }
               }}">
      This div has an attribute interpolated with messageformat.  Use the DOM inspector to check it out.
  </div>
</div>
+
+ +
+
function Person(name, gender) {
  this.name = name;
  this.gender = gender;
}

angular.module('messageFormatExample', ['ngMessageFormat'])
  .controller('ckCtrl', function($scope, $injector, $parse) {
    var people = [new Person('Alice', 'female'),
                  new Person('Bob', 'male'),
                  new Person('Charlie', 'male')];

    $scope.sender = new Person('Harry Potter', 'male');
    $scope.recipients = people.slice();

    $scope.setNumRecipients = function(n) {
      n = n > people.length ? people.length : n;
      $scope.recipients = people.slice(0, n);
    };

    $scope.setGender = function(person, gender) {
      person.gender = gender;
    };
  });
+
+ + + +
+
+ + +

+

Plural Syntax

+

The syntax for plural based message selection looks like the following:

+
{{NUMERIC_EXPRESSION, plural,
+    =0 {MESSAGE_WHEN_VALUE_IS_0}
+    =1 {MESSAGE_WHEN_VALUE_IS_1}
+    =2 {MESSAGE_WHEN_VALUE_IS_2}
+    =3 {MESSAGE_WHEN_VALUE_IS_3}
+    ...
+    zero {MESSAGE_WHEN_PLURAL_CATEGORY_IS_ZERO}
+    one {MESSAGE_WHEN_PLURAL_CATEGORY_IS_ONE}
+    two {MESSAGE_WHEN_PLURAL_CATEGORY_IS_TWO}
+    few {MESSAGE_WHEN_PLURAL_CATEGORY_IS_FEW}
+    many {MESSAGE_WHEN_PLURAL_CATEGORY_IS_MANY}
+    other {MESSAGE_WHEN_THERE_IS_NO_MATCH}
+}}
+
+

Please note that whitespace (including newline) is generally insignificant except as part of the +actual message text that occurs in curly braces. Whitespace is generally used to aid readability.

+

Here, NUMERIC_EXPRESSION is an expression that evaluates to a numeric value based on which the +displayed message should change based on pluralization rules.

+

Following the Angular expression, you would denote the plural extension syntax by the , plural, +syntax element. The spaces there are optional.

+

This is followed by a list of selection keyword and corresponding message pairs. The "other" +keyword and corresponding message are required but you may have as few or as many of the other +categories as you need.

+

Selection Keywords

+

The selection keywords can be either exact matches or language dependent plural +categories.

+

Exact matches are written as the equal sign followed by the exact value. =0, =1, =2 and +=123 are all examples of exact matches. Note that there should be no space between the equal sign +and the numeric value.

+

Plural category matches are single words corresponding to the plural +categories of the CLDR plural category spec. +These categories vary by locale. The "en" (English) locale, for example, defines just "one" and +"other" while the "ga" (Irish) locale defines "one", "two", "few", "many" and "other". Typically, +you would just write the categories for your language. During translation, the translators will add +or remove more categories depending on the target locale.

+

Exact matches always win over keyword matches. Therefore, if you define both =0 and zero, when +the value of the expression is zero, the =0 message is the one that will be selected. (The +duplicate keyword categories are helpful when used with the optional offset syntax described +later.)

+

Messages

+

Messages immediately follow a selection keyword and are optionally preceded by whitespace. They are +written in single curly braces ({}). They may contain Angular interpolation syntax inside them. +In addition, the # symbol is a placeholder for the actual numeric value of the expression.

+

Simple plural example

+
{{numMessages, plural,
+      =0 {You have no new messages}
+      =1 {You have one new message}
+   other {You have # new messages}
+}}
+
+

Because these messages can themselves contain Angular expressions, you could also write this as +follows:

+
{{numMessages, plural,
+      =0 {You have no new messages}
+      =1 {You have one new message}
+   other {You have {{numMessages}} new messages}
+}}
+
+

Plural syntax with optional offset

+

The plural syntax supports an optional offset syntax that is used in matching. It's simpler to +explain this with an example.

+
{{recipients.length, plural, offset:1
+    =0    {You gave no gifts}
+    =1    {You gave {{recipients[0].name}} a gift}
+    one   {You gave {{recipients[0].name}} and one other person a gift}
+    other {You gave {{recipients[0].name}} and # other people a gift}
+}}
+
+

When an offset is specified, the matching works as follows. First, the exact value of the Angular +expression is matched against the exact matches (i.e. =N selectors) to find a match. If there is +one, that message is used. If there was no match, then the offset value is subtracted from the +value of the expression and locale specific pluralization rules are applied to this new value to +obtain its plural category (such as “one”, “few”, “many”, etc.) and a match is attempted against the +keyword selectors and the matching message is used. If there was no match, then the “other” +category (required) is used. The value of the # character inside a message is the value of +original expression reduced by the offset value that was specified.

+

Escaping / Quoting

+

You will need to escape curly braces or the # character inside message texts if you want them to +be treated literally with no special meaning. You may quote/escape any character in your message +text by preceding it with a \ (backslash) character. The backslash character removes any special +meaning to the character that immediately follows it. Therefore, you can escape or quote the +backslash itself by preceding it with another backslash character.

+

Gender (aka select) Syntax

+

The gender support is provided by the more generic "select" syntax that is more akin to a switch +statement. It is general enough to support use for gender based messages.

+

The syntax for gender based message selection looks like the following:

+
{{EXPRESSION, select,
+    male {MESSAGE_WHEN_EXPRESSION_IS_MALE}
+    female {MESSAGE_WHEN_EXPRESSION_IS_FEMALE}
+    ...
+    other {MESSAGE_WHEN_THERE_IS_NO_GENDER_MATCH}
+}}
+
+

Please note that whitespace (including newline) is generally insignificant except as part of the +actual message text that occurs in curly braces. Whitespace is generally used to aid readability.

+

Here, EXPRESSION is an Angular expression that evaluates to the gender of the person that +is used to select the message that should be displayed.

+

The Angular expression is followed by , select, where the spaces are optional.

+

This is followed by a list of selection keyword and corresponding message pairs. The "other" +keyword and corresponding message are required but you may have as few or as many of the other +gender values as you need (i.e. it isn't restricted to male/female.) Note however, that the +matching is case-sensitive.

+

Selection Keywords

+

Selection keywords are simple words like "male" and "female". The keyword, "other", and its +corresponding message are required while others are optional. It is used when the Angular +expression does not match (case-insensitively) any of the other keywords specified.

+

Messages

+

Messages immediately follow a selection keyword and are optionally preceded by whitespace. They are +written in single curly braces ({}). They may contain Angular interpolation syntax inside them.

+

Simple gender example

+
{{friendGender, select,
+       male {Invite him}
+     female {Invite her}
+      other {Invite them}
+}}
+
+

Nesting

+

As mentioned in the syntax for plural and select, the embedded messages can contain Angular +interpolation syntax. Since you can use MessageFormat extensions in Angular interpolation, this +allows you to nest plural and gender expressions in any order.

+

Please note that if these are intended to reach a translator and be translated, it is recommended +that the messages appear as a whole and not be split up.

+

Demonstration of nesting

+

This is taken from the above example.

+
{{recipients.length, plural, offset:1
+    =0 {You ({{sender.name}}) gave no gifts}
+    =1 { {{ recipients[0].gender, select,
+              male {You ({{sender.name}}) gave him ({{recipients[0].name}}) a gift.}
+              female {You ({{sender.name}}) gave her ({{recipients[0].name}}) a gift.}
+              other {You ({{sender.name}}) gave them ({{recipients[0].name}}) a gift.}
+          }}
+       }
+    one { {{ recipients[0].gender, select,
+              male {You ({{sender.name}}) gave him ({{recipients[0].name}}) and one other person a gift.}
+              female {You ({{sender.name}}) gave her ({{recipients[0].name}}) and one other person a gift.}
+              other {You ({{sender.name}}) gave them ({{recipients[0].name}}) and one other person a gift.}
+          }}
+       }
+    other {You ({{sender.name}}) gave {{recipients.length}} people gifts. }
+}}
+
+

Differences from the ICU MessageFormat syntax

+

This section is useful to you if you're already familiar with the ICU MessageFormat syntax.

+

This syntax extension, while based on MessageFormat, has been designed to be backwards compatible +with existing AngularJS interpolation expressions. The key rule is simply this: All +interpolations are done inside double curlies. The top level comma operator after an expression +inside the double curlies causes MessageFormat extensions to be recognized. Such a top level comma +is otherwise illegal in an Angular expression and is used by MessageFormat to specify the function +(such as plural/select) and it's related syntax.

+

To understand the extension, take a look at the ICU MessageFormat syntax as specified by the ICU +documentation. Anywhere in that MessageFormat that you have regular message text and you want to +substitute an expression, just put it in double curlies instead of single curlies that MessageFormat +dictates. This has a huge advantage. You are no longer limited to simple identifiers for +substitutions. Because you are using double curlies, you can stick in any arbitrary interpolation +syntax there, including nesting more MessageFormat expressions!

+

Further Reading

+

For more details, please refer to our design doc. +You can read more about the ICU MessageFormat syntax at +Formatting Messages | ICU User Guide.

+ + diff --git a/1.6.6/docs/partials/guide/ie.html b/1.6.6/docs/partials/guide/ie.html new file mode 100644 index 000000000..57c51d107 --- /dev/null +++ b/1.6.6/docs/partials/guide/ie.html @@ -0,0 +1,37 @@ + Improve this Doc + + +

Internet Explorer Compatibility

+
+Note: AngularJS 1.3 has dropped support for IE8. Read more about it on +our blog. +AngularJS 1.2 will continue to support IE8, but the core team does not plan to spend time +addressing issues specific to IE8 or earlier. +
+ +

This document describes the Internet Explorer (IE) idiosyncrasies when dealing with custom HTML +attributes and tags. Read this document if you are planning on deploying your Angular application +on IE.

+

The project currently supports and will attempt to fix bugs for IE9 and above. The continuous +integration server runs all the tests against IE9, IE10, and IE11. See +Travis CI and +ci.angularjs.org.

+

We do not run tests on IE8 and below. A subset of the AngularJS functionality may work on these +browsers, but it is up to you to test and decide whether it works for your particular app.

+

To ensure your Angular application works on IE please consider:

+
    +
  1. Use ng-style tags instead of style="{{ someCss }}". The latter works in Chrome, Firefox, +Safari and Edge but does not work in Internet Explorer (even 11).
  2. +
  3. For the type attribute of buttons, use ng-attr-type tags instead of +type="{{ someExpression }}". If using the latter, Internet Explorer overwrites the expression +with type="submit" before Angular has a chance to interpolate it.
  4. +
  5. For the value attribute of progress, use ng-attr-value tags instead of +value="{{ someExpression}}". If using the latter, Internet Explorer overwrites the expression +with value="0" before Angular has a chance to interpolate it.
  6. +
  7. For the placeholder attribute of textarea, use ng-attr-placeholder tags instead +of placeholder="{{ someExpression }}". If using the latter, Internet Explorer will error +on accessing the nodeValue on a parentless TextNode in Internet Explorer 10 & 11 +(see issue 5025).
  8. +
+ + diff --git a/1.6.6/docs/partials/guide/interpolation.html b/1.6.6/docs/partials/guide/interpolation.html new file mode 100644 index 000000000..314c5758a --- /dev/null +++ b/1.6.6/docs/partials/guide/interpolation.html @@ -0,0 +1,121 @@ + Improve this Doc + + +

Interpolation and data-binding

+

Interpolation markup with embedded expressions is used by Angular to +provide data-binding to text nodes and attribute values.

+

An example of interpolation is shown below:

+
<a ng-href="img/{{username}}.jpg">Hello {{username}}!</a>
+
+

How text and attribute bindings work

+

During the compilation process the compiler uses the $interpolate +service to see if text nodes and element attributes contain interpolation markup with embedded expressions.

+

If that is the case, the compiler adds an interpolateDirective to the node and +registers watches on the computed interpolation function, +which will update the corresponding text nodes or attribute values as part of the +normal digest cycle.

+

Note that the interpolateDirective has a priority of 100 and sets up the watch in the preLink function.

+

How the string representation is computed

+

If the interpolated value is not a String, it is computed as follows:

+
    +
  • undefined and null are converted to ''
  • +
  • if the value is an object that is not a Number, Date or Array, $interpolate looks for +a custom toString() function on the object, and uses that. Custom means that +myObject.toString !== Object.prototype.toString.
  • +
  • if the above doesn't apply, JSON.stringify is used.
  • +
+

Binding to boolean attributes

+

Attributes such as disabled are called boolean attributes, because their presence means true and +their absence means false. We cannot use normal attribute bindings with them, because the HTML +specification does not require browsers to preserve the values of boolean attributes. This means that +if we put an Angular interpolation expression into such an attribute then the binding information +would be lost, because the browser ignores the attribute value.

+

In the following example, the interpolation information would be ignored and the browser would simply +interpret the attribute as present, meaning that the button would always be disabled.

+
Disabled: <input type="checkbox" ng-model="isDisabled" />
+<button disabled="{{isDisabled}}">Disabled</button>
+
+

For this reason, Angular provides special ng-prefixed directives for the following boolean attributes: +disabled, required, selected, +checked, readOnly , and open.

+

These directives take an expression inside the attribute, and set the corresponding boolean attribute +to true when the expression evaluates to truthy.

+
Disabled: <input type="checkbox" ng-model="isDisabled" />
+<button ng-disabled="isDisabled">Disabled</button>
+
+

ngAttr for binding to arbitrary attributes

+

Web browsers are sometimes picky about what values they consider valid for attributes.

+

For example, considering this template:

+
<svg>
+  <circle cx="{{cx}}"></circle>
+</svg>
+
+

We would expect Angular to be able to bind to this, but when we check the console we see +something like Error: Invalid value for attribute cx="{{cx}}". Because of the SVG DOM API's +restrictions, you cannot simply write cx="{{cx}}".

+

With ng-attr-cx you can work around this problem.

+

If an attribute with a binding is prefixed with the ngAttr prefix (denormalized as ng-attr-) +then during the binding it will be applied to the corresponding unprefixed attribute. This allows +you to bind to attributes that would otherwise be eagerly processed by browsers +(e.g. an SVG element's circle[cx] attributes). When using ngAttr, the allOrNothing flag of +$interpolate is used, so if any expression in the interpolated string +results in undefined, the attribute is removed and not added to the element.

+

For example, we could fix the example above by instead writing:

+
<svg>
+  <circle ng-attr-cx="{{cx}}"></circle>
+</svg>
+
+

If one wants to modify a camelcased attribute (SVG elements have valid camelcased attributes), +such as viewBox on the svg element, one can use underscores to denote that the attribute to bind +to is naturally camelcased.

+

For example, to bind to viewBox, we can write:

+
<svg ng-attr-view_box="{{viewBox}}">
+</svg>
+
+

Other attributes may also not work as expected when they contain interpolation markup, and +can be used with ngAttr instead. The following is a list of known problematic attributes:

+
    +
  • size in <select> elements (see issue 1619)
  • +
  • placeholder in <textarea> in Internet Explorer 10/11 (see issue 5025)
  • +
  • type in <button> in Internet Explorer 11 (see issue 14117)
  • +
  • value in <progress> in Internet Explorer = 11 (see issue 7218)
  • +
+

Known Issues

+

Dynamically changing an interpolated value

+

You should avoid dynamically changing the content of an interpolated string (e.g. attribute value +or text node). Your changes are likely to be overwritten, when the original string gets evaluated. +This restriction applies to both directly changing the content via JavaScript or indirectly using a +directive.

+

For example, you should not use interpolation in the value of the style attribute (e.g. +style="color: {{ 'orange' }}; font-weight: {{ 'bold' }};") and at the same time use a +directive that changes the content of that attribute, such as ngStyle.

+

Embedding interpolation markup inside expressions

+
+Note: Angular directive attributes take either expressions or interpolation markup with embedded expressions. +It is considered bad practice to embed interpolation markup inside an expression: +
+ +
<div ng-show="form{{$index}}.$invalid"></div>
+
+

You should instead delegate the computation of complex expressions to the scope, like this:

+
<div ng-show="getForm($index).$invalid"></div>
+
+
function getForm(index) {
+  return $scope['form' + index];
+}
+
+

You can also access the scope with this in your templates:

+
<div ng-show="this['form' + $index].$invalid"></div>
+
+

Why mixing interpolation and expressions is bad practice:

+
    +
  • It increases the complexity of the markup
  • +
  • There is no guarantee that it works for every directive, because interpolation itself is a directive. +If another directive accesses attribute data before interpolation has run, it will get the raw +interpolation markup and not data.
  • +
  • It impacts performance, as interpolation adds another watcher to the scope.
  • +
  • Since this is not recommended usage, we do not test for this, and changes to +Angular core may break your code.
  • +
+ + diff --git a/1.6.6/docs/partials/guide/introduction.html b/1.6.6/docs/partials/guide/introduction.html new file mode 100644 index 000000000..6eb182519 --- /dev/null +++ b/1.6.6/docs/partials/guide/introduction.html @@ -0,0 +1,93 @@ + Improve this Doc + + +

What Is Angular?

+

AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template +language and lets you extend HTML's syntax to express your application's components clearly and +succinctly. Angular's data binding and dependency injection eliminate much of the code you +would otherwise have to write. And it all happens within the browser, making it +an ideal partner with any server technology.

+

Angular is what HTML would have been, had it been designed for applications. HTML is a great +declarative language for static documents. It does not contain much in the way of creating +applications, and as a result building web applications is an exercise in what do I have to do +to trick the browser into doing what I want?

+

The impedance mismatch between dynamic applications and static documents is often solved with:

+
    +
  • a library - a collection of functions which are useful when writing web apps. Your code is +in charge and it calls into the library when it sees fit. E.g., jQuery.
  • +
  • frameworks - a particular implementation of a web application, where your code fills in +the details. The framework is in charge and it calls into your code when it needs something +app specific. E.g., durandal, ember, etc.
  • +
+

Angular takes another approach. It attempts to minimize the impedance mismatch between document +centric HTML and what an application needs by creating new HTML constructs. Angular teaches the +browser new syntax through a construct we call directives. Examples include:

+
    +
  • Data binding, as in {{}}.
  • +
  • DOM control structures for repeating, showing and hiding DOM fragments.
  • +
  • Support for forms and form validation.
  • +
  • Attaching new behavior to DOM elements, such as DOM event handling.
  • +
  • Grouping of HTML into reusable components.
  • +
+

A complete client-side solution

+

Angular is not a single piece in the overall puzzle of building the client-side of a web +application. It handles all of the DOM and AJAX glue code you once wrote by hand and puts it in a +well-defined structure. This makes Angular opinionated about how a CRUD (Create, Read, Update, Delete) +application should be built. But while it is opinionated, it also tries to make sure that its opinion +is just a starting point you can easily change. Angular comes with the following out-of-the-box:

+
    +
  • Everything you need to build a CRUD app in a cohesive set: Data-binding, basic templating +directives, form validation, routing, deep-linking, reusable components and dependency injection.
  • +
  • Testability story: Unit-testing, end-to-end testing, mocks and test harnesses.
  • +
  • Seed application with directory layout and test scripts as a starting point.
  • +
+

Angular's sweet spot

+

Angular simplifies application development by presenting a higher level of abstraction to the +developer. Like any abstraction, it comes at a cost of flexibility. In other words, not every app +is a good fit for Angular. Angular was built with the CRUD application in mind. Luckily CRUD +applications represent the majority of web applications. To understand what Angular is +good at, though, it helps to understand when an app is not a good fit for Angular.

+

Games and GUI editors are examples of applications with intensive and tricky DOM manipulation. +These kinds of apps are different from CRUD apps, and as a result are probably not a good fit for Angular. +In these cases it may be better to use a library with a lower level of abstraction, such as jQuery.

+

The Zen of Angular

+

Angular is built around the belief that declarative code is better than imperative when it comes +to building UIs and wiring software components together, while imperative code is excellent for +expressing business logic.

+
    +
  • It is a very good idea to decouple DOM manipulation from app logic. This dramatically improves +the testability of the code.
  • +
  • It is a really, really good idea to regard app testing as equal in importance to app +writing. Testing difficulty is dramatically affected by the way the code is structured.
  • +
  • It is an excellent idea to decouple the client side of an app from the server side. This +allows development work to progress in parallel, and allows for reuse of both sides.
  • +
  • It is very helpful indeed if the framework guides developers through the entire journey of +building an app: From designing the UI, through writing the business logic, to testing.
  • +
  • It is always good to make common tasks trivial and difficult tasks possible.
  • +
+

Angular frees you from the following pains:

+
    +
  • Registering callbacks: Registering callbacks clutters your code, making it hard to see the +forest for the trees. Removing common boilerplate code such as callbacks is a good thing. It +vastly reduces the amount of JavaScript coding you have to do, and it makes it easier to see +what your application does.
  • +
  • Manipulating HTML DOM programmatically: Manipulating HTML DOM is a cornerstone of AJAX +applications, but it's cumbersome and error-prone. By declaratively describing how the UI +should change as your application state changes, you are freed from low-level DOM manipulation +tasks. Most applications written with Angular never have to programmatically manipulate the +DOM, although you can if you want to.
  • +
  • Marshaling data to and from the UI: CRUD operations make up the majority of AJAX +applications' tasks. The flow of marshaling data from the server to an internal object to an HTML +form, allowing users to modify the form, validating the form, displaying validation errors, +returning to an internal model, and then back to the server, creates a lot of boilerplate +code. Angular eliminates almost all of this boilerplate, leaving code that describes the +overall flow of the application rather than all of the implementation details.
  • +
  • Writing tons of initialization code just to get started: Typically you need to write a lot +of plumbing just to get a basic "Hello World" AJAX app working. With Angular you can bootstrap +your app easily using services, which are auto-injected into your application in a +Guice-like dependency-injection style. This allows you +to get started developing features quickly. As a bonus, you get full control over the +initialization process in automated tests.
  • +
+ + diff --git a/1.6.6/docs/partials/guide/migration.html b/1.6.6/docs/partials/guide/migration.html new file mode 100644 index 000000000..9de785e5a --- /dev/null +++ b/1.6.6/docs/partials/guide/migration.html @@ -0,0 +1,2524 @@ + Improve this Doc + + +

Migrating an App to a newer version

+

Minor version releases in AngularJS introduce several breaking changes that may require changes to your +application's source code; for instance from 1.0 to 1.2 and from 1.2 to 1.3.

+

Although we try to avoid breaking changes, there are some cases where it is unavoidable:

+
    +
  • AngularJS has undergone thorough security reviews to make applications safer by default, +which drives many of these changes.
  • +
  • Several new features, especially animations, would not be possible without a few changes.
  • +
  • Finally, some outstanding bugs were best fixed by changing an existing API.
  • +
+

Contents

+ + + + + + +

Migrating from 1.5 to 1.6

+

Angular 1.6 fixes numerous bugs and adds new features, both in core and in external modules. +In addition, it includes several security and performance improvements in commonly used services, +such as $compile, $injector, $parse, $animate, and directives, such as input, ngModel +and select.

+

The most notable changes are:

+
    +
  • Aligning jqLite with the latest version of jQuery (3.x).
  • +
  • Implementing long awaited features, such as support for inputs of type range and the ability to +bind to any type of values using ngRepeat with select.
  • +
  • Disabling (by default) the pre-assignment of bindings on controller instances, which helps with +support for native ES6 classes.
  • +
  • Changing the default $location hash-prefix to '!', as the previous empty string default was +unconventional and confusing.
  • +
  • Reporting possibly unhandled promise rejections that would otherwise go unnoticed.
  • +
+

Another major change is the removal of the Expression Sandbox. This should not require changes +to your application (and may give it a small performance boost), but we strongly recommend reading +the Sandbox Removal Blog Post +to understand the implications behind the removal and whether any action is required on your part.

+


+You may also notice that this release comes with a longer-than-usual list of breaking changes. Don't +let this dishearten you though, since most of them are pretty minor - often not expected to affect +real applications. These breaking changes were necessary in order to:

+
    +
  • Align with breaking changes in jQuery 3.
  • +
  • Fix bugs that we wouldn't be able to fix otherwise.
  • +
  • Introduce new features, performance improvements and security fixes.
  • +
  • Make the behavior of existing features more consistent and predictable.
  • +
+


+To give you a heads-up, here is a brief summary of the breaking changes that are expected to have +the highest impact. Make sure you look them up in the full list below or check out the corresponding +commits for more info.

+
    +
  • $location now uses '!' as the default hash-prefix for hash-bang URLs, instead of the empty +string. (Details)

    +
  • +
  • $compile will (by default) not pre-assign bindings on component/directive controller +instances. (Details)

    +
  • +
  • http imposes additional restrictions to JSONP requests for security reasons +(see details below):

    +
      +
    • The request URL now needs to be trusted as a resource URL.
    • +
    • You can no longer use the JSON_CALLBACK placeholder for specifying the query parameter for the +callback.
    • +
    +
  • +
+
    +
  • jqLite is more aligned to jQuery 3, which required the following changes +(see details below):
      +
    • Keys passed to .data() and .css() are now camelCased in the same way as the jQuery methods +do.
    • +
    • Getting/setting boolean attributes no longer takes the corresponding properties into account.
    • +
    • Setting boolean attributes to empty string no longer removes the attribute.
    • +
    • Calling .val() on a multiple select will always return an array, even if no option is +selected.
    • +
    +
  • +
+
    +
  • input[type=radio] now uses strict comparison (===) to determine its "checked" status. +(Details)

    +
  • +
  • The improved support for input[type=range] means that the behaviour of range inputs (when +bound to ngModel) has changed. (Details)

    +
  • +
  • ngTransclude now treats whitespace-only transclusion content as empty and uses the fallback +content instead. (Details)

    +
  • +
  • ngAria/ngModel no longer overrides the default $inEmpty() method for custom +checkbox-shaped controls. (Details)

    +
  • +
+


+Below is the full list of breaking changes:

+ +


+

+

Core: Directives

+

+

form:

+

+Due to 9e24e7, +FormController now defines its methods on its prototype, instead of on each instance. As a +consequence, FormController methods always need to be called in the correct context. For example +$scope.$watch('something', myFormCtrl.$setDirty) will no longer work, because the $setDirty +method is passed without any context. The code must now be changed to:

+
$scope.$watch('something', function() {
+  myFormCtrl.$setDirty();
+})
+
+

or you can use Function.prototype.bind or angular.bind.

+

+

input[type=number]:

+

+Due to e1da4be, +number inputs that use ngModel and specify a step constraint (via step/ngStep attributes) +will now have a new validator (step), which will verify that the current value is valid under the +step constraint (according to the spec). +Previously, the step constraint was ignored by ngModel, treating values as valid even when there +was a step-mismatch.

+

If you want to restore the previous behavior (use the step attribute while disabling step +validation), you can overwrite the built-in step validator with a custom directive. For example:

+
// For all `input` elements...
+.directive('input', function() {
+  return {
+    restrict: 'E',
+    require: '?ngModel',
+    link: function (scope, elem, attrs, ngModelCtrl) {
+      // ...that are of type "number" and have `ngModel`...
+      if ((attrs.type === 'number') && ngModelCtrl) {
+        // ...remove the `step` validator.
+        delete ngModelCtrl.$validators.step;
+      }
+    }
+  };
+})
+
+

+

input[type=radio]:

+

+ +Due to 5ac7da, +the "checked" status of radio inputs is now determined by doing a strict comparison (===) between +the value of the input and the ngModelController.$viewValue. Previously, this was a non-strict +comparison (==).

+

This means in the following examples the radio is no longer checked:

+
<!-- this.selected = 0 -->
+<input type="radio" ng-model="$ctrl.selected" value="0" />
+
+<!-- this.selected = 0; this.value = false; -->
+<input type="radio" ng-model="$ctrl.selected" ng-value="$ctrl.value" />
+
+

If your code relied on the non-strict comparison, you need to convert the values so that they +continue to match with strict comparison.

+

+

input[type=range]:

+

+ +Due to 913016 +and the built-in support for range inputs, the behavior of such elements when bound to ngModel +will be different than before:

+
    +
  • Like input[type=number], it requires the model to be a Number, and will set the model to a +Number.
  • +
  • It supports setting the min/max values only via the min/max attributes.
  • +
  • It follows the browser behavior of never allowing an invalid value. That means, when the browser +converts an invalid value (empty: null, undefined, false ..., out of bounds: greater than +max, less than min) to a valid value, the input will in turn set the model to this new valid value +via $setViewValue.
      +
    • This means a range input will never have the required validation error and never have a +non-Number model value, once the ngModel directive is initialized.
    • +
    • This behavior is supported when the model changes and when the min/max attributes change in a +way that prompts the browser to update the input value.
    • +
    +
  • +
  • Browsers that do not support input[type=range] (IE9) handle the input like a number input (with +validation etc).
  • +
+

+

ngBind:

+

+Due to fa80a6, +ngBind now uses the same logic as $interpolate (i.e. {{ myObject }}) when binding, which means +values other than strings are now transformed as follows:

+
    +
  • null/undefined become the empty string.
  • +
  • If an object is not Array, Number or Date and has a custom toString() function, use that.
  • +
  • Otherwise use JSON.stringify().
  • +
+

Previously, ngBind would always use toString(). The following examples show the difference:

+
$scope.myPlainObject = {a: 1, b: 2};
+$scope.myCustomObject = {a: 1, b: 2, toString: function() { return 'a+b'; }};
+
+

Plain Object:

+
<!-- Before: -->
+<span ng-bind="myPlainObject">[object Object]</span>
+
+<!-- After: -->
+<span ng-bind="myPlainObject">{'a':1,'b':2}</span>
+
+

Object with custom toString():

+
<!-- Before: -->
+<span ng-bind="myCustomObject">[object Object]</span>
+
+<!-- After: -->
+<span ng-bind="myCustomObject">a+b</span>
+
+

If you want the output of toString(), you can call it manually on the value in ngBind:

+
<span ng-bind="myObject.toString()">[object Object]</span>
+
+

+

ngModel:

+

+Due to 9e24e7, +NgModelController now defines its methods on its prototype, instead of on each instance. As a +consequence, NgModelController methods always need to be called in the correct context. For example +$scope.$watch('something', myNgModelCtrl.$setDirty) will no longer work, because the $setDirty +method is passed without any context. The code must now be changed to:

+
$scope.$watch('something', function() {
+  myNgModelCtrl.$setDirty();
+})
+
+


+

+Due to 7bc71a, +the values returned by synchronous validators are always treated as boolean. Previously, only a +literal false return value would cause the validation to fail. Now, all falsy values will cause +the validation to fail, as one would naturally expect.

+

Specifically, the values 0, null, NaN and '' (the empty string) used to cause the validation +to pass and they will now cause it to fail. The value undefined was treated similarly to a pending +asynchronous validator, causing the validation to be pending. undefined is now also treated as +false.

+

If your synchronous validators are always returning boolean values (which should already be the case +for most applications anyway), then this change does not affect you. If not, make sure you always +return a boolean value (true/false) indicating whether the input is valid or not.

+

+

ngModelOptions:

+

+Due to 296cfc, +the programmatic API for ngModelOptions has changed. You must now read options via the +ngModelController.$options.getOption(name) method, rather than accessing the option directly as a +property of the ngModelContoller.$options object. One benefit of these changes, though, is that +the ngModelControler.$options property is now guaranteed to be defined so there is no need to +check before accessing.

+

This does not affect the usage in templates and only affects custom directives that might have been +reading options for their own purposes. If you were programmatically accessing the options, you need +to change your code as follows:

+

Before:

+
var myOption = ngModelController.$options && ngModelController.$options['my-option'];
+
+

After:

+
var myOption = ngModelController.$options.getOption('my-option');
+
+

+

ngTransclude:

+

+ +Due to 32aa7e, +if you only provide whitespace as the transclusion content, it will be assumed to be empty and the +fallback content will be used instead. Previously, whitespace only transclusion would be treated as +the transclusion being "not empty", which meant that fallback content was not used in that case.

+

If you actually want whitespace to appear as the transcluded content, then you can force it to be +used by adding an HTML comment to the whitespace:

+
<my-component>
+  <!-- Use this as transclusion content even if empty. -->
+</my-component>
+
+

+

select:

+

+Due to f02b70, +using ngValue on <option> elements inside a <select ng-model> will automatically set values on +them in hash form (used internally by select to map to the corresponding model value). I.e. +<option ng-value="myString"> will become <option ng-value="myString" value="string:myString">.

+

This is necessary in order to support binding options with values of any type to selects and should +hardly affect any applications, as the values of options are usually not relevant to the +application logic. (Although, it may affect tests that check the value attribute of <option> +elements.)

+


+

+Due to e8c2e1, +<option> elements will no longer have their value attribute set from their text value when their +<select> element doesn't have ngModel associated with it. Setting the value is only needed for +the select directive to match model values and options. If ngModel is not present, the select +directive doesn't need it.

+

This should not affect many applications as the behavior was undocumented and not part of the public +API. It also has no effect on the usual HTML5 behavior that sets the select value to the option text +if the option does not provide a value attribute.

+


+

+

Core: Services

+

+

$compile:

+

+ +Due to bcd0d4, +pre-assigning bindings on component/directive controller instances is disabled by default, which +means that they will no longer be available inside the constructors. It is still possible to turn it +back on, which should help during the migration. Pre-assigning bindings has been deprecated and will +be removed in a future version, so we strongly recommend migrating your applications to not rely on +it as soon as possible.

+

Initialization logic that relies on bindings being present should be put in the controller's +$onInit() method, which is guaranteed to always be called after the bindings have been assigned.

+

Before:

+
.component('myComponent', {
+  bindings: {value: '<'},
+  controller: function() {
+    // `this.value` might or might not be initialized,
+    // based on whether `preAssignBindingsEnabled` is true or false.
+    this.doubleValue = this.value * 2;
+  }
+})
+
+

After:

+
.component('myComponent', {
+  bindings: {value: '<'},
+  controller: function() {
+    this.$onInit = function() {
+      // `this.value` will always be initialized,
+      // regardless of the value of `preAssignBindingsEnabled`.
+      this.doubleValue = this.value * 2;
+    };
+  }
+})
+
+

If you need to, you can re-enabled this feature with the following configuration block:

+
.config(function($compileProvider) {
+  $compileProvider.preAssignBindingsEnabled(true);
+})
+
+

Note: +This will re-enable the feature for the whole application, so only do it if you are in control of +the whole application. If you are writing a library, you need to change your code as shown above. +Furthermore, if your library also targets versions before 1.5 (which do not support the $onInit() +lifecycle hook), you may need to manually call $onInit() from your constructor:

+
.directive('myComponent', function() {
+  return {
+    scope: {value: '<'},
+    controller: function() {
+      // Put initialization logic inside `$onInit()`
+      // to make sure bindings have been initialized.
+      this.$onInit = function() {
+        this.doubleValue = this.value * 2;
+      };
+
+      // Prior to v1.5, we need to call `$onInit()` manually.
+      // (Bindings will always be pre-assigned in these versions.)
+      if (angular.version.major === 1 && angular.version.minor < 5) {
+        this.$onInit();
+      }
+    }
+  };
+})
+
+


+

+Due to 04cad4, +link[href] attributes are now protected via $sce, which prevents interpolated values that fail +the RESOURCE_URL context tests from being used in interpolation. For example if the application is +running at https://docs.angularjs.org then the following will fail:

+
<link href="{{ 'http://mydomain.org/unsafe.css' }}" rel="stylesheet" />
+
+

By default, only URLs with the same domain and protocol as the application document are considered +safe in the RESOURCE_URL context. To use URLs from other domains and/or protocols, you may either +whitelist them or wrap them into a trusted value by calling $sce.trustAsResourceUrl(url).

+


+

+Due to 97bbf8, +whitespace in attributes is no longer trimmed automatically. This includes leading and trailing +whitespace, and attributes that are purely whitespace. To migrate, attributes that require trimming +must now be trimmed manually. A common case where stray whitespace can cause problems is when +attribute values are compared, for example in $observe.

+

Before:

+
$attrs.$observe('myAttr', function(newVal) {
+  if (newVal === 'some value') ...
+});
+
+

After:

+
$attrs.$observe('myAttr', function(newVal) {
+  if (newVal.trim() === 'some value') ...
+});
+
+

Note that $parse trims expressions automatically, so attributes with expressions (e.g. directive +bindings) should not be affected by this change.

+


+

+Due to 13c252, +on IE11 only, consecutive text nodes will always get merged. Previously, they would not get +merged if they had no parent. The new behavior, which fixes an IE11 bug affecting interpolation +under certain circumstances, might in some edge-cases have unexpected side effects that you should +be aware of. Please, check the commit message for more details.

+


+

+Due to b89c21, +using interpolation in any on* event attribute (e.g. <button onclick="{{myVar}}">) will now +throw the nodomevents error at compile time. Previously, the nodomevents was thrown at link +time. This change is not expected to affect any applications, as it is related to incorrect API use +that should not make it to production apps in the first place.

+

+

$http:

+

+ +Due to fb6634, +you can no longer use the JSON_CALLBACK placeholder in your JSONP requests. Instead you must +provide the name of the query parameter that will pass the callback via the jsonpCallbackParam +property of the config object, or app-wide via the $http.defaults.jsonpCallbackParam property, +which is "callback" by default.

+

Before:

+
$http.json('trusted/url?callback=JSON_CALLBACK');
+$http.json('other/trusted/url', {params: {cb: 'JSON_CALLBACK'}});
+
+

After:

+
$http.json('trusted/url');
+$http.json('other/trusted/url', {jsonpCallbackParam: 'cb'});
+
+


+

+ +Due to 6476af, +all JSONP requests now require the URL to be trusted as a resource URL. There are two approaches to +trust a URL:

+
    +
  1. Whitelisting with the $sceDelegateProvider.resourceUrlWhitelist() method. +You configure this list in a module configuration block:

    +
    appModule.config(['$sceDelegateProvider', function($sceDelegateProvider) {
    +  $sceDelegateProvider.resourceUrlWhitelist([
    +    // Allow same origin resource loads.
    +    'self',
    +    // Allow JSONP calls that match this pattern
    +    'https://some.dataserver.com/**.jsonp?**'
    +  ]);
    +}]);
    +
    +
  2. +
  3. Explicitly trusting the URL via the $sce.trustAsResourceUrl(url) method. +You can pass a trusted object instead of a string as a URL to the $http service:

    +
    var promise = $http.jsonp($sce.trustAsResourceUrl(url));
    +
    +
  4. +
+


+

+Due to 4f6f2b, +HTTP requests now update the outstanding request count synchronously. Previously, the request count +would not have been updated until the request to the server was actually in flight. Now the request +count is updated before any async interceptor is called.

+

The new behavior will also allow end-2-end tests to more correctly detect when Angular is stable, +but there is a chance it may change the observed behaviour in cases where an async request +interceptor is being used.

+


+

+Due to b54a39, +$http's deprecated custom callback methods - success() and error() - have been removed. You +can use the standard then()/catch() promise methods instead, but note that the method signatures +and return values are different.

+

success(fn) can be replaced with then(fn), and error(fn) can be replaced with either +then(null, fn) or catch(fn).

+

Before:

+
$http(...).
+success(function onSuccess(data, status, headers, config) {
+  // Handle success
+  ...
+}).
+error(function onError(data, status, headers, config) {
+  // Handle error
+  ...
+});
+
+

After:

+
$http(...).
+  then(function onSuccess(response) {
+    // Handle success
+    var data = response.data;
+    var status = response.status;
+    var statusText = response.statusText;
+    var headers = response.headers;
+    var config = response.config;
+    ...
+  }, function onError(response) {
+    // Handle error
+    var data = response.data;
+    var status = response.status;
+    var statusText = response.statusText;
+    var headers = response.headers;
+    var config = response.config;
+    ...
+  });
+
+// or
+
+$http(...).
+  then(function onSuccess(response) {
+    // Handle success
+    var data = response.data;
+    var status = response.status;
+    var statusText = response.statusText;
+    var headers = response.headers;
+    var config = response.config;
+    ...
+  }).
+  catch(function onError(response) {
+    // Handle error
+    var data = response.data;
+    var status = response.status;
+    var statusText = response.statusText;
+    var headers = response.headers;
+    var config = response.config;
+    ...
+  });
+
+

Note: +There is a subtle difference between the variations showed above. When using +$http(...).success(onSuccess).error(onError) or $http(...).then(onSuccess, onError), the +onError() callback will only handle errors/rejections produced by the $http() call. If the +onSuccess() callback produces an error/rejection, it won't be handled by onError() and might go +unnoticed. In contrast, when using $http(...).then(onSuccess).catch(onError), onError() will +handle errors/rejections produced by both $http() and onSuccess().

+

+

$interpolate:

+

+Due to a5fd2e, +when converting values to strings, interpolation now uses a custom toString() function on objects +that are not Number, Array or Date (custom means that the toString function is not the same as +Object.prototype.toString). Otherwise, interpolation uses JSON.stringify() as usual. If an +object has a custom toString() function, but you still want the output of JSON.stringify(), you +will need to manually convert to JSON (as shown below).

+

Before:

+
<span>{{ myObject }}</span>
+
+

After:

+
<span>{{ myObject | json }}</span>
+
+

+

$location:

+

+ +Due to aa077e8, +the default hash-prefix used for $location hash-bang URLs has changed from the empty string ('') +to the bang ('!'). If your application does not use HTML5 mode or is being run on browsers that do +not support HTML5 mode, and you have not specified your own hash-prefix then client side URLs will +now contain a ! prefix. For example, rather than mydomain.com/#/a/b/c the URL will become +mydomain.com/#!/a/b/c.

+

If you actually want to have no hash-prefix, then you can restore the previous behavior by adding a +configuration block to you application:

+
appModule.config(['$locationProvider', function($locationProvider) {
+  $locationProvider.hashPrefix('');
+}]);
+
+

+

$q:

+

+Due to e13eea, +an error thrown from a promise's onFulfilled or onRejection handlers is treated exactly the same +as a regular rejection. Previously, it would also be passed to the $exceptionHandler() (in +addition to rejecting the promise with the error as reason).

+

The new behavior applies to all services/controllers/filters etc that rely on $q (including +built-in services, such as $http and $route). For example, $http's transformRequest/Response +functions or a route's redirectTo function as well as functions specified in a route's resolve +object, will no longer result in a call to $exceptionHandler() if they throw an error. Other than +that, everything will continue to behave in the same way; i.e. the promises will be rejected, route +transition will be cancelled, $routeChangeError events will be broadcasted etc.

+


+

+Due to c9dffde, +possibly unhandled rejected promises will be logged to the $exceptionHandler. Normally, that means +that an error will be logged to the console, but in tests $exceptionHandler will (by default) +re-throw any exceptions. +Tests that are affected by this change (e.g. tests that depend on specific order or number of +messages in $exceptionHandler) will need to handle rejected promises.

+


+

+

Core: Miscellaneous

+

+

jqLite:

+

+Due to fc0c11, +jqLite will camelCase the keys passed to the .data() method, in the same way as jQuery 3+ does; +i.e. single hyphens followed by a lowercase letter will be converted to an uppercase letter. +Previously, keys passed to .data() were left untouched.

+

For example, with this change, the keys a-b and aB will now represent the same data piece; +writing to one of them will also be reflected when reading the value of the other one.

+

To migrate, you need to update your code as shown in the following examples:

+

Before:

+
/* 1 */
+elem.data('my-key', 2);
+elem.data('myKey', 3);
+
+/* 2 */
+elem.data('foo-bar', 42);
+elem.data()['foo-bar']; // 42
+elem.data()['fooBar']; // undefined
+
+/* 3 */
+elem.data()['foo-bar'] = 1;
+elem.data()['fooBar'] = 2;
+elem.data('foo-bar'); // 1
+
+

After:

+
/* 1 */
+// Rename one of the keys as they would now map to the same data slot.
+elem.data('my-key', 2);
+elem.data('my-key2', 3);
+
+/* 2 */
+elem.data('foo-bar', 42);
+elem.data()['foo-bar']; // undefined
+elem.data()['fooBar']; // 42
+
+/* 3 */
+elem.data()['foo-bar'] = 1;
+elem.data()['fooBar'] = 2;
+elem.data('foo-bar'); // 2
+
+


+

+Due to 73050c, +the way jqLite camelCases keys passed to .css() is aligned with jQuery. Previously, when using +Angular without jQuery, .css() would camelCase keys more aggressively. Now, only a single hyphen +followed by a lowercase letter is getting transformed. This change also affects other APIs that rely +on the .css() method, such as ngStyle.

+

If you are using Angular with jQuery, your application is not affected by this change. If you are +not using jQuery, then you need to update your code as shown in the following examples:

+

Before:

+
<!-- HTML -->
+
+<!-- All five versions used to be equivalent. -->
+<div ng-style={background_color: 'blue'}></div>
+<div ng-style={'background:color': 'blue'}></div>
+<div ng-style={'background-color': 'blue'}></div>
+<div ng-style={'background--color': 'blue'}></div>
+<div ng-style={backgroundColor: 'blue'}></div>
+
+
// JS
+
+// All five versions used to be equivalent.
+elem.css('background_color', 'blue');
+elem.css('background:color', 'blue');
+elem.css('background-color', 'blue');
+elem.css('background--color', 'blue');
+elem.css('backgroundColor', 'blue');
+
+// All five versions used to be equivalent.
+var bgColor = elem.css('background_color');
+var bgColor = elem.css('background:color');
+var bgColor = elem.css('background-color');
+var bgColor = elem.css('background--color');
+var bgColor = elem.css('backgroundColor');
+
+

After:

+
<!-- HTML -->
+
+<!-- Only these two versions are still equivalent to the five shown above. -->
+<div ng-style={'background-color': 'blue'}></div>
+<div ng-style={backgroundColor: 'blue'}></div>
+
+
// JS
+
+// Only these two versions are still equivalent to the five shown above.
+elem.css('background-color', 'blue');
+elem.css('backgroundColor', 'blue');
+
+// Only these two versions are still equivalent to the five shown above.
+var bgColor = elem.css('background-color');
+var bgColor = elem.css('backgroundColor');
+
+


+

+Due to 7ceb5f, +getting/setting boolean attributes will no longer take the corresponding properties into account. +Previously, all boolean attributes were reflected into the corresponding property when calling a +setter and from the corresponding property when calling a getter, even on elements that don't treat +those attributes in a special way. Now Angular doesn't do it by itself, but relies on browsers to +know when to reflect the property. Note that this browser-level conversion differs between browsers; +if you need to dynamically change the state of an element, you should modify the property, not the +attribute. See https://jquery.com/upgrade-guide/1.9/#attr-versus-prop- for a more detailed +description about a related change in jQuery 1.9.

+

This change aligns jqLite with jQuery 3. To migrate the code follow the example below:

+

Before:

+
/* CSS */
+
+input[checked="checked"] { ... }
+
+
// JS
+
+elem1.attr('checked', 'checked');
+elem2.attr('checked', false);
+
+

After:

+
/* CSS */
+
+input:checked { ... }
+
+
// JS
+
+elem1.prop('checked', true);
+elem2.prop('checked', false);
+
+


+

+Due to 3faf45, +calling .attr(attrName, '') (with attrName being a boolean attribute) will no longer remove the +attribute, but set it to its lowercase name as happens for every non-empty string. Previously, +calling .attr(attrName, '') would remove the boolean attribute.

+

If you want to remove a boolean attribute now, you have to call .attr() with false or null. +E.g.: .attr(attrName, false)

+


+

+Due to 4e3624, +calling .attr(attrName, null) will remove the attribute. Previously, it would set the +attrName attribute value to the string 'null'. If you want to set the attribute value to the +string 'null', you have to explicitly call .attr(attrName, 'null').

+


+

+Due to d882fd, +calling the .val() getter on a jqLite element representing a <select multiple> element with no +options chosen will return an empty array. Previously, it would return null. If you relied on the +returned value being null or falsy, you need to change your code to check for a length of 0 +instead:

+

Before:

+
<select multiple>...</select>
+
+
var value = $element.val();
+if (value) { /* do something */ }
+
+

After:

+
<select multiple>...</select>
+
+
var value = $element.val();
+if (value.length > 0) { /* do something */ }
+
+

+

decorator():

+

+Due to 6a2ebd, +module.decorator declarations are now processed as part of the module.config queue and may +result in providers being decorated in a different order if module.config blocks are also used to +decorate providers via $provide.decorator.

+

For example, consider the following declaration order in which 'theFactory' is decorated by both a +module.decorator and a $provide.decorator:

+
angular
+.module('theApp', [])
+.factory('theFactory', theFactoryFn)
+.config(function($provide) {
+  $provide.decorator('theFactory', provideDecoratorFn);
+})
+.decorator('theFactory', moduleDecoratorFn);
+
+

Before this change, 'theFactory' provider would be decorated in the following order:

+
    +
  1. moduleDecoratorFn
  2. +
  3. provideDecoratorFn
  4. +
+

After this change, the order in which 'theFactory' is decorated will be different, because now +module.decorator declarations are processed in the same order as module.config declarations:

+
    +
  1. provideDecoratorFn
  2. +
  3. moduleDecoratorFn
  4. +
+


+

+

ngAria

+

+

$aria:

+

+Due to ad41ba, +if you were explicitly setting the value of the bindKeypress flag, you need to change your code to +use bindKeydown instead.

+

Before: $ariaProvider.config({bindKeypress: xyz})
+After: $ariaProvider.config({bindKeydown: xyz})

+

+

ngClick:

+

+Due to ad41ba, +ngClick will respond to the keydown keyboard event, instead of the keypress. Also, if the +element already has any of the ngKeydown/ngKeyup/ngKeypress directives, ngAria will not +bind to the keydown event, since it assumes that the developer has already taken care of keyboard +interaction for that element. Although it is not expected to affect many applications, it might be +desirable to keep the previous behavior of binding to the keypress event instead of the keydown. +In that case, you need to manually use the ngKeypress directive (in addition to ngClick).

+

Before:

+
<div ng-click="onClick()">
+  I respond to `click` and `keypress` (not `keydown`)
+</div>
+
+

After:

+
<div ng-click="onClick()" ng-keypress="onClick()">
+  I respond to `click` and `keypress` (not `keydown`)
+</div>
+<!-- OR -->
+<div ng-click="onClick()">
+  I respond to `click` and `keydown` (not `keypress`)
+</div>
+
+

Finally, it is possible that this change affects your unit or end-to-end tests. If you are currently +expecting your custom buttons to automatically respond to the keypress event (due to ngAria), +you need to change the tests to trigger keydown events instead.

+

+

ngModel:

+

+ +Due to 975a61, +custom checkbox-shaped controls (e.g. checkboxes, menuitemcheckboxes), no longer have a custom +$isEmpty() method on their NgModelController that checks for value === false. Unless +overwritten, the default $isEmpty() method will be used, which treats undefined, null, NaN +and '' as "empty".

+

Note: The $isEmpty() method is used to determine if the checkbox is checked ("not empty" means + "checked"). Thus it can indirectly affect other things, such as the control's validity + with respect to the required validator (e.g. "empty" + "required" --> "invalid").

+

Before:

+
var template = '<my-checkbox role="checkbox" ng-model="value"></my-checkbox>';
+var customCheckbox = $compile(template)(scope);
+var ctrl = customCheckbox.controller('ngModel');
+
+scope.$apply('value = false');
+console.log(ctrl.$isEmpty());   //--> true
+
+scope.$apply('value = true');
+console.log(ctrl.$isEmpty());   //--> false
+
+scope.$apply('value = undefined'/* or null or NaN or '' */);
+console.log(ctrl.$isEmpty());   //--> false
+
+

After:

+
var template = '<my-checkbox role="checkbox" ng-model="value"></my-checkbox>';
+var customCheckbox = $compile(template)(scope);
+var ctrl = customCheckbox.controller('ngModel');
+
+scope.$apply('value = false');
+console.log(ctrl.$isEmpty());   //--> false
+
+scope.$apply('value = true');
+console.log(ctrl.$isEmpty());   //--> false
+
+scope.$apply('value = undefined'/* or null or NaN or '' */);
+console.log(ctrl.$isEmpty());   //--> true
+
+

If you want to have a custom $isEmpty() method, you need to overwrite the default. For example:

+
.directive('myCheckbox', function myCheckboxDirective() {
+  return {
+    require: 'ngModel',
+    link: function myCheckboxPostLink(scope, elem, attrs, ngModelCtrl) {
+      ngModelCtrl.$isEmpty = function myCheckboxIsEmpty(value) {
+        return !value;   // Any falsy value means "empty"
+
+        // Or to restore the previous behavior:
+        // return value === false;
+      };
+    }
+  };
+})
+
+


+

+Due to 9978de1, +the role attribute will no longer be added to native control elements (textarea, button, select, +summary, details, a, and input). Previously, role was not added to input, but all others in the +list. +This should not affect accessibility, because native inputs are accessible by default, but it might +affect applications that relied on the role attribute being present (e.g. for styling or as +directive attributes).

+


+

+

ngMock

+

+

$httpBackend:

+

+Due to 267ee9, +calling $httpBackend.verifyNoOutstandingRequest() will trigger a digest. This will ensure that +requests fired asynchronously will also be detected (without the need to manually trigger a digest). +This is not expected to affect the majority of test-suites. Most of the time, a digest is (directly +or indirectly) triggered anyway, before calling verifyNoOutstandingRequest(). In the unlikely case +that a test needs to verify the timing of a request with respect to the digest cycle, you should +rely on other means, such as mocking and/or spying.

+


+

+Due to 7551b8, +it is no longer valid to explicitly pass undefined as the url argument to any of the +$httpBackend.when...() and $httpBackend.expect...() methods. While this argument is optional, it +must have a defined value if provided. Previously passing an explicit undefined value was ignored, +but this lead to invalid tests passing unexpectedly.

+


+

+

ngResource

+

+

$resource:

+

+Due to acb545, +all own properties of the params object that are not used to replace URL params, will be passed to +$http as config.params (to be used as query parameters in the URL). Previously, parameters where +omitted if Object.prototype had a property with the same name. E.g.:

+

Before:

+
var Foo = $resource('/foo/:id');
+Foo.get({id: 42, bar: 'baz', toString: 'hmm'});
+    // URL: /foo/42?bar=baz
+    // Note that `toString` is _not_ included in the query,
+    // because `Object.prototype.toString` is defined :(
+
+

After:

+
var Foo = $resource('/foo/:id');
+Foo.get({id: 42, bar: 'baz', toString: 'hmm'});
+    // URL: /foo/42?bar=baz&toString=hmm
+    // Note that `toString` _is_ included in the query, as expected :)
+
+


+

+Due to 2456ab, +semicolon has been added to the list of delimiters that are not encoded in URL params. Although it +shouldn't matter in practice (since both the encoded and the unencoded ; character would be +interpreted identically by the server), this change could break some tests: For example, where +$httpBackend was set up to expect an encoded ; character, but the request is made to the URL +with an unencoded ; character.

+


+

+

ngRoute

+

+

$route:

+

+Due to c13c66, +$route (and its dependencies; e.g. $location) will - by default - be instantiated early on. +Previously, in cases where ngView was loaded asynchronously, $route (and its dependencies) might +also have been instantiated asynchronously.

+

Although this is not expected to have unwanted side-effects in normal application behavior, it may +affect your unit tests: When testing a module that (directly or indirectly) depends on ngRoute, a +request will be made for the default route's template. If not properly "trained", $httpBackend +will complain about this unexpected request. You can restore the previous behavior (and avoid +unexpected requests in tests), by using $routeProvider.eagerInstantiationEnabled(false).

+


+

+Due to e98656, +if a redirectTo function throws an Error, a $routeChangeError event will be fired. Previously, +execution would be aborted without firing a $routeChangeError event.

+


+

+Due to 7f4b35, +the $route service will no longer instantiate controllers nor call resolve or +template/templateUrl functions for routes that successfully redirectTo other routes.

+

Migrating from 1.4 to 1.5

+

Angular 1.5 takes a big step towards preparing developers for a smoother transition to Angular 2 in +the future. Architecting your applications using components, multi-slot transclusion, one-way +bindings in isolate scopes, using lifecycle hooks in directive controllers and relying on native ES6 +features (such as classes and arrow functions) are now all possible with Angular 1.5.

+

This release includes numerous bug and security fixes, as well as performance improvements to core +services, directives, filters and helper functions. Existing applications can start enjoying the +benefits of such changes in $compile, $parse, $animate, $animateCss, $sanitize, ngOptions, +currencyFilter, numberFilter, copy() (to name but a few) without any change in code.

+

New features have been added to more than a dozen services, directives and filters across 8 modules. +Among them, a few stand out:

+
    +
  • angular.component(): Introducing "components", a special sort of directive that are easy to +configure and promote best practices (plus can bring Angular 1 applications closer to Angular 2's +style of architecture).
  • +
  • Multi-slot transclusion: Enabling the design of more powerful and complex UI elements with a much +simpler configuration and reduced boilerplate.
  • +
  • $onInit lifecycle hook: Introducing a new lifecycle hook for directive controllers, called after +all required controllers have been constructed. This enables access to required controllers from +a directive's controller, without having to rely on the linking function.
  • +
  • ngAnimateSwap: A new directive in ngAnimate, making it super easy to create rotating +banner-like components.
  • +
  • Testing helpers: New helper functions in ngMock, simplifying testing for animations, component +controllers and routing.
  • +
+

Also, notable is the improved support for ES6 features, such as classes and arrow functions. These +features are now more reliably detected and correctly handled within the core.

+

All this goodness doesn't come without a price, though. Below is a list of breaking changes (grouped +by module) that need to be taken into account while migrating from 1.4. Fortunately, the majority of +them should have a pretty low impact on most applications.

+

Core

+

We tried to keep the breaking changes inside the core components to a bare minimum. Still, a few of +them were unavoidable.

+

Services ($parse)

+

Due to 0ea53503, +a new special property, $locals, will be available for accessing the locals from an expression. +This is a breaking change, only if a $locals property does already exist (and needs to be +referenced) either on the scope or on the locals object. Your expressions should be changed to +access such existing properties as this.$locals and $locals.$locals respectively.

+

Directives (ngOptions)

+

A fair amount of work has been put into the ngOptions directive, fixing bugs and corner-cases and +neutralizing browser quirks. A couple of breaking changes were made in the process:

+

Due to b71d7c3f, +falsy values ('', 0, false and null) are properly recognized as option group identifiers for +options passed to ngOptions. Previously, all of these values were ignored and the option was not +assigned to any group. undefined is still interpreted as "no group". +If you have options with falsy group indentifiers that should still not be assigned to any group, +then you must filter the values before passing them to ngOptions, converting falsy values to +undefined.

+

Due to ded25187, +ngOptions now explicitly requires ngModel on the same element, thus an error will be thrown if +ngModel is not found. Previously, ngOptions would silently fail, which could lead to +hard-to-debug errors. +This is not expected to have any significant impact on applications, since ngOptions didn't work +without ngModel before either. The main difference is that now it will fail with a more +informative error message.

+

Filters (orderBy)

+

Due to 2a85a634, +passing a non-array-like value (other than undefined or null) through the orderBy filter will +throw an error. Previously, the input was returned unchanged, which could lead to hard-to-spot bugs +and was not consistent with other filters (e.g. filter). +Objects considered array-like include: arrays, array subclasses, strings, NodeLists, +jqLite/jQuery collections

+

Helper Functions:

+

The angular.lowercase and angular.uppercase functions have been deprecated and will be removed +in version 1.7.0. It is recommended to use String.prototype.toLowerCase and String.prototype.toUpperCase functions instead.

+

ngAria

+

Due to d06431e, +the ngAria-enhanced directives (e.g. ngModel, ngDisabled etc) will not apply ARIA attributes +to native inputs, unless necessary. Previously, ARIA attributes were always applied to native +inputs, despite this being unnecessary in most cases. +In the context of ngAria, elements considered "native inputs" include: +<a>, <button>, <details>, <input>, <select>, <summary>, <textarea>

+

This change will not affect the accessibility of your applications (since native inputs are +accessible by default), but if you relied on ARIA attributes being present on native inputs (for +whatever reason), you'll have to add and update them manually.

+

Additionally, the aria-multiline attribute, which was previously added to elements with a type +or role of textbox, will not be added anymore, since there is no way ngAria can tell if the +textbox element is multiline or not. +If you relied on aria-multiline="true" being automatically added by ngAria, you need to apply it +yourself. E.g. change your code from <div role="textbox" ng-model="..." ...> to +<div role="textbox" ng-model="..." ... aria-multiline="true">.

+

ngMessages (ngMessage)

+

Due to 4971ef12, +the ngMessage directive is now compiled with a priority of 1, which means directives on the same +element as ngMessage with a priority lower than 1 will be applied when ngMessage calls its +$transclude function. Previously, they were applied during the initial compile phase and were +passed the comment element created by the transclusion of ngMessage. +If you have custom directives that relied on the previous behavior, you need to give them a priority +of 1 or greater.

+

ngResource ($resource)

+

The $resource service underwent a minor internal refactoring to finally solve a long-standing bug +preventing requests from being cancelled using promises. Due to the nature of $resource's +configuration, it was not possible to follow the $http convention. A new $cancelRequest() method +was introduced instead.

+

Due to 98528be3, +using a promise as timeout in $resource is no longer supported and will log a warning. This is +hardly expected to affect the behavior of your application, since a promise as timeout didn't work +before either, but it will now warn you explicitly when trying to pass one. +If you need to be able to cancel pending requests, you can now use the new $cancelRequest() that +will be available on $resource instances.

+

ngRoute (ngView)

+

Due to 983b0598, +a new property will be available on the scope of the route, allowing easy access to the route's +resolved values from the view's template. The default name for this property is $resolve. This is +a breaking change, only if a $resolve property is already available on the scope, in which case +the existing property will be hidden or overwritten. +To fix this, you should choose a custom name for this property, that does not collide with other +properties on the scope, by specifying the resolveAs property on the route.

+

ngSanitize ($sanitize, linky)

+

The HTML sanitizer has been re-implemented using inert documents, increasing security, fixing some +corner-cases that were difficult to handle and reducing its size by about 20% (in terms of loc). In +order to make it more secure by default, a couple of breaking changes have been introduced:

+

Due to 181fc567, +SVG support in $sanitize is now an opt-in feature (i.e. disabled by default), as it could make +an application vulnerable to click-hijacking attacks. If your application relies on it, you can +still turn it on with $sanitizeProvider.enableSvg(true), but you extra precautions need to be +taken in order to keep your application secure. Read the documentation for more information about +the dangers and ways to mitigate them.

+

Due to 7a668cdd, +the $sanitize service will now remove instances of the <use> tag from the content passed to it. +This element is used to import external SVG resources, which is a security risk as the $sanitize +service does not have access to the resource in order to sanitize it.

+

Similarly, due to 234053fc, +the $sanitize service will now also remove instances of the usemap attribute from any elements +passed to it. This attribute is used to reference another element by name or id. Since the +name and id attributes are already blacklisted, a sanitized usemap attribute could only +reference unsanitized content, which is a security risk.

+

Due to 98c2db7f, +passing a non-string value (other than undefined or null) through the linky filter will throw +an error. This is not expected to have any significant impact on applications, since the input was +always assumed to be of type 'string', so passing non-string values never worked correctly anyway. +The main difference is that now it will fail faster and with a more informative error message.

+

ngTouch (ngClick)

+

Due to 0dfc1dfe, +the ngClick override directive from the ngTouch module is deprecated and disabled by default. +This means that on touch-based devices, users might now experience a 300ms delay before a click +event is fired.

+

If you rely on this directive, you can still enable it using +$touchProvider.ngClickOverrideEnabled():

+
angular.module('myApp').config(function($touchProvider) {
+  $touchProvider.ngClickOverrideEnabled(true);
+});
+
+

Going forward, we recommend using FastClick or perhaps one of +the Angular 3rd party touch-related modules that provide similar +functionality.

+

Also note that modern browsers already remove the 300ms delay under some circumstances:

+
    +
  • Chrome and Firefox for Android remove the 300ms delay when the well-known +<meta name="viewport" content="width=device-width"> is set.
  • +
  • Internet Explorer removes the delay, when the touch-action css property is set to none or +manipulation.
  • +
  • Since iOS 8, Safari removes the delay on so-called "slow taps".
  • +
+

For more info on the topic, you can take a look at this +article by Telerik.

+
+ Note: This change does not affect the ngSwipe directive. +
+ + + + + +

Migrating from 1.3 to 1.4

+

AngularJS 1.4 fixes major animation issues and introduces a new API for ngCookies. Further, there +are changes to ngMessages, $compile, ngRepeat, ngOptions, ngPattern, pattern and some fixes to core filters: limitTo and filter.

+

The reason for the ngAnimate refactor was to fix timing issues and to expose new APIs to allow +for developers to construct more versatile animations. We now have access to $animateCss +and the many timing-oriented bugs were fixed which results in smoother animations. +If animation is something of interest, then please read over the breaking changes below for animations when +ngAnimate is used.

+

ngMessages has been upgraded to allow for dynamic message resolution. This handy feature allows for developers +to render error messages with ngMessages that are listed with a directive such as ngRepeat. A great usecase for this +involves pulling error message data from a server and then displaying that data via the mechanics of ngMessages. Be +sure to read the breaking change involved with ngMessagesInclude to upgrade your template code.

+

Other changes, such as the ordering of elements with ngRepeat and ngOptions and the way ngPattern and pattern directives +validate the regex, may also affect the behavior of your application. And be sure to also read up on the changes to $cookies. +The migration jump from 1.3 to 1.4 should be relatively straightforward otherwise.

+

Animation (ngAnimate)

+

Animations in 1.4 have been refactored internally, but the API has stayed much the same. There are, however, +some breaking changes that need to be addressed when upgrading to 1.4.

+

Due to c8700f04, +JavaScript and CSS animations can no longer be run in +parallel. With earlier versions of ngAnimate, both CSS and JS animations +would be run together when multiple animations were detected. This +feature has been removed, however, the same effect, with even more +possibilities, can be achieved by injecting $animateCss into a +JavaScript-defined animation and creating custom CSS-based animations +from there.

+

By using $animateCss inside of a JavaScript animation in Angular 1.4, we can trigger custom CSS-based animations +directly from our JavaScript code.

+
ngModule.animation('.slide-animation', ['$animateCss', function($animateCss) {
+  return {
+    enter: function(element, doneFn) {
+      // this will trigger a `.ng-enter` and `.ng-enter-active` CSS animation
+      var animation = $animateCss(element, {
+        event: 'enter'
+        // any other CSS-related properties
+        //   addClass: 'some-class',
+        //   removeClass: 'some-other-class',
+        //   from: {},
+        //   to: {}
+      });
+
+      // make sure to read the ngAnimate docs to understand how this works
+      animation.start().done(doneFn);
+    }
+  }
+}]);
+
+

Click here to learn how to use $animateCss in your animation code

+

Due to c8700f04, +animation-related callbacks are now fired on $animate.on instead of directly being on the element.

+
// < 1.4
+element.on('$animate:before', function(e, data) {
+  if (data.event === 'enter') { ... }
+});
+element.off('$animate:before', fn);
+
+// 1.4+
+$animate.on('enter', element, function(data) {
+  //...
+});
+$animate.off('enter', element, fn);
+
+

Due to c8700f04, +the function params for $animate.enabled() when an element is used are now flipped. This fix allows +the function to act as a getter when a single element param is provided.

+
// < 1.4
+$animate.enabled(false, element);
+
+// 1.4+
+$animate.enabled(element, false);
+
+

Due to c8700f04, +in addition to disabling the children of the element, $animate.enabled(element, false) will now also +disable animations on the element itself.

+

Due to c8700f04, +there is no need to call $scope.$apply or $scope.$digest inside of a animation promise callback anymore +since the promise is resolved within a digest automatically. (Not to worry, any extra digests will not be +run unless the promise is used.)

+
// < 1.4
+$animate.enter(element).then(function() {
+  $scope.$apply(function() {
+    $scope.explode = true;
+  });
+});
+
+// 1.4+
+$animate.enter(element).then(function() {
+  $scope.explode = true;
+});
+
+

Due to c8700f04, +when an enter, leave or move animation is triggered then it will always end any pending or active parent +class based animations (animations triggered via ngClass) in order to ensure that any CSS styles are resolved in time.

+

Forms (ngMessages, ngOptions, select, ngPattern and pattern)

+

ngMessages

+

The ngMessages module has also been subject to an internal refactor to allow it to be more flexible +and compatible with dynamic message data. The ngMessage directive now supports a new attribute +called ng-message-exp which will evaluate an expression and will keep track of that expression +as it changes in order to re-evaluate the listed messages.

+

Click here to learn more about dynamic ng-messages

+

There is only one breaking change. Please consider the following when including remote +message templates via ng-messages-include:

+

Due to c9a4421f, +the ngMessagesInclude attribute has now been removed and cannot be used in the same element containing +the ngMessages directive. Instead, ngMessagesInclude is to be used on its own element inline with +other inline messages situated as children within the ngMessages container directive.

+
<!-- AngularJS 1.3.x -->
+<div ng-messages="model.$error" ng-messages-include="remote.html">
+  <div ng-message="required">Your message is required</div>
+</div>
+
+<!-- AngularJS 1.4.x -->
+<div ng-messages="model.$error">
+  <div ng-message="required">Your message is required</div>
+  <div ng-messages-include="remote.html"></div>
+</div>
+
+

Depending on where the ngMessagesInclude directive is placed it will be prioritized inline with the other messages +before and after it.

+

Also due to c9a4421f, +it is no longer possible to use interpolation inside the ngMessages attribute expression. This technique +is generally not recommended, and can easily break when a directive implementation changes. In cases +where a simple expression is not possible, you can delegate accessing the object to a function:

+
<div ng-messages="ctrl.form['field_{{$index}}'].$error">...</div>
+
+

would become

+
<div ng-messages="ctrl.getMessages($index)">...</div>
+
+

where ctrl.getMessages()

+
ctrl.getMessages = function($index) {
+  return ctrl.form['field_' + $index].$error;
+}
+
+

ngOptions

+

The ngOptions directive has also been refactored and as a result some long-standing bugs +have been fixed. The breaking changes are comparatively minor and should not affect most applications.

+

Due to 7fda214c, +when ngOptions renders the option values within the DOM, the resulting HTML code is different. +Normally this should not affect your application at all, however, if your code relies on inspecting +the value property of <option> elements (that ngOptions generates) then be sure +to read the details.

+

Due to 7fda214c, +when iterating over an object's properties using the (key, value) in obj syntax +the order of the elements used to be sorted alphabetically. This was an artificial +attempt to create a deterministic ordering since browsers don't guarantee the order. +But in practice this is not what people want and so this change iterates over properties +in the order they are returned by Object.keys(obj), which is almost always the order +in which the properties were defined.

+

Also due to 7fda214c, +setting the ngOptions attribute expression after the element is compiled, will no longer trigger the ngOptions behavior. +This worked previously because the ngOptions logic was part of the select directive, while +it is now implemented in the ngOptions directive itself.

+

select

+

Due to 7fda214c, +the select directive will now use strict comparison of the ngModel scope value against option +values to determine which option is selected. This means non-string scope values (such as Number or Boolean) +will not be matched against equivalent option strings (such as the strings "123", "true" or "false").

+

In Angular 1.3.x, setting scope.x = 200 would select the option with the value 200 in the following select:

+
<select ng-model="x">
+  <option value="100">100</option>
+  <option value="200">200</option>
+</select>
+
+

In Angular 1.4.x, the 'unknown option' will be selected.

+

To remedy this, you can initialize the model as a string: scope.x = '200', or if you want to +keep the model as a Number, you can do the conversion via $formatters and $parsers on ngModel:

+
ngModelCtrl.$parsers.push(function(value) {
+  return parseInt(value, 10); // Convert option value to number
+});
+
+ngModelCtrl.$formatters.push(function(value) {
+  return value.toString(); // Convert scope value to string
+});
+
+

ngPattern and pattern

+

Due to 0e001084, +The ngPattern and pattern directives will validate the regex +against the $viewValue of ngModel, i.e. the value of the model +before the $parsers are applied. Previously, the $modelValue +(the result of the $parsers) was validated.

+

This fixes issues where input[date] and input[number] cannot +be validated because the $viewValue string is parsed into +Date and Number respectively (starting with AngularJS 1.3). +It also brings the directives in line with HTML5 constraint +validation, which validates against the input value.

+

This change is unlikely to cause applications to fail, because even +in AngularJS 1.2, the value that was validated by pattern could have +been manipulated by the $parsers, as all validation was done +inside this pipeline.

+

If you rely on the pattern being validated against the $modelValue, +you must create your own validator directive that overwrites +the built-in pattern validator:

+
.directive('patternModelOverwrite', function patternModelOverwriteDirective() {
+  return {
+    restrict: 'A',
+    require: '?ngModel',
+    priority: 1,
+    compile: function() {
+      var regexp, patternExp;
+
+      return {
+        pre: function(scope, elm, attr, ctrl) {
+          if (!ctrl) return;
+
+          attr.$observe('pattern', function(regex) {
+            /**
+             * The built-in directive will call our overwritten validator
+             * (see below). We just need to update the regex.
+             * The preLink fn guaranetees our observer is called first.
+             */
+            if (isString(regex) && regex.length > 0) {
+              regex = new RegExp('^' + regex + '$');
+            }
+
+            if (regex && !regex.test) {
+              //The built-in validator will throw at this point
+              return;
+            }
+
+            regexp = regex || undefined;
+          });
+
+        },
+        post: function(scope, elm, attr, ctrl) {
+          if (!ctrl) return;
+
+          regexp, patternExp = attr.ngPattern || attr.pattern;
+
+          //The postLink fn guarantees we overwrite the built-in pattern validator
+          ctrl.$validators.pattern = function(value) {
+            return ctrl.$isEmpty(value) ||
+              isUndefined(regexp) ||
+              regexp.test(value);
+          };
+        }
+      };
+    }
+  };
+});
+
+

form

+

Due to 94533e57, +the name attribute of form elements can now only contain characters that can be evaluated as part +of an Angular expression. This is because Angular uses the value of name as an assignable expression +to set the form on the $scope. For example, name="myForm" assigns the form to $scope.myForm and +name="myObj.myForm" assigns it to $scope.myObj.myForm.

+

Previously, it was possible to also use names such name="my:name", because Angular used a special setter +function for the form name. Now the general, more robust $parse setter is used.

+

The easiest way to migrate your code is therefore to remove all special characters from the name attribute.

+

If you need to keep the special characters, you can use the following directive, which will replace +the name with a value that can be evaluated as an expression in the compile function, and then +re-set the original name in the postLink function. This ensures that (1), the form is published on +the scope, and (2), the form has the original name, which might be important if you are doing server-side +form submission.

+
angular.module('myApp').directive('form', function() {
+  return {
+    restrict: 'E',
+    priority: 1000,
+    compile: function(element, attrs) {
+      var unsupportedCharacter = ':'; // change accordingly
+      var originalName = attrs.name;
+      if (attrs.name && attrs.name.indexOf(unsupportedCharacter) > 0) {
+        attrs.$set('name', 'this["' + originalName + '"]');
+      }
+
+      return postLinkFunction(scope, element) {
+        // Don't trigger $observers
+        element.setAttribute('name', originalName);
+      }
+    }
+  };
+});
+
+

Templating (ngRepeat, $compile, ngInclude)

+

ngRepeat

+

Due to c260e738, +previously, the order of items when using ngRepeat to iterate over object properties was guaranteed to be consistent +by sorting the keys into alphabetic order.

+

Now, the order of the items is browser dependent based on the order returned +from iterating over the object using the for key in obj syntax.

+

It seems that browsers generally follow the strategy of providing +keys in the order in which they were defined, although there are exceptions +when keys are deleted and reinstated. See +https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete#Cross-browser_issues

+

The best approach is to convert Objects into Arrays by a filter such as +https://github.com/petebacondarwin/angular-toArrayFilter +or some other mechanism, and then sort them manually in the order you need.

+

$compile

+

Due to 6a38dbfd, +previously, '&' expressions would always set up a function in the isolate scope. Now, if the binding +is marked as optional and the attribute is not specified, no function will be added to the isolate scope.

+

Due to 62d514b, +returning an object from a controller constructor function will now override the scope. Views that use the +controllerAs method will no longer get the this reference, but the returned object.

+

ngInclude

+

Due to 3c6e8ce044446735eb2e70d0061db8c6db050289, the src attribute of ngInclude no longer accepts an +expression that returns the result of $sce.trustAsResourceUrl. This will now cause an infinite digest:

+

Before:

+
<div ng-include="findTemplate('https://example.com/templates/myTemplate.html')"></div>
+
+
$scope.findTemplate = function(templateName) {
+  return $sce.trustAsResourceUrl(templateName);
+};
+
+

To migrate, either cache the result of trustAsResourceUrl(), or put the template url in the resource +whitelist in the config() function:

+

After:

+
var templateCache = {};
+$scope.findTemplate = function(templateName) {
+  if (!templateCache[templateName]) {
+    templateCache[templateName] = $sce.trustAsResourceUrl(templateName);
+  }
+
+  return templateCache[templateName];
+};
+
+// Alternatively, use `$sceDelegateProvider.resourceUrlWhitelist()`, which means you don't
+// have to use `$sce.trustAsResourceUrl()` at all:
+
+angular.module('myApp', []).config(function($sceDelegateProvider) {
+  $sceDelegateProvider.resourceUrlWhitelist(['self', 'https://example.com/templates/**'])
+});
+
+

Cookies (ngCookies)

+

Due to 38fbe3ee, +$cookies will no longer expose properties that represent the current browser cookie +values. $cookies no longer polls the browser for changes to the cookies and no longer copies +cookie values onto the $cookies object.

+

This was changed because the polling is expensive and caused issues with the $cookies properties +not synchronizing correctly with the actual browser cookie values (The reason the polling +was originally added was to allow communication between different tabs, +but there are better ways to do this today, for example localStorage.)

+

The new API on $cookies is as follows:

+
    +
  • get
  • +
  • put
  • +
  • getObject
  • +
  • putObject
  • +
  • getAll
  • +
  • remove
  • +
+

You must explicitly use the methods above in order to access cookie data. This also means that +you can no longer watch the properties on $cookies to detect changes +that occur on the browsers cookies.

+

This feature is generally only needed if a 3rd party library was programmatically +changing the cookies at runtime. If you rely on this then you must either write code that +can react to the 3rd party library making the changes to cookies or implement your own polling +mechanism.

+

DEPRECATION NOTICE

+

$cookieStore is now deprecated as all the useful logic +has been moved to $cookies, to which $cookieStore now simply +delegates calls.

+

Server Requests ($http)

+

Due to 5da1256, +transformRequest functions can no longer modify request headers.

+

Before this commit transformRequest could modify request headers, ex.:

+
function requestTransform(data, headers) {
+    headers = angular.extend(headers(), {
+      'X-MY_HEADER': 'abcd'
+    });
+  }
+  return angular.toJson(data);
+}
+
+

This behavior was unintended and undocumented, so the change should affect very few applications. If one +needs to dynamically add / remove headers it should be done in a header function, for example:

+
$http.get(url, {
+  headers: {
+    'X-MY_HEADER': function(config) {
+      return 'abcd'; //you've got access to a request config object to specify header value dynamically
+    }
+  }
+})
+
+

Filters (filter, limitTo)

+

filter filter

+

Due to cea8e751, +the filter filter will throw an error when used with a non-array. Beforehand it would silently +return an empty array.

+

If necessary, this can be worked around by converting an object to an array, +using a filter such as https://github.com/petebacondarwin/angular-toArrayFilter.

+

limitTo filter

+

Due to a3c3bf33, +the limitTo filter has changed behavior when the provided limit value is invalid. +Now, instead of returning empty object/array, it returns unchanged input.

+

Migrating from 1.2 to 1.3

+

Controllers

+

Due to 3f2232b5, +$controller will no longer look for controllers on window. +The old behavior of looking on window for controllers was originally intended +for use in examples, demos, and toy apps. We found that allowing global controller +functions encouraged poor practices, so we resolved to disable this behavior by +default.

+

To migrate, register your controllers with modules rather than exposing them +as globals:

+

Before:

+
function MyController() {
+  // ...
+}
+
+

After:

+
angular.module('myApp', []).controller('MyController', [function() {
+  // ...
+}]);
+
+

Although it's not recommended, you can re-enable the old behavior like this:

+
angular.module('myModule').config(['$controllerProvider', function($controllerProvider) {
+  // this option might be handy for migrating old apps, but please don't use it
+  // in new ones!
+  $controllerProvider.allowGlobals();
+}]);
+
+

Angular Expression Parsing ($parse + $interpolate)

+ +

You can no longer invoke .bind, .call or .apply on a function in angular expressions. +This is to disallow changing the behaviour of existing functions +in an unforeseen fashion.

+ +

The (deprecated) proto property does not work inside angular expressions +anymore.

+ +

This prevents the use of {define,lookup}{Getter,Setter} inside angular +expressions. If you really need them for some reason, please wrap/bind them to make them +less dangerous, then make them available through the scope object.

+ +

This prevents the use of Object inside angular expressions. +If you need Object.keys, make it accessible in the scope.

+
    +
  • due to bdfc9c02, +values 'f', '0', 'false', 'no', 'n', '[]' are no longer +treated as falsy. Only JavaScript falsy values are now treated as falsy by the +expression parser; there are six of them: false, null, undefined, NaN, 0 and "".
  • +
+
    +
  • due to fa6e411d, +promise unwrapping has been removed. It has been deprecated since 1.2.0-rc.3. +It can no longer be turned on. +Two methods have been removed:
      +
    • $parseProvider.unwrapPromises
    • +
    • $parseProvider.logPromiseWarnings
    • +
    +
  • +
+
    +
  • $interpolate: due to 88c2193c, +the function returned by $interpolate +no longer has a .parts array set on it.

    +

    Instead it has two arrays:

    +
      +
    • .expressions, an array of the expressions in the +interpolated text. The expressions are parsed with +$parse, with an extra layer converting them to strings +when computed
    • +
    • .separators, an array of strings representing the +separations between interpolations in the text. +This array is always 1 item longer than the +.expressions array for easy merging with it
    • +
    +
  • +
+

Miscellaneous Angular helpers

+ +

This changes angular.copy so that it applies the prototype of the original +object to the copied object. Previously, angular.copy would copy properties +of the original object's prototype chain directly onto the copied object.

+

This means that if you iterate over only the copied object's hasOwnProperty +properties, it will no longer contain the properties from the prototype. +This is actually much more reasonable behaviour and it is unlikely that +applications are actually relying on this.

+

If this behaviour is relied upon, in an app, then one should simply iterate +over all the properties on the object (and its inherited properties) and +not filter them with hasOwnProperty.

+

Be aware that this change also uses a feature that is not compatible with +IE8. If you need this to work on IE8 then you would need to provide a polyfill +for Object.create and Object.getPrototypeOf.

+
    +
  • forEach: due to 55991e33, +forEach will iterate only over the initial number of items in +the array. So if items are added to the array during the iteration, these won't +be iterated over during the initial forEach call.
  • +
+

This change also makes our forEach behave more like Array#forEach.

+
    +
  • angular.toJson: due to c054288c, +toJson() will no longer strip properties starting with a single $. If you relied on +toJson()'s stripping these types of properties before, you will have to do it manually now. +It will still strip properties starting with $$ though.
  • +
+

jqLite / JQuery

+
    +
  • jqLite: due to a196c8bc, +previously it was possible to set jqLite data on Text/Comment +nodes, but now that is allowed only on Element and Document nodes just like in +jQuery. We don't expect that app code actually depends on this accidental feature.
  • +
+
    +
  • jqLite: due to d71dbb1a, +the jQuery detach() method does not trigger the $destroy event. +If you want to destroy Angular data attached to the element, use remove().
  • +
+

Angular HTML Compiler ($compile)

+ +

The isolated scope of a component directive no longer leaks into the template +that contains the instance of the directive. This means that you can no longer +access the isolated scope from attributes on the element where the isolated +directive is defined.

+

See https://github.com/angular/angular.js/issues/10236 for an example.

+ +

Requesting isolate scope and any other scope on a single element is an error. +Before this change, the compiler let two directives request a child scope +and an isolate scope if the compiler applied them in the order of non-isolate +scope directive followed by isolate scope directive.

+

Now the compiler will error regardless of the order.

+

If you find that your code is now throwing a $compile:multidir error, +check that you do not have directives on the same element that are trying +to request both an isolate and a non-isolate scope and fix your code.

+
    +
  • due to eec6394a, The replace flag for defining directives that +replace the element that they are on will be removed in the next major angular version. +This feature has difficult semantics (e.g. how attributes are merged) and leads to more +problems compared to what it solves. Also, with Web Components it is normal to have +custom elements in the DOM.
  • +
+
    +
  • due to 299b220f, +calling attr.$observe no longer returns the observer function, but a + deregistration function instead. To migrate the code follow the example below:
  • +
+

Before:

+
directive('directiveName', function() {
+  return {
+    link: function(scope, elm, attr) {
+      var observer = attr.$observe('someAttr', function(value) {
+        console.log(value);
+      });
+    }
+  };
+});
+
+

After:

+
directive('directiveName', function() {
+  return {
+    link: function(scope, elm, attr) {
+      var observer = function(value) {
+        console.log(value);
+      };
+
+      attr.$observe('someAttr', observer);
+    }
+  };
+});
+
+
    +
  • due to 531a8de7, +$observe no longer registers on undefined attributes. For example, if you were using $observe on +an absent optional attribute to set a default value, the following would not work anymore:
  • +
+
<my-dir></my-dir>
+
+
// Link function for directive myDir
+link: function(scope, element, attr) {
+  attr.$observe('myAttr', function(newVal) {
+    scope.myValue = newVal ? newVal : 'myDefaultValue';
+  })
+}
+
+

Instead, check if the attribute is set before registering the observer:

+
link: function(scope, element, attr) {
+  if (attr.myAttr) {
+    // register the observer
+  } else {
+    // set the default
+  }
+}
+
+

Forms, Inputs and ngModel

+ +

If an expression is used on ng-pattern (such as ng-pattern="exp") or on the +pattern attribute (something like on pattern="{{ exp }}") and the expression +itself evaluates to a string then the validator will not parse the string as a +literal regular expression object (a value like /abc/i). Instead, the entire +string will be created as the regular expression to test against. This means +that any expression flags will not be placed on the RegExp object. To get around +this limitation, use a regular expression object as the value for the expression.

+
//before
+$scope.exp = '/abc/i';
+
+//after
+$scope.exp = /abc/i;
+
+ +

This commit changes the API on NgModelController, both semantically and +in terms of adding and renaming methods.

+
    +
  • $setViewValue(value) - +This method still changes the $viewValue but does not immediately commit this +change through to the $modelValue as it did previously. +Now the value is committed only when a trigger specified in an associated +ngModelOptions directive occurs. If ngModelOptions also has a debounce delay +specified for the trigger then the change will also be debounced before being +committed. +In most cases this should not have a significant impact on how NgModelController +is used: If updateOn includes default then $setViewValue will trigger +a (potentially debounced) commit immediately.
  • +
  • $cancelUpdate() - is renamed to $rollbackViewValue() and has the same meaning, +which is to revert the current $viewValue back to the $lastCommittedViewValue, +to cancel any pending debounced updates and to re-render the input.
  • +
+

To migrate code that used $cancelUpdate() follow the example below:

+

Before:

+
$scope.resetWithCancel = function (e) {
+  if (e.keyCode === 27) {
+    $scope.myForm.myInput1.$cancelUpdate();
+    $scope.myValue = '';
+  }
+};
+
+

After:

+
$scope.resetWithCancel = function (e) {
+  if (e.keyCode === 27) {
+    $scope.myForm.myInput1.$rollbackViewValue();
+    $scope.myValue = '';
+  }
+}
+
+
    +
  • types date, time, datetime-local, month, week now always +require a Date object as model (46bd6dc8, + #5864)
  • +
+
    +
  • input[checkbox] now supports constant expressions in ngTrueValue and +ngFalseValue, making it now possible to e.g. use boolean and integer values. Previously, these attributes would +always be treated as strings, whereas they are now parsed as expressions, and will throw if an expression +is non-constant. To convert non-constant strings into constant expressions, simply wrap them in an +extra pair of quotes, like so:

    +

    <input type="checkbox" ng-model="..." ng-true-value="'truthyValue'">

    +

    See c90cefe1614

    +
  • +
+

Scopes and Digests ($scope)

+
    +
  • due to 8c6a8171, +Scope#$id is now of type number rather than string. Since the +id is primarily being used for debugging purposes this change should not affect +anyone.
  • +
+
    +
  • due to 82f45aee, +#7445, +#7523 +$broadcast and $emit will now reset the currentScope property of the event to +null once the event finished propagating. If any code depends on asynchronously accessing their +currentScope property, it should be migrated to use targetScope instead. All of these cases +should be considered programming bugs.
  • +
+

Server Requests ($http, $resource)

+ +

Previously, it was possible to register a response interceptor like so:

+
// register the interceptor as a service
+$provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {
+  return function(promise) {
+    return promise.then(function(response) {
+      // do something on success
+      return response;
+    }, function(response) {
+      // do something on error
+      if (canRecover(response)) {
+        return responseOrNewPromise
+      }
+      return $q.reject(response);
+    });
+  }
+});
+
+$httpProvider.responseInterceptors.push('myHttpInterceptor');
+
+

Now, one must use the newer API introduced in v1.1.4 (4ae46814), like so:

+
$provide.factory('myHttpInterceptor', function($q) {
+  return {
+    response: function(response) {
+      // do something on success
+      return response;
+    },
+    responseError: function(response) {
+      // do something on error
+      if (canRecover(response)) {
+        return responseOrNewPromise
+      }
+      return $q.reject(response);
+    }
+  };
+});
+
+$httpProvider.interceptors.push('myHttpInterceptor');
+
+

More details on the new interceptors API (which has been around as of v1.1.4) can be found at +interceptors

+
    +
  • $httpBackend: due to 6680b7b9, the JSONP behavior for erroneous and empty responses changed: + Previously, a JSONP response was regarded as erroneous if it was empty. Now Angular is listening to the + correct events to detect errors, i.e. even empty responses can be successful.
  • +
+
    +
  • $resource: due to d3c50c84,

    +

    If you expected $resource to strip these types of properties before, +you will have to manually do this yourself now.

    +
  • +
+

Modules and Injector ($inject)

+ +

Previously, config blocks would be able to control behaviour of provider registration, due to being +invoked prior to provider registration. Now, provider registration always occurs prior to configuration +for a given module, and therefore config blocks are not able to have any control over a providers +registration.

+

Example:

+

Previously, the following:

+
angular.module('foo', [])
+.provider('$rootProvider', function() {
+  this.$get = function() { ... }
+})
+.config(function($rootProvider) {
+  $rootProvider.dependentMode = "B";
+})
+.provider('$dependentProvider', function($rootProvider) {
+   if ($rootProvider.dependentMode === "A") {
+     this.$get = function() {
+      // Special mode!
+     }
+   } else {
+     this.$get = function() {
+       // something else
+     }
+  }
+});
+
+

would have "worked", meaning behaviour of the config block between the registration of "$rootProvider" +and "$dependentProvider" would have actually accomplished something and changed the behaviour of the +app. This is no longer possible within a single module.

+

Filters (orderBy)

+
    +
  • due to a097aa95, +orderBy now treats null values (which in JavaScript have type object) as having a string +representation of 'null'.
  • +
+

Animation (ngAnimate)

+
    +
  • due to 1cb8584e, +$animate will no longer default the after parameter to the last element of the parent +container. Instead, when after is not specified, the new element will be inserted as the +first child of the parent container.
  • +
+

To update existing code, change all instances of $animate.enter() or $animate.move() from:

+

$animate.enter(element, parent);

+

to:

+

$animate.enter(element, parent, angular.element(parent[0].lastChild));

+
    +
  • due to 1bebe36a,

    +

    Any class-based animation code that makes use of transitions +and uses the setup CSS classes (such as class-add and class-remove) must now +provide an empty transition value to ensure that its styling is applied right +away. In other words if your animation code is expecting any styling to be +applied that is defined in the setup class then it will not be applied +"instantly" unless a transition:0s none value is present in the styling +for that CSS class. This situation is only the case if a transition is already +present on the base CSS class once the animation kicks off.

    +
  • +
+

Before:

+
.animated.my-class-add {
+  opacity:0;
+  transition:0.5s linear all;
+}
+.animated.my-class-add.my-class-add-active {
+  opacity:1;
+}
+
+

After:

+
.animated.my-class-add {
+  transition:0s linear all;
+  opacity:0;
+}
+.animated.my-class-add.my-class-add-active {
+  transition:0.5s linear all;
+  opacity:1;
+}
+
+

Please view the documentation for ngAnimate for more info.

+

Testing

+
    +
  • due to 85880a64, some deprecated features of +Protractor tests no longer work.
  • +
+

by.binding(descriptor) no longer allows using the surrounding interpolation +markers in the descriptor (the default interpolation markers are {{}}). +Previously, these were optional.

+

Before:

+
var el = element(by.binding('{{foo}}'));
+
+

After:

+
var el = element(by.binding('foo'));
+
+

Prefixes ng_ and x-ng- are no longer allowed for models. Use ng-model.

+

by.repeater cannot find elements by row and column which are not children of +the row. For example, if your template is

+
<div ng-repeat="foo in foos">{{foo.name}}</div>
+
+

Before:

+
var el = element(by.repeater('foo in foos').row(2).column('foo.name'))
+
+

After:

+

You may either enclose {{foo.name}} in a child element

+
<div ng-repeat="foo in foos"><span>{{foo.name}}</span></div>
+
+

or simply use:

+
var el = element(by.repeater('foo in foos').row(2))
+
+

Internet Explorer 8

+
    +
  • due to eaa1d00b, +As communicated before, IE8 is no longer supported.
  • +
+

Migrating from 1.0 to 1.2

+
+

Note: AngularJS versions 1.1.x are considered "experimental" with breaking changes between minor releases. +Version 1.2 is the result of several versions on the 1.1 branch, and has a stable API.

+ +

If you have an application on 1.1 and want to migrate it to 1.2, everything in the guide +below should still apply, but you may want to consult the +changelog as well.

+
+ + + + +

ngRoute has been moved into its own module

+

Just like ngResource, ngRoute is now its own module.

+

Applications that use $route, ngView, and/or $routeParams will now need to load an +angular-route.js file and have their application's module dependency on the ngRoute module.

+

Before:

+
<script src="angular.js"></script>
+
+
var myApp = angular.module('myApp', ['someOtherModule']);
+
+

After:

+
<script src="angular.js"></script>
+<script src="angular-route.js"></script>
+
+
var myApp = angular.module('myApp', ['ngRoute', 'someOtherModule']);
+
+

See 5599b55b.

+

Templates no longer automatically unwrap promises

+

$parse and templates in general will no longer automatically unwrap promises.

+

Before:

+
$scope.foo = $http({method: 'GET', url: '/someUrl'});
+
+
<p>{{foo}}</p>
+
+

After:

+
$http({method: 'GET', url: '/someUrl'})
+.success(function(data) {
+  $scope.foo = data;
+});
+
+
<p>{{foo}}</p>
+
+

This feature has been deprecated. If absolutely needed, it can be reenabled for now via the +$parseProvider.unwrapPromises(true) API.

+

See 5dc35b52, +b6a37d11.

+

Syntax for named wildcard parameters changed in $route

+

To migrate the code, follow the example below. Here, *highlight becomes :highlight*

+

Before:

+
$routeProvider.when('/Book1/:book/Chapter/:chapter/*highlight/edit',
+{controller: noop, templateUrl: 'Chapter.html'});
+
+

After:

+
$routeProvider.when('/Book1/:book/Chapter/:chapter/:highlight*/edit',
+{controller: noop, templateUrl: 'Chapter.html'});
+
+

See 04cebcc1.

+

You can only bind one expression to *[src], *[ng-src] or action

+

With the exception of <a> and <img> elements, you cannot bind more than one expression to the +src or action attribute of elements.

+

This is one of several improvements to security introduces by Angular 1.2.

+

Concatenating expressions makes it hard to understand whether some combination of concatenated +values are unsafe to use and potentially subject to XSS vulnerabilities. To simplify the task of +auditing for XSS issues, we now require that a single expression be used for *[src/ng-src] +bindings such as bindings for iframe[src], object[src], etc. In addition, this requirement is +enforced for form tags with action attributes.

+ + + + + + + + + + + + + + + + + + + + +
Examples
<img src="{{a}}/{{b}}">ok
<iframe src="{{a}}/{{b}}"></iframe>bad
<iframe src="{{a}}"></iframe>ok
+ + +

To migrate your code, you can combine multiple expressions using a method attached to your scope.

+

Before:

+
scope.baseUrl = 'page';
+scope.a = 1;
+scope.b = 2;
+
+
<!-- Are a and b properly escaped here? Is baseUrl controlled by user? -->
+<iframe src="{{baseUrl}}?a={{a}&b={{b}}">
+
+

After:

+
var baseUrl = "page";
+scope.getIframeSrc = function() {
+
+  // One should think about their particular case and sanitize accordingly
+  var qs = ["a", "b"].map(function(value, name) {
+      return encodeURIComponent(name) + "=" +
+             encodeURIComponent(value);
+    }).join("&");
+
+  // `baseUrl` isn't exposed to a user's control, so we don't have to worry about escaping it.
+  return baseUrl + "?" + qs;
+};
+
+
<iframe src="{{getIframeSrc()}}">
+
+

See 38deedd6.

+

Interpolations inside DOM event handlers are now disallowed

+

DOM event handlers execute arbitrary JavaScript code. Using an interpolation for such handlers +means that the interpolated value is a JS string that is evaluated. Storing or generating such +strings is error prone and leads to XSS vulnerabilities. On the other hand, ngClick and other +Angular specific event handlers evaluate Angular expressions in non-window (Scope) context which +makes them much safer.

+

To migrate the code follow the example below:

+

Before:

+
JS:   scope.foo = 'alert(1)';
+HTML: <div onclick="{{foo}}">
+
+

After:

+
JS:   scope.foo = function() { alert(1); }
+HTML: <div ng-click="foo()">
+
+

See 39841f2e.

+

Directives cannot end with -start or -end

+

This change was necessary to enable multi-element directives. The best fix is to rename existing +directives so that they don't end with these suffixes.

+

See e46100f7.

+

In $q, promise.always has been renamed promise.finally

+

The reason for this change is to align $q with the Q promise +library, despite the fact that this makes it a bit more difficult +to use with non-ES5 browsers, like IE8.

+

finally also goes well together with the catch API that was added to $q recently and is part +of the DOM promises standard.

+

To migrate the code follow the example below.

+

Before:

+
$http.get('/foo').always(doSomething);
+
+

After:

+
$http.get('/foo').finally(doSomething);
+
+

Or for IE8-compatible code:

+
$http.get('/foo')['finally'](doSomething);
+
+

See f078762d.

+

ngMobile is now ngTouch

+

Many touch-enabled devices are not mobile devices, so we decided to rename this module to better +reflect its concerns.

+

To migrate, replace all references to ngMobile with ngTouch and angular-mobile.js with +angular-touch.js.

+

See 94ec84e7.

+

resource.$then has been removed

+

Resource instances do not have a $then function anymore. Use the $promise.then instead.

+

Before:

+
Resource.query().$then(callback);
+
+

After:

+
Resource.query().$promise.then(callback);
+
+

See 05772e15.

+

Resource methods return the promise

+

Methods of a resource instance return the promise rather than the instance itself.

+

Before:

+
resource.$save().chaining = true;
+
+

After:

+
resource.$save();
+resource.chaining = true;
+
+

See 05772e15.

+

Resource promises are resolved with the resource instance

+

On success, the resource promise is resolved with the resource instance rather than HTTP response object.

+

Use interceptor API to access the HTTP response object.

+

Before:

+
Resource.query().$then(function(response) {...});
+
+

After:

+
var Resource = $resource('/url', {}, {
+  get: {
+    method: 'get',
+    interceptor: {
+      response: function(response) {
+        // expose response
+        return response;
+      }
+    }
+  }
+});
+
+

See 05772e15.

+

$location.search supports multiple keys

+

$location.search now supports multiple keys with the +same value provided that the values are stored in an array.

+

Before this change:

+
    +
  • parseKeyValue only took the last key overwriting all the previous keys.
  • +
  • toKeyValue joined the keys together in a comma delimited string.
  • +
+

This was deemed buggy behavior. If your server relied on this behavior then either the server +should be fixed, or a simple serialization of the array should be done on the client before +passing it to $location.

+

See 80739409.

+

ngBindHtmlUnsafe has been removed and replaced by ngBindHtml

+

ngBindHtml provides ngBindHtmlUnsafe like +behavior (evaluate an expression and innerHTML the result into the DOM) when bound to the result +of $sce.trustAsHtml(string). When bound to a plain string, the string is sanitized via +$sanitize before being innerHTML'd. If the $sanitize service isn't available (ngSanitize +module is not loaded) and the bound expression evaluates to a value that is not trusted an +exception is thrown.

+

When using this directive you can either include ngSanitize in your module's dependencies (See the +example at the ngBindHtml reference) or use the $sce service to set the value as +trusted.

+

See dae69473.

+

Form names that are expressions are evaluated

+

If you have form names that will evaluate as an expression:

+
<form name="ctrl.form">
+
+

And if you are accessing the form from your controller:

+

Before:

+
function($scope) {
+  $scope['ctrl.form'] // form controller instance
+}
+
+

After:

+
function($scope) {
+  $scope.ctrl.form // form controller instance
+}
+
+

This makes it possible to access a form from a controller using the new "controller as" syntax. +Supporting the previous behavior offers no benefit.

+

See 8ea802a1.

+

hasOwnProperty disallowed as an input name

+

Inputs with name equal to hasOwnProperty are not allowed inside form or ngForm directives.

+

Before, inputs whose name was "hasOwnProperty" were quietly ignored and not added to the scope. +Now a badname exception is thrown. Using "hasOwnProperty" for an input name would be very unusual +and bad practice. To migrate, change your input name.

+

See 7a586e5c.

+ +

The order of postLink fn is now mirror opposite of the order in which corresponding preLinking and compile functions execute.

+

Previously the compile/link fns executed in order, sorted by priority:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#StepOld Sort OrderNew Sort Order
1Compile FnsHigh → Low
2Compile child nodes
3PreLink FnsHigh → Low
4Link child nodes
5PostLink FnsHigh → LowLow → High
+ +

"High → Low" here refers to the priority option of a directive.

+

Very few directives in practice rely on the order of postLinking functions (unlike on the order +of compile functions), so in the rare case of this change affecting an existing directive, it might +be necessary to convert it to a preLinking function or give it negative priority.

+

You can look at the diff of this +commit to see how an internal +attribute interpolation directive was adjusted.

+

See 31f190d4.

+

Directive priority

+

the priority of ngRepeat, ngSwitchWhen, ngIf, ngInclude and ngView has changed. This could affect directives that explicitly specify their priority.

+

In order to make ngRepeat, ngSwitchWhen, ngIf, ngInclude and ngView work together in all common scenarios their directives are being adjusted to achieve the following precedence:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectiveOld PriorityNew Priority
ngRepeat10001000
ngSwitchWhen500800
ngIf1000600
ngInclude1000400
ngView1000400
+

See b7af76b4.

+

ngScenario

+

browserTrigger now uses an eventData object instead of direct parameters for mouse events. +To migrate, place the keys,x and y parameters inside of an object and place that as the +third parameter for the browserTrigger function.

+

See 28f56a38.

+

ngInclude and ngView replace its entire element on update

+

Previously ngInclude and ngView only updated its element's content. Now these directives will +recreate the element every time a new content is included.

+

This ensures that a single rootElement for all the included contents always exists, which makes +definition of css styles for animations much easier.

+

See 7d69d52a, +aa2133ad.

+

URLs are now sanitized against a whitelist

+

A whitelist configured via $compileProvider can be used to configure what URLs are considered safe. +By default all common protocol prefixes are whitelisted including data: URIs with mime types image/*. +This change shouldn't impact apps that don't contain malicious image links.

+

See 1adf29af, +3e39ac7e.

+

Isolate scope only exposed to directives with scope property

+

If you declare a scope option on a directive, that directive will have an +isolate scope. In Angular 1.0, if a +directive with an isolate scope is used on an element, all directives on that same element have access +to the same isolate scope. For example, say we have the following directives:

+
// This directive declares an isolate scope.
+.directive('isolateScope', function() {
+  return {
+    scope: {},
+    link: function($scope) {
+      console.log('one = ' + $scope.$id);
+    }
+  };
+})
+
+// This directive does not.
+.directive('nonIsolateScope', function() {
+  return {
+    link: function($scope) {
+      console.log('two = ' + $scope.$id);
+    }
+  };
+});
+
+

Now what happens if we use both directives on the same element?

+
<div isolate-scope non-isolate-scope></div>
+
+

In Angular 1.0, the nonIsolateScope directive will have access to the isolateScope directive’s scope. The +log statements will print the same id, because the scope is the same. But in Angular 1.2, the nonIsolateScope +will not use the same scope as isolateScope. Instead, it will inherit the parent scope. The log statements +will print different id’s.

+

If your code depends on the Angular 1.0 behavior (non-isolate directive needs to access state +from within the isolate scope), change the isolate directive to use scope locals to pass these explicitly:

+

Before

+
<input ng-model="$parent.value" ng-isolate>
+
+.directive('ngIsolate', function() {
+  return {
+    scope: {},
+    template: '{{value}}'
+  };
+});
+
+

After

+
<input ng-model="value" ng-isolate>
+
+.directive('ngIsolate', function() {
+  return {
+    scope: {value: '=ngModel'},
+    template: '{{value}}
+  };
+});
+
+

See 909cabd3, +#1924 and +#2500.

+

Change to interpolation priority

+

Previously, the interpolation priority was -100 in 1.2.0-rc.2, and 100 before 1.2.0-rc.2. +Before this change the binding was setup in the post-linking phase.

+

Now the attribute interpolation (binding) executes as a directive with priority 100 and the +binding is set up in the pre-linking phase.

+

See 79223eae, +#4525, +#4528, and +#4649

+

Underscore-prefixed/suffixed properties are non-bindable

+
+

Reverted: This breaking change has been reverted in 1.2.1, and so can be ignored if you're using version 1.2.1 or higher

+
+ +

This change introduces the notion of "private" properties (properties +whose names begin and/or end with an underscore) on the scope chain. +These properties will not be available to Angular expressions (i.e. {{ +}} interpolation in templates and strings passed to $parse) They are +freely available to JavaScript code (as before).

+

Motivation

+

Angular expressions execute in a limited context. They do not have +direct access to the global scope, window, document or the Function +constructor. However, they have direct access to names/properties on +the scope chain. It has been a long standing best practice to keep +sensitive APIs outside of the scope chain (in a closure or your +controller.) That's easier said than done for two reasons:

+
    +
  1. JavaScript does not have a notion of private properties so if you need +someone on the scope chain for JavaScript use, you also expose it to +Angular expressions
  2. +
  3. The new controller as syntax that's now in increased usage exposes the +entire controller on the scope chain greatly increasing the exposed surface.
  4. +
+

Though Angular expressions are written and controlled by the developer, they:

+
    +
  1. Typically deal with user input
  2. +
  3. Don't get the kind of test coverage that JavaScript code would
  4. +
+

This commit provides a way, via a naming convention, to allow restricting properties from +controllers/scopes. This means Angular expressions can access only those properties that +are actually needed by the expressions.

+

See 3d6a89e8.

+

You cannot bind to select[multiple]

+

Switching between select[single] and select[multiple] has always been odd due to browser quirks. +This feature never worked with two-way data-binding so it's not expected that anyone is using it.

+

If you are interested in properly adding this feature, please submit a pull request on Github.

+

See d87fa004.

+

Uncommon region-specific local files were removed from i18n

+

AngularJS uses the Google Closure library's locale files. The following locales were removed from +Closure, so Angular is not able to continue to support them:

+

chr, cy, el-polyton, en-zz, fr-rw, fr-sn, fr-td, fr-tg, haw, it-ch, ln-cg, +mo, ms-bn, nl-aw, nl-be, pt-ao, pt-gw, pt-mz, pt-st, ro-md, ru-md, ru-ua, +sr-cyrl-ba, sr-cyrl-me, sr-cyrl, sr-latn-ba, sr-latn-me, sr-latn, sr-rs, sv-fi, +sw-ke, ta-lk, tl-ph, ur-in, zh-hans-hk, zh-hans-mo, zh-hans-sg, zh-hans, +zh-hant-hk, zh-hant-mo, zh-hant-tw, zh-hant

+

Although these locales were removed from the official AngularJS repository, you can continue to +load and use your copy of the locale file provided that you maintain it yourself.

+

See 6382e21f.

+

Services can now return functions

+

Previously, the service constructor only returned objects regardless of whether a function was returned.

+

Now, $injector.instantiate (and thus $provide.service) behaves the same as the native +new operator and allows functions to be returned as a service.

+

If using a JavaScript preprocessor it's quite possible when upgrading that services could start behaving incorrectly. +Make sure your services return the correct type wanted.

+

Coffeescript example

+
myApp.service 'applicationSrvc', ->
+@something = "value"
+@someFunct = ->
+  "something else"
+
+

pre 1.2 this service would return the whole object as the service.

+

post 1.2 this service returns someFunct as the value of the service

+

you would need to change this services to

+
myApp.service 'applicationSrvc', ->
+@something = "value"
+@someFunct = ->
+  "something else"
+return
+
+

to continue to return the complete instance.

+

See c22adbf1.

+ + diff --git a/1.6.6/docs/partials/guide/module.html b/1.6.6/docs/partials/guide/module.html new file mode 100644 index 000000000..22d86938e --- /dev/null +++ b/1.6.6/docs/partials/guide/module.html @@ -0,0 +1,261 @@ + Improve this Doc + + +

What is a Module?

+

You can think of a module as a container for the different parts of your app – controllers, +services, filters, directives, etc.

+

Why?

+

Most applications have a main method that instantiates and wires together the different parts of +the application.

+

Angular apps don't have a main method. Instead modules declaratively specify how an application +should be bootstrapped. There are several advantages to this approach:

+
    +
  • The declarative process is easier to understand.
  • +
  • You can package code as reusable modules.
  • +
  • The modules can be loaded in any order (or even in parallel) because modules delay execution.
  • +
  • Unit tests only have to load relevant modules, which keeps them fast.
  • +
  • End-to-end tests can use modules to override configuration.
  • +
+

The Basics

+

I'm in a hurry. How do I get a Hello World module working?

+

+ +

+ + +
+ + +
+
<div ng-app="myApp">
  <div>
    {{ 'World' | greet }}
  </div>
</div>
+
+ +
+
// declare a module
var myAppModule = angular.module('myApp', []);

// configure the module.
// in this example we will create a greeting filter
myAppModule.filter('greet', function() {
 return function(name) {
    return 'Hello, ' + name + '!';
  };
});
+
+ +
+
it('should add Hello to the name', function() {
  expect(element(by.binding("'World' | greet")).getText()).toEqual('Hello, World!');
});
+
+ + + +
+
+ + +

+

Important things to notice:

+
    +
  • The Module API
  • +
  • The reference to myApp module in <div ng-app="myApp">. +This is what bootstraps the app using your module.
  • +
  • The empty array in angular.module('myApp', []). +This array is the list of modules myApp depends on.
  • +
+

Recommended Setup

+

While the example above is simple, it will not scale to large applications. Instead we recommend +that you break your application to multiple modules like this:

+
    +
  • A module for each feature
  • +
  • A module for each reusable component (especially directives and filters)
  • +
  • And an application level module which depends on the above modules and contains any +initialization code.
  • +
+

You can find a community style guide to help +yourself when application grows.

+

The above is a suggestion. Tailor it to your needs.

+

+ +

+ + +
+ + +
+
<div ng-controller="XmplController">
  {{ greeting }}
</div>
+
+ +
+
angular.module('xmpl.service', [])

  .value('greeter', {
    salutation: 'Hello',
    localize: function(localization) {
      this.salutation = localization.salutation;
    },
    greet: function(name) {
      return this.salutation + ' ' + name + '!';
    }
  })

  .value('user', {
    load: function(name) {
      this.name = name;
    }
  });

angular.module('xmpl.directive', []);

angular.module('xmpl.filter', []);

angular.module('xmpl', ['xmpl.service', 'xmpl.directive', 'xmpl.filter'])

  .run(function(greeter, user) {
    // This is effectively part of the main method initialization code
    greeter.localize({
      salutation: 'Bonjour'
    });
    user.load('World');
  })

  .controller('XmplController', function($scope, greeter, user) {
    $scope.greeting = greeter.greet(user.name);
  });
+
+ +
+
it('should add Hello to the name', function() {
  expect(element(by.binding("greeting")).getText()).toEqual('Bonjour World!');
});
+
+ + + +
+
+ + +

+

Module Loading & Dependencies

+

A module is a collection of configuration and run blocks which get applied to the application +during the bootstrap process. In its simplest form the module consists of a collection of two kinds +of blocks:

+
    +
  1. Configuration blocks - get executed during the provider registrations and configuration +phase. Only providers and constants can be injected into configuration blocks. This is to +prevent accidental instantiation of services before they have been fully configured.
  2. +
  3. Run blocks - get executed after the injector is created and are used to kickstart the +application. Only instances and constants can be injected into run blocks. This is to prevent +further system configuration during application run time.
  4. +
+
angular.module('myModule', []).
+config(function(injectables) { // provider-injector
+  // This is an example of config block.
+  // You can have as many of these as you want.
+  // You can only inject Providers (not instances)
+  // into config blocks.
+}).
+run(function(injectables) { // instance-injector
+  // This is an example of a run block.
+  // You can have as many of these as you want.
+  // You can only inject instances (not Providers)
+  // into run blocks
+});
+
+

Configuration Blocks

+

There are some convenience methods on the module which are equivalent to the config block. For +example:

+
angular.module('myModule', []).
+  value('a', 123).
+  factory('a', function() { return 123; }).
+  directive('directiveName', ...).
+  filter('filterName', ...);
+
+// is same as
+
+angular.module('myModule', []).
+  config(function($provide, $compileProvider, $filterProvider) {
+    $provide.value('a', 123);
+    $provide.factory('a', function() { return 123; });
+    $compileProvider.directive('directiveName', ...);
+    $filterProvider.register('filterName', ...);
+  });
+
+
+When bootstrapping, first Angular applies all constant definitions. +Then Angular applies configuration blocks in the same order they were registered. +
+ +

Run Blocks

+

Run blocks are the closest thing in Angular to the main method. A run block is the code which +needs to run to kickstart the application. It is executed after all of the services have been +configured and the injector has been created. Run blocks typically contain code which is hard +to unit-test, and for this reason should be declared in isolated modules, so that they can be +ignored in the unit-tests.

+

Dependencies

+

Modules can list other modules as their dependencies. Depending on a module implies that the required +module needs to be loaded before the requiring module is loaded. In other words the configuration +blocks of the required modules execute before the configuration blocks of the requiring module. +The same is true for the run blocks. Each module can only be loaded once, even if multiple other +modules require it.

+

Asynchronous Loading

+

Modules are a way of managing $injector configuration, and have nothing to do with loading of +scripts into a VM. There are existing projects which deal with script loading, which may be used +with Angular. Because modules do nothing at load time they can be loaded into the VM in any order +and thus script loaders can take advantage of this property and parallelize the loading process.

+

Creation versus Retrieval

+

Beware that using angular.module('myModule', []) will create the module myModule and overwrite any +existing module named myModule. Use angular.module('myModule') to retrieve an existing module.

+
var myModule = angular.module('myModule', []);
+
+// add some directives and services
+myModule.service('myService', ...);
+myModule.directive('myDirective', ...);
+
+// overwrites both myService and myDirective by creating a new module
+var myModule = angular.module('myModule', []);
+
+// throws an error because myOtherModule has yet to be defined
+var myModule = angular.module('myOtherModule');
+
+

Unit Testing

+

A unit test is a way of instantiating a subset of an application to apply stimulus to it. +Small, structured modules help keep unit tests concise and focused.

+
+Each module can only be loaded once per injector. +Usually an Angular app has only one injector and modules are only loaded once. +Each test has its own injector and modules are loaded multiple times. +
+ +

In all of these examples we are going to assume this module definition:

+
angular.module('greetMod', []).
+
+factory('alert', function($window) {
+  return function(text) {
+    $window.alert(text);
+  }
+}).
+
+value('salutation', 'Hello').
+
+factory('greet', function(alert, salutation) {
+  return function(name) {
+    alert(salutation + ' ' + name + '!');
+  }
+});
+
+

Let's write some tests to show how to override configuration in tests.

+
describe('myApp', function() {
+  // load application module (`greetMod`) then load a special
+  // test module which overrides `$window` with a mock version,
+  // so that calling `window.alert()` will not block the test
+  // runner with a real alert box.
+  beforeEach(module('greetMod', function($provide) {
+    $provide.value('$window', {
+      alert: jasmine.createSpy('alert')
+    });
+  }));
+
+  // inject() will create the injector and inject the `greet` and
+  // `$window` into the tests.
+  it('should alert on $window', inject(function(greet, $window) {
+    greet('World');
+    expect($window.alert).toHaveBeenCalledWith('Hello World!');
+  }));
+
+  // this is another way of overriding configuration in the
+  // tests using inline `module` and `inject` methods.
+  it('should alert using the alert service', function() {
+    var alertSpy = jasmine.createSpy('alert');
+    module(function($provide) {
+      $provide.value('alert', alertSpy);
+    });
+    inject(function(greet) {
+      greet('World');
+      expect(alertSpy).toHaveBeenCalledWith('Hello World!');
+    });
+  });
+});
+
+ + diff --git a/1.6.6/docs/partials/guide/production.html b/1.6.6/docs/partials/guide/production.html new file mode 100644 index 000000000..418c0a681 --- /dev/null +++ b/1.6.6/docs/partials/guide/production.html @@ -0,0 +1,82 @@ + Improve this Doc + + +

Running an AngularJS App in Production

+

There are a few things you might consider when running your AngularJS application in production.

+

Disabling Debug Data

+

By default AngularJS attaches information about binding and scopes to DOM nodes, +and adds CSS classes to data-bound elements:

+
    +
  • As a result of ngBind, ngBindHtml or {{...}} interpolations, binding data and CSS class +ng-binding are attached to the corresponding element.

    +
  • +
  • Where the compiler has created a new scope, the scope and either ng-scope or ng-isolated-scope +CSS class are attached to the corresponding element. These scope references can then be accessed via +element.scope() and element.isolateScope().

    +
  • +
+

Tools like Protractor and +Batarang need this information to run, +but you can disable this in production for a significant performance boost with:

+
myApp.config(['$compileProvider', function ($compileProvider) {
+  $compileProvider.debugInfoEnabled(false);
+}]);
+
+

If you wish to debug an application with this information then you should open up a debug +console in the browser then call this method directly in this console:

+
angular.reloadWithDebugInfo();
+
+

The page should reload and the debug information should now be available.

+

For more see the docs pages on $compileProvider +and angular.reloadWithDebugInfo.

+

Strict DI Mode

+

Using strict di mode in your production application will throw errors when an injectable +function is not +annotated explicitly. Strict di mode is intended to help +you make sure that your code will work when minified. However, it also will force you to +make sure that your injectable functions are explicitly annotated which will improve +angular's performance when injecting dependencies in your injectable functions because it +doesn't have to dynamically discover a function's dependencies. It is recommended to +automate the explicit annotation via a tool like +ng-annotate when you deploy to production (and enable +strict di mode)

+

To enable strict di mode, you have two options:

+
<div ng-app="myApp" ng-strict-di>
+  <!-- your app here -->
+</div>
+
+

or

+
angular.bootstrap(document, ['myApp'], {
+  strictDi: true
+});
+
+

For more information, see the +DI Guide.

+

Disable comment and css class directives

+

By default AngularJS compiles and executes all directives inside comments and element classes. +In order to perform this task, angular compiler must look for directives by:

+
    +
  • Parse all your application element classes.

    +
  • +
  • Parse all your application html comments.

    +
  • +
+

Nowadays most of the Angular projects are using only element and attribute directives, +and in such projects there is no need to compile comments and classes.

+

If you are sure that your project only uses element and attribute directives, +and you are not using any 3rd party library that uses +directives inside element classes or html comments, +you can disable the compilation of directives on element classes and comments +for the whole application. +This results in a compilation performance gain, +as the compiler does not have to check comments and element classes looking for directives.

+

To disable comment and css class directives use the $compileProvider:

+
$compileProvider.commentDirectivesEnabled(false);
+$compileProvider.cssClassDirectivesEnabled(false);
+
+

For more see the docs pages on +$compileProvider.commentDirectivesEnabled +and +$compileProvider.cssClassDirectivesEnabled.

+ + diff --git a/1.6.6/docs/partials/guide/providers.html b/1.6.6/docs/partials/guide/providers.html new file mode 100644 index 000000000..d5f5406e3 --- /dev/null +++ b/1.6.6/docs/partials/guide/providers.html @@ -0,0 +1,327 @@ + Improve this Doc + + +

Providers

+

Each web application you build is composed of objects that collaborate to get stuff done. These +objects need to be instantiated and wired together for the app to work. In Angular apps most of +these objects are instantiated and wired together automatically by the injector service.

+

The injector creates two types of objects, services and specialized objects.

+

Services are objects whose API is defined by the developer writing the service.

+

Specialized objects conform to a specific Angular framework API. These objects are one of +controllers, directives, filters or animations.

+

The injector needs to know how to create these objects. You tell it by registering a "recipe" for +creating your object with the injector. There are five recipe types.

+

The most verbose, but also the most comprehensive one is a Provider recipe. The remaining four +recipe types — Value, Factory, Service and Constant — are just syntactic sugar on top of a provider +recipe.

+

Let's take a look at the different scenarios for creating and using services via various recipe +types. We'll start with the simplest case possible where various places in your code need a shared +string and we'll accomplish this via Value recipe.

+

Note: A Word on Modules

+

In order for the injector to know how to create and wire together all of these objects, it needs +a registry of "recipes". Each recipe has an identifier of the object and the description of how to +create this object.

+

Each recipe belongs to an Angular module. An Angular module is a bag +that holds one or more recipes. And since manually keeping track of module dependencies is no fun, +a module can contain information about dependencies on other modules as well.

+

When an Angular application starts with a given application module, Angular creates a new instance +of injector, which in turn creates a registry of recipes as a union of all recipes defined in the +core "ng" module, application module and its dependencies. The injector then consults the recipe +registry when it needs to create an object for your application.

+

Value Recipe

+

Let's say that we want to have a very simple service called "clientId" that provides a string +representing an authentication id used for some remote API. You would define it like this:

+
var myApp = angular.module('myApp', []);
+myApp.value('clientId', 'a12345654321x');
+
+

Notice how we created an Angular module called myApp, and specified that this module definition +contains a "recipe" for constructing the clientId service, which is a simple string in this case.

+

And this is how you would display it via Angular's data-binding:

+
myApp.controller('DemoController', ['clientId', function DemoController(clientId) {
+  this.clientId = clientId;
+}]);
+
+
<html ng-app="myApp">
+  <body ng-controller="DemoController as demo">
+    Client ID: {{demo.clientId}}
+  </body>
+</html>
+
+

In this example, we've used the Value recipe to define the value to provide when DemoController +asks for the service with id "clientId".

+

On to more complex examples!

+

Factory Recipe

+

The Value recipe is very simple to write, but lacks some important features we often need when +creating services. Let's now look at the Value recipe's more powerful sibling, the Factory. The +Factory recipe adds the following abilities:

+
    +
  • ability to use other services (have dependencies)
  • +
  • service initialization
  • +
  • delayed/lazy initialization
  • +
+

The Factory recipe constructs a new service using a function with zero or more arguments (these +are dependencies on other services). The return value of this function is the service instance +created by this recipe.

+

Note: All services in Angular are singletons. That means that the injector uses each recipe at most +once to create the object. The injector then caches the reference for all future needs.

+

Since a Factory is a more powerful version of the Value recipe, the same service can be constructed with it. +Using our previous clientId Value recipe example, we can rewrite it as a Factory recipe like this:

+
myApp.factory('clientId', function clientIdFactory() {
+  return 'a12345654321x';
+});
+
+

But given that the token is just a string literal, sticking with the Value recipe is still more +appropriate as it makes the code easier to follow.

+

Let's say, however, that we would also like to create a service that computes a token used for +authentication against a remote API. This token will be called apiToken and will be computed +based on the clientId value and a secret stored in the browser's local storage:

+
myApp.factory('apiToken', ['clientId', function apiTokenFactory(clientId) {
+  var encrypt = function(data1, data2) {
+    // NSA-proof encryption algorithm:
+    return (data1 + ':' + data2).toUpperCase();
+  };
+
+  var secret = window.localStorage.getItem('myApp.secret');
+  var apiToken = encrypt(clientId, secret);
+
+  return apiToken;
+}]);
+
+

In the code above, we see how the apiToken service is defined via the Factory recipe that depends +on the clientId service. The factory service then uses NSA-proof encryption to produce an authentication +token.

+
+Best Practice: name the factory functions as <serviceId>Factory +(e.g., apiTokenFactory). While this naming convention is not required, it helps when navigating the codebase +or looking at stack traces in the debugger. +
+ +

Just like with the Value recipe, the Factory recipe can create a service of any type, whether it be a +primitive, object literal, function, or even an instance of a custom type.

+

Service Recipe

+

JavaScript developers often use custom types to write object-oriented code. Let's explore how we +could launch a unicorn into space via our unicornLauncher service which is an instance of a +custom type:

+
function UnicornLauncher(apiToken) {
+
+  this.launchedCount = 0;
+  this.launch = function() {
+    // Make a request to the remote API and include the apiToken
+    ...
+    this.launchedCount++;
+  }
+}
+
+

We are now ready to launch unicorns, but notice that UnicornLauncher depends on our apiToken. +We can satisfy this dependency on apiToken using the Factory recipe:

+
myApp.factory('unicornLauncher', ["apiToken", function(apiToken) {
+  return new UnicornLauncher(apiToken);
+}]);
+
+

This is, however, exactly the use-case that the Service recipe is the most suitable for.

+

The Service recipe produces a service just like the Value or Factory recipes, but it does so by +invoking a constructor with the new operator. The constructor can take zero or more arguments, +which represent dependencies needed by the instance of this type.

+

Note: Service recipes follow a design pattern called constructor +injection.

+

Since we already have a constructor for our UnicornLauncher type, we can replace the Factory recipe +above with a Service recipe like this:

+
myApp.service('unicornLauncher', ["apiToken", UnicornLauncher]);
+
+

Much simpler!

+

Note: Yes, we have called one of our service recipes 'Service'. We regret this and know that we'll +be somehow punished for our misdeed. It's like we named one of our offspring 'Child'. Boy, +that would mess with the teachers.

+

Provider Recipe

+

As already mentioned in the intro, the Provider recipe is the core recipe type and +all the other recipe types are just syntactic sugar on top of it. It is the most verbose recipe +with the most abilities, but for most services it's overkill.

+

The Provider recipe is syntactically defined as a custom type that implements a $get method. This +method is a factory function just like the one we use in the Factory recipe. In fact, if you define +a Factory recipe, an empty Provider type with the $get method set to your factory function is +automatically created under the hood.

+

You should use the Provider recipe only when you want to expose an API for application-wide +configuration that must be made before the application starts. This is usually interesting only +for reusable services whose behavior might need to vary slightly between applications.

+

Let's say that our unicornLauncher service is so awesome that many apps use it. By default the +launcher shoots unicorns into space without any protective shielding. But on some planets the +atmosphere is so thick that we must wrap every unicorn in tinfoil before sending it on its +intergalactic trip, otherwise they would burn while passing through the atmosphere. It would then +be great if we could configure the launcher to use the tinfoil shielding for each launch in apps +that need it. We can make it configurable like so:

+
myApp.provider('unicornLauncher', function UnicornLauncherProvider() {
+  var useTinfoilShielding = false;
+
+  this.useTinfoilShielding = function(value) {
+    useTinfoilShielding = !!value;
+  };
+
+  this.$get = ["apiToken", function unicornLauncherFactory(apiToken) {
+
+    // let's assume that the UnicornLauncher constructor was also changed to
+    // accept and use the useTinfoilShielding argument
+    return new UnicornLauncher(apiToken, useTinfoilShielding);
+  }];
+});
+
+

To turn the tinfoil shielding on in our app, we need to create a config function via the module +API and have the UnicornLauncherProvider injected into it:

+
myApp.config(["unicornLauncherProvider", function(unicornLauncherProvider) {
+  unicornLauncherProvider.useTinfoilShielding(true);
+}]);
+
+

Notice that the unicorn provider is injected into the config function. This injection is done by a +provider injector which is different from the regular instance injector, in that it instantiates +and wires (injects) all provider instances only.

+

During application bootstrap, before Angular goes off creating all services, it configures and +instantiates all providers. We call this the configuration phase of the application life-cycle. +During this phase, services aren't accessible because they haven't been created yet.

+

Once the configuration phase is over, interaction with providers is disallowed and the process of +creating services starts. We call this part of the application life-cycle the run phase.

+

Constant Recipe

+

We've just learned how Angular splits the life-cycle into configuration phase and run phase and how +you can provide configuration to your application via the config function. Since the config +function runs in the configuration phase when no services are available, it doesn't have access +even to simple value objects created via the Value recipe.

+

Since simple values, like URL prefixes, don't have dependencies or configuration, it's often handy +to make them available in both the configuration and run phases. This is what the Constant recipe +is for.

+

Let's say that our unicornLauncher service can stamp a unicorn with the planet name it's being +launched from if this name was provided during the configuration phase. The planet name is +application specific and is used also by various controllers during the runtime of the application. +We can then define the planet name as a constant like this:

+
myApp.constant('planetName', 'Greasy Giant');
+
+

We could then configure the unicornLauncherProvider like this:

+
myApp.config(['unicornLauncherProvider', 'planetName', function(unicornLauncherProvider, planetName) {
+  unicornLauncherProvider.useTinfoilShielding(true);
+  unicornLauncherProvider.stampText(planetName);
+}]);
+
+

And since Constant recipe makes the value also available at runtime just like the Value recipe, we +can also use it in our controller and template:

+
myApp.controller('DemoController', ["clientId", "planetName", function DemoController(clientId, planetName) {
+  this.clientId = clientId;
+  this.planetName = planetName;
+}]);
+
+
<html ng-app="myApp">
+  <body ng-controller="DemoController as demo">
+   Client ID: {{demo.clientId}}
+   <br>
+   Planet Name: {{demo.planetName}}
+  </body>
+</html>
+
+

Special Purpose Objects

+

Earlier we mentioned that we also have special purpose objects that are different from services. +These objects extend the framework as plugins and therefore must implement interfaces specified by +Angular. These interfaces are Controller, Directive, Filter and Animation.

+

The instructions for the injector to create these special objects (with the exception of the +Controller objects) use the Factory recipe behind the scenes.

+

Let's take a look at how we would create a very simple component via the directive api that depends +on the planetName constant we've just defined and displays the planet name, in our case: +"Planet Name: Greasy Giant".

+

Since the directives are registered via the Factory recipe, we can use the same syntax as with factories.

+
myApp.directive('myPlanet', ['planetName', function myPlanetDirectiveFactory(planetName) {
+  // directive definition object
+  return {
+    restrict: 'E',
+    scope: {},
+    link: function($scope, $element) { $element.text('Planet: ' + planetName); }
+  }
+}]);
+
+

We can then use the component like this:

+
<html ng-app="myApp">
+  <body>
+   <my-planet></my-planet>
+  </body>
+</html>
+
+

Using Factory recipes, you can also define Angular's filters and animations, but the controllers +are a bit special. You create a controller as a custom type that declares its dependencies as +arguments for its constructor function. This constructor is then registered with a module. Let's +take a look at the DemoController, created in one of the early examples:

+
myApp.controller('DemoController', ['clientId', function DemoController(clientId) {
+  this.clientId = clientId;
+}]);
+
+

The DemoController is instantiated via its constructor, every time the app needs an instance of +DemoController (in our simple app it's just once). So unlike services, controllers are not +singletons. The constructor is called with all the requested services, in our case the clientId +service.

+

Conclusion

+

To wrap it up, let's summarize the most important points:

+
    +
  • The injector uses recipes to create two types of objects: services and special purpose objects
  • +
  • There are five recipe types that define how to create objects: Value, Factory, Service, Provider +and Constant.
  • +
  • Factory and Service are the most commonly used recipes. The only difference between them is that +the Service recipe works better for objects of a custom type, while the Factory can produce JavaScript +primitives and functions.
  • +
  • The Provider recipe is the core recipe type and all the other ones are just syntactic sugar on it.
  • +
  • Provider is the most complex recipe type. You don't need it unless you are building a reusable +piece of code that needs global configuration.
  • +
  • All special purpose objects except for the Controller are defined via Factory recipes.
  • +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Features / Recipe typeFactoryServiceValueConstantProvider
can have dependenciesyesyesnonoyes
uses type friendly injectionnoyesyes*yes*no
object available in config phasenononoyesyes**
can create functionsyesyesyesyesyes
can create primitivesyesnoyesyesyes
+ +

* at the cost of eager initialization by using new operator directly

+

** the service object is not available during the config phase, but the provider instance is +(see the unicornLauncherProvider example above).

+ + diff --git a/1.6.6/docs/partials/guide/scope.html b/1.6.6/docs/partials/guide/scope.html new file mode 100644 index 000000000..c6dbd5526 --- /dev/null +++ b/1.6.6/docs/partials/guide/scope.html @@ -0,0 +1,371 @@ + Improve this Doc + + +

What are Scopes?

+

Scope is an object that refers to the application +model. It is an execution context for expressions. Scopes are +arranged in hierarchical structure which mimic the DOM structure of the application. Scopes can +watch expressions and propagate events.

+

Scope characteristics

+
    +
  • Scopes provide APIs ($watch) to observe +model mutations.

    +
  • +
  • Scopes provide APIs ($apply) to +propagate any model changes through the system into the view from outside of the "Angular +realm" (controllers, services, Angular event handlers).

    +
  • +
  • Scopes can be nested to limit access to the properties of application components while providing +access to shared model properties. Nested scopes are either "child scopes" or "isolate scopes". +A "child scope" (prototypically) inherits properties from its parent scope. An "isolate scope" +does not. See isolated +scopes for more information.

    +
  • +
  • Scopes provide context against which expressions are evaluated. For +example {{username}} expression is meaningless, unless it is evaluated against a specific +scope which defines the username property.

    +
  • +
+

Scope as Data-Model

+

Scope is the glue between application controller and the view. During the template linking phase the directives set up +$watch expressions on the scope. The +$watch allows the directives to be notified of property changes, which allows the directive to +render the updated value to the DOM.

+

Both controllers and directives have reference to the scope, but not to each other. This +arrangement isolates the controller from the directive as well as from the DOM. This is an important +point since it makes the controllers view agnostic, which greatly improves the testing story of +the applications.

+

+ +

+ + +
+ + +
+
angular.module('scopeExample', [])
.controller('MyController', ['$scope', function($scope) {
  $scope.username = 'World';

  $scope.sayHello = function() {
    $scope.greeting = 'Hello ' + $scope.username + '!';
  };
}]);
+
+ +
+
<div ng-controller="MyController">
  Your name:
    <input type="text" ng-model="username">
    <button ng-click='sayHello()'>greet</button>
  <hr>
  {{greeting}}
</div>
+
+ + + +
+
+ + +

+

In the above example notice that the MyController assigns World to the username property of +the scope. The scope then notifies the input of the assignment, which then renders the input +with username pre-filled. This demonstrates how a controller can write data into the scope.

+

Similarly the controller can assign behavior to scope as seen by the sayHello method, which is +invoked when the user clicks on the 'greet' button. The sayHello method can read the username +property and create a greeting property. This demonstrates that the properties on scope update +automatically when they are bound to HTML input widgets.

+

Logically the rendering of {{greeting}} involves:

+
    +
  • retrieval of the scope associated with DOM node where {{greeting}} is defined in template. +In this example this is the same scope as the scope which was passed into MyController. (We +will discuss scope hierarchies later.)

    +
  • +
  • Evaluate the greeting expression against the scope retrieved above, +and assign the result to the text of the enclosing DOM element.

    +
  • +
+

You can think of the scope and its properties as the data which is used to render the view. The +scope is the single source-of-truth for all things view related.

+

From a testability point of view, the separation of the controller and the view is desirable, because it allows us +to test the behavior without being distracted by the rendering details.

+
it('should say hello', function() {
+  var scopeMock = {};
+  var cntl = new MyController(scopeMock);
+
+  // Assert that username is pre-filled
+  expect(scopeMock.username).toEqual('World');
+
+  // Assert that we read new username and greet
+  scopeMock.username = 'angular';
+  scopeMock.sayHello();
+  expect(scopeMock.greeting).toEqual('Hello angular!');
+});
+
+

Scope Hierarchies

+

Each Angular application has exactly one root scope, but +may have several child scopes.

+

The application can have multiple scopes, because some directives create +new child scopes (refer to directive documentation to see which directives create new scopes). +When new scopes are created, they are added as children of their parent scope. This creates a tree +structure which parallels the DOM where they're attached.

+

When Angular evaluates {{name}}, it first looks at the scope associated with the given +element for the name property. If no such property is found, it searches the parent scope +and so on until the root scope is reached. In JavaScript this behavior is known as prototypical +inheritance, and child scopes prototypically inherit from their parents.

+

This example illustrates scopes in application, and prototypical inheritance of properties. The example is followed by +a diagram depicting the scope boundaries.

+

+ +

+ + +
+ + +
+
<div class="show-scope-demo">
  <div ng-controller="GreetController">
    Hello {{name}}!
  </div>
  <div ng-controller="ListController">
    <ol>
      <li ng-repeat="name in names">{{name}} from {{department}}</li>
    </ol>
  </div>
</div>
+
+ +
+
angular.module('scopeExample', [])
.controller('GreetController', ['$scope', '$rootScope', function($scope, $rootScope) {
  $scope.name = 'World';
  $rootScope.department = 'Angular';
}])
.controller('ListController', ['$scope', function($scope) {
  $scope.names = ['Igor', 'Misko', 'Vojta'];
}]);
+
+ +
+
.show-scope-demo.ng-scope,
.show-scope-demo .ng-scope  {
  border: 1px solid red;
  margin: 3px;
}
+
+ + + +
+
+ + +

+

+

Notice that Angular automatically places ng-scope class on elements where scopes are +attached. The <style> definition in this example highlights in red the new scope locations. The +child scopes are necessary because the repeater evaluates {{name}} expression, but +depending on which scope the expression is evaluated it produces different result. Similarly the +evaluation of {{department}} prototypically inherits from root scope, as it is the only place +where the department property is defined.

+

Retrieving Scopes from the DOM.

+

Scopes are attached to the DOM as $scope data property, and can be retrieved for debugging +purposes. (It is unlikely that one would need to retrieve scopes in this way inside the +application.) The location where the root scope is attached to the DOM is defined by the location +of ng-app directive. Typically +ng-app is placed on the <html> element, but it can be placed on other elements as well, if, +for example, only a portion of the view needs to be controlled by Angular.

+

To examine the scope in the debugger:

+
    +
  1. Right click on the element of interest in your browser and select 'inspect element'. You +should see the browser debugger with the element you clicked on highlighted.

    +
  2. +
  3. The debugger allows you to access the currently selected element in the console as $0 +variable.

    +
  4. +
  5. To retrieve the associated scope in console execute: angular.element($0).scope() or just type $scope

    +
  6. +
+

Scope Events Propagation

+

Scopes can propagate events in similar fashion to DOM events. The event can be broadcasted to the scope children or emitted to scope parents.

+

+ +

+ + +
+ + +
+
angular.module('eventExample', [])
.controller('EventController', ['$scope', function($scope) {
  $scope.count = 0;
  $scope.$on('MyEvent', function() {
    $scope.count++;
  });
}]);
+
+ +
+
<div ng-controller="EventController">
  Root scope <tt>MyEvent</tt> count: {{count}}
  <ul>
    <li ng-repeat="i in [1]" ng-controller="EventController">
      <button ng-click="$emit('MyEvent')">$emit('MyEvent')</button>
      <button ng-click="$broadcast('MyEvent')">$broadcast('MyEvent')</button>
      <br>
      Middle scope <tt>MyEvent</tt> count: {{count}}
      <ul>
        <li ng-repeat="item in [1, 2]" ng-controller="EventController">
          Leaf scope <tt>MyEvent</tt> count: {{count}}
        </li>
      </ul>
    </li>
  </ul>
</div>
+
+ + + +
+
+ + +

+

Scope Life Cycle

+

The normal flow of a browser receiving an event is that it executes a corresponding JavaScript +callback. Once the callback completes the browser re-renders the DOM and returns to waiting for +more events.

+

When the browser calls into JavaScript the code executes outside the Angular execution context, +which means that Angular is unaware of model modifications. To properly process model +modifications the execution has to enter the Angular execution context using the $apply method. Only model modifications which +execute inside the $apply method will be properly accounted for by Angular. For example if a +directive listens on DOM events, such as ng-click it must evaluate the +expression inside the $apply method.

+

After evaluating the expression, the $apply method performs a $digest. In the $digest phase the scope examines all +of the $watch expressions and compares them with the previous value. This dirty checking is done +asynchronously. This means that assignment such as $scope.username="angular" will not +immediately cause a $watch to be notified, instead the $watch notification is delayed until +the $digest phase. This delay is desirable, since it coalesces multiple model updates into one +$watch notification as well as guarantees that during the $watch notification no other +$watches are running. If a $watch changes the value of the model, it will force additional +$digest cycle.

+
    +
  1. Creation

    +

    The root scope is created during the application +bootstrap by the $injector. During template +linking, some directives create new child scopes.

    +
  2. +
  3. Watcher registration

    +

    During template linking, directives register watches on the scope. These watches will be +used to propagate model values to the DOM.

    +
  4. +
  5. Model mutation

    +

    For mutations to be properly observed, you should make them only within the scope.$apply(). Angular APIs do this +implicitly, so no extra $apply call is needed when doing synchronous work in controllers, +or asynchronous work with $http, $timeout +or $interval services.

    +
  6. +
  7. Mutation observation

    +

    At the end of $apply, Angular performs a $digest cycle on the root scope, which then propagates throughout all child scopes. During +the $digest cycle, all $watched expressions or functions are checked for model mutation +and if a mutation is detected, the $watch listener is called.

    +
  8. +
  9. Scope destruction

    +

    When child scopes are no longer needed, it is the responsibility of the child scope creator +to destroy them via scope.$destroy() +API. This will stop propagation of $digest calls into the child scope and allow for memory +used by the child scope models to be reclaimed by the garbage collector.

    +
  10. +
+

Scopes and Directives

+

During the compilation phase, the compiler matches directives against the DOM template. The directives +usually fall into one of two categories:

+
    +
  • Observing directives, such as +double-curly expressions {{expression}}, register listeners using the $watch() method. This type of directive needs +to be notified whenever the expression changes so that it can update the view.

    +
  • +
  • Listener directives, such as ng-click, register a listener with the DOM. When the DOM listener fires, the directive +executes the associated expression and updates the view using the $apply() method.

    +
  • +
+

When an external event (such as a user action, timer or XHR) is received, the associated expression must be applied to the scope through the $apply() method so that all listeners are updated +correctly.

+

Directives that Create Scopes

+

In most cases, directives and scopes interact +but do not create new instances of scope. However, some directives, such as ng-controller and ng-repeat, create new child scopes +and attach the child scope to the corresponding DOM element. You can retrieve a scope for any DOM +element by using an angular.element(aDomElement).scope() method call. +See the directives guide for more information about isolate scopes.

+

Controllers and Scopes

+

Scopes and controllers interact with each other in the following situations:

+
    +
  • Controllers use scopes to expose controller methods to templates (see ng-controller).

    +
  • +
  • Controllers define methods (behavior) that can mutate the model (properties on the scope).

    +
  • +
  • Controllers may register watches on +the model. These watches execute immediately after the controller behavior executes.

    +
  • +
+

See the ng-controller for more +information.

+

Scope $watch Performance Considerations

+

Dirty checking the scope for property changes is a common operation in Angular and for this reason +the dirty checking function must be efficient. Care should be taken that the dirty checking +function does not do any DOM access, as DOM access is orders of magnitude slower than property +access on JavaScript object.

+

Scope $watch Depths

+

+

Dirty checking can be done with three strategies: By reference, by collection contents, and by value. The strategies differ in the kinds of changes they detect, and in their performance characteristics.

+
    +
  • Watching by reference (scope.$watch (watchExpression, listener)) detects a change when the whole value returned by the watch expression switches to a new value. If the value is an array or an object, changes inside it are not detected. This is the most efficient strategy.
  • +
  • Watching collection contents (scope.$watchCollection (watchExpression, listener)) detects changes that occur inside an array or an object: When items are added, removed, or reordered. The detection is shallow - it does not reach into nested collections. Watching collection contents is more expensive than watching by reference, because copies of the collection contents need to be maintained. However, the strategy attempts to minimize the amount of copying required.
  • +
  • Watching by value (scope.$watch (watchExpression, listener, true)) detects any change in an arbitrarily nested data structure. It is the most powerful change detection strategy, but also the most expensive. A full traversal of the nested data structure is needed on each digest, and a full copy of it needs to be held in memory.
  • +
+

Integration with the browser event loop

+

+

The diagram and the example below describe how Angular interacts with the browser's event loop.

+
    +
  1. The browser's event-loop waits for an event to arrive. An event is a user interaction, timer event, +or network event (response from a server).
  2. +
  3. The event's callback gets executed. This enters the JavaScript context. The callback can + modify the DOM structure.
  4. +
  5. Once the callback executes, the browser leaves the JavaScript context and +re-renders the view based on DOM changes.
  6. +
+

Angular modifies the normal JavaScript flow by providing its own event processing loop. This +splits the JavaScript into classical and Angular execution context. Only operations which are +applied in the Angular execution context will benefit from Angular data-binding, exception handling, +property watching, etc... You can also use $apply() to enter the Angular execution context from JavaScript. Keep in +mind that in most places (controllers, services) $apply has already been called for you by the +directive which is handling the event. An explicit call to $apply is needed only when +implementing custom event callbacks, or when working with third-party library callbacks.

+
    +
  1. Enter the Angular execution context by calling scope.$apply(stimulusFn), where stimulusFn is +the work you wish to do in the Angular execution context.
  2. +
  3. Angular executes the stimulusFn(), which typically modifies application state.
  4. +
  5. Angular enters the $digest loop. The +loop is made up of two smaller loops which process $evalAsync queue and the $watch list. The $digest loop keeps iterating until the model +stabilizes, which means that the $evalAsync queue is empty and the $watch list does not detect any changes.
  6. +
  7. The $evalAsync queue is used to +schedule work which needs to occur outside of current stack frame, but before the browser's +view render. This is usually done with setTimeout(0), but the setTimeout(0) approach +suffers from slowness and may cause view flickering since the browser renders the view after +each event.
  8. +
  9. The $watch list is a set of expressions +which may have changed since last iteration. If a change is detected then the $watch +function is called which typically updates the DOM with the new value.
  10. +
  11. Once the Angular $digest loop finishes, +the execution leaves the Angular and JavaScript context. This is followed by the browser +re-rendering the DOM to reflect any changes.
  12. +
+

Here is the explanation of how the Hello world example achieves the data-binding effect when the +user enters text into the text field.

+
    +
  1. During the compilation phase:
      +
    1. the ng-model and input directive set up a keydown listener on the <input> control.
    2. +
    3. the interpolation +sets up a $watch to be notified of +name changes.
    4. +
    +
  2. +
  3. During the runtime phase:
      +
    1. Pressing an 'X' key causes the browser to emit a keydown event on the input control.
    2. +
    3. The input directive +captures the change to the input's value and calls $apply("name = 'X';") to update the +application model inside the Angular execution context.
    4. +
    5. Angular applies the name = 'X'; to the model.
    6. +
    7. The $digest loop begins
    8. +
    9. The $watch list detects a change +on the name property and notifies the interpolation, +which in turn updates the DOM.
    10. +
    11. Angular exits the execution context, which in turn exits the keydown event and with it +the JavaScript execution context.
    12. +
    13. The browser re-renders the view with the updated text.
    14. +
    +
  4. +
+ + diff --git a/1.6.6/docs/partials/guide/security.html b/1.6.6/docs/partials/guide/security.html new file mode 100644 index 000000000..88fd61ecb --- /dev/null +++ b/1.6.6/docs/partials/guide/security.html @@ -0,0 +1,109 @@ + Improve this Doc + + +

Security

+

This document explains some of AngularJS's security features and best practices that you should +keep in mind as you build your application.

+

Reporting a security issue

+

Email us at security@angularjs.org to report any potential +security issues in AngularJS.

+

Please keep in mind the points below about Angular's expression language.

+

Use the latest AngularJS possible

+

Like any software library, it is critical to keep AngularJS up to date. Please track the +CHANGELOG and make sure you are aware +of upcoming security patches and other updates.

+

Be ready to update rapidly when new security-centric patches are available.

+

Those that stray from Angular standards (such as modifying Angular's core) may have difficulty updating, +so keeping to AngularJS standards is not just a functionality issue, it's also critical in order to +facilitate rapid security updates.

+

Angular Templates and Expressions

+

If an attacker has access to control Angular templates or expressions, they can exploit an Angular application +via an XSS attack, regardless of the version.

+

There are a number of ways that templates and expressions can be controlled:

+
    +
  • Generating Angular templates on the server containing user-provided content. This is the most common pitfall +where you are generating HTML via some server-side engine such as PHP, Java or ASP.NET.
  • +
  • Passing an expression generated from user-provided content in calls to the following methods on a scope:
      +
    • $watch(userContent, ...)
    • +
    • $watchGroup(userContent, ...)
    • +
    • $watchCollection(userContent, ...)
    • +
    • $eval(userContent)
    • +
    • $evalAsync(userContent)
    • +
    • $apply(userContent)
    • +
    • $applyAsync(userContent)
    • +
    +
  • +
  • Passing an expression generated from user-provided content in calls to services that parse expressions:
      +
    • $compile(userContent)
    • +
    • $parse(userContent)
    • +
    • $interpolate(userContent)
    • +
    +
  • +
  • Passing an expression generated from user provided content as a predicate to orderBy pipe: +{{ value | orderBy : userContent }}
  • +
+

Sandbox removal

+

Each version of Angular 1 up to, but not including 1.6, contained an expression sandbox, which reduced the surface area of +the vulnerability but never removed it. In Angular 1.6 we removed this sandbox as developers kept relying upon it as a security +feature even though it was always possible to access arbitrary JavaScript code if one could control the Angular templates +or expressions of applications.

+

Control of the Angular templates makes applications vulnerable even if there was a completely secure sandbox:

+ +

It's best to design your application in such a way that users cannot change client-side templates.

+
    +
  • Do not mix client and server templates
  • +
  • Do not use user input to generate templates dynamically
  • +
  • Do not run user input through $scope.$eval (or any of the other expression parsing functions listed above)
  • +
  • Consider using CSP (but don't rely only on CSP)
  • +
+

You can use suitably sanitized server-side templating to dynamically generate CSS, URLs, etc, but not for generating templates that are +bootstrapped/compiled by Angular.

+

If you must continue to allow user-provided content in an Angular template then the safest option is to ensure that it is only +present in the part of the template that is made inert via the ngNonBindable directive.

+

HTTP Requests

+

Whenever your application makes requests to a server there are potential security issues that need +to be blocked. Both server and the client must cooperate in order to eliminate these threats. +Angular comes pre-configured with strategies that address these issues, but for this to work backend +server cooperation is required.

+

Cross Site Request Forgery (XSRF/CSRF)

+

Protection from XSRF is provided by using the double-submit cookie defense pattern. +For more information please visit XSRF protection.

+

JSON Hijacking Protection

+

Protection from JSON Hijacking is provided if the server prefixes all JSON requests with following string ")]}',\n". +Angular will automatically strip the prefix before processing it as JSON. +For more information please visit JSON Hijacking Protection.

+

Bear in mind that calling $http.jsonp gives the remote server (and, if the request is not secured, any Man-in-the-Middle attackers) +instant remote code execution in your application: the result of these requests is handed off +to the browser as regular <script> tag.

+

Strict Contextual Escaping

+

Strict Contextual Escaping (SCE) is a mode in which AngularJS requires bindings in certain contexts to require +a value that is marked as safe to use for that context.

+

This mode is implemented by the $sce service and various core directives.

+

One example of such a context is rendering arbitrary content via the ngBindHtml directive. If the content is +provided by a user there is a chance of Cross Site Scripting (XSS) attacks. The ngBindHtml directive will not +render content that is not marked as safe by $sce. The ngSanitize module can be used to clean such +user provided content and mark the content as safe.

+

Be aware that marking untrusted data as safe via calls to $sce.trustAsHtml, etc is +dangerous and will lead to Cross Site Scripting exploits.

+

For more information please visit $sce and $sanitize.

+

Using Local Caches

+

There are various places that the browser can store (or cache) data. Within Angular there are objects created by +the $cacheFactory. These objects, such as $templateCache are used to store and retrieve data, +primarily used by $http and the script directive to cache templates and other data.

+

Similarly the browser itself offers localStorage and sessionStorage objects for caching data.

+

Attackers with local access can retrieve sensitive data from this cache even when users are not authenticated.

+

For instance in a long running Single Page Application (SPA), one user may "log out", but then another user +may access the application without refreshing, in which case all the cached data is still available.

+

For more information please visit Web Storage Security.

+

See also

+ + + diff --git a/1.6.6/docs/partials/guide/services.html b/1.6.6/docs/partials/guide/services.html new file mode 100644 index 000000000..7961c79b1 --- /dev/null +++ b/1.6.6/docs/partials/guide/services.html @@ -0,0 +1,206 @@ + Improve this Doc + + +

Services

+

Angular services are substitutable objects that are wired together using dependency +injection (DI). You can use services to organize and share code across your app.

+

Angular services are:

+
    +
  • Lazily instantiated – Angular only instantiates a service when an application component depends +on it.
  • +
  • Singletons – Each component dependent on a service gets a reference to the single instance +generated by the service factory.
  • +
+

Angular offers several useful services (like $http), but for most applications +you'll also want to create your own.

+
+Note: Like other core Angular identifiers, built-in services always start with $ +(e.g. $http). +
+ + +

Using a Service

+

To use an Angular service, you add it as a dependency for the component (controller, service, +filter or directive) that depends on the service. Angular's dependency injection +subsystem takes care of the rest.

+

+ +

+ + +
+ + +
+
<div id="simple" ng-controller="MyController">
  <p>Let's try this simple notify service, injected into the controller...</p>
  <input ng-init="message='test'" ng-model="message" >
  <button ng-click="callNotify(message);">NOTIFY</button>
  <p>(you have to click 3 times to see an alert)</p>
</div>
+
+ +
+
angular.
module('myServiceModule', []).
 controller('MyController', ['$scope', 'notify', function($scope, notify) {
   $scope.callNotify = function(msg) {
     notify(msg);
   };
 }]).
factory('notify', ['$window', function(win) {
   var msgs = [];
   return function(msg) {
     msgs.push(msg);
     if (msgs.length === 3) {
       win.alert(msgs.join('\n'));
       msgs = [];
     }
   };
 }]);
+
+ +
+
it('should test service', function() {
  expect(element(by.id('simple')).element(by.model('message')).getAttribute('value'))
      .toEqual('test');
});
+
+ + + +
+
+ + +

+

Creating Services

+

Application developers are free to define their own services by registering the service's name and +service factory function, with an Angular module.

+

The service factory function generates the single object or function that represents the +service to the rest of the application. The object or function returned by the service is +injected into any component (controller, service, filter or directive) that specifies a dependency +on the service.

+

Registering Services

+

Services are registered to modules via the Module API. +Typically you use the Module factory API to register a service:

+
var myModule = angular.module('myModule', []);
+myModule.factory('serviceId', function() {
+  var shinyNewServiceInstance;
+  // factory function body that constructs shinyNewServiceInstance
+  return shinyNewServiceInstance;
+});
+
+

Note that you are not registering a service instance, but rather a factory function that +will create this instance when called.

+

Dependencies

+

Services can have their own dependencies. Just like declaring dependencies in a controller, you +declare dependencies by specifying them in the service's factory function signature.

+

For more on dependencies, see the dependency injection docs.

+

The example module below has two services, each with various dependencies:

+
var batchModule = angular.module('batchModule', []);
+
+/**
+ * The `batchLog` service allows for messages to be queued in memory and flushed
+ * to the console.log every 50 seconds.
+ *
+ * @param {*} message Message to be logged.
+ */
+batchModule.factory('batchLog', ['$interval', '$log', function($interval, $log) {
+  var messageQueue = [];
+
+  function log() {
+    if (messageQueue.length) {
+      $log.log('batchLog messages: ', messageQueue);
+      messageQueue = [];
+    }
+  }
+
+  // start periodic checking
+  $interval(log, 50000);
+
+  return function(message) {
+    messageQueue.push(message);
+  }
+}]);
+
+/**
+ * `routeTemplateMonitor` monitors each `$route` change and logs the current
+ * template via the `batchLog` service.
+ */
+batchModule.factory('routeTemplateMonitor', ['$route', 'batchLog', '$rootScope',
+  function($route, batchLog, $rootScope) {
+    return {
+      startMonitoring: function() {
+        $rootScope.$on('$routeChangeSuccess', function() {
+          batchLog($route.current ? $route.current.template : null);
+        });
+      }
+    };
+  }]);
+
+

In the example, note that:

+
    +
  • The batchLog service depends on the built-in $interval and +$log services.
  • +
  • The routeTemplateMonitor service depends on the built-in $route +service and our custom batchLog service.
  • +
  • Both services use the array notation to declare their dependencies.
  • +
  • The order of identifiers in the array is the same as the order of argument +names in the factory function.
  • +
+

Registering a Service with $provide

+

You can also register services via the $provide service inside of a +module's config function:

+
angular.module('myModule', []).config(['$provide', function($provide) {
+  $provide.factory('serviceId', function() {
+    var shinyNewServiceInstance;
+    // factory function body that constructs shinyNewServiceInstance
+    return shinyNewServiceInstance;
+  });
+}]);
+
+

This technique is often used in unit tests to mock out a service's dependencies.

+

Unit Testing

+

The following is a unit test for the notify service from the Creating Angular Services example above. The unit test example uses a Jasmine spy (mock) instead +of a real browser alert.

+
var mock, notify;
+beforeEach(module('myServiceModule'));
+beforeEach(function() {
+  mock = {alert: jasmine.createSpy()};
+
+  module(function($provide) {
+    $provide.value('$window', mock);
+  });
+
+  inject(function($injector) {
+    notify = $injector.get('notify');
+  });
+});
+
+it('should not alert first two notifications', function() {
+  notify('one');
+  notify('two');
+
+  expect(mock.alert).not.toHaveBeenCalled();
+});
+
+it('should alert all after third notification', function() {
+  notify('one');
+  notify('two');
+  notify('three');
+
+  expect(mock.alert).toHaveBeenCalledWith("one\ntwo\nthree");
+});
+
+it('should clear messages after alert', function() {
+  notify('one');
+  notify('two');
+  notify('third');
+  notify('more');
+  notify('two');
+  notify('third');
+
+  expect(mock.alert.calls.count()).toEqual(2);
+  expect(mock.alert.calls.mostRecent().args).toEqual(["more\ntwo\nthird"]);
+});
+
+ + + + + + diff --git a/1.6.6/docs/partials/guide/templates.html b/1.6.6/docs/partials/guide/templates.html new file mode 100644 index 000000000..e6957c9f0 --- /dev/null +++ b/1.6.6/docs/partials/guide/templates.html @@ -0,0 +1,48 @@ + Improve this Doc + + +

Templates

+

In Angular, templates are written with HTML that contains Angular-specific elements and attributes. +Angular combines the template with information from the model and controller to render the dynamic +view that a user sees in the browser.

+

These are the types of Angular elements and attributes you can use:

+
    +
  • Directive — An attribute or element that +augments an existing DOM element or represents a reusable DOM component.
  • +
  • Markup — The double curly brace notation {{ }} to bind expressions +to elements is built-in Angular markup.
  • +
  • Filter — Formats data for display.
  • +
  • Form controls — Validates user input.
  • +
+

The following code snippet shows a template with directives and +curly-brace expression bindings:

+
<html ng-app>
+ <!-- Body tag augmented with ngController directive  -->
+ <body ng-controller="MyController">
+   <input ng-model="foo" value="bar">
+   <!-- Button tag with ngClick directive, and
+          string expression 'buttonText'
+          wrapped in "{{ }}" markup -->
+   <button ng-click="changeFoo()">{{buttonText}}</button>
+   <script src="angular.js"></script>
+ </body>
+</html>
+
+

In a simple app, the template consists of HTML, CSS, and Angular directives contained +in just one HTML file (usually index.html).

+

In a more complex app, you can display multiple views within one main page using "partials" – +segments of template located in separate HTML files. You can use the +ngView directive to load partials based on configuration passed +to the $route service. The angular tutorial shows this +technique in steps seven and eight.

+ + + + + + diff --git a/1.6.6/docs/partials/guide/unit-testing.html b/1.6.6/docs/partials/guide/unit-testing.html new file mode 100644 index 000000000..58b19ed85 --- /dev/null +++ b/1.6.6/docs/partials/guide/unit-testing.html @@ -0,0 +1,387 @@ + Improve this Doc + + +

Unit Testing

+

JavaScript is a dynamically typed language which comes with great power of expression, but it also +comes with almost no help from the compiler. For this reason we feel very strongly that any code +written in JavaScript needs to come with a strong set of tests. We have built many features into +Angular which make testing your Angular applications easy. With Angular, there is no excuse for not testing.

+

Separation of Concerns

+

Unit testing, as the name implies, is about testing individual units of code. Unit tests try to +answer questions such as "Did I think about the logic correctly?" or "Does the sort function order +the list in the right order?"

+

In order to answer such a question it is very important that we can isolate the unit of code under test. +That is because when we are testing the sort function we don't want to be forced into creating +related pieces such as the DOM elements, or making any XHR calls to fetch the data to sort.

+

While this may seem obvious it can be very difficult to call an individual function on a +typical project. The reason is that the developers often mix concerns resulting in a +piece of code which does everything. It makes an XHR request, it sorts the response data, and then it +manipulates the DOM.

+

With Angular, we try to make it easy for you to do the right thing. For your XHR requests, we +provide dependency injection, so your requests can be simulated. For the DOM, we abstract it, so you can +test your model without having to manipulate the DOM directly. Your tests can then +assert that the data has been sorted without having to create or look at the state of the DOM or to +wait for any XHR requests to return data. The individual sort function can be tested in isolation.

+

With great power comes great responsibility

+

Angular is written with testability in mind, but it still requires that you do the right thing. +We tried to make the right thing easy, but if you ignore these guidelines you may end up with an +untestable application.

+

Dependency Injection

+

Angular comes with dependency injection built-in, which makes testing components much +easier, because you can pass in a component's dependencies and stub or mock them as you wish.

+

Components that have their dependencies injected allow them to be easily mocked on a test by +test basis, without having to mess with any global variables that could inadvertently affect +another test.

+

Additional tools for testing Angular applications

+

For testing Angular applications there are certain tools that you should use that will make testing much +easier to set up and run.

+

Karma

+

Karma is a JavaScript command line tool that can be used to spawn +a web server which loads your application's source code and executes your tests. You can configure +Karma to run against a number of browsers, which is useful for being confident that your application +works on all browsers you need to support. Karma is executed on the command line and will display +the results of your tests on the command line once they have run in the browser.

+

Karma is a NodeJS application, and should be installed through npm/yarn. Full installation instructions +are available on the Karma website.

+

Jasmine

+

Jasmine is a behavior driven development framework for +JavaScript that has become the most popular choice for testing Angular applications. Jasmine +provides functions to help with structuring your tests and also making assertions. As your tests +grow, keeping them well structured and documented is vital, and Jasmine helps achieve this.

+

In Jasmine we use the describe function to group our tests together:

+
describe("sorting the list of users", function() {
+  // individual tests go here
+});
+
+

And then each individual test is defined within a call to the it function:

+
describe('sorting the list of users', function() {
+  it('sorts in descending order by default', function() {
+    // your test assertion goes here
+  });
+});
+
+

Grouping related tests within describe blocks and describing each individual test within an +it call keeps your tests self documenting.

+

Finally, Jasmine provides matchers which let you make assertions:

+
describe('sorting the list of users', function() {
+  it('sorts in descending order by default', function() {
+    var users = ['jack', 'igor', 'jeff'];
+    var sorted = sortUsers(users);
+    expect(sorted).toEqual(['jeff', 'jack', 'igor']);
+  });
+});
+
+

Jasmine comes with a number of matchers that help you make a variety of assertions. You should read +the Jasmine documentation to see +what they are. To use Jasmine with Karma, we use the +karma-jasmine test runner.

+

angular-mocks

+

Angular also provides the ngMock module, which provides mocking for your tests. This is used +to inject and mock Angular services within unit tests. In addition, it is able to extend other +modules so they are synchronous. Having tests synchronous keeps them much cleaner and easier to work +with. One of the most useful parts of ngMock is $httpBackend, which lets us mock XHR +requests in tests, and return sample data instead.

+

Testing a Controller

+

Because Angular separates logic from the view layer, it keeps controllers easy to test. Let's take a +look at how we might test the controller below, which provides $scope.grade, which sets a property +on the scope based on the length of the password.

+
angular.module('app', [])
+.controller('PasswordController', function PasswordController($scope) {
+  $scope.password = '';
+  $scope.grade = function() {
+    var size = $scope.password.length;
+    if (size > 8) {
+      $scope.strength = 'strong';
+    } else if (size > 3) {
+      $scope.strength = 'medium';
+    } else {
+      $scope.strength = 'weak';
+    }
+  };
+});
+
+

Because controllers are not available on the global scope, we need to use angular.mock.inject to inject our controller first. The first step is to use the module function, +which is provided by angular-mocks. This loads in the module it's given, so it is available in your +tests. We pass this into beforeEach, which is a function Jasmine provides that lets us run code +before each test. Then we can use inject to access $controller, the service that is responsible +for instantiating controllers.

+
describe('PasswordController', function() {
+  beforeEach(module('app'));
+
+  var $controller;
+
+  beforeEach(inject(function(_$controller_){
+    // The injector unwraps the underscores (_) from around the parameter names when matching
+    $controller = _$controller_;
+  }));
+
+  describe('$scope.grade', function() {
+    it('sets the strength to "strong" if the password length is >8 chars', function() {
+      var $scope = {};
+      var controller = $controller('PasswordController', { $scope: $scope });
+      $scope.password = 'longerthaneightchars';
+      $scope.grade();
+      expect($scope.strength).toEqual('strong');
+    });
+  });
+});
+
+

Notice how by nesting the describe calls and being descriptive when calling them with strings, the +test is very clear. It documents exactly what it is testing, and at a glance you can quickly see +what is happening. Now let's add the test for when the password is less than three characters, which +should see $scope.strength set to "weak":

+
describe('PasswordController', function() {
+  beforeEach(module('app'));
+
+  var $controller;
+
+  beforeEach(inject(function(_$controller_){
+    // The injector unwraps the underscores (_) from around the parameter names when matching
+    $controller = _$controller_;
+  }));
+
+  describe('$scope.grade', function() {
+    it('sets the strength to "strong" if the password length is >8 chars', function() {
+      var $scope = {};
+      var controller = $controller('PasswordController', { $scope: $scope });
+      $scope.password = 'longerthaneightchars';
+      $scope.grade();
+      expect($scope.strength).toEqual('strong');
+    });
+
+    it('sets the strength to "weak" if the password length <3 chars', function() {
+      var $scope = {};
+      var controller = $controller('PasswordController', { $scope: $scope });
+      $scope.password = 'a';
+      $scope.grade();
+      expect($scope.strength).toEqual('weak');
+    });
+  });
+});
+
+

Now we have two tests, but notice the duplication between the tests. Both have to +create the $scope variable and create the controller. As we add new tests, this duplication is +only going to get worse. Thankfully, Jasmine provides beforeEach, which lets us run a function +before each individual test. Let's see how that would tidy up our tests:

+
describe('PasswordController', function() {
+  beforeEach(module('app'));
+
+  var $controller;
+
+  beforeEach(inject(function(_$controller_){
+    // The injector unwraps the underscores (_) from around the parameter names when matching
+    $controller = _$controller_;
+  }));
+
+  describe('$scope.grade', function() {
+    var $scope, controller;
+
+    beforeEach(function() {
+      $scope = {};
+      controller = $controller('PasswordController', { $scope: $scope });
+    });
+
+    it('sets the strength to "strong" if the password length is >8 chars', function() {
+      $scope.password = 'longerthaneightchars';
+      $scope.grade();
+      expect($scope.strength).toEqual('strong');
+    });
+
+    it('sets the strength to "weak" if the password length <3 chars', function() {
+      $scope.password = 'a';
+      $scope.grade();
+      expect($scope.strength).toEqual('weak');
+    });
+  });
+});
+
+

We've moved the duplication out and into the beforeEach block. Each individual test now +only contains the code specific to that test, and not code that is general across all tests. As you +expand your tests, keep an eye out for locations where you can use beforeEach to tidy up tests. +beforeEach isn't the only function of this sort that Jasmine provides, and the documentation +lists the others.

+

Testing Filters

+

Filters are functions which transform the data into a user readable +format. They are important because they remove the formatting responsibility from the application +logic, further simplifying the application logic.

+
myModule.filter('length', function() {
+  return function(text) {
+    return ('' + (text || '')).length;
+  }
+});
+
+describe('length filter', function() {
+
+  var $filter;
+
+  beforeEach(inject(function(_$filter_){
+    $filter = _$filter_;
+  }));
+
+  it('returns 0 when given null', function() {
+    var length = $filter('length');
+    expect(length(null)).toEqual(0);
+  });
+
+  it('returns the correct value when given a string of chars', function() {
+    var length = $filter('length');
+    expect(length('abc')).toEqual(3);
+  });
+});
+
+

Testing Directives

+

Directives in angular are responsible for encapsulating complex functionality within custom HTML tags, +attributes, classes or comments. Unit tests are very important for directives because the components +you create with directives may be used throughout your application and in many different contexts.

+

Simple HTML Element Directive

+

Let's start with an angular app with no dependencies.

+
var app = angular.module('myApp', []);
+
+

Now we can add a directive to our app.

+
app.directive('aGreatEye', function () {
+    return {
+        restrict: 'E',
+        replace: true,
+        template: '<h1>lidless, wreathed in flame, {{1 + 1}} times</h1>'
+    };
+});
+
+

This directive is used as a tag <a-great-eye></a-great-eye>. It replaces the entire tag with the +template <h1>lidless, wreathed in flame, {{1 + 1}} times</h1>. Now we are going to write a jasmine unit test to +verify this functionality. Note that the expression {{1 + 1}} times will also be evaluated in the rendered content.

+
describe('Unit testing great quotes', function() {
+  var $compile,
+      $rootScope;
+
+  // Load the myApp module, which contains the directive
+  beforeEach(module('myApp'));
+
+  // Store references to $rootScope and $compile
+  // so they are available to all tests in this describe block
+  beforeEach(inject(function(_$compile_, _$rootScope_){
+    // The injector unwraps the underscores (_) from around the parameter names when matching
+    $compile = _$compile_;
+    $rootScope = _$rootScope_;
+  }));
+
+  it('Replaces the element with the appropriate content', function() {
+    // Compile a piece of HTML containing the directive
+    var element = $compile("<a-great-eye></a-great-eye>")($rootScope);
+    // fire all the watches, so the scope expression {{1 + 1}} will be evaluated
+    $rootScope.$digest();
+    // Check that the compiled element contains the templated content
+    expect(element.html()).toContain("lidless, wreathed in flame, 2 times");
+  });
+});
+
+

We inject the $compile service and $rootScope before each jasmine test. The $compile service is used +to render the aGreatEye directive. After rendering the directive we ensure that the directive has +replaced the content and "lidless, wreathed in flame, 2 times" is present.

+
+Underscore notation: + +The use of the underscore notation (e.g.: _$rootScope_) is a convention wide spread in AngularJS +community to keep the variable names clean in your tests. That's why the +$injector strips out the leading and the trailing underscores when +matching the parameters. The underscore rule applies only if the name starts and ends with +exactly one underscore, otherwise no replacing happens. +
+ +

Testing Transclusion Directives

+

Directives that use transclusion are treated specially by the compiler. Before their compile +function is called, the contents of the directive's element are removed from the element and +provided via a transclusion function. The directive's template is then appended to the directive's +element, to which it can then insert the transcluded content into its template.

+

Before compilation:

+
<div transclude-directive>
+  Some transcluded content
+</div>
+
+

After transclusion extraction:

+
<div transclude-directive></div>
+
+

After compilation:

+
<div transclude-directive>
+  Some Template
+  <span ng-transclude>Some transcluded content</span>
+</div>
+
+

If the directive is using 'element' transclusion, the compiler will actually remove the +directive's entire element from the DOM and replace it with a comment node. The compiler then +inserts the directive's template "after" this comment node, as a sibling.

+

Before compilation

+
<div element-transclude>
+  Some Content
+</div>
+
+

After transclusion extraction

+
<!-- elementTransclude -->
+
+

After compilation:

+
<!-- elementTransclude -->
+<div element-transclude>
+  Some Template
+  <span ng-transclude>Some transcluded content</span>
+</div>
+
+

It is important to be aware of this when writing tests for directives that use 'element' +transclusion. If you place the directive on the root element of the DOM fragment that you +pass to $compile, then the DOM node returned from the linking function will be the +comment node and you will lose the ability to access the template and transcluded content.

+
var node = $compile('<div element-transclude></div>')($rootScope);
+expect(node[0].nodeType).toEqual(node.COMMENT_NODE);
+expect(node[1]).toBeUndefined();
+
+

To cope with this you simply ensure that your 'element' transclude directive is wrapped in an +element, such as a <div>.

+
var node = $compile('<div><div element-transclude></div></div>')($rootScope);
+var contents = node.contents();
+expect(contents[0].nodeType).toEqual(node.COMMENT_NODE);
+expect(contents[1].nodeType).toEqual(node.ELEMENT_NODE);
+
+

Testing Directives With External Templates

+

If your directive uses templateUrl, consider using +karma-ng-html2js-preprocessor +to pre-compile HTML templates and thus avoid having to load them over HTTP during test execution. +Otherwise you may run into issues if the test directory hierarchy differs from the application's.

+

Testing Promises

+

When testing promises, it's important to know that the resolution of promises is tied to the digest cycle. +That means a promise's then, catch and finally callback functions are only called after a digest has run. +In tests, you can trigger a digest by calling a scope's $apply function. +If you don't have a scope in your test, you can inject the $rootScope and call $apply on it. +There is also an example of testing promises in the $q service documentation.

+

Using beforeAll()

+

Jasmine's beforeAll() and mocha's before() hooks are often useful for sharing test setup - either to reduce test run-time or simply to make for more focused test cases.

+

By default, ngMock will create an injector per test case to ensure your tests do not affect each other. However, if we want to use beforeAll(), ngMock will have to create the injector before any test cases are run, and share that injector through all the cases for that describe. That is where module.sharedInjector() comes in. When it's called within a describe block, a single injector is shared between all hooks and test cases run in that block.

+

In the example below we are testing a service that takes a long time to generate its answer. To avoid having all of the assertions we want to write in a single test case, module.sharedInjector() and Jasmine's beforeAll() are used to run the service only once. The test cases then all make assertions about the properties added to the service instance.

+
describe("Deep Thought", function() {
+
+  module.sharedInjector();
+
+  beforeAll(module("UltimateQuestion"));
+
+  beforeAll(inject(function(DeepThought) {
+    expect(DeepThought.answer).toBeUndefined();
+    DeepThought.generateAnswer();
+  }));
+
+  it("has calculated the answer correctly", inject(function(DeepThought) {
+    // Because of sharedInjector, we have access to the instance of the DeepThought service
+    // that was provided to the beforeAll() hook. Therefore we can test the generated answer
+    expect(DeepThought.answer).toBe(42);
+  }));
+
+  it("has calculated the answer within the expected time", inject(function(DeepThought) {
+    expect(DeepThought.runTimeMillennia).toBeLessThan(8000);
+  }));
+
+  it("has double checked the answer", inject(function(DeepThought) {
+    expect(DeepThought.absolutelySureItIsTheRightAnswer).toBe(true);
+  }));
+
+});
+
+

Sample project

+

See the angular-seed project for an example.

+ + diff --git a/1.6.6/docs/partials/misc.html b/1.6.6/docs/partials/misc.html new file mode 100644 index 000000000..cd62952fa --- /dev/null +++ b/1.6.6/docs/partials/misc.html @@ -0,0 +1,12 @@ + Improve this Doc + + +

Miscellaneous Links

+ + + diff --git a/1.6.6/docs/partials/misc/contribute.html b/1.6.6/docs/partials/misc/contribute.html new file mode 100644 index 000000000..79752ecc8 --- /dev/null +++ b/1.6.6/docs/partials/misc/contribute.html @@ -0,0 +1,149 @@ + Improve this Doc + + +

Building and Testing AngularJS

+

This document describes how to set up your development environment to build and test AngularJS, and +explains the basic mechanics of using git, node, yarn, grunt, and bower.

+

See the contributing guidelines +for how to contribute your own code to AngularJS.

+
    +
  1. Installing Dependencies
  2. +
  3. Forking Angular on Github
  4. +
  5. Building AngularJS
  6. +
  7. Running a Local Development Web Server
  8. +
  9. Running the Unit Test Suite
  10. +
  11. Running the End-to-end Test Suite
  12. +
+

Installing Dependencies

+

Before you can build AngularJS, you must install and configure the following dependencies on your +machine:

+
    +
  • Git: The Github Guide to +Installing Git is a good source of information.

    +
  • +
  • Node.js v6.x (LTS): We use Node to generate the documentation, run a +development web server, run tests, and generate distributable files. Depending on your system, +you can install Node either from source or as a pre-packaged bundle.

    +

    We recommend using nvm (or nvm-windows) +to manage and install Node.js, which makes it easy to change the version of Node.js per project.

    +
  • +
  • Yarn: We use Yarn to install our Node.js module dependencies (rather than using npm). +There are detailed installation instructions available at https://yarnpkg.com/en/docs/install.

    +
  • +
  • Java: We minify JavaScript using our +Closure Tools jar. Make sure you have Java (version 7 or higher) +installed and included in your PATH +variable.

    +
  • +
  • Grunt: We use Grunt as our build system. Install the grunt command-line tool globally with:

    +
    yarn global add grunt-cli
    +
    +
  • +
+

Forking Angular on Github

+

To create a Github account, follow the instructions here. +Afterwards, go ahead and fork the main AngularJS repository.

+

Building AngularJS

+

To build AngularJS, you clone the source code repository and use Grunt to generate the non-minified and +minified AngularJS files:

+
# Clone your Github repository:
+git clone https://github.com/<github username>/angular.js.git
+
+# Go to the AngularJS directory:
+cd angular.js
+
+# Add the main AngularJS repository as an upstream remote to your repository:
+git remote add upstream "https://github.com/angular/angular.js.git"
+
+# Install node.js dependencies:
+yarn install
+
+# Build AngularJS (which will install `bower` dependencies automatically):
+grunt package
+
+
+Note: If you're using Windows, you must use an elevated command prompt (right click, run as +Administrator). This is because grunt package creates some symbolic links. +
+ +
+Note: If you're using Linux, and yarn install fails with the message +'Please try running this command again as root/Administrator.', you may need to globally install grunt and bower: +
    +
  • sudo yarn global add grunt-cli
  • +
  • sudo yarn global add bower
  • +
+ +
+ +

The build output can be located under the build directory. It consists of the following files and +directories:

+
    +
  • angular-<version>.zip — The complete zip file, containing all of the release build +artifacts.

    +
  • +
  • angular.js — The non-minified angular script.

    +
  • +
  • angular.min.js — The minified angular script.

    +
  • +
  • angular-scenario.js — The angular End2End test runner.

    +
  • +
  • docs/ — A directory that contains all of the files needed to run docs.angularjs.org.

    +
  • +
  • docs/index.html — The main page for the documentation.

    +
  • +
  • docs/docs-scenario.html — The End2End test runner for the documentation application.

    +
  • +
+

Running a Local Development Web Server

+

To debug code and run end-to-end tests, it is often useful to have a local HTTP server. For this purpose, we have +made available a local web server based on Node.js.

+
    +
  1. To start the web server, run:

    +
    grunt webserver
    +
    +
  2. +
  3. To access the local server, enter the following URL into your web browser:

    +
    http://localhost:8000/
    +
    +

    By default, it serves the contents of the AngularJS project directory.

    +
  4. +
  5. To access the locally served docs, visit this URL:

    +
    http://localhost:8000/build/docs/
    +
    +
  6. +
+

Running the Unit Test Suite

+

We write unit and integration tests with Jasmine and execute them with Karma. To run all of the +tests once on Chrome run:

+
grunt test:unit
+
+

To run the tests on other browsers (Chrome, ChromeCanary, Firefox and Safari are pre-configured) use:

+
grunt test:unit --browsers=Chrome,Firefox
+
+

Note there should be no spaces between browsers. Chrome, Firefox is INVALID.

+

During development, however, it's more productive to continuously run unit tests every time the source or test files +change. To execute tests in this mode run:

+
    +
  1. To start the Karma server, capture Chrome browser and run unit tests, run:

    +
    grunt autotest
    +
    +
  2. +
  3. To capture more browsers, open this URL in the desired browser (URL might be different if you have multiple instance +of Karma running, read Karma's console output for the correct URL):

    +
    http://localhost:9876/
    +
    +
  4. +
  5. To re-run tests just change any source or test file.

    +
  6. +
+

To learn more about all of the preconfigured Grunt tasks run:

+
grunt --help
+
+

Running the End-to-end Test Suite

+

Angular's end to end tests are run with Protractor. Simply run:

+
grunt test:e2e
+
+

This will start the webserver and run the tests on Chrome.

+ + diff --git a/1.6.6/docs/partials/misc/downloading.html b/1.6.6/docs/partials/misc/downloading.html new file mode 100644 index 000000000..713051cad --- /dev/null +++ b/1.6.6/docs/partials/misc/downloading.html @@ -0,0 +1,124 @@ + Improve this Doc + + +

Including Angular scripts from the Google CDN

+

The quickest way to get started is to point your html <script> tag to a +Google CDN URL. +This way, you don't have to download anything or maintain a local copy.

+

There are two types of Angular script URLs you can point to, one for development and one for +production:

+
    +
  • angular.js — This is the human-readable, non-minified version, suitable for web development.
  • +
  • angular.min.js — This is the minified version, which we strongly suggest you use in +production.
  • +
+

To point your code to an angular script on the Google CDN server, use the following template. This +example points to the minified version 1.5.6:

+
<!doctype html>
+<html ng-app>
+  <head>
+    <title>My Angular App</title>
+    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>
+  </head>
+  <body>
+  </body>
+</html>
+
+
+ Note that only versions 1.0.1 and above are available on the CDN. If you need an earlier version + (which you shouldn't) you can use the https://code.angularjs.org/ URL, which was the previous + recommended location for hosted code source. If you're still using the Angular server you should + switch to the CDN version for even faster loading times. +
+ +


+

Downloading and hosting angular files locally

+

This option is for those who want to work with Angular offline, or those who want to host the +Angular files on their own servers.

+

If you navigate to https://code.angularjs.org/, you'll see a directory listing with all of the +Angular versions since we started releasing versioned build artifacts. Each directory contains all +artifacts that we released for a particular version. Download the version you want and have fun.

+
+ You can ignore directories starting with 2. (e.g. 2.0.0-beta.17) — they are not related to + AngularJS. They contain build artifacts from Angular 2 versions. +
+ +


+Each directory under https://code.angularjs.org/ includes a set of files that comprise the +corresponding version. All JavaScript files (except for angular-mocks which is only used during +development) come in two flavors — one suitable for development, the other for production:

+
    +
  • <filename>.js — These files are non-obfuscated, non-minified, and human-readable by opening +them in any editor or browser. In order to get better error messages during development, you +should always use these non-minified scripts.

    +
  • +
  • <filename>.min.js — These are minified and obfuscated versions, created with the +Closure compiler. Use these versions for +production in order to minimize the size of the application that is downloaded by your user's +browser.

    +
  • +
  • <filename>.min.js.map — These are +sourcemap files. You can +serve them alongside the .min.js files in order to be able to debug the minified code (e.g. on a +production deployment) more easily, but without impacting performance.

    +
  • +
+


+The set of files included in each version directory are:

+
    +
  • angular.zip — This is a zip archive that contains all of the files released for this Angular +version. Use this file to get everything in a single download.

    +
  • +
  • angular.js — The core Angular framework. This is all you need to get your Angular app +running.

    +
  • +
  • angular-csp.css — You only need this file if you are using +CSP (Content Security Policy). See +here for more info.

    +
  • +
  • angular-mocks.js — This file contains an implementation of mocks that makes testing angular +apps even easier. Your unit/integration test harness should load this file after angular.js is +loaded.

    +
  • +
  • angular-loader.js — Module loader for Angular modules. If you are loading multiple +script files containing Angular modules, you can load them asynchronously and in any order as long +as you load this file first. Often the contents of this file are copy&pasted into the index.html +to avoid even the initial request to angular-loader[.min].js. +See angular-seed for +an example of usage.

    +
  • +
  • Additional Angular modules: Optional modules with additional functionality. These files +should be loaded after the core angular[.min].js file:

    +
      +
    • angular-animate.js — Enable animation support. (API docs)
    • +
    • angular-aria.js — Make your apps accessible to users of + assistive technologies. (API docs)
    • +
    • angular-cookies.js — A convenient wrapper for reading and writing browser cookies. + (API docs)
    • +
    • angular-message-format.js — Enhanced support for pluralization and gender specific + messages in interpolated text. (API docs)
    • +
    • angular-messages.js — Enhanced support for displaying validation messages. + (API docs)
    • +
    • angular-parse-ext.js — Allow Unicode characters in identifiers inside Angular expressions. + (API docs)
    • +
    • angular-resource.js — Easy interaction with RESTful services. + (API docs)
    • +
    • angular-route.js — Routing and deep-linking services and directives for Angular apps. + (API docs)
    • +
    • angular-sanitize.js — Functionality to sanitize HTML. (API docs)
    • +
    • angular-touch.js — Touch events and other helpers for touch-enabled devices. +(API docs)
    • +
    +
  • +
+
    +
  • docs/ — This directory contains all the files that compose the https://docs.angularjs.org/ +documentation app. These files are handy to see the older versions of our docs, or even more +importantly, view the docs offline.

    +
  • +
  • i18n/ - This directory contains locale specific +ngLocale Angular modules to override the defaults defined in the main ng module.

    +
  • +
+ + diff --git a/1.6.6/docs/partials/misc/faq.html b/1.6.6/docs/partials/misc/faq.html new file mode 100644 index 000000000..83badc582 --- /dev/null +++ b/1.6.6/docs/partials/misc/faq.html @@ -0,0 +1,207 @@ + Improve this Doc + + +

FAQ

+

Questions

+

Why is this project called "AngularJS"? Why is the namespace called "ng"?

+

Because HTML has Angular brackets and "ng" sounds like "Angular".

+

Is AngularJS a library, framework, plugin or a browser extension?

+

AngularJS fits the definition of a framework the best, even though it's much more lightweight than +a typical framework and that's why many confuse it with a library.

+

AngularJS is 100% JavaScript, 100% client-side and compatible with both desktop and mobile browsers. +So it's definitely not a plugin or some other native browser extension.

+

What is the AngularJS versioning strategy?

+

In AngularJS we do not allow intentional breaking changes to appear in versions where only the "patch" +number changes. For example between 1.3.12 and 1.3.13 there can be no breaking changes. We do allow +breaking changes happen between "minor" number changes. For example between 1.3.15 and 1.4.0 there +are a number of breaking changes. That means AngularJS does not follow +semantic versioning (semver) where breaking changes are only +allowed when the "major" version changes.

+

We also allow breaking changes between beta releases of AngularJS. +For example between 1.4.0-beta.4 and 1.4.0-beta.5 there may be breaking changes. We try hard to minimize +these kinds of change only to those where there is a strong use case such as a strongly requested feature +improvement, a considerable simplification of the code, a measurable performance improvement, or a better +developer experience (especially with regard to upgrading to Angular).

+

When we are making a release we generate updates to the changelog directly from the commits. This +generated update contains a highlighted section that contains all the breaking changes that have been +extracted from the commits. We can quickly see in the new changelog exactly what commits contain breaking +changes and so can application developers when they are deciding whether to update to a new version of +Angular.

+

Features with non-breaking changes can also appear in the "patch" version, e.g. in version 1.6.3 there might +be a feature that is not available in 1.6.2.

+

Finally, deprecation of features might also appear in "minor" version updates. That means the features +will still work in this version, but sometimes must be activated specifically.

+

When are deprecated features removed from the library?

+

Most of the time we remove a deprecated feature in a next minor version bump. For example, the +preAssignBindingsEnabled $compileProvider method was defined in AngularJS 1.5.10, deprecated in 1.6 and +will be removed in 1.7.

+

In case of jqLite we apply a different strategy - we deprecate features that have an equivalent in jQuery that +is also deprecated but we only remove the feature once it's removed from jQuery to improve compatibility between +jqLite and jQuery. One such example is the bind method, deprecated in favor of on but unlikely to be removed +from jqLite any time soon.

+

What is the version compatibility between AngularJS main and optional modules?

+

AngularJS code is separated into a main module ("angular"), and a few different optional modules +("angular-animate", "angular-route" etc) that are dependant on the main module. +When a new AngularJS version is released, all modules are updated to the new version. +This means that the main module and the optional modules must always have the exact same version, +down to the patch number, otherwise your application might break.

+

Therefore you must always explicitly lock down your dependencies, for example in the package.json, +the following means that "angular" and "angular-animate" are always updated to the same version:

+
{
+  "angular": "~1.6.0",
+  "angular-animate": "~1.6.0"
+}
+
+

If you define exact versions, make sure core and optional modules are the same:

+
{
+  "angular": "1.6.3",
+  "angular-animate": "1.6.3"
+}
+
+

How does AngularJS ensure code quality and guard against regressions?

+

When adding new code to AngularJS, we have a very stringent commit policy:

+
    +
  • Every commit must pass all existing tests, contain tests for code changes, and update the documentation
  • +
  • Commit messages must be written in a specific manner that allows us to parse them and extract the changes +for release notes (see the contributing guidelines)
  • +
+

The AngularJS code base has a very large set of unit tests and end-to-end tests. This means that a breaking change will require one or more tests to be changed to allow the +tests to pass. So when a commit includes tests that are being removed or modified, this is a flag that the +code might include a breaking change. When reviewing the commit we can then decide whether there really is +a breaking change and if it is appropriate for the branch to which it is being merged. If so, then we +require that the commit message contains an appropriate breaking change message.

+

Additionally, commits are periodically synced to Google where we test it against applications using +the test suites of these applications. This allows us to catch regressions +quickly before a release. We've had a pretty good experience with this setup. Only bugs that affect features +not used at Google or without sufficient test coverage, have a chance of making it through.

+

Is AngularJS a templating system?

+

At the highest level, Angular does look like just another templating system. But there is one +important reason why the Angular templating system is different, that makes it very good fit for +application development: bidirectional data binding. The template is compiled in the browser and +the compilation step produces a live view. This means you, the developers, don't need to write +code to constantly sync the view with the model and the model with the view as in other +templating systems.

+

Do I need to worry about security holes in AngularJS?

+

Like any other technology, AngularJS is not impervious to attack. Angular does, however, provide +built-in protection from basic security holes, including cross-site scripting and HTML injection +attacks. AngularJS does round-trip escaping on all strings for you and even offers XSRF protection +for server-side communication.

+

AngularJS was designed to be compatible with other security measures like Content Security Policy +(CSP), HTTPS (SSL/TLS) and server-side authentication and authorization that greatly reduce the +possible attack vectors and we highly recommend their use.

+

Please read Security for more detailed information about securing Angular apps.

+

Can I download the source, build, and host the AngularJS environment locally?

+

Yes. See instructions in Downloading.

+

What browsers does AngularJS work with?

+

We run our extensive test suite against the following browsers: the latest versions of Chrome, +Firefox, Safari, and Safari for iOS, as well as Internet Explorer versions 9-11. See +Internet Explorer Compatibility for more details on supporting legacy IE browsers.

+

If a browser is untested, it doesn't mean it won't work. You can also expect browsers to work that +share a large part of their codebase with a browser we test, such as Opera 15 or newer +(uses the Blink engine), or the various Firefox derivatives.

+

What's AngularJS's performance like?

+

The startup time heavily depends on your network connection, state of the cache, browser used and +available hardware, but typically we measure bootstrap time in tens or hundreds of milliseconds.

+

The runtime performance will vary depending on the number and complexity of bindings on the page +as well as the speed of your backend (for apps that fetch data from the backend). For an +illustration, we typically build snappy apps with hundreds or thousands of active bindings.

+

How big is the angular.js file that I need to include?

+

The size of the file is ~50KB compressed and minified.

+

Can I use the open-source Closure Library with AngularJS?

+

Yes, you can use widgets from the Closure Library +in AngularJS.

+

Does AngularJS use the jQuery library?

+

Yes, AngularJS can use jQuery if it's present in your app when the +application is being bootstrapped. If jQuery is not present in your script path, AngularJS falls back +to its own implementation of the subset of jQuery that we call jQLite.

+

AngularJS 1.3 only supports jQuery 2.1 or above. jQuery 1.7 and newer might work correctly with AngularJS +but we don't guarantee that.

+

What is testability like in AngularJS?

+

Very testable and designed this way from the ground up. It has an integrated dependency injection +framework, provides mocks for many heavy dependencies (server-side communication). See +ngMock for details.

+

How can I learn more about AngularJS?

+

Watch the July 17, 2012 talk +"AngularJS Intro + Dependency Injection".

+

How is AngularJS licensed?

+

The MIT License.

+

Can I download and use the AngularJS logo artwork?

+

Yes! You can find design files in our github repository, under "angular.js/images/logo" +The logo design is licensed under a "Creative Commons Attribution-ShareAlike 3.0 Unported License". If you have some other use in mind, contact us.

+

How can I get some AngularJS schwag?

+

We often bring a few t-shirts and stickers to events where we're presenting. If you want to order your own, the folks who +make our schwag will be happy to do a custom run for you, based on our existing template. By using the design they have on file, +they'll waive the setup costs, and you can order any quantity you need.

+

Stickers +For orders of 250 stickers or more within Canada or the United States, contact Tom Witting (or anyone in sales) via email at tom@stickergiant.com, and tell him you want to order some AngularJS +stickers just like the ones in job #42711. You'll have to give them your own info for billing and shipping.

+

As long as the design stays exactly the same, StickerGiant will give you a reorder discount.

+

For a smaller order, or for other countries, we suggest downloading the logo artwork and making your own.

+

Common Pitfalls

+

The AngularJS support channel (#angularjs on Freenode) sees a number of recurring pitfalls that new users of AngularJS fall into. +This document aims to point them out before you discover them the hard way.

+

DOM Manipulation

+

Stop trying to use jQuery to modify the DOM in controllers. Really. +That includes adding elements, removing elements, retrieving their contents, showing and hiding them. +Use built-in directives, or write your own where necessary, to do your DOM manipulation. +See below about duplicating functionality.

+

If you're struggling to break the habit, consider removing jQuery from your app. +Really. AngularJS has the $http service and powerful directives that make it almost always unnecessary. +AngularJS's bundled jQLite has a handful of the features most commonly used in writing AngularJS directives, especially binding to events.

+

Trying to duplicate functionality that already exists

+

There's a good chance that your app isn't the first to require certain functionality. +There are a few pieces of AngularJS that are particularly likely to be reimplemented out of old habits.

+

ng-repeat

+

ng-repeat gets this a lot. +People try to use jQuery (see above) to add more elements to some container as they're fetched from the server. +No, bad dog. +This is what ng-repeat is for, and it does its job very well. +Store the data from the server in an array on your $scope, and bind it to the DOM with ng-repeat.

+

ng-show

+

ng-show gets this frequently too. +Conditionally showing and hiding things using jQuery is a common pattern in other apps, but AngularJS has a better way. +ng-show (and ng-hide) conditionally show and hide elements based on boolean expressions. +Describe the conditions for showing and hiding an element in terms of $scope variables:

+
<div ng-show="!loggedIn"><a href="#/login">Click here to log in</a></div>
+
+

Note also the counterpart ng-hide and similar ng-disabled. +Note especially the powerful ng-switch that should be used instead of several mutually exclusive ng-shows.

+

ng-class

+

ng-class is the last of the big three. +Conditionally applying classes to elements is another thing commonly done manually using jQuery. +AngularJS, of course, has a better way. +You can give ng-class a whitespace-separated set of class names, and then it's identical to ordinary class. +That's not very exciting, so there's a second syntax:

+
<div ng-class="{ errorClass: isError, warningClass: isWarning, okClass: !isError && !isWarning }">...</div>
+
+

Where you give ng-class an object, whose keys are CSS class names and whose values are conditional expressions using $scope variables. +The element will then have all the classes whose conditions are truthy, and none of those whose conditions are falsy.

+

Note also the handy ng-class-even and ng-class-odd, and the related though somewhat different ng-style.

+

$watch and $apply

+

AngularJS's two-way data binding is the root of all awesome in AngularJS. +However, it's not magic, and there are some situations where you need to give it a nudge in the right direction.

+

When you bind a value to an element in AngularJS using ng-model, ng-repeat, etc., AngularJS creates a $watch on that value. +Then whenever a value on a scope changes, all $watches observing that element are executed, and everything updates.

+

Sometimes, usually when you're writing a custom directive, you will have to define your own $watch on a scope value to make the directive react to changes.

+

On the flip side, sometimes you change a scope value in some code, but the app doesn't react to it. +AngularJS checks for scope variable changes after pieces of your code have finished running; for example, when ng-click calls a function on your scope, AngularJS will check for changes and react. +However, some code is outside of AngularJS and you'll have to call scope.$apply() yourself to trigger the update. +This is most commonly seen in event handlers in custom directives.

+

Combining ng-repeat with other directives

+

ng-repeat is extremely useful, one of the most powerful directives in AngularJS. +However the transformation it applies to the DOM is substantial. +Therefore applying other directives (such as ng-show, ng-controller and others) to the same element as ng-repeat generally leads to problems.

+

If you want to apply a directive to the whole repeat, wrap the repeat in a parent element and put it there. +If you want to apply a directive to each inner piece of the repeat, put it on a child of the element with ng-repeat.

+

$rootScope exists, but it can be used for evil

+

Scopes in AngularJS form a hierarchy, prototypically inheriting from a root scope at the top of the tree. +Usually this can be ignored, since most views have a controller, and therefore a scope, of their own.

+

Occasionally there are pieces of data that you want to make global to the whole app. +For these, you can inject $rootScope and set values on it like any other scope. +Since the scopes inherit from the root scope, these values will be available to the expressions attached to directives like ng-show just like values on your local $scope.

+

Of course, global state sucks and you should use $rootScope sparingly, like you would (hopefully) use with global variables in any language. +In particular, don't use it for code, only data. +If you're tempted to put a function on $rootScope, it's almost always better to put it in a service that can be injected where it's needed, and more easily tested.

+

Conversely, don't create a service whose only purpose in life is to store and return bits of data.

+ + diff --git a/1.6.6/docs/partials/misc/started.html b/1.6.6/docs/partials/misc/started.html new file mode 100644 index 000000000..e2749c3ca --- /dev/null +++ b/1.6.6/docs/partials/misc/started.html @@ -0,0 +1,36 @@ + Improve this Doc + + +

Getting Started

+

We want you to have an easy time while starting to use Angular. We've put together the following steps on your path to +becoming an Angular expert.

+
    +
  1. Read the conceptual overview.
    Understand Angular's vocabulary and how all the Angular +components work together.
  2. +
  3. Do the AngularJS Tutorial.
    Walk end-to-end through building an application complete with tests +on top of a node.js web server. Covers every major AngularJS feature and shows you how to set up your development +environment.
  4. +
  5. Download or clone the Seed App project template.
    Gives you a +starter app with a directory layout, test harness, and scripts to begin building your application.
  6. +
+

Further Steps

+

Watch Videos

+

If you haven’t had a chance to watch the videos from the homepage, please check out:

+ +

And visit our YouTube channel for more AngularJS video presentations and +tutorials.

+

Subscribe

+ +

Read more

+

The AngularJS documentation includes the Developer Guide covering concepts and the +API Reference for syntax and usage.

+ + diff --git a/1.6.6/docs/partials/tutorial.html b/1.6.6/docs/partials/tutorial.html new file mode 100644 index 000000000..2cb7e4dc2 --- /dev/null +++ b/1.6.6/docs/partials/tutorial.html @@ -0,0 +1,236 @@ + Improve this Doc + + +

PhoneCat Tutorial App

+

A great way to get introduced to AngularJS is to work through this tutorial, which walks you through +the construction of an Angular web app. The app you will build is a catalog that displays a list +of Android devices, lets you filter the list to see only devices that interest you, and then view +details for any device.

+

demo application running in the browser

+

Follow the tutorial to see how Angular makes browsers smarter — without the use of native +extensions or plug-ins:

+
    +
  • See examples of how to use client-side data binding to build dynamic views of data that change +immediately in response to user actions.
  • +
  • See how Angular keeps your views in sync with your data without the need for DOM manipulation.
  • +
  • Learn a better, easier way to test your web apps, with Karma and Protractor.
  • +
  • Learn how to use dependency injection and services to make common web tasks, such as getting data +into your app, easier.
  • +
+

When you finish the tutorial you will be able to:

+
    +
  • Create a dynamic application that works in all modern browsers.
  • +
  • Use data binding to wire up your data model to your views.
  • +
  • Create and run unit tests, with Karma.
  • +
  • Create and run end-to-end tests, with Protractor.
  • +
  • Move application logic out of the template and into components and controllers.
  • +
  • Get data from a server using Angular services.
  • +
  • Apply animations to your application, using the ngAnimate module.
  • +
  • Structure your Angular applications in a modular way that scales well for larger projects.
  • +
  • Identify resources for learning more about AngularJS.
  • +
+

The tutorial guides you through the entire process of building a simple application, including +writing and running unit and end-to-end tests. Experiments at the end of each step provide +suggestions for you to learn more about AngularJS and the application you are building.

+

You can go through the whole tutorial in a couple of hours or you may want to spend a pleasant day +really digging into it. If you're looking for a shorter introduction to AngularJS, check out the +Getting Started document.

+

Environment Setup

+

The rest of this page explains how you can set up your local machine for development. +If you just want to read the tutorial, you can go straight to the first step: +Step 0 - Bootstrapping.

+

Working with the Code

+

You can follow along with this tutorial and hack on the code in the comfort of your own computer. +This way, you can get hands-on practice of really writing Angular code and also on using the +recommended testing tools.

+

The tutorial relies on the use of the Git versioning system for source code management. +You don't need to know anything about Git to follow the tutorial other than how to install and run +a few git commands.

+

Install Git

+

You can download and install Git from http://git-scm.com/download. Once installed, you should have +access to the git command line tool. The main commands that you will need to use are:

+
    +
  • git clone ...: Clone a remote repository onto your local machine.
  • +
  • git checkout ...: Check out a particular branch or a tagged version of the code to hack on.
  • +
+

Download angular-phonecat

+

Clone the angular-phonecat repository located at GitHub by running the following +command:

+
git clone --depth=16 https://github.com/angular/angular-phonecat.git
+
+

This command creates an angular-phonecat sub-directory in your current directory.

+
+ The --depth=16 option tells Git to pull down only the last 16 commits. + This makes the download much smaller and faster. +
+ +

Change your current directory to angular-phonecat.

+
cd angular-phonecat
+
+

The tutorial instructions, from now on, assume you are running all commands from within the +angular-phonecat directory.

+

Install Node.js

+

If you want to run the preconfigured local web server and the test tools then you will also need +Node.js v4+.

+

You can download a Node.js installer for your operating system from https://nodejs.org/en/download/.

+

Check the version of Node.js that you have installed by running the following command:

+
node --version
+
+

In Debian based distributions, there might be a name clash with another utility called node. The +suggested solution is to also install the nodejs-legacy apt package, which renames node to +nodejs.

+
apt-get install nodejs-legacy npm
+nodejs --version
+npm --version
+
+
+ If you need to run different versions of Node.js in your local environment, consider installing + Node Version Manager (nvm) or Node Version Manager (nvm) for Windows. +
+ +

Once you have Node.js installed on your machine, you can download the tool dependencies by running:

+
npm install
+
+

This command reads angular-phonecat's package.json file and downloads the following tools into the +node_modules directory:

+
    +
  • Bower - client-side code package manager
  • +
  • Http-Server - simple local static web server
  • +
  • Karma - unit test runner
  • +
  • Protractor - end-to-end (E2E) test runner
  • +
+

Running npm install will also automatically use bower to download the AngularJS framework into the +app/bower_components directory.

+
+ Note the angular-phonecat project is setup to install and run these utilities via npm scripts. + This means that you do not have to have any of these utilities installed globally on your system + to follow the tutorial. See Installing Helper Tools + below for more information. +
+ +

The project is preconfigured with a number of npm helper scripts to make it easy to run the common +tasks that you will need while developing:

+
    +
  • npm start: Start a local development web server.
  • +
  • npm test: Start the Karma unit test runner.
  • +
  • npm run protractor: Run the Protractor end-to-end (E2E) tests.
  • +
  • npm run update-webdriver: Install the drivers needed by Protractor.
  • +
+

Install Helper Tools (optional)

+

The Bower, Http-Server, Karma and Protractor modules are also executables, which can be installed +globally and run directly from a terminal/command prompt. You don't need to do this to follow the +tutorial, but if you decide you do want to run them directly, you can install these modules globally +using, sudo npm install -g ....

+

For instance, to install the Bower command line executable you would do:

+
sudo npm install -g bower
+
+

(Omit the sudo if running on Windows)

+

Then you can run the bower tool directly, such as:

+
bower install
+
+

Running the Development Web Server

+

While Angular applications are purely client-side code, and it is possible to open them in a web +browser directly from the file system, it is better to serve them from an HTTP web server. In +particular, for security reasons, most modern browsers will not allow JavaScript to make server +requests if the page is loaded directly from the file system.

+

The angular-phonecat project is configured with a simple static web server for hosting the +application during development. Start the web server by running:

+
npm start
+
+

This will create a local web server that is listening to port 8000 on your local machine. +You can now browse to the application at http://localhost:8000/index.html.

+
+ To serve the web app on a different IP address or port, edit the "start" script within + package.json. You can use -a to set the address and -p to set the port. You also need to + update the baseUrl configuration property in e2e-test/protractor.conf.js. +
+ + +

Running Unit Tests

+

We use unit tests to ensure that the JavaScript code in our application is operating correctly. +Unit tests focus on testing small isolated parts of the application. The unit tests are kept in test +files (specs) side-by-side with the application code. This way it's easier to find them and keep +them up-to-date with the code under test. It also makes refactoring our app structure easier, since +tests are moved together with the source code.

+

The angular-phonecat project is configured to use Karma to run the unit tests for the +application. Start Karma by running:

+
npm test
+
+

This will start the Karma unit test runner. Karma will read the configuration file karma.conf.js, +located at the root of the project directory. This configuration file tells Karma to:

+
    +
  • Open up instances of the Chrome and Firefox browsers and connect them to Karma.
  • +
  • Execute all the unit tests in these browsers.
  • +
  • Report the results of these tests in the terminal/command line window.
  • +
  • Watch all the project's JavaScript files and re-run the tests whenever any of these change.
  • +
+

It is good to leave this running all the time, in the background, as it will give you immediate +feedback about whether your changes pass the unit tests while you are working on the code.

+

Running E2E Tests

+

We use E2E (end-to-end) tests to ensure that the application as a whole operates as expected. +E2E tests are designed to test the whole client-side application, in particular that the views are +displaying and behaving correctly. It does this by simulating real user interaction with the real +application running in the browser.

+

The E2E tests are kept in the e2e-tests directory.

+

The angular-phonecat project is configured to use Protractor to run the E2E tests for +the application. Protractor relies upon a set of drivers to allow it to interact with the browser. +You can install these drivers by running:

+
npm run update-webdriver
+
+
+ You don't have to manually run this command. Our npm scripts are configured so that it will be + automatically executed as part of the command that runs the E2E tests. +
+ +

Since Protractor works by interacting with a running application, we need to start our web server:

+
npm start
+
+

Then, in a separate terminal/command line window, we can run the Protractor test scripts against +the application by running:

+
npm run protractor
+
+

Protractor will read the configuration file at e2e-tests/protractor.conf.js. This configuration +file tells Protractor to:

+
    +
  • Open up a Chrome browser and connect it to the application.
  • +
  • Execute all the E2E tests in this browser.
  • +
  • Report the results of these tests in the terminal/command line window.
  • +
  • Close the browser and exit.
  • +
+

It is good to run the E2E tests whenever you make changes to the HTML views or want to check that +the application as a whole is executing correctly. It is very common to run E2E tests before pushing +a new commit of changes to a remote repository.

+

Common Issues

+


+Firewall / Proxy issues

+

Git and other tools, often use the git: protocol for accessing files in remote repositories. +Some firewall configurations are blocking git:// URLs, which leads to errors when trying to clone +repositories or download dependencies. (For example corporate firewalls are "notorious" for blocking +git:.)

+

If you run into this issue, you can force the use of https: instead, by running the following +command: git config --global url."https://".insteadOf git://

+


+Updating WebDriver takes too long

+

Running update-webdriver for the first time may take from several seconds up to a few minutes +(depending on your hardware and network connection). If you cancel the operation (e.g. using +Ctrl+C), you might get errors, when trying to run Protractor later.

+

In that case, you can delete the node_modules/ directory and run npm install again.

+


+Protractor dependencies

+

Under the hood, Protractor uses the Selenium Standalone Server, which in turn requires +the Java Development Kit (JDK) to be installed on your local machine. Check this by running +java -version from the command line.

+

If JDK is not already installed, you can download it here.

+


+Error running the web server

+

The web server is configured to use port 8000. If the port is already in use (for example by another +instance of a running web server) you will get an EADDRINUSE error. Make sure the port is +available, before running npm start.

+
+ +

Now that you have set up your local machine, let's get started with the tutorial: +Step 0 - Bootstrapping

+ + + diff --git a/1.6.6/docs/partials/tutorial/step_00.html b/1.6.6/docs/partials/tutorial/step_00.html new file mode 100644 index 000000000..02fde27a7 --- /dev/null +++ b/1.6.6/docs/partials/tutorial/step_00.html @@ -0,0 +1,139 @@ + Improve this Doc + + +
    + + +

    In this step of the tutorial, you will become familiar with the most important source code files of +the AngularJS Phonecat App. You will also learn how to start the development servers bundled with +angular-seed, and run the application in the browser.

    +

    Before you continue, make sure you have set up your development environment and installed all +necessary dependencies, as described in the Environment Setup +section.

    +

    In the angular-phonecat directory, run this command:

    +
    git checkout -f step-0
    +
    +

    This resets your workspace to step 0 of the tutorial app.

    +

    You must repeat this for every future step in the tutorial and change the number to the number of +the step you are on. This will cause any changes you made within your working directory to be lost.

    +

    If you haven't already done so, you need to install the dependencies by running:

    +
    npm install
    +
    +

    To see the app running in a browser, open a separate terminal/command line tab or window, then run +npm start to start the web server. Now, open a browser window for the app and navigate to +http://localhost:8000/index.html.

    +

    Note that if you already ran the master branch app prior to checking out step-0, you may see the +cached master version of the app in your browser window at this point. Just hit refresh to re-load +the page.

    +

    You can now see the page in your browser. It's not very exciting, but that's OK.

    +

    The HTML page that displays "Nothing here yet!" was constructed with the HTML code shown below. +The code contains some key Angular elements that we will need as we progress.

    +

    app/index.html:

    +
    <!doctype html>
    +<html lang="en" ng-app>
    +  <head>
    +    <meta charset="utf-8">
    +    <title>My HTML File</title>
    +    <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
    +    <script src="bower_components/angular/angular.js"></script>
    +  </head>
    +  <body>
    +
    +    <p>Nothing here {{'yet' + '!'}}</p>
    +
    +  </body>
    +</html>
    +
    +

    What is the code doing?

    +


    +ng-app attribute:

    +
    <html ng-app>
    +
    +

    The ng-app attribute represents an Angular directive, named ngApp (Angular uses kebab-case for +its custom attributes and camelCase for the corresponding directives which implement them). This +directive is used to flag the HTML element that Angular should consider to be the root element of +our application. This gives application developers the freedom to tell Angular if the entire HTML +page or only a portion of it should be treated as the AngularJS application.

    +

    For more info on ngApp, check out the API Reference.

    +


    +angular.js script tag:

    +
    <script src="bower_components/angular/angular.js"></script>
    +
    +

    This code downloads the angular.js script which registers a callback that will be executed by the +browser when the containing HTML page is fully downloaded. When the callback is executed, Angular +looks for the ngApp directive. If Angular finds the directive, it will bootstrap the +application with the root of the application DOM being the element on which the ngApp directive +was defined.

    +

    For more info on bootstrapping your app, checkout the Bootstrap section of the +Developer Guide.

    +


    +Double-curly binding with an expression:

    +
    Nothing here {{'yet' + '!'}}
    +
    +

    This line demonstrates two core features of Angular's templating capabilities:

    +
      +
    • A binding, denoted by double-curlies: {{ }}
    • +
    • A simple expression used in this binding: 'yet' + '!'
    • +
    +

    The binding tells Angular that it should evaluate an expression and insert the result into the DOM +in place of the binding. As we will see in the next steps, rather than a one-time insert, a binding +will result in efficient continuous updates whenever the result of the expression evaluation +changes.

    +

    Angular expressions are JavaScript-like code snippets that are evaluated by +Angular in the context of the current model scope, rather than within the scope of the global +context (window).

    +

    As expected, once this template is processed by Angular, the HTML page contains the text:

    +
    Nothing here yet!
    +
    +

    Bootstrapping Angular Applications

    +

    Bootstrapping Angular applications automatically using the ngApp directive is very easy and +suitable for most cases. In advanced cases, such as when using script loaders, you can use the +imperative/manual way to bootstrap the application.

    +

    There are 3 important things that happen during the bootstrap phase:

    +
      +
    1. The injector that will be used for dependency injection is created.

      +
    2. +
    3. The injector will then create the root scope that will become the context +for the model of our application.

      +
    4. +
    5. Angular will then "compile" the DOM starting at the ngApp root element, processing any +directives and bindings found along the way.

      +
    6. +
    +

    Once an application is bootstrapped, it will then wait for incoming browser events (such as mouse +clicks, key presses or incoming HTTP responses) that might change the model. Once such an event +occurs, Angular detects if it caused any model changes and if changes are found, Angular will +reflect them in the view by updating all of the affected bindings.

    +

    The structure of our application is currently very simple. The template contains just one directive +and one static binding, and our model is empty. That will soon change!

    +

    +

    What are all these files in my working directory?

    +

    Most of the files in your working directory come from the angular-seed project, +which is typically used to bootstrap new AngularJS projects. The seed project is pre-configured to +install the AngularJS framework (via bower into the app/bower_components/ directory) and tools +for developing and testing a typical web application (via npm).

    +

    For the purposes of this tutorial, we modified the angular-seed with the following changes:

    +
      +
    • Removed the example app.
    • +
    • Removed unused dependencies.
    • +
    • Added phone images to app/img/phones/.
    • +
    • Added phone data files (JSON) to app/phones/.
    • +
    • Added a dependency on Bootstrap in the bower.json file.
    • +
    +

    Experiments

    +
    + +
      +
    • Try adding a new expression to index.html that will do some math:

      +
      <p>1 + 2 = {{1 + 2}}</p>
      +
      +
    • +
    +

    Summary

    +

    Now let's go to step 1 and add some content to the web app.

    +
      + + + + + diff --git a/1.6.6/docs/partials/tutorial/step_01.html b/1.6.6/docs/partials/tutorial/step_01.html new file mode 100644 index 000000000..d97d24c9d --- /dev/null +++ b/1.6.6/docs/partials/tutorial/step_01.html @@ -0,0 +1,47 @@ + Improve this Doc + + +
        + + +

        In order to illustrate how Angular enhances standard HTML, you will create a purely static HTML +page and then examine how we can turn this HTML code into a template that Angular will use to +dynamically display the same result with any set of data.

        +

        In this step you will add some basic information about two cell phones to an HTML page.

        +
          +
        • The page now contains a list with information about two phones.
        • +
        +
        + +


        +app/index.html:

        +
        <ul>
        +  <li>
        +    <span>Nexus S</span>
        +    <p>
        +      Fast just got faster with Nexus S.
        +    </p>
        +  </li>
        +  <li>
        +    <span>Motorola XOOM™ with Wi-Fi</span>
        +    <p>
        +      The Next, Next Generation tablet.
        +    </p>
        +  </li>
        +</ul>
        +
        +

        Experiments

        +
        + +
          +
        • Try adding more static HTML to index.html. For example:

          +
          <p>Total number of phones: 2</p>
          +
          +
        • +
        +

        Summary

        +

        This addition to your app uses static HTML to display the list. Now, let's go to +step 2 to learn how to use Angular to dynamically generate the same list.

        +
          + + diff --git a/1.6.6/docs/partials/tutorial/step_02.html b/1.6.6/docs/partials/tutorial/step_02.html new file mode 100644 index 000000000..8f9ef1c65 --- /dev/null +++ b/1.6.6/docs/partials/tutorial/step_02.html @@ -0,0 +1,285 @@ + Improve this Doc + + +
            + + +

            Now, it's time to make the web page dynamic — with AngularJS. We will also add a test that verifies +the code for the controller we are going to add.

            +

            There are many ways to structure the code for an application. For Angular applications, we encourage +the use of the Model-View-Controller (MVC) design pattern to decouple the code and +separate concerns. With that in mind, let's use a little Angular and JavaScript to add models, +views, and controllers to our app.

            +
              +
            • The list of three phones is now generated dynamically from data
            • +
            +
            + + +

            View and Template

            +

            In Angular, the view is a projection of the model through the HTML template. This means that +whenever the model changes, Angular refreshes the appropriate binding points, which updates the +view.

            +

            The view is constructed by Angular from this template.

            +


            +app/index.html:

            +
            <html ng-app="phonecatApp">
            +<head>
            +  ...
            +  <script src="bower_components/angular/angular.js"></script>
            +  <script src="app.js"></script>
            +</head>
            +<body ng-controller="PhoneListController">
            +
            +  <ul>
            +    <li ng-repeat="phone in phones">
            +      <span>{{phone.name}}</span>
            +      <p>{{phone.snippet}}</p>
            +    </li>
            +  </ul>
            +
            +</body>
            +</html>
            +
            +

            We replaced the hard-coded phone list with the ngRepeat directive and two +Angular expressions:

            +
              +
            • The ng-repeat="phone in phones" attribute on the <li> tag is an Angular repeater directive. +The repeater tells Angular to create a <li> element for each phone in the list, using the <li> +tag as the template.
            • +
            • The expressions wrapped in curly braces ({{phone.name}} and {{phone.snippet}}) will be +replaced by the values of the expressions.
            • +
            +

            We have also added a new directive, called ngController, which attaches a +PhoneListController controller to the <body> tag. At this point:

            +
              +
            • PhoneListController is in charge of the DOM sub-tree under (and including) the <body> element.
            • +
            • The expressions in curly braces ({{phone.name}} and {{phone.snippet}}) denote bindings, which +are referring to our application model, which is set up in our PhoneListController controller.
            • +
            +
            + Note: We have specified an Angular Module to load using + ng-app="phonecatApp", where phonecatApp is the name of our module. This module will contain + the PhoneListController. +
            + + +

            Model and Controller

            +

            The data model (a simple array of phones in object literal notation) is now instantiated within +the PhoneListController controller. The controller is simply a constructor function that +takes a $scope parameter:

            +


            +app/app.js:

            +
            // Define the `phonecatApp` module
            +var phonecatApp = angular.module('phonecatApp', []);
            +
            +// Define the `PhoneListController` controller on the `phonecatApp` module
            +phonecatApp.controller('PhoneListController', function PhoneListController($scope) {
            +  $scope.phones = [
            +    {
            +      name: 'Nexus S',
            +      snippet: 'Fast just got faster with Nexus S.'
            +    }, {
            +      name: 'Motorola XOOM™ with Wi-Fi',
            +      snippet: 'The Next, Next Generation tablet.'
            +    }, {
            +      name: 'MOTOROLA XOOM™',
            +      snippet: 'The Next, Next Generation tablet.'
            +    }
            +  ];
            +});
            +
            +

            Here we declared a controller called PhoneListController and registered it in an Angular module, +phonecatApp. Notice that our ngApp directive (on the <html> tag) now specifies the +phonecatApp module name as the module to load when bootstrapping the application.

            +

            Although the controller is not yet doing very much, it plays a crucial role. By providing context +for our data model, the controller allows us to establish data-binding between the model and the +view. We connected the dots between the presentation, data, and logic components as follows:

            +
              +
            • The ngController directive, located on the <body> tag, references the name +of our controller, PhoneListController (located in the JavaScript file app.js).

              +
            • +
            • The PhoneListController controller attaches the phone data to the $scope that was injected +into our controller function. This scope is a prototypal descendant of the root scope that was +created when the application was defined. This controller scope is available to all bindings +located within the <body ng-controller="PhoneListController"> tag.

              +
            • +
            +

            Scope

            +

            The concept of a scope in Angular is crucial. A scope can be seen as the glue which allows the +template, model, and controller to work together. Angular uses scopes, along with the information +contained in the template, data model, and controller, to keep models and views separate, but in +sync. Any changes made to the model are reflected in the view; any changes that occur in the view +are reflected in the model.

            +

            To learn more about Angular scopes, see the angular scope documentation.

            +

            +
            +

            + Angular scopes prototypically inherit from their parent scope, all the way up to the root scope + of the application. As a result, assigning values directly on the scope makes it easy to share + data across different parts of the page and create interactive applications. + While this approach works for prototypes and smaller applications, it quickly leads to tight + coupling and difficulty to reason about changes in our data model. +

            +

            + In the next step, we will learn how to better organize our code, by "packaging" related pieces + of application and presentation logic into isolated, reusable entities, called components. +

            +
            + + +

            Testing

            +

            The "Angular way" of separating controller from the view, makes it easy to test code as it is being +developed. If our controller were available on the global namespace, we could simply instantiate it +with a mock scope object:

            +


            +
            describe('PhoneListController', function() {
            +
            +  it('should create a `phones` model with 3 phones', function() {
            +    var scope = {};
            +    var ctrl = new PhoneListController(scope);
            +
            +    expect(scope.phones.length).toBe(3);
            +  });
            +
            +});
            +
            +

            The test instantiates PhoneListController and verifies that the phones array property on the +scope contains three records. This example demonstrates how easy it is to create a unit test for +code in Angular. Since testing is such a critical part of software development, we make it easy to +create tests in Angular so that developers are encouraged to write them.

            +

            Testing non-global Controllers

            +

            In practice, you will not want to have your controller functions in the global namespace. Instead, +you can see that we have registered it via a constructor function on the phonecatApp module.

            +

            In this case Angular provides a service, $controller, which will retrieve your controller by name. +Here is the same test using $controller:

            +


            +app/app.spec.js:

            +
            describe('PhoneListController', function() {
            +
            +  beforeEach(module('phonecatApp'));
            +
            +  it('should create a `phones` model with 3 phones', inject(function($controller) {
            +    var scope = {};
            +    var ctrl = $controller('PhoneListController', {$scope: scope});
            +
            +    expect(scope.phones.length).toBe(3);
            +  }));
            +
            +});
            +
            +
              +
            • Before each test we tell Angular to load the phonecatApp module.
            • +
            • We ask Angular to inject the $controller service into our test function.
            • +
            • We use $controller to create an instance of the PhoneListController.
            • +
            • With this instance, we verify that the phones array property on the scope contains three records.
            • +
            +
            +

            A note on file naming:

            +

            + As already mentioned in the introduction, the unit test files + (specs) are kept side-by-side with the application code. We name our specs after the file + containing the code to be tested plus a specific suffix to distinguish them from files + containing application code. Note that test files are still plain JavaScript files, so they have + a .js file extension. +

            +

            + In this tutorial, we are using the .spec suffix. So the test file corresponding to + something.js would be called something.spec.js. + (Another common convention is to use a _spec or _test suffix.) +

            +
            + + +

            Writing and Running Tests

            +

            Many Angular developers prefer the syntax of +Jasmine's Behavior-Driven Development (BDD) framework, when writing tests. Although +Angular does not require you to use Jasmine, we wrote all of the tests in this tutorial in Jasmine +v2.4. You can learn about Jasmine on the Jasmine home page and at the +Jasmine docs.

            +

            The angular-seed project is pre-configured to run unit tests using Karma, but you will need +to ensure that Karma and its necessary plugins are installed. You can do this by running +npm install.

            +

            To run the tests, and then watch the files for changes execute: npm test

            +
              +
            • Karma will start new instances of Chrome and Firefox browsers automatically. Just ignore them and +let them run in the background. Karma will use these browsers for test execution.
            • +
            • If you only have one of the browsers installed on your machine (either Chrome or Firefox), make +sure to update the karma configuration file (karma.conf.js), before running the test. Locate the +configuration file in the root directory and update the browsers property.

              +

              E.g. if you only have Chrome installed:

              +
              +  ...
              +  browsers: ['Chrome'],
              +  ...
              +
              +
            • +
            • You should see the following or similar output in the terminal:

              +
              +  INFO [karma]: Karma server started at http://localhost:9876/
              +  INFO [launcher]: Starting browser Chrome
              +  INFO [Chrome 49.0]: Connected on socket ... with id ...
              +  Chrome 49.0: Executed 1 of 1 SUCCESS (0.05 secs / 0.04 secs)
              +
              + +

              Yay! The test passed! Or not...

              +
            • +
            • To rerun the tests, just change any of the source or test .js files. Karma will notice the change +and will rerun the tests for you. Now isn't that sweet?

              +
            • +
            +
            + Make sure you don't minimize the browser that Karma opened. On some OS, memory assigned to a + minimized browser is limited, which results in your karma tests running extremely slow. +
            + + +

            Experiments

            +
            + +
              +
            • Add another binding to index.html. For example:

              +
              <p>Total number of phones: {{phones.length}}</p>
              +
              +
            • +
            • Create a new model property in the controller and bind to it from the template. For example:

              +
              $scope.name = 'world';
              +
              +

              Then add a new binding to index.html:

              +
              <p>Hello, {{name}}!</p>
              +
              +

              Refresh your browser and verify that it says 'Hello, world!'.

              +
            • +
            • Update the unit test for the controller in app/app.spec.js to reflect the previous change. +For example by adding:

              +
              expect(scope.name).toBe('world');
              +
              +
            • +
            • Create a repeater in index.html that constructs a simple table:

              +
              <table>
              +  <tr><th>Row number</th></tr>
              +  <tr ng-repeat="i in [0, 1, 2, 3, 4, 5, 6, 7]"><td>{{i}}</td></tr>
              +</table>
              +
              +

              Now, make the list 1-based by incrementing i by one in the binding:

              +
              <table>
              +  <tr><th>Row number</th></tr>
              +  <tr ng-repeat="i in [0, 1, 2, 3, 4, 5, 6, 7]"><td>{{i+1}}</td></tr>
              +</table>
              +
              +

              Extra points: Try and make an 8x8 table using an additional ng-repeat.

              +
            • +
            • Make the unit test fail by changing expect(scope.phones.length).toBe(3) to instead use +toBe(4).

              +
            • +
            +

            Summary

            +

            We now have a dynamic application which separates models, views, and controllers, and we are testing +as we go. Let's go to step 3 to learn how to improve our application's architecture, +by utilizing components.

            +
              + + + + + diff --git a/1.6.6/docs/partials/tutorial/step_03.html b/1.6.6/docs/partials/tutorial/step_03.html new file mode 100644 index 000000000..2bd966325 --- /dev/null +++ b/1.6.6/docs/partials/tutorial/step_03.html @@ -0,0 +1,235 @@ + Improve this Doc + + +
                + + +

                In the previous step, we saw how a controller and a template worked together to convert a static +HTML page into a dynamic view. This is a very common pattern in Single-Page Applications in general +(and Angular applications in particular):

                +
                  +
                • Instead of creating a static HTML page on the server, the client-side code "takes over" and +interacts dynamically with the view, updating it instantly to reflect changes in model data or +state, usually as a result of user interaction (we'll see an example shortly in +step 5).
                • +
                +

                The template (the part of the view containing the bindings and presentation logic) acts as a +blueprint for how our data should be organized and presented to the user. +The controller provides the context in which the bindings are evaluated and applies behavior +and logic to our template.

                +

                There are still a couple of areas we can do better:

                +
                  +
                1. What if we want to reuse the same functionality in a different part of our application ?
                  +We would need to duplicate the whole template (including the controller). This is error-prone and +hurts maintainability.
                2. +
                3. The scope, that glues our controller and template together into a dynamic view, is not isolated +from other parts of the page. What this means is that a random, unrelated change in a different +part of the page (e.g. a property-name conflict) could have unexpected and hard-to-debug side +effects on our view.

                  +

                  (OK, this might not be a real concern in our minimal example, but it is a valid concern for + bigger, real-world applications.)

                  +
                4. +
                +
                + + +

                Components to the rescue!

                +

                Since this combination (template + controller) is such a common and recurring pattern, Angular +provides an easy and concise way to combine them together into reusable and isolated entities, +known as components. +Additionally, Angular will create a so called isolate scope for each instance of our component, +which means no prototypal inheritance and no risk of our component affecting other parts of the +application or vice versa.

                +
                +

                + Since this is an introductory tutorial, we are not going to dive deep into all features provided + by Angular components. You can read more about components and their usage patterns in the + Components section of the Developer Guide. +

                +

                + In fact, one could think of components as an opinionated and stripped-down version of their more + complex and verbose (but powerful) siblings, directives, which are Angular's way of teaching + HTML new tricks. You can read all about them in the Directives section of the + Developer Guide. +

                +

                + (Note: Directives are an advanced topic, so you might want to postpone studying them, until + you have mastered the basics.) +

                +
                + +

                To create a component, we use the .component() method of an +Angular module. We must provide the name of the component and the Component +Definition Object (CDO for short).

                +

                Remember that (since components are also directives) the name of the component is in camelCase +(e.g. myAwesomeComponent), but we will use kebab-case (e.g. my-awesome-component) when +referring to it in our HTML. (See here for a description of different case styles.)

                +

                In its simplest form, the CDO will just contain a template and a controller. (We can actually omit +the controller and Angular will create a dummy controller for us. This is useful for simple +"presentational" components, that don't attach any behavior to the template.)

                +

                Let's see an example:

                +
                angular.
                +  module('myApp').
                +  component('greetUser', {
                +    template: 'Hello, {{$ctrl.user}}!',
                +    controller: function GreetUserController() {
                +      this.user = 'world';
                +    }
                +  });
                +
                +

                Now, every time we include <greet-user></greet-user> in our view, Angular will expand it into a +DOM sub-tree constructed using the provided template and managed by an instance of the specified +controller.

                +

                But wait, where did that $ctrl come from and what does it refer to ?

                +

                For reasons already mentioned (and for other reasons that are out of the scope of this tutorial), it +is considered a good practice to avoid using the scope directly. We can (and should) use our +controller instance; i.e. assign our data and methods on properties of our controller (the "this" +inside the controller constructor), instead of directly to the scope.

                +

                From the template, we can refer to our controller instance using an alias. This way, the context of +evaluation for our expressions is even more clear. By default, components use $ctrl as the +controller alias, but we can override it, should the need arise.

                +

                There are more options available, so make sure you check out the +API Reference, before using .component() in your own +applications.

                +

                Using Components

                +

                Now that we know how to create components, let's refactor the HTML page to make use of our newly +acquired skill.

                +


                +app/index.html:

                +
                <html ng-app="phonecatApp">
                +<head>
                +  ...
                +  <script src="bower_components/angular/angular.js"></script>
                +  <script src="app.js"></script>
                +  <script src="phone-list.component.js"></script>
                +</head>
                +<body>
                +
                +  <!-- Use a custom component to render a list of phones -->
                +  <phone-list></phone-list>
                +
                +</body>
                +</html>
                +
                +


                +app/app.js:

                +
                // Define the `phonecatApp` module
                +angular.module('phonecatApp', []);
                +
                +


                +app/phone-list.component.js:

                +
                // Register `phoneList` component, along with its associated controller and template
                +angular.
                +  module('phonecatApp').
                +  component('phoneList', {
                +    template:
                +        '<ul>' +
                +          '<li ng-repeat="phone in $ctrl.phones">' +
                +            '<span>{{phone.name}}</span>' +
                +            '<p>{{phone.snippet}}</p>' +
                +          '</li>' +
                +        '</ul>',
                +    controller: function PhoneListController() {
                +      this.phones = [
                +        {
                +          name: 'Nexus S',
                +          snippet: 'Fast just got faster with Nexus S.'
                +        }, {
                +          name: 'Motorola XOOM™ with Wi-Fi',
                +          snippet: 'The Next, Next Generation tablet.'
                +        }, {
                +          name: 'MOTOROLA XOOM™',
                +          snippet: 'The Next, Next Generation tablet.'
                +        }
                +      ];
                +    }
                +  });
                +
                +

                Voilà! The resulting output should look the same, but let's see what we have gained:

                +
                  +
                • Our phone list is reusable. Just drop <phone-list></phone-list> anywhere in the page to get a +list of phones.
                • +
                • Our main view (index.html) is cleaner and more declarative. Just by looking at it, we know there +is a list of phones. We are not bothered with implementation details.
                • +
                • Our component is isolated and safe from "external influences". Likewise, we don't have to worry, +that we might accidentally break something in some other part of the application. What happens +inside our component, stays inside our component.
                • +
                • It's easier to test our component in isolation.
                • +
                +

                +
                +

                A note on file naming:

                +

                + It is a good practice to distinguish different types of entities by suffix. In this tutorial, we + are using the .component suffix for components, so the definition of a someComponent + component would be in a file named some-component.component.js. +

                +
                + + +

                Testing

                +

                Although we have combined our controller with a template into a component, we still can (and should) +unit test the controller separately, since this is where our application logic and data reside.

                +

                In order to retrieve and instantiate a component's controller, Angular provides the +$componentController service.

                +
                + The $controller service that we used in the previous step can only instantiate controllers that + were registered by name, using the .controller() method. We could have registered our component + controller this way, too, if we wanted to. Instead, we chose to define it inline — inside + the CDO — to keep things localized, but either way works equally well. +
                + +


                +app/phone-list.component.spec.js:

                +
                describe('phoneList', function() {
                +
                +  // Load the module that contains the `phoneList` component before each test
                +  beforeEach(module('phonecatApp'));
                +
                +  // Test the controller
                +  describe('PhoneListController', function() {
                +
                +    it('should create a `phones` model with 3 phones', inject(function($componentController) {
                +      var ctrl = $componentController('phoneList');
                +
                +      expect(ctrl.phones.length).toBe(3);
                +    }));
                +
                +  });
                +
                +});
                +
                +

                The test retrieves the controller associated with the phoneList component, instantiates it and +verifies that the phones array property on it contains three records. Note that the data is now on +the controller instance itself, not on a scope.

                +

                Running Tests

                +

                Same as before, execute npm test to run the tests and then watch the files for changes.

                +

                Experiments

                +
                + +
                  +
                • Try the experiments from the previous step, this time on the phoneList component.

                  +
                • +
                • Add a couple more phone lists on the page, by just adding more <phone-list></phone-list> +elements in index.html. Now add another binding to the phoneList component's template:

                  +
                  template:
                  +    '<p>Total number of phones: {{$ctrl.phones.length}}</p>' +
                  +    '<ul>' +
                  +    ...
                  +
                  +

                  Reload the page and watch the new "feature" propagate to all phone lists. In real-world +applications, where the phone lists could appear on several different pages, being able to change +or add something in one place (e.g. a component's template) and have that change propagate +throughout the application, is a big win.

                  +
                • +
                +

                Summary

                +

                You have learned how to organize your application and presentation logic into isolated, reusable +components. Let's go to step 4 to learn how to organize our code in directories and +files, so it remains easy to locate as our application grows.

                +
                  + + + + + diff --git a/1.6.6/docs/partials/tutorial/step_04.html b/1.6.6/docs/partials/tutorial/step_04.html new file mode 100644 index 000000000..dccab38be --- /dev/null +++ b/1.6.6/docs/partials/tutorial/step_04.html @@ -0,0 +1,252 @@ + Improve this Doc + + +
                    + + +

                    In this step, we will not be adding any new functionality to our application. Instead, we are going +to take a step back, refactor our codebase and move files and code around, in order to make our +application more easily expandable and maintainable.

                    +

                    In the previous step, we saw how to architect our application to be modular and testable. What's +equally important though, is organizing our codebase in a way that makes it easy (both for us and +other developers on our team) to navigate through the code and quickly locate the pieces that are +relevant to a specific feature or section of the application.

                    +

                    To that end, we will explain why and how we:

                    +
                      +
                    • Put each entity in its own file.
                    • +
                    • Organize our code by feature area, instead of by function.
                    • +
                    • Split our code into modules that other modules can depend on.
                    • +
                    +
                    + We will keep it short, not going into great detail on every good practice and convention. These + principles are explained in great detail in the Angular Style Guide, which also + contains many more techniques for effectively organizing Angular codebases. +
                    + + +
                    + + +

                    One Feature per File

                    +

                    It might be tempting, for the sake of simplicity, to put everything in one file, or have one file +per type; e.g. all controllers in one file, all components in another file, all services in a third +file, and so on. +This might seem to work well in the beginning, but as our application grows it becomes a burden to +maintain. As we add more and more features, our files will get bigger and bigger and it will be +difficult to navigate and find the code we are looking for.

                    +

                    Instead we should put each feature/entity in its own file. Each stand-alone controller will be +defined in its own file, each component will be defined in its own file, etc.

                    +

                    Luckily, we don't need to change anything with respect to that guideline in our code, since we have +already defined our phoneList component in its own phone-list.component.js file. Good job!

                    +

                    We will keep this in mind though, as we add more features.

                    +

                    Organizing by Feature

                    +

                    So, now that we learned we should put everything in its own file, our app/ directory will soon be +full with dozens of files and specs (remember we keep our unit test files next to the corresponding +source code files). What's more important, logically related files will not be grouped together; it +will be really difficult to locate all files related to a specific section of the application and +make a change or fix a bug.

                    +

                    So, what shall we do?

                    +

                    Well, we are going to group our files into directories by feature. For example, since we have a +section in our application that lists phones, we will put all related files into a phone-list/ +directory under app/. We are soon to find out that certain features are used across different +parts of the application. We will put those inside app/core/.

                    +
                    +

                    + Other typical names for our core directory are shared, common and components. The last + one is kind of misleading though, as it will contain other things than components as well. +

                    +

                    + (This is mostly a relic of the past, when "components" just meant the generic building blocks of + an application.) +

                    +
                    + +

                    Based on what we have discussed so far, here is our directory/file layout for the phoneList +"feature":

                    +
                    app/
                    +  phone-list/
                    +    phone-list.component.js
                    +    phone-list.component.spec.js
                    +  app.js
                    +
                    +

                    Using Modules

                    +

                    As previously mentioned, one of the benefits of having a modular architecture is code reuse — +not only inside the same application, but across applications too. There is one final step in making +this code reuse frictionless:

                    +
                      +
                    • Each feature/section should declare its own module and all related entities should register +themselves on that module.
                    • +
                    +

                    Let's take the phoneList feature as an example. Previously, the phoneList component would +register itself on the phonecatApp module:

                    +
                    angular.
                    +  module('phonecatApp').
                    +  component('phoneList', ...);
                    +
                    +

                    Similarly, the accompanying spec file loads the phonecatApp module before each test (because +that's where our component is registered). Now, imagine that we need a list of phones on another +project that we are working on. Thanks to our modular architecture, we don't have to reinvent the +wheel; we simply copy the phone-list/ directory on our other project and add the necessary script +tags in our index.html file and we are done, right?

                    +

                    Well, not so fast. The new project doesn't know anything about a phonecatApp module. So, we would +have to replace all references to phonecatApp with the name of this project's main module. As you +can imagine this is both laborious and error-prone.

                    +

                    Yeah, you guessed it: There is a better way!

                    +

                    Each feature/section, will declare its own module and have all related entities registered there. +The main module (phonecatApp) will declare a dependency on each feature/section module. Now, +all it takes to reuse the same code on a new project is copying the feature directory over and +adding the feature module as a dependency in the new project's main module.

                    +

                    Here is what our phoneList feature will look like after this change:

                    +


                    +/:

                    +
                    app/
                    +  phone-list/
                    +    phone-list.module.js
                    +    phone-list.component.js
                    +    phone-list.component.spec.js
                    +  app.module.js
                    +
                    +


                    +app/phone-list/phone-list.module.js:

                    +
                    // Define the `phoneList` module
                    +angular.module('phoneList', []);
                    +
                    +


                    +app/phone-list/phone-list.component.js:

                    +
                    // Register the `phoneList` component on the `phoneList` module,
                    +angular.
                    +  module('phoneList').
                    +  component('phoneList', {...});
                    +
                    +


                    +app/app.module.js:
                    +(since app/app.js now only contains the main module declaration, we gave it a .module suffix)

                    +
                    // Define the `phonecatApp` module
                    +angular.module('phonecatApp', [
                    +  // ...which depends on the `phoneList` module
                    +  'phoneList'
                    +]);
                    +
                    +

                    By passing phoneList inside the dependencies array when defining the phonecatApp module, Angular +will make all entities registered on phoneList available on phonecatApp as well.

                    +
                    +

                    + Don't forget to also update your index.html adding a <script> tag for each JavaScript file + we have created. This might seem tedious, but is totally worth it. +

                    +

                    + In a production-ready application, you would concatenate and minify all your JavaScript files + anyway (for performance reasons), so this won't be an issue any more. +

                    +
                    + +
                    + Note that files defining a module (i.e. .module.js) need to be included before other files that + add features (e.g. components, controllers, services, filters) to that module. +
                    + + +

                    External Templates

                    +

                    Since we are at refactoring, let's do one more thing. As we learned, components have templates, +which are basically fragments of HTML code that dictate how our data is laid out and presented to +the user. In step 3, we saw how we can specify the template for a component as a +string using the template property of the CDO (Component Definition Object). +Having HTML code in a string isn't ideal, especially for bigger templates. It would be much better, +if we could have our HTML code in .html files. This way, we would get all the support our +IDE/editor has to offer (e.g. HTML-specific color-highlighting and auto-completion) and also keep +our component definitions cleaner.

                    +

                    So, while it's perfectly fine to keep our component templates inline (using the template property +of the CDO), we are going to use an external template for our phoneList component. In order to +denote that we are using an external template, we use the templateUrl property and specify the URL +that our template will be loaded from. Since we want to keep our template close to where the +component is defined, we place it inside app/phone-list/.

                    +

                    We copied the contents of the template property (the HTML code) into +app/phone-list/phone-list.template.html and modified our CDO like this:

                    +


                    +app/phone-list/phone-list.component.js:

                    +
                    angular.
                    +module('phoneList').
                    +component('phoneList', {
                    +  // Note: The URL is relative to our `index.html` file
                    +  templateUrl: 'phone-list/phone-list.template.html',
                    +  controller: ...
                    +});
                    +
                    +

                    At runtime, when Angular needs to create an instance of the phoneList component, it will make an +HTTP request to get the template from app/phone-list/phone-list.template.html.

                    +
                    + Keeping inline with our convention, we will be using the .template suffix for external + templates. Another common convention is to just have the .html extension + (e.g. phone-list.html). +
                    + +
                    +

                    + Using an external template like this, will result in more HTTP requests to the server (one for + each external template). Although Angular takes care not to make extraneous requests (e.g. + fetching the templates lazily, caching the results, etc), additional requests do have a cost + (especially on mobile devices and data-plan connections). +

                    +

                    + Luckily, there are ways to avoid the extra costs (while still keeping your templates external). + A detailed discussion of the subject is outside the scope of this tutorial, but you can take a + look at the $templateRequest and + $templateCache services for more info on how Angular manages external + templates. +

                    +
                    + + +

                    Final Directory/File Layout

                    +

                    After all the refactorings that took place, this is how our application looks from the outside:

                    +


                    +/:

                    +
                    app/
                    +  phone-list/
                    +    phone-list.component.js
                    +    phone-list.component.spec.js
                    +    phone-list.module.js
                    +    phone-list.template.html
                    +  app.css
                    +  app.module.js
                    +  index.html
                    +
                    +

                    Testing

                    +

                    Since this was just a refactoring step (no actual code addition/deletions), we shouldn't need to +change much (if anything) as far as our specs are concerned.

                    +

                    One thing that we can (and should) change is the name of the module to be loaded before each test in +app/phone-list/phone-list.component.spec.js. We don't need to pull in the whole phonecatApp +module (which will soon grow to depend on more stuff). All we want to test is already included in +the much smaller phoneList module, so it suffices to just load that. +This is one extra benefit that we get out of our modular architecture for free.

                    +


                    +app/phone-list/phone-list.component.spec.js:

                    +
                    describe('phoneList', function() {
                    +
                    +  // Load the module that contains the `phoneList` component before each test
                    +  beforeEach(module('phoneList'));
                    +
                    +  ...
                    +
                    +});
                    +
                    +

                    If not already done so, run the tests (using the npm test command) and verify that they still +pass.

                    +
                    + One of the great things about tests is the confidence they provide, when refactoring your + application. It's easy to break something as you start moving files around and re-arranging + modules. Having good test coverage is the quickest, easiest and most reliable way of knowing that + your application will continue to work as expected. +
                    + + +

                    Summary

                    +

                    Even if we didn't add any new and exciting functionality to our application, we have made a great +step towards a well-architected and maintainable application. Time to spice things up. Let's go to +step 5 to learn how to add full-text search to the application.

                    +
                      + + + + + diff --git a/1.6.6/docs/partials/tutorial/step_05.html b/1.6.6/docs/partials/tutorial/step_05.html new file mode 100644 index 000000000..6a7294a48 --- /dev/null +++ b/1.6.6/docs/partials/tutorial/step_05.html @@ -0,0 +1,140 @@ + Improve this Doc + + +
                        + + +

                        We did a lot of work in laying a foundation for the app in the previous steps, so now we'll do +something simple; we will add full-text search (yes, it will be simple!). We will also write an +end-to-end (E2E) test, because a good E2E test is a good friend. It stays with your app, keeps an +eye on it, and quickly detects regressions.

                        +
                          +
                        • The app now has a search box. Notice that the phone list on the page changes depending on what a +user types into the search box.
                        • +
                        +
                        + + +

                        Component Controller

                        +

                        We made no changes to the component's controller.

                        +

                        Component Template

                        +


                        +app/phone-list/phone-list.template.html:

                        +
                        <div class="container-fluid">
                        +  <div class="row">
                        +    <div class="col-md-2">
                        +      <!--Sidebar content-->
                        +
                        +      Search: <input ng-model="$ctrl.query" />
                        +
                        +    </div>
                        +    <div class="col-md-10">
                        +      <!--Body content-->
                        +
                        +      <ul class="phones">
                        +        <li ng-repeat="phone in $ctrl.phones | filter:$ctrl.query">
                        +          <span>{{phone.name}}</span>
                        +          <p>{{phone.snippet}}</p>
                        +        </li>
                        +      </ul>
                        +
                        +    </div>
                        +  </div>
                        +</div>
                        +
                        +

                        We added a standard HTML <input> tag and used Angular's filter function +to process the input for the ngRepeat directive.

                        +

                        By virtue of the ngModel directive, this lets a user enter search criteria and +immediately see the effects of their search on the phone list. This new code demonstrates the +following:

                        +
                          +
                        • Data-binding: This is one of the core features in Angular. When the page loads, Angular binds the +value of the input box to the data model variable specified with ngModel and keeps the two in +sync.

                          +

                          In this code, the data that a user types into the input box (bound to $ctrl.query) is +immediately available as a filter input in the list repeater +(phone in $ctrl.phones | filter:$ctrl.query). When changes to the data model cause the +repeater's input to change, the repeater efficiently updates the DOM to reflect the current state +of the model.

                          +

                          +
                        • +
                        • Use of the filter filter: The filter function uses the $ctrl.query +value to create a new array that contains only those records that match the query.

                          +

                          ngRepeat automatically updates the view in response to the changing number of phones returned +by the filter filter. The process is completely transparent to the developer.

                          +
                        • +
                        +

                        Testing

                        +

                        In previous steps, we learned how to write and run unit tests. Unit tests are perfect for testing +controllers and other parts of our application written in JavaScript, but they can't easily +test templates, DOM manipulation or interoperability of components and services. For these, an +end-to-end (E2E) test is a much better choice.

                        +

                        The search feature was fully implemented via templates and data-binding, so we'll write our first +E2E test, to verify that the feature works.

                        +


                        +e2e-tests/scenarios.js:

                        +
                        describe('PhoneCat Application', function() {
                        +
                        +  describe('phoneList', function() {
                        +
                        +    beforeEach(function() {
                        +      browser.get('index.html');
                        +    });
                        +
                        +    it('should filter the phone list as a user types into the search box', function() {
                        +      var phoneList = element.all(by.repeater('phone in $ctrl.phones'));
                        +      var query = element(by.model('$ctrl.query'));
                        +
                        +      expect(phoneList.count()).toBe(3);
                        +
                        +      query.sendKeys('nexus');
                        +      expect(phoneList.count()).toBe(1);
                        +
                        +      query.clear();
                        +      query.sendKeys('motorola');
                        +      expect(phoneList.count()).toBe(2);
                        +    });
                        +
                        +  });
                        +
                        +});
                        +
                        +

                        This test verifies that the search box and the repeater are correctly wired together. Notice how +easy it is to write E2E tests in Angular. Although this example is for a simple test, it really is +that easy to set up any functional, readable, E2E test.

                        +

                        Running E2E Tests with Protractor

                        +

                        Even though the syntax of this test looks very much like our controller unit test written with +Jasmine, the E2E test uses APIs of Protractor. Read about the Protractor APIs in the +Protractor API Docs.

                        +

                        Much like Karma is the test runner for unit tests, we use Protractor to run E2E tests. Try it with +npm run protractor. E2E tests take time, so unlike with unit tests, Protractor will exit after the +tests run and will not automatically rerun the test suite on every file change. +To rerun the test suite, execute npm run protractor again.

                        +
                        + Note: In order for protractor to access and run tests against your application, it must be + served via a web server. In a different terminal/command line window, run npm start to fire up + the web server. +
                        + + +

                        Experiments

                        +
                        + +
                          +
                        • Display the current value of the query model by adding a {{$ctrl.query}} binding into the +phone-list.template.html template and see how it changes, when you type in the input box.

                          +

                          You might also try to add the {{$ctrl.query}} binding to index.html. However, when you reload +the page, you won't see the expected result. This is because the query model lives in the scope +defined by the <phone-list> component.
                          +Component isolation at work!

                          +
                        • +
                        +

                        Summary

                        +

                        We have now added full-text search and included a test to verify that it works! Now let's go on to +step 6 to learn how to add sorting capabilities to the PhoneCat application.

                        +
                          + + + + + diff --git a/1.6.6/docs/partials/tutorial/step_06.html b/1.6.6/docs/partials/tutorial/step_06.html new file mode 100644 index 000000000..e90de8a46 --- /dev/null +++ b/1.6.6/docs/partials/tutorial/step_06.html @@ -0,0 +1,209 @@ + Improve this Doc + + +
                            + + +

                            In this step, we will add a feature to let our users control the order of the items in the phone +list. The dynamic ordering is implemented by creating a new model property, wiring it together with +the repeater, and letting the data binding magic do the rest of the work.

                            +
                              +
                            • In addition to the search box, the application displays a drop-down menu that allows users to +control the order in which the phones are listed.
                            • +
                            +
                            + + +

                            Component Template

                            +


                            +app/phone-list/phone-list.template.html:

                            +
                            <div class="container-fluid">
                            +  <div class="row">
                            +    <div class="col-md-2">
                            +      <!--Sidebar content-->
                            +
                            +      <p>
                            +        Search:
                            +        <input ng-model="$ctrl.query">
                            +      </p>
                            +
                            +      <p>
                            +        Sort by:
                            +        <select ng-model="$ctrl.orderProp">
                            +          <option value="name">Alphabetical</option>
                            +          <option value="age">Newest</option>
                            +        </select>
                            +      </p>
                            +
                            +    </div>
                            +    <div class="col-md-10">
                            +      <!--Body content-->
                            +
                            +      <ul class="phones">
                            +        <li ng-repeat="phone in $ctrl.phones | filter:$ctrl.query | orderBy:$ctrl.orderProp">
                            +          <span>{{phone.name}}</span>
                            +          <p>{{phone.snippet}}</p>
                            +        </li>
                            +      </ul>
                            +
                            +    </div>
                            +  </div>
                            +</div>
                            +
                            +

                            We made the following changes to the phone-list.template.html template:

                            +
                              +
                            • First, we added a <select> element bound to $ctrl.orderProp, so that our users can pick from +the two provided sorting options.

                              +

                              +
                            • +
                            • We then chained the filter filter with the orderBy filter to further process the +input for the repeater. orderBy is a filter that takes an input array, copies it and reorders +the copy which is then returned.

                              +

                              Angular creates a two way data-binding between the select element and the $ctrl.orderProp model. +$ctrl.orderProp is then used as the input for the orderBy filter.

                              +
                            • +
                            +

                            As we discussed in the section about data-binding and the repeater in step 5, +whenever the model changes (for example because a user changes the order with the select drop-down +menu), Angular's data-binding will cause the view to automatically update. No bloated DOM +manipulation code is necessary!

                            +

                            Component Controller

                            +


                            +app/phone-list/phone-list.component.js:

                            +
                            angular.
                            +  module('phoneList').
                            +  component('phoneList', {
                            +    templateUrl: 'phone-list/phone-list.template.html',
                            +    controller: function PhoneListController() {
                            +      this.phones = [
                            +        {
                            +          name: 'Nexus S',
                            +          snippet: 'Fast just got faster with Nexus S.',
                            +          age: 1
                            +        }, {
                            +          name: 'Motorola XOOM™ with Wi-Fi',
                            +          snippet: 'The Next, Next Generation tablet.',
                            +          age: 2
                            +        }, {
                            +          name: 'MOTOROLA XOOM™',
                            +          snippet: 'The Next, Next Generation tablet.',
                            +          age: 3
                            +        }
                            +      ];
                            +
                            +      this.orderProp = 'age';
                            +    }
                            +  });
                            +
                            +
                              +
                            • We modified the phones model - the array of phones - and added an age property to each phone +record. This property is used to order the phones by age.

                              +
                            • +
                            • We added a line to the controller that sets the default value of orderProp to age. If we had +not set a default value here, the orderBy filter would remain uninitialized until the user +picked an option from the drop-down menu.

                              +
                            • +
                            +

                            This is a good time to talk about two-way data-binding. Notice that when the application is loaded +in the browser, "Newest" is selected in the drop-down menu. This is because we set orderProp to +'age' in the controller. So the binding works in the direction from our model to the UI. Now if +you select "Alphabetically" in the drop-down menu, the model will be updated as well and the phones +will be reordered. That is the data-binding doing its job in the opposite direction — from the UI to +the model.

                            +

                            Testing

                            +

                            The changes we made should be verified with both a unit test and an E2E test. Let's look at the unit +test first.

                            +


                            +app/phone-list/phone-list.component.spec.js:

                            +
                            describe('phoneList', function() {
                            +
                            +  // Load the module that contains the `phoneList` component before each test
                            +  beforeEach(module('phoneList'));
                            +
                            +  // Test the controller
                            +  describe('PhoneListController', function() {
                            +    var ctrl;
                            +
                            +    beforeEach(inject(function($componentController) {
                            +      ctrl = $componentController('phoneList');
                            +    }));
                            +
                            +    it('should create a `phones` model with 3 phones', function() {
                            +      expect(ctrl.phones.length).toBe(3);
                            +    });
                            +
                            +    it('should set a default value for the `orderProp` model', function() {
                            +      expect(ctrl.orderProp).toBe('age');
                            +    });
                            +
                            +  });
                            +
                            +});
                            +
                            +

                            The unit test now verifies that the default ordering property is set.

                            +

                            We used Jasmine's API to extract the controller construction into a beforeEach block, which is +shared by all tests in the parent describe block.

                            +

                            You should now see the following output in the Karma tab:

                            +
                            Chrome 49.0: Executed 2 of 2 SUCCESS (0.136 secs / 0.08 secs)
                            +
                            +

                            Let's turn our attention to the E2E tests.

                            +


                            +e2e-tests/scenarios.js:

                            +
                            describe('PhoneCat Application', function() {
                            +
                            +  describe('phoneList', function() {
                            +
                            +    ...
                            +
                            +    it('should be possible to control phone order via the drop-down menu', function() {
                            +      var queryField = element(by.model('$ctrl.query'));
                            +      var orderSelect = element(by.model('$ctrl.orderProp'));
                            +      var nameOption = orderSelect.element(by.css('option[value="name"]'));
                            +      var phoneNameColumn = element.all(by.repeater('phone in $ctrl.phones').column('phone.name'));
                            +
                            +      function getNames() {
                            +        return phoneNameColumn.map(function(elem) {
                            +          return elem.getText();
                            +        });
                            +      }
                            +
                            +      queryField.sendKeys('tablet');   // Let's narrow the dataset to make the assertions shorter
                            +
                            +      expect(getNames()).toEqual([
                            +        'Motorola XOOM\u2122 with Wi-Fi',
                            +        'MOTOROLA XOOM\u2122'
                            +      ]);
                            +
                            +      nameOption.click();
                            +
                            +      expect(getNames()).toEqual([
                            +        'MOTOROLA XOOM\u2122',
                            +        'Motorola XOOM\u2122 with Wi-Fi'
                            +      ]);
                            +    });
                            +
                            +    ...
                            +
                            +

                            The E2E test verifies that the ordering mechanism of the select box is working correctly.

                            +

                            You can now rerun npm run protractor to see the tests run.

                            +

                            Experiments

                            +
                            + +
                              +
                            • In the phoneList component's controller, remove the statement that sets the orderProp value +and you'll see that Angular will temporarily add a new blank ("unknown") option to the drop-down +list and the ordering will default to unordered/natural order.

                              +
                            • +
                            • Add a {{$ctrl.orderProp}} binding into the phone-list.template.html template to display its +current value as text.

                              +
                            • +
                            • Reverse the sort order by adding a - symbol before the sorting value: +<option value="-age">Oldest</option>

                              +
                            • +
                            +

                            Summary

                            +

                            Now that you have added list sorting and tested the application, go to step 7 to +learn about Angular services and how Angular uses dependency injection.

                            +
                              + + diff --git a/1.6.6/docs/partials/tutorial/step_07.html b/1.6.6/docs/partials/tutorial/step_07.html new file mode 100644 index 000000000..b7cfccff7 --- /dev/null +++ b/1.6.6/docs/partials/tutorial/step_07.html @@ -0,0 +1,254 @@ + Improve this Doc + + +
                                + + +

                                Enough of building an app with three phones in a hard-coded dataset! Let's fetch a larger dataset +from our server using one of Angular's built-in services called +$http. We will use Angular's dependency injection (DI) to provide +the service to the phoneList component's controller.

                                +
                                  +
                                • There is now a list of 20 phones, loaded from the server.
                                • +
                                +
                                + + +

                                Data

                                +

                                The app/phones/phones.json file in our project is a dataset that contains a larger list of phones, +stored in JSON format.

                                +

                                Following is a sample of the file:

                                +
                                [
                                +  {
                                +    "age": 13,
                                +    "id": "motorola-defy-with-motoblur",
                                +    "name": "Motorola DEFY\u2122 with MOTOBLUR\u2122",
                                +    "snippet": "Are you ready for everything life throws your way?"
                                +    ...
                                +  },
                                +  ...
                                +]
                                +
                                +

                                Component Controller

                                +

                                We will use Angular's $http service in our controller for making an HTTP request to +our web server to fetch the data in the app/phones/phones.json file. $http is just one of +several built-in Angular services that handle common operations in web +applications. Angular injects these services for you, right where you need them.

                                +

                                Services are managed by Angular's DI subsystem. Dependency injection helps to make +your web applications both well-structured (e.g. separate entities for presentation, data, and +control) and loosely coupled (dependencies between entities are not resolved by the entities +themselves, but by the DI subsystem). As a result, applications are easier to test as well.

                                +


                                +app/phone-list/phone-list.component.js:

                                +
                                angular.
                                +  module('phoneList').
                                +  component('phoneList', {
                                +    templateUrl: 'phone-list/phone-list.template.html',
                                +    controller: function PhoneListController($http) {
                                +      var self = this;
                                +      self.orderProp = 'age';
                                +
                                +      $http.get('phones/phones.json').then(function(response) {
                                +        self.phones = response.data;
                                +      });
                                +    }
                                +  });
                                +
                                +

                                $http makes an HTTP GET request to our web server, asking for phones.json (the URL is relative +to our index.html file). The server responds by providing the data in the JSON file. +(The response might just as well have been dynamically generated by a backend server. To the +browser and our app, they both look the same. For the sake of simplicity, we will use JSON files +in this tutorial.)

                                +

                                The $http service returns a promise object, which has a then() method. We call +this method to handle the asynchronous response and assign the phone data to the controller, as a +property called phones. Notice that Angular detected the JSON response and parsed it for us into +the data property of the response object passed to our callback!

                                +

                                Since we are making the assignment of the phones property in a callback function, where the this +value is not defined, we also introduce a local variable called self that points back to the +controller instance.

                                +

                                To use a service in Angular, you simply declare the names of the dependencies you need as arguments +to the controller's constructor function, as follows:

                                +
                                function PhoneListController($http) {...}
                                +
                                +

                                Angular's dependency injector provides services to your controller, when the controller is being +constructed. The dependency injector also takes care of creating any transitive dependencies the +service may have (services often depend upon other services).

                                +

                                Note that the names of arguments are significant, because the injector uses these to look up the +dependencies.

                                +

                                +

                                $-prefix Naming Convention

                                +

                                You can create your own services, and in fact we will do exactly that a few steps down the road. As +a naming convention, Angular's built-in services, Scope methods and a few other Angular APIs have a +$ prefix in front of the name.

                                +

                                The $ prefix is there to namespace Angular-provided services. To prevent collisions it's best to +avoid naming your services and models anything that begins with a $.

                                +

                                If you inspect a Scope, you may also notice some properties that begin with $$. These properties +are considered private, and should not be accessed or modified.

                                +

                                A Note on Minification

                                +

                                Since Angular infers the controller's dependencies from the names of arguments to the controller's +constructor function, if you were to minify the JavaScript code for the +PhoneListController controller, all of its function arguments would be minified as well, and the +dependency injector would not be able to identify services correctly.

                                +

                                We can overcome this problem by annotating the function with the names of the dependencies, provided +as strings, which will not get minified. There are two ways to provide these injection annotations:

                                +
                                  +
                                • Create an $inject property on the controller function which holds an array of strings. +Each string in the array is the name of the service to inject for the corresponding parameter. +In our example, we would write:

                                  +
                                  function PhoneListController($http) {...}
                                  +PhoneListController.$inject = ['$http'];
                                  +...
                                  +.component('phoneList', {..., controller: PhoneListController});
                                  +
                                  +
                                • +
                                • Use an inline annotation where, instead of just providing the function, you provide an array. +This array contains a list of the service names, followed by the function itself as the last item +of the array.

                                  +
                                  function PhoneListController($http) {...}
                                  +...
                                  +.component('phoneList', {..., controller: ['$http', PhoneListController]});
                                  +
                                  +
                                • +
                                +

                                Both of these methods work with any function that can be injected by Angular, so it's up to your +project's style guide to decide which one you use.

                                +

                                When using the second method, it is common to provide the constructor function inline, when +registering the controller:

                                +
                                .component('phoneList', {..., controller: ['$http', function PhoneListController($http) {...}]});
                                +
                                +

                                From this point onwards, we are going to use the inline method in the tutorial. With that in mind, +let's add the annotations to our PhoneListController:

                                +


                                +app/phone-list/phone-list.component.js

                                +
                                angular.
                                +  module('phoneList').
                                +  component('phoneList', {
                                +    templateUrl: 'phone-list/phone-list.template.html',
                                +    controller: ['$http',
                                +      function PhoneListController($http) {
                                +        var self = this;
                                +        self.orderProp = 'age';
                                +
                                +        $http.get('phones/phones.json').then(function(response) {
                                +          self.phones = response.data;
                                +        });
                                +      }
                                +    ]
                                +  });
                                +
                                +

                                Testing

                                +

                                Because we started using dependency injection and our controller has dependencies, constructing the +controller in our tests is a bit more complicated. We could use the new operator and provide the +constructor with some kind of fake $http implementation. However, Angular provides a mock $http +service that we can use in unit tests. We configure "fake" responses to server requests by calling +methods on a service called $httpBackend:

                                +


                                +app/phone-list/phone-list.component.spec.js:

                                +
                                describe('phoneList', function() {
                                +
                                +  beforeEach(module('phoneList'));
                                +
                                +  describe('controller', function() {
                                +    var $httpBackend, ctrl;
                                +
                                +    // The injector ignores leading and trailing underscores here (i.e. _$httpBackend_).
                                +    // This allows us to inject a service and assign it to a variable with the same name
                                +    // as the service while avoiding a name conflict.
                                +    beforeEach(inject(function($componentController, _$httpBackend_) {
                                +      $httpBackend = _$httpBackend_;
                                +      $httpBackend.expectGET('phones/phones.json')
                                +                  .respond([{name: 'Nexus S'}, {name: 'Motorola DROID'}]);
                                +
                                +      ctrl = $componentController('phoneList');
                                +    }));
                                +
                                +    ...
                                +
                                +  });
                                +
                                +});
                                +
                                +
                                + Note: Because we loaded Jasmine and angular-mocks.js in our test environment, we got two + helper methods module and inject that we + can use to access and configure the injector. +
                                + +

                                We created the controller in the test environment, as follows:

                                +
                                  +
                                • We used the inject() helper method to inject instances of +$componentController and $httpBackend +services into Jasmine's beforeEach() function. These instances come from an injector which is +recreated from scratch for every single test. This guarantees that each test starts from a well +known starting point and each test is isolated from the work done in other tests.

                                  +
                                • +
                                • We called the injected $componentController function passing the name of the phoneList +component (whose controller we wanted to instantiate) as a parameter.

                                  +
                                • +
                                +

                                Because our code now uses the $http service to fetch the phone list data in our controller, before +we create the PhoneListController, we need to tell the testing harness to expect an incoming +request from the controller. To do this we:

                                +
                                  +
                                • Inject the $httpBackend service into the beforeEach() function. This is a +mock version of the service that in a production environment +facilitates all XHR and JSONP requests. The mock version of this service allows us to write tests +without having to deal with native APIs and the global state associated with them — both of which +make testing a nightmare. It also overcomes the asynchronous nature of these calls, which would +slow down unit tests.

                                  +
                                • +
                                • Use the $httpBackend.expectGET() method to train the $httpBackend service to expect an +incoming HTTP request and tell it what to respond with. Note that the responses are not returned +until we call the $httpBackend.flush() method.

                                  +
                                • +
                                +

                                Now we will make assertions to verify that the phones property doesn't exist on the controller +before the response is received:

                                +
                                it('should create a `phones` property with 2 phones fetched with `$http`', function() {
                                +  expect(ctrl.phones).toBeUndefined();
                                +
                                +  $httpBackend.flush();
                                +  expect(ctrl.phones).toEqual([{name: 'Nexus S'}, {name: 'Motorola DROID'}]);
                                +});
                                +
                                +
                                  +
                                • We flush the request queue in the browser by calling $httpBackend.flush(). This causes the +promise returned by the $http service to be resolved with the trained response. See +Flushing HTTP requests in the mock +$httpBackend documentation for a full explanation of why this is necessary.

                                  +
                                • +
                                • We make the assertions, verifying that the phones property now exists on the controller.

                                  +
                                • +
                                +

                                Finally, we verify that the default value of orderProp is set correctly:

                                +
                                it('should set a default value for the `orderProp` property', function() {
                                +  expect(ctrl.orderProp).toBe('age');
                                +});
                                +
                                +

                                You should now see the following output in the Karma tab:

                                +
                                Chrome 49.0: Executed 2 of 2 SUCCESS (0.133 secs / 0.097 secs)
                                +
                                +

                                Experiments

                                +
                                + +
                                  +
                                • At the bottom of phone-list.template.html, add a +<pre>{{$ctrl.phones | filter:$ctrl.query | orderBy:$ctrl.orderProp | json}}</pre> binding to see +the list of phones displayed in JSON format.

                                  +
                                • +
                                • In the PhoneListController controller, pre-process the HTTP response by limiting the number of +phones to the first 5 in the list. Use the following code in the $http callback:

                                  +
                                  self.phones = response.data.slice(0, 5);
                                  +
                                  +
                                • +
                                +

                                Summary

                                +

                                Now that you have learned how easy it is to use Angular services (thanks to Angular's dependency +injection), go to step 8, where you will add some thumbnail images of phones and +some links.

                                +
                                  + + + + + diff --git a/1.6.6/docs/partials/tutorial/step_08.html b/1.6.6/docs/partials/tutorial/step_08.html new file mode 100644 index 000000000..58451290d --- /dev/null +++ b/1.6.6/docs/partials/tutorial/step_08.html @@ -0,0 +1,92 @@ + Improve this Doc + + +
                                    + + +

                                    In this step, we will add thumbnail images for the phones in the phone list, and links that, for +now, will go nowhere. In subsequent steps, we will use the links to display additional information +about the phones in the catalog.

                                    +
                                      +
                                    • There are now links and images of the phones in the list.
                                    • +
                                    +
                                    + + +

                                    Data

                                    +

                                    Note that the phones.json file contains unique IDs and image URLs for each of the phones. The +URLs point to the app/img/phones/ directory.

                                    +


                                    +app/phones/phones.json (sample snippet):

                                    +
                                    [
                                    +  {
                                    +    ...
                                    +    "id": "motorola-defy-with-motoblur",
                                    +    "imageUrl": "img/phones/motorola-defy-with-motoblur.0.jpg",
                                    +    "name": "Motorola DEFY\u2122 with MOTOBLUR\u2122",
                                    +    ...
                                    +  },
                                    +  ...
                                    +]
                                    +
                                    +

                                    Component Template

                                    +


                                    +app/phone-list/phone-list.template.html:

                                    +
                                    ...
                                    +<ul class="phones">
                                    +  <li ng-repeat="phone in $ctrl.phones | filter:$ctrl.query | orderBy:$ctrl.orderProp" class="thumbnail">
                                    +    <a href="#/phones/{{phone.id}}" class="thumb">
                                    +      <img ng-src="{{phone.imageUrl}}" alt="{{phone.name}}" />
                                    +    </a>
                                    +    <a href="#/phones/{{phone.id}}">{{phone.name}}</a>
                                    +    <p>{{phone.snippet}}</p>
                                    +  </li>
                                    +</ul>
                                    +...
                                    +
                                    +

                                    To dynamically generate links that will in the future lead to phone detail pages, we used the +now-familiar double-curly brace binding in the href attribute values. In step 2, we added the +{{phone.name}} binding as the element content. In this step the {{phone.id}} binding is used in +the element attribute.

                                    +

                                    We also added phone images next to each record using an image tag with the ngSrc +directive. That directive prevents the browser from treating the Angular {{ expression }} markup +literally, and initiating a request to an invalid URL (http://localhost:8000/{{phone.imageUrl}}), +which it would have done if we had only specified an attribute binding in a regular src attribute +(<img src="{{phone.imageUrl}}">). Using the ngSrc directive, prevents the browser from making an +HTTP request to an invalid location.

                                    +

                                    Testing

                                    +


                                    +e2e-tests/scenarios.js:

                                    +
                                    ...
                                    +
                                    +it('should render phone specific links', function() {
                                    +  var query = element(by.model('$ctrl.query'));
                                    +  query.sendKeys('nexus');
                                    +
                                    +  element.all(by.css('.phones li a')).first().click();
                                    +  expect(browser.getLocationAbsUrl()).toBe('/phones/nexus-s');
                                    +});
                                    +
                                    +...
                                    +
                                    +

                                    We added a new E2E test to verify that the application is generating correct links to the phone +views, that we will implement in the upcoming steps.

                                    +

                                    You can now rerun npm run protractor to see the tests run.

                                    +

                                    Experiments

                                    +
                                    + +
                                      +
                                    • Replace the ngSrc directive with a plain old src attribute. Using tools such as your browser's +developer tools or inspecting the web server access logs, confirm that the application is indeed +making an extraneous request to %7B%7Bphone.imageUrl%7D%7D (or {{phone.imageUrl}}).

                                      +

                                      The issue here is that the browser will fire a request for that invalid image address as soon as +it hits the <img> tag, which is before Angular has a chance to evaluate the expression and +inject the valid address.

                                      +
                                    • +
                                    +

                                    Summary

                                    +

                                    Now that you have added phone images and links, go to step 9 to learn about Angular +layout templates and how Angular makes it easy to create applications that have multiple views.

                                    +
                                      + + diff --git a/1.6.6/docs/partials/tutorial/step_09.html b/1.6.6/docs/partials/tutorial/step_09.html new file mode 100644 index 000000000..5da5550c4 --- /dev/null +++ b/1.6.6/docs/partials/tutorial/step_09.html @@ -0,0 +1,355 @@ + Improve this Doc + + +
                                        + + +

                                        In this step, you will learn how to create a layout template and how to build an application that +has multiple views by adding routing, using an Angular module called ngRoute.

                                        +
                                          +
                                        • When you now navigate to /index.html, you are redirected to /index.html#!/phones and the phone +list appears in the browser.
                                        • +
                                        • When you click on a phone link, the URL changes to that specific phone and the stub of a phone +detail page is displayed.
                                        • +
                                        +
                                        + + +

                                        Dependencies

                                        +

                                        The routing functionality added in this step is provided by Angular in the ngRoute module, which +is distributed separately from the core Angular framework.

                                        +

                                        Since we are using Bower to install client-side dependencies, this step updates the +bower.json configuration file to include the new dependency:

                                        +


                                        +bower.json:

                                        +
                                        {
                                        +  "name": "angular-phonecat",
                                        +  "description": "A starter project for AngularJS",
                                        +  "version": "0.0.0",
                                        +  "homepage": "https://github.com/angular/angular-phonecat",
                                        +  "license": "MIT",
                                        +  "private": true,
                                        +  "dependencies": {
                                        +    "angular": "1.5.x",
                                        +    "angular-mocks": "1.5.x",
                                        +    "angular-route": "1.5.x",
                                        +    "bootstrap": "3.3.x"
                                        +  }
                                        +}
                                        +
                                        +

                                        The new dependency "angular-route": "1.5.x" tells bower to install a version of the angular-route +module that is compatible with version 1.5.x of Angular. We must tell bower to download and install +this dependency.

                                        +
                                        npm install
                                        +
                                        +
                                        + Note: If you have bower installed globally, you can run bower install, but for this project + we have preconfigured npm install to run bower for us. +
                                        + +
                                        + Warning: If a new version of Angular has been released since you last ran npm install, then + you may have a problem with the bower install due to a conflict between the versions of + angular.js that need to be installed. If you run into this issue, simply delete your + app/bower_components directory and then run npm install. +
                                        + + +

                                        Multiple Views, Routing and Layout Templates

                                        +

                                        Our app is slowly growing and becoming more complex. Prior to this step, the app provided our users +with a single view (including the list of all phones), and all of the template code was located in +the phone-list.template.html file. The next step in building the application is to add a view that +will show detailed information about each of the devices in our list.

                                        +

                                        To add the detailed view, we are going to turn index.html into what we call a "layout template". +This is a template that is common for all views in our application. Other "partial templates" are +then included into this layout template depending on the current "route" — the view that is +currently displayed to the user.

                                        +

                                        Application routes in Angular are declared via the $routeProvider, +which is the provider of the $route service. This service makes it easy to +wire together controllers, view templates, and the current URL location in the browser. Using this +feature, we can implement deep linking, which lets us utilize the browser's history +(back and forward navigation) and bookmarks.

                                        +
                                        +

                                        + ngRoute lets us associate a controller and a template with a specific URL (or URL + pattern). This is pretty close to what we did with ngController and index.html back in + step 2. +

                                        +

                                        + Since we have already learned that components allow us to combine controllers with templates in + a modular, testable way, we are going to use components for routing as well. + Each route will be associated with a component and that component will be in charge of providing + the view template and the controller. +

                                        +
                                        + + +

                                        A Note about DI, Injector and Providers

                                        +

                                        As you noticed, dependency injection (DI) is at the core of +AngularJS, so it's important for you to understand a thing or two about how it works.

                                        +

                                        When the application bootstraps, Angular creates an injector that will be used to find and inject +all of the services that are required by your application. The injector itself doesn't know anything +about what the $http or $route services do. In fact, the injector doesn't even know about the +existence of these services, unless it is configured with proper module definitions.

                                        +

                                        The injector only carries out the following steps:

                                        +
                                          +
                                        • Load the module definition(s) that you specify in your application.
                                        • +
                                        • Register all Providers defined in these module definition(s).
                                        • +
                                        • When asked to do so, lazily instantiate services and their dependencies, via their Providers, as +parameters to an injectable function.
                                        • +
                                        +

                                        Providers are objects that provide (create) instances of services and expose configuration APIs, +that can be used to control the creation and runtime behavior of a service. In case of the $route +service, the $routeProvider exposes APIs that allow you to define routes for your application.

                                        +
                                        + Note: Providers can only be injected into config functions. Thus you could not inject + $routeProvider into PhoneListController at runtime. +
                                        + +

                                        Angular modules solve the problem of removing global variables from the application and provide a +way of configuring the injector. As opposed to AMD or require.js modules, Angular modules don't try +to solve the problem of script load ordering or lazy script fetching. These goals are totally +independent and both module systems can live side-by-side and fulfill their goals.

                                        +

                                        To deepen your understanding on Angular's DI, see Understanding Dependency Injection.

                                        +

                                        Template

                                        +

                                        The $route service is usually used in conjunction with the ngView +directive. The role of the ngView directive is to include the view template for the current route +into the layout template. This makes it a perfect fit for our index.html template.

                                        +


                                        +app/index.html:

                                        +
                                        <head>
                                        +  ...
                                        +  <script src="bower_components/angular/angular.js"></script>
                                        +  <script src="bower_components/angular-route/angular-route.js"></script>
                                        +  <script src="app.module.js"></script>
                                        +  <script src="app.config.js"></script>
                                        +  ...
                                        +  <script src="phone-detail/phone-detail.module.js"></script>
                                        +  <script src="phone-detail/phone-detail.component.js"></script>
                                        +</head>
                                        +<body>
                                        +
                                        +  <div ng-view></div>
                                        +
                                        +</body>
                                        +
                                        +

                                        We have added four new <script> tags in our index.html file to load some extra JavaScript files +into our application:

                                        +
                                          +
                                        • angular-route.js: Defines the Angular ngRoute module, which provides us with routing.
                                        • +
                                        • app.config.js: Configures the providers available to our main module (see +below).
                                        • +
                                        • phone-detail.module.js: Defines a new module containing a phoneDetail component.
                                        • +
                                        • phone-detail.component.js: Defines a dummy phoneDetail component (see +below).
                                        • +
                                        +

                                        Note that we removed the <phone-list></phone-list> line from the index.html template and +replaced it with a <div> with the ng-view attribute.

                                        +

                                        +

                                        Configuring a Module

                                        +

                                        A module's .config() method gives us access to the available +providers for configuration. To make the providers, services and directives defined in ngRoute +available to our application, we need to add ngRoute as a dependency of our phonecatApp module.

                                        +


                                        +app/app.module.js:

                                        +
                                        angular.module('phonecatApp', [
                                        +  'ngRoute',
                                        +  ...
                                        +]);
                                        +
                                        +

                                        Now, in addition to the core services and directives, we can also configure the $route service +(using its provider) for our application. In order to be able to quickly locate the configuration +code, we put it into a separate file and used the .config suffix.

                                        +


                                        +app/app.config.js:

                                        +
                                        angular.
                                        +  module('phonecatApp').
                                        +  config(['$locationProvider', '$routeProvider',
                                        +    function config($locationProvider, $routeProvider) {
                                        +      $locationProvider.hashPrefix('!');
                                        +
                                        +      $routeProvider.
                                        +        when('/phones', {
                                        +          template: '<phone-list></phone-list>'
                                        +        }).
                                        +        when('/phones/:phoneId', {
                                        +          template: '<phone-detail></phone-detail>'
                                        +        }).
                                        +        otherwise('/phones');
                                        +    }
                                        +  ]);
                                        +
                                        +

                                        Using the .config() method, we request the necessary providers (for example the $routeProvider) +to be injected into our configuration function and then use their methods to specify the behavior of +the corresponding services. Here, we use the +$routeProvider.when() and +$routeProvider.otherwise() methods to define our +application routes.

                                        +
                                        +

                                        + We also used $locationProvider.hashPrefix() to set the + hash-prefix to !. This prefix will appear in the links to our client-side routes, right after + the hash (#) symbol and before the actual path (e.g. index.html#!/some/path). +

                                        +

                                        + Setting a prefix is not necessary, but it is considered a good practice (for reasons that are + outside the scope of this tutorial). ! is the most commonly used prefix. +

                                        +
                                        + +

                                        Our routes are defined as follows:

                                        +
                                          +
                                        • when('/phones'): Determines the view that will be shown, when the URL hash fragment is +/phones. According to the specified template, Angular will create an instance of the phoneList +component to manage the view. Note that this is the same markup that we used to have in the +index.html file.

                                          +
                                        • +
                                        • when('/phones/:phoneId'): Determines the view that will be shown, when the URL hash fragment +matches /phones/<phoneId>, where <phoneId> is a variable part of the URL. In charge of the +view will be the phoneDetail component.

                                          +
                                        • +
                                        • otherwise('/phones'): Defines a fallback route to redirect to, when no route definition matches +the current URL.(Here it will redirect to /phones.)

                                          +
                                        • +
                                        +

                                        We reused the phoneList component that we have already built and a new "dummy" phoneDetail +component. For now, the phoneDetail component will just display the selected phone's ID. +(Not too impressive, but we will enhance it in the next step.)

                                        +

                                        Note the use of the :phoneId parameter in the second route declaration. The $route service uses +the route declaration — '/phones/:phoneId' — as a template that is matched against the current +URL. All variables defined with the : prefix are extracted into the (injectable) +$routeParams object.

                                        +

                                        The phoneDetail Component

                                        +

                                        We created a phoneDetail component to handle the phone details view. We followed the same +conventions as with phoneList, using a separate directory and creating a phoneDetail module, +which we added as a dependency of the phonecatApp module.

                                        +


                                        +app/phone-detail/phone-detail.module.js:

                                        +
                                        angular.module('phoneDetail', [
                                        +  'ngRoute'
                                        +]);
                                        +
                                        +


                                        +app/phone-detail/phone-detail.component.js:

                                        +
                                        angular.
                                        +  module('phoneDetail').
                                        +  component('phoneDetail', {
                                        +    template: 'TBD: Detail view for <span>{{$ctrl.phoneId}}</span>',
                                        +    controller: ['$routeParams',
                                        +      function PhoneDetailController($routeParams) {
                                        +        this.phoneId = $routeParams.phoneId;
                                        +      }
                                        +    ]
                                        +  });
                                        +
                                        +


                                        +app/app.module.js:

                                        +
                                        angular.module('phonecatApp', [
                                        +  ...
                                        +  'phoneDetail',
                                        +  ...
                                        +]);
                                        +
                                        +

                                        A Note on Sub-module Dependencies

                                        +

                                        The phoneDetail module depends on the ngRoute module for providing the $routeParams object, +which is used in the phoneDetail component's controller. Since ngRoute is also a dependency of +the main phonecatApp module, its services and directives are already available everywhere in the +application (including the phoneDetail component).

                                        +

                                        This means that our application would continue to work even if we didn't include ngRoute in the +list of dependencies for the phoneDetail component. Although it might be tempting to omit +dependencies of a sub-module that are already imported by the main module, it breaks our hard-earned +modularity.

                                        +
                                        + Imagine what would happen if we decided to copy the phoneDetail feature over to another project + that does not declare a dependency on ngRoute. The injector would not be able to provide + $routeParams and our application would break. +
                                        + +

                                        The takeaway here is:

                                        +
                                          +
                                        • Always be explicit about the dependencies of a sub-module. Do not rely on dependencies inherited +from a parent module (because that parent module might not be there some day).
                                        • +
                                        +
                                        + Declaring the same dependency in multiple modules does not incur extra "cost", because Angular + will still load each dependency once. For more info on modules and their dependencies take a look + at the Modules section of the Developer Guide. +
                                        + + +

                                        Testing

                                        +

                                        Since some of our modules depend on ngRoute now, it is necessary to update the Karma +configuration file with angular-route. Other than that, the unit tests should (still) pass without +any modification.

                                        +


                                        +karma.conf.js:

                                        +
                                        files: [
                                        +  'bower_components/angular/angular.js',
                                        +  'bower_components/angular-route/angular-route.js',
                                        +  ...
                                        +],
                                        +
                                        +


                                        +To automatically verify that everything is wired properly, we wrote E2E tests for navigating to +various URLs and verifying that the correct view was rendered.

                                        +


                                        +e2e-tests/scenarios.js

                                        +
                                        ...
                                        +
                                        +it('should redirect `index.html` to `index.html#!/phones', function() {
                                        +  browser.get('index.html');
                                        +  expect(browser.getLocationAbsUrl()).toBe('/phones');
                                        +});
                                        +
                                        +...
                                        +
                                        +describe('View: Phone list', function() {
                                        +
                                        +  beforeEach(function() {
                                        +    browser.get('index.html#!/phones');
                                        +  });
                                        +
                                        +  ...
                                        +
                                        +});
                                        +
                                        +...
                                        +
                                        +describe('View: Phone details', function() {
                                        +
                                        +  beforeEach(function() {
                                        +    browser.get('index.html#!/phones/nexus-s');
                                        +  });
                                        +
                                        +  it('should display placeholder page with `phoneId`', function() {
                                        +    expect(element(by.binding('$ctrl.phoneId')).getText()).toBe('nexus-s');
                                        +  });
                                        +
                                        +});
                                        +
                                        +...
                                        +
                                        +

                                        You can now rerun npm run protractor to see the tests run (and hopefully pass).

                                        +

                                        Experiments

                                        +
                                        + +
                                          +
                                        • Try to add a {{$ctrl.phoneId}} binding in the template string for the phone details view:

                                          +
                                          when('/phones/:phoneId', {
                                          +  template: '{{$ctrl.phoneId}} <phone-detail></phone-detail>'
                                          +...
                                          +
                                          +

                                          You will see that nothing happens, even when you are in the phone details view. This is because +the phoneId model is visible only in the context set by the phoneDetail component. Again, +component isolation at work!

                                          +
                                        • +
                                        +

                                        Summary

                                        +

                                        With the routing set up and the phone list view implemented, we are ready to go to +step 10 and implement a proper phone details view.

                                        +
                                          + + + + + diff --git a/1.6.6/docs/partials/tutorial/step_10.html b/1.6.6/docs/partials/tutorial/step_10.html new file mode 100644 index 000000000..1abfd693d --- /dev/null +++ b/1.6.6/docs/partials/tutorial/step_10.html @@ -0,0 +1,173 @@ + Improve this Doc + + +
                                            + + +

                                            In this step, we will implement the phone details view, which is displayed when a user clicks on a +phone in the phone list.

                                            +
                                              +
                                            • When you click on a phone on the list, the phone details page with phone-specific information is +displayed.
                                            • +
                                            +

                                            To implement the phone details view we are going to use $http to fetch our data, +and then flesh out the phoneDetail component's template.

                                            +
                                            + + +

                                            Data

                                            +

                                            In addition to phones.json, the app/phones/ directory also contains one JSON file for each +phone:

                                            +


                                            +app/phones/nexus-s.json: (sample snippet)

                                            +
                                            {
                                            +  "additionalFeatures": "Contour Display, Near Field Communications (NFC), ...",
                                            +  "android": {
                                            +    "os": "Android 2.3",
                                            +    "ui": "Android"
                                            +  },
                                            +  ...
                                            +  "images": [
                                            +    "img/phones/nexus-s.0.jpg",
                                            +    "img/phones/nexus-s.1.jpg",
                                            +    "img/phones/nexus-s.2.jpg",
                                            +    "img/phones/nexus-s.3.jpg"
                                            +  ],
                                            +  "storage": {
                                            +    "flash": "16384MB",
                                            +    "ram": "512MB"
                                            +  }
                                            +}
                                            +
                                            +

                                            Each of these files describes various properties of the phone using the same data structure. We will +show this data in the phone details view.

                                            +

                                            Component Controller

                                            +

                                            We will expand the phoneDetail component's controller by using the $http service to fetch the +appropriate JSON files. This works the same way as the phoneList component's controller.

                                            +


                                            +app/phone-detail/phone-detail.component.js:

                                            +
                                            angular.
                                            +  module('phoneDetail').
                                            +  component('phoneDetail', {
                                            +    templateUrl: 'phone-detail/phone-detail.template.html',
                                            +    controller: ['$http', '$routeParams',
                                            +      function PhoneDetailController($http, $routeParams) {
                                            +        var self = this;
                                            +
                                            +        $http.get('phones/' + $routeParams.phoneId + '.json').then(function(response) {
                                            +          self.phone = response.data;
                                            +        });
                                            +      }
                                            +    ]
                                            +  });
                                            +
                                            +

                                            To construct the URL for the HTTP request, we use $routeParams.phoneId, which is extracted from +the current route by the $route service.

                                            +

                                            Component Template

                                            +

                                            The inline, TBD placeholder template has been replaced with a full blown external template, +including lists and bindings that comprise the phone details. Note how we use the Angular +{{expression}} markup and ngRepeat to project phone data from our model into the view.

                                            +


                                            +app/phone-detail/phone-detail.template.html:

                                            +
                                            <img ng-src="{{$ctrl.phone.images[0]}}" class="phone" />
                                            +
                                            +<h1>{{$ctrl.phone.name}}</h1>
                                            +
                                            +<p>{{$ctrl.phone.description}}</p>
                                            +
                                            +<ul class="phone-thumbs">
                                            +  <li ng-repeat="img in $ctrl.phone.images">
                                            +    <img ng-src="{{img}}" />
                                            +  </li>
                                            +</ul>
                                            +
                                            +<ul class="specs">
                                            +  <li>
                                            +    <span>Availability and Networks</span>
                                            +    <dl>
                                            +      <dt>Availability</dt>
                                            +      <dd ng-repeat="availability in $ctrl.phone.availability">{{availability}}</dd>
                                            +    </dl>
                                            +  </li>
                                            +  ...
                                            +  <li>
                                            +    <span>Additional Features</span>
                                            +    <dd>{{$ctrl.phone.additionalFeatures}}</dd>
                                            +  </li>
                                            +</ul>
                                            +
                                            +

                                            +

                                            Testing

                                            +

                                            We wrote a new unit test that is similar to the one we wrote for the phoneList component's +controller in step 7.

                                            +


                                            +app/phone-detail/phone-detail.component.spec.js:

                                            +
                                            describe('phoneDetail', function() {
                                            +
                                            +  // Load the module that contains the `phoneDetail` component before each test
                                            +  beforeEach(module('phoneDetail'));
                                            +
                                            +  // Test the controller
                                            +  describe('PhoneDetailController', function() {
                                            +    var $httpBackend, ctrl;
                                            +
                                            +    beforeEach(inject(function($componentController, _$httpBackend_, $routeParams) {
                                            +      $httpBackend = _$httpBackend_;
                                            +      $httpBackend.expectGET('phones/xyz.json').respond({name: 'phone xyz'});
                                            +
                                            +      $routeParams.phoneId = 'xyz';
                                            +
                                            +      ctrl = $componentController('phoneDetail');
                                            +    }));
                                            +
                                            +    it('should fetch the phone details', function() {
                                            +      expect(ctrl.phone).toBeUndefined();
                                            +
                                            +      $httpBackend.flush();
                                            +      expect(ctrl.phone).toEqual({name: 'phone xyz'});
                                            +    });
                                            +
                                            +  });
                                            +
                                            +});
                                            +
                                            +

                                            You should now see the following output in the Karma tab:

                                            +
                                            Chrome 49.0: Executed 3 of 3 SUCCESS (0.159 secs / 0.136 secs)
                                            +
                                            +

                                            We also added a new E2E test that navigates to the 'Nexus S' details page and verifies that the +heading on the page is "Nexus S".

                                            +


                                            +e2e-tests/scenarios.js

                                            +
                                            ...
                                            +
                                            +describe('View: Phone detail', function() {
                                            +
                                            +  beforeEach(function() {
                                            +    browser.get('index.html#!/phones/nexus-s');
                                            +  });
                                            +
                                            +  it('should display the `nexus-s` page', function() {
                                            +    expect(element(by.binding('$ctrl.phone.name')).getText()).toBe('Nexus S');
                                            +  });
                                            +
                                            +});
                                            +
                                            +...
                                            +
                                            +

                                            You can run the tests with npm run protractor.

                                            +

                                            Experiments

                                            +
                                            + +
                                              +
                                            • Using Protractor's API, write a test that verifies that we display 4 thumbnail +images on the 'Nexus S' details page.
                                            • +
                                            +

                                            Summary

                                            +

                                            Now that the phone details view is in place, proceed to step 11 to learn how to +write your own custom display filter.

                                            +
                                              + + + + + diff --git a/1.6.6/docs/partials/tutorial/step_11.html b/1.6.6/docs/partials/tutorial/step_11.html new file mode 100644 index 000000000..8f47c855a --- /dev/null +++ b/1.6.6/docs/partials/tutorial/step_11.html @@ -0,0 +1,133 @@ + Improve this Doc + + +
                                                + + +

                                                In this step you will learn how to create your own custom display filter.

                                                +
                                                  +
                                                • In the previous step, the details page displayed either "true" or "false" to indicate whether +certain phone features were present or not. In this step, we are using a custom filter to convert +those text strings into glyphs: ✓ for "true", and ✘ for "false".
                                                • +
                                                +

                                                Let's see what the filter code looks like.

                                                +
                                                + + +

                                                The checkmark Filter

                                                +

                                                Since this filter is generic (i.e. it is not specific to any view or component), we are going to +register it in a core module, which contains "application-wide" features.

                                                +


                                                +app/core/core.module.js:

                                                +
                                                angular.module('core', []);
                                                +
                                                +


                                                +app/core/checkmark/checkmark.filter.js:

                                                +
                                                angular.
                                                +  module('core').
                                                +  filter('checkmark', function() {
                                                +    return function(input) {
                                                +      return input ? '\u2713' : '\u2718';
                                                +    };
                                                +  });
                                                +
                                                +
                                                + As you may have noticed, we (unsurprisingly) gave our file a .filter suffix. +
                                                + +

                                                The name of our filter is "checkmark". The input evaluates to either true or false, and we +return one of the two unicode characters we have chosen to represent true (\u2713 -> ✓) and false +(\u2718 -> ✘).

                                                +

                                                Now that our filter is ready, we need to register the core module as a dependency of our main +phonecatApp module.

                                                +


                                                +app/app.module.js:

                                                +
                                                angular.module('phonecatApp', [
                                                +  ...
                                                +  'core',
                                                +  ...
                                                +]);
                                                +
                                                +

                                                Templates

                                                +

                                                Since we have created two new files (core.module.js, checkmark.filter.js), we need to +include them in our layout template.

                                                +


                                                +app/index.html:

                                                +
                                                ...
                                                +<script src="core/core.module.js"></script>
                                                +<script src="core/checkmark/checkmark.filter.js"></script>
                                                +...
                                                +
                                                +

                                                The syntax for using filters in Angular templates is as follows:

                                                +
                                                {{expression | filter}}
                                                +
                                                +

                                                Let's employ the filter in the phone details template:

                                                +


                                                +app/phone-detail/phone-detail.template.html:

                                                +
                                                ...
                                                +<dl>
                                                +  <dt>Infrared</dt>
                                                +  <dd>{{$ctrl.phone.connectivity.infrared | checkmark}}</dd>
                                                +  <dt>GPS</dt>
                                                +  <dd>{{$ctrl.phone.connectivity.gps | checkmark}}</dd>
                                                +</dl>
                                                +...
                                                +
                                                +

                                                Testing

                                                +

                                                Filters, like any other code, should be tested. Luckily, these tests are very easy to write.

                                                +


                                                +app/core/checkmark/checkmark.filter.spec.js:

                                                +
                                                describe('checkmark', function() {
                                                +
                                                +  beforeEach(module('core'));
                                                +
                                                +  it('should convert boolean values to unicode checkmark or cross',
                                                +    inject(function(checkmarkFilter) {
                                                +      expect(checkmarkFilter(true)).toBe('\u2713');
                                                +      expect(checkmarkFilter(false)).toBe('\u2718');
                                                +    })
                                                +  );
                                                +
                                                +});
                                                +
                                                +

                                                The call to beforeEach(module('core')) loads the core module (which contains the checkmark +filter) into the injector, before every test.

                                                +

                                                Note that we call the helper function inject(function(checkmarkFilter) {...}), to get access to +the filter that we want to test. See also angular.mock.inject().

                                                +
                                                + When injecting a filter, we need to suffix the filter name with 'Filter'. For example, our + checkmark filter is injected as checkmarkFilter. + See the Filters section of + the Developer Guide for more info. +
                                                + +

                                                You should now see the following output in the Karma tab:

                                                +
                                                Chrome 49.0: Executed 4 of 4 SUCCESS (0.091 secs / 0.075 secs)
                                                +
                                                +

                                                Experiments

                                                +
                                                + +
                                                  +
                                                • Let's experiment with some of the built-in Angular filters. +Add the following bindings to index.html:

                                                  +
                                                    +
                                                  • {{'lower cap string' | uppercase}}
                                                  • +
                                                  • {{{foo: 'bar', baz: 42} | json}}
                                                  • +
                                                  • {{1459461289000 | date}}
                                                  • +
                                                  • {{1459461289000 | date:'MM/dd/yyyy @ h:mma'}}
                                                  • +
                                                  +
                                                • +
                                                +
                                                  +
                                                • We can also create a model with an input element, and combine it with a filtered binding. +Add the following to index.html:

                                                  +
                                                  <input ng-model="userInput" /> Uppercased: {{userInput | uppercase}}
                                                  +
                                                  +
                                                • +
                                                +

                                                Summary

                                                +

                                                Now that we have learned how to write and test a custom filter, let's go to step 12 +to learn how we can use Angular to enhance the phone details page further.

                                                +
                                                  + + diff --git a/1.6.6/docs/partials/tutorial/step_12.html b/1.6.6/docs/partials/tutorial/step_12.html new file mode 100644 index 000000000..5203a15b0 --- /dev/null +++ b/1.6.6/docs/partials/tutorial/step_12.html @@ -0,0 +1,147 @@ + Improve this Doc + + +
                                                    + + +

                                                    In this step, you will add a clickable phone image swapper to the phone details page.

                                                    +
                                                      +
                                                    • The phone details view displays one large image of the current phone and several smaller thumbnail +images. It would be great if we could replace the large image with any of the thumbnails just by +clicking on the desired thumbnail image. Let's have a look at how we can do this with Angular.
                                                    • +
                                                    +
                                                    + + +

                                                    Component Controller

                                                    +


                                                    +app/phone-detail/phone-detail.component.js:

                                                    +
                                                    ...
                                                    +controller: ['$http', '$routeParams',
                                                    +  function PhoneDetailController($http, $routeParams) {
                                                    +    var self = this;
                                                    +
                                                    +    self.setImage = function setImage(imageUrl) {
                                                    +      self.mainImageUrl = imageUrl;
                                                    +    };
                                                    +
                                                    +    $http.get('phones/' + $routeParams.phoneId + '.json').then(function(response) {
                                                    +      self.phone = response.data;
                                                    +      self.setImage(self.phone.images[0]);
                                                    +    });
                                                    +  }
                                                    +]
                                                    +...
                                                    +
                                                    +

                                                    In the phoneDetail component's controller, we created the mainImageUrl model property and set +its default value to the first phone image URL.

                                                    +

                                                    We also created a setImage() method (to be used as event handler), that will change the value of +mainImageUrl.

                                                    +

                                                    Component Template

                                                    +


                                                    +app/phone-detail/phone-detail.template.html:

                                                    +
                                                    <img ng-src="{{$ctrl.mainImageUrl}}" class="phone" />
                                                    +...
                                                    +<ul class="phone-thumbs">
                                                    +  <li ng-repeat="img in $ctrl.phone.images">
                                                    +    <img ng-src="{{img}}" ng-click="$ctrl.setImage(img)" />
                                                    +  </li>
                                                    +</ul>
                                                    +...
                                                    +
                                                    +

                                                    We bound the ngSrc directive of the large image to the $ctrl.mainImageUrl property.

                                                    +

                                                    We also registered an ngClick handler with thumbnail images. When a +user clicks on one of the thumbnail images, the handler will use the $ctrl.setImage() method +callback to change the value of the $ctrl.mainImageUrl property to the URL of the clicked +thumbnail image.

                                                    +

                                                    +

                                                    Testing

                                                    +

                                                    To verify this new feature, we added two E2E tests. One verifies that mainImageUrl is set to the +first phone image URL by default. The second test clicks on several thumbnail images and verifies +that the main image URL changes accordingly.

                                                    +


                                                    +e2e-tests/scenarios.js:

                                                    +
                                                    ...
                                                    +
                                                    +describe('View: Phone detail', function() {
                                                    +
                                                    +  ...
                                                    +
                                                    +  it('should display the first phone image as the main phone image', function() {
                                                    +    var mainImage = element(by.css('img.phone'));
                                                    +
                                                    +    expect(mainImage.getAttribute('src')).toMatch(/img\/phones\/nexus-s.0.jpg/);
                                                    +  });
                                                    +
                                                    +  it('should swap the main image when clicking on a thumbnail image', function() {
                                                    +    var mainImage = element(by.css('img.phone'));
                                                    +    var thumbnails = element.all(by.css('.phone-thumbs img'));
                                                    +
                                                    +    thumbnails.get(2).click();
                                                    +    expect(mainImage.getAttribute('src')).toMatch(/img\/phones\/nexus-s.2.jpg/);
                                                    +
                                                    +    thumbnails.get(0).click();
                                                    +    expect(mainImage.getAttribute('src')).toMatch(/img\/phones\/nexus-s.0.jpg/);
                                                    +  });
                                                    +
                                                    +});
                                                    +
                                                    +...
                                                    +
                                                    +

                                                    You can now rerun the tests with npm run protractor.

                                                    +

                                                    We also have to refactor one of our unit tests, because of the addition of the mainImageUrl model +property to the controller. As previously, we will use a mocked response.

                                                    +


                                                    +app/phone-detail/phone-detail.component.spec.js:

                                                    +
                                                    ...
                                                    +
                                                    +describe('controller', function() {
                                                    +  var $httpBackend, ctrl
                                                    +  var xyzPhoneData = {
                                                    +    name: 'phone xyz',
                                                    +    images: ['image/url1.png', 'image/url2.png']
                                                    +  };
                                                    +
                                                    +  beforeEach(inject(function($componentController, _$httpBackend_, _$routeParams_) {
                                                    +    $httpBackend = _$httpBackend_;
                                                    +    $httpBackend.expectGET('phones/xyz.json').respond(xyzPhoneData);
                                                    +
                                                    +    ...
                                                    +  }));
                                                    +
                                                    +  it('should fetch phone details', function() {
                                                    +    expect(ctrl.phone).toBeUndefined();
                                                    +
                                                    +    $httpBackend.flush();
                                                    +    expect(ctrl.phone).toEqual(xyzPhoneData);
                                                    +  });
                                                    +
                                                    +});
                                                    +
                                                    +...
                                                    +
                                                    +

                                                    Our unit tests should now be passing again.

                                                    +

                                                    Experiments

                                                    +
                                                    + +
                                                      +
                                                    • Similar to the ngClick directive, which binds an Angular expression to the click event, there +are built-in directives for all native events, such as dblclick, focus/blur, mouse and key +events, etc.

                                                      +

                                                      Let's add a new controller method to the phoneDetail component's controller:

                                                      +
                                                      self.onDblclick = function onDblclick(imageUrl) {
                                                      +  alert('You double-clicked image: ' + imageUrl);
                                                      +};
                                                      +
                                                      +

                                                      and add the following to the <img> element in phone-detail.template.html:

                                                      +
                                                      <img ... ng-dblclick="$ctrl.onDblclick(img)" />
                                                      +
                                                      +

                                                      Now, whenever you double-click on a thumbnail, an alert pops-up. Pretty annoying!

                                                      +
                                                    • +
                                                    +

                                                    Summary

                                                    +

                                                    With the phone image swapper in place, we are ready for step 13 to learn an even +better way to fetch data.

                                                    +
                                                      + + diff --git a/1.6.6/docs/partials/tutorial/step_13.html b/1.6.6/docs/partials/tutorial/step_13.html new file mode 100644 index 000000000..cd1b18977 --- /dev/null +++ b/1.6.6/docs/partials/tutorial/step_13.html @@ -0,0 +1,247 @@ + Improve this Doc + + +
                                                        + + +

                                                        In this step, we will change the way our application fetches data.

                                                        +
                                                          +
                                                        • We define a custom service that represents a RESTful client. Using this client we can +make requests for data to the server in an easier way, without having to deal with the lower-level +$http API, HTTP methods and URLs.
                                                        • +
                                                        +
                                                        + + +

                                                        Dependencies

                                                        +

                                                        The RESTful functionality is provided by Angular in the ngResource module, which +is distributed separately from the core Angular framework.

                                                        +

                                                        Since we are using Bower to install client-side dependencies, this step updates the +bower.json configuration file to include the new dependency:

                                                        +


                                                        +bower.json:

                                                        +
                                                        {
                                                        +  "name": "angular-phonecat",
                                                        +  "description": "A starter project for AngularJS",
                                                        +  "version": "0.0.0",
                                                        +  "homepage": "https://github.com/angular/angular-phonecat",
                                                        +  "license": "MIT",
                                                        +  "private": true,
                                                        +  "dependencies": {
                                                        +    "angular": "1.5.x",
                                                        +    "angular-mocks": "1.5.x",
                                                        +    "angular-resource": "1.5.x",
                                                        +    "angular-route": "1.5.x",
                                                        +    "bootstrap": "3.3.x"
                                                        +  }
                                                        +}
                                                        +
                                                        +

                                                        The new dependency "angular-resource": "1.5.x" tells bower to install a version of the +angular-resource module that is compatible with version 1.5.x of Angular. We must tell bower to +download and install this dependency.

                                                        +
                                                        npm install
                                                        +
                                                        +
                                                        + Note: If you have bower installed globally, you can run bower install, but for this project + we have preconfigured npm install to run bower for us. +
                                                        + +
                                                        + Warning: If a new version of Angular has been released since you last ran npm install, then + you may have a problem with the bower install due to a conflict between the versions of + angular.js that need to be installed. If you run into this issue, simply delete your + app/bower_components directory and then run npm install. +
                                                        + + +

                                                        Service

                                                        +

                                                        We create our own service to provide access to the phone data on the server. We will put the service +in its own module, under core, so we can explicitly declare its dependency on ngResource:

                                                        +


                                                        +app/core/phone/phone.module.js:

                                                        +
                                                        angular.module('core.phone', ['ngResource']);
                                                        +
                                                        +


                                                        +app/core/phone/phone.service.js:

                                                        +
                                                        angular.
                                                        +  module('core.phone').
                                                        +  factory('Phone', ['$resource',
                                                        +    function($resource) {
                                                        +      return $resource('phones/:phoneId.json', {}, {
                                                        +        query: {
                                                        +          method: 'GET',
                                                        +          params: {phoneId: 'phones'},
                                                        +          isArray: true
                                                        +        }
                                                        +      });
                                                        +    }
                                                        +  ]);
                                                        +
                                                        +

                                                        We used the module API to register a custom service using a factory function. +We passed in the name of the service — 'Phone' — and the factory function. The factory +function is similar to a controller's constructor in that both can declare dependencies to be +injected via function arguments. The Phone service declares a dependency on the $resource +service, provided by the ngResource module.

                                                        +

                                                        The $resource service makes it easy to create a RESTful +client with just a few lines of code. This client can then be used in our application, instead of +the lower-level $http service.

                                                        +


                                                        +app/core/core.module.js:

                                                        +
                                                        angular.module('core', ['core.phone']);
                                                        +
                                                        +

                                                        We need to add the core.phone module as a dependency of the core module.

                                                        +

                                                        Template

                                                        +

                                                        Our custom resource service will be defined in app/core/phone/phone.service.js, so we need to +include this file and the associated .module.js file in our layout template. Additionally, we also +need to load the angular-resource.js file, which contains the ngResource module:

                                                        +


                                                        +app/index.html:

                                                        +
                                                        <head>
                                                        +  ...
                                                        +  <script src="bower_components/angular-resource/angular-resource.js"></script>
                                                        +  ...
                                                        +  <script src="core/phone/phone.module.js"></script>
                                                        +  <script src="core/phone/phone.service.js"></script>
                                                        +  ...
                                                        +</head>
                                                        +
                                                        +

                                                        Component Controllers

                                                        +

                                                        We can now simplify our component controllers (PhoneListController and PhoneDetailController) by +factoring out the lower-level $http service, replacing it with the new Phone service. Angular's +$resource service is easier to use than $http for interacting with data sources exposed as +RESTful resources. It is also easier now to understand what the code in our controllers is doing.

                                                        +


                                                        +app/phone-list/phone-list.module.js:

                                                        +
                                                        angular.module('phoneList', ['core.phone']);
                                                        +
                                                        +


                                                        +app/phone-list/phone-list.component.js:

                                                        +
                                                        angular.
                                                        +  module('phoneList').
                                                        +  component('phoneList', {
                                                        +    templateUrl: 'phone-list/phone-list.template.html',
                                                        +    controller: ['Phone',
                                                        +      function PhoneListController(Phone) {
                                                        +        this.phones = Phone.query();
                                                        +        this.orderProp = 'age';
                                                        +      }
                                                        +    ]
                                                        +  });
                                                        +
                                                        +


                                                        +app/phone-detail/phone-detail.module.js:

                                                        +
                                                        angular.module('phoneDetail', [
                                                        +  'ngRoute',
                                                        +  'core.phone'
                                                        +]);
                                                        +
                                                        +


                                                        +app/phone-detail/phone-detail.component.js:

                                                        +
                                                        angular.
                                                        +  module('phoneDetail').
                                                        +  component('phoneDetail', {
                                                        +    templateUrl: 'phone-detail/phone-detail.template.html',
                                                        +    controller: ['$routeParams', 'Phone',
                                                        +      function PhoneDetailController($routeParams, Phone) {
                                                        +        var self = this;
                                                        +        self.phone = Phone.get({phoneId: $routeParams.phoneId}, function(phone) {
                                                        +          self.setImage(phone.images[0]);
                                                        +        });
                                                        +
                                                        +        self.setImage = function setImage(imageUrl) {
                                                        +          self.mainImageUrl = imageUrl;
                                                        +        };
                                                        +      }
                                                        +    ]
                                                        +  });
                                                        +
                                                        +

                                                        Notice how in PhoneListController we replaced:

                                                        +
                                                        $http.get('phones/phones.json').then(function(response) {
                                                        +  self.phones = response.data;
                                                        +});
                                                        +
                                                        +

                                                        with just:

                                                        +
                                                        this.phones = Phone.query();
                                                        +
                                                        +

                                                        This is a simple and declarative statement that we want to query for all phones.

                                                        +

                                                        An important thing to notice in the code above is that we don't pass any callback functions, when +invoking methods of our Phone service. Although it looks as if the results were returned +synchronously, that is not the case at all. What is returned synchronously is a "future" — an +object, which will be filled with data, when the XHR response is received. Because of the +data-binding in Angular, we can use this future and bind it to our template. Then, when the data +arrives, the view will be updated automatically.

                                                        +

                                                        Sometimes, relying on the future object and data-binding alone is not sufficient to do everything +we require, so in these cases, we can add a callback to process the server response. The +phoneDetail component's controller illustrates this by setting the mainImageUrl in a callback.

                                                        +

                                                        Testing

                                                        +

                                                        Because we are now using the ngResource module, it is necessary to update the +Karma configuration file with angular-resource.

                                                        +


                                                        +karma.conf.js:

                                                        +
                                                        files: [
                                                        +  'bower_components/angular/angular.js',
                                                        +  'bower_components/angular-resource/angular-resource.js',
                                                        +  ...
                                                        +],
                                                        +
                                                        +

                                                        We have added a unit test to verify that our new service is issuing HTTP requests and returns the +expected "future" objects/arrays.

                                                        +

                                                        The $resource service augments the response object with extra methods +— e.g. for updating and deleting the resource — and properties (some of which are only +meant to be accessed by Angular). If we were to use Jasmine's standard .toEqual() matcher, our +tests would fail, because the test values would not match the responses exactly.

                                                        +

                                                        To solve the problem, we instruct Jasmine to use a custom equality tester for +comparing objects. We specify angular.equals as our equality tester, which +ignores functions and $-prefixed properties, such as those added by the $resource service.
                                                        +(Remember that Angular uses the $ prefix for its proprietary API.)

                                                        +


                                                        +app/core/phone/phone.service.spec.js:

                                                        +
                                                        describe('Phone', function() {
                                                        +  ...
                                                        +  var phonesData = [...];
                                                        +
                                                        +  // Add a custom equality tester before each test
                                                        +  beforeEach(function() {
                                                        +    jasmine.addCustomEqualityTester(angular.equals);
                                                        +  });
                                                        +
                                                        +  // Load the module that contains the `Phone` service before each test
                                                        +  ...
                                                        +
                                                        +  // Instantiate the service and "train" `$httpBackend` before each test
                                                        +  ...
                                                        +
                                                        +  // Verify that there are no outstanding expectations or requests after each test
                                                        +  afterEach(function () {
                                                        +    $httpBackend.verifyNoOutstandingExpectation();
                                                        +    $httpBackend.verifyNoOutstandingRequest();
                                                        +  });
                                                        +
                                                        +  it('should fetch the phones data from `/phones/phones.json`', function() {
                                                        +    var phones = Phone.query();
                                                        +
                                                        +    expect(phones).toEqual([]);
                                                        +
                                                        +    $httpBackend.flush();
                                                        +    expect(phones).toEqual(phonesData);
                                                        +  });
                                                        +
                                                        +});
                                                        +
                                                        +

                                                        Here we are using $httpBackend's +verifyNoOutstandingExpectation() and +verifyNoOutstandingRequest() methods to +verify that all expected requests have been sent and that no extra request is scheduled for later.

                                                        +

                                                        Note that we have also modified our component tests to use the custom matcher when appropriate.

                                                        +

                                                        You should now see the following output in the Karma tab:

                                                        +
                                                        Chrome 49.0: Executed 5 of 5 SUCCESS (0.123 secs / 0.104 secs)
                                                        +
                                                        +

                                                        Summary

                                                        +

                                                        Now that we have seen how to build a custom service as a RESTful client, we are ready for +step 14 to learn how to enhance the user experience with animations.

                                                        +
                                                          + + + + + diff --git a/1.6.6/docs/partials/tutorial/step_14.html b/1.6.6/docs/partials/tutorial/step_14.html new file mode 100644 index 000000000..f994b3414 --- /dev/null +++ b/1.6.6/docs/partials/tutorial/step_14.html @@ -0,0 +1,470 @@ + Improve this Doc + + +
                                                            + + +

                                                            In this step, we will enhance our web application by adding CSS and JavaScript animations on top of +the template code we created earlier.

                                                            +
                                                              +
                                                            • We now use the ngAnimate module to enable animations throughout the application.
                                                            • +
                                                            • We also rely on built-in directives to automatically trigger hooks for animations to tap into.
                                                            • +
                                                            • When an animation is found, it will run along with the actual DOM operation that is being issued +on the element at the given time (e.g. inserting/removing nodes on ngRepeat or +adding/removing classes on ngClass).
                                                            • +
                                                            +
                                                            + + +

                                                            Dependencies

                                                            +

                                                            The animation functionality is provided by Angular in the ngAnimate module, which is distributed +separately from the core Angular framework. In addition we will use jQuery in this project +to do extra JavaScript animations.

                                                            +

                                                            Since we are using Bower to install client-side dependencies, this step updates the +bower.json configuration file to include the new dependencies:

                                                            +


                                                            +bower.json:

                                                            +
                                                            {
                                                            +  "name": "angular-phonecat",
                                                            +  "description": "A starter project for AngularJS",
                                                            +  "version": "0.0.0",
                                                            +  "homepage": "https://github.com/angular/angular-phonecat",
                                                            +  "license": "MIT",
                                                            +  "private": true,
                                                            +  "dependencies": {
                                                            +    "angular": "1.5.x",
                                                            +    "angular-animate": "1.5.x",
                                                            +    "angular-mocks": "1.5.x",
                                                            +    "angular-resource": "1.5.x",
                                                            +    "angular-route": "1.5.x",
                                                            +    "bootstrap": "3.3.x",
                                                            +    "jquery": "3.2.x"
                                                            +  }
                                                            +}
                                                            +
                                                            +
                                                              +
                                                            • "angular-animate": "1.5.x" tells bower to install a version of the angular-animate module that +is compatible with version 1.5.x of Angular.
                                                            • +
                                                            • "jquery": "3.2.x" tells bower to install the latest patch release of the 3.2 version of jQuery. +Note that this is not an Angular library; it is the standard jQuery library. We can use bower to +install a wide range of 3rd party libraries.
                                                            • +
                                                            +

                                                            Now, we must tell bower to download and install these dependencies.

                                                            +
                                                            npm install
                                                            +
                                                            +
                                                            + Note: If you have bower installed globally, you can run bower install, but for this project + we have preconfigured npm install to run bower for us. +
                                                            + +
                                                            + Warning: If a new version of Angular has been released since you last ran npm install, then + you may have a problem with the bower install due to a conflict between the versions of + angular.js that need to be installed. If you run into this issue, simply delete your + app/bower_components directory and then run npm install. +
                                                            + + +

                                                            How Animations work with ngAnimate

                                                            +

                                                            To get an idea of how animations work with AngularJS, you might want to read the +Animations section of the Developer Guide first.

                                                            +

                                                            Template

                                                            +

                                                            In order to enable animations, we need to update index.html, loading the necessary dependencies +(angular-animate.js and jquery.js) and the files that contain the CSS and JavaScript code +used in CSS/JavaScript animations. The animation module, ngAnimate, contains the +code necessary to make your application "animation aware".

                                                            +


                                                            +app/index.html:

                                                            +
                                                            ...
                                                            +
                                                            +<!-- Defines CSS necessary for animations -->
                                                            +<link rel="stylesheet" href="app.animations.css" />
                                                            +
                                                            +...
                                                            +
                                                            +<!-- Used for JavaScript animations (include this before angular.js) -->
                                                            +<script src="bower_components/jquery/dist/jquery.js"></script>
                                                            +
                                                            +...
                                                            +
                                                            +<!-- Adds animation support in AngularJS -->
                                                            +<script src="bower_components/angular-animate/angular-animate.js"></script>
                                                            +
                                                            +<!-- Defines JavaScript animations -->
                                                            +<script src="app.animations.js"></script>
                                                            +
                                                            +...
                                                            +
                                                            +
                                                            + Important: Be sure to use jQuery version 2.1 or newer, when using Angular 1.5; jQuery 1.x is + not officially supported. + In order for Angular to detect jQuery and take advantage of it, make sure to include jquery.js + before angular.js. +
                                                            + +

                                                            Animations can now be created within the CSS code (app.animations.css) as well as the JavaScript +code (app.animations.js).

                                                            +

                                                            Dependencies

                                                            +

                                                            We need to add a dependency on ngAnimate to our main module first:

                                                            +


                                                            +app/app.module.js:

                                                            +
                                                            angular.
                                                            +  module('phonecatApp', [
                                                            +    'ngAnimate',
                                                            +    ...
                                                            +  ]);
                                                            +
                                                            +

                                                            Now that our application is "animation aware", let's create some fancy animations!

                                                            +

                                                            CSS Transition Animations: Animating ngRepeat

                                                            +

                                                            We will start off by adding CSS transition animations to our ngRepeat directive present on the +phoneList component's template. We need to add an extra CSS class to our repeated element, in +order to be able to hook into it with our CSS animation code.

                                                            +


                                                            +app/phone-list/phone-list.template.html:

                                                            +
                                                            ...
                                                            +<ul class="phones">
                                                            +  <li ng-repeat="phone in $ctrl.phones | filter:$ctrl.query | orderBy:$ctrl.orderProp"
                                                            +      class="thumbnail phone-list-item">
                                                            +    <a href="#!/phones/{{phone.id}}" class="thumb">
                                                            +      <img ng-src="{{phone.imageUrl}}" alt="{{phone.name}}" />
                                                            +    </a>
                                                            +    <a href="#!/phones/{{phone.id}}">{{phone.name}}</a>
                                                            +    <p>{{phone.snippet}}</p>
                                                            +  </li>
                                                            +</ul>
                                                            +...
                                                            +
                                                            +

                                                            Did you notice the added phone-list-item CSS class? This is all we need in our HTML code to get +animations working.

                                                            +

                                                            Now for the actual CSS transition animation code:

                                                            +


                                                            +app/app.animations.css:

                                                            +
                                                            .phone-list-item.ng-enter,
                                                            +.phone-list-item.ng-leave,
                                                            +.phone-list-item.ng-move {
                                                            +  transition: 0.5s linear all;
                                                            +}
                                                            +
                                                            +.phone-list-item.ng-enter,
                                                            +.phone-list-item.ng-move {
                                                            +  height: 0;
                                                            +  opacity: 0;
                                                            +  overflow: hidden;
                                                            +}
                                                            +
                                                            +.phone-list-item.ng-enter.ng-enter-active,
                                                            +.phone-list-item.ng-move.ng-move-active {
                                                            +  height: 120px;
                                                            +  opacity: 1;
                                                            +}
                                                            +
                                                            +.phone-list-item.ng-leave {
                                                            +  opacity: 1;
                                                            +  overflow: hidden;
                                                            +}
                                                            +
                                                            +.phone-list-item.ng-leave.ng-leave-active {
                                                            +  height: 0;
                                                            +  opacity: 0;
                                                            +  padding-bottom: 0;
                                                            +  padding-top: 0;
                                                            +}
                                                            +
                                                            +

                                                            As you can see, our phone-list-item CSS class is combined together with the animation hooks that +occur when items are inserted into and removed from the list:

                                                            +
                                                              +
                                                            • The ng-enter class is applied to the element when a new phone is added to the list and rendered +on the page.
                                                            • +
                                                            • The ng-move class is applied to the element when a phone's relative position in the list +changes.
                                                            • +
                                                            • The ng-leave class is applied to the element when a phone is removed from the list.
                                                            • +
                                                            +

                                                            The phone list items are added and removed based on the data passed to the ngRepeat directive. +For example, if the filter data changes, the items will be animated in and out of the repeat list.

                                                            +

                                                            Something important to note is that, when an animation occurs, two sets of CSS classes are added to +the element:

                                                            +
                                                              +
                                                            1. A "starting" class that represents the style at the beginning of the animation.
                                                            2. +
                                                            3. An "active" class that represents the style at the end of the animation.
                                                            4. +
                                                            +

                                                            The name of the starting class is the name of the event that is fired (like enter, move or +leave) prefixed with ng-. So an enter event will result in adding the ng-enter class.

                                                            +

                                                            The active class name is derived from the starting class by appending an -active suffix. +This two-class CSS naming convention allows the developer to craft an animation, beginning to end.

                                                            +

                                                            In the example above, animated elements are expanded from a height of 0px to 120px when they +are added to the list and are collapsed back down to 0px before being removed from the list. +There is also a catchy fade-in/fade-out effect that occurs at the same time. All this is handled by +the CSS transition declaration at the top of the CSS file.

                                                            +
                                                            + Although all modern browsers have good support for CSS transitions and + CSS animations, IE9 and earlier IE versions do not. + If you want animations that are backwards-compatible with older browsers, consider using + JavaScript-based animations, which are demonstrated below. +
                                                            + + +

                                                            CSS Keyframe Animations: Animating ngView

                                                            +

                                                            Next, let's add an animation for transitions between route changes in +ngView.

                                                            +

                                                            Again, we need to prepare our HTML template by adding a new CSS class, this time to the ng-view +element. In order to gain more "expressive power" for our animations, we will also wrap the +[ng-view] element in a container element.

                                                            +


                                                            +app/index.html:

                                                            +
                                                            <div class="view-container">
                                                            +  <div ng-view class="view-frame"></div>
                                                            +</div>
                                                            +
                                                            +

                                                            We have applied a position: relative CSS style to the .view-container wrapper, so that it is +easier for us to manage the .view-frame element's positioning during the animation.

                                                            +

                                                            With our preparation code in place, let's move on to the actual CSS styles for this transition +animation.

                                                            +


                                                            +app/app.animations.css:

                                                            +
                                                            ...
                                                            +
                                                            +.view-container {
                                                            +  position: relative;
                                                            +}
                                                            +
                                                            +.view-frame.ng-enter,
                                                            +.view-frame.ng-leave {
                                                            +  background: white;
                                                            +  left: 0;
                                                            +  position: absolute;
                                                            +  right: 0;
                                                            +  top: 0;
                                                            +}
                                                            +
                                                            +.view-frame.ng-enter {
                                                            +  animation: 1s fade-in;
                                                            +  z-index: 100;
                                                            +}
                                                            +
                                                            +.view-frame.ng-leave {
                                                            +  animation: 1s fade-out;
                                                            +  z-index: 99;
                                                            +}
                                                            +
                                                            +@keyframes fade-in {
                                                            +  from { opacity: 0; }
                                                            +  to   { opacity: 1; }
                                                            +}
                                                            +
                                                            +@keyframes fade-out {
                                                            +  from { opacity: 1; }
                                                            +  to   { opacity: 0; }
                                                            +}
                                                            +
                                                            +/* Older browsers might need vendor-prefixes for keyframes and animation! */
                                                            +
                                                            +

                                                            Nothing fancy here! Just a simple fade-in/fade-out effect between pages. The only thing out of the +ordinary here is that we are using absolute positioning to position the entering page (identified +by the ng-enter class) on top of the leaving page (identified by the ng-leave class). At the +same time a cross-fade animation is performed. So, as the previous page is just about to be removed, +it fades out, while the new page fades in right on top of it.

                                                            +

                                                            Once the leave animation is over, the element is removed from the DOM. Likewise, once the enter +animation is complete, the ng-enter and ng-enter-active CSS classes are removed from the +element, causing it to rerender and reposition itself with its default CSS styles (so no more +absolute positioning once the animation is over). This works fluidly and the pages flow naturally +between route changes, without anything jumping around.

                                                            +

                                                            The applied CSS classes are much the same as with ngRepeat. Each time a new page is loaded the +ngView directive will create a copy of itself, download the template and append the contents. This +ensures that all views are contained within a single HTML element, which allows for easy animation +control.

                                                            +

                                                            For more on CSS animations, see the Web Platform documentation.

                                                            +

                                                            Animating ngClass with JavaScript

                                                            +

                                                            Let's add another animation to our application. On our phone-detail.template.html view, we have a +nice thumbnail swapper. By clicking on the thumbnails listed on the page, the profile phone image +changes. But how can we incorporate animations?

                                                            +

                                                            Let's give it some thought first. Basically, when a user clicks on a thumbnail image, they are +changing the state of the profile image to reflect the newly selected thumbnail image. The best way +to specify state changes within HTML is to use classes. Much like before — when we used a CSS +class to drive the animation — this time the animation will occur when the CSS class itself +changes.

                                                            +

                                                            Every time a phone thumbnail is selected, the state changes and the .selected CSS class is added +to the matching profile image. This will trigger the animation.

                                                            +

                                                            We will start by tweaking our HTML code in phone-detail.template.html. Notice that we have changed +the way we display our large image:

                                                            +


                                                            +app/phone-detail/phone-detail.template.html:

                                                            +
                                                            <div class="phone-images">
                                                            +  <img ng-src="{{img}}" class="phone"
                                                            +      ng-class="{selected: img === $ctrl.mainImageUrl}"
                                                            +      ng-repeat="img in $ctrl.phone.images" />
                                                            +</div>
                                                            +
                                                            +...
                                                            +
                                                            +

                                                            Just like with the thumbnails, we are using a repeater to display all the profile images as a +list, however we're not animating any repeat-related transitions. Instead, we will be keeping our +eye on each element's classes and especially the selected class, since its presence or absence +will determine if the element is visible or hidden. The addition/removal of the selected class is +managed by the ngClass directive, based on the specified condition +(img === $ctrl.mainImageUrl). +In our case, there is always exactly one element that has the selected class, and therefore there +will be exactly one phone profile image visible on the screen at all times.

                                                            +

                                                            When the selected class is added to an element, the selected-add and selected-add-active +classes are added just before to signal AngularJS to fire off an animation. When the selected +class is removed from an element, the selected-remove and selected-remove-active classes are +applied to the element, triggering another animation.

                                                            +

                                                            Finally, in order to ensure that the phone images are displayed correctly when the page is first +loaded, we also tweak the detail page CSS styles:

                                                            +


                                                            +app/app.css:

                                                            +
                                                            ...
                                                            +
                                                            +.phone {
                                                            +  background-color: white;
                                                            +  display: none;
                                                            +  float: left;
                                                            +  height: 400px;
                                                            +  margin-bottom: 2em;
                                                            +  margin-right: 3em;
                                                            +  padding: 2em;
                                                            +  width: 400px;
                                                            +}
                                                            +
                                                            +.phone:first-child {
                                                            +  display: block;
                                                            +}
                                                            +
                                                            +.phone-images {
                                                            +  background-color: white;
                                                            +  float: left;
                                                            +  height: 450px;
                                                            +  overflow: hidden;
                                                            +  position: relative;
                                                            +  width: 450px;
                                                            +}
                                                            +
                                                            +...
                                                            +
                                                            +

                                                            You may be thinking that we are just going to create another CSS-based animation. Although we could +do that, let's take the opportunity to learn how to create JavaScript-based animations with the +.animation() module method.

                                                            +


                                                            +app/app.animations.js:

                                                            +
                                                            angular.
                                                            +  module('phonecatApp').
                                                            +  animation('.phone', function phoneAnimationFactory() {
                                                            +    return {
                                                            +      addClass: animateIn,
                                                            +      removeClass: animateOut
                                                            +    };
                                                            +
                                                            +    function animateIn(element, className, done) {
                                                            +      if (className !== 'selected') return;
                                                            +
                                                            +      element.
                                                            +        css({
                                                            +          display: 'block',
                                                            +          position: 'absolute',
                                                            +          top: 500,
                                                            +          left: 0
                                                            +        }).
                                                            +        animate({
                                                            +          top: 0
                                                            +        }, done);
                                                            +
                                                            +      return function animateInEnd(wasCanceled) {
                                                            +        if (wasCanceled) element.stop();
                                                            +      };
                                                            +    }
                                                            +
                                                            +    function animateOut(element, className, done) {
                                                            +      if (className !== 'selected') return;
                                                            +
                                                            +      element.
                                                            +        css({
                                                            +          position: 'absolute',
                                                            +          top: 0,
                                                            +          left: 0
                                                            +        }).
                                                            +        animate({
                                                            +          top: -500
                                                            +        }, done);
                                                            +
                                                            +      return function animateOutEnd(wasCanceled) {
                                                            +        if (wasCanceled) element.stop();
                                                            +      };
                                                            +    }
                                                            +  });
                                                            +
                                                            +

                                                            We are creating a custom animation by specifying the target elements via a CSS class selector (here +.phone) and an animation factory function (here phoneAnimationFactory()). The factory function +returns an object associating specific events (object keys) to animation callbacks (object +values). The events correspond to DOM actions that ngAnimate recognizes and can hook into, such +as addClass/removeClass/setClass, enter/move/leave and animate. The associated +callbacks are called by ngAnimate at appropriate times.

                                                            +

                                                            For more info on animation factories, check out the +API Reference.

                                                            +

                                                            In this case, we are interested in a class getting added to/removed from a .phone element, thus we +specify callbacks for the addClass and removeClass events. When the selected class is added to +an element (via the ngClass directive), the addClass JavaScript callback will be executed with +element passed in as a parameter. The last parameter passed in is the done callback function. We +call done() to let Angular know that our custom JavaScript animation has ended. The removeClass +callback works the same way, but instead gets executed when a class is removed.

                                                            +

                                                            Note that we are using jQuery's animate() helper to implement the animation. jQuery +isn't required to do JavaScript animations with AngularJS, but we use it here anyway in order to +keep the example simple. More info on jQuery.animate() can be found in the +jQuery documentation.

                                                            +

                                                            Within the event callbacks, we create the animation by manipulating the DOM. In the code above, +this is achieved using element.css() and element.animate(). As a result the new element is +positioned with an offset of 500px and then both elements — the previous and the new +— are animated together by shifting each one up by 500px. The outcome is a conveyor-belt +like animation. After the animate() function has completed the animation, it calls done to +notify Angular.

                                                            +

                                                            You may have noticed that each animation callback returns a function. This is an optional +function, which (if provided) will be called when the animation ends, either because it ran to +completion or because it was canceled (for example another animation took place on the same +element). A boolean parameter (wasCanceled) is passed to the function, letting the developer know +if the animation was canceled or not. Use this function to do any necessary clean-up.

                                                            +

                                                            Experiments

                                                            +
                                                            + +
                                                              +
                                                            • Reverse the animation, so that the elements animate downwards.

                                                              +
                                                            • +
                                                            • Make the animation run faster or slower, by passing a duration argument to .animate():

                                                              +
                                                              element.css({...}).animate({...}, 1000 /* 1 second */, done);
                                                              +
                                                              +
                                                            • +
                                                            • Make the animations "asymmetrical". For example, have the previous element fade out, while the new +element zooms in:

                                                              +
                                                              // animateIn()
                                                              +element.css({
                                                              +  display: 'block',
                                                              +  opacity: 1,
                                                              +  position: 'absolute',
                                                              +  width: 0,
                                                              +  height: 0,
                                                              +  top: 200,
                                                              +  left: 200
                                                              +}).animate({
                                                              +  width: 400,
                                                              +  height: 400,
                                                              +  top: 0,
                                                              +  left: 0
                                                              +}, done);
                                                              +
                                                              +// animateOut()
                                                              +element.animate({
                                                              +  opacity: 0
                                                              +}, done);
                                                              +
                                                              +
                                                            • +
                                                            • Go crazy and come up with your own funky animations!

                                                              +
                                                            • +
                                                            +

                                                            Summary

                                                            +

                                                            Our application is now much more pleasant to use, thanks to the smooth transitions between pages +and UI states.

                                                            +

                                                            There you have it! We have created a web application in a relatively short amount of time. In the +closing notes we will cover where to go from here.

                                                            +
                                                              + + + + + diff --git a/1.6.6/docs/partials/tutorial/the_end.html b/1.6.6/docs/partials/tutorial/the_end.html new file mode 100644 index 000000000..2716caa7f --- /dev/null +++ b/1.6.6/docs/partials/tutorial/the_end.html @@ -0,0 +1,17 @@ + Improve this Doc + + +

                                                              Our application is now complete. Feel free to experiment with the code further, and jump back to +previous steps using the git checkout command.

                                                              +

                                                              For more details and examples of the Angular concepts we touched on in this tutorial, see the +Developer Guide.

                                                              +

                                                              When you are ready to start developing a project using AngularJS, we recommend that you bootstrap +your development with the angular-seed project.

                                                              +

                                                              We hope this tutorial was useful to you and that you learned enough about AngularJS to make you want +to learn more. We especially hope you are inspired to go out and develop Angular web applications of +your own, and that you might be interested in contributing to AngularJS.

                                                              +

                                                              If you have questions or feedback or just want to say "hi", please post a message to the +mailing list. You can also find us on IRC or Gitter.

                                                              + + + diff --git a/1.6.6/docs/ptore2e/example-$route-service/default_test.js b/1.6.6/docs/ptore2e/example-$route-service/default_test.js new file mode 100644 index 000000000..7ab8aba1a --- /dev/null +++ b/1.6.6/docs/ptore2e/example-$route-service/default_test.js @@ -0,0 +1,21 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-$route-service/index.html"); + }); + +it('should load and compile correct template', function() { + element(by.linkText('Moby: Ch1')).click(); + var content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller: ChapterController/); + expect(content).toMatch(/Book Id: Moby/); + expect(content).toMatch(/Chapter Id: 1/); + + element(by.partialLinkText('Scarlet')).click(); + + content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller: BookController/); + expect(content).toMatch(/Book Id: Scarlet/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-$route-service/jquery_test.js b/1.6.6/docs/ptore2e/example-$route-service/jquery_test.js new file mode 100644 index 000000000..08fcf0c38 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-$route-service/jquery_test.js @@ -0,0 +1,21 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-$route-service/index-jquery.html"); + }); + +it('should load and compile correct template', function() { + element(by.linkText('Moby: Ch1')).click(); + var content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller: ChapterController/); + expect(content).toMatch(/Book Id: Moby/); + expect(content).toMatch(/Chapter Id: 1/); + + element(by.partialLinkText('Scarlet')).click(); + + content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller: BookController/); + expect(content).toMatch(/Book Id: Scarlet/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-NgModelController/default_test.js b/1.6.6/docs/ptore2e/example-NgModelController/default_test.js new file mode 100644 index 000000000..29ae60859 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-NgModelController/default_test.js @@ -0,0 +1,24 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-NgModelController/index.html"); + }); + +it('should data-bind and become invalid', function() { + if (browser.params.browser === 'safari' || browser.params.browser === 'firefox') { + // SafariDriver can't handle contenteditable + // and Firefox driver can't clear contenteditables very well + return; + } + var contentEditable = element(by.css('[contenteditable]')); + var content = 'Change me!'; + + expect(contentEditable.getText()).toEqual(content); + + contentEditable.clear(); + contentEditable.sendKeys(protractor.Key.BACK_SPACE); + expect(contentEditable.getText()).toEqual(''); + expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-NgModelController/jquery_test.js b/1.6.6/docs/ptore2e/example-NgModelController/jquery_test.js new file mode 100644 index 000000000..d2c9ecd6b --- /dev/null +++ b/1.6.6/docs/ptore2e/example-NgModelController/jquery_test.js @@ -0,0 +1,24 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-NgModelController/index-jquery.html"); + }); + +it('should data-bind and become invalid', function() { + if (browser.params.browser === 'safari' || browser.params.browser === 'firefox') { + // SafariDriver can't handle contenteditable + // and Firefox driver can't clear contenteditables very well + return; + } + var contentEditable = element(by.css('[contenteditable]')); + var content = 'Change me!'; + + expect(contentEditable.getText()).toEqual(content); + + contentEditable.clear(); + contentEditable.sendKeys(protractor.Key.BACK_SPACE); + expect(contentEditable.getText()).toEqual(''); + expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-accessibility-ng-model/default_test.js b/1.6.6/docs/ptore2e/example-accessibility-ng-model/default_test.js new file mode 100644 index 000000000..53d2812ea --- /dev/null +++ b/1.6.6/docs/ptore2e/example-accessibility-ng-model/default_test.js @@ -0,0 +1,34 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-accessibility-ng-model/index.html"); + }); + +var checkbox = element(by.css('custom-checkbox')); +var checkedCheckbox = element(by.css('custom-checkbox.checked')); + +it('should have the `checked` class only when checked', function() { + expect(checkbox.isPresent()).toBe(true); + expect(checkedCheckbox.isPresent()).toBe(false); + + checkbox.click(); + expect(checkedCheckbox.isPresent()).toBe(true); + + checkbox.click(); + expect(checkedCheckbox.isPresent()).toBe(false); +}); + +it('should have the `aria-checked` attribute set to the appropriate value', function() { + expect(checkedCheckbox.isPresent()).toBe(false); + expect(checkbox.getAttribute('aria-checked')).toBe('false'); + + checkbox.click(); + expect(checkedCheckbox.isPresent()).toBe(true); + expect(checkbox.getAttribute('aria-checked')).toBe('true'); + + checkbox.click(); + expect(checkedCheckbox.isPresent()).toBe(false); + expect(checkbox.getAttribute('aria-checked')).toBe('false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-accessibility-ng-model/jquery_test.js b/1.6.6/docs/ptore2e/example-accessibility-ng-model/jquery_test.js new file mode 100644 index 000000000..2bea62728 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-accessibility-ng-model/jquery_test.js @@ -0,0 +1,34 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-accessibility-ng-model/index-jquery.html"); + }); + +var checkbox = element(by.css('custom-checkbox')); +var checkedCheckbox = element(by.css('custom-checkbox.checked')); + +it('should have the `checked` class only when checked', function() { + expect(checkbox.isPresent()).toBe(true); + expect(checkedCheckbox.isPresent()).toBe(false); + + checkbox.click(); + expect(checkedCheckbox.isPresent()).toBe(true); + + checkbox.click(); + expect(checkedCheckbox.isPresent()).toBe(false); +}); + +it('should have the `aria-checked` attribute set to the appropriate value', function() { + expect(checkedCheckbox.isPresent()).toBe(false); + expect(checkbox.getAttribute('aria-checked')).toBe('false'); + + checkbox.click(); + expect(checkedCheckbox.isPresent()).toBe(true); + expect(checkbox.getAttribute('aria-checked')).toBe('true'); + + checkbox.click(); + expect(checkedCheckbox.isPresent()).toBe(false); + expect(checkbox.getAttribute('aria-checked')).toBe('false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-checkbox-input-directive/default_test.js b/1.6.6/docs/ptore2e/example-checkbox-input-directive/default_test.js new file mode 100644 index 000000000..c0e371697 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-checkbox-input-directive/default_test.js @@ -0,0 +1,21 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-checkbox-input-directive/index.html"); + }); + +it('should change state', function() { + var value1 = element(by.binding('checkboxModel.value1')); + var value2 = element(by.binding('checkboxModel.value2')); + + expect(value1.getText()).toContain('true'); + expect(value2.getText()).toContain('YES'); + + element(by.model('checkboxModel.value1')).click(); + element(by.model('checkboxModel.value2')).click(); + + expect(value1.getText()).toContain('false'); + expect(value2.getText()).toContain('NO'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-checkbox-input-directive/jquery_test.js b/1.6.6/docs/ptore2e/example-checkbox-input-directive/jquery_test.js new file mode 100644 index 000000000..cf2d1e9f7 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-checkbox-input-directive/jquery_test.js @@ -0,0 +1,21 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-checkbox-input-directive/index-jquery.html"); + }); + +it('should change state', function() { + var value1 = element(by.binding('checkboxModel.value1')); + var value2 = element(by.binding('checkboxModel.value2')); + + expect(value1.getText()).toContain('true'); + expect(value2.getText()).toContain('YES'); + + element(by.model('checkboxModel.value1')).click(); + element(by.model('checkboxModel.value2')).click(); + + expect(value1.getText()).toContain('false'); + expect(value2.getText()).toContain('NO'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-compile/default_test.js b/1.6.6/docs/ptore2e/example-compile/default_test.js new file mode 100644 index 000000000..b1e6a8bed --- /dev/null +++ b/1.6.6/docs/ptore2e/example-compile/default_test.js @@ -0,0 +1,17 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-compile/index.html"); + }); + +it('should auto compile', function() { + var textarea = $('textarea'); + var output = $('div[compile]'); + // The initial state reads 'Hello Angular'. + expect(output.getText()).toBe('Hello Angular'); + textarea.clear(); + textarea.sendKeys('{{name}}!'); + expect(output.getText()).toBe('Angular!'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-compile/jquery_test.js b/1.6.6/docs/ptore2e/example-compile/jquery_test.js new file mode 100644 index 000000000..cf2c39829 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-compile/jquery_test.js @@ -0,0 +1,17 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-compile/index-jquery.html"); + }); + +it('should auto compile', function() { + var textarea = $('textarea'); + var output = $('div[compile]'); + // The initial state reads 'Hello Angular'. + expect(output.getText()).toBe('Hello Angular'); + textarea.clear(); + textarea.sendKeys('{{name}}!'); + expect(output.getText()).toBe('Angular!'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-currency-filter/default_test.js b/1.6.6/docs/ptore2e/example-currency-filter/default_test.js new file mode 100644 index 000000000..ffce491b9 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-currency-filter/default_test.js @@ -0,0 +1,25 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-currency-filter/index.html"); + }); + +it('should init with 1234.56', function() { + expect(element(by.id('currency-default')).getText()).toBe('$1,234.56'); + expect(element(by.id('currency-custom')).getText()).toBe('USD$1,234.56'); + expect(element(by.id('currency-no-fractions')).getText()).toBe('USD$1,235'); +}); +it('should update', function() { + if (browser.params.browser === 'safari') { + // Safari does not understand the minus key. See + // https://github.com/angular/protractor/issues/481 + return; + } + element(by.model('amount')).clear(); + element(by.model('amount')).sendKeys('-1234'); + expect(element(by.id('currency-default')).getText()).toBe('-$1,234.00'); + expect(element(by.id('currency-custom')).getText()).toBe('-USD$1,234.00'); + expect(element(by.id('currency-no-fractions')).getText()).toBe('-USD$1,234'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-currency-filter/jquery_test.js b/1.6.6/docs/ptore2e/example-currency-filter/jquery_test.js new file mode 100644 index 000000000..b12ed6f68 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-currency-filter/jquery_test.js @@ -0,0 +1,25 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-currency-filter/index-jquery.html"); + }); + +it('should init with 1234.56', function() { + expect(element(by.id('currency-default')).getText()).toBe('$1,234.56'); + expect(element(by.id('currency-custom')).getText()).toBe('USD$1,234.56'); + expect(element(by.id('currency-no-fractions')).getText()).toBe('USD$1,235'); +}); +it('should update', function() { + if (browser.params.browser === 'safari') { + // Safari does not understand the minus key. See + // https://github.com/angular/protractor/issues/481 + return; + } + element(by.model('amount')).clear(); + element(by.model('amount')).sendKeys('-1234'); + expect(element(by.id('currency-default')).getText()).toBe('-$1,234.00'); + expect(element(by.id('currency-custom')).getText()).toBe('-USD$1,234.00'); + expect(element(by.id('currency-no-fractions')).getText()).toBe('-USD$1,234'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-custom-interpolation-markup/default_test.js b/1.6.6/docs/ptore2e/example-custom-interpolation-markup/default_test.js new file mode 100644 index 000000000..8dab3d0f1 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-custom-interpolation-markup/default_test.js @@ -0,0 +1,11 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-custom-interpolation-markup/index.html"); + }); + +it('should interpolate binding with custom symbols', function() { + expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-custom-interpolation-markup/jquery_test.js b/1.6.6/docs/ptore2e/example-custom-interpolation-markup/jquery_test.js new file mode 100644 index 000000000..50fe9a918 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-custom-interpolation-markup/jquery_test.js @@ -0,0 +1,11 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-custom-interpolation-markup/index-jquery.html"); + }); + +it('should interpolate binding with custom symbols', function() { + expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-date-input-directive/default_test.js b/1.6.6/docs/ptore2e/example-date-input-directive/default_test.js new file mode 100644 index 000000000..fd7deadbc --- /dev/null +++ b/1.6.6/docs/ptore2e/example-date-input-directive/default_test.js @@ -0,0 +1,38 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-date-input-directive/index.html"); + }); + +var value = element(by.binding('example.value | date: "yyyy-MM-dd"')); +var valid = element(by.binding('myForm.input.$valid')); + +// currently protractor/webdriver does not support +// sending keys to all known HTML5 input controls +// for various browsers (see https://github.com/angular/protractor/issues/562). +function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); +} + +it('should initialize to model', function() { + expect(value.getText()).toContain('2013-10-22'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); +}); + +it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); +}); + +it('should be invalid if over max', function() { + setInput('2015-01-01'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-date-input-directive/jquery_test.js b/1.6.6/docs/ptore2e/example-date-input-directive/jquery_test.js new file mode 100644 index 000000000..9c445f2ff --- /dev/null +++ b/1.6.6/docs/ptore2e/example-date-input-directive/jquery_test.js @@ -0,0 +1,38 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-date-input-directive/index-jquery.html"); + }); + +var value = element(by.binding('example.value | date: "yyyy-MM-dd"')); +var valid = element(by.binding('myForm.input.$valid')); + +// currently protractor/webdriver does not support +// sending keys to all known HTML5 input controls +// for various browsers (see https://github.com/angular/protractor/issues/562). +function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); +} + +it('should initialize to model', function() { + expect(value.getText()).toContain('2013-10-22'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); +}); + +it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); +}); + +it('should be invalid if over max', function() { + setInput('2015-01-01'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-datetimelocal-input-directive/default_test.js b/1.6.6/docs/ptore2e/example-datetimelocal-input-directive/default_test.js new file mode 100644 index 000000000..b01b3dfaf --- /dev/null +++ b/1.6.6/docs/ptore2e/example-datetimelocal-input-directive/default_test.js @@ -0,0 +1,38 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-datetimelocal-input-directive/index.html"); + }); + +var value = element(by.binding('example.value | date: "yyyy-MM-ddTHH:mm:ss"')); +var valid = element(by.binding('myForm.input.$valid')); + +// currently protractor/webdriver does not support +// sending keys to all known HTML5 input controls +// for various browsers (https://github.com/angular/protractor/issues/562). +function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); +} + +it('should initialize to model', function() { + expect(value.getText()).toContain('2010-12-28T14:57:00'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); +}); + +it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); +}); + +it('should be invalid if over max', function() { + setInput('2015-01-01T23:59:00'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-datetimelocal-input-directive/jquery_test.js b/1.6.6/docs/ptore2e/example-datetimelocal-input-directive/jquery_test.js new file mode 100644 index 000000000..3f2912661 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-datetimelocal-input-directive/jquery_test.js @@ -0,0 +1,38 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-datetimelocal-input-directive/index-jquery.html"); + }); + +var value = element(by.binding('example.value | date: "yyyy-MM-ddTHH:mm:ss"')); +var valid = element(by.binding('myForm.input.$valid')); + +// currently protractor/webdriver does not support +// sending keys to all known HTML5 input controls +// for various browsers (https://github.com/angular/protractor/issues/562). +function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); +} + +it('should initialize to model', function() { + expect(value.getText()).toContain('2010-12-28T14:57:00'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); +}); + +it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); +}); + +it('should be invalid if over max', function() { + setInput('2015-01-01T23:59:00'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-directive-bind/default_test.js b/1.6.6/docs/ptore2e/example-directive-bind/default_test.js new file mode 100644 index 000000000..0638fbdcd --- /dev/null +++ b/1.6.6/docs/ptore2e/example-directive-bind/default_test.js @@ -0,0 +1,17 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-directive-bind/index.html"); + }); + +it('should show off bindings', function() { + var containerElm = element(by.css('div[ng-controller="Controller"]')); + var nameBindings = containerElm.all(by.binding('name')); + + expect(nameBindings.count()).toBe(5); + nameBindings.each(function(elem) { + expect(elem.getText()).toEqual('Max Karl Ernst Ludwig Planck (April 23, 1858 – October 4, 1947)'); + }); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-directive-bind/jquery_test.js b/1.6.6/docs/ptore2e/example-directive-bind/jquery_test.js new file mode 100644 index 000000000..4691f3abd --- /dev/null +++ b/1.6.6/docs/ptore2e/example-directive-bind/jquery_test.js @@ -0,0 +1,17 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-directive-bind/index-jquery.html"); + }); + +it('should show off bindings', function() { + var containerElm = element(by.css('div[ng-controller="Controller"]')); + var nameBindings = containerElm.all(by.binding('name')); + + expect(nameBindings.count()).toBe(5); + nameBindings.each(function(elem) { + expect(elem.getText()).toEqual('Max Karl Ernst Ludwig Planck (April 23, 1858 – October 4, 1947)'); + }); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-directive-decorator/default_test.js b/1.6.6/docs/ptore2e/example-directive-decorator/default_test.js new file mode 100644 index 000000000..d2501770b --- /dev/null +++ b/1.6.6/docs/ptore2e/example-directive-decorator/default_test.js @@ -0,0 +1,28 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-directive-decorator/index.html"); + }); + +it('should warn when an expression in the interpolated value is falsy', function() { + var id3 = element(by.id('id3')); + var id8 = element(by.id('id8')); + var someOther = element(by.id('someOtherId')); + var someOther5 = element(by.id('someOtherId5')); + + expect(id3.getText()).toEqual('View Product 3'); + expect(id3.getAttribute('href')).toContain('/products/3/view'); + + expect(id8.getText()).toEqual('View Product 8'); + expect(id8.getAttribute('href')).toContain('/products/8/view'); + + expect(someOther.getText()).toEqual('View Product'); + expect(someOther.getAttribute('href')).toContain('/products//view'); + + expect(someOther5.getText()).toEqual('View Product 5'); + expect(someOther5.getAttribute('href')).toContain('/products/5/view'); + + expect(element(by.binding('warnCount')).getText()).toEqual('Warn Count: 1'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-directive-decorator/jquery_test.js b/1.6.6/docs/ptore2e/example-directive-decorator/jquery_test.js new file mode 100644 index 000000000..2a625669d --- /dev/null +++ b/1.6.6/docs/ptore2e/example-directive-decorator/jquery_test.js @@ -0,0 +1,28 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-directive-decorator/index-jquery.html"); + }); + +it('should warn when an expression in the interpolated value is falsy', function() { + var id3 = element(by.id('id3')); + var id8 = element(by.id('id8')); + var someOther = element(by.id('someOtherId')); + var someOther5 = element(by.id('someOtherId5')); + + expect(id3.getText()).toEqual('View Product 3'); + expect(id3.getAttribute('href')).toContain('/products/3/view'); + + expect(id8.getText()).toEqual('View Product 8'); + expect(id8.getAttribute('href')).toContain('/products/8/view'); + + expect(someOther.getText()).toEqual('View Product'); + expect(someOther.getAttribute('href')).toContain('/products//view'); + + expect(someOther5.getText()).toEqual('View Product 5'); + expect(someOther5.getAttribute('href')).toContain('/products/5/view'); + + expect(element(by.binding('warnCount')).getText()).toEqual('Warn Count: 1'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-email-input-directive/default_test.js b/1.6.6/docs/ptore2e/example-email-input-directive/default_test.js new file mode 100644 index 000000000..962c64efc --- /dev/null +++ b/1.6.6/docs/ptore2e/example-email-input-directive/default_test.js @@ -0,0 +1,30 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-email-input-directive/index.html"); + }); + +var text = element(by.binding('email.text')); +var valid = element(by.binding('myForm.input.$valid')); +var input = element(by.model('email.text')); + +it('should initialize to model', function() { + expect(text.getText()).toContain('me@example.com'); + expect(valid.getText()).toContain('true'); +}); + +it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + expect(text.getText()).toEqual('text ='); + expect(valid.getText()).toContain('false'); +}); + +it('should be invalid if not email', function() { + input.clear(); + input.sendKeys('xxx'); + + expect(valid.getText()).toContain('false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-email-input-directive/jquery_test.js b/1.6.6/docs/ptore2e/example-email-input-directive/jquery_test.js new file mode 100644 index 000000000..8175a0eee --- /dev/null +++ b/1.6.6/docs/ptore2e/example-email-input-directive/jquery_test.js @@ -0,0 +1,30 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-email-input-directive/index-jquery.html"); + }); + +var text = element(by.binding('email.text')); +var valid = element(by.binding('myForm.input.$valid')); +var input = element(by.model('email.text')); + +it('should initialize to model', function() { + expect(text.getText()).toContain('me@example.com'); + expect(valid.getText()).toContain('true'); +}); + +it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + expect(text.getText()).toEqual('text ='); + expect(valid.getText()).toContain('false'); +}); + +it('should be invalid if not email', function() { + input.clear(); + input.sendKeys('xxx'); + + expect(valid.getText()).toContain('false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-example.csp/default_test.js b/1.6.6/docs/ptore2e/example-example.csp/default_test.js new file mode 100644 index 000000000..7aaeef4da --- /dev/null +++ b/1.6.6/docs/ptore2e/example-example.csp/default_test.js @@ -0,0 +1,85 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-example.csp/index.html"); + }); + +var util, webdriver; + +var incBtn = element(by.id('inc')); +var counter = element(by.id('counter')); +var evilBtn = element(by.id('evil')); +var evilError = element(by.id('evilError')); + +function getAndClearSevereErrors() { + return browser.manage().logs().get('browser').then(function(browserLog) { + return browserLog.filter(function(logEntry) { + return logEntry.level.value > webdriver.logging.Level.WARNING.value; + }); + }); +} + +function clearErrors() { + getAndClearSevereErrors(); +} + +function expectNoErrors() { + getAndClearSevereErrors().then(function(filteredLog) { + expect(filteredLog.length).toEqual(0); + if (filteredLog.length) { + console.log('browser console errors: ' + util.inspect(filteredLog)); + } + }); +} + +function expectError(regex) { + getAndClearSevereErrors().then(function(filteredLog) { + var found = false; + filteredLog.forEach(function(log) { + if (log.message.match(regex)) { + found = true; + } + }); + if (!found) { + throw new Error('expected an error that matches ' + regex); + } + }); +} + +beforeEach(function() { + util = require('util'); + webdriver = require('selenium-webdriver'); +}); + +// For now, we only test on Chrome, +// as Safari does not load the page with Protractor's injected scripts, +// and Firefox webdriver always disables content security policy (#6358) +if (browser.params.browser !== 'chrome') { + return; +} + +it('should not report errors when the page is loaded', function() { + // clear errors so we are not dependent on previous tests + clearErrors(); + // Need to reload the page as the page is already loaded when + // we come here + browser.driver.getCurrentUrl().then(function(url) { + browser.get(url); + }); + expectNoErrors(); +}); + +it('should evaluate expressions', function() { + expect(counter.getText()).toEqual('0'); + incBtn.click(); + expect(counter.getText()).toEqual('1'); + expectNoErrors(); +}); + +it('should throw and report an error when using "eval"', function() { + evilBtn.click(); + expect(evilError.getText()).toMatch(/Content Security Policy/); + expectError(/Content Security Policy/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-example.csp/jquery_test.js b/1.6.6/docs/ptore2e/example-example.csp/jquery_test.js new file mode 100644 index 000000000..c1c6cc9b7 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-example.csp/jquery_test.js @@ -0,0 +1,85 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-example.csp/index-jquery.html"); + }); + +var util, webdriver; + +var incBtn = element(by.id('inc')); +var counter = element(by.id('counter')); +var evilBtn = element(by.id('evil')); +var evilError = element(by.id('evilError')); + +function getAndClearSevereErrors() { + return browser.manage().logs().get('browser').then(function(browserLog) { + return browserLog.filter(function(logEntry) { + return logEntry.level.value > webdriver.logging.Level.WARNING.value; + }); + }); +} + +function clearErrors() { + getAndClearSevereErrors(); +} + +function expectNoErrors() { + getAndClearSevereErrors().then(function(filteredLog) { + expect(filteredLog.length).toEqual(0); + if (filteredLog.length) { + console.log('browser console errors: ' + util.inspect(filteredLog)); + } + }); +} + +function expectError(regex) { + getAndClearSevereErrors().then(function(filteredLog) { + var found = false; + filteredLog.forEach(function(log) { + if (log.message.match(regex)) { + found = true; + } + }); + if (!found) { + throw new Error('expected an error that matches ' + regex); + } + }); +} + +beforeEach(function() { + util = require('util'); + webdriver = require('selenium-webdriver'); +}); + +// For now, we only test on Chrome, +// as Safari does not load the page with Protractor's injected scripts, +// and Firefox webdriver always disables content security policy (#6358) +if (browser.params.browser !== 'chrome') { + return; +} + +it('should not report errors when the page is loaded', function() { + // clear errors so we are not dependent on previous tests + clearErrors(); + // Need to reload the page as the page is already loaded when + // we come here + browser.driver.getCurrentUrl().then(function(url) { + browser.get(url); + }); + expectNoErrors(); +}); + +it('should evaluate expressions', function() { + expect(counter.getText()).toEqual('0'); + incBtn.click(); + expect(counter.getText()).toEqual('1'); + expectNoErrors(); +}); + +it('should throw and report an error when using "eval"', function() { + evilBtn.click(); + expect(evilError.getText()).toMatch(/Content Security Policy/); + expectError(/Content Security Policy/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-expression-eval/default_test.js b/1.6.6/docs/ptore2e/example-expression-eval/default_test.js new file mode 100644 index 000000000..630c85195 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-expression-eval/default_test.js @@ -0,0 +1,14 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-expression-eval/index.html"); + }); + +it('should allow user expression testing', function() { + element(by.css('.expressions button')).click(); + var lis = element(by.css('.expressions ul')).all(by.repeater('expr in exprs')); + expect(lis.count()).toBe(1); + expect(lis.get(0).getText()).toEqual('[ X ] 3*10|currency => $30.00'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-expression-eval/jquery_test.js b/1.6.6/docs/ptore2e/example-expression-eval/jquery_test.js new file mode 100644 index 000000000..44b2f5b0b --- /dev/null +++ b/1.6.6/docs/ptore2e/example-expression-eval/jquery_test.js @@ -0,0 +1,14 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-expression-eval/index-jquery.html"); + }); + +it('should allow user expression testing', function() { + element(by.css('.expressions button')).click(); + var lis = element(by.css('.expressions ul')).all(by.repeater('expr in exprs')); + expect(lis.count()).toBe(1); + expect(lis.get(0).getText()).toEqual('[ X ] 3*10|currency => $30.00'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-expression-locals/default_test.js b/1.6.6/docs/ptore2e/example-expression-locals/default_test.js new file mode 100644 index 000000000..73b7efbfa --- /dev/null +++ b/1.6.6/docs/ptore2e/example-expression-locals/default_test.js @@ -0,0 +1,24 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-expression-locals/index.html"); + }); + +it('should calculate expression in binding', function() { + if (browser.params.browser === 'safari') { + // Safari can't handle dialogs. + return; + } + element(by.css('[ng-click="greet()"]')).click(); + + // We need to give the browser time to display the alert + browser.wait(protractor.ExpectedConditions.alertIsPresent(), 1000); + + var alertDialog = browser.switchTo().alert(); + + expect(alertDialog.getText()).toEqual('Hello World'); + + alertDialog.accept(); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-expression-locals/jquery_test.js b/1.6.6/docs/ptore2e/example-expression-locals/jquery_test.js new file mode 100644 index 000000000..1548e5223 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-expression-locals/jquery_test.js @@ -0,0 +1,24 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-expression-locals/index-jquery.html"); + }); + +it('should calculate expression in binding', function() { + if (browser.params.browser === 'safari') { + // Safari can't handle dialogs. + return; + } + element(by.css('[ng-click="greet()"]')).click(); + + // We need to give the browser time to display the alert + browser.wait(protractor.ExpectedConditions.alertIsPresent(), 1000); + + var alertDialog = browser.switchTo().alert(); + + expect(alertDialog.getText()).toEqual('Hello World'); + + alertDialog.accept(); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-expression-one-time/default_test.js b/1.6.6/docs/ptore2e/example-expression-one-time/default_test.js new file mode 100644 index 000000000..bc40d1732 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-expression-one-time/default_test.js @@ -0,0 +1,29 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-expression-one-time/index.html"); + }); + +it('should freeze binding after its value has stabilized', function() { + var oneTimeBinding = element(by.id('one-time-binding-example')); + var normalBinding = element(by.id('normal-binding-example')); + + expect(oneTimeBinding.getText()).toEqual('One time binding:'); + expect(normalBinding.getText()).toEqual('Normal binding:'); + element(by.buttonText('Click Me')).click(); + + expect(oneTimeBinding.getText()).toEqual('One time binding: Igor'); + expect(normalBinding.getText()).toEqual('Normal binding: Igor'); + element(by.buttonText('Click Me')).click(); + + expect(oneTimeBinding.getText()).toEqual('One time binding: Igor'); + expect(normalBinding.getText()).toEqual('Normal binding: Misko'); + + element(by.buttonText('Click Me')).click(); + element(by.buttonText('Click Me')).click(); + + expect(oneTimeBinding.getText()).toEqual('One time binding: Igor'); + expect(normalBinding.getText()).toEqual('Normal binding: Lucas'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-expression-one-time/jquery_test.js b/1.6.6/docs/ptore2e/example-expression-one-time/jquery_test.js new file mode 100644 index 000000000..f8056c006 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-expression-one-time/jquery_test.js @@ -0,0 +1,29 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-expression-one-time/index-jquery.html"); + }); + +it('should freeze binding after its value has stabilized', function() { + var oneTimeBinding = element(by.id('one-time-binding-example')); + var normalBinding = element(by.id('normal-binding-example')); + + expect(oneTimeBinding.getText()).toEqual('One time binding:'); + expect(normalBinding.getText()).toEqual('Normal binding:'); + element(by.buttonText('Click Me')).click(); + + expect(oneTimeBinding.getText()).toEqual('One time binding: Igor'); + expect(normalBinding.getText()).toEqual('Normal binding: Igor'); + element(by.buttonText('Click Me')).click(); + + expect(oneTimeBinding.getText()).toEqual('One time binding: Igor'); + expect(normalBinding.getText()).toEqual('Normal binding: Misko'); + + element(by.buttonText('Click Me')).click(); + element(by.buttonText('Click Me')).click(); + + expect(oneTimeBinding.getText()).toEqual('One time binding: Igor'); + expect(normalBinding.getText()).toEqual('Normal binding: Lucas'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-expression-simple/default_test.js b/1.6.6/docs/ptore2e/example-expression-simple/default_test.js new file mode 100644 index 000000000..54e2e9908 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-expression-simple/default_test.js @@ -0,0 +1,11 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-expression-simple/index.html"); + }); + +it('should calculate expression in binding', function() { + expect(element(by.binding('1+2')).getText()).toEqual('1+2=3'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-expression-simple/jquery_test.js b/1.6.6/docs/ptore2e/example-expression-simple/jquery_test.js new file mode 100644 index 000000000..55092cf1a --- /dev/null +++ b/1.6.6/docs/ptore2e/example-expression-simple/jquery_test.js @@ -0,0 +1,11 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-expression-simple/index-jquery.html"); + }); + +it('should calculate expression in binding', function() { + expect(element(by.binding('1+2')).getText()).toEqual('1+2=3'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-filter-date/default_test.js b/1.6.6/docs/ptore2e/example-filter-date/default_test.js new file mode 100644 index 000000000..3d14fc063 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-filter-date/default_test.js @@ -0,0 +1,18 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-filter-date/index.html"); + }); + +it('should format date', function() { + expect(element(by.binding("1288323623006 | date:'medium'")).getText()). + toMatch(/Oct 2\d, 2010 \d{1,2}:\d{2}:\d{2} (AM|PM)/); + expect(element(by.binding("1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'")).getText()). + toMatch(/2010-10-2\d \d{2}:\d{2}:\d{2} (-|\+)?\d{4}/); + expect(element(by.binding("'1288323623006' | date:'MM/dd/yyyy @ h:mma'")).getText()). + toMatch(/10\/2\d\/2010 @ \d{1,2}:\d{2}(AM|PM)/); + expect(element(by.binding("'1288323623006' | date:\"MM/dd/yyyy 'at' h:mma\"")).getText()). + toMatch(/10\/2\d\/2010 at \d{1,2}:\d{2}(AM|PM)/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-filter-date/jquery_test.js b/1.6.6/docs/ptore2e/example-filter-date/jquery_test.js new file mode 100644 index 000000000..574da3691 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-filter-date/jquery_test.js @@ -0,0 +1,18 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-filter-date/index-jquery.html"); + }); + +it('should format date', function() { + expect(element(by.binding("1288323623006 | date:'medium'")).getText()). + toMatch(/Oct 2\d, 2010 \d{1,2}:\d{2}:\d{2} (AM|PM)/); + expect(element(by.binding("1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'")).getText()). + toMatch(/2010-10-2\d \d{2}:\d{2}:\d{2} (-|\+)?\d{4}/); + expect(element(by.binding("'1288323623006' | date:'MM/dd/yyyy @ h:mma'")).getText()). + toMatch(/10\/2\d\/2010 @ \d{1,2}:\d{2}(AM|PM)/); + expect(element(by.binding("'1288323623006' | date:\"MM/dd/yyyy 'at' h:mma\"")).getText()). + toMatch(/10\/2\d\/2010 at \d{1,2}:\d{2}(AM|PM)/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-filter-decorator/default_test.js b/1.6.6/docs/ptore2e/example-filter-decorator/default_test.js new file mode 100644 index 000000000..72adb3771 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-filter-decorator/default_test.js @@ -0,0 +1,17 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-filter-decorator/index.html"); + }); + +it('should default date filter to short date format', function() { + expect(element(by.id('genesis')).getText()) + .toMatch(/Initial Commit default to short date: \d{1,2}\/\d{1,2}\/\d{2}/); +}); + +it('should still allow dates to be formatted', function() { + expect(element(by.id('ngConf')).getText()) + .toMatch(/ng-conf 2016 with full date format: [A-Za-z]+, [A-Za-z]+ \d{1,2}, \d{4}/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-filter-decorator/jquery_test.js b/1.6.6/docs/ptore2e/example-filter-decorator/jquery_test.js new file mode 100644 index 000000000..f7ff2213d --- /dev/null +++ b/1.6.6/docs/ptore2e/example-filter-decorator/jquery_test.js @@ -0,0 +1,17 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-filter-decorator/index-jquery.html"); + }); + +it('should default date filter to short date format', function() { + expect(element(by.id('genesis')).getText()) + .toMatch(/Initial Commit default to short date: \d{1,2}\/\d{1,2}\/\d{2}/); +}); + +it('should still allow dates to be formatted', function() { + expect(element(by.id('ngConf')).getText()) + .toMatch(/ng-conf 2016 with full date format: [A-Za-z]+, [A-Za-z]+ \d{1,2}, \d{4}/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-filter-filter/default_test.js b/1.6.6/docs/ptore2e/example-filter-filter/default_test.js new file mode 100644 index 000000000..0b3d7f32c --- /dev/null +++ b/1.6.6/docs/ptore2e/example-filter-filter/default_test.js @@ -0,0 +1,41 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-filter-filter/index.html"); + }); + +var expectFriendNames = function(expectedNames, key) { + element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) { + arr.forEach(function(wd, i) { + expect(wd.getText()).toMatch(expectedNames[i]); + }); + }); +}; + +it('should search across all fields when filtering with a string', function() { + var searchText = element(by.model('searchText')); + searchText.clear(); + searchText.sendKeys('m'); + expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend'); + + searchText.clear(); + searchText.sendKeys('76'); + expectFriendNames(['John', 'Julie'], 'friend'); +}); + +it('should search in specific fields when filtering with a predicate object', function() { + var searchAny = element(by.model('search.$')); + searchAny.clear(); + searchAny.sendKeys('i'); + expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj'); +}); +it('should use a equal comparison when comparator is true', function() { + var searchName = element(by.model('search.name')); + var strict = element(by.model('strict')); + searchName.clear(); + searchName.sendKeys('Julie'); + strict.click(); + expectFriendNames(['Julie'], 'friendObj'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-filter-filter/jquery_test.js b/1.6.6/docs/ptore2e/example-filter-filter/jquery_test.js new file mode 100644 index 000000000..47c75617c --- /dev/null +++ b/1.6.6/docs/ptore2e/example-filter-filter/jquery_test.js @@ -0,0 +1,41 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-filter-filter/index-jquery.html"); + }); + +var expectFriendNames = function(expectedNames, key) { + element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) { + arr.forEach(function(wd, i) { + expect(wd.getText()).toMatch(expectedNames[i]); + }); + }); +}; + +it('should search across all fields when filtering with a string', function() { + var searchText = element(by.model('searchText')); + searchText.clear(); + searchText.sendKeys('m'); + expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend'); + + searchText.clear(); + searchText.sendKeys('76'); + expectFriendNames(['John', 'Julie'], 'friend'); +}); + +it('should search in specific fields when filtering with a predicate object', function() { + var searchAny = element(by.model('search.$')); + searchAny.clear(); + searchAny.sendKeys('i'); + expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj'); +}); +it('should use a equal comparison when comparator is true', function() { + var searchName = element(by.model('search.name')); + var strict = element(by.model('strict')); + searchName.clear(); + searchName.sendKeys('Julie'); + strict.click(); + expectFriendNames(['Julie'], 'friendObj'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-filter-json/default_test.js b/1.6.6/docs/ptore2e/example-filter-json/default_test.js new file mode 100644 index 000000000..7469d78ef --- /dev/null +++ b/1.6.6/docs/ptore2e/example-filter-json/default_test.js @@ -0,0 +1,12 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-filter-json/index.html"); + }); + +it('should jsonify filtered objects', function() { + expect(element(by.id('default-spacing')).getText()).toMatch(/\{\n {2}"name": ?"value"\n}/); + expect(element(by.id('custom-spacing')).getText()).toMatch(/\{\n {4}"name": ?"value"\n}/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-filter-json/jquery_test.js b/1.6.6/docs/ptore2e/example-filter-json/jquery_test.js new file mode 100644 index 000000000..bd8f19e13 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-filter-json/jquery_test.js @@ -0,0 +1,12 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-filter-json/index-jquery.html"); + }); + +it('should jsonify filtered objects', function() { + expect(element(by.id('default-spacing')).getText()).toMatch(/\{\n {2}"name": ?"value"\n}/); + expect(element(by.id('custom-spacing')).getText()).toMatch(/\{\n {4}"name": ?"value"\n}/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-http-service/default_test.js b/1.6.6/docs/ptore2e/example-http-service/default_test.js new file mode 100644 index 000000000..cb8cf5700 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-http-service/default_test.js @@ -0,0 +1,37 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-http-service/index.html"); + }); + + var status = element(by.binding('status')); + var data = element(by.binding('data')); + var fetchBtn = element(by.id('fetchbtn')); + var sampleGetBtn = element(by.id('samplegetbtn')); + var invalidJsonpBtn = element(by.id('invalidjsonpbtn')); + + it('should make an xhr GET request', function() { + sampleGetBtn.click(); + fetchBtn.click(); + expect(status.getText()).toMatch('200'); + expect(data.getText()).toMatch(/Hello, \$http!/); + }); + +// Commented out due to flakes. See https://github.com/angular/angular.js/issues/9185 +// it('should make a JSONP request to angularjs.org', function() { +// var sampleJsonpBtn = element(by.id('samplejsonpbtn')); +// sampleJsonpBtn.click(); +// fetchBtn.click(); +// expect(status.getText()).toMatch('200'); +// expect(data.getText()).toMatch(/Super Hero!/); +// }); + + it('should make JSONP request to invalid URL and invoke the error handler', + function() { + invalidJsonpBtn.click(); + fetchBtn.click(); + expect(status.getText()).toMatch('0'); + expect(data.getText()).toMatch('Request failed'); + }); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-http-service/jquery_test.js b/1.6.6/docs/ptore2e/example-http-service/jquery_test.js new file mode 100644 index 000000000..a384cfd6f --- /dev/null +++ b/1.6.6/docs/ptore2e/example-http-service/jquery_test.js @@ -0,0 +1,37 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-http-service/index-jquery.html"); + }); + + var status = element(by.binding('status')); + var data = element(by.binding('data')); + var fetchBtn = element(by.id('fetchbtn')); + var sampleGetBtn = element(by.id('samplegetbtn')); + var invalidJsonpBtn = element(by.id('invalidjsonpbtn')); + + it('should make an xhr GET request', function() { + sampleGetBtn.click(); + fetchBtn.click(); + expect(status.getText()).toMatch('200'); + expect(data.getText()).toMatch(/Hello, \$http!/); + }); + +// Commented out due to flakes. See https://github.com/angular/angular.js/issues/9185 +// it('should make a JSONP request to angularjs.org', function() { +// var sampleJsonpBtn = element(by.id('samplejsonpbtn')); +// sampleJsonpBtn.click(); +// fetchBtn.click(); +// expect(status.getText()).toMatch('200'); +// expect(data.getText()).toMatch(/Super Hero!/); +// }); + + it('should make JSONP request to invalid URL and invoke the error handler', + function() { + invalidJsonpBtn.click(); + fetchBtn.click(); + expect(status.getText()).toMatch('0'); + expect(data.getText()).toMatch('Request failed'); + }); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-input-directive/default_test.js b/1.6.6/docs/ptore2e/example-input-directive/default_test.js new file mode 100644 index 000000000..46b85069c --- /dev/null +++ b/1.6.6/docs/ptore2e/example-input-directive/default_test.js @@ -0,0 +1,59 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-input-directive/index.html"); + }); + +var user = element(by.exactBinding('user')); +var userNameValid = element(by.binding('myForm.userName.$valid')); +var lastNameValid = element(by.binding('myForm.lastName.$valid')); +var lastNameError = element(by.binding('myForm.lastName.$error')); +var formValid = element(by.binding('myForm.$valid')); +var userNameInput = element(by.model('user.name')); +var userLastInput = element(by.model('user.last')); + +it('should initialize to model', function() { + expect(user.getText()).toContain('{"name":"guest","last":"visitor"}'); + expect(userNameValid.getText()).toContain('true'); + expect(formValid.getText()).toContain('true'); +}); + +it('should be invalid if empty when required', function() { + userNameInput.clear(); + userNameInput.sendKeys(''); + + expect(user.getText()).toContain('{"last":"visitor"}'); + expect(userNameValid.getText()).toContain('false'); + expect(formValid.getText()).toContain('false'); +}); + +it('should be valid if empty when min length is set', function() { + userLastInput.clear(); + userLastInput.sendKeys(''); + + expect(user.getText()).toContain('{"name":"guest","last":""}'); + expect(lastNameValid.getText()).toContain('true'); + expect(formValid.getText()).toContain('true'); +}); + +it('should be invalid if less than required min length', function() { + userLastInput.clear(); + userLastInput.sendKeys('xx'); + + expect(user.getText()).toContain('{"name":"guest"}'); + expect(lastNameValid.getText()).toContain('false'); + expect(lastNameError.getText()).toContain('minlength'); + expect(formValid.getText()).toContain('false'); +}); + +it('should be invalid if longer than max length', function() { + userLastInput.clear(); + userLastInput.sendKeys('some ridiculously long name'); + + expect(user.getText()).toContain('{"name":"guest"}'); + expect(lastNameValid.getText()).toContain('false'); + expect(lastNameError.getText()).toContain('maxlength'); + expect(formValid.getText()).toContain('false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-input-directive/jquery_test.js b/1.6.6/docs/ptore2e/example-input-directive/jquery_test.js new file mode 100644 index 000000000..8f15e12bc --- /dev/null +++ b/1.6.6/docs/ptore2e/example-input-directive/jquery_test.js @@ -0,0 +1,59 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-input-directive/index-jquery.html"); + }); + +var user = element(by.exactBinding('user')); +var userNameValid = element(by.binding('myForm.userName.$valid')); +var lastNameValid = element(by.binding('myForm.lastName.$valid')); +var lastNameError = element(by.binding('myForm.lastName.$error')); +var formValid = element(by.binding('myForm.$valid')); +var userNameInput = element(by.model('user.name')); +var userLastInput = element(by.model('user.last')); + +it('should initialize to model', function() { + expect(user.getText()).toContain('{"name":"guest","last":"visitor"}'); + expect(userNameValid.getText()).toContain('true'); + expect(formValid.getText()).toContain('true'); +}); + +it('should be invalid if empty when required', function() { + userNameInput.clear(); + userNameInput.sendKeys(''); + + expect(user.getText()).toContain('{"last":"visitor"}'); + expect(userNameValid.getText()).toContain('false'); + expect(formValid.getText()).toContain('false'); +}); + +it('should be valid if empty when min length is set', function() { + userLastInput.clear(); + userLastInput.sendKeys(''); + + expect(user.getText()).toContain('{"name":"guest","last":""}'); + expect(lastNameValid.getText()).toContain('true'); + expect(formValid.getText()).toContain('true'); +}); + +it('should be invalid if less than required min length', function() { + userLastInput.clear(); + userLastInput.sendKeys('xx'); + + expect(user.getText()).toContain('{"name":"guest"}'); + expect(lastNameValid.getText()).toContain('false'); + expect(lastNameError.getText()).toContain('minlength'); + expect(formValid.getText()).toContain('false'); +}); + +it('should be invalid if longer than max length', function() { + userLastInput.clear(); + userLastInput.sendKeys('some ridiculously long name'); + + expect(user.getText()).toContain('{"name":"guest"}'); + expect(lastNameValid.getText()).toContain('false'); + expect(lastNameError.getText()).toContain('maxlength'); + expect(formValid.getText()).toContain('false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-limit-to-filter/default_test.js b/1.6.6/docs/ptore2e/example-limit-to-filter/default_test.js new file mode 100644 index 000000000..d7140dd71 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-limit-to-filter/default_test.js @@ -0,0 +1,48 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-limit-to-filter/index.html"); + }); + +var numLimitInput = element(by.model('numLimit')); +var letterLimitInput = element(by.model('letterLimit')); +var longNumberLimitInput = element(by.model('longNumberLimit')); +var limitedNumbers = element(by.binding('numbers | limitTo:numLimit')); +var limitedLetters = element(by.binding('letters | limitTo:letterLimit')); +var limitedLongNumber = element(by.binding('longNumber | limitTo:longNumberLimit')); + +it('should limit the number array to first three items', function() { + expect(numLimitInput.getAttribute('value')).toBe('3'); + expect(letterLimitInput.getAttribute('value')).toBe('3'); + expect(longNumberLimitInput.getAttribute('value')).toBe('3'); + expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]'); + expect(limitedLetters.getText()).toEqual('Output letters: abc'); + expect(limitedLongNumber.getText()).toEqual('Output long number: 234'); +}); + +// There is a bug in safari and protractor that doesn't like the minus key +// it('should update the output when -3 is entered', function() { +// numLimitInput.clear(); +// numLimitInput.sendKeys('-3'); +// letterLimitInput.clear(); +// letterLimitInput.sendKeys('-3'); +// longNumberLimitInput.clear(); +// longNumberLimitInput.sendKeys('-3'); +// expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]'); +// expect(limitedLetters.getText()).toEqual('Output letters: ghi'); +// expect(limitedLongNumber.getText()).toEqual('Output long number: 342'); +// }); + +it('should not exceed the maximum size of input array', function() { + numLimitInput.clear(); + numLimitInput.sendKeys('100'); + letterLimitInput.clear(); + letterLimitInput.sendKeys('100'); + longNumberLimitInput.clear(); + longNumberLimitInput.sendKeys('100'); + expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]'); + expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi'); + expect(limitedLongNumber.getText()).toEqual('Output long number: 2345432342'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-limit-to-filter/jquery_test.js b/1.6.6/docs/ptore2e/example-limit-to-filter/jquery_test.js new file mode 100644 index 000000000..ed4dcd04a --- /dev/null +++ b/1.6.6/docs/ptore2e/example-limit-to-filter/jquery_test.js @@ -0,0 +1,48 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-limit-to-filter/index-jquery.html"); + }); + +var numLimitInput = element(by.model('numLimit')); +var letterLimitInput = element(by.model('letterLimit')); +var longNumberLimitInput = element(by.model('longNumberLimit')); +var limitedNumbers = element(by.binding('numbers | limitTo:numLimit')); +var limitedLetters = element(by.binding('letters | limitTo:letterLimit')); +var limitedLongNumber = element(by.binding('longNumber | limitTo:longNumberLimit')); + +it('should limit the number array to first three items', function() { + expect(numLimitInput.getAttribute('value')).toBe('3'); + expect(letterLimitInput.getAttribute('value')).toBe('3'); + expect(longNumberLimitInput.getAttribute('value')).toBe('3'); + expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]'); + expect(limitedLetters.getText()).toEqual('Output letters: abc'); + expect(limitedLongNumber.getText()).toEqual('Output long number: 234'); +}); + +// There is a bug in safari and protractor that doesn't like the minus key +// it('should update the output when -3 is entered', function() { +// numLimitInput.clear(); +// numLimitInput.sendKeys('-3'); +// letterLimitInput.clear(); +// letterLimitInput.sendKeys('-3'); +// longNumberLimitInput.clear(); +// longNumberLimitInput.sendKeys('-3'); +// expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]'); +// expect(limitedLetters.getText()).toEqual('Output letters: ghi'); +// expect(limitedLongNumber.getText()).toEqual('Output long number: 342'); +// }); + +it('should not exceed the maximum size of input array', function() { + numLimitInput.clear(); + numLimitInput.sendKeys('100'); + letterLimitInput.clear(); + letterLimitInput.sendKeys('100'); + longNumberLimitInput.clear(); + longNumberLimitInput.sendKeys('100'); + expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]'); + expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi'); + expect(limitedLongNumber.getText()).toEqual('Output long number: 2345432342'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-linky-filter/default_test.js b/1.6.6/docs/ptore2e/example-linky-filter/default_test.js new file mode 100644 index 000000000..4eef45c80 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-linky-filter/default_test.js @@ -0,0 +1,45 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-linky-filter/index.html"); + }); + +it('should linkify the snippet with urls', function() { + expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). + toBe('Pretty text with some links: http://angularjs.org/, us@somewhere.org, ' + + 'another@somewhere.org, and one more: ftp://127.0.0.1/.'); + expect(element.all(by.css('#linky-filter a')).count()).toEqual(4); +}); + +it('should not linkify snippet without the linky filter', function() { + expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()). + toBe('Pretty text with some links: http://angularjs.org/, mailto:us@somewhere.org, ' + + 'another@somewhere.org, and one more: ftp://127.0.0.1/.'); + expect(element.all(by.css('#escaped-html a')).count()).toEqual(0); +}); + +it('should update', function() { + element(by.model('snippet')).clear(); + element(by.model('snippet')).sendKeys('new http://link.'); + expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). + toBe('new http://link.'); + expect(element.all(by.css('#linky-filter a')).count()).toEqual(1); + expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()) + .toBe('new http://link.'); +}); + +it('should work with the target property', function() { + expect(element(by.id('linky-target')). + element(by.binding("snippetWithSingleURL | linky:'_blank'")).getText()). + toBe('http://angularjs.org/'); + expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank'); +}); + +it('should optionally add custom attributes', function() { + expect(element(by.id('linky-custom-attributes')). + element(by.binding("snippetWithSingleURL | linky:'_self':{rel: 'nofollow'}")).getText()). + toBe('http://angularjs.org/'); + expect(element(by.css('#linky-custom-attributes a')).getAttribute('rel')).toEqual('nofollow'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-linky-filter/jquery_test.js b/1.6.6/docs/ptore2e/example-linky-filter/jquery_test.js new file mode 100644 index 000000000..6b256b5f5 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-linky-filter/jquery_test.js @@ -0,0 +1,45 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-linky-filter/index-jquery.html"); + }); + +it('should linkify the snippet with urls', function() { + expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). + toBe('Pretty text with some links: http://angularjs.org/, us@somewhere.org, ' + + 'another@somewhere.org, and one more: ftp://127.0.0.1/.'); + expect(element.all(by.css('#linky-filter a')).count()).toEqual(4); +}); + +it('should not linkify snippet without the linky filter', function() { + expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()). + toBe('Pretty text with some links: http://angularjs.org/, mailto:us@somewhere.org, ' + + 'another@somewhere.org, and one more: ftp://127.0.0.1/.'); + expect(element.all(by.css('#escaped-html a')).count()).toEqual(0); +}); + +it('should update', function() { + element(by.model('snippet')).clear(); + element(by.model('snippet')).sendKeys('new http://link.'); + expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). + toBe('new http://link.'); + expect(element.all(by.css('#linky-filter a')).count()).toEqual(1); + expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()) + .toBe('new http://link.'); +}); + +it('should work with the target property', function() { + expect(element(by.id('linky-target')). + element(by.binding("snippetWithSingleURL | linky:'_blank'")).getText()). + toBe('http://angularjs.org/'); + expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank'); +}); + +it('should optionally add custom attributes', function() { + expect(element(by.id('linky-custom-attributes')). + element(by.binding("snippetWithSingleURL | linky:'_self':{rel: 'nofollow'}")).getText()). + toBe('http://angularjs.org/'); + expect(element(by.css('#linky-custom-attributes a')).getAttribute('rel')).toEqual('nofollow'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-location-hashbang-mode/default_test.js b/1.6.6/docs/ptore2e/example-location-hashbang-mode/default_test.js new file mode 100644 index 000000000..cdc5f6c9a --- /dev/null +++ b/1.6.6/docs/ptore2e/example-location-hashbang-mode/default_test.js @@ -0,0 +1,50 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-location-hashbang-mode/index.html"); + }); + +var addressBar = element(by.css("#addressBar")), + url = 'http://www.example.com/base/index.html#!/path?a=b#h'; + +it("should show fake browser info on load", function() { + expect(addressBar.getAttribute('value')).toBe(url); + + expect(element(by.binding('$location.protocol()')).getText()).toBe('http'); + expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com'); + expect(element(by.binding('$location.port()')).getText()).toBe('80'); + expect(element(by.binding('$location.path()')).getText()).toBe('/path'); + expect(element(by.binding('$location.search()')).getText()).toBe('{"a":"b"}'); + expect(element(by.binding('$location.hash()')).getText()).toBe('h'); + +}); + +it("should change $location accordingly", function() { + var navigation = element.all(by.css("#navigation a")); + + navigation.get(0).click(); + + expect(addressBar.getAttribute('value')).toBe("http://www.example.com/base/index.html#!/first?a=b"); + + expect(element(by.binding('$location.protocol()')).getText()).toBe('http'); + expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com'); + expect(element(by.binding('$location.port()')).getText()).toBe('80'); + expect(element(by.binding('$location.path()')).getText()).toBe('/first'); + expect(element(by.binding('$location.search()')).getText()).toBe('{"a":"b"}'); + expect(element(by.binding('$location.hash()')).getText()).toBe(''); + + + navigation.get(1).click(); + + expect(addressBar.getAttribute('value')).toBe("http://www.example.com/base/index.html#!/sec/ond?flag#hash"); + + expect(element(by.binding('$location.protocol()')).getText()).toBe('http'); + expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com'); + expect(element(by.binding('$location.port()')).getText()).toBe('80'); + expect(element(by.binding('$location.path()')).getText()).toBe('/sec/ond'); + expect(element(by.binding('$location.search()')).getText()).toBe('{"flag":true}'); + expect(element(by.binding('$location.hash()')).getText()).toBe('hash'); + +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-location-hashbang-mode/jquery_test.js b/1.6.6/docs/ptore2e/example-location-hashbang-mode/jquery_test.js new file mode 100644 index 000000000..638c4f4b7 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-location-hashbang-mode/jquery_test.js @@ -0,0 +1,50 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-location-hashbang-mode/index-jquery.html"); + }); + +var addressBar = element(by.css("#addressBar")), + url = 'http://www.example.com/base/index.html#!/path?a=b#h'; + +it("should show fake browser info on load", function() { + expect(addressBar.getAttribute('value')).toBe(url); + + expect(element(by.binding('$location.protocol()')).getText()).toBe('http'); + expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com'); + expect(element(by.binding('$location.port()')).getText()).toBe('80'); + expect(element(by.binding('$location.path()')).getText()).toBe('/path'); + expect(element(by.binding('$location.search()')).getText()).toBe('{"a":"b"}'); + expect(element(by.binding('$location.hash()')).getText()).toBe('h'); + +}); + +it("should change $location accordingly", function() { + var navigation = element.all(by.css("#navigation a")); + + navigation.get(0).click(); + + expect(addressBar.getAttribute('value')).toBe("http://www.example.com/base/index.html#!/first?a=b"); + + expect(element(by.binding('$location.protocol()')).getText()).toBe('http'); + expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com'); + expect(element(by.binding('$location.port()')).getText()).toBe('80'); + expect(element(by.binding('$location.path()')).getText()).toBe('/first'); + expect(element(by.binding('$location.search()')).getText()).toBe('{"a":"b"}'); + expect(element(by.binding('$location.hash()')).getText()).toBe(''); + + + navigation.get(1).click(); + + expect(addressBar.getAttribute('value')).toBe("http://www.example.com/base/index.html#!/sec/ond?flag#hash"); + + expect(element(by.binding('$location.protocol()')).getText()).toBe('http'); + expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com'); + expect(element(by.binding('$location.port()')).getText()).toBe('80'); + expect(element(by.binding('$location.path()')).getText()).toBe('/sec/ond'); + expect(element(by.binding('$location.search()')).getText()).toBe('{"flag":true}'); + expect(element(by.binding('$location.hash()')).getText()).toBe('hash'); + +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-location-html5-mode/default_test.js b/1.6.6/docs/ptore2e/example-location-html5-mode/default_test.js new file mode 100644 index 000000000..48d496258 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-location-html5-mode/default_test.js @@ -0,0 +1,50 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-location-html5-mode/index.html"); + }); + +var addressBar = element(by.css("#addressBar")), + url = 'http://www.example.com/base/path?a=b#h'; + + +it("should show fake browser info on load", function() { + expect(addressBar.getAttribute('value')).toBe(url); + + expect(element(by.binding('$location.protocol()')).getText()).toBe('http'); + expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com'); + expect(element(by.binding('$location.port()')).getText()).toBe('80'); + expect(element(by.binding('$location.path()')).getText()).toBe('/path'); + expect(element(by.binding('$location.search()')).getText()).toBe('{"a":"b"}'); + expect(element(by.binding('$location.hash()')).getText()).toBe('h'); + +}); + +it("should change $location accordingly", function() { + var navigation = element.all(by.css("#navigation a")); + + navigation.get(0).click(); + + expect(addressBar.getAttribute('value')).toBe("http://www.example.com/base/first?a=b"); + + expect(element(by.binding('$location.protocol()')).getText()).toBe('http'); + expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com'); + expect(element(by.binding('$location.port()')).getText()).toBe('80'); + expect(element(by.binding('$location.path()')).getText()).toBe('/first'); + expect(element(by.binding('$location.search()')).getText()).toBe('{"a":"b"}'); + expect(element(by.binding('$location.hash()')).getText()).toBe(''); + + + navigation.get(1).click(); + + expect(addressBar.getAttribute('value')).toBe("http://www.example.com/base/sec/ond?flag#hash"); + + expect(element(by.binding('$location.protocol()')).getText()).toBe('http'); + expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com'); + expect(element(by.binding('$location.port()')).getText()).toBe('80'); + expect(element(by.binding('$location.path()')).getText()).toBe('/sec/ond'); + expect(element(by.binding('$location.search()')).getText()).toBe('{"flag":true}'); + expect(element(by.binding('$location.hash()')).getText()).toBe('hash'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-location-html5-mode/jquery_test.js b/1.6.6/docs/ptore2e/example-location-html5-mode/jquery_test.js new file mode 100644 index 000000000..2aebae982 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-location-html5-mode/jquery_test.js @@ -0,0 +1,50 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-location-html5-mode/index-jquery.html"); + }); + +var addressBar = element(by.css("#addressBar")), + url = 'http://www.example.com/base/path?a=b#h'; + + +it("should show fake browser info on load", function() { + expect(addressBar.getAttribute('value')).toBe(url); + + expect(element(by.binding('$location.protocol()')).getText()).toBe('http'); + expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com'); + expect(element(by.binding('$location.port()')).getText()).toBe('80'); + expect(element(by.binding('$location.path()')).getText()).toBe('/path'); + expect(element(by.binding('$location.search()')).getText()).toBe('{"a":"b"}'); + expect(element(by.binding('$location.hash()')).getText()).toBe('h'); + +}); + +it("should change $location accordingly", function() { + var navigation = element.all(by.css("#navigation a")); + + navigation.get(0).click(); + + expect(addressBar.getAttribute('value')).toBe("http://www.example.com/base/first?a=b"); + + expect(element(by.binding('$location.protocol()')).getText()).toBe('http'); + expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com'); + expect(element(by.binding('$location.port()')).getText()).toBe('80'); + expect(element(by.binding('$location.path()')).getText()).toBe('/first'); + expect(element(by.binding('$location.search()')).getText()).toBe('{"a":"b"}'); + expect(element(by.binding('$location.hash()')).getText()).toBe(''); + + + navigation.get(1).click(); + + expect(addressBar.getAttribute('value')).toBe("http://www.example.com/base/sec/ond?flag#hash"); + + expect(element(by.binding('$location.protocol()')).getText()).toBe('http'); + expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com'); + expect(element(by.binding('$location.port()')).getText()).toBe('80'); + expect(element(by.binding('$location.path()')).getText()).toBe('/sec/ond'); + expect(element(by.binding('$location.search()')).getText()).toBe('{"flag":true}'); + expect(element(by.binding('$location.hash()')).getText()).toBe('hash'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-module-hello-world/default_test.js b/1.6.6/docs/ptore2e/example-module-hello-world/default_test.js new file mode 100644 index 000000000..3a7ca6701 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-module-hello-world/default_test.js @@ -0,0 +1,12 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.rootEl = '[ng-app]'; + browser.get("build/docs/examples/example-module-hello-world/index.html"); + }); + afterEach(function() { browser.rootEl = rootEl; }); +it('should add Hello to the name', function() { + expect(element(by.binding("'World' | greet")).getText()).toEqual('Hello, World!'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-module-hello-world/jquery_test.js b/1.6.6/docs/ptore2e/example-module-hello-world/jquery_test.js new file mode 100644 index 000000000..2ecc47126 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-module-hello-world/jquery_test.js @@ -0,0 +1,12 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.rootEl = '[ng-app]'; + browser.get("build/docs/examples/example-module-hello-world/index-jquery.html"); + }); + afterEach(function() { browser.rootEl = rootEl; }); +it('should add Hello to the name', function() { + expect(element(by.binding("'World' | greet")).getText()).toEqual('Hello, World!'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-module-suggested-layout/default_test.js b/1.6.6/docs/ptore2e/example-module-suggested-layout/default_test.js new file mode 100644 index 000000000..6e2beb7f1 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-module-suggested-layout/default_test.js @@ -0,0 +1,11 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-module-suggested-layout/index.html"); + }); + +it('should add Hello to the name', function() { + expect(element(by.binding("greeting")).getText()).toEqual('Bonjour World!'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-module-suggested-layout/jquery_test.js b/1.6.6/docs/ptore2e/example-module-suggested-layout/jquery_test.js new file mode 100644 index 000000000..369121b0f --- /dev/null +++ b/1.6.6/docs/ptore2e/example-module-suggested-layout/jquery_test.js @@ -0,0 +1,11 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-module-suggested-layout/index-jquery.html"); + }); + +it('should add Hello to the name', function() { + expect(element(by.binding("greeting")).getText()).toEqual('Bonjour World!'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-month-input-directive/default_test.js b/1.6.6/docs/ptore2e/example-month-input-directive/default_test.js new file mode 100644 index 000000000..30c4bef51 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-month-input-directive/default_test.js @@ -0,0 +1,38 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-month-input-directive/index.html"); + }); + +var value = element(by.binding('example.value | date: "yyyy-MM"')); +var valid = element(by.binding('myForm.input.$valid')); + +// currently protractor/webdriver does not support +// sending keys to all known HTML5 input controls +// for various browsers (https://github.com/angular/protractor/issues/562). +function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); +} + +it('should initialize to model', function() { + expect(value.getText()).toContain('2013-10'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); +}); + +it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); +}); + +it('should be invalid if over max', function() { + setInput('2015-01'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-month-input-directive/jquery_test.js b/1.6.6/docs/ptore2e/example-month-input-directive/jquery_test.js new file mode 100644 index 000000000..84254a820 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-month-input-directive/jquery_test.js @@ -0,0 +1,38 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-month-input-directive/index-jquery.html"); + }); + +var value = element(by.binding('example.value | date: "yyyy-MM"')); +var valid = element(by.binding('myForm.input.$valid')); + +// currently protractor/webdriver does not support +// sending keys to all known HTML5 input controls +// for various browsers (https://github.com/angular/protractor/issues/562). +function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); +} + +it('should initialize to model', function() { + expect(value.getText()).toContain('2013-10'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); +}); + +it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); +}); + +it('should be invalid if over max', function() { + setInput('2015-01'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-multiSlotTranscludeExample/default_test.js b/1.6.6/docs/ptore2e/example-multiSlotTranscludeExample/default_test.js new file mode 100644 index 000000000..f880719f7 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-multiSlotTranscludeExample/default_test.js @@ -0,0 +1,19 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-multiSlotTranscludeExample/index.html"); + }); + +it('should have transcluded the title and the body', function() { + var titleElement = element(by.model('title')); + titleElement.clear(); + titleElement.sendKeys('TITLE'); + var textElement = element(by.model('text')); + textElement.clear(); + textElement.sendKeys('TEXT'); + expect(element(by.css('.title')).getText()).toEqual('TITLE'); + expect(element(by.binding('text')).getText()).toEqual('TEXT'); + expect(element(by.css('.footer')).getText()).toEqual('Fallback Footer'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-multiSlotTranscludeExample/jquery_test.js b/1.6.6/docs/ptore2e/example-multiSlotTranscludeExample/jquery_test.js new file mode 100644 index 000000000..3a6d91537 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-multiSlotTranscludeExample/jquery_test.js @@ -0,0 +1,19 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-multiSlotTranscludeExample/index-jquery.html"); + }); + +it('should have transcluded the title and the body', function() { + var titleElement = element(by.model('title')); + titleElement.clear(); + titleElement.sendKeys('TITLE'); + var textElement = element(by.model('text')); + textElement.clear(); + textElement.sendKeys('TEXT'); + expect(element(by.css('.title')).getText()).toEqual('TITLE'); + expect(element(by.binding('text')).getText()).toEqual('TEXT'); + expect(element(by.css('.footer')).getText()).toEqual('Fallback Footer'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-bind-html/default_test.js b/1.6.6/docs/ptore2e/example-ng-bind-html/default_test.js new file mode 100644 index 000000000..9ab6db70e --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-bind-html/default_test.js @@ -0,0 +1,12 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-bind-html/index.html"); + }); + +it('should check ng-bind-html', function() { + expect(element(by.binding('myHTML')).getText()).toBe( + 'I am an HTMLstring with links! and other stuff'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-bind-html/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-bind-html/jquery_test.js new file mode 100644 index 000000000..f8e22b0de --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-bind-html/jquery_test.js @@ -0,0 +1,12 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-bind-html/index-jquery.html"); + }); + +it('should check ng-bind-html', function() { + expect(element(by.binding('myHTML')).getText()).toBe( + 'I am an HTMLstring with links! and other stuff'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-bind-template/default_test.js b/1.6.6/docs/ptore2e/example-ng-bind-template/default_test.js new file mode 100644 index 000000000..ec77e4a6f --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-bind-template/default_test.js @@ -0,0 +1,22 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-bind-template/index.html"); + }); + +it('should check ng-bind', function() { + var salutationElem = element(by.binding('salutation')); + var salutationInput = element(by.model('salutation')); + var nameInput = element(by.model('name')); + + expect(salutationElem.getText()).toBe('Hello World!'); + + salutationInput.clear(); + salutationInput.sendKeys('Greetings'); + nameInput.clear(); + nameInput.sendKeys('user'); + + expect(salutationElem.getText()).toBe('Greetings user!'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-bind-template/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-bind-template/jquery_test.js new file mode 100644 index 000000000..91088aea2 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-bind-template/jquery_test.js @@ -0,0 +1,22 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-bind-template/index-jquery.html"); + }); + +it('should check ng-bind', function() { + var salutationElem = element(by.binding('salutation')); + var salutationInput = element(by.model('salutation')); + var nameInput = element(by.model('name')); + + expect(salutationElem.getText()).toBe('Hello World!'); + + salutationInput.clear(); + salutationInput.sendKeys('Greetings'); + nameInput.clear(); + nameInput.sendKeys('user'); + + expect(salutationElem.getText()).toBe('Greetings user!'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-bind/default_test.js b/1.6.6/docs/ptore2e/example-ng-bind/default_test.js new file mode 100644 index 000000000..fc6edf27a --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-bind/default_test.js @@ -0,0 +1,16 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-bind/index.html"); + }); + +it('should check ng-bind', function() { + var nameInput = element(by.model('name')); + + expect(element(by.binding('name')).getText()).toBe('Whirled'); + nameInput.clear(); + nameInput.sendKeys('world'); + expect(element(by.binding('name')).getText()).toBe('world'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-bind/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-bind/jquery_test.js new file mode 100644 index 000000000..409178286 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-bind/jquery_test.js @@ -0,0 +1,16 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-bind/index-jquery.html"); + }); + +it('should check ng-bind', function() { + var nameInput = element(by.model('name')); + + expect(element(by.binding('name')).getText()).toBe('Whirled'); + nameInput.clear(); + nameInput.sendKeys('world'); + expect(element(by.binding('name')).getText()).toBe('world'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-checked/default_test.js b/1.6.6/docs/ptore2e/example-ng-checked/default_test.js new file mode 100644 index 000000000..1e195cdb9 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-checked/default_test.js @@ -0,0 +1,13 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-checked/index.html"); + }); + +it('should check both checkBoxes', function() { + expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy(); + element(by.model('master')).click(); + expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy(); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-checked/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-checked/jquery_test.js new file mode 100644 index 000000000..f0b060535 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-checked/jquery_test.js @@ -0,0 +1,13 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-checked/index-jquery.html"); + }); + +it('should check both checkBoxes', function() { + expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy(); + element(by.model('master')).click(); + expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy(); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-class-even/default_test.js b/1.6.6/docs/ptore2e/example-ng-class-even/default_test.js new file mode 100644 index 000000000..85f844e2a --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-class-even/default_test.js @@ -0,0 +1,14 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-class-even/index.html"); + }); + +it('should check ng-class-odd and ng-class-even', function() { + expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')). + toMatch(/odd/); + expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')). + toMatch(/even/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-class-even/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-class-even/jquery_test.js new file mode 100644 index 000000000..c5bea2700 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-class-even/jquery_test.js @@ -0,0 +1,14 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-class-even/index-jquery.html"); + }); + +it('should check ng-class-odd and ng-class-even', function() { + expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')). + toMatch(/odd/); + expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')). + toMatch(/even/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-class-odd/default_test.js b/1.6.6/docs/ptore2e/example-ng-class-odd/default_test.js new file mode 100644 index 000000000..9c0821ab0 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-class-odd/default_test.js @@ -0,0 +1,14 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-class-odd/index.html"); + }); + +it('should check ng-class-odd and ng-class-even', function() { + expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')). + toMatch(/odd/); + expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')). + toMatch(/even/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-class-odd/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-class-odd/jquery_test.js new file mode 100644 index 000000000..b59e96f2b --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-class-odd/jquery_test.js @@ -0,0 +1,14 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-class-odd/index-jquery.html"); + }); + +it('should check ng-class-odd and ng-class-even', function() { + expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')). + toMatch(/odd/); + expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')). + toMatch(/even/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-class/default_test.js b/1.6.6/docs/ptore2e/example-ng-class/default_test.js new file mode 100644 index 000000000..d97456675 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-class/default_test.js @@ -0,0 +1,43 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-class/index.html"); + }); + +var ps = element.all(by.css('p')); + +it('should let you toggle the class', function() { + + expect(ps.first().getAttribute('class')).not.toMatch(/bold/); + expect(ps.first().getAttribute('class')).not.toMatch(/has-error/); + + element(by.model('important')).click(); + expect(ps.first().getAttribute('class')).toMatch(/bold/); + + element(by.model('error')).click(); + expect(ps.first().getAttribute('class')).toMatch(/has-error/); +}); + +it('should let you toggle string example', function() { + expect(ps.get(1).getAttribute('class')).toBe(''); + element(by.model('style')).clear(); + element(by.model('style')).sendKeys('red'); + expect(ps.get(1).getAttribute('class')).toBe('red'); +}); + +it('array example should have 3 classes', function() { + expect(ps.get(2).getAttribute('class')).toBe(''); + element(by.model('style1')).sendKeys('bold'); + element(by.model('style2')).sendKeys('strike'); + element(by.model('style3')).sendKeys('red'); + expect(ps.get(2).getAttribute('class')).toBe('bold strike red'); +}); + +it('array with map example should have 2 classes', function() { + expect(ps.last().getAttribute('class')).toBe(''); + element(by.model('style4')).sendKeys('bold'); + element(by.model('warning')).click(); + expect(ps.last().getAttribute('class')).toBe('bold orange'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-class/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-class/jquery_test.js new file mode 100644 index 000000000..cf3955312 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-class/jquery_test.js @@ -0,0 +1,43 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-class/index-jquery.html"); + }); + +var ps = element.all(by.css('p')); + +it('should let you toggle the class', function() { + + expect(ps.first().getAttribute('class')).not.toMatch(/bold/); + expect(ps.first().getAttribute('class')).not.toMatch(/has-error/); + + element(by.model('important')).click(); + expect(ps.first().getAttribute('class')).toMatch(/bold/); + + element(by.model('error')).click(); + expect(ps.first().getAttribute('class')).toMatch(/has-error/); +}); + +it('should let you toggle string example', function() { + expect(ps.get(1).getAttribute('class')).toBe(''); + element(by.model('style')).clear(); + element(by.model('style')).sendKeys('red'); + expect(ps.get(1).getAttribute('class')).toBe('red'); +}); + +it('array example should have 3 classes', function() { + expect(ps.get(2).getAttribute('class')).toBe(''); + element(by.model('style1')).sendKeys('bold'); + element(by.model('style2')).sendKeys('strike'); + element(by.model('style3')).sendKeys('red'); + expect(ps.get(2).getAttribute('class')).toBe('bold strike red'); +}); + +it('array with map example should have 2 classes', function() { + expect(ps.last().getAttribute('class')).toBe(''); + element(by.model('style4')).sendKeys('bold'); + element(by.model('warning')).click(); + expect(ps.last().getAttribute('class')).toBe('bold orange'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-class1/default_test.js b/1.6.6/docs/ptore2e/example-ng-class1/default_test.js new file mode 100644 index 000000000..17a637102 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-class1/default_test.js @@ -0,0 +1,22 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-class1/index.html"); + }); + +it('should check ng-class', function() { + expect(element(by.css('.base-class')).getAttribute('class')).not. + toMatch(/my-class/); + + element(by.id('setbtn')).click(); + + expect(element(by.css('.base-class')).getAttribute('class')). + toMatch(/my-class/); + + element(by.id('clearbtn')).click(); + + expect(element(by.css('.base-class')).getAttribute('class')).not. + toMatch(/my-class/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-class1/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-class1/jquery_test.js new file mode 100644 index 000000000..9b940d555 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-class1/jquery_test.js @@ -0,0 +1,22 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-class1/index-jquery.html"); + }); + +it('should check ng-class', function() { + expect(element(by.css('.base-class')).getAttribute('class')).not. + toMatch(/my-class/); + + element(by.id('setbtn')).click(); + + expect(element(by.css('.base-class')).getAttribute('class')). + toMatch(/my-class/); + + element(by.id('clearbtn')).click(); + + expect(element(by.css('.base-class')).getAttribute('class')).not. + toMatch(/my-class/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-click/default_test.js b/1.6.6/docs/ptore2e/example-ng-click/default_test.js new file mode 100644 index 000000000..efc7e9720 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-click/default_test.js @@ -0,0 +1,13 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-click/index.html"); + }); + +it('should check ng-click', function() { + expect(element(by.binding('count')).getText()).toMatch('0'); + element(by.css('button')).click(); + expect(element(by.binding('count')).getText()).toMatch('1'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-click/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-click/jquery_test.js new file mode 100644 index 000000000..8788d7372 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-click/jquery_test.js @@ -0,0 +1,13 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-click/index-jquery.html"); + }); + +it('should check ng-click', function() { + expect(element(by.binding('count')).getText()).toMatch('0'); + element(by.css('button')).click(); + expect(element(by.binding('count')).getText()).toMatch('1'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-cloak/default_test.js b/1.6.6/docs/ptore2e/example-ng-cloak/default_test.js new file mode 100644 index 000000000..99d720289 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-cloak/default_test.js @@ -0,0 +1,14 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-cloak/index.html"); + }); + +it('should remove the template directive and css class', function() { + expect($('#template1').getAttribute('ng-cloak')). + toBeNull(); + expect($('#template2').getAttribute('ng-cloak')). + toBeNull(); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-cloak/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-cloak/jquery_test.js new file mode 100644 index 000000000..a2a2d144d --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-cloak/jquery_test.js @@ -0,0 +1,14 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-cloak/index-jquery.html"); + }); + +it('should remove the template directive and css class', function() { + expect($('#template1').getAttribute('ng-cloak')). + toBeNull(); + expect($('#template2').getAttribute('ng-cloak')). + toBeNull(); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-disabled/default_test.js b/1.6.6/docs/ptore2e/example-ng-disabled/default_test.js new file mode 100644 index 000000000..467946a71 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-disabled/default_test.js @@ -0,0 +1,13 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-disabled/index.html"); + }); + +it('should toggle button', function() { + expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy(); + element(by.model('checked')).click(); + expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy(); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-disabled/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-disabled/jquery_test.js new file mode 100644 index 000000000..2bf575072 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-disabled/jquery_test.js @@ -0,0 +1,13 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-disabled/index-jquery.html"); + }); + +it('should toggle button', function() { + expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy(); + element(by.model('checked')).click(); + expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy(); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-form/default_test.js b/1.6.6/docs/ptore2e/example-ng-form/default_test.js new file mode 100644 index 000000000..adde796ab --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-form/default_test.js @@ -0,0 +1,27 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-form/index.html"); + }); + +it('should initialize to model', function() { + var userType = element(by.binding('userType')); + var valid = element(by.binding('myForm.input.$valid')); + + expect(userType.getText()).toContain('guest'); + expect(valid.getText()).toContain('true'); +}); + +it('should be invalid if empty', function() { + var userType = element(by.binding('userType')); + var valid = element(by.binding('myForm.input.$valid')); + var userInput = element(by.model('userType')); + + userInput.clear(); + userInput.sendKeys(''); + + expect(userType.getText()).toEqual('userType ='); + expect(valid.getText()).toContain('false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-form/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-form/jquery_test.js new file mode 100644 index 000000000..e491f1c99 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-form/jquery_test.js @@ -0,0 +1,27 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-form/index-jquery.html"); + }); + +it('should initialize to model', function() { + var userType = element(by.binding('userType')); + var valid = element(by.binding('myForm.input.$valid')); + + expect(userType.getText()).toContain('guest'); + expect(valid.getText()).toContain('true'); +}); + +it('should be invalid if empty', function() { + var userType = element(by.binding('userType')); + var valid = element(by.binding('myForm.input.$valid')); + var userInput = element(by.model('userType')); + + userInput.clear(); + userInput.sendKeys(''); + + expect(userType.getText()).toEqual('userType ='); + expect(valid.getText()).toContain('false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-hide-complex/default_test.js b/1.6.6/docs/ptore2e/example-ng-hide-complex/default_test.js new file mode 100644 index 000000000..ede6f2f4f --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-hide-complex/default_test.js @@ -0,0 +1,16 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-hide-complex/index.html"); + }); + +it('should check ngHide', function() { + var checkbox = element(by.model('checked')); + var checkElem = element(by.css('.check-element')); + + expect(checkElem.isDisplayed()).toBe(true); + checkbox.click(); + expect(checkElem.isDisplayed()).toBe(false); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-hide-complex/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-hide-complex/jquery_test.js new file mode 100644 index 000000000..7358cef4d --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-hide-complex/jquery_test.js @@ -0,0 +1,16 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-hide-complex/index-jquery.html"); + }); + +it('should check ngHide', function() { + var checkbox = element(by.model('checked')); + var checkElem = element(by.css('.check-element')); + + expect(checkElem.isDisplayed()).toBe(true); + checkbox.click(); + expect(checkElem.isDisplayed()).toBe(false); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-hide-simple/default_test.js b/1.6.6/docs/ptore2e/example-ng-hide-simple/default_test.js new file mode 100644 index 000000000..45a0d30bd --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-hide-simple/default_test.js @@ -0,0 +1,16 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-hide-simple/index.html"); + }); + +it('should check ngHide', function() { + var checkbox = element(by.model('checked')); + var checkElem = element(by.css('.check-element')); + + expect(checkElem.isDisplayed()).toBe(true); + checkbox.click(); + expect(checkElem.isDisplayed()).toBe(false); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-hide-simple/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-hide-simple/jquery_test.js new file mode 100644 index 000000000..5a6844faf --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-hide-simple/jquery_test.js @@ -0,0 +1,16 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-hide-simple/index-jquery.html"); + }); + +it('should check ngHide', function() { + var checkbox = element(by.model('checked')); + var checkElem = element(by.css('.check-element')); + + expect(checkElem.isDisplayed()).toBe(true); + checkbox.click(); + expect(checkElem.isDisplayed()).toBe(false); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-href/default_test.js b/1.6.6/docs/ptore2e/example-ng-href/default_test.js new file mode 100644 index 000000000..959b29044 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-href/default_test.js @@ -0,0 +1,62 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-href/index.html"); + }); + +it('should execute ng-click but not reload when href without value', function() { + element(by.id('link-1')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('1'); + expect(element(by.id('link-1')).getAttribute('href')).toBe(''); +}); + +it('should execute ng-click but not reload when href empty string', function() { + element(by.id('link-2')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('2'); + expect(element(by.id('link-2')).getAttribute('href')).toBe(''); +}); + +it('should execute ng-click and change url when ng-href specified', function() { + expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\/123$/); + + element(by.id('link-3')).click(); + + // At this point, we navigate away from an Angular page, so we need + // to use browser.driver to get the base webdriver. + + browser.wait(function() { + return browser.driver.getCurrentUrl().then(function(url) { + return url.match(/\/123$/); + }); + }, 5000, 'page should navigate to /123'); +}); + +it('should execute ng-click but not reload when href empty string and name specified', function() { + element(by.id('link-4')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('4'); + expect(element(by.id('link-4')).getAttribute('href')).toBe(''); +}); + +it('should execute ng-click but not reload when no href but name specified', function() { + element(by.id('link-5')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('5'); + expect(element(by.id('link-5')).getAttribute('href')).toBe(null); +}); + +it('should only change url when only ng-href', function() { + element(by.model('value')).clear(); + element(by.model('value')).sendKeys('6'); + expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\/6$/); + + element(by.id('link-6')).click(); + + // At this point, we navigate away from an Angular page, so we need + // to use browser.driver to get the base webdriver. + browser.wait(function() { + return browser.driver.getCurrentUrl().then(function(url) { + return url.match(/\/6$/); + }); + }, 5000, 'page should navigate to /6'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-href/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-href/jquery_test.js new file mode 100644 index 000000000..af61027c8 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-href/jquery_test.js @@ -0,0 +1,62 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-href/index-jquery.html"); + }); + +it('should execute ng-click but not reload when href without value', function() { + element(by.id('link-1')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('1'); + expect(element(by.id('link-1')).getAttribute('href')).toBe(''); +}); + +it('should execute ng-click but not reload when href empty string', function() { + element(by.id('link-2')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('2'); + expect(element(by.id('link-2')).getAttribute('href')).toBe(''); +}); + +it('should execute ng-click and change url when ng-href specified', function() { + expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\/123$/); + + element(by.id('link-3')).click(); + + // At this point, we navigate away from an Angular page, so we need + // to use browser.driver to get the base webdriver. + + browser.wait(function() { + return browser.driver.getCurrentUrl().then(function(url) { + return url.match(/\/123$/); + }); + }, 5000, 'page should navigate to /123'); +}); + +it('should execute ng-click but not reload when href empty string and name specified', function() { + element(by.id('link-4')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('4'); + expect(element(by.id('link-4')).getAttribute('href')).toBe(''); +}); + +it('should execute ng-click but not reload when no href but name specified', function() { + element(by.id('link-5')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('5'); + expect(element(by.id('link-5')).getAttribute('href')).toBe(null); +}); + +it('should only change url when only ng-href', function() { + element(by.model('value')).clear(); + element(by.model('value')).sendKeys('6'); + expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\/6$/); + + element(by.id('link-6')).click(); + + // At this point, we navigate away from an Angular page, so we need + // to use browser.driver to get the base webdriver. + browser.wait(function() { + return browser.driver.getCurrentUrl().then(function(url) { + return url.match(/\/6$/); + }); + }, 5000, 'page should navigate to /6'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-include/default_test.js b/1.6.6/docs/ptore2e/example-ng-include/default_test.js new file mode 100644 index 000000000..84795749c --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-include/default_test.js @@ -0,0 +1,35 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-include/index.html"); + }); + +var templateSelect = element(by.model('template')); +var includeElem = element(by.css('[ng-include]')); + +it('should load template1.html', function() { + expect(includeElem.getText()).toMatch(/Content of template1.html/); +}); + +it('should load template2.html', function() { + if (browser.params.browser === 'firefox') { + // Firefox can't handle using selects + // See https://github.com/angular/protractor/issues/480 + return; + } + templateSelect.click(); + templateSelect.all(by.css('option')).get(2).click(); + expect(includeElem.getText()).toMatch(/Content of template2.html/); +}); + +it('should change to blank', function() { + if (browser.params.browser === 'firefox') { + // Firefox can't handle using selects + return; + } + templateSelect.click(); + templateSelect.all(by.css('option')).get(0).click(); + expect(includeElem.isPresent()).toBe(false); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-include/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-include/jquery_test.js new file mode 100644 index 000000000..8a69a85e2 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-include/jquery_test.js @@ -0,0 +1,35 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-include/index-jquery.html"); + }); + +var templateSelect = element(by.model('template')); +var includeElem = element(by.css('[ng-include]')); + +it('should load template1.html', function() { + expect(includeElem.getText()).toMatch(/Content of template1.html/); +}); + +it('should load template2.html', function() { + if (browser.params.browser === 'firefox') { + // Firefox can't handle using selects + // See https://github.com/angular/protractor/issues/480 + return; + } + templateSelect.click(); + templateSelect.all(by.css('option')).get(2).click(); + expect(includeElem.getText()).toMatch(/Content of template2.html/); +}); + +it('should change to blank', function() { + if (browser.params.browser === 'firefox') { + // Firefox can't handle using selects + return; + } + templateSelect.click(); + templateSelect.all(by.css('option')).get(0).click(); + expect(includeElem.isPresent()).toBe(false); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-init/default_test.js b/1.6.6/docs/ptore2e/example-ng-init/default_test.js new file mode 100644 index 000000000..58376204a --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-init/default_test.js @@ -0,0 +1,15 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-init/index.html"); + }); + +it('should alias index positions', function() { + var elements = element.all(by.css('.example-init')); + expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;'); + expect(elements.get(1).getText()).toBe('list[ 0 ][ 1 ] = b;'); + expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;'); + expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-init/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-init/jquery_test.js new file mode 100644 index 000000000..cc13c2515 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-init/jquery_test.js @@ -0,0 +1,15 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-init/index-jquery.html"); + }); + +it('should alias index positions', function() { + var elements = element.all(by.css('.example-init')); + expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;'); + expect(elements.get(1).getText()).toBe('list[ 0 ][ 1 ] = b;'); + expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;'); + expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-non-bindable/default_test.js b/1.6.6/docs/ptore2e/example-ng-non-bindable/default_test.js new file mode 100644 index 000000000..58e65aea7 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-non-bindable/default_test.js @@ -0,0 +1,12 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-non-bindable/index.html"); + }); + +it('should check ng-non-bindable', function() { + expect(element(by.binding('1 + 2')).getText()).toContain('3'); + expect(element.all(by.css('div')).last().getText()).toMatch(/1 \+ 2/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-non-bindable/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-non-bindable/jquery_test.js new file mode 100644 index 000000000..260edbb47 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-non-bindable/jquery_test.js @@ -0,0 +1,12 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-non-bindable/index-jquery.html"); + }); + +it('should check ng-non-bindable', function() { + expect(element(by.binding('1 + 2')).getText()).toContain('3'); + expect(element.all(by.css('div')).last().getText()).toMatch(/1 \+ 2/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-open/default_test.js b/1.6.6/docs/ptore2e/example-ng-open/default_test.js new file mode 100644 index 000000000..616064c3e --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-open/default_test.js @@ -0,0 +1,13 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-open/index.html"); + }); + +it('should toggle open', function() { + expect(element(by.id('details')).getAttribute('open')).toBeFalsy(); + element(by.model('open')).click(); + expect(element(by.id('details')).getAttribute('open')).toBeTruthy(); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-open/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-open/jquery_test.js new file mode 100644 index 000000000..80e9decd0 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-open/jquery_test.js @@ -0,0 +1,13 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-open/index-jquery.html"); + }); + +it('should toggle open', function() { + expect(element(by.id('details')).getAttribute('open')).toBeFalsy(); + element(by.model('open')).click(); + expect(element(by.id('details')).getAttribute('open')).toBeTruthy(); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-pluralize/default_test.js b/1.6.6/docs/ptore2e/example-ng-pluralize/default_test.js new file mode 100644 index 000000000..ea77d6a58 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-pluralize/default_test.js @@ -0,0 +1,53 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-pluralize/index.html"); + }); + +it('should show correct pluralized string', function() { + var withoutOffset = element.all(by.css('ng-pluralize')).get(0); + var withOffset = element.all(by.css('ng-pluralize')).get(1); + var countInput = element(by.model('personCount')); + + expect(withoutOffset.getText()).toEqual('1 person is viewing.'); + expect(withOffset.getText()).toEqual('Igor is viewing.'); + + countInput.clear(); + countInput.sendKeys('0'); + + expect(withoutOffset.getText()).toEqual('Nobody is viewing.'); + expect(withOffset.getText()).toEqual('Nobody is viewing.'); + + countInput.clear(); + countInput.sendKeys('2'); + + expect(withoutOffset.getText()).toEqual('2 people are viewing.'); + expect(withOffset.getText()).toEqual('Igor and Misko are viewing.'); + + countInput.clear(); + countInput.sendKeys('3'); + + expect(withoutOffset.getText()).toEqual('3 people are viewing.'); + expect(withOffset.getText()).toEqual('Igor, Misko and one other person are viewing.'); + + countInput.clear(); + countInput.sendKeys('4'); + + expect(withoutOffset.getText()).toEqual('4 people are viewing.'); + expect(withOffset.getText()).toEqual('Igor, Misko and 2 other people are viewing.'); +}); +it('should show data-bound names', function() { + var withOffset = element.all(by.css('ng-pluralize')).get(1); + var personCount = element(by.model('personCount')); + var person1 = element(by.model('person1')); + var person2 = element(by.model('person2')); + personCount.clear(); + personCount.sendKeys('4'); + person1.clear(); + person1.sendKeys('Di'); + person2.clear(); + person2.sendKeys('Vojta'); + expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-pluralize/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-pluralize/jquery_test.js new file mode 100644 index 000000000..95b82c223 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-pluralize/jquery_test.js @@ -0,0 +1,53 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-pluralize/index-jquery.html"); + }); + +it('should show correct pluralized string', function() { + var withoutOffset = element.all(by.css('ng-pluralize')).get(0); + var withOffset = element.all(by.css('ng-pluralize')).get(1); + var countInput = element(by.model('personCount')); + + expect(withoutOffset.getText()).toEqual('1 person is viewing.'); + expect(withOffset.getText()).toEqual('Igor is viewing.'); + + countInput.clear(); + countInput.sendKeys('0'); + + expect(withoutOffset.getText()).toEqual('Nobody is viewing.'); + expect(withOffset.getText()).toEqual('Nobody is viewing.'); + + countInput.clear(); + countInput.sendKeys('2'); + + expect(withoutOffset.getText()).toEqual('2 people are viewing.'); + expect(withOffset.getText()).toEqual('Igor and Misko are viewing.'); + + countInput.clear(); + countInput.sendKeys('3'); + + expect(withoutOffset.getText()).toEqual('3 people are viewing.'); + expect(withOffset.getText()).toEqual('Igor, Misko and one other person are viewing.'); + + countInput.clear(); + countInput.sendKeys('4'); + + expect(withoutOffset.getText()).toEqual('4 people are viewing.'); + expect(withOffset.getText()).toEqual('Igor, Misko and 2 other people are viewing.'); +}); +it('should show data-bound names', function() { + var withOffset = element.all(by.css('ng-pluralize')).get(1); + var personCount = element(by.model('personCount')); + var person1 = element(by.model('person1')); + var person2 = element(by.model('person2')); + personCount.clear(); + personCount.sendKeys('4'); + person1.clear(); + person1.sendKeys('Di'); + person2.clear(); + person2.sendKeys('Vojta'); + expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-readonly/default_test.js b/1.6.6/docs/ptore2e/example-ng-readonly/default_test.js new file mode 100644 index 000000000..c1ccdad04 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-readonly/default_test.js @@ -0,0 +1,13 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-readonly/index.html"); + }); + +it('should toggle readonly attr', function() { + expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeFalsy(); + element(by.model('checked')).click(); + expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeTruthy(); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-readonly/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-readonly/jquery_test.js new file mode 100644 index 000000000..12b2390e6 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-readonly/jquery_test.js @@ -0,0 +1,13 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-readonly/index-jquery.html"); + }); + +it('should toggle readonly attr', function() { + expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeFalsy(); + element(by.model('checked')).click(); + expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeTruthy(); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-repeat/default_test.js b/1.6.6/docs/ptore2e/example-ng-repeat/default_test.js new file mode 100644 index 000000000..c7e80c332 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-repeat/default_test.js @@ -0,0 +1,28 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-repeat/index.html"); + }); + +var friends = element.all(by.repeater('friend in friends')); + +it('should render initial data set', function() { + expect(friends.count()).toBe(10); + expect(friends.get(0).getText()).toEqual('[1] John who is 25 years old.'); + expect(friends.get(1).getText()).toEqual('[2] Jessie who is 30 years old.'); + expect(friends.last().getText()).toEqual('[10] Samantha who is 60 years old.'); + expect(element(by.binding('friends.length')).getText()) + .toMatch("I have 10 friends. They are:"); +}); + + it('should update repeater when filter predicate changes', function() { + expect(friends.count()).toBe(10); + + element(by.model('q')).sendKeys('ma'); + + expect(friends.count()).toBe(2); + expect(friends.get(0).getText()).toEqual('[1] Mary who is 28 years old.'); + expect(friends.last().getText()).toEqual('[2] Samantha who is 60 years old.'); + }); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-repeat/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-repeat/jquery_test.js new file mode 100644 index 000000000..ee02cb505 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-repeat/jquery_test.js @@ -0,0 +1,28 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-repeat/index-jquery.html"); + }); + +var friends = element.all(by.repeater('friend in friends')); + +it('should render initial data set', function() { + expect(friends.count()).toBe(10); + expect(friends.get(0).getText()).toEqual('[1] John who is 25 years old.'); + expect(friends.get(1).getText()).toEqual('[2] Jessie who is 30 years old.'); + expect(friends.last().getText()).toEqual('[10] Samantha who is 60 years old.'); + expect(element(by.binding('friends.length')).getText()) + .toMatch("I have 10 friends. They are:"); +}); + + it('should update repeater when filter predicate changes', function() { + expect(friends.count()).toBe(10); + + element(by.model('q')).sendKeys('ma'); + + expect(friends.count()).toBe(2); + expect(friends.get(0).getText()).toEqual('[1] Mary who is 28 years old.'); + expect(friends.last().getText()).toEqual('[2] Samantha who is 60 years old.'); + }); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-selected/default_test.js b/1.6.6/docs/ptore2e/example-ng-selected/default_test.js new file mode 100644 index 000000000..21f4e8579 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-selected/default_test.js @@ -0,0 +1,13 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-selected/index.html"); + }); + +it('should select Greetings!', function() { + expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy(); + element(by.model('selected')).click(); + expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy(); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-selected/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-selected/jquery_test.js new file mode 100644 index 000000000..c41c7d9d1 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-selected/jquery_test.js @@ -0,0 +1,13 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-selected/index-jquery.html"); + }); + +it('should select Greetings!', function() { + expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy(); + element(by.model('selected')).click(); + expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy(); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-show-complex/default_test.js b/1.6.6/docs/ptore2e/example-ng-show-complex/default_test.js new file mode 100644 index 000000000..5f7711f67 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-show-complex/default_test.js @@ -0,0 +1,16 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-show-complex/index.html"); + }); + +it('should check ngShow', function() { + var checkbox = element(by.model('checked')); + var checkElem = element(by.css('.check-element')); + + expect(checkElem.isDisplayed()).toBe(false); + checkbox.click(); + expect(checkElem.isDisplayed()).toBe(true); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-show-complex/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-show-complex/jquery_test.js new file mode 100644 index 000000000..a72b8962d --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-show-complex/jquery_test.js @@ -0,0 +1,16 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-show-complex/index-jquery.html"); + }); + +it('should check ngShow', function() { + var checkbox = element(by.model('checked')); + var checkElem = element(by.css('.check-element')); + + expect(checkElem.isDisplayed()).toBe(false); + checkbox.click(); + expect(checkElem.isDisplayed()).toBe(true); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-show-simple/default_test.js b/1.6.6/docs/ptore2e/example-ng-show-simple/default_test.js new file mode 100644 index 000000000..6d5ab54a1 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-show-simple/default_test.js @@ -0,0 +1,16 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-show-simple/index.html"); + }); + +it('should check ngShow', function() { + var checkbox = element(by.model('checked')); + var checkElem = element(by.css('.check-element')); + + expect(checkElem.isDisplayed()).toBe(false); + checkbox.click(); + expect(checkElem.isDisplayed()).toBe(true); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-show-simple/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-show-simple/jquery_test.js new file mode 100644 index 000000000..25f7e51c5 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-show-simple/jquery_test.js @@ -0,0 +1,16 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-show-simple/index-jquery.html"); + }); + +it('should check ngShow', function() { + var checkbox = element(by.model('checked')); + var checkElem = element(by.css('.check-element')); + + expect(checkElem.isDisplayed()).toBe(false); + checkbox.click(); + expect(checkElem.isDisplayed()).toBe(true); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-style/default_test.js b/1.6.6/docs/ptore2e/example-ng-style/default_test.js new file mode 100644 index 000000000..2cb6b2008 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-style/default_test.js @@ -0,0 +1,17 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-style/index.html"); + }); + +var colorSpan = element(by.css('span')); + +it('should check ng-style', function() { + expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)'); + element(by.css('input[value=\'set color\']')).click(); + expect(colorSpan.getCssValue('color')).toBe('rgba(255, 0, 0, 1)'); + element(by.css('input[value=clear]')).click(); + expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-style/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-style/jquery_test.js new file mode 100644 index 000000000..5cfd74446 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-style/jquery_test.js @@ -0,0 +1,17 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-style/index-jquery.html"); + }); + +var colorSpan = element(by.css('span')); + +it('should check ng-style', function() { + expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)'); + element(by.css('input[value=\'set color\']')).click(); + expect(colorSpan.getCssValue('color')).toBe('rgba(255, 0, 0, 1)'); + element(by.css('input[value=clear]')).click(); + expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-submit/default_test.js b/1.6.6/docs/ptore2e/example-ng-submit/default_test.js new file mode 100644 index 000000000..9af5bd3d0 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-submit/default_test.js @@ -0,0 +1,20 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-submit/index.html"); + }); + +it('should check ng-submit', function() { + expect(element(by.binding('list')).getText()).toBe('list=[]'); + element(by.css('#submit')).click(); + expect(element(by.binding('list')).getText()).toContain('hello'); + expect(element(by.model('text')).getAttribute('value')).toBe(''); +}); +it('should ignore empty strings', function() { + expect(element(by.binding('list')).getText()).toBe('list=[]'); + element(by.css('#submit')).click(); + element(by.css('#submit')).click(); + expect(element(by.binding('list')).getText()).toContain('hello'); + }); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-submit/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-submit/jquery_test.js new file mode 100644 index 000000000..698954e9e --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-submit/jquery_test.js @@ -0,0 +1,20 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-submit/index-jquery.html"); + }); + +it('should check ng-submit', function() { + expect(element(by.binding('list')).getText()).toBe('list=[]'); + element(by.css('#submit')).click(); + expect(element(by.binding('list')).getText()).toContain('hello'); + expect(element(by.model('text')).getAttribute('value')).toBe(''); +}); +it('should ignore empty strings', function() { + expect(element(by.binding('list')).getText()).toBe('list=[]'); + element(by.css('#submit')).click(); + element(by.css('#submit')).click(); + expect(element(by.binding('list')).getText()).toContain('hello'); + }); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-switch/default_test.js b/1.6.6/docs/ptore2e/example-ng-switch/default_test.js new file mode 100644 index 000000000..f17101d58 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-switch/default_test.js @@ -0,0 +1,26 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-switch/index.html"); + }); + +var switchElem = element(by.css('[ng-switch]')); +var select = element(by.model('selection')); + +it('should start in settings', function() { + expect(switchElem.getText()).toMatch(/Settings Div/); +}); +it('should change to home', function() { + select.all(by.css('option')).get(1).click(); + expect(switchElem.getText()).toMatch(/Home Span/); +}); +it('should change to settings via "options"', function() { + select.all(by.css('option')).get(2).click(); + expect(switchElem.getText()).toMatch(/Settings Div/); +}); +it('should select default', function() { + select.all(by.css('option')).get(3).click(); + expect(switchElem.getText()).toMatch(/default/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-switch/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-switch/jquery_test.js new file mode 100644 index 000000000..5d2aeaac4 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-switch/jquery_test.js @@ -0,0 +1,26 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-switch/index-jquery.html"); + }); + +var switchElem = element(by.css('[ng-switch]')); +var select = element(by.model('selection')); + +it('should start in settings', function() { + expect(switchElem.getText()).toMatch(/Settings Div/); +}); +it('should change to home', function() { + select.all(by.css('option')).get(1).click(); + expect(switchElem.getText()).toMatch(/Home Span/); +}); +it('should change to settings via "options"', function() { + select.all(by.css('option')).get(2).click(); + expect(switchElem.getText()).toMatch(/Settings Div/); +}); +it('should select default', function() { + select.all(by.css('option')).get(3).click(); + expect(switchElem.getText()).toMatch(/default/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-transclude/default_test.js b/1.6.6/docs/ptore2e/example-ng-transclude/default_test.js new file mode 100644 index 000000000..25a6ce986 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-transclude/default_test.js @@ -0,0 +1,12 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-transclude/index.html"); + }); + +it('should have different transclude element content', function() { + expect(element(by.id('fallback')).getText()).toBe('Button1'); + expect(element(by.id('modified')).getText()).toBe('Button2'); + }); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ng-transclude/jquery_test.js b/1.6.6/docs/ptore2e/example-ng-transclude/jquery_test.js new file mode 100644 index 000000000..4ef4e73b8 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ng-transclude/jquery_test.js @@ -0,0 +1,12 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ng-transclude/index-jquery.html"); + }); + +it('should have different transclude element content', function() { + expect(element(by.id('fallback')).getText()).toBe('Button1'); + expect(element(by.id('modified')).getText()).toBe('Button2'); + }); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngChange-directive/default_test.js b/1.6.6/docs/ptore2e/example-ngChange-directive/default_test.js new file mode 100644 index 000000000..30c482d4d --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngChange-directive/default_test.js @@ -0,0 +1,26 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngChange-directive/index.html"); + }); + +var counter = element(by.binding('counter')); +var debug = element(by.binding('confirmed')); + +it('should evaluate the expression if changing from view', function() { + expect(counter.getText()).toContain('0'); + + element(by.id('ng-change-example1')).click(); + + expect(counter.getText()).toContain('1'); + expect(debug.getText()).toContain('true'); +}); + +it('should not evaluate the expression if changing from model', function() { + element(by.id('ng-change-example2')).click(); + + expect(counter.getText()).toContain('0'); + expect(debug.getText()).toContain('true'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngChange-directive/jquery_test.js b/1.6.6/docs/ptore2e/example-ngChange-directive/jquery_test.js new file mode 100644 index 000000000..36fe84b7a --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngChange-directive/jquery_test.js @@ -0,0 +1,26 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngChange-directive/index-jquery.html"); + }); + +var counter = element(by.binding('counter')); +var debug = element(by.binding('confirmed')); + +it('should evaluate the expression if changing from view', function() { + expect(counter.getText()).toContain('0'); + + element(by.id('ng-change-example1')).click(); + + expect(counter.getText()).toContain('1'); + expect(debug.getText()).toContain('true'); +}); + +it('should not evaluate the expression if changing from model', function() { + element(by.id('ng-change-example2')).click(); + + expect(counter.getText()).toContain('0'); + expect(debug.getText()).toContain('true'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngController/default_test.js b/1.6.6/docs/ptore2e/example-ngController/default_test.js new file mode 100644 index 000000000..736409032 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngController/default_test.js @@ -0,0 +1,36 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngController/index.html"); + }); + +it('should check controller', function() { + var container = element(by.id('ctrl-exmpl')); + + expect(container.element(by.model('name')) + .getAttribute('value')).toBe('John Smith'); + + var firstRepeat = + container.element(by.repeater('contact in contacts').row(0)); + var secondRepeat = + container.element(by.repeater('contact in contacts').row(1)); + + expect(firstRepeat.element(by.model('contact.value')).getAttribute('value')) + .toBe('408 555 1212'); + expect(secondRepeat.element(by.model('contact.value')).getAttribute('value')) + .toBe('john.smith@example.org'); + + firstRepeat.element(by.buttonText('clear')).click(); + + expect(firstRepeat.element(by.model('contact.value')).getAttribute('value')) + .toBe(''); + + container.element(by.buttonText('add')).click(); + + expect(container.element(by.repeater('contact in contacts').row(2)) + .element(by.model('contact.value')) + .getAttribute('value')) + .toBe('yourname@example.org'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngController/jquery_test.js b/1.6.6/docs/ptore2e/example-ngController/jquery_test.js new file mode 100644 index 000000000..08fa334b8 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngController/jquery_test.js @@ -0,0 +1,36 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngController/index-jquery.html"); + }); + +it('should check controller', function() { + var container = element(by.id('ctrl-exmpl')); + + expect(container.element(by.model('name')) + .getAttribute('value')).toBe('John Smith'); + + var firstRepeat = + container.element(by.repeater('contact in contacts').row(0)); + var secondRepeat = + container.element(by.repeater('contact in contacts').row(1)); + + expect(firstRepeat.element(by.model('contact.value')).getAttribute('value')) + .toBe('408 555 1212'); + expect(secondRepeat.element(by.model('contact.value')).getAttribute('value')) + .toBe('john.smith@example.org'); + + firstRepeat.element(by.buttonText('clear')).click(); + + expect(firstRepeat.element(by.model('contact.value')).getAttribute('value')) + .toBe(''); + + container.element(by.buttonText('add')).click(); + + expect(container.element(by.repeater('contact in contacts').row(2)) + .element(by.model('contact.value')) + .getAttribute('value')) + .toBe('yourname@example.org'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngControllerAs/default_test.js b/1.6.6/docs/ptore2e/example-ngControllerAs/default_test.js new file mode 100644 index 000000000..048705290 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngControllerAs/default_test.js @@ -0,0 +1,36 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngControllerAs/index.html"); + }); + +it('should check controller as', function() { + var container = element(by.id('ctrl-as-exmpl')); + expect(container.element(by.model('settings.name')) + .getAttribute('value')).toBe('John Smith'); + + var firstRepeat = + container.element(by.repeater('contact in settings.contacts').row(0)); + var secondRepeat = + container.element(by.repeater('contact in settings.contacts').row(1)); + + expect(firstRepeat.element(by.model('contact.value')).getAttribute('value')) + .toBe('408 555 1212'); + + expect(secondRepeat.element(by.model('contact.value')).getAttribute('value')) + .toBe('john.smith@example.org'); + + firstRepeat.element(by.buttonText('clear')).click(); + + expect(firstRepeat.element(by.model('contact.value')).getAttribute('value')) + .toBe(''); + + container.element(by.buttonText('add')).click(); + + expect(container.element(by.repeater('contact in settings.contacts').row(2)) + .element(by.model('contact.value')) + .getAttribute('value')) + .toBe('yourname@example.org'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngControllerAs/jquery_test.js b/1.6.6/docs/ptore2e/example-ngControllerAs/jquery_test.js new file mode 100644 index 000000000..820b33d14 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngControllerAs/jquery_test.js @@ -0,0 +1,36 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngControllerAs/index-jquery.html"); + }); + +it('should check controller as', function() { + var container = element(by.id('ctrl-as-exmpl')); + expect(container.element(by.model('settings.name')) + .getAttribute('value')).toBe('John Smith'); + + var firstRepeat = + container.element(by.repeater('contact in settings.contacts').row(0)); + var secondRepeat = + container.element(by.repeater('contact in settings.contacts').row(1)); + + expect(firstRepeat.element(by.model('contact.value')).getAttribute('value')) + .toBe('408 555 1212'); + + expect(secondRepeat.element(by.model('contact.value')).getAttribute('value')) + .toBe('john.smith@example.org'); + + firstRepeat.element(by.buttonText('clear')).click(); + + expect(firstRepeat.element(by.model('contact.value')).getAttribute('value')) + .toBe(''); + + container.element(by.buttonText('add')).click(); + + expect(container.element(by.repeater('contact in settings.contacts').row(2)) + .element(by.model('contact.value')) + .getAttribute('value')) + .toBe('yourname@example.org'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngList-directive-newlines/default_test.js b/1.6.6/docs/ptore2e/example-ngList-directive-newlines/default_test.js new file mode 100644 index 000000000..1ab615b18 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngList-directive-newlines/default_test.js @@ -0,0 +1,14 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngList-directive-newlines/index.html"); + }); + +it("should split the text by newlines", function() { + var listInput = element(by.model('list')); + var output = element(by.binding('list | json')); + listInput.sendKeys('abc\ndef\nghi'); + expect(output.getText()).toContain('[\n "abc",\n "def",\n "ghi"\n]'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngList-directive-newlines/jquery_test.js b/1.6.6/docs/ptore2e/example-ngList-directive-newlines/jquery_test.js new file mode 100644 index 000000000..a67365835 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngList-directive-newlines/jquery_test.js @@ -0,0 +1,14 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngList-directive-newlines/index-jquery.html"); + }); + +it("should split the text by newlines", function() { + var listInput = element(by.model('list')); + var output = element(by.binding('list | json')); + listInput.sendKeys('abc\ndef\nghi'); + expect(output.getText()).toContain('[\n "abc",\n "def",\n "ghi"\n]'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngList-directive/default_test.js b/1.6.6/docs/ptore2e/example-ngList-directive/default_test.js new file mode 100644 index 000000000..d48f9e8e5 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngList-directive/default_test.js @@ -0,0 +1,27 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngList-directive/index.html"); + }); + +var listInput = element(by.model('names')); +var names = element(by.exactBinding('names')); +var valid = element(by.binding('myForm.namesInput.$valid')); +var error = element(by.css('span.error')); + +it('should initialize to model', function() { + expect(names.getText()).toContain('["morpheus","neo","trinity"]'); + expect(valid.getText()).toContain('true'); + expect(error.getCssValue('display')).toBe('none'); +}); + +it('should be invalid if empty', function() { + listInput.clear(); + listInput.sendKeys(''); + + expect(names.getText()).toContain(''); + expect(valid.getText()).toContain('false'); + expect(error.getCssValue('display')).not.toBe('none'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngList-directive/jquery_test.js b/1.6.6/docs/ptore2e/example-ngList-directive/jquery_test.js new file mode 100644 index 000000000..8192362ab --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngList-directive/jquery_test.js @@ -0,0 +1,27 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngList-directive/index-jquery.html"); + }); + +var listInput = element(by.model('names')); +var names = element(by.exactBinding('names')); +var valid = element(by.binding('myForm.namesInput.$valid')); +var error = element(by.css('span.error')); + +it('should initialize to model', function() { + expect(names.getText()).toContain('["morpheus","neo","trinity"]'); + expect(valid.getText()).toContain('true'); + expect(error.getCssValue('display')).toBe('none'); +}); + +it('should be invalid if empty', function() { + listInput.clear(); + listInput.sendKeys(''); + + expect(names.getText()).toContain(''); + expect(valid.getText()).toContain('false'); + expect(error.getCssValue('display')).not.toBe('none'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngMaxlengthDirective/default_test.js b/1.6.6/docs/ptore2e/example-ngMaxlengthDirective/default_test.js new file mode 100644 index 000000000..b0a1dc7e8 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngMaxlengthDirective/default_test.js @@ -0,0 +1,20 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngMaxlengthDirective/index.html"); + }); + +var model = element(by.binding('model')); +var input = element(by.id('input')); + +it('should validate the input with the default maxlength', function() { + input.sendKeys('abcdef'); + expect(model.getText()).not.toContain('abcdef'); + + input.clear().then(function() { + input.sendKeys('abcde'); + expect(model.getText()).toContain('abcde'); + }); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngMaxlengthDirective/jquery_test.js b/1.6.6/docs/ptore2e/example-ngMaxlengthDirective/jquery_test.js new file mode 100644 index 000000000..8a95b2f45 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngMaxlengthDirective/jquery_test.js @@ -0,0 +1,20 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngMaxlengthDirective/index-jquery.html"); + }); + +var model = element(by.binding('model')); +var input = element(by.id('input')); + +it('should validate the input with the default maxlength', function() { + input.sendKeys('abcdef'); + expect(model.getText()).not.toContain('abcdef'); + + input.clear().then(function() { + input.sendKeys('abcde'); + expect(model.getText()).toContain('abcde'); + }); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngMessageFormat-example-plural/default_test.js b/1.6.6/docs/ptore2e/example-ngMessageFormat-example-plural/default_test.js new file mode 100644 index 000000000..8f25d98d1 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngMessageFormat-example-plural/default_test.js @@ -0,0 +1,23 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngMessageFormat-example-plural/index.html"); + }); + +describe('MessageFormat plural', function() { + + it('should pluralize initial values', function() { + var messageElem = element(by.binding('recipients.length')), + decreaseRecipientsBtn = element(by.id('decreaseRecipients')); + + expect(messageElem.getText()).toEqual('Harry Potter gave Alice and 2 other people a gift (#=2)'); + decreaseRecipientsBtn.click(); + expect(messageElem.getText()).toEqual('Harry Potter gave Alice and one other person a gift (#=1)'); + decreaseRecipientsBtn.click(); + expect(messageElem.getText()).toEqual('Harry Potter gave a gift to Alice (#=0)'); + decreaseRecipientsBtn.click(); + expect(messageElem.getText()).toEqual('Harry Potter gave no gifts (#=-1)'); + }); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngMessageFormat-example-plural/jquery_test.js b/1.6.6/docs/ptore2e/example-ngMessageFormat-example-plural/jquery_test.js new file mode 100644 index 000000000..67f9175a4 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngMessageFormat-example-plural/jquery_test.js @@ -0,0 +1,23 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngMessageFormat-example-plural/index-jquery.html"); + }); + +describe('MessageFormat plural', function() { + + it('should pluralize initial values', function() { + var messageElem = element(by.binding('recipients.length')), + decreaseRecipientsBtn = element(by.id('decreaseRecipients')); + + expect(messageElem.getText()).toEqual('Harry Potter gave Alice and 2 other people a gift (#=2)'); + decreaseRecipientsBtn.click(); + expect(messageElem.getText()).toEqual('Harry Potter gave Alice and one other person a gift (#=1)'); + decreaseRecipientsBtn.click(); + expect(messageElem.getText()).toEqual('Harry Potter gave a gift to Alice (#=0)'); + decreaseRecipientsBtn.click(); + expect(messageElem.getText()).toEqual('Harry Potter gave no gifts (#=-1)'); + }); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngMinlengthDirective/default_test.js b/1.6.6/docs/ptore2e/example-ngMinlengthDirective/default_test.js new file mode 100644 index 000000000..55db2c422 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngMinlengthDirective/default_test.js @@ -0,0 +1,18 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngMinlengthDirective/index.html"); + }); + +var model = element(by.binding('model')); +var input = element(by.id('input')); + +it('should validate the input with the default minlength', function() { + input.sendKeys('ab'); + expect(model.getText()).not.toContain('ab'); + + input.sendKeys('abc'); + expect(model.getText()).toContain('abc'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngMinlengthDirective/jquery_test.js b/1.6.6/docs/ptore2e/example-ngMinlengthDirective/jquery_test.js new file mode 100644 index 000000000..d1b22ad16 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngMinlengthDirective/jquery_test.js @@ -0,0 +1,18 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngMinlengthDirective/index-jquery.html"); + }); + +var model = element(by.binding('model')); +var input = element(by.id('input')); + +it('should validate the input with the default minlength', function() { + input.sendKeys('ab'); + expect(model.getText()).not.toContain('ab'); + + input.sendKeys('abc'); + expect(model.getText()).toContain('abc'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngModelOptions-directive-blur/default_test.js b/1.6.6/docs/ptore2e/example-ngModelOptions-directive-blur/default_test.js new file mode 100644 index 000000000..78f6a8813 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngModelOptions-directive-blur/default_test.js @@ -0,0 +1,28 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngModelOptions-directive-blur/index.html"); + }); + +var model = element(by.binding('user.name')); +var input = element(by.model('user.name')); +var other = element(by.model('user.data')); + +it('should allow custom events', function() { + input.sendKeys(' hello'); + input.click(); + expect(model.getText()).toEqual('say'); + other.click(); + expect(model.getText()).toEqual('say hello'); +}); + +it('should $rollbackViewValue when model changes', function() { + input.sendKeys(' hello'); + expect(input.getAttribute('value')).toEqual('say hello'); + input.sendKeys(protractor.Key.ESCAPE); + expect(input.getAttribute('value')).toEqual('say'); + other.click(); + expect(model.getText()).toEqual('say'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngModelOptions-directive-blur/jquery_test.js b/1.6.6/docs/ptore2e/example-ngModelOptions-directive-blur/jquery_test.js new file mode 100644 index 000000000..da9d44d4c --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngModelOptions-directive-blur/jquery_test.js @@ -0,0 +1,28 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngModelOptions-directive-blur/index-jquery.html"); + }); + +var model = element(by.binding('user.name')); +var input = element(by.model('user.name')); +var other = element(by.model('user.data')); + +it('should allow custom events', function() { + input.sendKeys(' hello'); + input.click(); + expect(model.getText()).toEqual('say'); + other.click(); + expect(model.getText()).toEqual('say hello'); +}); + +it('should $rollbackViewValue when model changes', function() { + input.sendKeys(' hello'); + expect(input.getAttribute('value')).toEqual('say hello'); + input.sendKeys(protractor.Key.ESCAPE); + expect(input.getAttribute('value')).toEqual('say'); + other.click(); + expect(model.getText()).toEqual('say'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngPatternDirective/default_test.js b/1.6.6/docs/ptore2e/example-ngPatternDirective/default_test.js new file mode 100644 index 000000000..96ce98696 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngPatternDirective/default_test.js @@ -0,0 +1,20 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngPatternDirective/index.html"); + }); + +var model = element(by.binding('model')); +var input = element(by.id('input')); + +it('should validate the input with the default pattern', function() { + input.sendKeys('aaa'); + expect(model.getText()).not.toContain('aaa'); + + input.clear().then(function() { + input.sendKeys('123'); + expect(model.getText()).toContain('123'); + }); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngPatternDirective/jquery_test.js b/1.6.6/docs/ptore2e/example-ngPatternDirective/jquery_test.js new file mode 100644 index 000000000..97de84512 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngPatternDirective/jquery_test.js @@ -0,0 +1,20 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngPatternDirective/index-jquery.html"); + }); + +var model = element(by.binding('model')); +var input = element(by.id('input')); + +it('should validate the input with the default pattern', function() { + input.sendKeys('aaa'); + expect(model.getText()).not.toContain('aaa'); + + input.clear().then(function() { + input.sendKeys('123'); + expect(model.getText()).toContain('123'); + }); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngRequiredDirective/default_test.js b/1.6.6/docs/ptore2e/example-ngRequiredDirective/default_test.js new file mode 100644 index 000000000..61593ce21 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngRequiredDirective/default_test.js @@ -0,0 +1,19 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngRequiredDirective/index.html"); + }); + +var required = element(by.binding('form.input.$error.required')); +var model = element(by.binding('model')); +var input = element(by.id('input')); + +it('should set the required error', function() { + expect(required.getText()).toContain('true'); + + input.sendKeys('123'); + expect(required.getText()).not.toContain('true'); + expect(model.getText()).toContain('123'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngRequiredDirective/jquery_test.js b/1.6.6/docs/ptore2e/example-ngRequiredDirective/jquery_test.js new file mode 100644 index 000000000..625d54f19 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngRequiredDirective/jquery_test.js @@ -0,0 +1,19 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngRequiredDirective/index-jquery.html"); + }); + +var required = element(by.binding('form.input.$error.required')); +var model = element(by.binding('model')); +var input = element(by.id('input')); + +it('should set the required error', function() { + expect(required.getText()).toContain('true'); + + input.sendKeys('123'); + expect(required.getText()).not.toContain('true'); + expect(model.getText()).toContain('123'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngValue-directive/default_test.js b/1.6.6/docs/ptore2e/example-ngValue-directive/default_test.js new file mode 100644 index 000000000..22256fe56 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngValue-directive/default_test.js @@ -0,0 +1,17 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngValue-directive/index.html"); + }); + +var favorite = element(by.binding('my.favorite')); + +it('should initialize to model', function() { + expect(favorite.getText()).toContain('unicorns'); +}); +it('should bind the values to the inputs', function() { + element.all(by.model('my.favorite')).get(0).click(); + expect(favorite.getText()).toContain('pizza'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngValue-directive/jquery_test.js b/1.6.6/docs/ptore2e/example-ngValue-directive/jquery_test.js new file mode 100644 index 000000000..1d2640488 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngValue-directive/jquery_test.js @@ -0,0 +1,17 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngValue-directive/index-jquery.html"); + }); + +var favorite = element(by.binding('my.favorite')); + +it('should initialize to model', function() { + expect(favorite.getText()).toContain('unicorns'); +}); +it('should bind the values to the inputs', function() { + element.all(by.model('my.favorite')).get(0).click(); + expect(favorite.getText()).toContain('pizza'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngView-directive/default_test.js b/1.6.6/docs/ptore2e/example-ngView-directive/default_test.js new file mode 100644 index 000000000..57ec8812f --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngView-directive/default_test.js @@ -0,0 +1,21 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngView-directive/index.html"); + }); + +it('should load and compile correct template', function() { + element(by.linkText('Moby: Ch1')).click(); + var content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller: ChapterCtrl/); + expect(content).toMatch(/Book Id: Moby/); + expect(content).toMatch(/Chapter Id: 1/); + + element(by.partialLinkText('Scarlet')).click(); + + content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller: BookCtrl/); + expect(content).toMatch(/Book Id: Scarlet/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-ngView-directive/jquery_test.js b/1.6.6/docs/ptore2e/example-ngView-directive/jquery_test.js new file mode 100644 index 000000000..ab5216443 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-ngView-directive/jquery_test.js @@ -0,0 +1,21 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-ngView-directive/index-jquery.html"); + }); + +it('should load and compile correct template', function() { + element(by.linkText('Moby: Ch1')).click(); + var content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller: ChapterCtrl/); + expect(content).toMatch(/Book Id: Moby/); + expect(content).toMatch(/Chapter Id: 1/); + + element(by.partialLinkText('Scarlet')).click(); + + content = element(by.css('[ng-view]')).getText(); + expect(content).toMatch(/controller: BookCtrl/); + expect(content).toMatch(/Book Id: Scarlet/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-number-filter/default_test.js b/1.6.6/docs/ptore2e/example-number-filter/default_test.js new file mode 100644 index 000000000..f2e5a609a --- /dev/null +++ b/1.6.6/docs/ptore2e/example-number-filter/default_test.js @@ -0,0 +1,21 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-number-filter/index.html"); + }); + + it('should format numbers', function() { + expect(element(by.id('number-default')).getText()).toBe('1,234.568'); + expect(element(by.binding('val | number:0')).getText()).toBe('1,235'); + expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679'); + }); + + it('should update', function() { + element(by.model('val')).clear(); + element(by.model('val')).sendKeys('3374.333'); + expect(element(by.id('number-default')).getText()).toBe('3,374.333'); + expect(element(by.binding('val | number:0')).getText()).toBe('3,374'); + expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-number-filter/jquery_test.js b/1.6.6/docs/ptore2e/example-number-filter/jquery_test.js new file mode 100644 index 000000000..8af55ef1b --- /dev/null +++ b/1.6.6/docs/ptore2e/example-number-filter/jquery_test.js @@ -0,0 +1,21 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-number-filter/index-jquery.html"); + }); + + it('should format numbers', function() { + expect(element(by.id('number-default')).getText()).toBe('1,234.568'); + expect(element(by.binding('val | number:0')).getText()).toBe('1,235'); + expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679'); + }); + + it('should update', function() { + element(by.model('val')).clear(); + element(by.model('val')).sendKeys('3374.333'); + expect(element(by.id('number-default')).getText()).toBe('3,374.333'); + expect(element(by.binding('val | number:0')).getText()).toBe('3,374'); + expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-number-input-directive/default_test.js b/1.6.6/docs/ptore2e/example-number-input-directive/default_test.js new file mode 100644 index 000000000..316dba910 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-number-input-directive/default_test.js @@ -0,0 +1,30 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-number-input-directive/index.html"); + }); + +var value = element(by.binding('example.value')); +var valid = element(by.binding('myForm.input.$valid')); +var input = element(by.model('example.value')); + +it('should initialize to model', function() { + expect(value.getText()).toContain('12'); + expect(valid.getText()).toContain('true'); +}); + +it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('false'); +}); + +it('should be invalid if over max', function() { + input.clear(); + input.sendKeys('123'); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-number-input-directive/jquery_test.js b/1.6.6/docs/ptore2e/example-number-input-directive/jquery_test.js new file mode 100644 index 000000000..e22c1f216 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-number-input-directive/jquery_test.js @@ -0,0 +1,30 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-number-input-directive/index-jquery.html"); + }); + +var value = element(by.binding('example.value')); +var valid = element(by.binding('myForm.input.$valid')); +var input = element(by.model('example.value')); + +it('should initialize to model', function() { + expect(value.getText()).toContain('12'); + expect(valid.getText()).toContain('true'); +}); + +it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('false'); +}); + +it('should be invalid if over max', function() { + input.clear(); + input.sendKeys('123'); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-orderBy-call-manually/default_test.js b/1.6.6/docs/ptore2e/example-orderBy-call-manually/default_test.js new file mode 100644 index 000000000..23e1e9653 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-orderBy-call-manually/default_test.js @@ -0,0 +1,54 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-orderBy-call-manually/index.html"); + }); + +// Element locators +var unsortButton = element(by.partialButtonText('unsorted')); +var nameHeader = element(by.partialButtonText('Name')); +var phoneHeader = element(by.partialButtonText('Phone')); +var ageHeader = element(by.partialButtonText('Age')); +var firstName = element(by.repeater('friends').column('friend.name').row(0)); +var lastName = element(by.repeater('friends').column('friend.name').row(4)); + +it('should sort friends by some property, when clicking on the column header', function() { + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); + + phoneHeader.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Mary'); + + nameHeader.click(); + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('Mike'); + + ageHeader.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Adam'); +}); + +it('should sort friends in reverse order, when clicking on the same column', function() { + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); + + ageHeader.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Adam'); + + ageHeader.click(); + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); +}); + +it('should restore the original order, when clicking "Set to unsorted"', function() { + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); + + unsortButton.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Julie'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-orderBy-call-manually/jquery_test.js b/1.6.6/docs/ptore2e/example-orderBy-call-manually/jquery_test.js new file mode 100644 index 000000000..29e7e5437 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-orderBy-call-manually/jquery_test.js @@ -0,0 +1,54 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-orderBy-call-manually/index-jquery.html"); + }); + +// Element locators +var unsortButton = element(by.partialButtonText('unsorted')); +var nameHeader = element(by.partialButtonText('Name')); +var phoneHeader = element(by.partialButtonText('Phone')); +var ageHeader = element(by.partialButtonText('Age')); +var firstName = element(by.repeater('friends').column('friend.name').row(0)); +var lastName = element(by.repeater('friends').column('friend.name').row(4)); + +it('should sort friends by some property, when clicking on the column header', function() { + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); + + phoneHeader.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Mary'); + + nameHeader.click(); + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('Mike'); + + ageHeader.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Adam'); +}); + +it('should sort friends in reverse order, when clicking on the same column', function() { + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); + + ageHeader.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Adam'); + + ageHeader.click(); + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); +}); + +it('should restore the original order, when clicking "Set to unsorted"', function() { + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); + + unsortButton.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Julie'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-orderBy-custom-comparator/default_test.js b/1.6.6/docs/ptore2e/example-orderBy-custom-comparator/default_test.js new file mode 100644 index 000000000..c6fee2173 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-orderBy-custom-comparator/default_test.js @@ -0,0 +1,19 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-orderBy-custom-comparator/index.html"); + }); + +// Element locators +var container = element(by.css('.custom-comparator')); +var names = container.all(by.repeater('friends').column('friend.name')); + +it('should sort friends by favorite letter (in correct alphabetical order)', function() { + expect(names.get(0).getText()).toBe('John'); + expect(names.get(1).getText()).toBe('Adam'); + expect(names.get(2).getText()).toBe('Mike'); + expect(names.get(3).getText()).toBe('Mary'); + expect(names.get(4).getText()).toBe('Julie'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-orderBy-custom-comparator/jquery_test.js b/1.6.6/docs/ptore2e/example-orderBy-custom-comparator/jquery_test.js new file mode 100644 index 000000000..0c0b8e0dc --- /dev/null +++ b/1.6.6/docs/ptore2e/example-orderBy-custom-comparator/jquery_test.js @@ -0,0 +1,19 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-orderBy-custom-comparator/index-jquery.html"); + }); + +// Element locators +var container = element(by.css('.custom-comparator')); +var names = container.all(by.repeater('friends').column('friend.name')); + +it('should sort friends by favorite letter (in correct alphabetical order)', function() { + expect(names.get(0).getText()).toBe('John'); + expect(names.get(1).getText()).toBe('Adam'); + expect(names.get(2).getText()).toBe('Mike'); + expect(names.get(3).getText()).toBe('Mary'); + expect(names.get(4).getText()).toBe('Julie'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-orderBy-dynamic/default_test.js b/1.6.6/docs/ptore2e/example-orderBy-dynamic/default_test.js new file mode 100644 index 000000000..8fc81f3fb --- /dev/null +++ b/1.6.6/docs/ptore2e/example-orderBy-dynamic/default_test.js @@ -0,0 +1,54 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-orderBy-dynamic/index.html"); + }); + +// Element locators +var unsortButton = element(by.partialButtonText('unsorted')); +var nameHeader = element(by.partialButtonText('Name')); +var phoneHeader = element(by.partialButtonText('Phone')); +var ageHeader = element(by.partialButtonText('Age')); +var firstName = element(by.repeater('friends').column('friend.name').row(0)); +var lastName = element(by.repeater('friends').column('friend.name').row(4)); + +it('should sort friends by some property, when clicking on the column header', function() { + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); + + phoneHeader.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Mary'); + + nameHeader.click(); + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('Mike'); + + ageHeader.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Adam'); +}); + +it('should sort friends in reverse order, when clicking on the same column', function() { + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); + + ageHeader.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Adam'); + + ageHeader.click(); + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); +}); + +it('should restore the original order, when clicking "Set to unsorted"', function() { + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); + + unsortButton.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Julie'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-orderBy-dynamic/jquery_test.js b/1.6.6/docs/ptore2e/example-orderBy-dynamic/jquery_test.js new file mode 100644 index 000000000..f1e463cd6 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-orderBy-dynamic/jquery_test.js @@ -0,0 +1,54 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-orderBy-dynamic/index-jquery.html"); + }); + +// Element locators +var unsortButton = element(by.partialButtonText('unsorted')); +var nameHeader = element(by.partialButtonText('Name')); +var phoneHeader = element(by.partialButtonText('Phone')); +var ageHeader = element(by.partialButtonText('Age')); +var firstName = element(by.repeater('friends').column('friend.name').row(0)); +var lastName = element(by.repeater('friends').column('friend.name').row(4)); + +it('should sort friends by some property, when clicking on the column header', function() { + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); + + phoneHeader.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Mary'); + + nameHeader.click(); + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('Mike'); + + ageHeader.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Adam'); +}); + +it('should sort friends in reverse order, when clicking on the same column', function() { + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); + + ageHeader.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Adam'); + + ageHeader.click(); + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); +}); + +it('should restore the original order, when clicking "Set to unsorted"', function() { + expect(firstName.getText()).toBe('Adam'); + expect(lastName.getText()).toBe('John'); + + unsortButton.click(); + expect(firstName.getText()).toBe('John'); + expect(lastName.getText()).toBe('Julie'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-orderBy-static/default_test.js b/1.6.6/docs/ptore2e/example-orderBy-static/default_test.js new file mode 100644 index 000000000..32353245e --- /dev/null +++ b/1.6.6/docs/ptore2e/example-orderBy-static/default_test.js @@ -0,0 +1,18 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-orderBy-static/index.html"); + }); + +// Element locators +var names = element.all(by.repeater('friends').column('friend.name')); + +it('should sort friends by age in reverse order', function() { + expect(names.get(0).getText()).toBe('Adam'); + expect(names.get(1).getText()).toBe('Julie'); + expect(names.get(2).getText()).toBe('Mike'); + expect(names.get(3).getText()).toBe('Mary'); + expect(names.get(4).getText()).toBe('John'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-orderBy-static/jquery_test.js b/1.6.6/docs/ptore2e/example-orderBy-static/jquery_test.js new file mode 100644 index 000000000..589f84361 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-orderBy-static/jquery_test.js @@ -0,0 +1,18 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-orderBy-static/index-jquery.html"); + }); + +// Element locators +var names = element.all(by.repeater('friends').column('friend.name')); + +it('should sort friends by age in reverse order', function() { + expect(names.get(0).getText()).toBe('Adam'); + expect(names.get(1).getText()).toBe('Julie'); + expect(names.get(2).getText()).toBe('Mike'); + expect(names.get(3).getText()).toBe('Mary'); + expect(names.get(4).getText()).toBe('John'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-radio-input-directive/default_test.js b/1.6.6/docs/ptore2e/example-radio-input-directive/default_test.js new file mode 100644 index 000000000..6cf924518 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-radio-input-directive/default_test.js @@ -0,0 +1,20 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-radio-input-directive/index.html"); + }); + +it('should change state', function() { + var inputs = element.all(by.model('color.name')); + var color = element(by.binding('color.name')); + + expect(color.getText()).toContain('blue'); + + inputs.get(0).click(); + expect(color.getText()).toContain('red'); + + inputs.get(1).click(); + expect(color.getText()).toContain('green'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-radio-input-directive/jquery_test.js b/1.6.6/docs/ptore2e/example-radio-input-directive/jquery_test.js new file mode 100644 index 000000000..8e0354561 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-radio-input-directive/jquery_test.js @@ -0,0 +1,20 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-radio-input-directive/index-jquery.html"); + }); + +it('should change state', function() { + var inputs = element.all(by.model('color.name')); + var color = element(by.binding('color.name')); + + expect(color.getText()).toContain('blue'); + + inputs.get(0).click(); + expect(color.getText()).toContain('red'); + + inputs.get(1).click(); + expect(color.getText()).toContain('green'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-sanitize-service/default_test.js b/1.6.6/docs/ptore2e/example-sanitize-service/default_test.js new file mode 100644 index 000000000..df37d8752 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-sanitize-service/default_test.js @@ -0,0 +1,37 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-sanitize-service/index.html"); + }); + +it('should sanitize the html snippet by default', function() { + expect(element(by.css('#bind-html-with-sanitize div')).getAttribute('innerHTML')). + toBe('

                                                              an html\nclick here\nsnippet

                                                              '); +}); + +it('should inline raw snippet if bound to a trusted value', function() { + expect(element(by.css('#bind-html-with-trust div')).getAttribute('innerHTML')). + toBe("

                                                              an html\n" + + "click here\n" + + "snippet

                                                              "); +}); + +it('should escape snippet without any filter', function() { + expect(element(by.css('#bind-default div')).getAttribute('innerHTML')). + toBe("<p style=\"color:blue\">an html\n" + + "<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" + + "snippet</p>"); +}); + +it('should update', function() { + element(by.model('snippet')).clear(); + element(by.model('snippet')).sendKeys('new text'); + expect(element(by.css('#bind-html-with-sanitize div')).getAttribute('innerHTML')). + toBe('new text'); + expect(element(by.css('#bind-html-with-trust div')).getAttribute('innerHTML')).toBe( + 'new text'); + expect(element(by.css('#bind-default div')).getAttribute('innerHTML')).toBe( + "new <b onclick=\"alert(1)\">text</b>"); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-sanitize-service/jquery_test.js b/1.6.6/docs/ptore2e/example-sanitize-service/jquery_test.js new file mode 100644 index 000000000..054a17ec6 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-sanitize-service/jquery_test.js @@ -0,0 +1,37 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-sanitize-service/index-jquery.html"); + }); + +it('should sanitize the html snippet by default', function() { + expect(element(by.css('#bind-html-with-sanitize div')).getAttribute('innerHTML')). + toBe('

                                                              an html\nclick here\nsnippet

                                                              '); +}); + +it('should inline raw snippet if bound to a trusted value', function() { + expect(element(by.css('#bind-html-with-trust div')).getAttribute('innerHTML')). + toBe("

                                                              an html\n" + + "click here\n" + + "snippet

                                                              "); +}); + +it('should escape snippet without any filter', function() { + expect(element(by.css('#bind-default div')).getAttribute('innerHTML')). + toBe("<p style=\"color:blue\">an html\n" + + "<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" + + "snippet</p>"); +}); + +it('should update', function() { + element(by.model('snippet')).clear(); + element(by.model('snippet')).sendKeys('new text'); + expect(element(by.css('#bind-html-with-sanitize div')).getAttribute('innerHTML')). + toBe('new text'); + expect(element(by.css('#bind-html-with-trust div')).getAttribute('innerHTML')).toBe( + 'new text'); + expect(element(by.css('#bind-default div')).getAttribute('innerHTML')).toBe( + "new <b onclick=\"alert(1)\">text</b>"); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-sce-service/default_test.js b/1.6.6/docs/ptore2e/example-sce-service/default_test.js new file mode 100644 index 000000000..aea2ee082 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-sce-service/default_test.js @@ -0,0 +1,20 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-sce-service/index.html"); + }); + +describe('SCE doc demo', function() { + it('should sanitize untrusted values', function() { + expect(element.all(by.css('.htmlComment')).first().getAttribute('innerHTML')) + .toBe('Is anyone reading this?'); + }); + + it('should NOT sanitize explicitly trusted values', function() { + expect(element(by.id('explicitlyTrustedHtml')).getAttribute('innerHTML')).toBe( + 'Hover over this text.'); + }); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-sce-service/jquery_test.js b/1.6.6/docs/ptore2e/example-sce-service/jquery_test.js new file mode 100644 index 000000000..b0adbab00 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-sce-service/jquery_test.js @@ -0,0 +1,20 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-sce-service/index-jquery.html"); + }); + +describe('SCE doc demo', function() { + it('should sanitize untrusted values', function() { + expect(element.all(by.css('.htmlComment')).first().getAttribute('innerHTML')) + .toBe('Is anyone reading this?'); + }); + + it('should NOT sanitize explicitly trusted values', function() { + expect(element(by.id('explicitlyTrustedHtml')).getAttribute('innerHTML')).toBe( + 'Hover over this text.'); + }); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-script-tag/default_test.js b/1.6.6/docs/ptore2e/example-script-tag/default_test.js new file mode 100644 index 000000000..8271edfa2 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-script-tag/default_test.js @@ -0,0 +1,12 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-script-tag/index.html"); + }); + +it('should load template defined inside script tag', function() { + element(by.css('#tpl-link')).click(); + expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-script-tag/jquery_test.js b/1.6.6/docs/ptore2e/example-script-tag/jquery_test.js new file mode 100644 index 000000000..d8c4c8117 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-script-tag/jquery_test.js @@ -0,0 +1,12 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-script-tag/index-jquery.html"); + }); + +it('should load template defined inside script tag', function() { + element(by.css('#tpl-link')).click(); + expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-select-with-non-string-options/default_test.js b/1.6.6/docs/ptore2e/example-select-with-non-string-options/default_test.js new file mode 100644 index 000000000..b4307a2ae --- /dev/null +++ b/1.6.6/docs/ptore2e/example-select-with-non-string-options/default_test.js @@ -0,0 +1,11 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-select-with-non-string-options/index.html"); + }); + +it('should initialize to model', function() { + expect(element(by.model('model.id')).$('option:checked').getText()).toEqual('Two'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-select-with-non-string-options/jquery_test.js b/1.6.6/docs/ptore2e/example-select-with-non-string-options/jquery_test.js new file mode 100644 index 000000000..c5f252e12 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-select-with-non-string-options/jquery_test.js @@ -0,0 +1,11 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-select-with-non-string-options/index-jquery.html"); + }); + +it('should initialize to model', function() { + expect(element(by.model('model.id')).$('option:checked').getText()).toEqual('Two'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-select/default_test.js b/1.6.6/docs/ptore2e/example-select/default_test.js new file mode 100644 index 000000000..b56a3c12f --- /dev/null +++ b/1.6.6/docs/ptore2e/example-select/default_test.js @@ -0,0 +1,17 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-select/index.html"); + }); + +it('should check ng-options', function() { + expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('red'); + element.all(by.model('myColor')).first().click(); + element.all(by.css('select[ng-model="myColor"] option')).first().click(); + expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('black'); + element(by.css('.nullable select[ng-model="myColor"]')).click(); + element.all(by.css('.nullable select[ng-model="myColor"] option')).first().click(); + expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('null'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-select/jquery_test.js b/1.6.6/docs/ptore2e/example-select/jquery_test.js new file mode 100644 index 000000000..283513699 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-select/jquery_test.js @@ -0,0 +1,17 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-select/index-jquery.html"); + }); + +it('should check ng-options', function() { + expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('red'); + element.all(by.model('myColor')).first().click(); + element.all(by.css('select[ng-model="myColor"] option')).first().click(); + expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('black'); + element(by.css('.nullable select[ng-model="myColor"]')).click(); + element.all(by.css('.nullable select[ng-model="myColor"] option')).first().click(); + expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('null'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-service-decorator/default_test.js b/1.6.6/docs/ptore2e/example-service-decorator/default_test.js new file mode 100644 index 000000000..273b7a89a --- /dev/null +++ b/1.6.6/docs/ptore2e/example-service-decorator/default_test.js @@ -0,0 +1,13 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-service-decorator/index.html"); + }); + +it('should display log messages in dom', function() { + element.all(by.repeater('l in myLog')).count().then(function(count) { + expect(count).toEqual(6); + }); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-service-decorator/jquery_test.js b/1.6.6/docs/ptore2e/example-service-decorator/jquery_test.js new file mode 100644 index 000000000..1a9fe71e0 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-service-decorator/jquery_test.js @@ -0,0 +1,13 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-service-decorator/index-jquery.html"); + }); + +it('should display log messages in dom', function() { + element.all(by.repeater('l in myLog')).count().then(function(count) { + expect(count).toEqual(6); + }); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-services-usage/default_test.js b/1.6.6/docs/ptore2e/example-services-usage/default_test.js new file mode 100644 index 000000000..b2706344a --- /dev/null +++ b/1.6.6/docs/ptore2e/example-services-usage/default_test.js @@ -0,0 +1,12 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-services-usage/index.html"); + }); + +it('should test service', function() { + expect(element(by.id('simple')).element(by.model('message')).getAttribute('value')) + .toEqual('test'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-services-usage/jquery_test.js b/1.6.6/docs/ptore2e/example-services-usage/jquery_test.js new file mode 100644 index 000000000..92a4041a9 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-services-usage/jquery_test.js @@ -0,0 +1,12 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-services-usage/index-jquery.html"); + }); + +it('should test service', function() { + expect(element(by.id('simple')).element(by.model('message')).getAttribute('value')) + .toEqual('test'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-simpleTranscludeExample/default_test.js b/1.6.6/docs/ptore2e/example-simpleTranscludeExample/default_test.js new file mode 100644 index 000000000..09aabb7e6 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-simpleTranscludeExample/default_test.js @@ -0,0 +1,18 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-simpleTranscludeExample/index.html"); + }); + +it('should have transcluded', function() { + var titleElement = element(by.model('title')); + titleElement.clear(); + titleElement.sendKeys('TITLE'); + var textElement = element(by.model('text')); + textElement.clear(); + textElement.sendKeys('TEXT'); + expect(element(by.binding('title')).getText()).toEqual('TITLE'); + expect(element(by.binding('text')).getText()).toEqual('TEXT'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-simpleTranscludeExample/jquery_test.js b/1.6.6/docs/ptore2e/example-simpleTranscludeExample/jquery_test.js new file mode 100644 index 000000000..2cadc9d5d --- /dev/null +++ b/1.6.6/docs/ptore2e/example-simpleTranscludeExample/jquery_test.js @@ -0,0 +1,18 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-simpleTranscludeExample/index-jquery.html"); + }); + +it('should have transcluded', function() { + var titleElement = element(by.model('title')); + titleElement.clear(); + titleElement.sendKeys('TITLE'); + var textElement = element(by.model('text')); + textElement.clear(); + textElement.sendKeys('TEXT'); + expect(element(by.binding('title')).getText()).toEqual('TITLE'); + expect(element(by.binding('text')).getText()).toEqual('TEXT'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-text-input-directive/default_test.js b/1.6.6/docs/ptore2e/example-text-input-directive/default_test.js new file mode 100644 index 000000000..2731c8dd4 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-text-input-directive/default_test.js @@ -0,0 +1,31 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-text-input-directive/index.html"); + }); + +var text = element(by.binding('example.text')); +var valid = element(by.binding('myForm.input.$valid')); +var input = element(by.model('example.text')); + +it('should initialize to model', function() { + expect(text.getText()).toContain('guest'); + expect(valid.getText()).toContain('true'); +}); + +it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + + expect(text.getText()).toEqual('text ='); + expect(valid.getText()).toContain('false'); +}); + +it('should be invalid if multi word', function() { + input.clear(); + input.sendKeys('hello world'); + + expect(valid.getText()).toContain('false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-text-input-directive/jquery_test.js b/1.6.6/docs/ptore2e/example-text-input-directive/jquery_test.js new file mode 100644 index 000000000..e9c8bd95e --- /dev/null +++ b/1.6.6/docs/ptore2e/example-text-input-directive/jquery_test.js @@ -0,0 +1,31 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-text-input-directive/index-jquery.html"); + }); + +var text = element(by.binding('example.text')); +var valid = element(by.binding('myForm.input.$valid')); +var input = element(by.model('example.text')); + +it('should initialize to model', function() { + expect(text.getText()).toContain('guest'); + expect(valid.getText()).toContain('true'); +}); + +it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + + expect(text.getText()).toEqual('text ='); + expect(valid.getText()).toContain('false'); +}); + +it('should be invalid if multi word', function() { + input.clear(); + input.sendKeys('hello world'); + + expect(valid.getText()).toContain('false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-time-input-directive/default_test.js b/1.6.6/docs/ptore2e/example-time-input-directive/default_test.js new file mode 100644 index 000000000..bb918eceb --- /dev/null +++ b/1.6.6/docs/ptore2e/example-time-input-directive/default_test.js @@ -0,0 +1,38 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-time-input-directive/index.html"); + }); + +var value = element(by.binding('example.value | date: "HH:mm:ss"')); +var valid = element(by.binding('myForm.input.$valid')); + +// currently protractor/webdriver does not support +// sending keys to all known HTML5 input controls +// for various browsers (https://github.com/angular/protractor/issues/562). +function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); +} + +it('should initialize to model', function() { + expect(value.getText()).toContain('14:57:00'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); +}); + +it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); +}); + +it('should be invalid if over max', function() { + setInput('23:59:00'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-time-input-directive/jquery_test.js b/1.6.6/docs/ptore2e/example-time-input-directive/jquery_test.js new file mode 100644 index 000000000..482175c86 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-time-input-directive/jquery_test.js @@ -0,0 +1,38 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-time-input-directive/index-jquery.html"); + }); + +var value = element(by.binding('example.value | date: "HH:mm:ss"')); +var valid = element(by.binding('myForm.input.$valid')); + +// currently protractor/webdriver does not support +// sending keys to all known HTML5 input controls +// for various browsers (https://github.com/angular/protractor/issues/562). +function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); +} + +it('should initialize to model', function() { + expect(value.getText()).toContain('14:57:00'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); +}); + +it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); +}); + +it('should be invalid if over max', function() { + setInput('23:59:00'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-url-input-directive/default_test.js b/1.6.6/docs/ptore2e/example-url-input-directive/default_test.js new file mode 100644 index 000000000..7e2cc032f --- /dev/null +++ b/1.6.6/docs/ptore2e/example-url-input-directive/default_test.js @@ -0,0 +1,31 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-url-input-directive/index.html"); + }); + +var text = element(by.binding('url.text')); +var valid = element(by.binding('myForm.input.$valid')); +var input = element(by.model('url.text')); + +it('should initialize to model', function() { + expect(text.getText()).toContain('http://google.com'); + expect(valid.getText()).toContain('true'); +}); + +it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + + expect(text.getText()).toEqual('text ='); + expect(valid.getText()).toContain('false'); +}); + +it('should be invalid if not url', function() { + input.clear(); + input.sendKeys('box'); + + expect(valid.getText()).toContain('false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-url-input-directive/jquery_test.js b/1.6.6/docs/ptore2e/example-url-input-directive/jquery_test.js new file mode 100644 index 000000000..f12f53fa8 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-url-input-directive/jquery_test.js @@ -0,0 +1,31 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-url-input-directive/index-jquery.html"); + }); + +var text = element(by.binding('url.text')); +var valid = element(by.binding('myForm.input.$valid')); +var input = element(by.model('url.text')); + +it('should initialize to model', function() { + expect(text.getText()).toContain('http://google.com'); + expect(valid.getText()).toContain('true'); +}); + +it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + + expect(text.getText()).toEqual('text ='); + expect(valid.getText()).toContain('false'); +}); + +it('should be invalid if not url', function() { + input.clear(); + input.sendKeys('box'); + + expect(valid.getText()).toContain('false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-week-input-directive/default_test.js b/1.6.6/docs/ptore2e/example-week-input-directive/default_test.js new file mode 100644 index 000000000..634197554 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-week-input-directive/default_test.js @@ -0,0 +1,38 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-week-input-directive/index.html"); + }); + +var value = element(by.binding('example.value | date: "yyyy-Www"')); +var valid = element(by.binding('myForm.input.$valid')); + +// currently protractor/webdriver does not support +// sending keys to all known HTML5 input controls +// for various browsers (https://github.com/angular/protractor/issues/562). +function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); +} + +it('should initialize to model', function() { + expect(value.getText()).toContain('2013-W01'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); +}); + +it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); +}); + +it('should be invalid if over max', function() { + setInput('2015-W01'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-week-input-directive/jquery_test.js b/1.6.6/docs/ptore2e/example-week-input-directive/jquery_test.js new file mode 100644 index 000000000..a2bde2a21 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-week-input-directive/jquery_test.js @@ -0,0 +1,38 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-week-input-directive/index-jquery.html"); + }); + +var value = element(by.binding('example.value | date: "yyyy-Www"')); +var valid = element(by.binding('myForm.input.$valid')); + +// currently protractor/webdriver does not support +// sending keys to all known HTML5 input controls +// for various browsers (https://github.com/angular/protractor/issues/562). +function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); +} + +it('should initialize to model', function() { + expect(value.getText()).toContain('2013-W01'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); +}); + +it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); +}); + +it('should be invalid if over max', function() { + setInput('2015-W01'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-window-service/default_test.js b/1.6.6/docs/ptore2e/example-window-service/default_test.js new file mode 100644 index 000000000..467fc1358 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-window-service/default_test.js @@ -0,0 +1,13 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-window-service/index.html"); + }); + +it('should display the greeting in the input box', function() { + element(by.model('greeting')).sendKeys('Hello, E2E Tests'); + // If we click the button it will block the test runner + // element(':button').click(); +}); +}); \ No newline at end of file diff --git a/1.6.6/docs/ptore2e/example-window-service/jquery_test.js b/1.6.6/docs/ptore2e/example-window-service/jquery_test.js new file mode 100644 index 000000000..ea09bf973 --- /dev/null +++ b/1.6.6/docs/ptore2e/example-window-service/jquery_test.js @@ -0,0 +1,13 @@ +describe("", function() { + var rootEl; + beforeEach(function() { + rootEl = browser.rootEl; + browser.get("build/docs/examples/example-window-service/index-jquery.html"); + }); + +it('should display the greeting in the input box', function() { + element(by.model('greeting')).sendKeys('Hello, E2E Tests'); + // If we click the button it will block the test runner + // element(':button').click(); +}); +}); \ No newline at end of file diff --git a/1.6.6/errors.json b/1.6.6/errors.json new file mode 100644 index 000000000..752d7eb90 --- /dev/null +++ b/1.6.6/errors.json @@ -0,0 +1 @@ +{"id":"ng","generated":"Fri Aug 18 2017 07:26:37 GMT-0700 (PDT)","errors":{"ng":{"areq":"Argument '{0}' is {1}","cpta":"Can't copy! TypedArray destination cannot be mutated.","test":"no injector found for element argument to getTestability","cpws":"Can't copy! Making copies of Window or Scope instances is not supported.","aobj":"Argument '{0}' must be an object","btstrpd":"App already bootstrapped with this element '{0}'","cpi":"Can't copy! Source and destination are identical.","badname":"hasOwnProperty is not a valid {0} name"},"$http":{"baddata":"Data must be a valid JSON object. Received: \"{0}\". Parse error: \"{1}\"","badreq":"Http request configuration url must be a string or a $sce trusted object. Received: {0}","badjsonp":"Illegal use of callback param, \"{0}\", in url, \"{1}\""},"ngRepeat":{"badident":"alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.","iexp":"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.","dupes":"Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}","iidexp":"'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'."},"$sce":{"imatcher":"Matchers may only be \"self\", string patterns or RegExp objects","icontext":"Attempted to trust a value in invalid context. Context: {0}; Value: {1}","iwcard":"Illegal sequence *** in string matcher. String: {0}","insecurl":"Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}","iequirks":"Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.","unsafe":"Attempting to use an unsafe value in a safe context.","itype":"Attempted to trust a non-string value in a content requiring a string: Context: {0}"},"ngPattern":{"noregexp":"Expected {0} to be a RegExp but was {1}. Element: {2}"},"$controller":{"ctrlfmt":"Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.","ctrlreg":"The controller with the name '{0}' is not registered.","noscp":"Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`."},"$parse":{"ueoe":"Unexpected end of expression: {0}","lexerr":"Lexer Error: {0} at column{1} in expression [{2}].","esc":"IMPOSSIBLE","lval":"Trying to assign a value to a non l-value","syntax":"Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}]."},"orderBy":{"notarray":"Expected array but received: {0}"},"jqLite":{"offargs":"jqLite#off() does not support the `selector` argument","onargs":"jqLite#on() does not support the `selector` or `eventData` parameters","nosel":"Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element"},"$animate":{"notcsel":"Expecting class selector starting with '.' got '{0}'.","nongcls":"$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the \"{0}\" CSS class."},"$q":{"norslvr":"Expected resolverFn, got '{0}'","qcycle":"Expected promise to be resolved with value other than itself '{0}'"},"$injector":{"pget":"Provider '{0}' must define $get factory method.","cdep":"Circular dependency found: {0}","nomod":"Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.","strictdi":"{0} is not using explicit annotation and cannot be invoked in strict mode","modulerr":"Failed to instantiate module {0} due to:\n{1}","undef":"Provider '{0}' must return a value from $get factory method.","unpr":"Unknown provider: {0}","itkn":"Incorrect injection token! Expected service name as string, got {0}"},"$templateRequest":{"tpload":"Failed to load template: {0} (HTTP status: {1} {2})"},"filter":{"notarray":"Expected array but received: {0}"},"ngTransclude":{"orphan":"Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}"},"ngModel":{"nopromise":"Expected asynchronous validator to return a promise but got '{0}' instead.","nonassign":"Expression '{0}' is non-assignable. Element: {1}","datefmt":"Expected `{0}` to be a date","constexpr":"Expected constant expression for `{0}`, but saw `{1}`.","numfmt":"Expected `{0}` to be a number"},"$location":{"nostate":"History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API","badpath":"Invalid url \"{0}\".","ipthprfx":"Invalid url \"{0}\", missing path prefix \"{1}\".","isrcharg":"The first argument of the `$location#search()` call must be a string or an object.","nobase":"$location in HTML5 mode requires a tag to be present!"},"$cacheFactory":{"iid":"CacheId '{0}' is already taken!"},"$interpolate":{"noconcat":"Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce","interr":"Can't interpolate: {0}\n{1}","nochgmustache":"angular-message-format.js currently does not allow you to use custom start and end symbols for interpolation.","reqcomma":"Expected a comma after the keyword “{0}” at line {1}, column {2} of text “{3}”","untermstr":"The string beginning at line {0}, column {1} is unterminated in text “{2}”","badexpr":"Unexpected operator “{0}” at line {1}, column {2} in text. Was expecting “{3}”. Text: “{4}”","dupvalue":"The choice “{0}” is specified more than once. Duplicate key is at line {1}, column {2} in text “{3}”","unsafe":"Use of select/plural MessageFormat syntax is currently disallowed in a secure context ({0}). At line {1}, column {2} of text “{3}”","reqother":"“other” is a required option.","reqendinterp":"Expecting end of interpolation symbol, “{0}”, at line {1}, column {2} in text “{3}”","reqarg":"Expected one of “plural” or “select” at line {0}, column {1} of text “{2}”","wantstring":"Expected the beginning of a string at line {0}, column {1} in text “{2}”","logicbug":"The messageformat parser has encountered an internal error. Please file a github issue against the AngularJS project and provide this message text that triggers the bug. Text: “{0}”","reqopenbrace":"The plural choice “{0}” must be followed by a message in braces at line {1}, column {2} in text “{3}”","unknarg":"Unsupported keyword “{0}” at line {0}, column {1}. Only “plural” and “select” are currently supported. Text: “{3}”","reqendbrace":"The plural/select choice “{0}” message starting at line {1}, column {2} does not have an ending closing brace. Text “{3}”"},"ngOptions":{"iexp":"Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}"},"$rootScope":{"inprog":"{0} already in progress","infdig":"{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}"},"$compile":{"selmulti":"Binding to the 'multiple' attribute is not supported. Element: {0}","ctreq":"Controller '{0}', required by directive '{1}', can't be found!","tplrt":"Template for directive '{0}' must have exactly one root element. {1}","iscp":"Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}","baddir":"Directive/Component name '{0}' is invalid. The name should not contain leading or trailing whitespaces","multilink":"This element has already been linked.","noctrl":"Cannot bind to controller without directive '{0}'s controller.","multidir":"Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}","badrestrict":"Restrict property '{0}' of directive '{1}' is invalid","uterdir":"Unterminated attribute, found '{0}' but no matching '{1}' found.","infchng":"{0} $onChanges() iterations reached. Aborting!\n","reqslot":"Required transclusion slot `{0}` was not filled.","nodomevents":"Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.","nonassign":"Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!","missingattr":"Attribute '{0}' of '{1}' is non-optional and must be set!","noslot":"No parent directive that requires a transclusion with slot name \"{0}\". Element: {1}"},"$resource":{"badargs":"Expected up to 4 arguments [params, data, success, error], got {0} arguments","badmember":"Dotted member path \"@{0}\" is invalid.","badname":"hasOwnProperty is not a valid parameter name.","badcfg":"Error in resource configuration for action `{0}`. Expected response to contain an {1} but got an {2} (Request: {3} {4})"},"$route":{"norout":"Tried updating route when with no current route"},"linky":{"notstring":"Expected string but received: {0}"},"$sanitize":{"noinert":"Can't create an inert html document","uinput":"Failed to sanitize html because the input is unstable","elclob":"Failed to sanitize html because the element is clobbered: {0}"}}} \ No newline at end of file diff --git a/1.6.6/i18n/angular-locale_af-na.js b/1.6.6/i18n/angular-locale_af-na.js new file mode 100644 index 000000000..88b8b9ef7 --- /dev/null +++ b/1.6.6/i18n/angular-locale_af-na.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "vm.", + "nm." + ], + "DAY": [ + "Sondag", + "Maandag", + "Dinsdag", + "Woensdag", + "Donderdag", + "Vrydag", + "Saterdag" + ], + "ERANAMES": [ + "voor Christus", + "na Christus" + ], + "ERAS": [ + "v.C.", + "n.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januarie", + "Februarie", + "Maart", + "April", + "Mei", + "Junie", + "Julie", + "Augustus", + "September", + "Oktober", + "November", + "Desember" + ], + "SHORTDAY": [ + "So.", + "Ma.", + "Di.", + "Wo.", + "Do.", + "Vr.", + "Sa." + ], + "SHORTMONTH": [ + "Jan.", + "Feb.", + "Mrt.", + "Apr.", + "Mei", + "Jun.", + "Jul.", + "Aug.", + "Sep.", + "Okt.", + "Nov.", + "Des." + ], + "STANDALONEMONTH": [ + "Januarie", + "Februarie", + "Maart", + "April", + "Mei", + "Junie", + "Julie", + "Augustus", + "September", + "Oktober", + "November", + "Desember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd MMMM y", + "longDate": "dd MMMM y", + "medium": "dd MMM y HH:mm:ss", + "mediumDate": "dd MMM y", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "af-na", + "localeID": "af_NA", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_af-za.js b/1.6.6/i18n/angular-locale_af-za.js new file mode 100644 index 000000000..27146ef95 --- /dev/null +++ b/1.6.6/i18n/angular-locale_af-za.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "vm.", + "nm." + ], + "DAY": [ + "Sondag", + "Maandag", + "Dinsdag", + "Woensdag", + "Donderdag", + "Vrydag", + "Saterdag" + ], + "ERANAMES": [ + "voor Christus", + "na Christus" + ], + "ERAS": [ + "v.C.", + "n.C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Januarie", + "Februarie", + "Maart", + "April", + "Mei", + "Junie", + "Julie", + "Augustus", + "September", + "Oktober", + "November", + "Desember" + ], + "SHORTDAY": [ + "So.", + "Ma.", + "Di.", + "Wo.", + "Do.", + "Vr.", + "Sa." + ], + "SHORTMONTH": [ + "Jan.", + "Feb.", + "Mrt.", + "Apr.", + "Mei", + "Jun.", + "Jul.", + "Aug.", + "Sep.", + "Okt.", + "Nov.", + "Des." + ], + "STANDALONEMONTH": [ + "Januarie", + "Februarie", + "Maart", + "April", + "Mei", + "Junie", + "Julie", + "Augustus", + "September", + "Oktober", + "November", + "Desember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd MMMM y", + "longDate": "dd MMMM y", + "medium": "dd MMM y HH:mm:ss", + "mediumDate": "dd MMM y", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "R", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "af-za", + "localeID": "af_ZA", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_af.js b/1.6.6/i18n/angular-locale_af.js new file mode 100644 index 000000000..f0c982e28 --- /dev/null +++ b/1.6.6/i18n/angular-locale_af.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "vm.", + "nm." + ], + "DAY": [ + "Sondag", + "Maandag", + "Dinsdag", + "Woensdag", + "Donderdag", + "Vrydag", + "Saterdag" + ], + "ERANAMES": [ + "voor Christus", + "na Christus" + ], + "ERAS": [ + "v.C.", + "n.C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Januarie", + "Februarie", + "Maart", + "April", + "Mei", + "Junie", + "Julie", + "Augustus", + "September", + "Oktober", + "November", + "Desember" + ], + "SHORTDAY": [ + "So.", + "Ma.", + "Di.", + "Wo.", + "Do.", + "Vr.", + "Sa." + ], + "SHORTMONTH": [ + "Jan.", + "Feb.", + "Mrt.", + "Apr.", + "Mei", + "Jun.", + "Jul.", + "Aug.", + "Sep.", + "Okt.", + "Nov.", + "Des." + ], + "STANDALONEMONTH": [ + "Januarie", + "Februarie", + "Maart", + "April", + "Mei", + "Junie", + "Julie", + "Augustus", + "September", + "Oktober", + "November", + "Desember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd MMMM y", + "longDate": "dd MMMM y", + "medium": "dd MMM y HH:mm:ss", + "mediumDate": "dd MMM y", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "R", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "af", + "localeID": "af", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_agq-cm.js b/1.6.6/i18n/angular-locale_agq-cm.js new file mode 100644 index 000000000..f33690813 --- /dev/null +++ b/1.6.6/i18n/angular-locale_agq-cm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.g", + "a.k" + ], + "DAY": [ + "tsu\u0294nts\u0268", + "tsu\u0294ukp\u00e0", + "tsu\u0294ugh\u0254e", + "tsu\u0294ut\u0254\u0300ml\u00f2", + "tsu\u0294um\u00e8", + "tsu\u0294ugh\u0268\u0302m", + "tsu\u0294ndz\u0268k\u0254\u0294\u0254" + ], + "ERANAMES": [ + "S\u011be K\u0268\u0300lesto", + "B\u01cea K\u0268\u0300lesto" + ], + "ERAS": [ + "SK", + "BK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "ndz\u0254\u0300\u014b\u0254\u0300n\u00f9m", + "ndz\u0254\u0300\u014b\u0254\u0300k\u0197\u0300z\u00f9\u0294", + "ndz\u0254\u0300\u014b\u0254\u0300t\u0197\u0300d\u0289\u0300gh\u00e0", + "ndz\u0254\u0300\u014b\u0254\u0300t\u01ceaf\u0289\u0304gh\u0101", + "ndz\u0254\u0300\u014b\u00e8s\u00e8e", + "ndz\u0254\u0300\u014b\u0254\u0300nz\u00f9gh\u00f2", + "ndz\u0254\u0300\u014b\u0254\u0300d\u00f9mlo", + "ndz\u0254\u0300\u014b\u0254\u0300kw\u00eef\u0254\u0300e", + "ndz\u0254\u0300\u014b\u0254\u0300t\u0197\u0300f\u0289\u0300gh\u00e0dzugh\u00f9", + "ndz\u0254\u0300\u014b\u0254\u0300gh\u01d4uwel\u0254\u0300m", + "ndz\u0254\u0300\u014b\u0254\u0300chwa\u0294\u00e0kaa wo", + "ndz\u0254\u0300\u014b\u00e8fw\u00f2o" + ], + "SHORTDAY": [ + "nts", + "kpa", + "gh\u0254", + "t\u0254m", + "ume", + "gh\u0268", + "dzk" + ], + "SHORTMONTH": [ + "n\u00f9m", + "k\u0268z", + "t\u0268d", + "taa", + "see", + "nzu", + "dum", + "f\u0254e", + "dzu", + "l\u0254m", + "kaa", + "fwo" + ], + "STANDALONEMONTH": [ + "ndz\u0254\u0300\u014b\u0254\u0300n\u00f9m", + "ndz\u0254\u0300\u014b\u0254\u0300k\u0197\u0300z\u00f9\u0294", + "ndz\u0254\u0300\u014b\u0254\u0300t\u0197\u0300d\u0289\u0300gh\u00e0", + "ndz\u0254\u0300\u014b\u0254\u0300t\u01ceaf\u0289\u0304gh\u0101", + "ndz\u0254\u0300\u014b\u00e8s\u00e8e", + "ndz\u0254\u0300\u014b\u0254\u0300nz\u00f9gh\u00f2", + "ndz\u0254\u0300\u014b\u0254\u0300d\u00f9mlo", + "ndz\u0254\u0300\u014b\u0254\u0300kw\u00eef\u0254\u0300e", + "ndz\u0254\u0300\u014b\u0254\u0300t\u0197\u0300f\u0289\u0300gh\u00e0dzugh\u00f9", + "ndz\u0254\u0300\u014b\u0254\u0300gh\u01d4uwel\u0254\u0300m", + "ndz\u0254\u0300\u014b\u0254\u0300chwa\u0294\u00e0kaa wo", + "ndz\u0254\u0300\u014b\u00e8fw\u00f2o" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "agq-cm", + "localeID": "agq_CM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_agq.js b/1.6.6/i18n/angular-locale_agq.js new file mode 100644 index 000000000..cf57315ff --- /dev/null +++ b/1.6.6/i18n/angular-locale_agq.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.g", + "a.k" + ], + "DAY": [ + "tsu\u0294nts\u0268", + "tsu\u0294ukp\u00e0", + "tsu\u0294ugh\u0254e", + "tsu\u0294ut\u0254\u0300ml\u00f2", + "tsu\u0294um\u00e8", + "tsu\u0294ugh\u0268\u0302m", + "tsu\u0294ndz\u0268k\u0254\u0294\u0254" + ], + "ERANAMES": [ + "S\u011be K\u0268\u0300lesto", + "B\u01cea K\u0268\u0300lesto" + ], + "ERAS": [ + "SK", + "BK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "ndz\u0254\u0300\u014b\u0254\u0300n\u00f9m", + "ndz\u0254\u0300\u014b\u0254\u0300k\u0197\u0300z\u00f9\u0294", + "ndz\u0254\u0300\u014b\u0254\u0300t\u0197\u0300d\u0289\u0300gh\u00e0", + "ndz\u0254\u0300\u014b\u0254\u0300t\u01ceaf\u0289\u0304gh\u0101", + "ndz\u0254\u0300\u014b\u00e8s\u00e8e", + "ndz\u0254\u0300\u014b\u0254\u0300nz\u00f9gh\u00f2", + "ndz\u0254\u0300\u014b\u0254\u0300d\u00f9mlo", + "ndz\u0254\u0300\u014b\u0254\u0300kw\u00eef\u0254\u0300e", + "ndz\u0254\u0300\u014b\u0254\u0300t\u0197\u0300f\u0289\u0300gh\u00e0dzugh\u00f9", + "ndz\u0254\u0300\u014b\u0254\u0300gh\u01d4uwel\u0254\u0300m", + "ndz\u0254\u0300\u014b\u0254\u0300chwa\u0294\u00e0kaa wo", + "ndz\u0254\u0300\u014b\u00e8fw\u00f2o" + ], + "SHORTDAY": [ + "nts", + "kpa", + "gh\u0254", + "t\u0254m", + "ume", + "gh\u0268", + "dzk" + ], + "SHORTMONTH": [ + "n\u00f9m", + "k\u0268z", + "t\u0268d", + "taa", + "see", + "nzu", + "dum", + "f\u0254e", + "dzu", + "l\u0254m", + "kaa", + "fwo" + ], + "STANDALONEMONTH": [ + "ndz\u0254\u0300\u014b\u0254\u0300n\u00f9m", + "ndz\u0254\u0300\u014b\u0254\u0300k\u0197\u0300z\u00f9\u0294", + "ndz\u0254\u0300\u014b\u0254\u0300t\u0197\u0300d\u0289\u0300gh\u00e0", + "ndz\u0254\u0300\u014b\u0254\u0300t\u01ceaf\u0289\u0304gh\u0101", + "ndz\u0254\u0300\u014b\u00e8s\u00e8e", + "ndz\u0254\u0300\u014b\u0254\u0300nz\u00f9gh\u00f2", + "ndz\u0254\u0300\u014b\u0254\u0300d\u00f9mlo", + "ndz\u0254\u0300\u014b\u0254\u0300kw\u00eef\u0254\u0300e", + "ndz\u0254\u0300\u014b\u0254\u0300t\u0197\u0300f\u0289\u0300gh\u00e0dzugh\u00f9", + "ndz\u0254\u0300\u014b\u0254\u0300gh\u01d4uwel\u0254\u0300m", + "ndz\u0254\u0300\u014b\u0254\u0300chwa\u0294\u00e0kaa wo", + "ndz\u0254\u0300\u014b\u00e8fw\u00f2o" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "agq", + "localeID": "agq", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ak-gh.js b/1.6.6/i18n/angular-locale_ak-gh.js new file mode 100644 index 000000000..345b33180 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ak-gh.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AN", + "EW" + ], + "DAY": [ + "Kwesida", + "Dwowda", + "Benada", + "Wukuda", + "Yawda", + "Fida", + "Memeneda" + ], + "ERANAMES": [ + "Ansa Kristo", + "Kristo Ekyiri" + ], + "ERAS": [ + "AK", + "KE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Sanda-\u0186p\u025bp\u0254n", + "Kwakwar-\u0186gyefuo", + "Eb\u0254w-\u0186benem", + "Eb\u0254bira-Oforisuo", + "Esusow Aketseaba-K\u0254t\u0254nimba", + "Obirade-Ay\u025bwohomumu", + "Ay\u025bwoho-Kitawonsa", + "Difuu-\u0186sandaa", + "Fankwa-\u0190b\u0254", + "\u0186b\u025bs\u025b-Ahinime", + "\u0186ber\u025bf\u025bw-Obubuo", + "Mumu-\u0186p\u025bnimba" + ], + "SHORTDAY": [ + "Kwe", + "Dwo", + "Ben", + "Wuk", + "Yaw", + "Fia", + "Mem" + ], + "SHORTMONTH": [ + "S-\u0186", + "K-\u0186", + "E-\u0186", + "E-O", + "E-K", + "O-A", + "A-K", + "D-\u0186", + "F-\u0190", + "\u0186-A", + "\u0186-O", + "M-\u0186" + ], + "STANDALONEMONTH": [ + "Sanda-\u0186p\u025bp\u0254n", + "Kwakwar-\u0186gyefuo", + "Eb\u0254w-\u0186benem", + "Eb\u0254bira-Oforisuo", + "Esusow Aketseaba-K\u0254t\u0254nimba", + "Obirade-Ay\u025bwohomumu", + "Ay\u025bwoho-Kitawonsa", + "Difuu-\u0186sandaa", + "Fankwa-\u0190b\u0254", + "\u0186b\u025bs\u025b-Ahinime", + "\u0186ber\u025bf\u025bw-Obubuo", + "Mumu-\u0186p\u025bnimba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, y MMMM dd", + "longDate": "y MMMM d", + "medium": "y MMM d h:mm:ss a", + "mediumDate": "y MMM d", + "mediumTime": "h:mm:ss a", + "short": "yy/MM/dd h:mm a", + "shortDate": "yy/MM/dd", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "GHS", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ak-gh", + "localeID": "ak_GH", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ak.js b/1.6.6/i18n/angular-locale_ak.js new file mode 100644 index 000000000..1065dc95b --- /dev/null +++ b/1.6.6/i18n/angular-locale_ak.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AN", + "EW" + ], + "DAY": [ + "Kwesida", + "Dwowda", + "Benada", + "Wukuda", + "Yawda", + "Fida", + "Memeneda" + ], + "ERANAMES": [ + "Ansa Kristo", + "Kristo Ekyiri" + ], + "ERAS": [ + "AK", + "KE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Sanda-\u0186p\u025bp\u0254n", + "Kwakwar-\u0186gyefuo", + "Eb\u0254w-\u0186benem", + "Eb\u0254bira-Oforisuo", + "Esusow Aketseaba-K\u0254t\u0254nimba", + "Obirade-Ay\u025bwohomumu", + "Ay\u025bwoho-Kitawonsa", + "Difuu-\u0186sandaa", + "Fankwa-\u0190b\u0254", + "\u0186b\u025bs\u025b-Ahinime", + "\u0186ber\u025bf\u025bw-Obubuo", + "Mumu-\u0186p\u025bnimba" + ], + "SHORTDAY": [ + "Kwe", + "Dwo", + "Ben", + "Wuk", + "Yaw", + "Fia", + "Mem" + ], + "SHORTMONTH": [ + "S-\u0186", + "K-\u0186", + "E-\u0186", + "E-O", + "E-K", + "O-A", + "A-K", + "D-\u0186", + "F-\u0190", + "\u0186-A", + "\u0186-O", + "M-\u0186" + ], + "STANDALONEMONTH": [ + "Sanda-\u0186p\u025bp\u0254n", + "Kwakwar-\u0186gyefuo", + "Eb\u0254w-\u0186benem", + "Eb\u0254bira-Oforisuo", + "Esusow Aketseaba-K\u0254t\u0254nimba", + "Obirade-Ay\u025bwohomumu", + "Ay\u025bwoho-Kitawonsa", + "Difuu-\u0186sandaa", + "Fankwa-\u0190b\u0254", + "\u0186b\u025bs\u025b-Ahinime", + "\u0186ber\u025bf\u025bw-Obubuo", + "Mumu-\u0186p\u025bnimba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, y MMMM dd", + "longDate": "y MMMM d", + "medium": "y MMM d h:mm:ss a", + "mediumDate": "y MMM d", + "mediumTime": "h:mm:ss a", + "short": "yy/MM/dd h:mm a", + "shortDate": "yy/MM/dd", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "GHS", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ak", + "localeID": "ak", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_am-et.js b/1.6.6/i18n/angular-locale_am-et.js new file mode 100644 index 000000000..ad0511b34 --- /dev/null +++ b/1.6.6/i18n/angular-locale_am-et.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u1325\u12cb\u1275", + "\u12a8\u1230\u12d3\u1275" + ], + "DAY": [ + "\u12a5\u1211\u12f5", + "\u1230\u129e", + "\u121b\u12ad\u1230\u129e", + "\u1228\u1261\u12d5", + "\u1210\u1219\u1235", + "\u12d3\u122d\u1265", + "\u1245\u12f3\u121c" + ], + "ERANAMES": [ + "\u12d3\u1218\u1270 \u12d3\u1208\u121d", + "\u12d3\u1218\u1270 \u121d\u1215\u1228\u1275" + ], + "ERAS": [ + "\u12d3/\u12d3", + "\u12d3/\u121d" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u1303\u1295\u12e9\u12c8\u122a", + "\u134c\u1265\u1229\u12c8\u122a", + "\u121b\u122d\u127d", + "\u12a4\u1355\u122a\u120d", + "\u121c\u12ed", + "\u1301\u1295", + "\u1301\u120b\u12ed", + "\u12a6\u1308\u1235\u1275", + "\u1234\u1355\u1274\u121d\u1260\u122d", + "\u12a6\u12ad\u1276\u1260\u122d", + "\u1296\u126c\u121d\u1260\u122d", + "\u12f2\u1234\u121d\u1260\u122d" + ], + "SHORTDAY": [ + "\u12a5\u1211\u12f5", + "\u1230\u129e", + "\u121b\u12ad\u1230", + "\u1228\u1261\u12d5", + "\u1210\u1219\u1235", + "\u12d3\u122d\u1265", + "\u1245\u12f3\u121c" + ], + "SHORTMONTH": [ + "\u1303\u1295\u12e9", + "\u134c\u1265\u1229", + "\u121b\u122d\u127d", + "\u12a4\u1355\u122a", + "\u121c\u12ed", + "\u1301\u1295", + "\u1301\u120b\u12ed", + "\u12a6\u1308\u1235", + "\u1234\u1355\u1274", + "\u12a6\u12ad\u1276", + "\u1296\u126c\u121d", + "\u12f2\u1234\u121d" + ], + "STANDALONEMONTH": [ + "\u1303\u1295\u12e9\u12c8\u122a", + "\u134c\u1265\u1229\u12c8\u122a", + "\u121b\u122d\u127d", + "\u12a4\u1355\u122a\u120d", + "\u121c\u12ed", + "\u1301\u1295", + "\u1301\u120b\u12ed", + "\u12a6\u1308\u1235\u1275", + "\u1234\u1355\u1274\u121d\u1260\u122d", + "\u12a6\u12ad\u1276\u1260\u122d", + "\u1296\u126c\u121d\u1260\u122d", + "\u12f2\u1234\u121d\u1260\u122d" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE \u1363d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Birr", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "am-et", + "localeID": "am_ET", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_am.js b/1.6.6/i18n/angular-locale_am.js new file mode 100644 index 000000000..226ccc060 --- /dev/null +++ b/1.6.6/i18n/angular-locale_am.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u1325\u12cb\u1275", + "\u12a8\u1230\u12d3\u1275" + ], + "DAY": [ + "\u12a5\u1211\u12f5", + "\u1230\u129e", + "\u121b\u12ad\u1230\u129e", + "\u1228\u1261\u12d5", + "\u1210\u1219\u1235", + "\u12d3\u122d\u1265", + "\u1245\u12f3\u121c" + ], + "ERANAMES": [ + "\u12d3\u1218\u1270 \u12d3\u1208\u121d", + "\u12d3\u1218\u1270 \u121d\u1215\u1228\u1275" + ], + "ERAS": [ + "\u12d3/\u12d3", + "\u12d3/\u121d" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u1303\u1295\u12e9\u12c8\u122a", + "\u134c\u1265\u1229\u12c8\u122a", + "\u121b\u122d\u127d", + "\u12a4\u1355\u122a\u120d", + "\u121c\u12ed", + "\u1301\u1295", + "\u1301\u120b\u12ed", + "\u12a6\u1308\u1235\u1275", + "\u1234\u1355\u1274\u121d\u1260\u122d", + "\u12a6\u12ad\u1276\u1260\u122d", + "\u1296\u126c\u121d\u1260\u122d", + "\u12f2\u1234\u121d\u1260\u122d" + ], + "SHORTDAY": [ + "\u12a5\u1211\u12f5", + "\u1230\u129e", + "\u121b\u12ad\u1230", + "\u1228\u1261\u12d5", + "\u1210\u1219\u1235", + "\u12d3\u122d\u1265", + "\u1245\u12f3\u121c" + ], + "SHORTMONTH": [ + "\u1303\u1295\u12e9", + "\u134c\u1265\u1229", + "\u121b\u122d\u127d", + "\u12a4\u1355\u122a", + "\u121c\u12ed", + "\u1301\u1295", + "\u1301\u120b\u12ed", + "\u12a6\u1308\u1235", + "\u1234\u1355\u1274", + "\u12a6\u12ad\u1276", + "\u1296\u126c\u121d", + "\u12f2\u1234\u121d" + ], + "STANDALONEMONTH": [ + "\u1303\u1295\u12e9\u12c8\u122a", + "\u134c\u1265\u1229\u12c8\u122a", + "\u121b\u122d\u127d", + "\u12a4\u1355\u122a\u120d", + "\u121c\u12ed", + "\u1301\u1295", + "\u1301\u120b\u12ed", + "\u12a6\u1308\u1235\u1275", + "\u1234\u1355\u1274\u121d\u1260\u122d", + "\u12a6\u12ad\u1276\u1260\u122d", + "\u1296\u126c\u121d\u1260\u122d", + "\u12f2\u1234\u121d\u1260\u122d" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE \u1363d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Birr", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "am", + "localeID": "am", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-001.js b/1.6.6/i18n/angular-locale_ar-001.js new file mode 100644 index 000000000..8cde90f1f --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-001.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-001", + "localeID": "ar_001", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-ae.js b/1.6.6/i18n/angular-locale_ar-ae.js new file mode 100644 index 000000000..26d3d7e09 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-ae.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "dh", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-ae", + "localeID": "ar_AE", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-bh.js b/1.6.6/i18n/angular-locale_ar-bh.js new file mode 100644 index 000000000..14b457c1b --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-bh.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 3, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-bh", + "localeID": "ar_BH", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-dj.js b/1.6.6/i18n/angular-locale_ar-dj.js new file mode 100644 index 000000000..eeac9a43d --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-dj.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Fdj", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-dj", + "localeID": "ar_DJ", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-dz.js b/1.6.6/i18n/angular-locale_ar-dz.js new file mode 100644 index 000000000..037cc995a --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-dz.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u062c\u0627\u0646\u0641\u064a", + "\u0641\u064a\u0641\u0631\u064a", + "\u0645\u0627\u0631\u0633", + "\u0623\u0641\u0631\u064a\u0644", + "\u0645\u0627\u064a", + "\u062c\u0648\u0627\u0646", + "\u062c\u0648\u064a\u0644\u064a\u0629", + "\u0623\u0648\u062a", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u062c\u0627\u0646\u0641\u064a", + "\u0641\u064a\u0641\u0631\u064a", + "\u0645\u0627\u0631\u0633", + "\u0623\u0641\u0631\u064a\u0644", + "\u0645\u0627\u064a", + "\u062c\u0648\u0627\u0646", + "\u062c\u0648\u064a\u0644\u064a\u0629", + "\u0623\u0648\u062a", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u062c\u0627\u0646\u0641\u064a", + "\u0641\u064a\u0641\u0631\u064a", + "\u0645\u0627\u0631\u0633", + "\u0623\u0641\u0631\u064a\u0644", + "\u0645\u0627\u064a", + "\u062c\u0648\u0627\u0646", + "\u062c\u0648\u064a\u0644\u064a\u0629", + "\u0623\u0648\u062a", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ar-dz", + "localeID": "ar_DZ", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-eg.js b/1.6.6/i18n/angular-locale_ar-eg.js new file mode 100644 index 000000000..3d7e79be4 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-eg.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-eg", + "localeID": "ar_EG", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-eh.js b/1.6.6/i18n/angular-locale_ar-eh.js new file mode 100644 index 000000000..a1e4460cc --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-eh.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "dh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ar-eh", + "localeID": "ar_EH", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-er.js b/1.6.6/i18n/angular-locale_ar-er.js new file mode 100644 index 000000000..bde00c6da --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-er.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Nfk", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-er", + "localeID": "ar_ER", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-il.js b/1.6.6/i18n/angular-locale_ar-il.js new file mode 100644 index 000000000..bb3f266a7 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-il.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y H:mm:ss", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "H:mm:ss", + "short": "d\u200f/M\u200f/y H:mm", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20aa", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-il", + "localeID": "ar_IL", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-iq.js b/1.6.6/i18n/angular-locale_ar-iq.js new file mode 100644 index 000000000..3fb7080a2 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-iq.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0634\u0628\u0627\u0637", + "\u0622\u0630\u0627\u0631", + "\u0646\u064a\u0633\u0627\u0646", + "\u0623\u064a\u0627\u0631", + "\u062d\u0632\u064a\u0631\u0627\u0646", + "\u062a\u0645\u0648\u0632", + "\u0622\u0628", + "\u0623\u064a\u0644\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0634\u0628\u0627\u0637", + "\u0622\u0630\u0627\u0631", + "\u0646\u064a\u0633\u0627\u0646", + "\u0623\u064a\u0627\u0631", + "\u062d\u0632\u064a\u0631\u0627\u0646", + "\u062a\u0645\u0648\u0632", + "\u0622\u0628", + "\u0623\u064a\u0644\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646 \u0627\u0644\u0623\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644" + ], + "STANDALONEMONTH": [ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0634\u0628\u0627\u0637", + "\u0622\u0630\u0627\u0631", + "\u0646\u064a\u0633\u0627\u0646", + "\u0623\u064a\u0627\u0631", + "\u062d\u0632\u064a\u0631\u0627\u0646", + "\u062a\u0645\u0648\u0632", + "\u0622\u0628", + "\u0623\u064a\u0644\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-iq", + "localeID": "ar_IQ", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-jo.js b/1.6.6/i18n/angular-locale_ar-jo.js new file mode 100644 index 000000000..e167f6a99 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-jo.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0634\u0628\u0627\u0637", + "\u0622\u0630\u0627\u0631", + "\u0646\u064a\u0633\u0627\u0646", + "\u0623\u064a\u0627\u0631", + "\u062d\u0632\u064a\u0631\u0627\u0646", + "\u062a\u0645\u0648\u0632", + "\u0622\u0628", + "\u0623\u064a\u0644\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0634\u0628\u0627\u0637", + "\u0622\u0630\u0627\u0631", + "\u0646\u064a\u0633\u0627\u0646", + "\u0623\u064a\u0627\u0631", + "\u062d\u0632\u064a\u0631\u0627\u0646", + "\u062a\u0645\u0648\u0632", + "\u0622\u0628", + "\u0623\u064a\u0644\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644" + ], + "STANDALONEMONTH": [ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0634\u0628\u0627\u0637", + "\u0622\u0630\u0627\u0631", + "\u0646\u064a\u0633\u0627\u0646", + "\u0623\u064a\u0627\u0631", + "\u062d\u0632\u064a\u0631\u0627\u0646", + "\u062a\u0645\u0648\u0632", + "\u0622\u0628", + "\u0623\u064a\u0644\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 3, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-jo", + "localeID": "ar_JO", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-km.js b/1.6.6/i18n/angular-locale_ar-km.js new file mode 100644 index 000000000..afc8dc33b --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-km.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y HH:mm:ss", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "HH:mm:ss", + "short": "d\u200f/M\u200f/y HH:mm", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CF", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-km", + "localeID": "ar_KM", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-kw.js b/1.6.6/i18n/angular-locale_ar-kw.js new file mode 100644 index 000000000..e140f0037 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-kw.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 3, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-kw", + "localeID": "ar_KW", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-lb.js b/1.6.6/i18n/angular-locale_ar-lb.js new file mode 100644 index 000000000..0af1afca9 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-lb.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0634\u0628\u0627\u0637", + "\u0622\u0630\u0627\u0631", + "\u0646\u064a\u0633\u0627\u0646", + "\u0623\u064a\u0627\u0631", + "\u062d\u0632\u064a\u0631\u0627\u0646", + "\u062a\u0645\u0648\u0632", + "\u0622\u0628", + "\u0623\u064a\u0644\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0634\u0628\u0627\u0637", + "\u0622\u0630\u0627\u0631", + "\u0646\u064a\u0633\u0627\u0646", + "\u0623\u064a\u0627\u0631", + "\u062d\u0632\u064a\u0631\u0627\u0646", + "\u062a\u0645\u0648\u0632", + "\u0622\u0628", + "\u0623\u064a\u0644\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644" + ], + "STANDALONEMONTH": [ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0634\u0628\u0627\u0637", + "\u0622\u0630\u0627\u0631", + "\u0646\u064a\u0633\u0627\u0646", + "\u0623\u064a\u0627\u0631", + "\u062d\u0632\u064a\u0631\u0627\u0646", + "\u062a\u0645\u0648\u0632", + "\u0622\u0628", + "\u0623\u064a\u0644\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "L\u00a3", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-lb", + "localeID": "ar_LB", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-ly.js b/1.6.6/i18n/angular-locale_ar-ly.js new file mode 100644 index 000000000..eb94c4c07 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-ly.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 3, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ar-ly", + "localeID": "ar_LY", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-ma.js b/1.6.6/i18n/angular-locale_ar-ma.js new file mode 100644 index 000000000..44316c2f7 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-ma.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648\u0632", + "\u063a\u0634\u062a", + "\u0634\u062a\u0646\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0646\u0628\u0631", + "\u062f\u062c\u0646\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648\u0632", + "\u063a\u0634\u062a", + "\u0634\u062a\u0646\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0646\u0628\u0631", + "\u062f\u062c\u0646\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648\u0632", + "\u063a\u0634\u062a", + "\u0634\u062a\u0646\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0646\u0628\u0631", + "\u062f\u062c\u0646\u0628\u0631" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y HH:mm:ss", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "HH:mm:ss", + "short": "d\u200f/M\u200f/y HH:mm", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "dh", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ar-ma", + "localeID": "ar_MA", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-mr.js b/1.6.6/i18n/angular-locale_ar-mr.js new file mode 100644 index 000000000..9ebb14881 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-mr.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0625\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0634\u062a", + "\u0634\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u062c\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0625\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0634\u062a", + "\u0634\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u062c\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0625\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0634\u062a", + "\u0634\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u062c\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "MRO", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-mr", + "localeID": "ar_MR", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-om.js b/1.6.6/i18n/angular-locale_ar-om.js new file mode 100644 index 000000000..5048f6132 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-om.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rial", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 3, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-om", + "localeID": "ar_OM", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-ps.js b/1.6.6/i18n/angular-locale_ar-ps.js new file mode 100644 index 000000000..a4f35630b --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-ps.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0634\u0628\u0627\u0637", + "\u0622\u0630\u0627\u0631", + "\u0646\u064a\u0633\u0627\u0646", + "\u0623\u064a\u0627\u0631", + "\u062d\u0632\u064a\u0631\u0627\u0646", + "\u062a\u0645\u0648\u0632", + "\u0622\u0628", + "\u0623\u064a\u0644\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0634\u0628\u0627\u0637", + "\u0622\u0630\u0627\u0631", + "\u0646\u064a\u0633\u0627\u0646", + "\u0623\u064a\u0627\u0631", + "\u062d\u0632\u064a\u0631\u0627\u0646", + "\u062a\u0645\u0648\u0632", + "\u0622\u0628", + "\u0623\u064a\u0644\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644" + ], + "STANDALONEMONTH": [ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0634\u0628\u0627\u0637", + "\u0622\u0630\u0627\u0631", + "\u0646\u064a\u0633\u0627\u0646", + "\u0623\u064a\u0627\u0631", + "\u062d\u0632\u064a\u0631\u0627\u0646", + "\u062a\u0645\u0648\u0632", + "\u0622\u0628", + "\u0623\u064a\u0644\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20aa", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-ps", + "localeID": "ar_PS", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-qa.js b/1.6.6/i18n/angular-locale_ar-qa.js new file mode 100644 index 000000000..b51e6a987 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-qa.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rial", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-qa", + "localeID": "ar_QA", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-sa.js b/1.6.6/i18n/angular-locale_ar-sa.js new file mode 100644 index 000000000..b1a0f48db --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-sa.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rial", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-sa", + "localeID": "ar_SA", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-sd.js b/1.6.6/i18n/angular-locale_ar-sd.js new file mode 100644 index 000000000..71ec5b83e --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-sd.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "SDG", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-sd", + "localeID": "ar_SD", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-so.js b/1.6.6/i18n/angular-locale_ar-so.js new file mode 100644 index 000000000..ff1b2ae25 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-so.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "SOS", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-so", + "localeID": "ar_SO", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-ss.js b/1.6.6/i18n/angular-locale_ar-ss.js new file mode 100644 index 000000000..0a9c5af76 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-ss.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-ss", + "localeID": "ar_SS", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-sy.js b/1.6.6/i18n/angular-locale_ar-sy.js new file mode 100644 index 000000000..343a2f39b --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-sy.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0634\u0628\u0627\u0637", + "\u0622\u0630\u0627\u0631", + "\u0646\u064a\u0633\u0627\u0646", + "\u0623\u064a\u0627\u0631", + "\u062d\u0632\u064a\u0631\u0627\u0646", + "\u062a\u0645\u0648\u0632", + "\u0622\u0628", + "\u0623\u064a\u0644\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0634\u0628\u0627\u0637", + "\u0622\u0630\u0627\u0631", + "\u0646\u064a\u0633\u0627\u0646", + "\u0623\u064a\u0627\u0631", + "\u062d\u0632\u064a\u0631\u0627\u0646", + "\u062a\u0645\u0648\u0632", + "\u0622\u0628", + "\u0623\u064a\u0644\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644" + ], + "STANDALONEMONTH": [ + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0634\u0628\u0627\u0637", + "\u0622\u0630\u0627\u0631", + "\u0646\u064a\u0633\u0627\u0646", + "\u0623\u064a\u0627\u0631", + "\u062d\u0632\u064a\u0631\u0627\u0646", + "\u062a\u0645\u0648\u0632", + "\u0622\u0628", + "\u0623\u064a\u0644\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644", + "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-sy", + "localeID": "ar_SY", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-td.js b/1.6.6/i18n/angular-locale_ar-td.js new file mode 100644 index 000000000..6914ae2fa --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-td.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-td", + "localeID": "ar_TD", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-tn.js b/1.6.6/i18n/angular-locale_ar-tn.js new file mode 100644 index 000000000..bd8ca0758 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-tn.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u062c\u0627\u0646\u0641\u064a", + "\u0641\u064a\u0641\u0631\u064a", + "\u0645\u0627\u0631\u0633", + "\u0623\u0641\u0631\u064a\u0644", + "\u0645\u0627\u064a", + "\u062c\u0648\u0627\u0646", + "\u062c\u0648\u064a\u0644\u064a\u0629", + "\u0623\u0648\u062a", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u062c\u0627\u0646\u0641\u064a", + "\u0641\u064a\u0641\u0631\u064a", + "\u0645\u0627\u0631\u0633", + "\u0623\u0641\u0631\u064a\u0644", + "\u0645\u0627\u064a", + "\u062c\u0648\u0627\u0646", + "\u062c\u0648\u064a\u0644\u064a\u0629", + "\u0623\u0648\u062a", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u062c\u0627\u0646\u0641\u064a", + "\u0641\u064a\u0641\u0631\u064a", + "\u0645\u0627\u0631\u0633", + "\u0623\u0641\u0631\u064a\u0644", + "\u0645\u0627\u064a", + "\u062c\u0648\u0627\u0646", + "\u062c\u0648\u064a\u0644\u064a\u0629", + "\u0623\u0648\u062a", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 3, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ar-tn", + "localeID": "ar_TN", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-xb.js b/1.6.6/i18n/angular-locale_ar-xb.js new file mode 100644 index 000000000..4011be68f --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-xb.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u061c\u202eAM\u202c\u061c", + "\u061c\u202ePM\u202c\u061c" + ], + "DAY": [ + "\u061c\u202eSunday\u202c\u061c", + "\u061c\u202eMonday\u202c\u061c", + "\u061c\u202eTuesday\u202c\u061c", + "\u061c\u202eWednesday\u202c\u061c", + "\u061c\u202eThursday\u202c\u061c", + "\u061c\u202eFriday\u202c\u061c", + "\u061c\u202eSaturday\u202c\u061c" + ], + "ERANAMES": [ + "\u061c\u202eBefore\u202c\u061c \u061c\u202eChrist\u202c\u061c", + "\u061c\u202eAnno\u202c\u061c \u061c\u202eDomini\u202c\u061c" + ], + "ERAS": [ + "\u061c\u202eBC\u202c\u061c", + "\u061c\u202eAD\u202c\u061c" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u061c\u202eJanuary\u202c\u061c", + "\u061c\u202eFebruary\u202c\u061c", + "\u061c\u202eMarch\u202c\u061c", + "\u061c\u202eApril\u202c\u061c", + "\u061c\u202eMay\u202c\u061c", + "\u061c\u202eJune\u202c\u061c", + "\u061c\u202eJuly\u202c\u061c", + "\u061c\u202eAugust\u202c\u061c", + "\u061c\u202eSeptember\u202c\u061c", + "\u061c\u202eOctober\u202c\u061c", + "\u061c\u202eNovember\u202c\u061c", + "\u061c\u202eDecember\u202c\u061c" + ], + "SHORTDAY": [ + "\u061c\u202eSun\u202c\u061c", + "\u061c\u202eMon\u202c\u061c", + "\u061c\u202eTue\u202c\u061c", + "\u061c\u202eWed\u202c\u061c", + "\u061c\u202eThu\u202c\u061c", + "\u061c\u202eFri\u202c\u061c", + "\u061c\u202eSat\u202c\u061c" + ], + "SHORTMONTH": [ + "\u061c\u202eJan\u202c\u061c", + "\u061c\u202eFeb\u202c\u061c", + "\u061c\u202eMar\u202c\u061c", + "\u061c\u202eApr\u202c\u061c", + "\u061c\u202eMay\u202c\u061c", + "\u061c\u202eJun\u202c\u061c", + "\u061c\u202eJul\u202c\u061c", + "\u061c\u202eAug\u202c\u061c", + "\u061c\u202eSep\u202c\u061c", + "\u061c\u202eOct\u202c\u061c", + "\u061c\u202eNov\u202c\u061c", + "\u061c\u202eDec\u202c\u061c" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ar-xb", + "localeID": "ar_XB", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar-ye.js b/1.6.6/i18n/angular-locale_ar-ye.js new file mode 100644 index 000000000..2ecb30f96 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar-ye.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rial", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar-ye", + "localeID": "ar_YE", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ar.js b/1.6.6/i18n/angular-locale_ar.js new file mode 100644 index 000000000..ff05f34a1 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ar.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0635", + "\u0645" + ], + "DAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a" + ], + "ERAS": [ + "\u0642.\u0645", + "\u0645" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a" + ], + "SHORTMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0646\u0627\u064a\u0631", + "\u0641\u0628\u0631\u0627\u064a\u0631", + "\u0645\u0627\u0631\u0633", + "\u0623\u0628\u0631\u064a\u0644", + "\u0645\u0627\u064a\u0648", + "\u064a\u0648\u0646\u064a\u0648", + "\u064a\u0648\u0644\u064a\u0648", + "\u0623\u063a\u0633\u0637\u0633", + "\u0633\u0628\u062a\u0645\u0628\u0631", + "\u0623\u0643\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0641\u0645\u0628\u0631", + "\u062f\u064a\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "dd\u200f/MM\u200f/y h:mm:ss a", + "mediumDate": "dd\u200f/MM\u200f/y", + "mediumTime": "h:mm:ss a", + "short": "d\u200f/M\u200f/y h:mm a", + "shortDate": "d\u200f/M\u200f/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ar", + "localeID": "ar", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_as-in.js b/1.6.6/i18n/angular-locale_as-in.js new file mode 100644 index 000000000..4d3445721 --- /dev/null +++ b/1.6.6/i18n/angular-locale_as-in.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u09aa\u09c2\u09f0\u09cd\u09ac\u09be\u09b9\u09cd\u09a3", + "\u0985\u09aa\u09f0\u09be\u09b9\u09cd\u09a3" + ], + "DAY": [ + "\u09a6\u09c7\u0993\u09ac\u09be\u09f0", + "\u09b8\u09cb\u09ae\u09ac\u09be\u09f0", + "\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09f0", + "\u09ac\u09c1\u09a7\u09ac\u09be\u09f0", + "\u09ac\u09c3\u09b9\u09b7\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09f0", + "\u09b6\u09c1\u0995\u09cd\u09f0\u09ac\u09be\u09f0", + "\u09b6\u09a8\u09bf\u09ac\u09be\u09f0" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u099c\u09be\u09a8\u09c1\u09f1\u09be\u09f0\u09c0", + "\u09ab\u09c7\u09ac\u09cd\u09f0\u09c1\u09f1\u09be\u09f0\u09c0", + "\u09ae\u09be\u09f0\u09cd\u099a", + "\u098f\u09aa\u09cd\u09f0\u09bf\u09b2", + "\u09ae\u09c7", + "\u099c\u09c1\u09a8", + "\u099c\u09c1\u09b2\u09be\u0987", + "\u0986\u0997\u09b7\u09cd\u099f", + "\u099b\u09c7\u09aa\u09cd\u09a4\u09c7\u09ae\u09cd\u09ac\u09f0", + "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09f0", + "\u09a8\u09f1\u09c7\u09ae\u09cd\u09ac\u09f0", + "\u09a1\u09bf\u099a\u09c7\u09ae\u09cd\u09ac\u09f0" + ], + "SHORTDAY": [ + "\u09f0\u09ac\u09bf", + "\u09b8\u09cb\u09ae", + "\u09ae\u0999\u09cd\u0997\u09b2", + "\u09ac\u09c1\u09a7", + "\u09ac\u09c3\u09b9\u09b7\u09cd\u09aa\u09a4\u09bf", + "\u09b6\u09c1\u0995\u09cd\u09f0", + "\u09b6\u09a8\u09bf" + ], + "SHORTMONTH": [ + "\u099c\u09be\u09a8\u09c1", + "\u09ab\u09c7\u09ac\u09cd\u09f0\u09c1", + "\u09ae\u09be\u09f0\u09cd\u099a", + "\u098f\u09aa\u09cd\u09f0\u09bf\u09b2", + "\u09ae\u09c7", + "\u099c\u09c1\u09a8", + "\u099c\u09c1\u09b2\u09be\u0987", + "\u0986\u0997", + "\u09b8\u09c7\u09aa\u09cd\u099f", + "\u0985\u0995\u09cd\u099f\u09cb", + "\u09a8\u09ad\u09c7", + "\u09a1\u09bf\u09b8\u09c7" + ], + "STANDALONEMONTH": [ + "\u099c\u09be\u09a8\u09c1\u09f1\u09be\u09f0\u09c0", + "\u09ab\u09c7\u09ac\u09cd\u09f0\u09c1\u09f1\u09be\u09f0\u09c0", + "\u09ae\u09be\u09f0\u09cd\u099a", + "\u098f\u09aa\u09cd\u09f0\u09bf\u09b2", + "\u09ae\u09c7", + "\u099c\u09c1\u09a8", + "\u099c\u09c1\u09b2\u09be\u0987", + "\u0986\u0997\u09b7\u09cd\u099f", + "\u099b\u09c7\u09aa\u09cd\u09a4\u09c7\u09ae\u09cd\u09ac\u09f0", + "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09f0", + "\u09a8\u09f1\u09c7\u09ae\u09cd\u09ac\u09f0", + "\u09a1\u09bf\u099a\u09c7\u09ae\u09cd\u09ac\u09f0" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "as-in", + "localeID": "as_IN", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_as.js b/1.6.6/i18n/angular-locale_as.js new file mode 100644 index 000000000..833e1f808 --- /dev/null +++ b/1.6.6/i18n/angular-locale_as.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u09aa\u09c2\u09f0\u09cd\u09ac\u09be\u09b9\u09cd\u09a3", + "\u0985\u09aa\u09f0\u09be\u09b9\u09cd\u09a3" + ], + "DAY": [ + "\u09a6\u09c7\u0993\u09ac\u09be\u09f0", + "\u09b8\u09cb\u09ae\u09ac\u09be\u09f0", + "\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09f0", + "\u09ac\u09c1\u09a7\u09ac\u09be\u09f0", + "\u09ac\u09c3\u09b9\u09b7\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09f0", + "\u09b6\u09c1\u0995\u09cd\u09f0\u09ac\u09be\u09f0", + "\u09b6\u09a8\u09bf\u09ac\u09be\u09f0" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u099c\u09be\u09a8\u09c1\u09f1\u09be\u09f0\u09c0", + "\u09ab\u09c7\u09ac\u09cd\u09f0\u09c1\u09f1\u09be\u09f0\u09c0", + "\u09ae\u09be\u09f0\u09cd\u099a", + "\u098f\u09aa\u09cd\u09f0\u09bf\u09b2", + "\u09ae\u09c7", + "\u099c\u09c1\u09a8", + "\u099c\u09c1\u09b2\u09be\u0987", + "\u0986\u0997\u09b7\u09cd\u099f", + "\u099b\u09c7\u09aa\u09cd\u09a4\u09c7\u09ae\u09cd\u09ac\u09f0", + "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09f0", + "\u09a8\u09f1\u09c7\u09ae\u09cd\u09ac\u09f0", + "\u09a1\u09bf\u099a\u09c7\u09ae\u09cd\u09ac\u09f0" + ], + "SHORTDAY": [ + "\u09f0\u09ac\u09bf", + "\u09b8\u09cb\u09ae", + "\u09ae\u0999\u09cd\u0997\u09b2", + "\u09ac\u09c1\u09a7", + "\u09ac\u09c3\u09b9\u09b7\u09cd\u09aa\u09a4\u09bf", + "\u09b6\u09c1\u0995\u09cd\u09f0", + "\u09b6\u09a8\u09bf" + ], + "SHORTMONTH": [ + "\u099c\u09be\u09a8\u09c1", + "\u09ab\u09c7\u09ac\u09cd\u09f0\u09c1", + "\u09ae\u09be\u09f0\u09cd\u099a", + "\u098f\u09aa\u09cd\u09f0\u09bf\u09b2", + "\u09ae\u09c7", + "\u099c\u09c1\u09a8", + "\u099c\u09c1\u09b2\u09be\u0987", + "\u0986\u0997", + "\u09b8\u09c7\u09aa\u09cd\u099f", + "\u0985\u0995\u09cd\u099f\u09cb", + "\u09a8\u09ad\u09c7", + "\u09a1\u09bf\u09b8\u09c7" + ], + "STANDALONEMONTH": [ + "\u099c\u09be\u09a8\u09c1\u09f1\u09be\u09f0\u09c0", + "\u09ab\u09c7\u09ac\u09cd\u09f0\u09c1\u09f1\u09be\u09f0\u09c0", + "\u09ae\u09be\u09f0\u09cd\u099a", + "\u098f\u09aa\u09cd\u09f0\u09bf\u09b2", + "\u09ae\u09c7", + "\u099c\u09c1\u09a8", + "\u099c\u09c1\u09b2\u09be\u0987", + "\u0986\u0997\u09b7\u09cd\u099f", + "\u099b\u09c7\u09aa\u09cd\u09a4\u09c7\u09ae\u09cd\u09ac\u09f0", + "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09f0", + "\u09a8\u09f1\u09c7\u09ae\u09cd\u09ac\u09f0", + "\u09a1\u09bf\u099a\u09c7\u09ae\u09cd\u09ac\u09f0" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "as", + "localeID": "as", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_asa-tz.js b/1.6.6/i18n/angular-locale_asa-tz.js new file mode 100644 index 000000000..0d92f05c2 --- /dev/null +++ b/1.6.6/i18n/angular-locale_asa-tz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "icheheavo", + "ichamthi" + ], + "DAY": [ + "Jumapili", + "Jumatatu", + "Jumanne", + "Jumatano", + "Alhamisi", + "Ijumaa", + "Jumamosi" + ], + "ERANAMES": [ + "Kabla yakwe Yethu", + "Baada yakwe Yethu" + ], + "ERAS": [ + "KM", + "BM" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januari", + "Februari", + "Machi", + "Aprili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "SHORTDAY": [ + "Jpi", + "Jtt", + "Jnn", + "Jtn", + "Alh", + "Ijm", + "Jmo" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Jul", + "Ago", + "Sep", + "Okt", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Machi", + "Aprili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "asa-tz", + "localeID": "asa_TZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_asa.js b/1.6.6/i18n/angular-locale_asa.js new file mode 100644 index 000000000..ed71ecf73 --- /dev/null +++ b/1.6.6/i18n/angular-locale_asa.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "icheheavo", + "ichamthi" + ], + "DAY": [ + "Jumapili", + "Jumatatu", + "Jumanne", + "Jumatano", + "Alhamisi", + "Ijumaa", + "Jumamosi" + ], + "ERANAMES": [ + "Kabla yakwe Yethu", + "Baada yakwe Yethu" + ], + "ERAS": [ + "KM", + "BM" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januari", + "Februari", + "Machi", + "Aprili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "SHORTDAY": [ + "Jpi", + "Jtt", + "Jnn", + "Jtn", + "Alh", + "Ijm", + "Jmo" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Jul", + "Ago", + "Sep", + "Okt", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Machi", + "Aprili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "asa", + "localeID": "asa", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ast-es.js b/1.6.6/i18n/angular-locale_ast-es.js new file mode 100644 index 000000000..08ed1642f --- /dev/null +++ b/1.6.6/i18n/angular-locale_ast-es.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "de la ma\u00f1ana", + "de la tarde" + ], + "DAY": [ + "domingu", + "llunes", + "martes", + "mi\u00e9rcoles", + "xueves", + "vienres", + "s\u00e1badu" + ], + "ERANAMES": [ + "enantes de Cristu", + "despu\u00e9s de Cristu" + ], + "ERAS": [ + "e.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "de xineru", + "de febreru", + "de marzu", + "d\u2019abril", + "de mayu", + "de xunu", + "de xunetu", + "d\u2019agostu", + "de setiembre", + "d\u2019ochobre", + "de payares", + "d\u2019avientu" + ], + "SHORTDAY": [ + "dom", + "llu", + "mar", + "mi\u00e9", + "xue", + "vie", + "s\u00e1b" + ], + "SHORTMONTH": [ + "xin", + "feb", + "mar", + "abr", + "may", + "xun", + "xnt", + "ago", + "set", + "och", + "pay", + "avi" + ], + "STANDALONEMONTH": [ + "xineru", + "febreru", + "marzu", + "abril", + "mayu", + "xunu", + "xunetu", + "agostu", + "setiembre", + "ochobre", + "payares", + "avientu" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM 'de' y", + "longDate": "d MMMM 'de' y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ast-es", + "localeID": "ast_ES", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ast.js b/1.6.6/i18n/angular-locale_ast.js new file mode 100644 index 000000000..4f625f6c0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ast.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "de la ma\u00f1ana", + "de la tarde" + ], + "DAY": [ + "domingu", + "llunes", + "martes", + "mi\u00e9rcoles", + "xueves", + "vienres", + "s\u00e1badu" + ], + "ERANAMES": [ + "enantes de Cristu", + "despu\u00e9s de Cristu" + ], + "ERAS": [ + "e.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "de xineru", + "de febreru", + "de marzu", + "d\u2019abril", + "de mayu", + "de xunu", + "de xunetu", + "d\u2019agostu", + "de setiembre", + "d\u2019ochobre", + "de payares", + "d\u2019avientu" + ], + "SHORTDAY": [ + "dom", + "llu", + "mar", + "mi\u00e9", + "xue", + "vie", + "s\u00e1b" + ], + "SHORTMONTH": [ + "xin", + "feb", + "mar", + "abr", + "may", + "xun", + "xnt", + "ago", + "set", + "och", + "pay", + "avi" + ], + "STANDALONEMONTH": [ + "xineru", + "febreru", + "marzu", + "abril", + "mayu", + "xunu", + "xunetu", + "agostu", + "setiembre", + "ochobre", + "payares", + "avientu" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM 'de' y", + "longDate": "d MMMM 'de' y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ast", + "localeID": "ast", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_az-cyrl-az.js b/1.6.6/i18n/angular-locale_az-cyrl-az.js new file mode 100644 index 000000000..4f5b334ce --- /dev/null +++ b/1.6.6/i18n/angular-locale_az-cyrl-az.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0410\u041c", + "\u041f\u041c" + ], + "DAY": [ + "\u0431\u0430\u0437\u0430\u0440", + "\u0431\u0430\u0437\u0430\u0440 \u0435\u0440\u0442\u04d9\u0441\u0438", + "\u0447\u04d9\u0440\u0448\u04d9\u043d\u0431\u04d9 \u0430\u0445\u0448\u0430\u043c\u044b", + "\u0447\u04d9\u0440\u0448\u04d9\u043d\u0431\u04d9", + "\u04b9\u04af\u043c\u04d9 \u0430\u0445\u0448\u0430\u043c\u044b", + "\u04b9\u04af\u043c\u04d9", + "\u0448\u04d9\u043d\u0431\u04d9" + ], + "ERANAMES": [ + "\u0435\u0440\u0430\u043c\u044b\u0437\u0434\u0430\u043d \u04d9\u0432\u0432\u04d9\u043b", + "\u0458\u0435\u043d\u0438 \u0435\u0440\u0430" + ], + "ERAS": [ + "\u0435.\u04d9.", + "\u0458.\u0435." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0458\u0430\u043d\u0432\u0430\u0440", + "\u0444\u0435\u0432\u0440\u0430\u043b", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0435\u043b", + "\u043c\u0430\u0439", + "\u0438\u0458\u0443\u043d", + "\u0438\u0458\u0443\u043b", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043d\u0442\u0458\u0430\u0431\u0440", + "\u043e\u043a\u0442\u0458\u0430\u0431\u0440", + "\u043d\u043e\u0458\u0430\u0431\u0440", + "\u0434\u0435\u043a\u0430\u0431\u0440" + ], + "SHORTDAY": [ + "\u0411.", + "\u0411.\u0415.", + "\u0427.\u0410.", + "\u0427.", + "\u04b8.\u0410.", + "\u04b8.", + "\u0428." + ], + "SHORTMONTH": [ + "\u0458\u0430\u043d", + "\u0444\u0435\u0432", + "\u043c\u0430\u0440", + "\u0430\u043f\u0440", + "\u043c\u0430\u0439", + "\u0438\u0458\u043d", + "\u0438\u0458\u043b", + "\u0430\u0432\u0433", + "\u0441\u0435\u043d", + "\u043e\u043a\u0442", + "\u043d\u043e\u0458", + "\u0434\u0435\u043a" + ], + "STANDALONEMONTH": [ + "\u0408\u0430\u043d\u0432\u0430\u0440", + "\u0424\u0435\u0432\u0440\u0430\u043b", + "\u041c\u0430\u0440\u0442", + "\u0410\u043f\u0440\u0435\u043b", + "\u041c\u0430\u0439", + "\u0418\u0458\u0443\u043d", + "\u0418\u0458\u0443\u043b", + "\u0410\u0432\u0433\u0443\u0441\u0442", + "\u0421\u0435\u043d\u0442\u0458\u0430\u0431\u0440", + "\u041e\u043a\u0442\u0458\u0430\u0431\u0440", + "\u041d\u043e\u0458\u0430\u0431\u0440", + "\u0414\u0435\u043a\u0430\u0431\u0440" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "d MMMM y, EEEE", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20bc", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "az-cyrl-az", + "localeID": "az_Cyrl_AZ", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_az-cyrl.js b/1.6.6/i18n/angular-locale_az-cyrl.js new file mode 100644 index 000000000..d74ea1f78 --- /dev/null +++ b/1.6.6/i18n/angular-locale_az-cyrl.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0410\u041c", + "\u041f\u041c" + ], + "DAY": [ + "\u0431\u0430\u0437\u0430\u0440", + "\u0431\u0430\u0437\u0430\u0440 \u0435\u0440\u0442\u04d9\u0441\u0438", + "\u0447\u04d9\u0440\u0448\u04d9\u043d\u0431\u04d9 \u0430\u0445\u0448\u0430\u043c\u044b", + "\u0447\u04d9\u0440\u0448\u04d9\u043d\u0431\u04d9", + "\u04b9\u04af\u043c\u04d9 \u0430\u0445\u0448\u0430\u043c\u044b", + "\u04b9\u04af\u043c\u04d9", + "\u0448\u04d9\u043d\u0431\u04d9" + ], + "ERANAMES": [ + "\u0435\u0440\u0430\u043c\u044b\u0437\u0434\u0430\u043d \u04d9\u0432\u0432\u04d9\u043b", + "\u0458\u0435\u043d\u0438 \u0435\u0440\u0430" + ], + "ERAS": [ + "\u0435.\u04d9.", + "\u0458.\u0435." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0458\u0430\u043d\u0432\u0430\u0440", + "\u0444\u0435\u0432\u0440\u0430\u043b", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0435\u043b", + "\u043c\u0430\u0439", + "\u0438\u0458\u0443\u043d", + "\u0438\u0458\u0443\u043b", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043d\u0442\u0458\u0430\u0431\u0440", + "\u043e\u043a\u0442\u0458\u0430\u0431\u0440", + "\u043d\u043e\u0458\u0430\u0431\u0440", + "\u0434\u0435\u043a\u0430\u0431\u0440" + ], + "SHORTDAY": [ + "\u0411.", + "\u0411.\u0415.", + "\u0427.\u0410.", + "\u0427.", + "\u04b8.\u0410.", + "\u04b8.", + "\u0428." + ], + "SHORTMONTH": [ + "\u0458\u0430\u043d", + "\u0444\u0435\u0432", + "\u043c\u0430\u0440", + "\u0430\u043f\u0440", + "\u043c\u0430\u0439", + "\u0438\u0458\u043d", + "\u0438\u0458\u043b", + "\u0430\u0432\u0433", + "\u0441\u0435\u043d", + "\u043e\u043a\u0442", + "\u043d\u043e\u0458", + "\u0434\u0435\u043a" + ], + "STANDALONEMONTH": [ + "\u0408\u0430\u043d\u0432\u0430\u0440", + "\u0424\u0435\u0432\u0440\u0430\u043b", + "\u041c\u0430\u0440\u0442", + "\u0410\u043f\u0440\u0435\u043b", + "\u041c\u0430\u0439", + "\u0418\u0458\u0443\u043d", + "\u0418\u0458\u0443\u043b", + "\u0410\u0432\u0433\u0443\u0441\u0442", + "\u0421\u0435\u043d\u0442\u0458\u0430\u0431\u0440", + "\u041e\u043a\u0442\u0458\u0430\u0431\u0440", + "\u041d\u043e\u0458\u0430\u0431\u0440", + "\u0414\u0435\u043a\u0430\u0431\u0440" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "d MMMM y, EEEE", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20bc", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "az-cyrl", + "localeID": "az_Cyrl", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_az-latn-az.js b/1.6.6/i18n/angular-locale_az-latn-az.js new file mode 100644 index 000000000..cc830b704 --- /dev/null +++ b/1.6.6/i18n/angular-locale_az-latn-az.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "bazar", + "bazar ert\u0259si", + "\u00e7\u0259r\u015f\u0259nb\u0259 ax\u015fam\u0131", + "\u00e7\u0259r\u015f\u0259nb\u0259", + "c\u00fcm\u0259 ax\u015fam\u0131", + "c\u00fcm\u0259", + "\u015f\u0259nb\u0259" + ], + "ERANAMES": [ + "eram\u0131zdan \u0259vv\u0259l", + "yeni era" + ], + "ERAS": [ + "e.\u0259.", + "y.e." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "yanvar", + "fevral", + "mart", + "aprel", + "may", + "iyun", + "iyul", + "avqust", + "sentyabr", + "oktyabr", + "noyabr", + "dekabr" + ], + "SHORTDAY": [ + "B.", + "B.E.", + "\u00c7.A.", + "\u00c7.", + "C.A.", + "C.", + "\u015e." + ], + "SHORTMONTH": [ + "yan", + "fev", + "mar", + "apr", + "may", + "iyn", + "iyl", + "avq", + "sen", + "okt", + "noy", + "dek" + ], + "STANDALONEMONTH": [ + "Yanvar", + "Fevral", + "Mart", + "Aprel", + "May", + "\u0130yun", + "\u0130yul", + "Avqust", + "Sentyabr", + "Oktyabr", + "Noyabr", + "Dekabr" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "d MMMM y, EEEE", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20bc", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "az-latn-az", + "localeID": "az_Latn_AZ", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_az-latn.js b/1.6.6/i18n/angular-locale_az-latn.js new file mode 100644 index 000000000..6f43ad8b1 --- /dev/null +++ b/1.6.6/i18n/angular-locale_az-latn.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "bazar", + "bazar ert\u0259si", + "\u00e7\u0259r\u015f\u0259nb\u0259 ax\u015fam\u0131", + "\u00e7\u0259r\u015f\u0259nb\u0259", + "c\u00fcm\u0259 ax\u015fam\u0131", + "c\u00fcm\u0259", + "\u015f\u0259nb\u0259" + ], + "ERANAMES": [ + "eram\u0131zdan \u0259vv\u0259l", + "yeni era" + ], + "ERAS": [ + "e.\u0259.", + "y.e." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "yanvar", + "fevral", + "mart", + "aprel", + "may", + "iyun", + "iyul", + "avqust", + "sentyabr", + "oktyabr", + "noyabr", + "dekabr" + ], + "SHORTDAY": [ + "B.", + "B.E.", + "\u00c7.A.", + "\u00c7.", + "C.A.", + "C.", + "\u015e." + ], + "SHORTMONTH": [ + "yan", + "fev", + "mar", + "apr", + "may", + "iyn", + "iyl", + "avq", + "sen", + "okt", + "noy", + "dek" + ], + "STANDALONEMONTH": [ + "Yanvar", + "Fevral", + "Mart", + "Aprel", + "May", + "\u0130yun", + "\u0130yul", + "Avqust", + "Sentyabr", + "Oktyabr", + "Noyabr", + "Dekabr" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "d MMMM y, EEEE", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20bc", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "az-latn", + "localeID": "az_Latn", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_az.js b/1.6.6/i18n/angular-locale_az.js new file mode 100644 index 000000000..a0928c278 --- /dev/null +++ b/1.6.6/i18n/angular-locale_az.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "bazar", + "bazar ert\u0259si", + "\u00e7\u0259r\u015f\u0259nb\u0259 ax\u015fam\u0131", + "\u00e7\u0259r\u015f\u0259nb\u0259", + "c\u00fcm\u0259 ax\u015fam\u0131", + "c\u00fcm\u0259", + "\u015f\u0259nb\u0259" + ], + "ERANAMES": [ + "eram\u0131zdan \u0259vv\u0259l", + "yeni era" + ], + "ERAS": [ + "e.\u0259.", + "y.e." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "yanvar", + "fevral", + "mart", + "aprel", + "may", + "iyun", + "iyul", + "avqust", + "sentyabr", + "oktyabr", + "noyabr", + "dekabr" + ], + "SHORTDAY": [ + "B.", + "B.E.", + "\u00c7.A.", + "\u00c7.", + "C.A.", + "C.", + "\u015e." + ], + "SHORTMONTH": [ + "yan", + "fev", + "mar", + "apr", + "may", + "iyn", + "iyl", + "avq", + "sen", + "okt", + "noy", + "dek" + ], + "STANDALONEMONTH": [ + "Yanvar", + "Fevral", + "Mart", + "Aprel", + "May", + "\u0130yun", + "\u0130yul", + "Avqust", + "Sentyabr", + "Oktyabr", + "Noyabr", + "Dekabr" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "d MMMM y, EEEE", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20bc", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "az", + "localeID": "az", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_bas-cm.js b/1.6.6/i18n/angular-locale_bas-cm.js new file mode 100644 index 000000000..96be9f314 --- /dev/null +++ b/1.6.6/i18n/angular-locale_bas-cm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "I bik\u025b\u0302gl\u00e0", + "I \u0253ugaj\u0254p" + ], + "DAY": [ + "\u014bgw\u00e0 n\u0254\u0302y", + "\u014bgw\u00e0 nja\u014bgumba", + "\u014bgw\u00e0 \u00fbm", + "\u014bgw\u00e0 \u014bg\u00ea", + "\u014bgw\u00e0 mb\u0254k", + "\u014bgw\u00e0 k\u0254\u0254", + "\u014bgw\u00e0 j\u00f4n" + ], + "ERANAMES": [ + "bis\u016b bi Yes\u00f9 Kr\u01d0st\u00f2", + "i mb\u016bs Yes\u00f9 Kr\u01d0st\u00f2" + ], + "ERAS": [ + "b.Y.K", + "m.Y.K" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "K\u0254nd\u0254\u014b", + "M\u00e0c\u025b\u0302l", + "M\u00e0t\u00f9mb", + "M\u00e0top", + "M\u0300puy\u025b", + "H\u00ecl\u00f2nd\u025b\u0300", + "Nj\u00e8b\u00e0", + "H\u00ecka\u014b", + "D\u00ecp\u0254\u0300s", + "B\u00ec\u00f2\u00f4m", + "M\u00e0y\u025bs\u00e8p", + "L\u00ecbuy li \u0144y\u00e8e" + ], + "SHORTDAY": [ + "n\u0254y", + "nja", + "uum", + "\u014bge", + "mb\u0254", + "k\u0254\u0254", + "jon" + ], + "SHORTMONTH": [ + "k\u0254n", + "mac", + "mat", + "mto", + "mpu", + "hil", + "nje", + "hik", + "dip", + "bio", + "may", + "li\u0253" + ], + "STANDALONEMONTH": [ + "K\u0254nd\u0254\u014b", + "M\u00e0c\u025b\u0302l", + "M\u00e0t\u00f9mb", + "M\u00e0top", + "M\u0300puy\u025b", + "H\u00ecl\u00f2nd\u025b\u0300", + "Nj\u00e8b\u00e0", + "H\u00ecka\u014b", + "D\u00ecp\u0254\u0300s", + "B\u00ec\u00f2\u00f4m", + "M\u00e0y\u025bs\u00e8p", + "L\u00ecbuy li \u0144y\u00e8e" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "bas-cm", + "localeID": "bas_CM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_bas.js b/1.6.6/i18n/angular-locale_bas.js new file mode 100644 index 000000000..3bdcaedb2 --- /dev/null +++ b/1.6.6/i18n/angular-locale_bas.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "I bik\u025b\u0302gl\u00e0", + "I \u0253ugaj\u0254p" + ], + "DAY": [ + "\u014bgw\u00e0 n\u0254\u0302y", + "\u014bgw\u00e0 nja\u014bgumba", + "\u014bgw\u00e0 \u00fbm", + "\u014bgw\u00e0 \u014bg\u00ea", + "\u014bgw\u00e0 mb\u0254k", + "\u014bgw\u00e0 k\u0254\u0254", + "\u014bgw\u00e0 j\u00f4n" + ], + "ERANAMES": [ + "bis\u016b bi Yes\u00f9 Kr\u01d0st\u00f2", + "i mb\u016bs Yes\u00f9 Kr\u01d0st\u00f2" + ], + "ERAS": [ + "b.Y.K", + "m.Y.K" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "K\u0254nd\u0254\u014b", + "M\u00e0c\u025b\u0302l", + "M\u00e0t\u00f9mb", + "M\u00e0top", + "M\u0300puy\u025b", + "H\u00ecl\u00f2nd\u025b\u0300", + "Nj\u00e8b\u00e0", + "H\u00ecka\u014b", + "D\u00ecp\u0254\u0300s", + "B\u00ec\u00f2\u00f4m", + "M\u00e0y\u025bs\u00e8p", + "L\u00ecbuy li \u0144y\u00e8e" + ], + "SHORTDAY": [ + "n\u0254y", + "nja", + "uum", + "\u014bge", + "mb\u0254", + "k\u0254\u0254", + "jon" + ], + "SHORTMONTH": [ + "k\u0254n", + "mac", + "mat", + "mto", + "mpu", + "hil", + "nje", + "hik", + "dip", + "bio", + "may", + "li\u0253" + ], + "STANDALONEMONTH": [ + "K\u0254nd\u0254\u014b", + "M\u00e0c\u025b\u0302l", + "M\u00e0t\u00f9mb", + "M\u00e0top", + "M\u0300puy\u025b", + "H\u00ecl\u00f2nd\u025b\u0300", + "Nj\u00e8b\u00e0", + "H\u00ecka\u014b", + "D\u00ecp\u0254\u0300s", + "B\u00ec\u00f2\u00f4m", + "M\u00e0y\u025bs\u00e8p", + "L\u00ecbuy li \u0144y\u00e8e" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "bas", + "localeID": "bas", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_be-by.js b/1.6.6/i18n/angular-locale_be-by.js new file mode 100644 index 000000000..83c27a237 --- /dev/null +++ b/1.6.6/i18n/angular-locale_be-by.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u043d\u044f\u0434\u0437\u0435\u043b\u044f", + "\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a", + "\u0430\u045e\u0442\u043e\u0440\u0430\u043a", + "\u0441\u0435\u0440\u0430\u0434\u0430", + "\u0447\u0430\u0446\u0432\u0435\u0440", + "\u043f\u044f\u0442\u043d\u0456\u0446\u0430", + "\u0441\u0443\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u0434\u0430 \u043d\u0430\u0440\u0430\u0434\u0436\u044d\u043d\u043d\u044f \u0425\u0440\u044b\u0441\u0442\u043e\u0432\u0430", + "\u0430\u0434 \u043d\u0430\u0440\u0430\u0434\u0436\u044d\u043d\u043d\u044f \u0425\u0440\u044b\u0441\u0442\u043e\u0432\u0430" + ], + "ERAS": [ + "\u0434\u0430 \u043d.\u044d.", + "\u043d.\u044d." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044f", + "\u043b\u044e\u0442\u0430\u0433\u0430", + "\u0441\u0430\u043a\u0430\u0432\u0456\u043a\u0430", + "\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a\u0430", + "\u043c\u0430\u044f", + "\u0447\u044d\u0440\u0432\u0435\u043d\u044f", + "\u043b\u0456\u043f\u0435\u043d\u044f", + "\u0436\u043d\u0456\u045e\u043d\u044f", + "\u0432\u0435\u0440\u0430\u0441\u043d\u044f", + "\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a\u0430", + "\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434\u0430", + "\u0441\u043d\u0435\u0436\u043d\u044f" + ], + "SHORTDAY": [ + "\u043d\u0434", + "\u043f\u043d", + "\u0430\u045e", + "\u0441\u0440", + "\u0447\u0446", + "\u043f\u0442", + "\u0441\u0431" + ], + "SHORTMONTH": [ + "\u0441\u0442\u0443", + "\u043b\u044e\u0442", + "\u0441\u0430\u043a", + "\u043a\u0440\u0430", + "\u043c\u0430\u044f", + "\u0447\u044d\u0440", + "\u043b\u0456\u043f", + "\u0436\u043d\u0456", + "\u0432\u0435\u0440", + "\u043a\u0430\u0441", + "\u043b\u0456\u0441", + "\u0441\u043d\u0435" + ], + "STANDALONEMONTH": [ + "\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044c", + "\u043b\u044e\u0442\u044b", + "\u0441\u0430\u043a\u0430\u0432\u0456\u043a", + "\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a", + "\u043c\u0430\u0439", + "\u0447\u044d\u0440\u0432\u0435\u043d\u044c", + "\u043b\u0456\u043f\u0435\u043d\u044c", + "\u0436\u043d\u0456\u0432\u0435\u043d\u044c", + "\u0432\u0435\u0440\u0430\u0441\u0435\u043d\u044c", + "\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a", + "\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434", + "\u0441\u043d\u0435\u0436\u0430\u043d\u044c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y '\u0433'.", + "longDate": "d MMMM y '\u0433'.", + "medium": "d.MM.y HH:mm:ss", + "mediumDate": "d.MM.y", + "mediumTime": "HH:mm:ss", + "short": "d.MM.yy HH:mm", + "shortDate": "d.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "BYN", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "be-by", + "localeID": "be_BY", + "pluralCat": function(n, opt_precision) { if (n % 10 == 1 && n % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (n % 10 == 0 || n % 10 >= 5 && n % 10 <= 9 || n % 100 >= 11 && n % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_be.js b/1.6.6/i18n/angular-locale_be.js new file mode 100644 index 000000000..12f0b0825 --- /dev/null +++ b/1.6.6/i18n/angular-locale_be.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u043d\u044f\u0434\u0437\u0435\u043b\u044f", + "\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a", + "\u0430\u045e\u0442\u043e\u0440\u0430\u043a", + "\u0441\u0435\u0440\u0430\u0434\u0430", + "\u0447\u0430\u0446\u0432\u0435\u0440", + "\u043f\u044f\u0442\u043d\u0456\u0446\u0430", + "\u0441\u0443\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u0434\u0430 \u043d\u0430\u0440\u0430\u0434\u0436\u044d\u043d\u043d\u044f \u0425\u0440\u044b\u0441\u0442\u043e\u0432\u0430", + "\u0430\u0434 \u043d\u0430\u0440\u0430\u0434\u0436\u044d\u043d\u043d\u044f \u0425\u0440\u044b\u0441\u0442\u043e\u0432\u0430" + ], + "ERAS": [ + "\u0434\u0430 \u043d.\u044d.", + "\u043d.\u044d." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044f", + "\u043b\u044e\u0442\u0430\u0433\u0430", + "\u0441\u0430\u043a\u0430\u0432\u0456\u043a\u0430", + "\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a\u0430", + "\u043c\u0430\u044f", + "\u0447\u044d\u0440\u0432\u0435\u043d\u044f", + "\u043b\u0456\u043f\u0435\u043d\u044f", + "\u0436\u043d\u0456\u045e\u043d\u044f", + "\u0432\u0435\u0440\u0430\u0441\u043d\u044f", + "\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a\u0430", + "\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434\u0430", + "\u0441\u043d\u0435\u0436\u043d\u044f" + ], + "SHORTDAY": [ + "\u043d\u0434", + "\u043f\u043d", + "\u0430\u045e", + "\u0441\u0440", + "\u0447\u0446", + "\u043f\u0442", + "\u0441\u0431" + ], + "SHORTMONTH": [ + "\u0441\u0442\u0443", + "\u043b\u044e\u0442", + "\u0441\u0430\u043a", + "\u043a\u0440\u0430", + "\u043c\u0430\u044f", + "\u0447\u044d\u0440", + "\u043b\u0456\u043f", + "\u0436\u043d\u0456", + "\u0432\u0435\u0440", + "\u043a\u0430\u0441", + "\u043b\u0456\u0441", + "\u0441\u043d\u0435" + ], + "STANDALONEMONTH": [ + "\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044c", + "\u043b\u044e\u0442\u044b", + "\u0441\u0430\u043a\u0430\u0432\u0456\u043a", + "\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a", + "\u043c\u0430\u0439", + "\u0447\u044d\u0440\u0432\u0435\u043d\u044c", + "\u043b\u0456\u043f\u0435\u043d\u044c", + "\u0436\u043d\u0456\u0432\u0435\u043d\u044c", + "\u0432\u0435\u0440\u0430\u0441\u0435\u043d\u044c", + "\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a", + "\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434", + "\u0441\u043d\u0435\u0436\u0430\u043d\u044c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y '\u0433'.", + "longDate": "d MMMM y '\u0433'.", + "medium": "d.MM.y HH:mm:ss", + "mediumDate": "d.MM.y", + "mediumTime": "HH:mm:ss", + "short": "d.MM.yy HH:mm", + "shortDate": "d.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "BYN", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "be", + "localeID": "be", + "pluralCat": function(n, opt_precision) { if (n % 10 == 1 && n % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (n % 10 == 0 || n % 10 >= 5 && n % 10 <= 9 || n % 100 >= 11 && n % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_bem-zm.js b/1.6.6/i18n/angular-locale_bem-zm.js new file mode 100644 index 000000000..6881a377f --- /dev/null +++ b/1.6.6/i18n/angular-locale_bem-zm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "uluchelo", + "akasuba" + ], + "DAY": [ + "Pa Mulungu", + "Palichimo", + "Palichibuli", + "Palichitatu", + "Palichine", + "Palichisano", + "Pachibelushi" + ], + "ERANAMES": [ + "Before Yesu", + "After Yesu" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januari", + "Februari", + "Machi", + "Epreo", + "Mei", + "Juni", + "Julai", + "Ogasti", + "Septemba", + "Oktoba", + "Novemba", + "Disemba" + ], + "SHORTDAY": [ + "Pa Mulungu", + "Palichimo", + "Palichibuli", + "Palichitatu", + "Palichine", + "Palichisano", + "Pachibelushi" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Epr", + "Mei", + "Jun", + "Jul", + "Oga", + "Sep", + "Okt", + "Nov", + "Dis" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Machi", + "Epreo", + "Mei", + "Juni", + "Julai", + "Ogasti", + "Septemba", + "Oktoba", + "Novemba", + "Disemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "ZMW", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "bem-zm", + "localeID": "bem_ZM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_bem.js b/1.6.6/i18n/angular-locale_bem.js new file mode 100644 index 000000000..8a8229d5e --- /dev/null +++ b/1.6.6/i18n/angular-locale_bem.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "uluchelo", + "akasuba" + ], + "DAY": [ + "Pa Mulungu", + "Palichimo", + "Palichibuli", + "Palichitatu", + "Palichine", + "Palichisano", + "Pachibelushi" + ], + "ERANAMES": [ + "Before Yesu", + "After Yesu" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januari", + "Februari", + "Machi", + "Epreo", + "Mei", + "Juni", + "Julai", + "Ogasti", + "Septemba", + "Oktoba", + "Novemba", + "Disemba" + ], + "SHORTDAY": [ + "Pa Mulungu", + "Palichimo", + "Palichibuli", + "Palichitatu", + "Palichine", + "Palichisano", + "Pachibelushi" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Epr", + "Mei", + "Jun", + "Jul", + "Oga", + "Sep", + "Okt", + "Nov", + "Dis" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Machi", + "Epreo", + "Mei", + "Juni", + "Julai", + "Ogasti", + "Septemba", + "Oktoba", + "Novemba", + "Disemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "ZMW", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "bem", + "localeID": "bem", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_bez-tz.js b/1.6.6/i18n/angular-locale_bez-tz.js new file mode 100644 index 000000000..af110ce38 --- /dev/null +++ b/1.6.6/i18n/angular-locale_bez-tz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "pamilau", + "pamunyi" + ], + "DAY": [ + "pa mulungu", + "pa shahuviluha", + "pa hivili", + "pa hidatu", + "pa hitayi", + "pa hihanu", + "pa shahulembela" + ], + "ERANAMES": [ + "Kabla ya Mtwaa", + "Baada ya Mtwaa" + ], + "ERAS": [ + "KM", + "BM" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "pa mwedzi gwa hutala", + "pa mwedzi gwa wuvili", + "pa mwedzi gwa wudatu", + "pa mwedzi gwa wutai", + "pa mwedzi gwa wuhanu", + "pa mwedzi gwa sita", + "pa mwedzi gwa saba", + "pa mwedzi gwa nane", + "pa mwedzi gwa tisa", + "pa mwedzi gwa kumi", + "pa mwedzi gwa kumi na moja", + "pa mwedzi gwa kumi na mbili" + ], + "SHORTDAY": [ + "Mul", + "Vil", + "Hiv", + "Hid", + "Hit", + "Hih", + "Lem" + ], + "SHORTMONTH": [ + "Hut", + "Vil", + "Dat", + "Tai", + "Han", + "Sit", + "Sab", + "Nan", + "Tis", + "Kum", + "Kmj", + "Kmb" + ], + "STANDALONEMONTH": [ + "pa mwedzi gwa hutala", + "pa mwedzi gwa wuvili", + "pa mwedzi gwa wudatu", + "pa mwedzi gwa wutai", + "pa mwedzi gwa wuhanu", + "pa mwedzi gwa sita", + "pa mwedzi gwa saba", + "pa mwedzi gwa nane", + "pa mwedzi gwa tisa", + "pa mwedzi gwa kumi", + "pa mwedzi gwa kumi na moja", + "pa mwedzi gwa kumi na mbili" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "bez-tz", + "localeID": "bez_TZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_bez.js b/1.6.6/i18n/angular-locale_bez.js new file mode 100644 index 000000000..334f42f61 --- /dev/null +++ b/1.6.6/i18n/angular-locale_bez.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "pamilau", + "pamunyi" + ], + "DAY": [ + "pa mulungu", + "pa shahuviluha", + "pa hivili", + "pa hidatu", + "pa hitayi", + "pa hihanu", + "pa shahulembela" + ], + "ERANAMES": [ + "Kabla ya Mtwaa", + "Baada ya Mtwaa" + ], + "ERAS": [ + "KM", + "BM" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "pa mwedzi gwa hutala", + "pa mwedzi gwa wuvili", + "pa mwedzi gwa wudatu", + "pa mwedzi gwa wutai", + "pa mwedzi gwa wuhanu", + "pa mwedzi gwa sita", + "pa mwedzi gwa saba", + "pa mwedzi gwa nane", + "pa mwedzi gwa tisa", + "pa mwedzi gwa kumi", + "pa mwedzi gwa kumi na moja", + "pa mwedzi gwa kumi na mbili" + ], + "SHORTDAY": [ + "Mul", + "Vil", + "Hiv", + "Hid", + "Hit", + "Hih", + "Lem" + ], + "SHORTMONTH": [ + "Hut", + "Vil", + "Dat", + "Tai", + "Han", + "Sit", + "Sab", + "Nan", + "Tis", + "Kum", + "Kmj", + "Kmb" + ], + "STANDALONEMONTH": [ + "pa mwedzi gwa hutala", + "pa mwedzi gwa wuvili", + "pa mwedzi gwa wudatu", + "pa mwedzi gwa wutai", + "pa mwedzi gwa wuhanu", + "pa mwedzi gwa sita", + "pa mwedzi gwa saba", + "pa mwedzi gwa nane", + "pa mwedzi gwa tisa", + "pa mwedzi gwa kumi", + "pa mwedzi gwa kumi na moja", + "pa mwedzi gwa kumi na mbili" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "bez", + "localeID": "bez", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_bg-bg.js b/1.6.6/i18n/angular-locale_bg-bg.js new file mode 100644 index 000000000..1b940fc7d --- /dev/null +++ b/1.6.6/i18n/angular-locale_bg-bg.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u043f\u0440.\u043e\u0431.", + "\u0441\u043b.\u043e\u0431." + ], + "DAY": [ + "\u043d\u0435\u0434\u0435\u043b\u044f", + "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a", + "\u0432\u0442\u043e\u0440\u043d\u0438\u043a", + "\u0441\u0440\u044f\u0434\u0430", + "\u0447\u0435\u0442\u0432\u044a\u0440\u0442\u044a\u043a", + "\u043f\u0435\u0442\u044a\u043a", + "\u0441\u044a\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u043f\u0440\u0435\u0434\u0438 \u0425\u0440\u0438\u0441\u0442\u0430", + "\u0441\u043b\u0435\u0434 \u0425\u0440\u0438\u0441\u0442\u0430" + ], + "ERAS": [ + "\u043f\u0440.\u0425\u0440.", + "\u0441\u043b.\u0425\u0440." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u044f\u043d\u0443\u0430\u0440\u0438", + "\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0439", + "\u044e\u043d\u0438", + "\u044e\u043b\u0438", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438", + "\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438", + "\u043d\u043e\u0435\u043c\u0432\u0440\u0438", + "\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438" + ], + "SHORTDAY": [ + "\u043d\u0434", + "\u043f\u043d", + "\u0432\u0442", + "\u0441\u0440", + "\u0447\u0442", + "\u043f\u0442", + "\u0441\u0431" + ], + "SHORTMONTH": [ + "\u044f\u043d\u0443", + "\u0444\u0435\u0432", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440", + "\u043c\u0430\u0439", + "\u044e\u043d\u0438", + "\u044e\u043b\u0438", + "\u0430\u0432\u0433", + "\u0441\u0435\u043f", + "\u043e\u043a\u0442", + "\u043d\u043e\u0435", + "\u0434\u0435\u043a" + ], + "STANDALONEMONTH": [ + "\u044f\u043d\u0443\u0430\u0440\u0438", + "\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0439", + "\u044e\u043d\u0438", + "\u044e\u043b\u0438", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438", + "\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438", + "\u043d\u043e\u0435\u043c\u0432\u0440\u0438", + "\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y '\u0433'.", + "longDate": "d MMMM y '\u0433'.", + "medium": "d.MM.y '\u0433'. H:mm:ss", + "mediumDate": "d.MM.y '\u0433'.", + "mediumTime": "H:mm:ss", + "short": "d.MM.yy '\u0433'. H:mm", + "shortDate": "d.MM.yy '\u0433'.", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "lev", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 0, + "lgSize": 0, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "bg-bg", + "localeID": "bg_BG", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_bg.js b/1.6.6/i18n/angular-locale_bg.js new file mode 100644 index 000000000..6a1b64e5e --- /dev/null +++ b/1.6.6/i18n/angular-locale_bg.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u043f\u0440.\u043e\u0431.", + "\u0441\u043b.\u043e\u0431." + ], + "DAY": [ + "\u043d\u0435\u0434\u0435\u043b\u044f", + "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a", + "\u0432\u0442\u043e\u0440\u043d\u0438\u043a", + "\u0441\u0440\u044f\u0434\u0430", + "\u0447\u0435\u0442\u0432\u044a\u0440\u0442\u044a\u043a", + "\u043f\u0435\u0442\u044a\u043a", + "\u0441\u044a\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u043f\u0440\u0435\u0434\u0438 \u0425\u0440\u0438\u0441\u0442\u0430", + "\u0441\u043b\u0435\u0434 \u0425\u0440\u0438\u0441\u0442\u0430" + ], + "ERAS": [ + "\u043f\u0440.\u0425\u0440.", + "\u0441\u043b.\u0425\u0440." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u044f\u043d\u0443\u0430\u0440\u0438", + "\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0439", + "\u044e\u043d\u0438", + "\u044e\u043b\u0438", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438", + "\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438", + "\u043d\u043e\u0435\u043c\u0432\u0440\u0438", + "\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438" + ], + "SHORTDAY": [ + "\u043d\u0434", + "\u043f\u043d", + "\u0432\u0442", + "\u0441\u0440", + "\u0447\u0442", + "\u043f\u0442", + "\u0441\u0431" + ], + "SHORTMONTH": [ + "\u044f\u043d\u0443", + "\u0444\u0435\u0432", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440", + "\u043c\u0430\u0439", + "\u044e\u043d\u0438", + "\u044e\u043b\u0438", + "\u0430\u0432\u0433", + "\u0441\u0435\u043f", + "\u043e\u043a\u0442", + "\u043d\u043e\u0435", + "\u0434\u0435\u043a" + ], + "STANDALONEMONTH": [ + "\u044f\u043d\u0443\u0430\u0440\u0438", + "\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0439", + "\u044e\u043d\u0438", + "\u044e\u043b\u0438", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438", + "\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438", + "\u043d\u043e\u0435\u043c\u0432\u0440\u0438", + "\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y '\u0433'.", + "longDate": "d MMMM y '\u0433'.", + "medium": "d.MM.y '\u0433'. H:mm:ss", + "mediumDate": "d.MM.y '\u0433'.", + "mediumTime": "H:mm:ss", + "short": "d.MM.yy '\u0433'. H:mm", + "shortDate": "d.MM.yy '\u0433'.", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "lev", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 0, + "lgSize": 0, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "bg", + "localeID": "bg", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_bm-ml.js b/1.6.6/i18n/angular-locale_bm-ml.js new file mode 100644 index 000000000..ad0fb9f43 --- /dev/null +++ b/1.6.6/i18n/angular-locale_bm-ml.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "kari", + "nt\u025bn\u025b", + "tarata", + "araba", + "alamisa", + "juma", + "sibiri" + ], + "ERANAMES": [ + "jezu krisiti \u0272\u025b", + "jezu krisiti mink\u025b" + ], + "ERAS": [ + "J.-C. \u0272\u025b", + "ni J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "zanwuye", + "feburuye", + "marisi", + "awirili", + "m\u025b", + "zuw\u025bn", + "zuluye", + "uti", + "s\u025btanburu", + "\u0254kut\u0254buru", + "nowanburu", + "desanburu" + ], + "SHORTDAY": [ + "kar", + "nt\u025b", + "tar", + "ara", + "ala", + "jum", + "sib" + ], + "SHORTMONTH": [ + "zan", + "feb", + "mar", + "awi", + "m\u025b", + "zuw", + "zul", + "uti", + "s\u025bt", + "\u0254ku", + "now", + "des" + ], + "STANDALONEMONTH": [ + "zanwuye", + "feburuye", + "marisi", + "awirili", + "m\u025b", + "zuw\u025bn", + "zuluye", + "uti", + "s\u025btanburu", + "\u0254kut\u0254buru", + "nowanburu", + "desanburu" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "bm-ml", + "localeID": "bm_ML", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_bm.js b/1.6.6/i18n/angular-locale_bm.js new file mode 100644 index 000000000..af07e44bb --- /dev/null +++ b/1.6.6/i18n/angular-locale_bm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "kari", + "nt\u025bn\u025b", + "tarata", + "araba", + "alamisa", + "juma", + "sibiri" + ], + "ERANAMES": [ + "jezu krisiti \u0272\u025b", + "jezu krisiti mink\u025b" + ], + "ERAS": [ + "J.-C. \u0272\u025b", + "ni J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "zanwuye", + "feburuye", + "marisi", + "awirili", + "m\u025b", + "zuw\u025bn", + "zuluye", + "uti", + "s\u025btanburu", + "\u0254kut\u0254buru", + "nowanburu", + "desanburu" + ], + "SHORTDAY": [ + "kar", + "nt\u025b", + "tar", + "ara", + "ala", + "jum", + "sib" + ], + "SHORTMONTH": [ + "zan", + "feb", + "mar", + "awi", + "m\u025b", + "zuw", + "zul", + "uti", + "s\u025bt", + "\u0254ku", + "now", + "des" + ], + "STANDALONEMONTH": [ + "zanwuye", + "feburuye", + "marisi", + "awirili", + "m\u025b", + "zuw\u025bn", + "zuluye", + "uti", + "s\u025btanburu", + "\u0254kut\u0254buru", + "nowanburu", + "desanburu" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "bm", + "localeID": "bm", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_bn-bd.js b/1.6.6/i18n/angular-locale_bn-bd.js new file mode 100644 index 000000000..c215c8e84 --- /dev/null +++ b/1.6.6/i18n/angular-locale_bn-bd.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u09b0\u09ac\u09bf\u09ac\u09be\u09b0", + "\u09b8\u09cb\u09ae\u09ac\u09be\u09b0", + "\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09b0", + "\u09ac\u09c1\u09a7\u09ac\u09be\u09b0", + "\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0", + "\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0", + "\u09b6\u09a8\u09bf\u09ac\u09be\u09b0" + ], + "ERANAMES": [ + "\u0996\u09cd\u09b0\u09bf\u09b8\u09cd\u099f\u09aa\u09c2\u09b0\u09cd\u09ac", + "\u0996\u09c3\u09b7\u09cd\u099f\u09be\u09ac\u09cd\u09a6" + ], + "ERAS": [ + "\u0996\u09cd\u09b0\u09bf\u09b8\u09cd\u099f\u09aa\u09c2\u09b0\u09cd\u09ac", + "\u0996\u09c3\u09b7\u09cd\u099f\u09be\u09ac\u09cd\u09a6" + ], + "FIRSTDAYOFWEEK": 4, + "MONTH": [ + "\u099c\u09be\u09a8\u09c1\u09af\u09bc\u09be\u09b0\u09c0", + "\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09af\u09bc\u09be\u09b0\u09c0", + "\u09ae\u09be\u09b0\u09cd\u099a", + "\u098f\u09aa\u09cd\u09b0\u09bf\u09b2", + "\u09ae\u09c7", + "\u099c\u09c1\u09a8", + "\u099c\u09c1\u09b2\u09be\u0987", + "\u0986\u0997\u09b8\u09cd\u099f", + "\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0", + "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0", + "\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0", + "\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0" + ], + "SHORTDAY": [ + "\u09b0\u09ac\u09bf", + "\u09b8\u09cb\u09ae", + "\u09ae\u0999\u09cd\u0997\u09b2", + "\u09ac\u09c1\u09a7", + "\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf", + "\u09b6\u09c1\u0995\u09cd\u09b0", + "\u09b6\u09a8\u09bf" + ], + "SHORTMONTH": [ + "\u099c\u09be\u09a8\u09c1", + "\u09ab\u09c7\u09ac", + "\u09ae\u09be\u09b0\u09cd\u099a", + "\u098f\u09aa\u09cd\u09b0\u09bf\u09b2", + "\u09ae\u09c7", + "\u099c\u09c1\u09a8", + "\u099c\u09c1\u09b2\u09be\u0987", + "\u0986\u0997\u09b8\u09cd\u099f", + "\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0", + "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0", + "\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0", + "\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0" + ], + "STANDALONEMONTH": [ + "\u099c\u09be\u09a8\u09c1\u09af\u09bc\u09be\u09b0\u09c0", + "\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09af\u09bc\u09be\u09b0\u09c0", + "\u09ae\u09be\u09b0\u09cd\u099a", + "\u098f\u09aa\u09cd\u09b0\u09bf\u09b2", + "\u09ae\u09c7", + "\u099c\u09c1\u09a8", + "\u099c\u09c1\u09b2\u09be\u0987", + "\u0986\u0997\u09b8\u09cd\u099f", + "\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0", + "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0", + "\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0", + "\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM, y h:mm:ss a", + "mediumDate": "d MMM, y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u09f3", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "bn-bd", + "localeID": "bn_BD", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_bn-in.js b/1.6.6/i18n/angular-locale_bn-in.js new file mode 100644 index 000000000..747e1a188 --- /dev/null +++ b/1.6.6/i18n/angular-locale_bn-in.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u09b0\u09ac\u09bf\u09ac\u09be\u09b0", + "\u09b8\u09cb\u09ae\u09ac\u09be\u09b0", + "\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09b0", + "\u09ac\u09c1\u09a7\u09ac\u09be\u09b0", + "\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0", + "\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0", + "\u09b6\u09a8\u09bf\u09ac\u09be\u09b0" + ], + "ERANAMES": [ + "\u0996\u09cd\u09b0\u09bf\u09b8\u09cd\u099f\u09aa\u09c2\u09b0\u09cd\u09ac", + "\u0996\u09c3\u09b7\u09cd\u099f\u09be\u09ac\u09cd\u09a6" + ], + "ERAS": [ + "\u0996\u09cd\u09b0\u09bf\u09b8\u09cd\u099f\u09aa\u09c2\u09b0\u09cd\u09ac", + "\u0996\u09c3\u09b7\u09cd\u099f\u09be\u09ac\u09cd\u09a6" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u099c\u09be\u09a8\u09c1\u09af\u09bc\u09be\u09b0\u09c0", + "\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09af\u09bc\u09be\u09b0\u09c0", + "\u09ae\u09be\u09b0\u09cd\u099a", + "\u098f\u09aa\u09cd\u09b0\u09bf\u09b2", + "\u09ae\u09c7", + "\u099c\u09c1\u09a8", + "\u099c\u09c1\u09b2\u09be\u0987", + "\u0986\u0997\u09b8\u09cd\u099f", + "\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0", + "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0", + "\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0", + "\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0" + ], + "SHORTDAY": [ + "\u09b0\u09ac\u09bf", + "\u09b8\u09cb\u09ae", + "\u09ae\u0999\u09cd\u0997\u09b2", + "\u09ac\u09c1\u09a7", + "\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf", + "\u09b6\u09c1\u0995\u09cd\u09b0", + "\u09b6\u09a8\u09bf" + ], + "SHORTMONTH": [ + "\u099c\u09be\u09a8\u09c1", + "\u09ab\u09c7\u09ac", + "\u09ae\u09be\u09b0\u09cd\u099a", + "\u098f\u09aa\u09cd\u09b0\u09bf\u09b2", + "\u09ae\u09c7", + "\u099c\u09c1\u09a8", + "\u099c\u09c1\u09b2\u09be\u0987", + "\u0986\u0997\u09b8\u09cd\u099f", + "\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0", + "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0", + "\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0", + "\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0" + ], + "STANDALONEMONTH": [ + "\u099c\u09be\u09a8\u09c1\u09af\u09bc\u09be\u09b0\u09c0", + "\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09af\u09bc\u09be\u09b0\u09c0", + "\u09ae\u09be\u09b0\u09cd\u099a", + "\u098f\u09aa\u09cd\u09b0\u09bf\u09b2", + "\u09ae\u09c7", + "\u099c\u09c1\u09a8", + "\u099c\u09c1\u09b2\u09be\u0987", + "\u0986\u0997\u09b8\u09cd\u099f", + "\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0", + "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0", + "\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0", + "\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM, y h:mm:ss a", + "mediumDate": "d MMM, y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "bn-in", + "localeID": "bn_IN", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_bn.js b/1.6.6/i18n/angular-locale_bn.js new file mode 100644 index 000000000..3da4b4c51 --- /dev/null +++ b/1.6.6/i18n/angular-locale_bn.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u09b0\u09ac\u09bf\u09ac\u09be\u09b0", + "\u09b8\u09cb\u09ae\u09ac\u09be\u09b0", + "\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09b0", + "\u09ac\u09c1\u09a7\u09ac\u09be\u09b0", + "\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0", + "\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0", + "\u09b6\u09a8\u09bf\u09ac\u09be\u09b0" + ], + "ERANAMES": [ + "\u0996\u09cd\u09b0\u09bf\u09b8\u09cd\u099f\u09aa\u09c2\u09b0\u09cd\u09ac", + "\u0996\u09c3\u09b7\u09cd\u099f\u09be\u09ac\u09cd\u09a6" + ], + "ERAS": [ + "\u0996\u09cd\u09b0\u09bf\u09b8\u09cd\u099f\u09aa\u09c2\u09b0\u09cd\u09ac", + "\u0996\u09c3\u09b7\u09cd\u099f\u09be\u09ac\u09cd\u09a6" + ], + "FIRSTDAYOFWEEK": 4, + "MONTH": [ + "\u099c\u09be\u09a8\u09c1\u09af\u09bc\u09be\u09b0\u09c0", + "\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09af\u09bc\u09be\u09b0\u09c0", + "\u09ae\u09be\u09b0\u09cd\u099a", + "\u098f\u09aa\u09cd\u09b0\u09bf\u09b2", + "\u09ae\u09c7", + "\u099c\u09c1\u09a8", + "\u099c\u09c1\u09b2\u09be\u0987", + "\u0986\u0997\u09b8\u09cd\u099f", + "\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0", + "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0", + "\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0", + "\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0" + ], + "SHORTDAY": [ + "\u09b0\u09ac\u09bf", + "\u09b8\u09cb\u09ae", + "\u09ae\u0999\u09cd\u0997\u09b2", + "\u09ac\u09c1\u09a7", + "\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf", + "\u09b6\u09c1\u0995\u09cd\u09b0", + "\u09b6\u09a8\u09bf" + ], + "SHORTMONTH": [ + "\u099c\u09be\u09a8\u09c1", + "\u09ab\u09c7\u09ac", + "\u09ae\u09be\u09b0\u09cd\u099a", + "\u098f\u09aa\u09cd\u09b0\u09bf\u09b2", + "\u09ae\u09c7", + "\u099c\u09c1\u09a8", + "\u099c\u09c1\u09b2\u09be\u0987", + "\u0986\u0997\u09b8\u09cd\u099f", + "\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0", + "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0", + "\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0", + "\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0" + ], + "STANDALONEMONTH": [ + "\u099c\u09be\u09a8\u09c1\u09af\u09bc\u09be\u09b0\u09c0", + "\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09af\u09bc\u09be\u09b0\u09c0", + "\u09ae\u09be\u09b0\u09cd\u099a", + "\u098f\u09aa\u09cd\u09b0\u09bf\u09b2", + "\u09ae\u09c7", + "\u099c\u09c1\u09a8", + "\u099c\u09c1\u09b2\u09be\u0987", + "\u0986\u0997\u09b8\u09cd\u099f", + "\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0", + "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0", + "\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0", + "\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM, y h:mm:ss a", + "mediumDate": "d MMM, y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u09f3", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "bn", + "localeID": "bn", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_bo-cn.js b/1.6.6/i18n/angular-locale_bo-cn.js new file mode 100644 index 000000000..8fd6679ef --- /dev/null +++ b/1.6.6/i18n/angular-locale_bo-cn.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0f66\u0f94\u0f0b\u0f51\u0fb2\u0f7c\u0f0b", + "\u0f55\u0fb1\u0f72\u0f0b\u0f51\u0fb2\u0f7c\u0f0b" + ], + "DAY": [ + "\u0f42\u0f5f\u0f60\u0f0b\u0f49\u0f72\u0f0b\u0f58\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b" + ], + "ERANAMES": [ + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0b\u0f66\u0f94\u0f7c\u0f53\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0b" + ], + "ERAS": [ + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0b\u0f66\u0f94\u0f7c\u0f53\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0b" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54" + ], + "SHORTDAY": [ + "\u0f49\u0f72\u0f0b\u0f58\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b", + "\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b", + "\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b", + "\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74\u0f0b", + "\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b", + "\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b" + ], + "SHORTMONTH": [ + "\u0f5f\u0fb3\u0f0b\u0f21", + "\u0f5f\u0fb3\u0f0b\u0f22", + "\u0f5f\u0fb3\u0f0b\u0f23", + "\u0f5f\u0fb3\u0f0b\u0f24", + "\u0f5f\u0fb3\u0f0b\u0f25", + "\u0f5f\u0fb3\u0f0b\u0f26", + "\u0f5f\u0fb3\u0f0b\u0f27", + "\u0f5f\u0fb3\u0f0b\u0f28", + "\u0f5f\u0fb3\u0f0b\u0f29", + "\u0f5f\u0fb3\u0f0b\u0f21\u0f20", + "\u0f5f\u0fb3\u0f0b\u0f21\u0f21", + "\u0f5f\u0fb3\u0f0b\u0f21\u0f22" + ], + "STANDALONEMONTH": [ + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM\u0f60\u0f72\u0f0b\u0f5a\u0f7a\u0f66\u0f0bd, EEEE", + "longDate": "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by MMMM\u0f60\u0f72\u0f0b\u0f5a\u0f7a\u0f66\u0f0bd", + "medium": "y \u0f63\u0f7c\u0f60\u0f72\u0f0bMMM\u0f5a\u0f7a\u0f66\u0f0bd h:mm:ss a", + "mediumDate": "y \u0f63\u0f7c\u0f60\u0f72\u0f0bMMM\u0f5a\u0f7a\u0f66\u0f0bd", + "mediumTime": "h:mm:ss a", + "short": "y-MM-dd h:mm a", + "shortDate": "y-MM-dd", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a5", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "bo-cn", + "localeID": "bo_CN", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_bo-in.js b/1.6.6/i18n/angular-locale_bo-in.js new file mode 100644 index 000000000..2321b0a73 --- /dev/null +++ b/1.6.6/i18n/angular-locale_bo-in.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0f66\u0f94\u0f0b\u0f51\u0fb2\u0f7c\u0f0b", + "\u0f55\u0fb1\u0f72\u0f0b\u0f51\u0fb2\u0f7c\u0f0b" + ], + "DAY": [ + "\u0f42\u0f5f\u0f60\u0f0b\u0f49\u0f72\u0f0b\u0f58\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b" + ], + "ERANAMES": [ + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0b\u0f66\u0f94\u0f7c\u0f53\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0b" + ], + "ERAS": [ + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0b\u0f66\u0f94\u0f7c\u0f53\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0b" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54" + ], + "SHORTDAY": [ + "\u0f49\u0f72\u0f0b\u0f58\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b", + "\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b", + "\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b", + "\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74\u0f0b", + "\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b", + "\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b" + ], + "SHORTMONTH": [ + "\u0f5f\u0fb3\u0f0b\u0f21", + "\u0f5f\u0fb3\u0f0b\u0f22", + "\u0f5f\u0fb3\u0f0b\u0f23", + "\u0f5f\u0fb3\u0f0b\u0f24", + "\u0f5f\u0fb3\u0f0b\u0f25", + "\u0f5f\u0fb3\u0f0b\u0f26", + "\u0f5f\u0fb3\u0f0b\u0f27", + "\u0f5f\u0fb3\u0f0b\u0f28", + "\u0f5f\u0fb3\u0f0b\u0f29", + "\u0f5f\u0fb3\u0f0b\u0f21\u0f20", + "\u0f5f\u0fb3\u0f0b\u0f21\u0f21", + "\u0f5f\u0fb3\u0f0b\u0f21\u0f22" + ], + "STANDALONEMONTH": [ + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "y MMMM\u0f60\u0f72\u0f0b\u0f5a\u0f7a\u0f66\u0f0bd, EEEE", + "longDate": "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by MMMM\u0f60\u0f72\u0f0b\u0f5a\u0f7a\u0f66\u0f0bd", + "medium": "y \u0f63\u0f7c\u0f60\u0f72\u0f0bMMM\u0f5a\u0f7a\u0f66\u0f0bd h:mm:ss a", + "mediumDate": "y \u0f63\u0f7c\u0f60\u0f72\u0f0bMMM\u0f5a\u0f7a\u0f66\u0f0bd", + "mediumTime": "h:mm:ss a", + "short": "y-MM-dd h:mm a", + "shortDate": "y-MM-dd", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "bo-in", + "localeID": "bo_IN", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_bo.js b/1.6.6/i18n/angular-locale_bo.js new file mode 100644 index 000000000..154caab90 --- /dev/null +++ b/1.6.6/i18n/angular-locale_bo.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0f66\u0f94\u0f0b\u0f51\u0fb2\u0f7c\u0f0b", + "\u0f55\u0fb1\u0f72\u0f0b\u0f51\u0fb2\u0f7c\u0f0b" + ], + "DAY": [ + "\u0f42\u0f5f\u0f60\u0f0b\u0f49\u0f72\u0f0b\u0f58\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b" + ], + "ERANAMES": [ + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0b\u0f66\u0f94\u0f7c\u0f53\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0b" + ], + "ERAS": [ + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0b\u0f66\u0f94\u0f7c\u0f53\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0b" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54" + ], + "SHORTDAY": [ + "\u0f49\u0f72\u0f0b\u0f58\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b", + "\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b", + "\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b", + "\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74\u0f0b", + "\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b", + "\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b" + ], + "SHORTMONTH": [ + "\u0f5f\u0fb3\u0f0b\u0f21", + "\u0f5f\u0fb3\u0f0b\u0f22", + "\u0f5f\u0fb3\u0f0b\u0f23", + "\u0f5f\u0fb3\u0f0b\u0f24", + "\u0f5f\u0fb3\u0f0b\u0f25", + "\u0f5f\u0fb3\u0f0b\u0f26", + "\u0f5f\u0fb3\u0f0b\u0f27", + "\u0f5f\u0fb3\u0f0b\u0f28", + "\u0f5f\u0fb3\u0f0b\u0f29", + "\u0f5f\u0fb3\u0f0b\u0f21\u0f20", + "\u0f5f\u0fb3\u0f0b\u0f21\u0f21", + "\u0f5f\u0fb3\u0f0b\u0f21\u0f22" + ], + "STANDALONEMONTH": [ + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM\u0f60\u0f72\u0f0b\u0f5a\u0f7a\u0f66\u0f0bd, EEEE", + "longDate": "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by MMMM\u0f60\u0f72\u0f0b\u0f5a\u0f7a\u0f66\u0f0bd", + "medium": "y \u0f63\u0f7c\u0f60\u0f72\u0f0bMMM\u0f5a\u0f7a\u0f66\u0f0bd h:mm:ss a", + "mediumDate": "y \u0f63\u0f7c\u0f60\u0f72\u0f0bMMM\u0f5a\u0f7a\u0f66\u0f0bd", + "mediumTime": "h:mm:ss a", + "short": "y-MM-dd h:mm a", + "shortDate": "y-MM-dd", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a5", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "bo", + "localeID": "bo", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_br-fr.js b/1.6.6/i18n/angular-locale_br-fr.js new file mode 100644 index 000000000..64b428888 --- /dev/null +++ b/1.6.6/i18n/angular-locale_br-fr.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "A.M.", + "G.M." + ], + "DAY": [ + "Sul", + "Lun", + "Meurzh", + "Merc\u02bcher", + "Yaou", + "Gwener", + "Sadorn" + ], + "ERANAMES": [ + "a-raok Jezuz-Krist", + "goude Jezuz-Krist" + ], + "ERAS": [ + "a-raok J.K.", + "goude J.K." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Genver", + "C\u02bchwevrer", + "Meurzh", + "Ebrel", + "Mae", + "Mezheven", + "Gouere", + "Eost", + "Gwengolo", + "Here", + "Du", + "Kerzu" + ], + "SHORTDAY": [ + "Sul", + "Lun", + "Meu.", + "Mer.", + "Yaou", + "Gwe.", + "Sad." + ], + "SHORTMONTH": [ + "Gen.", + "C\u02bchwe.", + "Meur.", + "Ebr.", + "Mae", + "Mezh.", + "Goue.", + "Eost", + "Gwen.", + "Here", + "Du", + "Kzu." + ], + "STANDALONEMONTH": [ + "Genver", + "C\u02bchwevrer", + "Meurzh", + "Ebrel", + "Mae", + "Mezheven", + "Gouere", + "Eost", + "Gwengolo", + "Here", + "Du", + "Kerzu" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "br-fr", + "localeID": "br_FR", + "pluralCat": function(n, opt_precision) { if (n % 10 == 1 && n % 100 != 11 && n % 100 != 71 && n % 100 != 91) { return PLURAL_CATEGORY.ONE; } if (n % 10 == 2 && n % 100 != 12 && n % 100 != 72 && n % 100 != 92) { return PLURAL_CATEGORY.TWO; } if ((n % 10 >= 3 && n % 10 <= 4 || n % 10 == 9) && (n % 100 < 10 || n % 100 > 19) && (n % 100 < 70 || n % 100 > 79) && (n % 100 < 90 || n % 100 > 99)) { return PLURAL_CATEGORY.FEW; } if (n != 0 && n % 1000000 == 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_br.js b/1.6.6/i18n/angular-locale_br.js new file mode 100644 index 000000000..598607e76 --- /dev/null +++ b/1.6.6/i18n/angular-locale_br.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "A.M.", + "G.M." + ], + "DAY": [ + "Sul", + "Lun", + "Meurzh", + "Merc\u02bcher", + "Yaou", + "Gwener", + "Sadorn" + ], + "ERANAMES": [ + "a-raok Jezuz-Krist", + "goude Jezuz-Krist" + ], + "ERAS": [ + "a-raok J.K.", + "goude J.K." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Genver", + "C\u02bchwevrer", + "Meurzh", + "Ebrel", + "Mae", + "Mezheven", + "Gouere", + "Eost", + "Gwengolo", + "Here", + "Du", + "Kerzu" + ], + "SHORTDAY": [ + "Sul", + "Lun", + "Meu.", + "Mer.", + "Yaou", + "Gwe.", + "Sad." + ], + "SHORTMONTH": [ + "Gen.", + "C\u02bchwe.", + "Meur.", + "Ebr.", + "Mae", + "Mezh.", + "Goue.", + "Eost", + "Gwen.", + "Here", + "Du", + "Kzu." + ], + "STANDALONEMONTH": [ + "Genver", + "C\u02bchwevrer", + "Meurzh", + "Ebrel", + "Mae", + "Mezheven", + "Gouere", + "Eost", + "Gwengolo", + "Here", + "Du", + "Kerzu" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "br", + "localeID": "br", + "pluralCat": function(n, opt_precision) { if (n % 10 == 1 && n % 100 != 11 && n % 100 != 71 && n % 100 != 91) { return PLURAL_CATEGORY.ONE; } if (n % 10 == 2 && n % 100 != 12 && n % 100 != 72 && n % 100 != 92) { return PLURAL_CATEGORY.TWO; } if ((n % 10 >= 3 && n % 10 <= 4 || n % 10 == 9) && (n % 100 < 10 || n % 100 > 19) && (n % 100 < 70 || n % 100 > 79) && (n % 100 < 90 || n % 100 > 99)) { return PLURAL_CATEGORY.FEW; } if (n != 0 && n % 1000000 == 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_brx-in.js b/1.6.6/i18n/angular-locale_brx-in.js new file mode 100644 index 000000000..0489f5ba3 --- /dev/null +++ b/1.6.6/i18n/angular-locale_brx-in.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u092b\u0941\u0902", + "\u092c\u0947\u0932\u093e\u0938\u0947" + ], + "DAY": [ + "\u0930\u092c\u093f\u092c\u093e\u0930", + "\u0938\u092e\u092c\u093e\u0930", + "\u092e\u0902\u0917\u0932\u092c\u093e\u0930", + "\u092c\u0941\u0926\u092c\u093e\u0930", + "\u092c\u093f\u0938\u0925\u093f\u092c\u093e\u0930", + "\u0938\u0941\u0916\u0941\u0930\u092c\u093e\u0930", + "\u0938\u0941\u0928\u093f\u092c\u093e\u0930" + ], + "ERANAMES": [ + "\u0908\u0938\u093e.\u092a\u0942\u0930\u094d\u0935", + "\u0938\u0928" + ], + "ERAS": [ + "\u0908\u0938\u093e.\u092a\u0942\u0930\u094d\u0935", + "\u0938\u0928" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u091c\u093e\u0928\u0941\u0935\u093e\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940", + "\u092e\u093e\u0930\u094d\u0938", + "\u090f\u092b\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0941\u0928", + "\u091c\u0941\u0932\u093e\u0907", + "\u0906\u0917\u0938\u094d\u0925", + "\u0938\u0947\u092c\u0925\u0947\u091c\u094d\u092c\u093c\u0930", + "\u0905\u0916\u0925\u092c\u0930", + "\u0928\u092c\u0947\u091c\u094d\u092c\u093c\u0930", + "\u0926\u093f\u0938\u0947\u091c\u094d\u092c\u093c\u0930" + ], + "SHORTDAY": [ + "\u0930\u092c\u093f", + "\u0938\u092e", + "\u092e\u0902\u0917\u0932", + "\u092c\u0941\u0926", + "\u092c\u093f\u0938\u0925\u093f", + "\u0938\u0941\u0916\u0941\u0930", + "\u0938\u0941\u0928\u093f" + ], + "SHORTMONTH": [ + "\u091c\u093e\u0928\u0941\u0935\u093e\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940", + "\u092e\u093e\u0930\u094d\u0938", + "\u090f\u092b\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0941\u0928", + "\u091c\u0941\u0932\u093e\u0907", + "\u0906\u0917\u0938\u094d\u0925", + "\u0938\u0947\u092c\u0925\u0947\u091c\u094d\u092c\u093c\u0930", + "\u0905\u0916\u0925\u092c\u0930", + "\u0928\u092c\u0947\u091c\u094d\u092c\u093c\u0930", + "\u0926\u093f\u0938\u0947\u091c\u094d\u092c\u093c\u0930" + ], + "STANDALONEMONTH": [ + "\u091c\u093e\u0928\u0941\u0935\u093e\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940", + "\u092e\u093e\u0930\u094d\u0938", + "\u090f\u092b\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0941\u0928", + "\u091c\u0941\u0932\u093e\u0907", + "\u0906\u0917\u0938\u094d\u0925", + "\u0938\u0947\u092c\u0925\u0947\u091c\u094d\u092c\u093c\u0930", + "\u0905\u0916\u0925\u092c\u0930", + "\u0928\u092c\u0947\u091c\u094d\u092c\u093c\u0930", + "\u0926\u093f\u0938\u0947\u091c\u094d\u092c\u093c\u0930" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "brx-in", + "localeID": "brx_IN", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_brx.js b/1.6.6/i18n/angular-locale_brx.js new file mode 100644 index 000000000..b17f3dd78 --- /dev/null +++ b/1.6.6/i18n/angular-locale_brx.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u092b\u0941\u0902", + "\u092c\u0947\u0932\u093e\u0938\u0947" + ], + "DAY": [ + "\u0930\u092c\u093f\u092c\u093e\u0930", + "\u0938\u092e\u092c\u093e\u0930", + "\u092e\u0902\u0917\u0932\u092c\u093e\u0930", + "\u092c\u0941\u0926\u092c\u093e\u0930", + "\u092c\u093f\u0938\u0925\u093f\u092c\u093e\u0930", + "\u0938\u0941\u0916\u0941\u0930\u092c\u093e\u0930", + "\u0938\u0941\u0928\u093f\u092c\u093e\u0930" + ], + "ERANAMES": [ + "\u0908\u0938\u093e.\u092a\u0942\u0930\u094d\u0935", + "\u0938\u0928" + ], + "ERAS": [ + "\u0908\u0938\u093e.\u092a\u0942\u0930\u094d\u0935", + "\u0938\u0928" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u091c\u093e\u0928\u0941\u0935\u093e\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940", + "\u092e\u093e\u0930\u094d\u0938", + "\u090f\u092b\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0941\u0928", + "\u091c\u0941\u0932\u093e\u0907", + "\u0906\u0917\u0938\u094d\u0925", + "\u0938\u0947\u092c\u0925\u0947\u091c\u094d\u092c\u093c\u0930", + "\u0905\u0916\u0925\u092c\u0930", + "\u0928\u092c\u0947\u091c\u094d\u092c\u093c\u0930", + "\u0926\u093f\u0938\u0947\u091c\u094d\u092c\u093c\u0930" + ], + "SHORTDAY": [ + "\u0930\u092c\u093f", + "\u0938\u092e", + "\u092e\u0902\u0917\u0932", + "\u092c\u0941\u0926", + "\u092c\u093f\u0938\u0925\u093f", + "\u0938\u0941\u0916\u0941\u0930", + "\u0938\u0941\u0928\u093f" + ], + "SHORTMONTH": [ + "\u091c\u093e\u0928\u0941\u0935\u093e\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940", + "\u092e\u093e\u0930\u094d\u0938", + "\u090f\u092b\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0941\u0928", + "\u091c\u0941\u0932\u093e\u0907", + "\u0906\u0917\u0938\u094d\u0925", + "\u0938\u0947\u092c\u0925\u0947\u091c\u094d\u092c\u093c\u0930", + "\u0905\u0916\u0925\u092c\u0930", + "\u0928\u092c\u0947\u091c\u094d\u092c\u093c\u0930", + "\u0926\u093f\u0938\u0947\u091c\u094d\u092c\u093c\u0930" + ], + "STANDALONEMONTH": [ + "\u091c\u093e\u0928\u0941\u0935\u093e\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940", + "\u092e\u093e\u0930\u094d\u0938", + "\u090f\u092b\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0941\u0928", + "\u091c\u0941\u0932\u093e\u0907", + "\u0906\u0917\u0938\u094d\u0925", + "\u0938\u0947\u092c\u0925\u0947\u091c\u094d\u092c\u093c\u0930", + "\u0905\u0916\u0925\u092c\u0930", + "\u0928\u092c\u0947\u091c\u094d\u092c\u093c\u0930", + "\u0926\u093f\u0938\u0947\u091c\u094d\u092c\u093c\u0930" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "brx", + "localeID": "brx", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_bs-cyrl-ba.js b/1.6.6/i18n/angular-locale_bs-cyrl-ba.js new file mode 100644 index 000000000..45e4450d7 --- /dev/null +++ b/1.6.6/i18n/angular-locale_bs-cyrl-ba.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435", + "\u043f\u043e\u043f\u043e\u0434\u043d\u0435" + ], + "DAY": [ + "\u043d\u0435\u0434\u0435\u0459\u0430", + "\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a", + "\u0443\u0442\u043e\u0440\u0430\u043a", + "\u0441\u0440\u0438\u0458\u0435\u0434\u0430", + "\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a", + "\u043f\u0435\u0442\u0430\u043a", + "\u0441\u0443\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u041f\u0440\u0435 \u043d\u043e\u0432\u0435 \u0435\u0440\u0435", + "\u041d\u043e\u0432\u0435 \u0435\u0440\u0435" + ], + "ERAS": [ + "\u043f. \u043d. \u0435.", + "\u043d. \u0435." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0458\u0430\u043d\u0443\u0430\u0440", + "\u0444\u0435\u0431\u0440\u0443\u0430\u0440", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d\u0438", + "\u0458\u0443\u043b\u0438", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440", + "\u043e\u043a\u0442\u043e\u0431\u0430\u0440", + "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440", + "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440" + ], + "SHORTDAY": [ + "\u043d\u0435\u0434", + "\u043f\u043e\u043d", + "\u0443\u0442\u043e", + "\u0441\u0440\u0438", + "\u0447\u0435\u0442", + "\u043f\u0435\u0442", + "\u0441\u0443\u0431" + ], + "SHORTMONTH": [ + "\u0458\u0430\u043d", + "\u0444\u0435\u0431", + "\u043c\u0430\u0440", + "\u0430\u043f\u0440", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d", + "\u0458\u0443\u043b", + "\u0430\u0432\u0433", + "\u0441\u0435\u043f", + "\u043e\u043a\u0442", + "\u043d\u043e\u0432", + "\u0434\u0435\u0446" + ], + "STANDALONEMONTH": [ + "\u0458\u0430\u043d\u0443\u0430\u0440", + "\u0444\u0435\u0431\u0440\u0443\u0430\u0440", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d\u0438", + "\u0458\u0443\u043b\u0438", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440", + "\u043e\u043a\u0442\u043e\u0431\u0430\u0440", + "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440", + "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd. MMMM y.", + "longDate": "dd. MMMM y.", + "medium": "dd.MM.y. HH:mm:ss", + "mediumDate": "dd.MM.y.", + "mediumTime": "HH:mm:ss", + "short": "d.M.yy. HH:mm", + "shortDate": "d.M.yy.", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "KM", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "bs-cyrl-ba", + "localeID": "bs_Cyrl_BA", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_bs-cyrl.js b/1.6.6/i18n/angular-locale_bs-cyrl.js new file mode 100644 index 000000000..0f0cdf228 --- /dev/null +++ b/1.6.6/i18n/angular-locale_bs-cyrl.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435", + "\u043f\u043e\u043f\u043e\u0434\u043d\u0435" + ], + "DAY": [ + "\u043d\u0435\u0434\u0435\u0459\u0430", + "\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a", + "\u0443\u0442\u043e\u0440\u0430\u043a", + "\u0441\u0440\u0438\u0458\u0435\u0434\u0430", + "\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a", + "\u043f\u0435\u0442\u0430\u043a", + "\u0441\u0443\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u041f\u0440\u0435 \u043d\u043e\u0432\u0435 \u0435\u0440\u0435", + "\u041d\u043e\u0432\u0435 \u0435\u0440\u0435" + ], + "ERAS": [ + "\u043f. \u043d. \u0435.", + "\u043d. \u0435." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0458\u0430\u043d\u0443\u0430\u0440", + "\u0444\u0435\u0431\u0440\u0443\u0430\u0440", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d\u0438", + "\u0458\u0443\u043b\u0438", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440", + "\u043e\u043a\u0442\u043e\u0431\u0430\u0440", + "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440", + "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440" + ], + "SHORTDAY": [ + "\u043d\u0435\u0434", + "\u043f\u043e\u043d", + "\u0443\u0442\u043e", + "\u0441\u0440\u0438", + "\u0447\u0435\u0442", + "\u043f\u0435\u0442", + "\u0441\u0443\u0431" + ], + "SHORTMONTH": [ + "\u0458\u0430\u043d", + "\u0444\u0435\u0431", + "\u043c\u0430\u0440", + "\u0430\u043f\u0440", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d", + "\u0458\u0443\u043b", + "\u0430\u0432\u0433", + "\u0441\u0435\u043f", + "\u043e\u043a\u0442", + "\u043d\u043e\u0432", + "\u0434\u0435\u0446" + ], + "STANDALONEMONTH": [ + "\u0458\u0430\u043d\u0443\u0430\u0440", + "\u0444\u0435\u0431\u0440\u0443\u0430\u0440", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d\u0438", + "\u0458\u0443\u043b\u0438", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440", + "\u043e\u043a\u0442\u043e\u0431\u0430\u0440", + "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440", + "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd. MMMM y.", + "longDate": "dd. MMMM y.", + "medium": "dd.MM.y. HH:mm:ss", + "mediumDate": "dd.MM.y.", + "mediumTime": "HH:mm:ss", + "short": "d.M.yy. HH:mm", + "shortDate": "d.M.yy.", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "KM", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "bs-cyrl", + "localeID": "bs_Cyrl", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_bs-latn-ba.js b/1.6.6/i18n/angular-locale_bs-latn-ba.js new file mode 100644 index 000000000..eb346d6f5 --- /dev/null +++ b/1.6.6/i18n/angular-locale_bs-latn-ba.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "prijepodne", + "popodne" + ], + "DAY": [ + "nedjelja", + "ponedjeljak", + "utorak", + "srijeda", + "\u010detvrtak", + "petak", + "subota" + ], + "ERANAMES": [ + "prije nove ere", + "nove ere" + ], + "ERAS": [ + "p. n. e.", + "n. e." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "mart", + "april", + "maj", + "juni", + "juli", + "avgust", + "septembar", + "oktobar", + "novembar", + "decembar" + ], + "SHORTDAY": [ + "ned", + "pon", + "uto", + "sri", + "\u010det", + "pet", + "sub" + ], + "SHORTMONTH": [ + "jan", + "feb", + "mar", + "apr", + "maj", + "jun", + "jul", + "avg", + "sep", + "okt", + "nov", + "dec" + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "mart", + "april", + "maj", + "juni", + "juli", + "avgust", + "septembar", + "oktobar", + "novembar", + "decembar" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y.", + "longDate": "d. MMMM y.", + "medium": "d. MMM. y. HH:mm:ss", + "mediumDate": "d. MMM. y.", + "mediumTime": "HH:mm:ss", + "short": "d.M.yy. HH:mm", + "shortDate": "d.M.yy.", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "KM", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "bs-latn-ba", + "localeID": "bs_Latn_BA", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_bs-latn.js b/1.6.6/i18n/angular-locale_bs-latn.js new file mode 100644 index 000000000..a3a5efb03 --- /dev/null +++ b/1.6.6/i18n/angular-locale_bs-latn.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "prijepodne", + "popodne" + ], + "DAY": [ + "nedjelja", + "ponedjeljak", + "utorak", + "srijeda", + "\u010detvrtak", + "petak", + "subota" + ], + "ERANAMES": [ + "prije nove ere", + "nove ere" + ], + "ERAS": [ + "p. n. e.", + "n. e." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "mart", + "april", + "maj", + "juni", + "juli", + "avgust", + "septembar", + "oktobar", + "novembar", + "decembar" + ], + "SHORTDAY": [ + "ned", + "pon", + "uto", + "sri", + "\u010det", + "pet", + "sub" + ], + "SHORTMONTH": [ + "jan", + "feb", + "mar", + "apr", + "maj", + "jun", + "jul", + "avg", + "sep", + "okt", + "nov", + "dec" + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "mart", + "april", + "maj", + "juni", + "juli", + "avgust", + "septembar", + "oktobar", + "novembar", + "decembar" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y.", + "longDate": "d. MMMM y.", + "medium": "d. MMM. y. HH:mm:ss", + "mediumDate": "d. MMM. y.", + "mediumTime": "HH:mm:ss", + "short": "d.M.yy. HH:mm", + "shortDate": "d.M.yy.", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "KM", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "bs-latn", + "localeID": "bs_Latn", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_bs.js b/1.6.6/i18n/angular-locale_bs.js new file mode 100644 index 000000000..5e2b80217 --- /dev/null +++ b/1.6.6/i18n/angular-locale_bs.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "prijepodne", + "popodne" + ], + "DAY": [ + "nedjelja", + "ponedjeljak", + "utorak", + "srijeda", + "\u010detvrtak", + "petak", + "subota" + ], + "ERANAMES": [ + "prije nove ere", + "nove ere" + ], + "ERAS": [ + "p. n. e.", + "n. e." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "mart", + "april", + "maj", + "juni", + "juli", + "avgust", + "septembar", + "oktobar", + "novembar", + "decembar" + ], + "SHORTDAY": [ + "ned", + "pon", + "uto", + "sri", + "\u010det", + "pet", + "sub" + ], + "SHORTMONTH": [ + "jan", + "feb", + "mar", + "apr", + "maj", + "jun", + "jul", + "avg", + "sep", + "okt", + "nov", + "dec" + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "mart", + "april", + "maj", + "juni", + "juli", + "avgust", + "septembar", + "oktobar", + "novembar", + "decembar" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y.", + "longDate": "d. MMMM y.", + "medium": "d. MMM. y. HH:mm:ss", + "mediumDate": "d. MMM. y.", + "mediumTime": "HH:mm:ss", + "short": "d.M.yy. HH:mm", + "shortDate": "d.M.yy.", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "KM", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "bs", + "localeID": "bs", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ca-ad.js b/1.6.6/i18n/angular-locale_ca-ad.js new file mode 100644 index 000000000..d0a4268c3 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ca-ad.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "diumenge", + "dilluns", + "dimarts", + "dimecres", + "dijous", + "divendres", + "dissabte" + ], + "ERANAMES": [ + "abans de Crist", + "despr\u00e9s de Crist" + ], + "ERAS": [ + "aC", + "dC" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "de gener", + "de febrer", + "de mar\u00e7", + "d\u2019abril", + "de maig", + "de juny", + "de juliol", + "d\u2019agost", + "de setembre", + "d\u2019octubre", + "de novembre", + "de desembre" + ], + "SHORTDAY": [ + "dg.", + "dl.", + "dt.", + "dc.", + "dj.", + "dv.", + "ds." + ], + "SHORTMONTH": [ + "de gen.", + "de febr.", + "de mar\u00e7", + "d\u2019abr.", + "de maig", + "de juny", + "de jul.", + "d\u2019ag.", + "de set.", + "d\u2019oct.", + "de nov.", + "de des." + ], + "STANDALONEMONTH": [ + "gener", + "febrer", + "mar\u00e7", + "abril", + "maig", + "juny", + "juliol", + "agost", + "setembre", + "octubre", + "novembre", + "desembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM 'de' y", + "longDate": "d MMMM 'de' y", + "medium": "d MMM y H:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "H:mm:ss", + "short": "d/M/yy H:mm", + "shortDate": "d/M/yy", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ca-ad", + "localeID": "ca_AD", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ca-es-valencia.js b/1.6.6/i18n/angular-locale_ca-es-valencia.js new file mode 100644 index 000000000..388980e96 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ca-es-valencia.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "diumenge", + "dilluns", + "dimarts", + "dimecres", + "dijous", + "divendres", + "dissabte" + ], + "ERANAMES": [ + "abans de Crist", + "despr\u00e9s de Crist" + ], + "ERAS": [ + "aC", + "dC" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "de gener", + "de febrer", + "de mar\u00e7", + "d\u2019abril", + "de maig", + "de juny", + "de juliol", + "d\u2019agost", + "de setembre", + "d\u2019octubre", + "de novembre", + "de desembre" + ], + "SHORTDAY": [ + "dg.", + "dl.", + "dt.", + "dc.", + "dj.", + "dv.", + "ds." + ], + "SHORTMONTH": [ + "gen.", + "febr.", + "mar\u00e7", + "abr.", + "maig", + "juny", + "jul.", + "ag.", + "set.", + "oct.", + "nov.", + "des." + ], + "STANDALONEMONTH": [ + "gener", + "febrer", + "mar\u00e7", + "abril", + "maig", + "juny", + "juliol", + "agost", + "setembre", + "octubre", + "novembre", + "desembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM 'de' y", + "longDate": "d MMMM 'de' y", + "medium": "d MMM y H:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "H:mm:ss", + "short": "d/M/yy H:mm", + "shortDate": "d/M/yy", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ca-es-valencia", + "localeID": "ca_ES_VALENCIA", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ca-es.js b/1.6.6/i18n/angular-locale_ca-es.js new file mode 100644 index 000000000..ddfe1ffd7 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ca-es.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "diumenge", + "dilluns", + "dimarts", + "dimecres", + "dijous", + "divendres", + "dissabte" + ], + "ERANAMES": [ + "abans de Crist", + "despr\u00e9s de Crist" + ], + "ERAS": [ + "aC", + "dC" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "de gener", + "de febrer", + "de mar\u00e7", + "d\u2019abril", + "de maig", + "de juny", + "de juliol", + "d\u2019agost", + "de setembre", + "d\u2019octubre", + "de novembre", + "de desembre" + ], + "SHORTDAY": [ + "dg.", + "dl.", + "dt.", + "dc.", + "dj.", + "dv.", + "ds." + ], + "SHORTMONTH": [ + "de gen.", + "de febr.", + "de mar\u00e7", + "d\u2019abr.", + "de maig", + "de juny", + "de jul.", + "d\u2019ag.", + "de set.", + "d\u2019oct.", + "de nov.", + "de des." + ], + "STANDALONEMONTH": [ + "gener", + "febrer", + "mar\u00e7", + "abril", + "maig", + "juny", + "juliol", + "agost", + "setembre", + "octubre", + "novembre", + "desembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM 'de' y", + "longDate": "d MMMM 'de' y", + "medium": "d MMM y H:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "H:mm:ss", + "short": "d/M/yy H:mm", + "shortDate": "d/M/yy", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ca-es", + "localeID": "ca_ES", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ca-fr.js b/1.6.6/i18n/angular-locale_ca-fr.js new file mode 100644 index 000000000..411f4b898 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ca-fr.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "diumenge", + "dilluns", + "dimarts", + "dimecres", + "dijous", + "divendres", + "dissabte" + ], + "ERANAMES": [ + "abans de Crist", + "despr\u00e9s de Crist" + ], + "ERAS": [ + "aC", + "dC" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "de gener", + "de febrer", + "de mar\u00e7", + "d\u2019abril", + "de maig", + "de juny", + "de juliol", + "d\u2019agost", + "de setembre", + "d\u2019octubre", + "de novembre", + "de desembre" + ], + "SHORTDAY": [ + "dg.", + "dl.", + "dt.", + "dc.", + "dj.", + "dv.", + "ds." + ], + "SHORTMONTH": [ + "de gen.", + "de febr.", + "de mar\u00e7", + "d\u2019abr.", + "de maig", + "de juny", + "de jul.", + "d\u2019ag.", + "de set.", + "d\u2019oct.", + "de nov.", + "de des." + ], + "STANDALONEMONTH": [ + "gener", + "febrer", + "mar\u00e7", + "abril", + "maig", + "juny", + "juliol", + "agost", + "setembre", + "octubre", + "novembre", + "desembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM 'de' y", + "longDate": "d MMMM 'de' y", + "medium": "d MMM y H:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "H:mm:ss", + "short": "d/M/yy H:mm", + "shortDate": "d/M/yy", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ca-fr", + "localeID": "ca_FR", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ca-it.js b/1.6.6/i18n/angular-locale_ca-it.js new file mode 100644 index 000000000..3739bbcac --- /dev/null +++ b/1.6.6/i18n/angular-locale_ca-it.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "diumenge", + "dilluns", + "dimarts", + "dimecres", + "dijous", + "divendres", + "dissabte" + ], + "ERANAMES": [ + "abans de Crist", + "despr\u00e9s de Crist" + ], + "ERAS": [ + "aC", + "dC" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "de gener", + "de febrer", + "de mar\u00e7", + "d\u2019abril", + "de maig", + "de juny", + "de juliol", + "d\u2019agost", + "de setembre", + "d\u2019octubre", + "de novembre", + "de desembre" + ], + "SHORTDAY": [ + "dg.", + "dl.", + "dt.", + "dc.", + "dj.", + "dv.", + "ds." + ], + "SHORTMONTH": [ + "de gen.", + "de febr.", + "de mar\u00e7", + "d\u2019abr.", + "de maig", + "de juny", + "de jul.", + "d\u2019ag.", + "de set.", + "d\u2019oct.", + "de nov.", + "de des." + ], + "STANDALONEMONTH": [ + "gener", + "febrer", + "mar\u00e7", + "abril", + "maig", + "juny", + "juliol", + "agost", + "setembre", + "octubre", + "novembre", + "desembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM 'de' y", + "longDate": "d MMMM 'de' y", + "medium": "d MMM y H:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "H:mm:ss", + "short": "d/M/yy H:mm", + "shortDate": "d/M/yy", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ca-it", + "localeID": "ca_IT", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ca.js b/1.6.6/i18n/angular-locale_ca.js new file mode 100644 index 000000000..774aa3724 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ca.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "diumenge", + "dilluns", + "dimarts", + "dimecres", + "dijous", + "divendres", + "dissabte" + ], + "ERANAMES": [ + "abans de Crist", + "despr\u00e9s de Crist" + ], + "ERAS": [ + "aC", + "dC" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "de gener", + "de febrer", + "de mar\u00e7", + "d\u2019abril", + "de maig", + "de juny", + "de juliol", + "d\u2019agost", + "de setembre", + "d\u2019octubre", + "de novembre", + "de desembre" + ], + "SHORTDAY": [ + "dg.", + "dl.", + "dt.", + "dc.", + "dj.", + "dv.", + "ds." + ], + "SHORTMONTH": [ + "de gen.", + "de febr.", + "de mar\u00e7", + "d\u2019abr.", + "de maig", + "de juny", + "de jul.", + "d\u2019ag.", + "de set.", + "d\u2019oct.", + "de nov.", + "de des." + ], + "STANDALONEMONTH": [ + "gener", + "febrer", + "mar\u00e7", + "abril", + "maig", + "juny", + "juliol", + "agost", + "setembre", + "octubre", + "novembre", + "desembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM 'de' y", + "longDate": "d MMMM 'de' y", + "medium": "d MMM y H:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "H:mm:ss", + "short": "d/M/yy H:mm", + "shortDate": "d/M/yy", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ca", + "localeID": "ca", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ce-ru.js b/1.6.6/i18n/angular-locale_ce-ru.js new file mode 100644 index 000000000..63761a07f --- /dev/null +++ b/1.6.6/i18n/angular-locale_ce-ru.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u043a\u04c0\u0438\u0440\u0430\u043d\u0430\u043d \u0434\u0435", + "\u043e\u0440\u0448\u043e\u0442\u0430\u043d \u0434\u0435", + "\u0448\u0438\u043d\u0430\u0440\u0438\u043d \u0434\u0435", + "\u043a\u0445\u0430\u0430\u0440\u0438\u043d \u0434\u0435", + "\u0435\u0430\u0440\u0438\u043d \u0434\u0435", + "\u043f\u04c0\u0435\u0440\u0430\u0441\u043a\u0430\u043d \u0434\u0435", + "\u0448\u043e\u0442 \u0434\u0435" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044c", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044c", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0435\u043b\u044c", + "\u043c\u0430\u0439", + "\u0438\u044e\u043d\u044c", + "\u0438\u044e\u043b\u044c", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044c", + "\u043d\u043e\u044f\u0431\u0440\u044c", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044c" + ], + "SHORTDAY": [ + "\u043a\u04c0\u0438\u0440\u0430\u043d\u0430\u043d \u0434\u0435", + "\u043e\u0440\u0448\u043e\u0442\u0430\u043d \u0434\u0435", + "\u0448\u0438\u043d\u0430\u0440\u0438\u043d \u0434\u0435", + "\u043a\u0445\u0430\u0430\u0440\u0438\u043d \u0434\u0435", + "\u0435\u0430\u0440\u0438\u043d \u0434\u0435", + "\u043f\u04c0\u0435\u0440\u0430\u0441\u043a\u0430\u043d \u0434\u0435", + "\u0448\u043e\u0442 \u0434\u0435" + ], + "SHORTMONTH": [ + "\u044f\u043d\u0432", + "\u0444\u0435\u0432", + "\u043c\u0430\u0440", + "\u0430\u043f\u0440", + "\u043c\u0430\u0439", + "\u0438\u044e\u043d", + "\u0438\u044e\u043b", + "\u0430\u0432\u0433", + "\u0441\u0435\u043d", + "\u043e\u043a\u0442", + "\u043d\u043e\u044f", + "\u0434\u0435\u043a" + ], + "STANDALONEMONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044c", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044c", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0435\u043b\u044c", + "\u043c\u0430\u0439", + "\u0438\u044e\u043d\u044c", + "\u0438\u044e\u043b\u044c", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044c", + "\u043d\u043e\u044f\u0431\u0440\u044c", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20bd", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ce-ru", + "localeID": "ce_RU", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ce.js b/1.6.6/i18n/angular-locale_ce.js new file mode 100644 index 000000000..772f125fa --- /dev/null +++ b/1.6.6/i18n/angular-locale_ce.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u043a\u04c0\u0438\u0440\u0430\u043d\u0430\u043d \u0434\u0435", + "\u043e\u0440\u0448\u043e\u0442\u0430\u043d \u0434\u0435", + "\u0448\u0438\u043d\u0430\u0440\u0438\u043d \u0434\u0435", + "\u043a\u0445\u0430\u0430\u0440\u0438\u043d \u0434\u0435", + "\u0435\u0430\u0440\u0438\u043d \u0434\u0435", + "\u043f\u04c0\u0435\u0440\u0430\u0441\u043a\u0430\u043d \u0434\u0435", + "\u0448\u043e\u0442 \u0434\u0435" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044c", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044c", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0435\u043b\u044c", + "\u043c\u0430\u0439", + "\u0438\u044e\u043d\u044c", + "\u0438\u044e\u043b\u044c", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044c", + "\u043d\u043e\u044f\u0431\u0440\u044c", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044c" + ], + "SHORTDAY": [ + "\u043a\u04c0\u0438\u0440\u0430\u043d\u0430\u043d \u0434\u0435", + "\u043e\u0440\u0448\u043e\u0442\u0430\u043d \u0434\u0435", + "\u0448\u0438\u043d\u0430\u0440\u0438\u043d \u0434\u0435", + "\u043a\u0445\u0430\u0430\u0440\u0438\u043d \u0434\u0435", + "\u0435\u0430\u0440\u0438\u043d \u0434\u0435", + "\u043f\u04c0\u0435\u0440\u0430\u0441\u043a\u0430\u043d \u0434\u0435", + "\u0448\u043e\u0442 \u0434\u0435" + ], + "SHORTMONTH": [ + "\u044f\u043d\u0432", + "\u0444\u0435\u0432", + "\u043c\u0430\u0440", + "\u0430\u043f\u0440", + "\u043c\u0430\u0439", + "\u0438\u044e\u043d", + "\u0438\u044e\u043b", + "\u0430\u0432\u0433", + "\u0441\u0435\u043d", + "\u043e\u043a\u0442", + "\u043d\u043e\u044f", + "\u0434\u0435\u043a" + ], + "STANDALONEMONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044c", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044c", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0435\u043b\u044c", + "\u043c\u0430\u0439", + "\u0438\u044e\u043d\u044c", + "\u0438\u044e\u043b\u044c", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044c", + "\u043d\u043e\u044f\u0431\u0440\u044c", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20bd", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ce", + "localeID": "ce", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_cgg-ug.js b/1.6.6/i18n/angular-locale_cgg-ug.js new file mode 100644 index 000000000..6dd5f59b5 --- /dev/null +++ b/1.6.6/i18n/angular-locale_cgg-ug.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sande", + "Orwokubanza", + "Orwakabiri", + "Orwakashatu", + "Orwakana", + "Orwakataano", + "Orwamukaaga" + ], + "ERANAMES": [ + "Kurisito Atakaijire", + "Kurisito Yaijire" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Okwokubanza", + "Okwakabiri", + "Okwakashatu", + "Okwakana", + "Okwakataana", + "Okwamukaaga", + "Okwamushanju", + "Okwamunaana", + "Okwamwenda", + "Okwaikumi", + "Okwaikumi na kumwe", + "Okwaikumi na ibiri" + ], + "SHORTDAY": [ + "SAN", + "ORK", + "OKB", + "OKS", + "OKN", + "OKT", + "OMK" + ], + "SHORTMONTH": [ + "KBZ", + "KBR", + "KST", + "KKN", + "KTN", + "KMK", + "KMS", + "KMN", + "KMW", + "KKM", + "KNK", + "KNB" + ], + "STANDALONEMONTH": [ + "Okwokubanza", + "Okwakabiri", + "Okwakashatu", + "Okwakana", + "Okwakataana", + "Okwamukaaga", + "Okwamushanju", + "Okwamunaana", + "Okwamwenda", + "Okwaikumi", + "Okwaikumi na kumwe", + "Okwaikumi na ibiri" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "UGX", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "cgg-ug", + "localeID": "cgg_UG", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_cgg.js b/1.6.6/i18n/angular-locale_cgg.js new file mode 100644 index 000000000..528652c97 --- /dev/null +++ b/1.6.6/i18n/angular-locale_cgg.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sande", + "Orwokubanza", + "Orwakabiri", + "Orwakashatu", + "Orwakana", + "Orwakataano", + "Orwamukaaga" + ], + "ERANAMES": [ + "Kurisito Atakaijire", + "Kurisito Yaijire" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Okwokubanza", + "Okwakabiri", + "Okwakashatu", + "Okwakana", + "Okwakataana", + "Okwamukaaga", + "Okwamushanju", + "Okwamunaana", + "Okwamwenda", + "Okwaikumi", + "Okwaikumi na kumwe", + "Okwaikumi na ibiri" + ], + "SHORTDAY": [ + "SAN", + "ORK", + "OKB", + "OKS", + "OKN", + "OKT", + "OMK" + ], + "SHORTMONTH": [ + "KBZ", + "KBR", + "KST", + "KKN", + "KTN", + "KMK", + "KMS", + "KMN", + "KMW", + "KKM", + "KNK", + "KNB" + ], + "STANDALONEMONTH": [ + "Okwokubanza", + "Okwakabiri", + "Okwakashatu", + "Okwakana", + "Okwakataana", + "Okwamukaaga", + "Okwamushanju", + "Okwamunaana", + "Okwamwenda", + "Okwaikumi", + "Okwaikumi na kumwe", + "Okwaikumi na ibiri" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "UGX", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "cgg", + "localeID": "cgg", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_chr-us.js b/1.6.6/i18n/angular-locale_chr-us.js new file mode 100644 index 000000000..b13806ccc --- /dev/null +++ b/1.6.6/i18n/angular-locale_chr-us.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u13cc\u13be\u13b4", + "\u13d2\u13af\u13f1\u13a2\u13d7\u13e2" + ], + "DAY": [ + "\u13a4\u13be\u13d9\u13d3\u13c6\u13cd\u13ac", + "\u13a4\u13be\u13d9\u13d3\u13c9\u13c5\u13af", + "\u13d4\u13b5\u13c1\u13a2\u13a6", + "\u13e6\u13a2\u13c1\u13a2\u13a6", + "\u13c5\u13a9\u13c1\u13a2\u13a6", + "\u13e7\u13be\u13a9\u13b6\u13cd\u13d7", + "\u13a4\u13be\u13d9\u13d3\u13c8\u13d5\u13be" + ], + "ERANAMES": [ + "\u13e7\u13d3\u13b7\u13b8 \u13a4\u13b7\u13af\u13cd\u13d7 \u13a6\u13b6\u13c1\u13db", + "\u13a0\u13c3 \u13d9\u13bb\u13c2" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u13a4\u13c3\u13b8\u13d4\u13c5", + "\u13a7\u13a6\u13b5", + "\u13a0\u13c5\u13f1", + "\u13a7\u13ec\u13c2", + "\u13a0\u13c2\u13cd\u13ac\u13d8", + "\u13d5\u13ad\u13b7\u13f1", + "\u13ab\u13f0\u13c9\u13c2", + "\u13a6\u13b6\u13c2", + "\u13da\u13b5\u13cd\u13d7", + "\u13da\u13c2\u13c5\u13d7", + "\u13c5\u13d3\u13d5\u13c6", + "\u13a5\u13cd\u13a9\u13f1" + ], + "SHORTDAY": [ + "\u13c6\u13cd\u13ac", + "\u13c9\u13c5\u13af", + "\u13d4\u13b5\u13c1", + "\u13e6\u13a2\u13c1", + "\u13c5\u13a9\u13c1", + "\u13e7\u13be\u13a9", + "\u13c8\u13d5\u13be" + ], + "SHORTMONTH": [ + "\u13a4\u13c3", + "\u13a7\u13a6", + "\u13a0\u13c5", + "\u13a7\u13ec", + "\u13a0\u13c2", + "\u13d5\u13ad", + "\u13ab\u13f0", + "\u13a6\u13b6", + "\u13da\u13b5", + "\u13da\u13c2", + "\u13c5\u13d3", + "\u13a5\u13cd" + ], + "STANDALONEMONTH": [ + "\u13a4\u13c3\u13b8\u13d4\u13c5", + "\u13a7\u13a6\u13b5", + "\u13a0\u13c5\u13f1", + "\u13a7\u13ec\u13c2", + "\u13a0\u13c2\u13cd\u13ac\u13d8", + "\u13d5\u13ad\u13b7\u13f1", + "\u13ab\u13f0\u13c9\u13c2", + "\u13a6\u13b6\u13c2", + "\u13da\u13b5\u13cd\u13d7", + "\u13da\u13c2\u13c5\u13d7", + "\u13c5\u13d3\u13d5\u13c6", + "\u13a5\u13cd\u13a9\u13f1" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "chr-us", + "localeID": "chr_US", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_chr.js b/1.6.6/i18n/angular-locale_chr.js new file mode 100644 index 000000000..e8213affd --- /dev/null +++ b/1.6.6/i18n/angular-locale_chr.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u13cc\u13be\u13b4", + "\u13d2\u13af\u13f1\u13a2\u13d7\u13e2" + ], + "DAY": [ + "\u13a4\u13be\u13d9\u13d3\u13c6\u13cd\u13ac", + "\u13a4\u13be\u13d9\u13d3\u13c9\u13c5\u13af", + "\u13d4\u13b5\u13c1\u13a2\u13a6", + "\u13e6\u13a2\u13c1\u13a2\u13a6", + "\u13c5\u13a9\u13c1\u13a2\u13a6", + "\u13e7\u13be\u13a9\u13b6\u13cd\u13d7", + "\u13a4\u13be\u13d9\u13d3\u13c8\u13d5\u13be" + ], + "ERANAMES": [ + "\u13e7\u13d3\u13b7\u13b8 \u13a4\u13b7\u13af\u13cd\u13d7 \u13a6\u13b6\u13c1\u13db", + "\u13a0\u13c3 \u13d9\u13bb\u13c2" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u13a4\u13c3\u13b8\u13d4\u13c5", + "\u13a7\u13a6\u13b5", + "\u13a0\u13c5\u13f1", + "\u13a7\u13ec\u13c2", + "\u13a0\u13c2\u13cd\u13ac\u13d8", + "\u13d5\u13ad\u13b7\u13f1", + "\u13ab\u13f0\u13c9\u13c2", + "\u13a6\u13b6\u13c2", + "\u13da\u13b5\u13cd\u13d7", + "\u13da\u13c2\u13c5\u13d7", + "\u13c5\u13d3\u13d5\u13c6", + "\u13a5\u13cd\u13a9\u13f1" + ], + "SHORTDAY": [ + "\u13c6\u13cd\u13ac", + "\u13c9\u13c5\u13af", + "\u13d4\u13b5\u13c1", + "\u13e6\u13a2\u13c1", + "\u13c5\u13a9\u13c1", + "\u13e7\u13be\u13a9", + "\u13c8\u13d5\u13be" + ], + "SHORTMONTH": [ + "\u13a4\u13c3", + "\u13a7\u13a6", + "\u13a0\u13c5", + "\u13a7\u13ec", + "\u13a0\u13c2", + "\u13d5\u13ad", + "\u13ab\u13f0", + "\u13a6\u13b6", + "\u13da\u13b5", + "\u13da\u13c2", + "\u13c5\u13d3", + "\u13a5\u13cd" + ], + "STANDALONEMONTH": [ + "\u13a4\u13c3\u13b8\u13d4\u13c5", + "\u13a7\u13a6\u13b5", + "\u13a0\u13c5\u13f1", + "\u13a7\u13ec\u13c2", + "\u13a0\u13c2\u13cd\u13ac\u13d8", + "\u13d5\u13ad\u13b7\u13f1", + "\u13ab\u13f0\u13c9\u13c2", + "\u13a6\u13b6\u13c2", + "\u13da\u13b5\u13cd\u13d7", + "\u13da\u13c2\u13c5\u13d7", + "\u13c5\u13d3\u13d5\u13c6", + "\u13a5\u13cd\u13a9\u13f1" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "chr", + "localeID": "chr", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ckb-arab-iq.js b/1.6.6/i18n/angular-locale_ckb-arab-iq.js new file mode 100644 index 000000000..a9cd57cdb --- /dev/null +++ b/1.6.6/i18n/angular-locale_ckb-arab-iq.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0628.\u0646", + "\u062f.\u0646" + ], + "DAY": [ + "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5", + "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5", + "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5", + "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5", + "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5", + "\u06be\u06d5\u06cc\u0646\u06cc", + "\u0634\u06d5\u0645\u0645\u06d5" + ], + "ERANAMES": [ + "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u0646", + "\u0632\u0627\u06cc\u06cc\u0646\u06cc" + ], + "ERAS": [ + "\u067e.\u0646", + "\u0632" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "SHORTDAY": [ + "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5", + "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5", + "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5", + "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5", + "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5", + "\u06be\u06d5\u06cc\u0646\u06cc", + "\u0634\u06d5\u0645\u0645\u06d5" + ], + "SHORTMONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "STANDALONEMONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "d\u06cc MMMM\u06cc y", + "medium": "y MMM d h:mm:ss a", + "mediumDate": "y MMM d", + "mediumTime": "h:mm:ss a", + "short": "y-MM-dd h:mm a", + "shortDate": "y-MM-dd", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ckb-arab-iq", + "localeID": "ckb_Arab_IQ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ckb-arab-ir.js b/1.6.6/i18n/angular-locale_ckb-arab-ir.js new file mode 100644 index 000000000..e9c5daa6b --- /dev/null +++ b/1.6.6/i18n/angular-locale_ckb-arab-ir.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0628.\u0646", + "\u062f.\u0646" + ], + "DAY": [ + "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5", + "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5", + "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5", + "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5", + "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5", + "\u06be\u06d5\u06cc\u0646\u06cc", + "\u0634\u06d5\u0645\u0645\u06d5" + ], + "ERANAMES": [ + "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u0646", + "\u0632\u0627\u06cc\u06cc\u0646\u06cc" + ], + "ERAS": [ + "\u067e.\u0646", + "\u0632" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "SHORTDAY": [ + "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5", + "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5", + "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5", + "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5", + "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5", + "\u06be\u06d5\u06cc\u0646\u06cc", + "\u0634\u06d5\u0645\u0645\u06d5" + ], + "SHORTMONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "STANDALONEMONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "d\u06cc MMMM\u06cc y", + "medium": "y MMM d h:mm:ss a", + "mediumDate": "y MMM d", + "mediumTime": "h:mm:ss a", + "short": "y-MM-dd h:mm a", + "shortDate": "y-MM-dd", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rial", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ckb-arab-ir", + "localeID": "ckb_Arab_IR", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ckb-arab.js b/1.6.6/i18n/angular-locale_ckb-arab.js new file mode 100644 index 000000000..0cba746ee --- /dev/null +++ b/1.6.6/i18n/angular-locale_ckb-arab.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0628.\u0646", + "\u062f.\u0646" + ], + "DAY": [ + "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5", + "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5", + "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5", + "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5", + "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5", + "\u06be\u06d5\u06cc\u0646\u06cc", + "\u0634\u06d5\u0645\u0645\u06d5" + ], + "ERANAMES": [ + "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u0646", + "\u0632\u0627\u06cc\u06cc\u0646\u06cc" + ], + "ERAS": [ + "\u067e.\u0646", + "\u0632" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "SHORTDAY": [ + "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5", + "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5", + "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5", + "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5", + "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5", + "\u06be\u06d5\u06cc\u0646\u06cc", + "\u0634\u06d5\u0645\u0645\u06d5" + ], + "SHORTMONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "STANDALONEMONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "d\u06cc MMMM\u06cc y", + "medium": "y MMM d h:mm:ss a", + "mediumDate": "y MMM d", + "mediumTime": "h:mm:ss a", + "short": "y-MM-dd h:mm a", + "shortDate": "y-MM-dd", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ckb-arab", + "localeID": "ckb_Arab", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ckb-iq.js b/1.6.6/i18n/angular-locale_ckb-iq.js new file mode 100644 index 000000000..0a13c81d0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ckb-iq.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0628.\u0646", + "\u062f.\u0646" + ], + "DAY": [ + "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5", + "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5", + "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5", + "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5", + "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5", + "\u06be\u06d5\u06cc\u0646\u06cc", + "\u0634\u06d5\u0645\u0645\u06d5" + ], + "ERANAMES": [ + "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u0646", + "\u0632\u0627\u06cc\u06cc\u0646\u06cc" + ], + "ERAS": [ + "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u0646", + "\u0632\u0627\u06cc\u06cc\u0646\u06cc" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "SHORTDAY": [ + "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5", + "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5", + "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5", + "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5", + "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5", + "\u06be\u06d5\u06cc\u0646\u06cc", + "\u0634\u06d5\u0645\u0645\u06d5" + ], + "SHORTMONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "STANDALONEMONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "d\u06cc MMMM\u06cc y", + "medium": "y MMM d h:mm:ss a", + "mediumDate": "y MMM d", + "mediumTime": "h:mm:ss a", + "short": "y-MM-dd h:mm a", + "shortDate": "y-MM-dd", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ckb-iq", + "localeID": "ckb_IQ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ckb-ir.js b/1.6.6/i18n/angular-locale_ckb-ir.js new file mode 100644 index 000000000..a6c2a7507 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ckb-ir.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0628.\u0646", + "\u062f.\u0646" + ], + "DAY": [ + "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5", + "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5", + "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5", + "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5", + "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5", + "\u06be\u06d5\u06cc\u0646\u06cc", + "\u0634\u06d5\u0645\u0645\u06d5" + ], + "ERANAMES": [ + "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u0646", + "\u0632\u0627\u06cc\u06cc\u0646\u06cc" + ], + "ERAS": [ + "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u0646", + "\u0632\u0627\u06cc\u06cc\u0646\u06cc" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "SHORTDAY": [ + "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5", + "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5", + "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5", + "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5", + "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5", + "\u06be\u06d5\u06cc\u0646\u06cc", + "\u0634\u06d5\u0645\u0645\u06d5" + ], + "SHORTMONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "STANDALONEMONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "WEEKENDRANGE": [ + 4, + 4 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "d\u06cc MMMM\u06cc y", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rial", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ckb-ir", + "localeID": "ckb_IR", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ckb-latn-iq.js b/1.6.6/i18n/angular-locale_ckb-latn-iq.js new file mode 100644 index 000000000..a938c0c6d --- /dev/null +++ b/1.6.6/i18n/angular-locale_ckb-latn-iq.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0628.\u0646", + "\u062f.\u0646" + ], + "DAY": [ + "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5", + "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5", + "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5", + "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5", + "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5", + "\u06be\u06d5\u06cc\u0646\u06cc", + "\u0634\u06d5\u0645\u0645\u06d5" + ], + "ERANAMES": [ + "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u0646", + "\u0632\u0627\u06cc\u06cc\u0646\u06cc" + ], + "ERAS": [ + "\u067e.\u0646", + "\u0632" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "SHORTDAY": [ + "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5", + "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5", + "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5", + "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5", + "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5", + "\u06be\u06d5\u06cc\u0646\u06cc", + "\u0634\u06d5\u0645\u0645\u06d5" + ], + "SHORTMONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "STANDALONEMONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "d\u06cc MMMM\u06cc y", + "medium": "y MMM d h:mm:ss a", + "mediumDate": "y MMM d", + "mediumTime": "h:mm:ss a", + "short": "y-MM-dd h:mm a", + "shortDate": "y-MM-dd", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ckb-latn-iq", + "localeID": "ckb_Latn_IQ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ckb-latn.js b/1.6.6/i18n/angular-locale_ckb-latn.js new file mode 100644 index 000000000..5fdbb67c1 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ckb-latn.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0628.\u0646", + "\u062f.\u0646" + ], + "DAY": [ + "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5", + "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5", + "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5", + "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5", + "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5", + "\u06be\u06d5\u06cc\u0646\u06cc", + "\u0634\u06d5\u0645\u0645\u06d5" + ], + "ERANAMES": [ + "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u0646", + "\u0632\u0627\u06cc\u06cc\u0646\u06cc" + ], + "ERAS": [ + "\u067e.\u0646", + "\u0632" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "SHORTDAY": [ + "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5", + "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5", + "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5", + "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5", + "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5", + "\u06be\u06d5\u06cc\u0646\u06cc", + "\u0634\u06d5\u0645\u0645\u06d5" + ], + "SHORTMONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "STANDALONEMONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "d\u06cc MMMM\u06cc y", + "medium": "y MMM d h:mm:ss a", + "mediumDate": "y MMM d", + "mediumTime": "h:mm:ss a", + "short": "y-MM-dd h:mm a", + "shortDate": "y-MM-dd", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ckb-latn", + "localeID": "ckb_Latn", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ckb.js b/1.6.6/i18n/angular-locale_ckb.js new file mode 100644 index 000000000..45e7e97ff --- /dev/null +++ b/1.6.6/i18n/angular-locale_ckb.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0628.\u0646", + "\u062f.\u0646" + ], + "DAY": [ + "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5", + "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5", + "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5", + "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5", + "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5", + "\u06be\u06d5\u06cc\u0646\u06cc", + "\u0634\u06d5\u0645\u0645\u06d5" + ], + "ERANAMES": [ + "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u0646", + "\u0632\u0627\u06cc\u06cc\u0646\u06cc" + ], + "ERAS": [ + "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u0646", + "\u0632\u0627\u06cc\u06cc\u0646\u06cc" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "SHORTDAY": [ + "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5", + "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5", + "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5", + "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5", + "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5", + "\u06be\u06d5\u06cc\u0646\u06cc", + "\u0634\u06d5\u0645\u0645\u06d5" + ], + "SHORTMONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "STANDALONEMONTH": [ + "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u0634\u0648\u0628\u0627\u062a", + "\u0626\u0627\u0632\u0627\u0631", + "\u0646\u06cc\u0633\u0627\u0646", + "\u0626\u0627\u06cc\u0627\u0631", + "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646", + "\u062a\u06d5\u0645\u0648\u0648\u0632", + "\u0626\u0627\u0628", + "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645", + "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645", + "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "d\u06cc MMMM\u06cc y", + "medium": "y MMM d h:mm:ss a", + "mediumDate": "y MMM d", + "mediumTime": "h:mm:ss a", + "short": "y-MM-dd h:mm a", + "shortDate": "y-MM-dd", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ckb", + "localeID": "ckb", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_cs-cz.js b/1.6.6/i18n/angular-locale_cs-cz.js new file mode 100644 index 000000000..11b9fe20c --- /dev/null +++ b/1.6.6/i18n/angular-locale_cs-cz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "dop.", + "odp." + ], + "DAY": [ + "ned\u011ble", + "pond\u011bl\u00ed", + "\u00fater\u00fd", + "st\u0159eda", + "\u010dtvrtek", + "p\u00e1tek", + "sobota" + ], + "ERANAMES": [ + "p\u0159. n. l.", + "n. l." + ], + "ERAS": [ + "p\u0159. n. l.", + "n. l." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "ledna", + "\u00fanora", + "b\u0159ezna", + "dubna", + "kv\u011btna", + "\u010dervna", + "\u010dervence", + "srpna", + "z\u00e1\u0159\u00ed", + "\u0159\u00edjna", + "listopadu", + "prosince" + ], + "SHORTDAY": [ + "ne", + "po", + "\u00fat", + "st", + "\u010dt", + "p\u00e1", + "so" + ], + "SHORTMONTH": [ + "led", + "\u00fano", + "b\u0159e", + "dub", + "kv\u011b", + "\u010dvn", + "\u010dvc", + "srp", + "z\u00e1\u0159", + "\u0159\u00edj", + "lis", + "pro" + ], + "STANDALONEMONTH": [ + "leden", + "\u00fanor", + "b\u0159ezen", + "duben", + "kv\u011bten", + "\u010derven", + "\u010dervenec", + "srpen", + "z\u00e1\u0159\u00ed", + "\u0159\u00edjen", + "listopad", + "prosinec" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. M. y H:mm:ss", + "mediumDate": "d. M. y", + "mediumTime": "H:mm:ss", + "short": "dd.MM.yy H:mm", + "shortDate": "dd.MM.yy", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "K\u010d", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "cs-cz", + "localeID": "cs_CZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (i >= 2 && i <= 4 && vf.v == 0) { return PLURAL_CATEGORY.FEW; } if (vf.v != 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_cs.js b/1.6.6/i18n/angular-locale_cs.js new file mode 100644 index 000000000..62fa2f7bb --- /dev/null +++ b/1.6.6/i18n/angular-locale_cs.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "dop.", + "odp." + ], + "DAY": [ + "ned\u011ble", + "pond\u011bl\u00ed", + "\u00fater\u00fd", + "st\u0159eda", + "\u010dtvrtek", + "p\u00e1tek", + "sobota" + ], + "ERANAMES": [ + "p\u0159. n. l.", + "n. l." + ], + "ERAS": [ + "p\u0159. n. l.", + "n. l." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "ledna", + "\u00fanora", + "b\u0159ezna", + "dubna", + "kv\u011btna", + "\u010dervna", + "\u010dervence", + "srpna", + "z\u00e1\u0159\u00ed", + "\u0159\u00edjna", + "listopadu", + "prosince" + ], + "SHORTDAY": [ + "ne", + "po", + "\u00fat", + "st", + "\u010dt", + "p\u00e1", + "so" + ], + "SHORTMONTH": [ + "led", + "\u00fano", + "b\u0159e", + "dub", + "kv\u011b", + "\u010dvn", + "\u010dvc", + "srp", + "z\u00e1\u0159", + "\u0159\u00edj", + "lis", + "pro" + ], + "STANDALONEMONTH": [ + "leden", + "\u00fanor", + "b\u0159ezen", + "duben", + "kv\u011bten", + "\u010derven", + "\u010dervenec", + "srpen", + "z\u00e1\u0159\u00ed", + "\u0159\u00edjen", + "listopad", + "prosinec" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. M. y H:mm:ss", + "mediumDate": "d. M. y", + "mediumTime": "H:mm:ss", + "short": "dd.MM.yy H:mm", + "shortDate": "dd.MM.yy", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "K\u010d", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "cs", + "localeID": "cs", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (i >= 2 && i <= 4 && vf.v == 0) { return PLURAL_CATEGORY.FEW; } if (vf.v != 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_cu-ru.js b/1.6.6/i18n/angular-locale_cu-ru.js new file mode 100644 index 000000000..e8a005acb --- /dev/null +++ b/1.6.6/i18n/angular-locale_cu-ru.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0414\u041f", + "\u041f\u041f" + ], + "DAY": [ + "\u043d\u0435\u0434\u0463\u0301\u043b\u0467", + "\u043f\u043e\u043d\u0435\u0434\u0463\u0301\u043b\u044c\u043d\u0438\u043a\u044a", + "\u0432\u0442\u043e\u0301\u0440\u043d\u0438\u043a\u044a", + "\u0441\u0440\u0435\u0434\u0430\u0300", + "\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0301\u043a\u044a", + "\u043f\u0467\u0442\u043e\u0301\u043a\u044a", + "\u0441\ua64b\u0431\u0431\u0461\u0301\u0442\u0430" + ], + "ERANAMES": [ + "\u043f\u0440\u0435\u0301\u0434\u044a \u0440.\u00a0\u0445.", + "\u043f\u043e \u0440.\u00a0\u0445." + ], + "ERAS": [ + "\u043f\u0440\u0435\u0301\u0434\u044a \u0440.\u00a0\u0445.", + "\u043f\u043e \u0440.\u00a0\u0445." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0456\u0486\u0430\u043d\u043d\ua64b\u0430\u0301\u0440\u0457\u0430", + "\u0444\u0435\u0432\u0440\ua64b\u0430\u0301\u0440\u0457\u0430", + "\u043c\u0430\u0301\u0440\u0442\u0430", + "\u0430\u0486\u043f\u0440\u0456\u0301\u043b\u043b\u0457\u0430", + "\u043c\u0430\u0301\u0457\u0430", + "\u0456\u0486\ua64b\u0301\u043d\u0457\u0430", + "\u0456\u0486\ua64b\u0301\u043b\u0457\u0430", + "\u0430\u0486\u0301\u0475\u0433\ua64b\u0441\u0442\u0430", + "\u0441\u0435\u043f\u0442\u0435\u0301\u043c\u0432\u0440\u0457\u0430", + "\u047b\u0486\u043a\u0442\u0461\u0301\u0432\u0440\u0457\u0430", + "\u043d\u043e\u0435\u0301\u043c\u0432\u0440\u0457\u0430", + "\u0434\u0435\u043a\u0435\u0301\u043c\u0432\u0440\u0457\u0430" + ], + "SHORTDAY": [ + "\u043d\u0434\u2de7\u0487\u0467", + "\u043f\u043d\u2de3\u0435", + "\u0432\u0442\u043e\u2dec\u0487", + "\u0441\u0440\u2de3\u0435", + "\u0447\u0435\u2de6\u0487", + "\u043f\u0467\u2de6\u0487", + "\u0441\ua64b\u2de0\u0487" + ], + "SHORTMONTH": [ + "\u0456\u0486\u0430\u2de9\u0487", + "\u0444\u0435\u2de1\u0487", + "\u043c\u0430\u2dec\u0487", + "\u0430\u0486\u043f\u2dec\u0487", + "\u043c\u0430\ua675", + "\u0456\u0486\ua64b\u2de9\u0487", + "\u0456\u0486\ua64b\u2de7\u0487", + "\u0430\u0486\u0301\u0475\u2de2\u0487", + "\u0441\u0435\u2deb\u0487", + "\u047b\u0486\u043a\u2dee", + "\u043d\u043e\u0435\u2de8", + "\u0434\u0435\u2de6\u0487" + ], + "STANDALONEMONTH": [ + "\u0456\u0486\u0430\u043d\u043d\ua64b\u0430\u0301\u0440\u0457\u0439", + "\u0444\u0435\u0432\u0440\ua64b\u0430\u0301\u0440\u0457\u0439", + "\u043c\u0430\u0301\u0440\u0442\u044a", + "\u0430\u0486\u043f\u0440\u0456\u0301\u043b\u043b\u0457\u0439", + "\u043c\u0430\u0301\u0457\u0439", + "\u0456\u0486\ua64b\u0301\u043d\u0457\u0439", + "\u0456\u0486\ua64b\u0301\u043b\u0457\u0439", + "\u0430\u0486\u0301\u0475\u0433\ua64b\u0441\u0442\u044a", + "\u0441\u0435\u043f\u0442\u0435\u0301\u043c\u0432\u0440\u0457\u0439", + "\u047b\u0486\u043a\u0442\u0461\u0301\u0432\u0440\u0457\u0439", + "\u043d\u043e\u0435\u0301\u043c\u0432\u0440\u0457\u0439", + "\u0434\u0435\u043a\u0435\u0301\u043c\u0432\u0440\u0457\u0439" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM '\u043b'. y.", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y.MM.dd HH:mm", + "shortDate": "y.MM.dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20bd", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "cu-ru", + "localeID": "cu_RU", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_cu.js b/1.6.6/i18n/angular-locale_cu.js new file mode 100644 index 000000000..5b077d9ce --- /dev/null +++ b/1.6.6/i18n/angular-locale_cu.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0414\u041f", + "\u041f\u041f" + ], + "DAY": [ + "\u043d\u0435\u0434\u0463\u0301\u043b\u0467", + "\u043f\u043e\u043d\u0435\u0434\u0463\u0301\u043b\u044c\u043d\u0438\u043a\u044a", + "\u0432\u0442\u043e\u0301\u0440\u043d\u0438\u043a\u044a", + "\u0441\u0440\u0435\u0434\u0430\u0300", + "\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0301\u043a\u044a", + "\u043f\u0467\u0442\u043e\u0301\u043a\u044a", + "\u0441\ua64b\u0431\u0431\u0461\u0301\u0442\u0430" + ], + "ERANAMES": [ + "\u043f\u0440\u0435\u0301\u0434\u044a \u0440.\u00a0\u0445.", + "\u043f\u043e \u0440.\u00a0\u0445." + ], + "ERAS": [ + "\u043f\u0440\u0435\u0301\u0434\u044a \u0440.\u00a0\u0445.", + "\u043f\u043e \u0440.\u00a0\u0445." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0456\u0486\u0430\u043d\u043d\ua64b\u0430\u0301\u0440\u0457\u0430", + "\u0444\u0435\u0432\u0440\ua64b\u0430\u0301\u0440\u0457\u0430", + "\u043c\u0430\u0301\u0440\u0442\u0430", + "\u0430\u0486\u043f\u0440\u0456\u0301\u043b\u043b\u0457\u0430", + "\u043c\u0430\u0301\u0457\u0430", + "\u0456\u0486\ua64b\u0301\u043d\u0457\u0430", + "\u0456\u0486\ua64b\u0301\u043b\u0457\u0430", + "\u0430\u0486\u0301\u0475\u0433\ua64b\u0441\u0442\u0430", + "\u0441\u0435\u043f\u0442\u0435\u0301\u043c\u0432\u0440\u0457\u0430", + "\u047b\u0486\u043a\u0442\u0461\u0301\u0432\u0440\u0457\u0430", + "\u043d\u043e\u0435\u0301\u043c\u0432\u0440\u0457\u0430", + "\u0434\u0435\u043a\u0435\u0301\u043c\u0432\u0440\u0457\u0430" + ], + "SHORTDAY": [ + "\u043d\u0434\u2de7\u0487\u0467", + "\u043f\u043d\u2de3\u0435", + "\u0432\u0442\u043e\u2dec\u0487", + "\u0441\u0440\u2de3\u0435", + "\u0447\u0435\u2de6\u0487", + "\u043f\u0467\u2de6\u0487", + "\u0441\ua64b\u2de0\u0487" + ], + "SHORTMONTH": [ + "\u0456\u0486\u0430\u2de9\u0487", + "\u0444\u0435\u2de1\u0487", + "\u043c\u0430\u2dec\u0487", + "\u0430\u0486\u043f\u2dec\u0487", + "\u043c\u0430\ua675", + "\u0456\u0486\ua64b\u2de9\u0487", + "\u0456\u0486\ua64b\u2de7\u0487", + "\u0430\u0486\u0301\u0475\u2de2\u0487", + "\u0441\u0435\u2deb\u0487", + "\u047b\u0486\u043a\u2dee", + "\u043d\u043e\u0435\u2de8", + "\u0434\u0435\u2de6\u0487" + ], + "STANDALONEMONTH": [ + "\u0456\u0486\u0430\u043d\u043d\ua64b\u0430\u0301\u0440\u0457\u0439", + "\u0444\u0435\u0432\u0440\ua64b\u0430\u0301\u0440\u0457\u0439", + "\u043c\u0430\u0301\u0440\u0442\u044a", + "\u0430\u0486\u043f\u0440\u0456\u0301\u043b\u043b\u0457\u0439", + "\u043c\u0430\u0301\u0457\u0439", + "\u0456\u0486\ua64b\u0301\u043d\u0457\u0439", + "\u0456\u0486\ua64b\u0301\u043b\u0457\u0439", + "\u0430\u0486\u0301\u0475\u0433\ua64b\u0441\u0442\u044a", + "\u0441\u0435\u043f\u0442\u0435\u0301\u043c\u0432\u0440\u0457\u0439", + "\u047b\u0486\u043a\u0442\u0461\u0301\u0432\u0440\u0457\u0439", + "\u043d\u043e\u0435\u0301\u043c\u0432\u0440\u0457\u0439", + "\u0434\u0435\u043a\u0435\u0301\u043c\u0432\u0440\u0457\u0439" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM '\u043b'. y.", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y.MM.dd HH:mm", + "shortDate": "y.MM.dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20bd", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "cu", + "localeID": "cu", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_cy-gb.js b/1.6.6/i18n/angular-locale_cy-gb.js new file mode 100644 index 000000000..063709995 --- /dev/null +++ b/1.6.6/i18n/angular-locale_cy-gb.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "yb", + "yh" + ], + "DAY": [ + "Dydd Sul", + "Dydd Llun", + "Dydd Mawrth", + "Dydd Mercher", + "Dydd Iau", + "Dydd Gwener", + "Dydd Sadwrn" + ], + "ERANAMES": [ + "Cyn Crist", + "Oed Crist" + ], + "ERAS": [ + "CC", + "OC" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Ionawr", + "Chwefror", + "Mawrth", + "Ebrill", + "Mai", + "Mehefin", + "Gorffennaf", + "Awst", + "Medi", + "Hydref", + "Tachwedd", + "Rhagfyr" + ], + "SHORTDAY": [ + "Sul", + "Llun", + "Maw", + "Mer", + "Iau", + "Gwen", + "Sad" + ], + "SHORTMONTH": [ + "Ion", + "Chwef", + "Maw", + "Ebrill", + "Mai", + "Meh", + "Gorff", + "Awst", + "Medi", + "Hyd", + "Tach", + "Rhag" + ], + "STANDALONEMONTH": [ + "Ionawr", + "Chwefror", + "Mawrth", + "Ebrill", + "Mai", + "Mehefin", + "Gorffennaf", + "Awst", + "Medi", + "Hydref", + "Tachwedd", + "Rhagfyr" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "cy-gb", + "localeID": "cy_GB", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n == 3) { return PLURAL_CATEGORY.FEW; } if (n == 6) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_cy.js b/1.6.6/i18n/angular-locale_cy.js new file mode 100644 index 000000000..02cfcb404 --- /dev/null +++ b/1.6.6/i18n/angular-locale_cy.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "yb", + "yh" + ], + "DAY": [ + "Dydd Sul", + "Dydd Llun", + "Dydd Mawrth", + "Dydd Mercher", + "Dydd Iau", + "Dydd Gwener", + "Dydd Sadwrn" + ], + "ERANAMES": [ + "Cyn Crist", + "Oed Crist" + ], + "ERAS": [ + "CC", + "OC" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Ionawr", + "Chwefror", + "Mawrth", + "Ebrill", + "Mai", + "Mehefin", + "Gorffennaf", + "Awst", + "Medi", + "Hydref", + "Tachwedd", + "Rhagfyr" + ], + "SHORTDAY": [ + "Sul", + "Llun", + "Maw", + "Mer", + "Iau", + "Gwen", + "Sad" + ], + "SHORTMONTH": [ + "Ion", + "Chwef", + "Maw", + "Ebrill", + "Mai", + "Meh", + "Gorff", + "Awst", + "Medi", + "Hyd", + "Tach", + "Rhag" + ], + "STANDALONEMONTH": [ + "Ionawr", + "Chwefror", + "Mawrth", + "Ebrill", + "Mai", + "Mehefin", + "Gorffennaf", + "Awst", + "Medi", + "Hydref", + "Tachwedd", + "Rhagfyr" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "cy", + "localeID": "cy", + "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n == 3) { return PLURAL_CATEGORY.FEW; } if (n == 6) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_da-dk.js b/1.6.6/i18n/angular-locale_da-dk.js new file mode 100644 index 000000000..9955cdbe5 --- /dev/null +++ b/1.6.6/i18n/angular-locale_da-dk.js @@ -0,0 +1,156 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +function getWT(v, f) { + if (f === 0) { + return {w: 0, t: 0}; + } + + while ((f % 10) === 0) { + f /= 10; + v--; + } + + return {w: v, t: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "s\u00f8ndag", + "mandag", + "tirsdag", + "onsdag", + "torsdag", + "fredag", + "l\u00f8rdag" + ], + "ERANAMES": [ + "f.Kr.", + "e.Kr." + ], + "ERAS": [ + "f.Kr.", + "e.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "marts", + "april", + "maj", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "december" + ], + "SHORTDAY": [ + "s\u00f8n.", + "man.", + "tir.", + "ons.", + "tor.", + "fre.", + "l\u00f8r." + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mar.", + "apr.", + "maj", + "jun.", + "jul.", + "aug.", + "sep.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "marts", + "april", + "maj", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE 'den' d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. MMM y HH.mm.ss", + "mediumDate": "d. MMM y", + "mediumTime": "HH.mm.ss", + "short": "dd/MM/y HH.mm", + "shortDate": "dd/MM/y", + "shortTime": "HH.mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr.", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "da-dk", + "localeID": "da_DK", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); var wt = getWT(vf.v, vf.f); if (n == 1 || wt.t != 0 && (i == 0 || i == 1)) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_da-gl.js b/1.6.6/i18n/angular-locale_da-gl.js new file mode 100644 index 000000000..b3cf495c6 --- /dev/null +++ b/1.6.6/i18n/angular-locale_da-gl.js @@ -0,0 +1,156 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +function getWT(v, f) { + if (f === 0) { + return {w: 0, t: 0}; + } + + while ((f % 10) === 0) { + f /= 10; + v--; + } + + return {w: v, t: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "s\u00f8ndag", + "mandag", + "tirsdag", + "onsdag", + "torsdag", + "fredag", + "l\u00f8rdag" + ], + "ERANAMES": [ + "f.Kr.", + "e.Kr." + ], + "ERAS": [ + "f.Kr.", + "e.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "marts", + "april", + "maj", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "december" + ], + "SHORTDAY": [ + "s\u00f8n.", + "man.", + "tir.", + "ons.", + "tor.", + "fre.", + "l\u00f8r." + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mar.", + "apr.", + "maj", + "jun.", + "jul.", + "aug.", + "sep.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "marts", + "april", + "maj", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE 'den' d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. MMM y h.mm.ss a", + "mediumDate": "d. MMM y", + "mediumTime": "h.mm.ss a", + "short": "dd/MM/y h.mm a", + "shortDate": "dd/MM/y", + "shortTime": "h.mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr.", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "da-gl", + "localeID": "da_GL", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); var wt = getWT(vf.v, vf.f); if (n == 1 || wt.t != 0 && (i == 0 || i == 1)) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_da.js b/1.6.6/i18n/angular-locale_da.js new file mode 100644 index 000000000..53b0d61a8 --- /dev/null +++ b/1.6.6/i18n/angular-locale_da.js @@ -0,0 +1,156 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +function getWT(v, f) { + if (f === 0) { + return {w: 0, t: 0}; + } + + while ((f % 10) === 0) { + f /= 10; + v--; + } + + return {w: v, t: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "s\u00f8ndag", + "mandag", + "tirsdag", + "onsdag", + "torsdag", + "fredag", + "l\u00f8rdag" + ], + "ERANAMES": [ + "f.Kr.", + "e.Kr." + ], + "ERAS": [ + "f.Kr.", + "e.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "marts", + "april", + "maj", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "december" + ], + "SHORTDAY": [ + "s\u00f8n.", + "man.", + "tir.", + "ons.", + "tor.", + "fre.", + "l\u00f8r." + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mar.", + "apr.", + "maj", + "jun.", + "jul.", + "aug.", + "sep.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "marts", + "april", + "maj", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE 'den' d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. MMM y HH.mm.ss", + "mediumDate": "d. MMM y", + "mediumTime": "HH.mm.ss", + "short": "dd/MM/y HH.mm", + "shortDate": "dd/MM/y", + "shortTime": "HH.mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr.", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "da", + "localeID": "da", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); var wt = getWT(vf.v, vf.f); if (n == 1 || wt.t != 0 && (i == 0 || i == 1)) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_dav-ke.js b/1.6.6/i18n/angular-locale_dav-ke.js new file mode 100644 index 000000000..1f60af56a --- /dev/null +++ b/1.6.6/i18n/angular-locale_dav-ke.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Luma lwa K", + "luma lwa p" + ], + "DAY": [ + "Ituku ja jumwa", + "Kuramuka jimweri", + "Kuramuka kawi", + "Kuramuka kadadu", + "Kuramuka kana", + "Kuramuka kasanu", + "Kifula nguwo" + ], + "ERANAMES": [ + "Kabla ya Kristo", + "Baada ya Kristo" + ], + "ERAS": [ + "KK", + "BK" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Mori ghwa imbiri", + "Mori ghwa kawi", + "Mori ghwa kadadu", + "Mori ghwa kana", + "Mori ghwa kasanu", + "Mori ghwa karandadu", + "Mori ghwa mfungade", + "Mori ghwa wunyanya", + "Mori ghwa ikenda", + "Mori ghwa ikumi", + "Mori ghwa ikumi na imweri", + "Mori ghwa ikumi na iwi" + ], + "SHORTDAY": [ + "Jum", + "Jim", + "Kaw", + "Kad", + "Kan", + "Kas", + "Ngu" + ], + "SHORTMONTH": [ + "Imb", + "Kaw", + "Kad", + "Kan", + "Kas", + "Kar", + "Mfu", + "Wun", + "Ike", + "Iku", + "Imw", + "Iwi" + ], + "STANDALONEMONTH": [ + "Mori ghwa imbiri", + "Mori ghwa kawi", + "Mori ghwa kadadu", + "Mori ghwa kana", + "Mori ghwa kasanu", + "Mori ghwa karandadu", + "Mori ghwa mfungade", + "Mori ghwa wunyanya", + "Mori ghwa ikenda", + "Mori ghwa ikumi", + "Mori ghwa ikumi na imweri", + "Mori ghwa ikumi na iwi" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "dav-ke", + "localeID": "dav_KE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_dav.js b/1.6.6/i18n/angular-locale_dav.js new file mode 100644 index 000000000..1c655a479 --- /dev/null +++ b/1.6.6/i18n/angular-locale_dav.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Luma lwa K", + "luma lwa p" + ], + "DAY": [ + "Ituku ja jumwa", + "Kuramuka jimweri", + "Kuramuka kawi", + "Kuramuka kadadu", + "Kuramuka kana", + "Kuramuka kasanu", + "Kifula nguwo" + ], + "ERANAMES": [ + "Kabla ya Kristo", + "Baada ya Kristo" + ], + "ERAS": [ + "KK", + "BK" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Mori ghwa imbiri", + "Mori ghwa kawi", + "Mori ghwa kadadu", + "Mori ghwa kana", + "Mori ghwa kasanu", + "Mori ghwa karandadu", + "Mori ghwa mfungade", + "Mori ghwa wunyanya", + "Mori ghwa ikenda", + "Mori ghwa ikumi", + "Mori ghwa ikumi na imweri", + "Mori ghwa ikumi na iwi" + ], + "SHORTDAY": [ + "Jum", + "Jim", + "Kaw", + "Kad", + "Kan", + "Kas", + "Ngu" + ], + "SHORTMONTH": [ + "Imb", + "Kaw", + "Kad", + "Kan", + "Kas", + "Kar", + "Mfu", + "Wun", + "Ike", + "Iku", + "Imw", + "Iwi" + ], + "STANDALONEMONTH": [ + "Mori ghwa imbiri", + "Mori ghwa kawi", + "Mori ghwa kadadu", + "Mori ghwa kana", + "Mori ghwa kasanu", + "Mori ghwa karandadu", + "Mori ghwa mfungade", + "Mori ghwa wunyanya", + "Mori ghwa ikenda", + "Mori ghwa ikumi", + "Mori ghwa ikumi na imweri", + "Mori ghwa ikumi na iwi" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "dav", + "localeID": "dav", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_de-at.js b/1.6.6/i18n/angular-locale_de-at.js new file mode 100644 index 000000000..d56715118 --- /dev/null +++ b/1.6.6/i18n/angular-locale_de-at.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "vorm.", + "nachm." + ], + "DAY": [ + "Sonntag", + "Montag", + "Dienstag", + "Mittwoch", + "Donnerstag", + "Freitag", + "Samstag" + ], + "ERANAMES": [ + "v. Chr.", + "n. Chr." + ], + "ERAS": [ + "v. Chr.", + "n. Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "J\u00e4nner", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "SHORTDAY": [ + "So.", + "Mo.", + "Di.", + "Mi.", + "Do.", + "Fr.", + "Sa." + ], + "SHORTMONTH": [ + "J\u00e4n.", + "Feb.", + "M\u00e4rz", + "Apr.", + "Mai", + "Juni", + "Juli", + "Aug.", + "Sep.", + "Okt.", + "Nov.", + "Dez." + ], + "STANDALONEMONTH": [ + "J\u00e4nner", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "dd.MM.y HH:mm:ss", + "mediumDate": "dd.MM.y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "de-at", + "localeID": "de_AT", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_de-be.js b/1.6.6/i18n/angular-locale_de-be.js new file mode 100644 index 000000000..0b519bd0c --- /dev/null +++ b/1.6.6/i18n/angular-locale_de-be.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "vorm.", + "nachm." + ], + "DAY": [ + "Sonntag", + "Montag", + "Dienstag", + "Mittwoch", + "Donnerstag", + "Freitag", + "Samstag" + ], + "ERANAMES": [ + "v. Chr.", + "n. Chr." + ], + "ERAS": [ + "v. Chr.", + "n. Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "SHORTDAY": [ + "So.", + "Mo.", + "Di.", + "Mi.", + "Do.", + "Fr.", + "Sa." + ], + "SHORTMONTH": [ + "Jan.", + "Feb.", + "M\u00e4rz", + "Apr.", + "Mai", + "Juni", + "Juli", + "Aug.", + "Sep.", + "Okt.", + "Nov.", + "Dez." + ], + "STANDALONEMONTH": [ + "Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "dd.MM.y HH:mm:ss", + "mediumDate": "dd.MM.y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "de-be", + "localeID": "de_BE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_de-ch.js b/1.6.6/i18n/angular-locale_de-ch.js new file mode 100644 index 000000000..02228f528 --- /dev/null +++ b/1.6.6/i18n/angular-locale_de-ch.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "vorm.", + "nachm." + ], + "DAY": [ + "Sonntag", + "Montag", + "Dienstag", + "Mittwoch", + "Donnerstag", + "Freitag", + "Samstag" + ], + "ERANAMES": [ + "v. Chr.", + "n. Chr." + ], + "ERAS": [ + "v. Chr.", + "n. Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "SHORTDAY": [ + "So.", + "Mo.", + "Di.", + "Mi.", + "Do.", + "Fr.", + "Sa." + ], + "SHORTMONTH": [ + "Jan.", + "Feb.", + "M\u00e4rz", + "Apr.", + "Mai", + "Juni", + "Juli", + "Aug.", + "Sep.", + "Okt.", + "Nov.", + "Dez." + ], + "STANDALONEMONTH": [ + "Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "dd.MM.y HH:mm:ss", + "mediumDate": "dd.MM.y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CHF", + "DECIMAL_SEP": ".", + "GROUP_SEP": "\u2019", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u00a4-", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "de-ch", + "localeID": "de_CH", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_de-de.js b/1.6.6/i18n/angular-locale_de-de.js new file mode 100644 index 000000000..52273122b --- /dev/null +++ b/1.6.6/i18n/angular-locale_de-de.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "vorm.", + "nachm." + ], + "DAY": [ + "Sonntag", + "Montag", + "Dienstag", + "Mittwoch", + "Donnerstag", + "Freitag", + "Samstag" + ], + "ERANAMES": [ + "v. Chr.", + "n. Chr." + ], + "ERAS": [ + "v. Chr.", + "n. Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "SHORTDAY": [ + "So.", + "Mo.", + "Di.", + "Mi.", + "Do.", + "Fr.", + "Sa." + ], + "SHORTMONTH": [ + "Jan.", + "Feb.", + "M\u00e4rz", + "Apr.", + "Mai", + "Juni", + "Juli", + "Aug.", + "Sep.", + "Okt.", + "Nov.", + "Dez." + ], + "STANDALONEMONTH": [ + "Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "dd.MM.y HH:mm:ss", + "mediumDate": "dd.MM.y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "de-de", + "localeID": "de_DE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_de-it.js b/1.6.6/i18n/angular-locale_de-it.js new file mode 100644 index 000000000..f2bc9a828 --- /dev/null +++ b/1.6.6/i18n/angular-locale_de-it.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "vorm.", + "nachm." + ], + "DAY": [ + "Sonntag", + "Montag", + "Dienstag", + "Mittwoch", + "Donnerstag", + "Freitag", + "Samstag" + ], + "ERANAMES": [ + "v. Chr.", + "n. Chr." + ], + "ERAS": [ + "v. Chr.", + "n. Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "J\u00e4nner", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "SHORTDAY": [ + "So.", + "Mo.", + "Di.", + "Mi.", + "Do.", + "Fr.", + "Sa." + ], + "SHORTMONTH": [ + "J\u00e4n.", + "Feb.", + "M\u00e4rz", + "Apr.", + "Mai", + "Juni", + "Juli", + "Aug.", + "Sep.", + "Okt.", + "Nov.", + "Dez." + ], + "STANDALONEMONTH": [ + "J\u00e4nner", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "dd.MM.y HH:mm:ss", + "mediumDate": "dd.MM.y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "de-it", + "localeID": "de_IT", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_de-li.js b/1.6.6/i18n/angular-locale_de-li.js new file mode 100644 index 000000000..68df140c0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_de-li.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "vorm.", + "nachm." + ], + "DAY": [ + "Sonntag", + "Montag", + "Dienstag", + "Mittwoch", + "Donnerstag", + "Freitag", + "Samstag" + ], + "ERANAMES": [ + "v. Chr.", + "n. Chr." + ], + "ERAS": [ + "v. Chr.", + "n. Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "SHORTDAY": [ + "So.", + "Mo.", + "Di.", + "Mi.", + "Do.", + "Fr.", + "Sa." + ], + "SHORTMONTH": [ + "Jan.", + "Feb.", + "M\u00e4rz", + "Apr.", + "Mai", + "Juni", + "Juli", + "Aug.", + "Sep.", + "Okt.", + "Nov.", + "Dez." + ], + "STANDALONEMONTH": [ + "Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "dd.MM.y HH:mm:ss", + "mediumDate": "dd.MM.y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CHF", + "DECIMAL_SEP": ".", + "GROUP_SEP": "\u2019", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "de-li", + "localeID": "de_LI", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_de-lu.js b/1.6.6/i18n/angular-locale_de-lu.js new file mode 100644 index 000000000..2bca130fb --- /dev/null +++ b/1.6.6/i18n/angular-locale_de-lu.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "vorm.", + "nachm." + ], + "DAY": [ + "Sonntag", + "Montag", + "Dienstag", + "Mittwoch", + "Donnerstag", + "Freitag", + "Samstag" + ], + "ERANAMES": [ + "v. Chr.", + "n. Chr." + ], + "ERAS": [ + "v. Chr.", + "n. Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "SHORTDAY": [ + "So.", + "Mo.", + "Di.", + "Mi.", + "Do.", + "Fr.", + "Sa." + ], + "SHORTMONTH": [ + "Jan.", + "Feb.", + "M\u00e4rz", + "Apr.", + "Mai", + "Juni", + "Juli", + "Aug.", + "Sep.", + "Okt.", + "Nov.", + "Dez." + ], + "STANDALONEMONTH": [ + "Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "dd.MM.y HH:mm:ss", + "mediumDate": "dd.MM.y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "de-lu", + "localeID": "de_LU", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_de.js b/1.6.6/i18n/angular-locale_de.js new file mode 100644 index 000000000..cc69b3af5 --- /dev/null +++ b/1.6.6/i18n/angular-locale_de.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "vorm.", + "nachm." + ], + "DAY": [ + "Sonntag", + "Montag", + "Dienstag", + "Mittwoch", + "Donnerstag", + "Freitag", + "Samstag" + ], + "ERANAMES": [ + "v. Chr.", + "n. Chr." + ], + "ERAS": [ + "v. Chr.", + "n. Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "SHORTDAY": [ + "So.", + "Mo.", + "Di.", + "Mi.", + "Do.", + "Fr.", + "Sa." + ], + "SHORTMONTH": [ + "Jan.", + "Feb.", + "M\u00e4rz", + "Apr.", + "Mai", + "Juni", + "Juli", + "Aug.", + "Sep.", + "Okt.", + "Nov.", + "Dez." + ], + "STANDALONEMONTH": [ + "Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "dd.MM.y HH:mm:ss", + "mediumDate": "dd.MM.y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "de", + "localeID": "de", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_dje-ne.js b/1.6.6/i18n/angular-locale_dje-ne.js new file mode 100644 index 000000000..34f9320b4 --- /dev/null +++ b/1.6.6/i18n/angular-locale_dje-ne.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Subbaahi", + "Zaarikay b" + ], + "DAY": [ + "Alhadi", + "Atinni", + "Atalaata", + "Alarba", + "Alhamisi", + "Alzuma", + "Asibti" + ], + "ERANAMES": [ + "Isaa jine", + "Isaa zamanoo" + ], + "ERAS": [ + "IJ", + "IZ" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u017danwiye", + "Feewiriye", + "Marsi", + "Awiril", + "Me", + "\u017duwe\u014b", + "\u017duyye", + "Ut", + "Sektanbur", + "Oktoobur", + "Noowanbur", + "Deesanbur" + ], + "SHORTDAY": [ + "Alh", + "Ati", + "Ata", + "Ala", + "Alm", + "Alz", + "Asi" + ], + "SHORTMONTH": [ + "\u017dan", + "Fee", + "Mar", + "Awi", + "Me", + "\u017duw", + "\u017duy", + "Ut", + "Sek", + "Okt", + "Noo", + "Dee" + ], + "STANDALONEMONTH": [ + "\u017danwiye", + "Feewiriye", + "Marsi", + "Awiril", + "Me", + "\u017duwe\u014b", + "\u017duyye", + "Ut", + "Sektanbur", + "Oktoobur", + "Noowanbur", + "Deesanbur" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ".", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "dje-ne", + "localeID": "dje_NE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_dje.js b/1.6.6/i18n/angular-locale_dje.js new file mode 100644 index 000000000..6b1f12204 --- /dev/null +++ b/1.6.6/i18n/angular-locale_dje.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Subbaahi", + "Zaarikay b" + ], + "DAY": [ + "Alhadi", + "Atinni", + "Atalaata", + "Alarba", + "Alhamisi", + "Alzuma", + "Asibti" + ], + "ERANAMES": [ + "Isaa jine", + "Isaa zamanoo" + ], + "ERAS": [ + "IJ", + "IZ" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u017danwiye", + "Feewiriye", + "Marsi", + "Awiril", + "Me", + "\u017duwe\u014b", + "\u017duyye", + "Ut", + "Sektanbur", + "Oktoobur", + "Noowanbur", + "Deesanbur" + ], + "SHORTDAY": [ + "Alh", + "Ati", + "Ata", + "Ala", + "Alm", + "Alz", + "Asi" + ], + "SHORTMONTH": [ + "\u017dan", + "Fee", + "Mar", + "Awi", + "Me", + "\u017duw", + "\u017duy", + "Ut", + "Sek", + "Okt", + "Noo", + "Dee" + ], + "STANDALONEMONTH": [ + "\u017danwiye", + "Feewiriye", + "Marsi", + "Awiril", + "Me", + "\u017duwe\u014b", + "\u017duyye", + "Ut", + "Sektanbur", + "Oktoobur", + "Noowanbur", + "Deesanbur" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ".", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "dje", + "localeID": "dje", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_dsb-de.js b/1.6.6/i18n/angular-locale_dsb-de.js new file mode 100644 index 000000000..43e3c7e77 --- /dev/null +++ b/1.6.6/i18n/angular-locale_dsb-de.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "dopo\u0142dnja", + "w\u00f3tpo\u0142dnja" + ], + "DAY": [ + "nje\u017aela", + "p\u00f3nje\u017aele", + "wa\u0142tora", + "srjoda", + "stw\u00f3rtk", + "p\u011btk", + "sobota" + ], + "ERANAMES": [ + "p\u015bed Kristusowym naro\u017aenim", + "p\u00f3 Kristusowem naro\u017aenju" + ], + "ERAS": [ + "p\u015b.Chr.n.", + "p\u00f3 Chr.n." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januara", + "februara", + "m\u011brca", + "apryla", + "maja", + "junija", + "julija", + "awgusta", + "septembra", + "oktobra", + "nowembra", + "decembra" + ], + "SHORTDAY": [ + "nje", + "p\u00f3n", + "wa\u0142", + "srj", + "stw", + "p\u011bt", + "sob" + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "m\u011br.", + "apr.", + "maj.", + "jun.", + "jul.", + "awg.", + "sep.", + "okt.", + "now.", + "dec." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "m\u011brc", + "apryl", + "maj", + "junij", + "julij", + "awgust", + "september", + "oktober", + "nowember", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d.M.y H:mm:ss", + "mediumDate": "d.M.y", + "mediumTime": "H:mm:ss", + "short": "d.M.yy H:mm", + "shortDate": "d.M.yy", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "dsb-de", + "localeID": "dsb_DE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_dsb.js b/1.6.6/i18n/angular-locale_dsb.js new file mode 100644 index 000000000..01137dad8 --- /dev/null +++ b/1.6.6/i18n/angular-locale_dsb.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "dopo\u0142dnja", + "w\u00f3tpo\u0142dnja" + ], + "DAY": [ + "nje\u017aela", + "p\u00f3nje\u017aele", + "wa\u0142tora", + "srjoda", + "stw\u00f3rtk", + "p\u011btk", + "sobota" + ], + "ERANAMES": [ + "p\u015bed Kristusowym naro\u017aenim", + "p\u00f3 Kristusowem naro\u017aenju" + ], + "ERAS": [ + "p\u015b.Chr.n.", + "p\u00f3 Chr.n." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januara", + "februara", + "m\u011brca", + "apryla", + "maja", + "junija", + "julija", + "awgusta", + "septembra", + "oktobra", + "nowembra", + "decembra" + ], + "SHORTDAY": [ + "nje", + "p\u00f3n", + "wa\u0142", + "srj", + "stw", + "p\u011bt", + "sob" + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "m\u011br.", + "apr.", + "maj.", + "jun.", + "jul.", + "awg.", + "sep.", + "okt.", + "now.", + "dec." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "m\u011brc", + "apryl", + "maj", + "junij", + "julij", + "awgust", + "september", + "oktober", + "nowember", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d.M.y H:mm:ss", + "mediumDate": "d.M.y", + "mediumTime": "H:mm:ss", + "short": "d.M.yy H:mm", + "shortDate": "d.M.yy", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "dsb", + "localeID": "dsb", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_dua-cm.js b/1.6.6/i18n/angular-locale_dua-cm.js new file mode 100644 index 000000000..c83d9ba10 --- /dev/null +++ b/1.6.6/i18n/angular-locale_dua-cm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "idi\u0253a", + "eby\u00e1mu" + ], + "DAY": [ + "\u00e9ti", + "m\u0254\u0301s\u00fa", + "kwas\u00fa", + "muk\u0254\u0301s\u00fa", + "\u014bgis\u00fa", + "\u0257\u00f3n\u025bs\u00fa", + "esa\u0253as\u00fa" + ], + "ERANAMES": [ + "\u0253oso \u0253w\u00e1 y\u00e1\u0253e l\u00e1", + "mb\u00fasa kw\u00e9di a Y\u00e9s" + ], + "ERAS": [ + "\u0253.Ys", + "mb.Ys" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "dim\u0254\u0301di", + "\u014bg\u0254nd\u025b", + "s\u0254\u014b\u025b", + "di\u0253\u00e1\u0253\u00e1", + "emiasele", + "es\u0254p\u025bs\u0254p\u025b", + "madi\u0253\u025b\u0301d\u00ed\u0253\u025b\u0301", + "di\u014bgindi", + "ny\u025bt\u025bki", + "may\u00e9s\u025b\u0301", + "tin\u00edn\u00ed", + "el\u00e1\u014bg\u025b\u0301" + ], + "SHORTDAY": [ + "\u00e9t", + "m\u0254\u0301s", + "kwa", + "muk", + "\u014bgi", + "\u0257\u00f3n", + "esa" + ], + "SHORTMONTH": [ + "di", + "\u014bg\u0254n", + "s\u0254\u014b", + "di\u0253", + "emi", + "es\u0254", + "mad", + "di\u014b", + "ny\u025bt", + "may", + "tin", + "el\u00e1" + ], + "STANDALONEMONTH": [ + "dim\u0254\u0301di", + "\u014bg\u0254nd\u025b", + "s\u0254\u014b\u025b", + "di\u0253\u00e1\u0253\u00e1", + "emiasele", + "es\u0254p\u025bs\u0254p\u025b", + "madi\u0253\u025b\u0301d\u00ed\u0253\u025b\u0301", + "di\u014bgindi", + "ny\u025bt\u025bki", + "may\u00e9s\u025b\u0301", + "tin\u00edn\u00ed", + "el\u00e1\u014bg\u025b\u0301" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "dua-cm", + "localeID": "dua_CM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_dua.js b/1.6.6/i18n/angular-locale_dua.js new file mode 100644 index 000000000..cf31aef64 --- /dev/null +++ b/1.6.6/i18n/angular-locale_dua.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "idi\u0253a", + "eby\u00e1mu" + ], + "DAY": [ + "\u00e9ti", + "m\u0254\u0301s\u00fa", + "kwas\u00fa", + "muk\u0254\u0301s\u00fa", + "\u014bgis\u00fa", + "\u0257\u00f3n\u025bs\u00fa", + "esa\u0253as\u00fa" + ], + "ERANAMES": [ + "\u0253oso \u0253w\u00e1 y\u00e1\u0253e l\u00e1", + "mb\u00fasa kw\u00e9di a Y\u00e9s" + ], + "ERAS": [ + "\u0253.Ys", + "mb.Ys" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "dim\u0254\u0301di", + "\u014bg\u0254nd\u025b", + "s\u0254\u014b\u025b", + "di\u0253\u00e1\u0253\u00e1", + "emiasele", + "es\u0254p\u025bs\u0254p\u025b", + "madi\u0253\u025b\u0301d\u00ed\u0253\u025b\u0301", + "di\u014bgindi", + "ny\u025bt\u025bki", + "may\u00e9s\u025b\u0301", + "tin\u00edn\u00ed", + "el\u00e1\u014bg\u025b\u0301" + ], + "SHORTDAY": [ + "\u00e9t", + "m\u0254\u0301s", + "kwa", + "muk", + "\u014bgi", + "\u0257\u00f3n", + "esa" + ], + "SHORTMONTH": [ + "di", + "\u014bg\u0254n", + "s\u0254\u014b", + "di\u0253", + "emi", + "es\u0254", + "mad", + "di\u014b", + "ny\u025bt", + "may", + "tin", + "el\u00e1" + ], + "STANDALONEMONTH": [ + "dim\u0254\u0301di", + "\u014bg\u0254nd\u025b", + "s\u0254\u014b\u025b", + "di\u0253\u00e1\u0253\u00e1", + "emiasele", + "es\u0254p\u025bs\u0254p\u025b", + "madi\u0253\u025b\u0301d\u00ed\u0253\u025b\u0301", + "di\u014bgindi", + "ny\u025bt\u025bki", + "may\u00e9s\u025b\u0301", + "tin\u00edn\u00ed", + "el\u00e1\u014bg\u025b\u0301" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "dua", + "localeID": "dua", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_dyo-sn.js b/1.6.6/i18n/angular-locale_dyo-sn.js new file mode 100644 index 000000000..8527e12e0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_dyo-sn.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Dimas", + "Tene\u014b", + "Talata", + "Alarbay", + "Aramisay", + "Arjuma", + "Sibiti" + ], + "ERANAMES": [ + "Ari\u014buu Yeesu", + "Atoo\u014be Yeesu" + ], + "ERAS": [ + "ArY", + "AtY" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Sanvie", + "F\u00e9birie", + "Mars", + "Aburil", + "Mee", + "Sue\u014b", + "S\u00fauyee", + "Ut", + "Settembar", + "Oktobar", + "Novembar", + "Disambar" + ], + "SHORTDAY": [ + "Dim", + "Ten", + "Tal", + "Ala", + "Ara", + "Arj", + "Sib" + ], + "SHORTMONTH": [ + "Sa", + "Fe", + "Ma", + "Ab", + "Me", + "Su", + "S\u00fa", + "Ut", + "Se", + "Ok", + "No", + "De" + ], + "STANDALONEMONTH": [ + "Sanvie", + "F\u00e9birie", + "Mars", + "Aburil", + "Mee", + "Sue\u014b", + "S\u00fauyee", + "Ut", + "Settembar", + "Oktobar", + "Novembar", + "Disambar" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "dyo-sn", + "localeID": "dyo_SN", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_dyo.js b/1.6.6/i18n/angular-locale_dyo.js new file mode 100644 index 000000000..7978c73dd --- /dev/null +++ b/1.6.6/i18n/angular-locale_dyo.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Dimas", + "Tene\u014b", + "Talata", + "Alarbay", + "Aramisay", + "Arjuma", + "Sibiti" + ], + "ERANAMES": [ + "Ari\u014buu Yeesu", + "Atoo\u014be Yeesu" + ], + "ERAS": [ + "ArY", + "AtY" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Sanvie", + "F\u00e9birie", + "Mars", + "Aburil", + "Mee", + "Sue\u014b", + "S\u00fauyee", + "Ut", + "Settembar", + "Oktobar", + "Novembar", + "Disambar" + ], + "SHORTDAY": [ + "Dim", + "Ten", + "Tal", + "Ala", + "Ara", + "Arj", + "Sib" + ], + "SHORTMONTH": [ + "Sa", + "Fe", + "Ma", + "Ab", + "Me", + "Su", + "S\u00fa", + "Ut", + "Se", + "Ok", + "No", + "De" + ], + "STANDALONEMONTH": [ + "Sanvie", + "F\u00e9birie", + "Mars", + "Aburil", + "Mee", + "Sue\u014b", + "S\u00fauyee", + "Ut", + "Settembar", + "Oktobar", + "Novembar", + "Disambar" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "dyo", + "localeID": "dyo", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_dz-bt.js b/1.6.6/i18n/angular-locale_dz-bt.js new file mode 100644 index 000000000..58d59efda --- /dev/null +++ b/1.6.6/i18n/angular-locale_dz-bt.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0f66\u0f94\u0f0b\u0f46\u0f0b", + "\u0f55\u0fb1\u0f72\u0f0b\u0f46\u0f0b" + ], + "DAY": [ + "\u0f42\u0f5f\u0f60\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f49\u0f72\u0f0b\u0f58\u0f0b" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0f5f\u0fb3\u0f0b\u0f51\u0f44\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f63\u0f94\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b" + ], + "SHORTDAY": [ + "\u0f5f\u0fb3\u0f0b", + "\u0f58\u0f72\u0f62\u0f0b", + "\u0f63\u0fb7\u0f42\u0f0b", + "\u0f55\u0f74\u0f62\u0f0b", + "\u0f66\u0f44\u0f66\u0f0b", + "\u0f66\u0fa4\u0f7a\u0f53\u0f0b", + "\u0f49\u0f72\u0f0b" + ], + "SHORTMONTH": [ + "\u0f21", + "\u0f22", + "\u0f23", + "\u0f24", + "\u0f25", + "\u0f26", + "\u0f27", + "\u0f28", + "\u0f29", + "\u0f21\u0f20", + "\u0f21\u0f21", + "12" + ], + "STANDALONEMONTH": [ + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f51\u0f44\u0f54\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f63\u0f94\u0f0b\u0f54\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, \u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by MMMM \u0f5a\u0f7a\u0f66\u0f0bdd", + "longDate": "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by MMMM \u0f5a\u0f7a\u0f66\u0f0b dd", + "medium": "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by \u0f5f\u0fb3\u0f0bMMM \u0f5a\u0f7a\u0f66\u0f0bdd \u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0bh:mm:ss a", + "mediumDate": "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by \u0f5f\u0fb3\u0f0bMMM \u0f5a\u0f7a\u0f66\u0f0bdd", + "mediumTime": "\u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0bh:mm:ss a", + "short": "y-MM-dd \u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b h \u0f66\u0f90\u0f62\u0f0b\u0f58\u0f0b mm a", + "shortDate": "y-MM-dd", + "shortTime": "\u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b h \u0f66\u0f90\u0f62\u0f0b\u0f58\u0f0b mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Nu.", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "dz-bt", + "localeID": "dz_BT", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_dz.js b/1.6.6/i18n/angular-locale_dz.js new file mode 100644 index 000000000..d1c2cc800 --- /dev/null +++ b/1.6.6/i18n/angular-locale_dz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0f66\u0f94\u0f0b\u0f46\u0f0b", + "\u0f55\u0fb1\u0f72\u0f0b\u0f46\u0f0b" + ], + "DAY": [ + "\u0f42\u0f5f\u0f60\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b", + "\u0f42\u0f5f\u0f60\u0f0b\u0f49\u0f72\u0f0b\u0f58\u0f0b" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0f5f\u0fb3\u0f0b\u0f51\u0f44\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f63\u0f94\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54\u0f0b", + "\u0f5f\u0fb3\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b" + ], + "SHORTDAY": [ + "\u0f5f\u0fb3\u0f0b", + "\u0f58\u0f72\u0f62\u0f0b", + "\u0f63\u0fb7\u0f42\u0f0b", + "\u0f55\u0f74\u0f62\u0f0b", + "\u0f66\u0f44\u0f66\u0f0b", + "\u0f66\u0fa4\u0f7a\u0f53\u0f0b", + "\u0f49\u0f72\u0f0b" + ], + "SHORTMONTH": [ + "\u0f21", + "\u0f22", + "\u0f23", + "\u0f24", + "\u0f25", + "\u0f26", + "\u0f27", + "\u0f28", + "\u0f29", + "\u0f21\u0f20", + "\u0f21\u0f21", + "12" + ], + "STANDALONEMONTH": [ + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f51\u0f44\u0f54\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f63\u0f94\u0f0b\u0f54\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54\u0f0b", + "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, \u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by MMMM \u0f5a\u0f7a\u0f66\u0f0bdd", + "longDate": "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by MMMM \u0f5a\u0f7a\u0f66\u0f0b dd", + "medium": "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by \u0f5f\u0fb3\u0f0bMMM \u0f5a\u0f7a\u0f66\u0f0bdd \u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0bh:mm:ss a", + "mediumDate": "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by \u0f5f\u0fb3\u0f0bMMM \u0f5a\u0f7a\u0f66\u0f0bdd", + "mediumTime": "\u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0bh:mm:ss a", + "short": "y-MM-dd \u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b h \u0f66\u0f90\u0f62\u0f0b\u0f58\u0f0b mm a", + "shortDate": "y-MM-dd", + "shortTime": "\u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b h \u0f66\u0f90\u0f62\u0f0b\u0f58\u0f0b mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Nu.", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "dz", + "localeID": "dz", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ebu-ke.js b/1.6.6/i18n/angular-locale_ebu-ke.js new file mode 100644 index 000000000..7c2babcf5 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ebu-ke.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "KI", + "UT" + ], + "DAY": [ + "Kiumia", + "Njumatatu", + "Njumaine", + "Njumatano", + "Aramithi", + "Njumaa", + "NJumamothii" + ], + "ERANAMES": [ + "Mbere ya Kristo", + "Thutha wa Kristo" + ], + "ERAS": [ + "MK", + "TK" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Mweri wa mbere", + "Mweri wa ka\u0129ri", + "Mweri wa kathat\u0169", + "Mweri wa kana", + "Mweri wa gatano", + "Mweri wa gatantat\u0169", + "Mweri wa m\u0169gwanja", + "Mweri wa kanana", + "Mweri wa kenda", + "Mweri wa ik\u0169mi", + "Mweri wa ik\u0169mi na \u0169mwe", + "Mweri wa ik\u0169mi na Ka\u0129r\u0129" + ], + "SHORTDAY": [ + "Kma", + "Tat", + "Ine", + "Tan", + "Arm", + "Maa", + "NMM" + ], + "SHORTMONTH": [ + "Mbe", + "Kai", + "Kat", + "Kan", + "Gat", + "Gan", + "Mug", + "Knn", + "Ken", + "Iku", + "Imw", + "Igi" + ], + "STANDALONEMONTH": [ + "Mweri wa mbere", + "Mweri wa ka\u0129ri", + "Mweri wa kathat\u0169", + "Mweri wa kana", + "Mweri wa gatano", + "Mweri wa gatantat\u0169", + "Mweri wa m\u0169gwanja", + "Mweri wa kanana", + "Mweri wa kenda", + "Mweri wa ik\u0169mi", + "Mweri wa ik\u0169mi na \u0169mwe", + "Mweri wa ik\u0169mi na Ka\u0129r\u0129" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ebu-ke", + "localeID": "ebu_KE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ebu.js b/1.6.6/i18n/angular-locale_ebu.js new file mode 100644 index 000000000..3b5dae56e --- /dev/null +++ b/1.6.6/i18n/angular-locale_ebu.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "KI", + "UT" + ], + "DAY": [ + "Kiumia", + "Njumatatu", + "Njumaine", + "Njumatano", + "Aramithi", + "Njumaa", + "NJumamothii" + ], + "ERANAMES": [ + "Mbere ya Kristo", + "Thutha wa Kristo" + ], + "ERAS": [ + "MK", + "TK" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Mweri wa mbere", + "Mweri wa ka\u0129ri", + "Mweri wa kathat\u0169", + "Mweri wa kana", + "Mweri wa gatano", + "Mweri wa gatantat\u0169", + "Mweri wa m\u0169gwanja", + "Mweri wa kanana", + "Mweri wa kenda", + "Mweri wa ik\u0169mi", + "Mweri wa ik\u0169mi na \u0169mwe", + "Mweri wa ik\u0169mi na Ka\u0129r\u0129" + ], + "SHORTDAY": [ + "Kma", + "Tat", + "Ine", + "Tan", + "Arm", + "Maa", + "NMM" + ], + "SHORTMONTH": [ + "Mbe", + "Kai", + "Kat", + "Kan", + "Gat", + "Gan", + "Mug", + "Knn", + "Ken", + "Iku", + "Imw", + "Igi" + ], + "STANDALONEMONTH": [ + "Mweri wa mbere", + "Mweri wa ka\u0129ri", + "Mweri wa kathat\u0169", + "Mweri wa kana", + "Mweri wa gatano", + "Mweri wa gatantat\u0169", + "Mweri wa m\u0169gwanja", + "Mweri wa kanana", + "Mweri wa kenda", + "Mweri wa ik\u0169mi", + "Mweri wa ik\u0169mi na \u0169mwe", + "Mweri wa ik\u0169mi na Ka\u0129r\u0129" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ebu", + "localeID": "ebu", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ee-gh.js b/1.6.6/i18n/angular-locale_ee-gh.js new file mode 100644 index 000000000..d89ffc657 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ee-gh.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u014bdi", + "\u0263etr\u0254" + ], + "DAY": [ + "k\u0254si\u0256a", + "dzo\u0256a", + "bla\u0256a", + "ku\u0256a", + "yawo\u0256a", + "fi\u0256a", + "memle\u0256a" + ], + "ERANAMES": [ + "Hafi Yesu Va Do \u014bg\u0254", + "Yesu \u014a\u0254li" + ], + "ERAS": [ + "hY", + "Y\u014b" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "dzove", + "dzodze", + "tedoxe", + "af\u0254f\u0129e", + "dama", + "masa", + "siaml\u0254m", + "deasiamime", + "any\u0254ny\u0254", + "kele", + "ade\u025bmekp\u0254xe", + "dzome" + ], + "SHORTDAY": [ + "k\u0254s", + "dzo", + "bla", + "ku\u0256", + "yaw", + "fi\u0256", + "mem" + ], + "SHORTMONTH": [ + "dzv", + "dzd", + "ted", + "af\u0254", + "dam", + "mas", + "sia", + "dea", + "any", + "kel", + "ade", + "dzm" + ], + "STANDALONEMONTH": [ + "dzove", + "dzodze", + "tedoxe", + "af\u0254f\u0129e", + "dama", + "masa", + "siaml\u0254m", + "deasiamime", + "any\u0254ny\u0254", + "kele", + "ade\u025bmekp\u0254xe", + "dzome" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d 'lia' y", + "longDate": "MMMM d 'lia' y", + "medium": "MMM d 'lia', y a 'ga' h:mm:ss", + "mediumDate": "MMM d 'lia', y", + "mediumTime": "a 'ga' h:mm:ss", + "short": "M/d/yy a 'ga' h:mm", + "shortDate": "M/d/yy", + "shortTime": "a 'ga' h:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "GHS", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ee-gh", + "localeID": "ee_GH", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ee-tg.js b/1.6.6/i18n/angular-locale_ee-tg.js new file mode 100644 index 000000000..ac5c81f40 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ee-tg.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u014bdi", + "\u0263etr\u0254" + ], + "DAY": [ + "k\u0254si\u0256a", + "dzo\u0256a", + "bla\u0256a", + "ku\u0256a", + "yawo\u0256a", + "fi\u0256a", + "memle\u0256a" + ], + "ERANAMES": [ + "Hafi Yesu Va Do \u014bg\u0254", + "Yesu \u014a\u0254li" + ], + "ERAS": [ + "hY", + "Y\u014b" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "dzove", + "dzodze", + "tedoxe", + "af\u0254f\u0129e", + "dama", + "masa", + "siaml\u0254m", + "deasiamime", + "any\u0254ny\u0254", + "kele", + "ade\u025bmekp\u0254xe", + "dzome" + ], + "SHORTDAY": [ + "k\u0254s", + "dzo", + "bla", + "ku\u0256", + "yaw", + "fi\u0256", + "mem" + ], + "SHORTMONTH": [ + "dzv", + "dzd", + "ted", + "af\u0254", + "dam", + "mas", + "sia", + "dea", + "any", + "kel", + "ade", + "dzm" + ], + "STANDALONEMONTH": [ + "dzove", + "dzodze", + "tedoxe", + "af\u0254f\u0129e", + "dama", + "masa", + "siaml\u0254m", + "deasiamime", + "any\u0254ny\u0254", + "kele", + "ade\u025bmekp\u0254xe", + "dzome" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d 'lia' y", + "longDate": "MMMM d 'lia' y", + "medium": "MMM d 'lia', y HH:mm:ss", + "mediumDate": "MMM d 'lia', y", + "mediumTime": "HH:mm:ss", + "short": "M/d/yy HH:mm", + "shortDate": "M/d/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ee-tg", + "localeID": "ee_TG", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ee.js b/1.6.6/i18n/angular-locale_ee.js new file mode 100644 index 000000000..dbd4d3c5b --- /dev/null +++ b/1.6.6/i18n/angular-locale_ee.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u014bdi", + "\u0263etr\u0254" + ], + "DAY": [ + "k\u0254si\u0256a", + "dzo\u0256a", + "bla\u0256a", + "ku\u0256a", + "yawo\u0256a", + "fi\u0256a", + "memle\u0256a" + ], + "ERANAMES": [ + "Hafi Yesu Va Do \u014bg\u0254", + "Yesu \u014a\u0254li" + ], + "ERAS": [ + "hY", + "Y\u014b" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "dzove", + "dzodze", + "tedoxe", + "af\u0254f\u0129e", + "dama", + "masa", + "siaml\u0254m", + "deasiamime", + "any\u0254ny\u0254", + "kele", + "ade\u025bmekp\u0254xe", + "dzome" + ], + "SHORTDAY": [ + "k\u0254s", + "dzo", + "bla", + "ku\u0256", + "yaw", + "fi\u0256", + "mem" + ], + "SHORTMONTH": [ + "dzv", + "dzd", + "ted", + "af\u0254", + "dam", + "mas", + "sia", + "dea", + "any", + "kel", + "ade", + "dzm" + ], + "STANDALONEMONTH": [ + "dzove", + "dzodze", + "tedoxe", + "af\u0254f\u0129e", + "dama", + "masa", + "siaml\u0254m", + "deasiamime", + "any\u0254ny\u0254", + "kele", + "ade\u025bmekp\u0254xe", + "dzome" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d 'lia' y", + "longDate": "MMMM d 'lia' y", + "medium": "MMM d 'lia', y a 'ga' h:mm:ss", + "mediumDate": "MMM d 'lia', y", + "mediumTime": "a 'ga' h:mm:ss", + "short": "M/d/yy a 'ga' h:mm", + "shortDate": "M/d/yy", + "shortTime": "a 'ga' h:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "GHS", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ee", + "localeID": "ee", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_el-cy.js b/1.6.6/i18n/angular-locale_el-cy.js new file mode 100644 index 000000000..41b44d3e7 --- /dev/null +++ b/1.6.6/i18n/angular-locale_el-cy.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u03c0.\u03bc.", + "\u03bc.\u03bc." + ], + "DAY": [ + "\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae", + "\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1", + "\u03a4\u03c1\u03af\u03c4\u03b7", + "\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7", + "\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7", + "\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae", + "\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf" + ], + "ERANAMES": [ + "\u03c0\u03c1\u03bf \u03a7\u03c1\u03b9\u03c3\u03c4\u03bf\u03cd", + "\u03bc\u03b5\u03c4\u03ac \u03a7\u03c1\u03b9\u03c3\u03c4\u03cc\u03bd" + ], + "ERAS": [ + "\u03c0.\u03a7.", + "\u03bc.\u03a7." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0399\u03b1\u03bd\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5", + "\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5", + "\u039c\u03b1\u03c1\u03c4\u03af\u03bf\u03c5", + "\u0391\u03c0\u03c1\u03b9\u03bb\u03af\u03bf\u03c5", + "\u039c\u03b1\u0390\u03bf\u03c5", + "\u0399\u03bf\u03c5\u03bd\u03af\u03bf\u03c5", + "\u0399\u03bf\u03c5\u03bb\u03af\u03bf\u03c5", + "\u0391\u03c5\u03b3\u03bf\u03cd\u03c3\u03c4\u03bf\u03c5", + "\u03a3\u03b5\u03c0\u03c4\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5", + "\u039f\u03ba\u03c4\u03c9\u03b2\u03c1\u03af\u03bf\u03c5", + "\u039d\u03bf\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5", + "\u0394\u03b5\u03ba\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5" + ], + "SHORTDAY": [ + "\u039a\u03c5\u03c1", + "\u0394\u03b5\u03c5", + "\u03a4\u03c1\u03af", + "\u03a4\u03b5\u03c4", + "\u03a0\u03ad\u03bc", + "\u03a0\u03b1\u03c1", + "\u03a3\u03ac\u03b2" + ], + "SHORTMONTH": [ + "\u0399\u03b1\u03bd", + "\u03a6\u03b5\u03b2", + "\u039c\u03b1\u03c1", + "\u0391\u03c0\u03c1", + "\u039c\u03b1\u0390", + "\u0399\u03bf\u03c5\u03bd", + "\u0399\u03bf\u03c5\u03bb", + "\u0391\u03c5\u03b3", + "\u03a3\u03b5\u03c0", + "\u039f\u03ba\u03c4", + "\u039d\u03bf\u03b5", + "\u0394\u03b5\u03ba" + ], + "STANDALONEMONTH": [ + "\u0399\u03b1\u03bd\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2", + "\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2", + "\u039c\u03ac\u03c1\u03c4\u03b9\u03bf\u03c2", + "\u0391\u03c0\u03c1\u03af\u03bb\u03b9\u03bf\u03c2", + "\u039c\u03ac\u03b9\u03bf\u03c2", + "\u0399\u03bf\u03cd\u03bd\u03b9\u03bf\u03c2", + "\u0399\u03bf\u03cd\u03bb\u03b9\u03bf\u03c2", + "\u0391\u03cd\u03b3\u03bf\u03c5\u03c3\u03c4\u03bf\u03c2", + "\u03a3\u03b5\u03c0\u03c4\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2", + "\u039f\u03ba\u03c4\u03ce\u03b2\u03c1\u03b9\u03bf\u03c2", + "\u039d\u03bf\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2", + "\u0394\u03b5\u03ba\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "el-cy", + "localeID": "el_CY", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_el-gr.js b/1.6.6/i18n/angular-locale_el-gr.js new file mode 100644 index 000000000..775d3fb79 --- /dev/null +++ b/1.6.6/i18n/angular-locale_el-gr.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u03c0.\u03bc.", + "\u03bc.\u03bc." + ], + "DAY": [ + "\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae", + "\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1", + "\u03a4\u03c1\u03af\u03c4\u03b7", + "\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7", + "\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7", + "\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae", + "\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf" + ], + "ERANAMES": [ + "\u03c0\u03c1\u03bf \u03a7\u03c1\u03b9\u03c3\u03c4\u03bf\u03cd", + "\u03bc\u03b5\u03c4\u03ac \u03a7\u03c1\u03b9\u03c3\u03c4\u03cc\u03bd" + ], + "ERAS": [ + "\u03c0.\u03a7.", + "\u03bc.\u03a7." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0399\u03b1\u03bd\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5", + "\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5", + "\u039c\u03b1\u03c1\u03c4\u03af\u03bf\u03c5", + "\u0391\u03c0\u03c1\u03b9\u03bb\u03af\u03bf\u03c5", + "\u039c\u03b1\u0390\u03bf\u03c5", + "\u0399\u03bf\u03c5\u03bd\u03af\u03bf\u03c5", + "\u0399\u03bf\u03c5\u03bb\u03af\u03bf\u03c5", + "\u0391\u03c5\u03b3\u03bf\u03cd\u03c3\u03c4\u03bf\u03c5", + "\u03a3\u03b5\u03c0\u03c4\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5", + "\u039f\u03ba\u03c4\u03c9\u03b2\u03c1\u03af\u03bf\u03c5", + "\u039d\u03bf\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5", + "\u0394\u03b5\u03ba\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5" + ], + "SHORTDAY": [ + "\u039a\u03c5\u03c1", + "\u0394\u03b5\u03c5", + "\u03a4\u03c1\u03af", + "\u03a4\u03b5\u03c4", + "\u03a0\u03ad\u03bc", + "\u03a0\u03b1\u03c1", + "\u03a3\u03ac\u03b2" + ], + "SHORTMONTH": [ + "\u0399\u03b1\u03bd", + "\u03a6\u03b5\u03b2", + "\u039c\u03b1\u03c1", + "\u0391\u03c0\u03c1", + "\u039c\u03b1\u0390", + "\u0399\u03bf\u03c5\u03bd", + "\u0399\u03bf\u03c5\u03bb", + "\u0391\u03c5\u03b3", + "\u03a3\u03b5\u03c0", + "\u039f\u03ba\u03c4", + "\u039d\u03bf\u03b5", + "\u0394\u03b5\u03ba" + ], + "STANDALONEMONTH": [ + "\u0399\u03b1\u03bd\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2", + "\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2", + "\u039c\u03ac\u03c1\u03c4\u03b9\u03bf\u03c2", + "\u0391\u03c0\u03c1\u03af\u03bb\u03b9\u03bf\u03c2", + "\u039c\u03ac\u03b9\u03bf\u03c2", + "\u0399\u03bf\u03cd\u03bd\u03b9\u03bf\u03c2", + "\u0399\u03bf\u03cd\u03bb\u03b9\u03bf\u03c2", + "\u0391\u03cd\u03b3\u03bf\u03c5\u03c3\u03c4\u03bf\u03c2", + "\u03a3\u03b5\u03c0\u03c4\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2", + "\u039f\u03ba\u03c4\u03ce\u03b2\u03c1\u03b9\u03bf\u03c2", + "\u039d\u03bf\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2", + "\u0394\u03b5\u03ba\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "el-gr", + "localeID": "el_GR", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_el.js b/1.6.6/i18n/angular-locale_el.js new file mode 100644 index 000000000..0cfa77572 --- /dev/null +++ b/1.6.6/i18n/angular-locale_el.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u03c0.\u03bc.", + "\u03bc.\u03bc." + ], + "DAY": [ + "\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae", + "\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1", + "\u03a4\u03c1\u03af\u03c4\u03b7", + "\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7", + "\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7", + "\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae", + "\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf" + ], + "ERANAMES": [ + "\u03c0\u03c1\u03bf \u03a7\u03c1\u03b9\u03c3\u03c4\u03bf\u03cd", + "\u03bc\u03b5\u03c4\u03ac \u03a7\u03c1\u03b9\u03c3\u03c4\u03cc\u03bd" + ], + "ERAS": [ + "\u03c0.\u03a7.", + "\u03bc.\u03a7." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0399\u03b1\u03bd\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5", + "\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5", + "\u039c\u03b1\u03c1\u03c4\u03af\u03bf\u03c5", + "\u0391\u03c0\u03c1\u03b9\u03bb\u03af\u03bf\u03c5", + "\u039c\u03b1\u0390\u03bf\u03c5", + "\u0399\u03bf\u03c5\u03bd\u03af\u03bf\u03c5", + "\u0399\u03bf\u03c5\u03bb\u03af\u03bf\u03c5", + "\u0391\u03c5\u03b3\u03bf\u03cd\u03c3\u03c4\u03bf\u03c5", + "\u03a3\u03b5\u03c0\u03c4\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5", + "\u039f\u03ba\u03c4\u03c9\u03b2\u03c1\u03af\u03bf\u03c5", + "\u039d\u03bf\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5", + "\u0394\u03b5\u03ba\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5" + ], + "SHORTDAY": [ + "\u039a\u03c5\u03c1", + "\u0394\u03b5\u03c5", + "\u03a4\u03c1\u03af", + "\u03a4\u03b5\u03c4", + "\u03a0\u03ad\u03bc", + "\u03a0\u03b1\u03c1", + "\u03a3\u03ac\u03b2" + ], + "SHORTMONTH": [ + "\u0399\u03b1\u03bd", + "\u03a6\u03b5\u03b2", + "\u039c\u03b1\u03c1", + "\u0391\u03c0\u03c1", + "\u039c\u03b1\u0390", + "\u0399\u03bf\u03c5\u03bd", + "\u0399\u03bf\u03c5\u03bb", + "\u0391\u03c5\u03b3", + "\u03a3\u03b5\u03c0", + "\u039f\u03ba\u03c4", + "\u039d\u03bf\u03b5", + "\u0394\u03b5\u03ba" + ], + "STANDALONEMONTH": [ + "\u0399\u03b1\u03bd\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2", + "\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2", + "\u039c\u03ac\u03c1\u03c4\u03b9\u03bf\u03c2", + "\u0391\u03c0\u03c1\u03af\u03bb\u03b9\u03bf\u03c2", + "\u039c\u03ac\u03b9\u03bf\u03c2", + "\u0399\u03bf\u03cd\u03bd\u03b9\u03bf\u03c2", + "\u0399\u03bf\u03cd\u03bb\u03b9\u03bf\u03c2", + "\u0391\u03cd\u03b3\u03bf\u03c5\u03c3\u03c4\u03bf\u03c2", + "\u03a3\u03b5\u03c0\u03c4\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2", + "\u039f\u03ba\u03c4\u03ce\u03b2\u03c1\u03b9\u03bf\u03c2", + "\u039d\u03bf\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2", + "\u0394\u03b5\u03ba\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "el", + "localeID": "el", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-001.js b/1.6.6/i18n/angular-locale_en-001.js new file mode 100644 index 000000000..5117423dc --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-001.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-001", + "localeID": "en_001", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-150.js b/1.6.6/i18n/angular-locale_en-150.js new file mode 100644 index 000000000..d8b518a90 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-150.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "en-150", + "localeID": "en_150", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-ag.js b/1.6.6/i18n/angular-locale_en-ag.js new file mode 100644 index 000000000..756d6f220 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-ag.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-ag", + "localeID": "en_AG", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-ai.js b/1.6.6/i18n/angular-locale_en-ai.js new file mode 100644 index 000000000..cffd17882 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-ai.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-ai", + "localeID": "en_AI", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-as.js b/1.6.6/i18n/angular-locale_en-as.js new file mode 100644 index 000000000..4939e0116 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-as.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-as", + "localeID": "en_AS", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-at.js b/1.6.6/i18n/angular-locale_en-at.js new file mode 100644 index 000000000..74bd52e27 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-at.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-at", + "localeID": "en_AT", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-au.js b/1.6.6/i18n/angular-locale_en-au.js new file mode 100644 index 000000000..f71f8b1d2 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-au.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "am", + "pm" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun.", + "Mon.", + "Tue.", + "Wed.", + "Thu.", + "Fri.", + "Sat." + ], + "SHORTMONTH": [ + "Jan.", + "Feb.", + "Mar.", + "Apr.", + "May", + "Jun.", + "Jul.", + "Aug.", + "Sep.", + "Oct.", + "Nov.", + "Dec." + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-au", + "localeID": "en_AU", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-bb.js b/1.6.6/i18n/angular-locale_en-bb.js new file mode 100644 index 000000000..c1fba3a43 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-bb.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-bb", + "localeID": "en_BB", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-be.js b/1.6.6/i18n/angular-locale_en-be.js new file mode 100644 index 000000000..79c0c0171 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-be.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "dd MMM y HH:mm:ss", + "mediumDate": "dd MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "en-be", + "localeID": "en_BE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-bi.js b/1.6.6/i18n/angular-locale_en-bi.js new file mode 100644 index 000000000..b6b65641c --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-bi.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FBu", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-bi", + "localeID": "en_BI", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-bm.js b/1.6.6/i18n/angular-locale_en-bm.js new file mode 100644 index 000000000..67d117f11 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-bm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-bm", + "localeID": "en_BM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-bs.js b/1.6.6/i18n/angular-locale_en-bs.js new file mode 100644 index 000000000..c60b8d875 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-bs.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-bs", + "localeID": "en_BS", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-bw.js b/1.6.6/i18n/angular-locale_en-bw.js new file mode 100644 index 000000000..35a31a5ca --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-bw.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd MMMM y", + "longDate": "dd MMMM y", + "medium": "dd MMM y HH:mm:ss", + "mediumDate": "dd MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "P", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-bw", + "localeID": "en_BW", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-bz.js b/1.6.6/i18n/angular-locale_en-bz.js new file mode 100644 index 000000000..3f7379cee --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-bz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd MMMM y", + "longDate": "dd MMMM y", + "medium": "dd-MMM-y HH:mm:ss", + "mediumDate": "dd-MMM-y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-bz", + "localeID": "en_BZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-ca.js b/1.6.6/i18n/angular-locale_en-ca.js new file mode 100644 index 000000000..0904d0d8b --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-ca.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "y-MM-dd h:mm a", + "shortDate": "y-MM-dd", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-ca", + "localeID": "en_CA", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-cc.js b/1.6.6/i18n/angular-locale_en-cc.js new file mode 100644 index 000000000..a53d442fa --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-cc.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-cc", + "localeID": "en_CC", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-ch.js b/1.6.6/i18n/angular-locale_en-ch.js new file mode 100644 index 000000000..8d0f3ce75 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-ch.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CHF", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u00a4-", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "en-ch", + "localeID": "en_CH", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-ck.js b/1.6.6/i18n/angular-locale_en-ck.js new file mode 100644 index 000000000..86ab48c56 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-ck.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-ck", + "localeID": "en_CK", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-cm.js b/1.6.6/i18n/angular-locale_en-cm.js new file mode 100644 index 000000000..d75535979 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-cm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-cm", + "localeID": "en_CM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-cx.js b/1.6.6/i18n/angular-locale_en-cx.js new file mode 100644 index 000000000..886a0840a --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-cx.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-cx", + "localeID": "en_CX", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-cy.js b/1.6.6/i18n/angular-locale_en-cy.js new file mode 100644 index 000000000..3197e29a6 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-cy.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-cy", + "localeID": "en_CY", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-de.js b/1.6.6/i18n/angular-locale_en-de.js new file mode 100644 index 000000000..5dd8761ee --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-de.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-de", + "localeID": "en_DE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-dg.js b/1.6.6/i18n/angular-locale_en-dg.js new file mode 100644 index 000000000..bb576e87e --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-dg.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-dg", + "localeID": "en_DG", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-dk.js b/1.6.6/i18n/angular-locale_en-dk.js new file mode 100644 index 000000000..97324120e --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-dk.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH.mm.ss", + "mediumDate": "d MMM y", + "mediumTime": "HH.mm.ss", + "short": "dd/MM/y HH.mm", + "shortDate": "dd/MM/y", + "shortTime": "HH.mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr.", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "en-dk", + "localeID": "en_DK", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-dm.js b/1.6.6/i18n/angular-locale_en-dm.js new file mode 100644 index 000000000..9461a315d --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-dm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-dm", + "localeID": "en_DM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-er.js b/1.6.6/i18n/angular-locale_en-er.js new file mode 100644 index 000000000..4a1296c52 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-er.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Nfk", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-er", + "localeID": "en_ER", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-fi.js b/1.6.6/i18n/angular-locale_en-fi.js new file mode 100644 index 000000000..2092e0fdd --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-fi.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y H.mm.ss", + "mediumDate": "d MMM y", + "mediumTime": "H.mm.ss", + "short": "dd/MM/y H.mm", + "shortDate": "dd/MM/y", + "shortTime": "H.mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-fi", + "localeID": "en_FI", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-fj.js b/1.6.6/i18n/angular-locale_en-fj.js new file mode 100644 index 000000000..5bf426bc9 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-fj.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-fj", + "localeID": "en_FJ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-fk.js b/1.6.6/i18n/angular-locale_en-fk.js new file mode 100644 index 000000000..c62693746 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-fk.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-fk", + "localeID": "en_FK", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-fm.js b/1.6.6/i18n/angular-locale_en-fm.js new file mode 100644 index 000000000..33e0e81b9 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-fm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-fm", + "localeID": "en_FM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-gb.js b/1.6.6/i18n/angular-locale_en-gb.js new file mode 100644 index 000000000..7ada95f8f --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-gb.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "am", + "pm" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-gb", + "localeID": "en_GB", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-gd.js b/1.6.6/i18n/angular-locale_en-gd.js new file mode 100644 index 000000000..1afb4c746 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-gd.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-gd", + "localeID": "en_GD", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-gg.js b/1.6.6/i18n/angular-locale_en-gg.js new file mode 100644 index 000000000..2aa59fb36 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-gg.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-gg", + "localeID": "en_GG", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-gh.js b/1.6.6/i18n/angular-locale_en-gh.js new file mode 100644 index 000000000..cc33fe0f1 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-gh.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "GHS", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-gh", + "localeID": "en_GH", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-gi.js b/1.6.6/i18n/angular-locale_en-gi.js new file mode 100644 index 000000000..686ad877e --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-gi.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-gi", + "localeID": "en_GI", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-gm.js b/1.6.6/i18n/angular-locale_en-gm.js new file mode 100644 index 000000000..e982df383 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-gm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "GMD", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-gm", + "localeID": "en_GM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-gu.js b/1.6.6/i18n/angular-locale_en-gu.js new file mode 100644 index 000000000..d11933bd3 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-gu.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-gu", + "localeID": "en_GU", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-gy.js b/1.6.6/i18n/angular-locale_en-gy.js new file mode 100644 index 000000000..028c3d88a --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-gy.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-gy", + "localeID": "en_GY", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-hk.js b/1.6.6/i18n/angular-locale_en-hk.js new file mode 100644 index 000000000..f366c1a90 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-hk.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/M/y h:mm a", + "shortDate": "d/M/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-hk", + "localeID": "en_HK", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-ie.js b/1.6.6/i18n/angular-locale_en-ie.js new file mode 100644 index 000000000..9289cc595 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-ie.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-ie", + "localeID": "en_IE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-il.js b/1.6.6/i18n/angular-locale_en-il.js new file mode 100644 index 000000000..8cfbe37f7 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-il.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y H:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "H:mm:ss", + "short": "dd/MM/y H:mm", + "shortDate": "dd/MM/y", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20aa", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-il", + "localeID": "en_IL", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-im.js b/1.6.6/i18n/angular-locale_en-im.js new file mode 100644 index 000000000..e015154f6 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-im.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-im", + "localeID": "en_IM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-in.js b/1.6.6/i18n/angular-locale_en-in.js new file mode 100644 index 000000000..617f6bf5f --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-in.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "dd-MMM-y h:mm:ss a", + "mediumDate": "dd-MMM-y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/yy h:mm a", + "shortDate": "dd/MM/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "en-in", + "localeID": "en_IN", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-io.js b/1.6.6/i18n/angular-locale_en-io.js new file mode 100644 index 000000000..18b1fac79 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-io.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-io", + "localeID": "en_IO", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-iso.js b/1.6.6/i18n/angular-locale_en-iso.js new file mode 100644 index 000000000..a29709301 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-iso.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, y MMMM dd", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "yyyy-MM-dd HH:mm", + "shortDate": "yyyy-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-iso", + "localeID": "en_ISO", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-je.js b/1.6.6/i18n/angular-locale_en-je.js new file mode 100644 index 000000000..d6257dd52 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-je.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-je", + "localeID": "en_JE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-jm.js b/1.6.6/i18n/angular-locale_en-jm.js new file mode 100644 index 000000000..69b16fafc --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-jm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-jm", + "localeID": "en_JM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-ke.js b/1.6.6/i18n/angular-locale_en-ke.js new file mode 100644 index 000000000..537ee7a0f --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-ke.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-ke", + "localeID": "en_KE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-ki.js b/1.6.6/i18n/angular-locale_en-ki.js new file mode 100644 index 000000000..2fe2ef392 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-ki.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-ki", + "localeID": "en_KI", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-kn.js b/1.6.6/i18n/angular-locale_en-kn.js new file mode 100644 index 000000000..09101c94a --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-kn.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-kn", + "localeID": "en_KN", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-ky.js b/1.6.6/i18n/angular-locale_en-ky.js new file mode 100644 index 000000000..1d7d45457 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-ky.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-ky", + "localeID": "en_KY", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-lc.js b/1.6.6/i18n/angular-locale_en-lc.js new file mode 100644 index 000000000..5a82bd01a --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-lc.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-lc", + "localeID": "en_LC", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-lr.js b/1.6.6/i18n/angular-locale_en-lr.js new file mode 100644 index 000000000..ade846beb --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-lr.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-lr", + "localeID": "en_LR", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-ls.js b/1.6.6/i18n/angular-locale_en-ls.js new file mode 100644 index 000000000..cd8e927bd --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-ls.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "R", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-ls", + "localeID": "en_LS", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-mg.js b/1.6.6/i18n/angular-locale_en-mg.js new file mode 100644 index 000000000..045f3cd3a --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-mg.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ar", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-mg", + "localeID": "en_MG", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-mh.js b/1.6.6/i18n/angular-locale_en-mh.js new file mode 100644 index 000000000..8c068a5ca --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-mh.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-mh", + "localeID": "en_MH", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-mo.js b/1.6.6/i18n/angular-locale_en-mo.js new file mode 100644 index 000000000..d24c8b3f3 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-mo.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "MOP", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-mo", + "localeID": "en_MO", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-mp.js b/1.6.6/i18n/angular-locale_en-mp.js new file mode 100644 index 000000000..ff8b6b49b --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-mp.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-mp", + "localeID": "en_MP", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-ms.js b/1.6.6/i18n/angular-locale_en-ms.js new file mode 100644 index 000000000..7adb0c864 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-ms.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-ms", + "localeID": "en_MS", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-mt.js b/1.6.6/i18n/angular-locale_en-mt.js new file mode 100644 index 000000000..a69a9281c --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-mt.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "dd MMMM y", + "medium": "dd MMM y HH:mm:ss", + "mediumDate": "dd MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-mt", + "localeID": "en_MT", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-mu.js b/1.6.6/i18n/angular-locale_en-mu.js new file mode 100644 index 000000000..02d955293 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-mu.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "MURs", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-mu", + "localeID": "en_MU", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-mw.js b/1.6.6/i18n/angular-locale_en-mw.js new file mode 100644 index 000000000..ed6801258 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-mw.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "MWK", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-mw", + "localeID": "en_MW", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-my.js b/1.6.6/i18n/angular-locale_en-my.js new file mode 100644 index 000000000..ae1315b8d --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-my.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "RM", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-my", + "localeID": "en_MY", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-na.js b/1.6.6/i18n/angular-locale_en-na.js new file mode 100644 index 000000000..d7240f38f --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-na.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-na", + "localeID": "en_NA", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-nf.js b/1.6.6/i18n/angular-locale_en-nf.js new file mode 100644 index 000000000..fdf91b818 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-nf.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-nf", + "localeID": "en_NF", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-ng.js b/1.6.6/i18n/angular-locale_en-ng.js new file mode 100644 index 000000000..a6e01a58d --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-ng.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20a6", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-ng", + "localeID": "en_NG", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-nl.js b/1.6.6/i18n/angular-locale_en-nl.js new file mode 100644 index 000000000..2ae339dee --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-nl.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-nl", + "localeID": "en_NL", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-nr.js b/1.6.6/i18n/angular-locale_en-nr.js new file mode 100644 index 000000000..fee2bccb8 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-nr.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-nr", + "localeID": "en_NR", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-nu.js b/1.6.6/i18n/angular-locale_en-nu.js new file mode 100644 index 000000000..671bce597 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-nu.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-nu", + "localeID": "en_NU", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-nz.js b/1.6.6/i18n/angular-locale_en-nz.js new file mode 100644 index 000000000..ed8882d50 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-nz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d/MM/y h:mm:ss a", + "mediumDate": "d/MM/y", + "mediumTime": "h:mm:ss a", + "short": "d/MM/yy h:mm a", + "shortDate": "d/MM/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-nz", + "localeID": "en_NZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-pg.js b/1.6.6/i18n/angular-locale_en-pg.js new file mode 100644 index 000000000..2d1f0f2cf --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-pg.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "PGK", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-pg", + "localeID": "en_PG", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-ph.js b/1.6.6/i18n/angular-locale_en-ph.js new file mode 100644 index 000000000..d0de5aa22 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-ph.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b1", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-ph", + "localeID": "en_PH", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-pk.js b/1.6.6/i18n/angular-locale_en-pk.js new file mode 100644 index 000000000..c636ca809 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-pk.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "dd-MMM-y h:mm:ss a", + "mediumDate": "dd-MMM-y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rs", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-pk", + "localeID": "en_PK", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-pn.js b/1.6.6/i18n/angular-locale_en-pn.js new file mode 100644 index 000000000..ad7f2854a --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-pn.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-pn", + "localeID": "en_PN", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-pr.js b/1.6.6/i18n/angular-locale_en-pr.js new file mode 100644 index 000000000..0afbf6777 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-pr.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-pr", + "localeID": "en_PR", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-pw.js b/1.6.6/i18n/angular-locale_en-pw.js new file mode 100644 index 000000000..b8ae5913e --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-pw.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-pw", + "localeID": "en_PW", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-rw.js b/1.6.6/i18n/angular-locale_en-rw.js new file mode 100644 index 000000000..e68b8cab4 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-rw.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "RF", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-rw", + "localeID": "en_RW", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-sb.js b/1.6.6/i18n/angular-locale_en-sb.js new file mode 100644 index 000000000..86078c711 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-sb.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-sb", + "localeID": "en_SB", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-sc.js b/1.6.6/i18n/angular-locale_en-sc.js new file mode 100644 index 000000000..e3aa4d275 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-sc.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "SCR", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-sc", + "localeID": "en_SC", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-sd.js b/1.6.6/i18n/angular-locale_en-sd.js new file mode 100644 index 000000000..661129d3a --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-sd.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "SDG", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-sd", + "localeID": "en_SD", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-se.js b/1.6.6/i18n/angular-locale_en-se.js new file mode 100644 index 000000000..15067ba35 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-se.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "en-se", + "localeID": "en_SE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-sg.js b/1.6.6/i18n/angular-locale_en-sg.js new file mode 100644 index 000000000..d27b9b291 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-sg.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-sg", + "localeID": "en_SG", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-sh.js b/1.6.6/i18n/angular-locale_en-sh.js new file mode 100644 index 000000000..64e3f30a3 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-sh.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-sh", + "localeID": "en_SH", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-si.js b/1.6.6/i18n/angular-locale_en-si.js new file mode 100644 index 000000000..7a133dafd --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-si.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-si", + "localeID": "en_SI", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-sl.js b/1.6.6/i18n/angular-locale_en-sl.js new file mode 100644 index 000000000..863075fe5 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-sl.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "SLL", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-sl", + "localeID": "en_SL", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-ss.js b/1.6.6/i18n/angular-locale_en-ss.js new file mode 100644 index 000000000..691fa9594 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-ss.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-ss", + "localeID": "en_SS", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-sx.js b/1.6.6/i18n/angular-locale_en-sx.js new file mode 100644 index 000000000..9286c1b35 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-sx.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "NAf.", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-sx", + "localeID": "en_SX", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-sz.js b/1.6.6/i18n/angular-locale_en-sz.js new file mode 100644 index 000000000..502409cf0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-sz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "SZL", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-sz", + "localeID": "en_SZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-tc.js b/1.6.6/i18n/angular-locale_en-tc.js new file mode 100644 index 000000000..f9a8a67b6 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-tc.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-tc", + "localeID": "en_TC", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-tk.js b/1.6.6/i18n/angular-locale_en-tk.js new file mode 100644 index 000000000..815d9b540 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-tk.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-tk", + "localeID": "en_TK", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-to.js b/1.6.6/i18n/angular-locale_en-to.js new file mode 100644 index 000000000..34890a7ac --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-to.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "T$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-to", + "localeID": "en_TO", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-tt.js b/1.6.6/i18n/angular-locale_en-tt.js new file mode 100644 index 000000000..f26144044 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-tt.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-tt", + "localeID": "en_TT", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-tv.js b/1.6.6/i18n/angular-locale_en-tv.js new file mode 100644 index 000000000..d4197be76 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-tv.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-tv", + "localeID": "en_TV", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-tz.js b/1.6.6/i18n/angular-locale_en-tz.js new file mode 100644 index 000000000..a021f10aa --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-tz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-tz", + "localeID": "en_TZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-ug.js b/1.6.6/i18n/angular-locale_en-ug.js new file mode 100644 index 000000000..37357e752 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-ug.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "UGX", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-ug", + "localeID": "en_UG", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-um.js b/1.6.6/i18n/angular-locale_en-um.js new file mode 100644 index 000000000..5c47c05e8 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-um.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-um", + "localeID": "en_UM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-us-posix.js b/1.6.6/i18n/angular-locale_en-us-posix.js new file mode 100644 index 000000000..202e9a648 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-us-posix.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 0, + "lgSize": 0, + "maxFrac": 6, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 0, + "lgSize": 0, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + } + ] + }, + "id": "en-us-posix", + "localeID": "en_US_POSIX", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-us.js b/1.6.6/i18n/angular-locale_en-us.js new file mode 100644 index 000000000..515632a64 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-us.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-us", + "localeID": "en_US", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-vc.js b/1.6.6/i18n/angular-locale_en-vc.js new file mode 100644 index 000000000..3e1d2f6c0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-vc.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-vc", + "localeID": "en_VC", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-vg.js b/1.6.6/i18n/angular-locale_en-vg.js new file mode 100644 index 000000000..64fc92047 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-vg.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-vg", + "localeID": "en_VG", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-vi.js b/1.6.6/i18n/angular-locale_en-vi.js new file mode 100644 index 000000000..47ecf3ab1 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-vi.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-vi", + "localeID": "en_VI", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-vu.js b/1.6.6/i18n/angular-locale_en-vu.js new file mode 100644 index 000000000..ead316414 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-vu.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "VUV", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-vu", + "localeID": "en_VU", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-ws.js b/1.6.6/i18n/angular-locale_en-ws.js new file mode 100644 index 000000000..89b3a1305 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-ws.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "WST", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-ws", + "localeID": "en_WS", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-xa.js b/1.6.6/i18n/angular-locale_en-xa.js new file mode 100644 index 000000000..52c36be4b --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-xa.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "[\u00c5\u1e40 one]", + "[\u00de\u1e40 one]" + ], + "DAY": [ + "[\u0160\u00fb\u00f1\u00f0\u00e5\u00fd one]", + "[\u1e40\u00f6\u00f1\u00f0\u00e5\u00fd one]", + "[\u0162\u00fb\u00e9\u0161\u00f0\u00e5\u00fd one]", + "[\u0174\u00e9\u00f0\u00f1\u00e9\u0161\u00f0\u00e5\u00fd one two]", + "[\u0162\u0125\u00fb\u0155\u0161\u00f0\u00e5\u00fd one]", + "[\u0191\u0155\u00ee\u00f0\u00e5\u00fd one]", + "[\u0160\u00e5\u0163\u00fb\u0155\u00f0\u00e5\u00fd one]" + ], + "ERANAMES": [ + "[\u0181\u00e9\u0192\u00f6\u0155\u00e9\u2003\u00c7\u0125\u0155\u00ee\u0161\u0163 one two]", + "[\u00c5\u00f1\u00f1\u00f6\u2003\u00d0\u00f6\u0271\u00ee\u00f1\u00ee one two]" + ], + "ERAS": [ + "[\u0181\u00c7 one]", + "[\u00c5\u00d0 one]" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "[\u0134\u00e5\u00f1\u00fb\u00e5\u0155\u00fd one]", + "[\u0191\u00e9\u0180\u0155\u00fb\u00e5\u0155\u00fd one]", + "[\u1e40\u00e5\u0155\u00e7\u0125 one]", + "[\u00c5\u00fe\u0155\u00ee\u013c one]", + "[\u1e40\u00e5\u00fd one]", + "[\u0134\u00fb\u00f1\u00e9 one]", + "[\u0134\u00fb\u013c\u00fd one]", + "[\u00c5\u00fb\u011d\u00fb\u0161\u0163 one]", + "[\u0160\u00e9\u00fe\u0163\u00e9\u0271\u0180\u00e9\u0155 one two]", + "[\u00d6\u00e7\u0163\u00f6\u0180\u00e9\u0155 one]", + "[\u00d1\u00f6\u1e7d\u00e9\u0271\u0180\u00e9\u0155 one]", + "[\u00d0\u00e9\u00e7\u00e9\u0271\u0180\u00e9\u0155 one]" + ], + "SHORTDAY": [ + "[\u0160\u00fb\u00f1 one]", + "[\u1e40\u00f6\u00f1 one]", + "[\u0162\u00fb\u00e9 one]", + "[\u0174\u00e9\u00f0 one]", + "[\u0162\u0125\u00fb one]", + "[\u0191\u0155\u00ee one]", + "[\u0160\u00e5\u0163 one]" + ], + "SHORTMONTH": [ + "[\u0134\u00e5\u00f1 one]", + "[\u0191\u00e9\u0180 one]", + "[\u1e40\u00e5\u0155 one]", + "[\u00c5\u00fe\u0155 one]", + "[\u1e40\u00e5\u00fd one]", + "[\u0134\u00fb\u00f1 one]", + "[\u0134\u00fb\u013c one]", + "[\u00c5\u00fb\u011d one]", + "[\u0160\u00e9\u00fe one]", + "[\u00d6\u00e7\u0163 one]", + "[\u00d1\u00f6\u1e7d one]", + "[\u00d0\u00e9\u00e7 one]" + ], + "STANDALONEMONTH": [ + "[\u0134\u00e5\u00f1\u00fb\u00e5\u0155\u00fd one]", + "[\u0191\u00e9\u0180\u0155\u00fb\u00e5\u0155\u00fd one]", + "[\u1e40\u00e5\u0155\u00e7\u0125 one]", + "[\u00c5\u00fe\u0155\u00ee\u013c one]", + "[\u1e40\u00e5\u00fd one]", + "[\u0134\u00fb\u00f1\u00e9 one]", + "[\u0134\u00fb\u013c\u00fd one]", + "[\u00c5\u00fb\u011d\u00fb\u0161\u0163 one]", + "[\u0160\u00e9\u00fe\u0163\u00e9\u0271\u0180\u00e9\u0155 one two]", + "[\u00d6\u00e7\u0163\u00f6\u0180\u00e9\u0155 one]", + "[\u00d1\u00f6\u1e7d\u00e9\u0271\u0180\u00e9\u0155 one]", + "[\u00d0\u00e9\u00e7\u00e9\u0271\u0180\u00e9\u0155 one]" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "[EEEE, MMMM d, y]", + "longDate": "[MMMM d, y]", + "medium": "[MMM d, y] [h:mm:ss a]", + "mediumDate": "[MMM d, y]", + "mediumTime": "[h:mm:ss a]", + "short": "[M/d/yy] [h:mm a]", + "shortDate": "[M/d/yy]", + "shortTime": "[h:mm a]" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-xa", + "localeID": "en_XA", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-za.js b/1.6.6/i18n/angular-locale_en-za.js new file mode 100644 index 000000000..b3e7d4c18 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-za.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd MMMM y", + "longDate": "dd MMMM y", + "medium": "dd MMM y HH:mm:ss", + "mediumDate": "dd MMM y", + "mediumTime": "HH:mm:ss", + "short": "y/MM/dd HH:mm", + "shortDate": "y/MM/dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "R", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-za", + "localeID": "en_ZA", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-zm.js b/1.6.6/i18n/angular-locale_en-zm.js new file mode 100644 index 000000000..0b5d5fc54 --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-zm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "ZMW", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-zm", + "localeID": "en_ZM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en-zw.js b/1.6.6/i18n/angular-locale_en-zw.js new file mode 100644 index 000000000..2422ea29c --- /dev/null +++ b/1.6.6/i18n/angular-locale_en-zw.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd MMMM y", + "longDate": "dd MMMM y", + "medium": "dd MMM,y HH:mm:ss", + "mediumDate": "dd MMM,y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en-zw", + "localeID": "en_ZW", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_en.js b/1.6.6/i18n/angular-locale_en.js new file mode 100644 index 000000000..f794bab8b --- /dev/null +++ b/1.6.6/i18n/angular-locale_en.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en", + "localeID": "en", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_eo-001.js b/1.6.6/i18n/angular-locale_eo-001.js new file mode 100644 index 000000000..53fb0f7d5 --- /dev/null +++ b/1.6.6/i18n/angular-locale_eo-001.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "atm", + "ptm" + ], + "DAY": [ + "diman\u0109o", + "lundo", + "mardo", + "merkredo", + "\u0135a\u016ddo", + "vendredo", + "sabato" + ], + "ERANAMES": [ + "aK", + "pK" + ], + "ERAS": [ + "aK", + "pK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januaro", + "februaro", + "marto", + "aprilo", + "majo", + "junio", + "julio", + "a\u016dgusto", + "septembro", + "oktobro", + "novembro", + "decembro" + ], + "SHORTDAY": [ + "di", + "lu", + "ma", + "me", + "\u0135a", + "ve", + "sa" + ], + "SHORTMONTH": [ + "jan", + "feb", + "mar", + "apr", + "maj", + "jun", + "jul", + "a\u016dg", + "sep", + "okt", + "nov", + "dec" + ], + "STANDALONEMONTH": [ + "januaro", + "februaro", + "marto", + "aprilo", + "majo", + "junio", + "julio", + "a\u016dgusto", + "septembro", + "oktobro", + "novembro", + "decembro" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d-'a' 'de' MMMM y", + "longDate": "y-MMMM-dd", + "medium": "y-MMM-dd HH:mm:ss", + "mediumDate": "y-MMM-dd", + "mediumTime": "HH:mm:ss", + "short": "yy-MM-dd HH:mm", + "shortDate": "yy-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "eo-001", + "localeID": "eo_001", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_eo.js b/1.6.6/i18n/angular-locale_eo.js new file mode 100644 index 000000000..7ca8adea1 --- /dev/null +++ b/1.6.6/i18n/angular-locale_eo.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "atm", + "ptm" + ], + "DAY": [ + "diman\u0109o", + "lundo", + "mardo", + "merkredo", + "\u0135a\u016ddo", + "vendredo", + "sabato" + ], + "ERANAMES": [ + "aK", + "pK" + ], + "ERAS": [ + "aK", + "pK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januaro", + "februaro", + "marto", + "aprilo", + "majo", + "junio", + "julio", + "a\u016dgusto", + "septembro", + "oktobro", + "novembro", + "decembro" + ], + "SHORTDAY": [ + "di", + "lu", + "ma", + "me", + "\u0135a", + "ve", + "sa" + ], + "SHORTMONTH": [ + "jan", + "feb", + "mar", + "apr", + "maj", + "jun", + "jul", + "a\u016dg", + "sep", + "okt", + "nov", + "dec" + ], + "STANDALONEMONTH": [ + "januaro", + "februaro", + "marto", + "aprilo", + "majo", + "junio", + "julio", + "a\u016dgusto", + "septembro", + "oktobro", + "novembro", + "decembro" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d-'a' 'de' MMMM y", + "longDate": "y-MMMM-dd", + "medium": "y-MMM-dd HH:mm:ss", + "mediumDate": "y-MMM-dd", + "mediumTime": "HH:mm:ss", + "short": "yy-MM-dd HH:mm", + "shortDate": "yy-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "eo", + "localeID": "eo", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-419.js b/1.6.6/i18n/angular-locale_es-419.js new file mode 100644 index 000000000..71102d3a2 --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-419.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sep.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "es-419", + "localeID": "es_419", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-ar.js b/1.6.6/i18n/angular-locale_es-ar.js new file mode 100644 index 000000000..a512ea6f7 --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-ar.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sep.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "es-ar", + "localeID": "es_AR", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-bo.js b/1.6.6/i18n/angular-locale_es-bo.js new file mode 100644 index 000000000..bd742b6d6 --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-bo.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sep.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM 'de' y HH:mm:ss", + "mediumDate": "d MMM 'de' y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Bs", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "es-bo", + "localeID": "es_BO", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-br.js b/1.6.6/i18n/angular-locale_es-br.js new file mode 100644 index 000000000..8a6027092 --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-br.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sep.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "R$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "es-br", + "localeID": "es_BR", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-bz.js b/1.6.6/i18n/angular-locale_es-bz.js new file mode 100644 index 000000000..5e39c698d --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-bz.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sep.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "es-bz", + "localeID": "es_BZ", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-cl.js b/1.6.6/i18n/angular-locale_es-cl.js new file mode 100644 index 000000000..2005f0140 --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-cl.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sep.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "dd-MM-y HH:mm:ss", + "mediumDate": "dd-MM-y", + "mediumTime": "HH:mm:ss", + "short": "dd-MM-yy HH:mm", + "shortDate": "dd-MM-yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "\u00a4-", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "es-cl", + "localeID": "es_CL", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-co.js b/1.6.6/i18n/angular-locale_es-co.js new file mode 100644 index 000000000..9fbd8d8e7 --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-co.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sep.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d/MM/y h:mm:ss a", + "mediumDate": "d/MM/y", + "mediumTime": "h:mm:ss a", + "short": "d/MM/yy h:mm a", + "shortDate": "d/MM/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "es-co", + "localeID": "es_CO", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-cr.js b/1.6.6/i18n/angular-locale_es-cr.js new file mode 100644 index 000000000..3109fe24b --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-cr.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sep.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20a1", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "es-cr", + "localeID": "es_CR", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-cu.js b/1.6.6/i18n/angular-locale_es-cu.js new file mode 100644 index 000000000..02d6520e5 --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-cu.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sep.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "es-cu", + "localeID": "es_CU", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-do.js b/1.6.6/i18n/angular-locale_es-do.js new file mode 100644 index 000000000..c1a615d7b --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-do.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sep.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "RD$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "es-do", + "localeID": "es_DO", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-ea.js b/1.6.6/i18n/angular-locale_es-ea.js new file mode 100644 index 000000000..ec6870b06 --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-ea.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sept.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y H:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "H:mm:ss", + "short": "d/M/yy H:mm", + "shortDate": "d/M/yy", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "es-ea", + "localeID": "es_EA", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-ec.js b/1.6.6/i18n/angular-locale_es-ec.js new file mode 100644 index 000000000..d713237eb --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-ec.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sep.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u00a4-", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "es-ec", + "localeID": "es_EC", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-es.js b/1.6.6/i18n/angular-locale_es-es.js new file mode 100644 index 000000000..e3675b030 --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-es.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sept.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y H:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "H:mm:ss", + "short": "d/M/yy H:mm", + "shortDate": "d/M/yy", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "es-es", + "localeID": "es_ES", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-gq.js b/1.6.6/i18n/angular-locale_es-gq.js new file mode 100644 index 000000000..66c34c8bf --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-gq.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sept.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y H:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "H:mm:ss", + "short": "d/M/yy H:mm", + "shortDate": "d/M/yy", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "es-gq", + "localeID": "es_GQ", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-gt.js b/1.6.6/i18n/angular-locale_es-gt.js new file mode 100644 index 000000000..a8e0ff704 --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-gt.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sep.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d/MM/y HH:mm:ss", + "mediumDate": "d/MM/y", + "mediumTime": "HH:mm:ss", + "short": "d/MM/yy HH:mm", + "shortDate": "d/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Q", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "es-gt", + "localeID": "es_GT", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-hn.js b/1.6.6/i18n/angular-locale_es-hn.js new file mode 100644 index 000000000..c3507809f --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-hn.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sep.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE dd 'de' MMMM 'de' y", + "longDate": "dd 'de' MMMM 'de' y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "L", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "es-hn", + "localeID": "es_HN", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-ic.js b/1.6.6/i18n/angular-locale_es-ic.js new file mode 100644 index 000000000..ec28e8a09 --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-ic.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sept.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y H:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "H:mm:ss", + "short": "d/M/yy H:mm", + "shortDate": "d/M/yy", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "es-ic", + "localeID": "es_IC", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-mx.js b/1.6.6/i18n/angular-locale_es-mx.js new file mode 100644 index 000000000..3b2af333e --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-mx.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene", + "feb", + "mar", + "abr", + "may", + "jun", + "jul", + "ago", + "sep", + "oct", + "nov", + "dic" + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "dd/MM/y HH:mm:ss", + "mediumDate": "dd/MM/y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "es-mx", + "localeID": "es_MX", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-ni.js b/1.6.6/i18n/angular-locale_es-ni.js new file mode 100644 index 000000000..df278676a --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-ni.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sep.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "C$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "es-ni", + "localeID": "es_NI", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-pa.js b/1.6.6/i18n/angular-locale_es-pa.js new file mode 100644 index 000000000..96c6f40aa --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-pa.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sep.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "MM/dd/y h:mm:ss a", + "mediumDate": "MM/dd/y", + "mediumTime": "h:mm:ss a", + "short": "MM/dd/yy h:mm a", + "shortDate": "MM/dd/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "B/.", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "es-pa", + "localeID": "es_PA", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-pe.js b/1.6.6/i18n/angular-locale_es-pe.js new file mode 100644 index 000000000..7b9e84373 --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-pe.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "setiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "set.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "Enero", + "Febrero", + "Marzo", + "Abril", + "Mayo", + "Junio", + "Julio", + "Agosto", + "Setiembre", + "Octubre", + "Noviembre", + "Diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/MM/yy HH:mm", + "shortDate": "d/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "S/.", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "es-pe", + "localeID": "es_PE", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-ph.js b/1.6.6/i18n/angular-locale_es-ph.js new file mode 100644 index 000000000..bfdeea61f --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-ph.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sept.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b1", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "es-ph", + "localeID": "es_PH", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-pr.js b/1.6.6/i18n/angular-locale_es-pr.js new file mode 100644 index 000000000..180e77d7a --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-pr.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sep.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "MM/dd/y h:mm:ss a", + "mediumDate": "MM/dd/y", + "mediumTime": "h:mm:ss a", + "short": "MM/dd/yy h:mm a", + "shortDate": "MM/dd/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "es-pr", + "localeID": "es_PR", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-py.js b/1.6.6/i18n/angular-locale_es-py.js new file mode 100644 index 000000000..338456047 --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-py.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sept.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Gs.", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "\u00a4\u00a0-", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "es-py", + "localeID": "es_PY", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-sv.js b/1.6.6/i18n/angular-locale_es-sv.js new file mode 100644 index 000000000..138b7019a --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-sv.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sep.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "es-sv", + "localeID": "es_SV", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-us.js b/1.6.6/i18n/angular-locale_es-us.js new file mode 100644 index 000000000..93a9a0974 --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-us.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sep.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "es-us", + "localeID": "es_US", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-uy.js b/1.6.6/i18n/angular-locale_es-uy.js new file mode 100644 index 000000000..6f62e2df5 --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-uy.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "setiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "set.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "Enero", + "Febrero", + "Marzo", + "Abril", + "Mayo", + "Junio", + "Julio", + "Agosto", + "Setiembre", + "Octubre", + "Noviembre", + "Diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "es-uy", + "localeID": "es_UY", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es-ve.js b/1.6.6/i18n/angular-locale_es-ve.js new file mode 100644 index 000000000..97445343d --- /dev/null +++ b/1.6.6/i18n/angular-locale_es-ve.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sept.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Bs", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u00a4-", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "es-ve", + "localeID": "es_VE", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_es.js b/1.6.6/i18n/angular-locale_es.js new file mode 100644 index 000000000..12f9b1148 --- /dev/null +++ b/1.6.6/i18n/angular-locale_es.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a. m.", + "p. m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sept.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y H:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "H:mm:ss", + "short": "d/M/yy H:mm", + "shortDate": "d/M/yy", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "es", + "localeID": "es", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_et-ee.js b/1.6.6/i18n/angular-locale_et-ee.js new file mode 100644 index 000000000..1d0fdb805 --- /dev/null +++ b/1.6.6/i18n/angular-locale_et-ee.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "p\u00fchap\u00e4ev", + "esmasp\u00e4ev", + "teisip\u00e4ev", + "kolmap\u00e4ev", + "neljap\u00e4ev", + "reede", + "laup\u00e4ev" + ], + "ERANAMES": [ + "enne Kristust", + "p\u00e4rast Kristust" + ], + "ERAS": [ + "eKr", + "pKr" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "jaanuar", + "veebruar", + "m\u00e4rts", + "aprill", + "mai", + "juuni", + "juuli", + "august", + "september", + "oktoober", + "november", + "detsember" + ], + "SHORTDAY": [ + "P", + "E", + "T", + "K", + "N", + "R", + "L" + ], + "SHORTMONTH": [ + "jaan", + "veebr", + "m\u00e4rts", + "apr", + "mai", + "juuni", + "juuli", + "aug", + "sept", + "okt", + "nov", + "dets" + ], + "STANDALONEMONTH": [ + "jaanuar", + "veebruar", + "m\u00e4rts", + "aprill", + "mai", + "juuni", + "juuli", + "august", + "september", + "oktoober", + "november", + "detsember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. MMM y HH:mm:ss", + "mediumDate": "d. MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "et-ee", + "localeID": "et_EE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_et.js b/1.6.6/i18n/angular-locale_et.js new file mode 100644 index 000000000..1230e711d --- /dev/null +++ b/1.6.6/i18n/angular-locale_et.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "p\u00fchap\u00e4ev", + "esmasp\u00e4ev", + "teisip\u00e4ev", + "kolmap\u00e4ev", + "neljap\u00e4ev", + "reede", + "laup\u00e4ev" + ], + "ERANAMES": [ + "enne Kristust", + "p\u00e4rast Kristust" + ], + "ERAS": [ + "eKr", + "pKr" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "jaanuar", + "veebruar", + "m\u00e4rts", + "aprill", + "mai", + "juuni", + "juuli", + "august", + "september", + "oktoober", + "november", + "detsember" + ], + "SHORTDAY": [ + "P", + "E", + "T", + "K", + "N", + "R", + "L" + ], + "SHORTMONTH": [ + "jaan", + "veebr", + "m\u00e4rts", + "apr", + "mai", + "juuni", + "juuli", + "aug", + "sept", + "okt", + "nov", + "dets" + ], + "STANDALONEMONTH": [ + "jaanuar", + "veebruar", + "m\u00e4rts", + "aprill", + "mai", + "juuni", + "juuli", + "august", + "september", + "oktoober", + "november", + "detsember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. MMM y HH:mm:ss", + "mediumDate": "d. MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "et", + "localeID": "et", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_eu-es.js b/1.6.6/i18n/angular-locale_eu-es.js new file mode 100644 index 000000000..286cbdf1d --- /dev/null +++ b/1.6.6/i18n/angular-locale_eu-es.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "igandea", + "astelehena", + "asteartea", + "asteazkena", + "osteguna", + "ostirala", + "larunbata" + ], + "ERANAMES": [ + "K.a.", + "Kristo ondoren" + ], + "ERAS": [ + "K.a.", + "K.o." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "urtarrila", + "otsaila", + "martxoa", + "apirila", + "maiatza", + "ekaina", + "uztaila", + "abuztua", + "iraila", + "urria", + "azaroa", + "abendua" + ], + "SHORTDAY": [ + "ig.", + "al.", + "ar.", + "az.", + "og.", + "or.", + "lr." + ], + "SHORTMONTH": [ + "urt.", + "ots.", + "mar.", + "api.", + "mai.", + "eka.", + "uzt.", + "abu.", + "ira.", + "urr.", + "aza.", + "abe." + ], + "STANDALONEMONTH": [ + "urtarrila", + "Otsaila", + "Martxoa", + "Apirila", + "Maiatza", + "Ekaina", + "Uztaila", + "Abuztua", + "Iraila", + "Urria", + "Azaroa", + "Abendua" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y('e')'ko' MMMM d, EEEE", + "longDate": "y('e')'ko' MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "yy/M/d HH:mm", + "shortDate": "yy/M/d", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "eu-es", + "localeID": "eu_ES", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_eu.js b/1.6.6/i18n/angular-locale_eu.js new file mode 100644 index 000000000..eada5f302 --- /dev/null +++ b/1.6.6/i18n/angular-locale_eu.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "igandea", + "astelehena", + "asteartea", + "asteazkena", + "osteguna", + "ostirala", + "larunbata" + ], + "ERANAMES": [ + "K.a.", + "Kristo ondoren" + ], + "ERAS": [ + "K.a.", + "K.o." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "urtarrila", + "otsaila", + "martxoa", + "apirila", + "maiatza", + "ekaina", + "uztaila", + "abuztua", + "iraila", + "urria", + "azaroa", + "abendua" + ], + "SHORTDAY": [ + "ig.", + "al.", + "ar.", + "az.", + "og.", + "or.", + "lr." + ], + "SHORTMONTH": [ + "urt.", + "ots.", + "mar.", + "api.", + "mai.", + "eka.", + "uzt.", + "abu.", + "ira.", + "urr.", + "aza.", + "abe." + ], + "STANDALONEMONTH": [ + "urtarrila", + "Otsaila", + "Martxoa", + "Apirila", + "Maiatza", + "Ekaina", + "Uztaila", + "Abuztua", + "Iraila", + "Urria", + "Azaroa", + "Abendua" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y('e')'ko' MMMM d, EEEE", + "longDate": "y('e')'ko' MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "yy/M/d HH:mm", + "shortDate": "yy/M/d", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "eu", + "localeID": "eu", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ewo-cm.js b/1.6.6/i18n/angular-locale_ewo-cm.js new file mode 100644 index 000000000..93e2b1422 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ewo-cm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "k\u00edk\u00edr\u00edg", + "ng\u0259g\u00f3g\u0259le" + ], + "DAY": [ + "s\u0254\u0301nd\u0254", + "m\u0254\u0301ndi", + "s\u0254\u0301nd\u0254 m\u0259l\u00fa m\u0259\u0301b\u025b\u030c", + "s\u0254\u0301nd\u0254 m\u0259l\u00fa m\u0259\u0301l\u025b\u0301", + "s\u0254\u0301nd\u0254 m\u0259l\u00fa m\u0259\u0301nyi", + "f\u00falad\u00e9", + "s\u00e9rad\u00e9" + ], + "ERANAMES": [ + "os\u00fas\u00faa Y\u00e9sus kiri", + "\u00e1mvus Y\u00e9sus Kir\u00eds" + ], + "ERAS": [ + "oyk", + "ayk" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "ng\u0254n os\u00fa", + "ng\u0254n b\u025b\u030c", + "ng\u0254n l\u00e1la", + "ng\u0254n nyina", + "ng\u0254n t\u00e1na", + "ng\u0254n sam\u0259na", + "ng\u0254n zamgb\u00e1la", + "ng\u0254n mwom", + "ng\u0254n ebul\u00fa", + "ng\u0254n aw\u00f3m", + "ng\u0254n aw\u00f3m ai dzi\u00e1", + "ng\u0254n aw\u00f3m ai b\u025b\u030c" + ], + "SHORTDAY": [ + "s\u0254\u0301n", + "m\u0254\u0301n", + "smb", + "sml", + "smn", + "f\u00fal", + "s\u00e9r" + ], + "SHORTMONTH": [ + "ngo", + "ngb", + "ngl", + "ngn", + "ngt", + "ngs", + "ngz", + "ngm", + "nge", + "nga", + "ngad", + "ngab" + ], + "STANDALONEMONTH": [ + "ng\u0254n os\u00fa", + "ng\u0254n b\u025b\u030c", + "ng\u0254n l\u00e1la", + "ng\u0254n nyina", + "ng\u0254n t\u00e1na", + "ng\u0254n sam\u0259na", + "ng\u0254n zamgb\u00e1la", + "ng\u0254n mwom", + "ng\u0254n ebul\u00fa", + "ng\u0254n aw\u00f3m", + "ng\u0254n aw\u00f3m ai dzi\u00e1", + "ng\u0254n aw\u00f3m ai b\u025b\u030c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ewo-cm", + "localeID": "ewo_CM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ewo.js b/1.6.6/i18n/angular-locale_ewo.js new file mode 100644 index 000000000..f036bd887 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ewo.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "k\u00edk\u00edr\u00edg", + "ng\u0259g\u00f3g\u0259le" + ], + "DAY": [ + "s\u0254\u0301nd\u0254", + "m\u0254\u0301ndi", + "s\u0254\u0301nd\u0254 m\u0259l\u00fa m\u0259\u0301b\u025b\u030c", + "s\u0254\u0301nd\u0254 m\u0259l\u00fa m\u0259\u0301l\u025b\u0301", + "s\u0254\u0301nd\u0254 m\u0259l\u00fa m\u0259\u0301nyi", + "f\u00falad\u00e9", + "s\u00e9rad\u00e9" + ], + "ERANAMES": [ + "os\u00fas\u00faa Y\u00e9sus kiri", + "\u00e1mvus Y\u00e9sus Kir\u00eds" + ], + "ERAS": [ + "oyk", + "ayk" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "ng\u0254n os\u00fa", + "ng\u0254n b\u025b\u030c", + "ng\u0254n l\u00e1la", + "ng\u0254n nyina", + "ng\u0254n t\u00e1na", + "ng\u0254n sam\u0259na", + "ng\u0254n zamgb\u00e1la", + "ng\u0254n mwom", + "ng\u0254n ebul\u00fa", + "ng\u0254n aw\u00f3m", + "ng\u0254n aw\u00f3m ai dzi\u00e1", + "ng\u0254n aw\u00f3m ai b\u025b\u030c" + ], + "SHORTDAY": [ + "s\u0254\u0301n", + "m\u0254\u0301n", + "smb", + "sml", + "smn", + "f\u00fal", + "s\u00e9r" + ], + "SHORTMONTH": [ + "ngo", + "ngb", + "ngl", + "ngn", + "ngt", + "ngs", + "ngz", + "ngm", + "nge", + "nga", + "ngad", + "ngab" + ], + "STANDALONEMONTH": [ + "ng\u0254n os\u00fa", + "ng\u0254n b\u025b\u030c", + "ng\u0254n l\u00e1la", + "ng\u0254n nyina", + "ng\u0254n t\u00e1na", + "ng\u0254n sam\u0259na", + "ng\u0254n zamgb\u00e1la", + "ng\u0254n mwom", + "ng\u0254n ebul\u00fa", + "ng\u0254n aw\u00f3m", + "ng\u0254n aw\u00f3m ai dzi\u00e1", + "ng\u0254n aw\u00f3m ai b\u025b\u030c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ewo", + "localeID": "ewo", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fa-af.js b/1.6.6/i18n/angular-locale_fa-af.js new file mode 100644 index 000000000..19dfaa93c --- /dev/null +++ b/1.6.6/i18n/angular-locale_fa-af.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0642\u0628\u0644\u200c\u0627\u0632\u0638\u0647\u0631", + "\u0628\u0639\u062f\u0627\u0632\u0638\u0647\u0631" + ], + "DAY": [ + "\u06cc\u06a9\u0634\u0646\u0628\u0647", + "\u062f\u0648\u0634\u0646\u0628\u0647", + "\u0633\u0647\u200c\u0634\u0646\u0628\u0647", + "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647", + "\u067e\u0646\u062c\u0634\u0646\u0628\u0647", + "\u062c\u0645\u0639\u0647", + "\u0634\u0646\u0628\u0647" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0632 \u0645\u06cc\u0644\u0627\u062f", + "\u0645\u06cc\u0644\u0627\u062f\u06cc" + ], + "ERAS": [ + "\u0642.\u0645.", + "\u0645." + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u062c\u0646\u0648\u0631\u06cc", + "\u0641\u0628\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u06cc", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u067e\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u06cc\u06a9\u0634\u0646\u0628\u0647", + "\u062f\u0648\u0634\u0646\u0628\u0647", + "\u0633\u0647\u200c\u0634\u0646\u0628\u0647", + "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647", + "\u067e\u0646\u062c\u0634\u0646\u0628\u0647", + "\u062c\u0645\u0639\u0647", + "\u0634\u0646\u0628\u0647" + ], + "SHORTMONTH": [ + "\u062c\u0646\u0648", + "\u0641\u0628\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u06cc", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644", + "\u0627\u06af\u0633\u062a", + "\u0633\u067e\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645" + ], + "STANDALONEMONTH": [ + "\u062c\u0646\u0648\u0631\u06cc", + "\u0641\u0628\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u06cc", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u067e\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 3, + 4 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y H:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "H:mm:ss", + "short": "y/M/d H:mm", + "shortDate": "y/M/d", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Af.", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "fa-af", + "localeID": "fa_AF", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fa-ir.js b/1.6.6/i18n/angular-locale_fa-ir.js new file mode 100644 index 000000000..5bf4c5c8f --- /dev/null +++ b/1.6.6/i18n/angular-locale_fa-ir.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0642\u0628\u0644\u200c\u0627\u0632\u0638\u0647\u0631", + "\u0628\u0639\u062f\u0627\u0632\u0638\u0647\u0631" + ], + "DAY": [ + "\u06cc\u06a9\u0634\u0646\u0628\u0647", + "\u062f\u0648\u0634\u0646\u0628\u0647", + "\u0633\u0647\u200c\u0634\u0646\u0628\u0647", + "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647", + "\u067e\u0646\u062c\u0634\u0646\u0628\u0647", + "\u062c\u0645\u0639\u0647", + "\u0634\u0646\u0628\u0647" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0632 \u0645\u06cc\u0644\u0627\u062f", + "\u0645\u06cc\u0644\u0627\u062f\u06cc" + ], + "ERAS": [ + "\u0642.\u0645.", + "\u0645." + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u0698\u0627\u0646\u0648\u06cc\u0647\u0654", + "\u0641\u0648\u0631\u06cc\u0647\u0654", + "\u0645\u0627\u0631\u0633", + "\u0622\u0648\u0631\u06cc\u0644", + "\u0645\u0647\u0654", + "\u0698\u0648\u0626\u0646", + "\u0698\u0648\u0626\u06cc\u0647\u0654", + "\u0627\u0648\u062a", + "\u0633\u067e\u062a\u0627\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0628\u0631", + "\u0646\u0648\u0627\u0645\u0628\u0631", + "\u062f\u0633\u0627\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u06cc\u06a9\u0634\u0646\u0628\u0647", + "\u062f\u0648\u0634\u0646\u0628\u0647", + "\u0633\u0647\u200c\u0634\u0646\u0628\u0647", + "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647", + "\u067e\u0646\u062c\u0634\u0646\u0628\u0647", + "\u062c\u0645\u0639\u0647", + "\u0634\u0646\u0628\u0647" + ], + "SHORTMONTH": [ + "\u0698\u0627\u0646\u0648\u06cc\u0647\u0654", + "\u0641\u0648\u0631\u06cc\u0647\u0654", + "\u0645\u0627\u0631\u0633", + "\u0622\u0648\u0631\u06cc\u0644", + "\u0645\u0647\u0654", + "\u0698\u0648\u0626\u0646", + "\u0698\u0648\u0626\u06cc\u0647\u0654", + "\u0627\u0648\u062a", + "\u0633\u067e\u062a\u0627\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0628\u0631", + "\u0646\u0648\u0627\u0645\u0628\u0631", + "\u062f\u0633\u0627\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u0698\u0627\u0646\u0648\u06cc\u0647", + "\u0641\u0648\u0631\u06cc\u0647", + "\u0645\u0627\u0631\u0633", + "\u0622\u0648\u0631\u06cc\u0644", + "\u0645\u0647", + "\u0698\u0648\u0626\u0646", + "\u0698\u0648\u0626\u06cc\u0647", + "\u0627\u0648\u062a", + "\u0633\u067e\u062a\u0627\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0628\u0631", + "\u0646\u0648\u0627\u0645\u0628\u0631", + "\u062f\u0633\u0627\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 4, + 4 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y H:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "H:mm:ss", + "short": "y/M/d H:mm", + "shortDate": "y/M/d", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rial", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "\u061c-", + "negSuf": "\u00a0\u061c\u00a4", + "posPre": "", + "posSuf": "\u00a0\u061c\u00a4" + } + ] + }, + "id": "fa-ir", + "localeID": "fa_IR", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fa.js b/1.6.6/i18n/angular-locale_fa.js new file mode 100644 index 000000000..6ab028b20 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fa.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0642\u0628\u0644\u200c\u0627\u0632\u0638\u0647\u0631", + "\u0628\u0639\u062f\u0627\u0632\u0638\u0647\u0631" + ], + "DAY": [ + "\u06cc\u06a9\u0634\u0646\u0628\u0647", + "\u062f\u0648\u0634\u0646\u0628\u0647", + "\u0633\u0647\u200c\u0634\u0646\u0628\u0647", + "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647", + "\u067e\u0646\u062c\u0634\u0646\u0628\u0647", + "\u062c\u0645\u0639\u0647", + "\u0634\u0646\u0628\u0647" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0627\u0632 \u0645\u06cc\u0644\u0627\u062f", + "\u0645\u06cc\u0644\u0627\u062f\u06cc" + ], + "ERAS": [ + "\u0642.\u0645.", + "\u0645." + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u0698\u0627\u0646\u0648\u06cc\u0647\u0654", + "\u0641\u0648\u0631\u06cc\u0647\u0654", + "\u0645\u0627\u0631\u0633", + "\u0622\u0648\u0631\u06cc\u0644", + "\u0645\u0647\u0654", + "\u0698\u0648\u0626\u0646", + "\u0698\u0648\u0626\u06cc\u0647\u0654", + "\u0627\u0648\u062a", + "\u0633\u067e\u062a\u0627\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0628\u0631", + "\u0646\u0648\u0627\u0645\u0628\u0631", + "\u062f\u0633\u0627\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u06cc\u06a9\u0634\u0646\u0628\u0647", + "\u062f\u0648\u0634\u0646\u0628\u0647", + "\u0633\u0647\u200c\u0634\u0646\u0628\u0647", + "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647", + "\u067e\u0646\u062c\u0634\u0646\u0628\u0647", + "\u062c\u0645\u0639\u0647", + "\u0634\u0646\u0628\u0647" + ], + "SHORTMONTH": [ + "\u0698\u0627\u0646\u0648\u06cc\u0647\u0654", + "\u0641\u0648\u0631\u06cc\u0647\u0654", + "\u0645\u0627\u0631\u0633", + "\u0622\u0648\u0631\u06cc\u0644", + "\u0645\u0647\u0654", + "\u0698\u0648\u0626\u0646", + "\u0698\u0648\u0626\u06cc\u0647\u0654", + "\u0627\u0648\u062a", + "\u0633\u067e\u062a\u0627\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0628\u0631", + "\u0646\u0648\u0627\u0645\u0628\u0631", + "\u062f\u0633\u0627\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u0698\u0627\u0646\u0648\u06cc\u0647", + "\u0641\u0648\u0631\u06cc\u0647", + "\u0645\u0627\u0631\u0633", + "\u0622\u0648\u0631\u06cc\u0644", + "\u0645\u0647", + "\u0698\u0648\u0626\u0646", + "\u0698\u0648\u0626\u06cc\u0647", + "\u0627\u0648\u062a", + "\u0633\u067e\u062a\u0627\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0628\u0631", + "\u0646\u0648\u0627\u0645\u0628\u0631", + "\u062f\u0633\u0627\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 4, + 4 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y H:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "H:mm:ss", + "short": "y/M/d H:mm", + "shortDate": "y/M/d", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rial", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u061c-", + "negSuf": "\u00a0\u061c\u00a4", + "posPre": "", + "posSuf": "\u00a0\u061c\u00a4" + } + ] + }, + "id": "fa", + "localeID": "fa", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ff-cm.js b/1.6.6/i18n/angular-locale_ff-cm.js new file mode 100644 index 000000000..dddcf6a46 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ff-cm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "subaka", + "kikii\u0257e" + ], + "DAY": [ + "dewo", + "aa\u0253nde", + "mawbaare", + "njeslaare", + "naasaande", + "mawnde", + "hoore-biir" + ], + "ERANAMES": [ + "Hade Iisa", + "Caggal Iisa" + ], + "ERAS": [ + "H-I", + "C-I" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "siilo", + "colte", + "mbooy", + "see\u0257to", + "duujal", + "korse", + "morso", + "juko", + "siilto", + "yarkomaa", + "jolal", + "bowte" + ], + "SHORTDAY": [ + "dew", + "aa\u0253", + "maw", + "nje", + "naa", + "mwd", + "hbi" + ], + "SHORTMONTH": [ + "sii", + "col", + "mbo", + "see", + "duu", + "kor", + "mor", + "juk", + "slt", + "yar", + "jol", + "bow" + ], + "STANDALONEMONTH": [ + "siilo", + "colte", + "mbooy", + "see\u0257to", + "duujal", + "korse", + "morso", + "juko", + "siilto", + "yarkomaa", + "jolal", + "bowte" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ff-cm", + "localeID": "ff_CM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ff-gn.js b/1.6.6/i18n/angular-locale_ff-gn.js new file mode 100644 index 000000000..80832377d --- /dev/null +++ b/1.6.6/i18n/angular-locale_ff-gn.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "subaka", + "kikii\u0257e" + ], + "DAY": [ + "dewo", + "aa\u0253nde", + "mawbaare", + "njeslaare", + "naasaande", + "mawnde", + "hoore-biir" + ], + "ERANAMES": [ + "Hade Iisa", + "Caggal Iisa" + ], + "ERAS": [ + "H-I", + "C-I" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "siilo", + "colte", + "mbooy", + "see\u0257to", + "duujal", + "korse", + "morso", + "juko", + "siilto", + "yarkomaa", + "jolal", + "bowte" + ], + "SHORTDAY": [ + "dew", + "aa\u0253", + "maw", + "nje", + "naa", + "mwd", + "hbi" + ], + "SHORTMONTH": [ + "sii", + "col", + "mbo", + "see", + "duu", + "kor", + "mor", + "juk", + "slt", + "yar", + "jol", + "bow" + ], + "STANDALONEMONTH": [ + "siilo", + "colte", + "mbooy", + "see\u0257to", + "duujal", + "korse", + "morso", + "juko", + "siilto", + "yarkomaa", + "jolal", + "bowte" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FG", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ff-gn", + "localeID": "ff_GN", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ff-mr.js b/1.6.6/i18n/angular-locale_ff-mr.js new file mode 100644 index 000000000..b7712c83a --- /dev/null +++ b/1.6.6/i18n/angular-locale_ff-mr.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "subaka", + "kikii\u0257e" + ], + "DAY": [ + "dewo", + "aa\u0253nde", + "mawbaare", + "njeslaare", + "naasaande", + "mawnde", + "hoore-biir" + ], + "ERANAMES": [ + "Hade Iisa", + "Caggal Iisa" + ], + "ERAS": [ + "H-I", + "C-I" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "siilo", + "colte", + "mbooy", + "see\u0257to", + "duujal", + "korse", + "morso", + "juko", + "siilto", + "yarkomaa", + "jolal", + "bowte" + ], + "SHORTDAY": [ + "dew", + "aa\u0253", + "maw", + "nje", + "naa", + "mwd", + "hbi" + ], + "SHORTMONTH": [ + "sii", + "col", + "mbo", + "see", + "duu", + "kor", + "mor", + "juk", + "slt", + "yar", + "jol", + "bow" + ], + "STANDALONEMONTH": [ + "siilo", + "colte", + "mbooy", + "see\u0257to", + "duujal", + "korse", + "morso", + "juko", + "siilto", + "yarkomaa", + "jolal", + "bowte" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y h:mm:ss a", + "mediumDate": "d MMM, y", + "mediumTime": "h:mm:ss a", + "short": "d/M/y h:mm a", + "shortDate": "d/M/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "MRO", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ff-mr", + "localeID": "ff_MR", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ff-sn.js b/1.6.6/i18n/angular-locale_ff-sn.js new file mode 100644 index 000000000..9ea9a8acf --- /dev/null +++ b/1.6.6/i18n/angular-locale_ff-sn.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "subaka", + "kikii\u0257e" + ], + "DAY": [ + "dewo", + "aa\u0253nde", + "mawbaare", + "njeslaare", + "naasaande", + "mawnde", + "hoore-biir" + ], + "ERANAMES": [ + "Hade Iisa", + "Caggal Iisa" + ], + "ERAS": [ + "H-I", + "C-I" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "siilo", + "colte", + "mbooy", + "see\u0257to", + "duujal", + "korse", + "morso", + "juko", + "siilto", + "yarkomaa", + "jolal", + "bowte" + ], + "SHORTDAY": [ + "dew", + "aa\u0253", + "maw", + "nje", + "naa", + "mwd", + "hbi" + ], + "SHORTMONTH": [ + "sii", + "col", + "mbo", + "see", + "duu", + "kor", + "mor", + "juk", + "slt", + "yar", + "jol", + "bow" + ], + "STANDALONEMONTH": [ + "siilo", + "colte", + "mbooy", + "see\u0257to", + "duujal", + "korse", + "morso", + "juko", + "siilto", + "yarkomaa", + "jolal", + "bowte" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ff-sn", + "localeID": "ff_SN", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ff.js b/1.6.6/i18n/angular-locale_ff.js new file mode 100644 index 000000000..da4684f76 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ff.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "subaka", + "kikii\u0257e" + ], + "DAY": [ + "dewo", + "aa\u0253nde", + "mawbaare", + "njeslaare", + "naasaande", + "mawnde", + "hoore-biir" + ], + "ERANAMES": [ + "Hade Iisa", + "Caggal Iisa" + ], + "ERAS": [ + "H-I", + "C-I" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "siilo", + "colte", + "mbooy", + "see\u0257to", + "duujal", + "korse", + "morso", + "juko", + "siilto", + "yarkomaa", + "jolal", + "bowte" + ], + "SHORTDAY": [ + "dew", + "aa\u0253", + "maw", + "nje", + "naa", + "mwd", + "hbi" + ], + "SHORTMONTH": [ + "sii", + "col", + "mbo", + "see", + "duu", + "kor", + "mor", + "juk", + "slt", + "yar", + "jol", + "bow" + ], + "STANDALONEMONTH": [ + "siilo", + "colte", + "mbooy", + "see\u0257to", + "duujal", + "korse", + "morso", + "juko", + "siilto", + "yarkomaa", + "jolal", + "bowte" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ff", + "localeID": "ff", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fi-fi.js b/1.6.6/i18n/angular-locale_fi-fi.js new file mode 100644 index 000000000..768dd4972 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fi-fi.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "ap.", + "ip." + ], + "DAY": [ + "sunnuntaina", + "maanantaina", + "tiistaina", + "keskiviikkona", + "torstaina", + "perjantaina", + "lauantaina" + ], + "ERANAMES": [ + "ennen Kristuksen syntym\u00e4\u00e4", + "j\u00e4lkeen Kristuksen syntym\u00e4n" + ], + "ERAS": [ + "eKr.", + "jKr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "tammikuuta", + "helmikuuta", + "maaliskuuta", + "huhtikuuta", + "toukokuuta", + "kes\u00e4kuuta", + "hein\u00e4kuuta", + "elokuuta", + "syyskuuta", + "lokakuuta", + "marraskuuta", + "joulukuuta" + ], + "SHORTDAY": [ + "su", + "ma", + "ti", + "ke", + "to", + "pe", + "la" + ], + "SHORTMONTH": [ + "tammik.", + "helmik.", + "maalisk.", + "huhtik.", + "toukok.", + "kes\u00e4k.", + "hein\u00e4k.", + "elok.", + "syysk.", + "lokak.", + "marrask.", + "jouluk." + ], + "STANDALONEMONTH": [ + "tammikuu", + "helmikuu", + "maaliskuu", + "huhtikuu", + "toukokuu", + "kes\u00e4kuu", + "hein\u00e4kuu", + "elokuu", + "syyskuu", + "lokakuu", + "marraskuu", + "joulukuu" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "cccc d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d.M.y H.mm.ss", + "mediumDate": "d.M.y", + "mediumTime": "H.mm.ss", + "short": "d.M.y H.mm", + "shortDate": "d.M.y", + "shortTime": "H.mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fi-fi", + "localeID": "fi_FI", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fi.js b/1.6.6/i18n/angular-locale_fi.js new file mode 100644 index 000000000..66d953d35 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fi.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "ap.", + "ip." + ], + "DAY": [ + "sunnuntaina", + "maanantaina", + "tiistaina", + "keskiviikkona", + "torstaina", + "perjantaina", + "lauantaina" + ], + "ERANAMES": [ + "ennen Kristuksen syntym\u00e4\u00e4", + "j\u00e4lkeen Kristuksen syntym\u00e4n" + ], + "ERAS": [ + "eKr.", + "jKr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "tammikuuta", + "helmikuuta", + "maaliskuuta", + "huhtikuuta", + "toukokuuta", + "kes\u00e4kuuta", + "hein\u00e4kuuta", + "elokuuta", + "syyskuuta", + "lokakuuta", + "marraskuuta", + "joulukuuta" + ], + "SHORTDAY": [ + "su", + "ma", + "ti", + "ke", + "to", + "pe", + "la" + ], + "SHORTMONTH": [ + "tammik.", + "helmik.", + "maalisk.", + "huhtik.", + "toukok.", + "kes\u00e4k.", + "hein\u00e4k.", + "elok.", + "syysk.", + "lokak.", + "marrask.", + "jouluk." + ], + "STANDALONEMONTH": [ + "tammikuu", + "helmikuu", + "maaliskuu", + "huhtikuu", + "toukokuu", + "kes\u00e4kuu", + "hein\u00e4kuu", + "elokuu", + "syyskuu", + "lokakuu", + "marraskuu", + "joulukuu" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "cccc d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d.M.y H.mm.ss", + "mediumDate": "d.M.y", + "mediumTime": "H.mm.ss", + "short": "d.M.y H.mm", + "shortDate": "d.M.y", + "shortTime": "H.mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fi", + "localeID": "fi", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fil-ph.js b/1.6.6/i18n/angular-locale_fil-ph.js new file mode 100644 index 000000000..2d222db09 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fil-ph.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Linggo", + "Lunes", + "Martes", + "Miyerkules", + "Huwebes", + "Biyernes", + "Sabado" + ], + "ERANAMES": [ + "BC", + "AD" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Enero", + "Pebrero", + "Marso", + "Abril", + "Mayo", + "Hunyo", + "Hulyo", + "Agosto", + "Setyembre", + "Oktubre", + "Nobyembre", + "Disyembre" + ], + "SHORTDAY": [ + "Lin", + "Lun", + "Mar", + "Miy", + "Huw", + "Biy", + "Sab" + ], + "SHORTMONTH": [ + "Ene", + "Peb", + "Mar", + "Abr", + "May", + "Hun", + "Hul", + "Ago", + "Set", + "Okt", + "Nob", + "Dis" + ], + "STANDALONEMONTH": [ + "Enero", + "Pebrero", + "Marso", + "Abril", + "Mayo", + "Hunyo", + "Hulyo", + "Agosto", + "Setyembre", + "Oktubre", + "Nobyembre", + "Disyembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b1", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "fil-ph", + "localeID": "fil_PH", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && (i == 1 || i == 2 || i == 3) || vf.v == 0 && i % 10 != 4 && i % 10 != 6 && i % 10 != 9 || vf.v != 0 && vf.f % 10 != 4 && vf.f % 10 != 6 && vf.f % 10 != 9) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fil.js b/1.6.6/i18n/angular-locale_fil.js new file mode 100644 index 000000000..b7e3074e9 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fil.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Linggo", + "Lunes", + "Martes", + "Miyerkules", + "Huwebes", + "Biyernes", + "Sabado" + ], + "ERANAMES": [ + "BC", + "AD" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Enero", + "Pebrero", + "Marso", + "Abril", + "Mayo", + "Hunyo", + "Hulyo", + "Agosto", + "Setyembre", + "Oktubre", + "Nobyembre", + "Disyembre" + ], + "SHORTDAY": [ + "Lin", + "Lun", + "Mar", + "Miy", + "Huw", + "Biy", + "Sab" + ], + "SHORTMONTH": [ + "Ene", + "Peb", + "Mar", + "Abr", + "May", + "Hun", + "Hul", + "Ago", + "Set", + "Okt", + "Nob", + "Dis" + ], + "STANDALONEMONTH": [ + "Enero", + "Pebrero", + "Marso", + "Abril", + "Mayo", + "Hunyo", + "Hulyo", + "Agosto", + "Setyembre", + "Oktubre", + "Nobyembre", + "Disyembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b1", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "fil", + "localeID": "fil", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && (i == 1 || i == 2 || i == 3) || vf.v == 0 && i % 10 != 4 && i % 10 != 6 && i % 10 != 9 || vf.v != 0 && vf.f % 10 != 4 && vf.f % 10 != 6 && vf.f % 10 != 9) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fo-dk.js b/1.6.6/i18n/angular-locale_fo-dk.js new file mode 100644 index 000000000..a393d2099 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fo-dk.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "sunnudagur", + "m\u00e1nadagur", + "t\u00fdsdagur", + "mikudagur", + "h\u00f3sdagur", + "fr\u00edggjadagur", + "leygardagur" + ], + "ERANAMES": [ + "fyri Krist", + "eftir Krist" + ], + "ERAS": [ + "f.Kr.", + "e.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "mars", + "apr\u00edl", + "mai", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "desember" + ], + "SHORTDAY": [ + "sun.", + "m\u00e1n.", + "t\u00fds.", + "mik.", + "h\u00f3s.", + "fr\u00ed.", + "ley." + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mar.", + "apr.", + "mai", + "jun.", + "jul.", + "aug.", + "sep.", + "okt.", + "nov.", + "des." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "mars", + "apr\u00edl", + "mai", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "desember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "dd.MM.y HH:mm:ss", + "mediumDate": "dd.MM.y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr.", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fo-dk", + "localeID": "fo_DK", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fo-fo.js b/1.6.6/i18n/angular-locale_fo-fo.js new file mode 100644 index 000000000..268911fc6 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fo-fo.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "sunnudagur", + "m\u00e1nadagur", + "t\u00fdsdagur", + "mikudagur", + "h\u00f3sdagur", + "fr\u00edggjadagur", + "leygardagur" + ], + "ERANAMES": [ + "fyri Krist", + "eftir Krist" + ], + "ERAS": [ + "f.Kr.", + "e.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "mars", + "apr\u00edl", + "mai", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "desember" + ], + "SHORTDAY": [ + "sun.", + "m\u00e1n.", + "t\u00fds.", + "mik.", + "h\u00f3s.", + "fr\u00ed.", + "ley." + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mar.", + "apr.", + "mai", + "jun.", + "jul.", + "aug.", + "sep.", + "okt.", + "nov.", + "des." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "mars", + "apr\u00edl", + "mai", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "desember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "dd.MM.y HH:mm:ss", + "mediumDate": "dd.MM.y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr.", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fo-fo", + "localeID": "fo_FO", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fo.js b/1.6.6/i18n/angular-locale_fo.js new file mode 100644 index 000000000..67ef90733 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fo.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "sunnudagur", + "m\u00e1nadagur", + "t\u00fdsdagur", + "mikudagur", + "h\u00f3sdagur", + "fr\u00edggjadagur", + "leygardagur" + ], + "ERANAMES": [ + "fyri Krist", + "eftir Krist" + ], + "ERAS": [ + "f.Kr.", + "e.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "mars", + "apr\u00edl", + "mai", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "desember" + ], + "SHORTDAY": [ + "sun.", + "m\u00e1n.", + "t\u00fds.", + "mik.", + "h\u00f3s.", + "fr\u00ed.", + "ley." + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mar.", + "apr.", + "mai", + "jun.", + "jul.", + "aug.", + "sep.", + "okt.", + "nov.", + "des." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "mars", + "apr\u00edl", + "mai", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "desember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "dd.MM.y HH:mm:ss", + "mediumDate": "dd.MM.y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr.", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fo", + "localeID": "fo", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-be.js b/1.6.6/i18n/angular-locale_fr-be.js new file mode 100644 index 000000000..4dff740c5 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-be.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/MM/yy HH:mm", + "shortDate": "d/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-be", + "localeID": "fr_BE", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-bf.js b/1.6.6/i18n/angular-locale_fr-bf.js new file mode 100644 index 000000000..d639bdef5 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-bf.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-bf", + "localeID": "fr_BF", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-bi.js b/1.6.6/i18n/angular-locale_fr-bi.js new file mode 100644 index 000000000..7634cc5f5 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-bi.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FBu", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-bi", + "localeID": "fr_BI", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-bj.js b/1.6.6/i18n/angular-locale_fr-bj.js new file mode 100644 index 000000000..225ab84be --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-bj.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-bj", + "localeID": "fr_BJ", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-bl.js b/1.6.6/i18n/angular-locale_fr-bl.js new file mode 100644 index 000000000..5a9e19916 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-bl.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-bl", + "localeID": "fr_BL", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-ca.js b/1.6.6/i18n/angular-locale_fr-ca.js new file mode 100644 index 000000000..9c0a227ea --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-ca.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juill.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "yy-MM-dd HH 'h' mm", + "shortDate": "yy-MM-dd", + "shortTime": "HH 'h' mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-ca", + "localeID": "fr_CA", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-cd.js b/1.6.6/i18n/angular-locale_fr-cd.js new file mode 100644 index 000000000..d1cdd40fd --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-cd.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FrCD", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-cd", + "localeID": "fr_CD", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-cf.js b/1.6.6/i18n/angular-locale_fr-cf.js new file mode 100644 index 000000000..b1f960048 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-cf.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-cf", + "localeID": "fr_CF", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-cg.js b/1.6.6/i18n/angular-locale_fr-cg.js new file mode 100644 index 000000000..d9c473645 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-cg.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-cg", + "localeID": "fr_CG", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-ch.js b/1.6.6/i18n/angular-locale_fr-ch.js new file mode 100644 index 000000000..ed698479b --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-ch.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CHF", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-ch", + "localeID": "fr_CH", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-ci.js b/1.6.6/i18n/angular-locale_fr-ci.js new file mode 100644 index 000000000..acd179729 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-ci.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-ci", + "localeID": "fr_CI", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-cm.js b/1.6.6/i18n/angular-locale_fr-cm.js new file mode 100644 index 000000000..2a8453a67 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-cm.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "matin", + "soir" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-cm", + "localeID": "fr_CM", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-dj.js b/1.6.6/i18n/angular-locale_fr-dj.js new file mode 100644 index 000000000..863cd9f84 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-dj.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Fdj", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-dj", + "localeID": "fr_DJ", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-dz.js b/1.6.6/i18n/angular-locale_fr-dz.js new file mode 100644 index 000000000..215db4621 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-dz.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-dz", + "localeID": "fr_DZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-fr.js b/1.6.6/i18n/angular-locale_fr-fr.js new file mode 100644 index 000000000..2e6dbbbbc --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-fr.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-fr", + "localeID": "fr_FR", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-ga.js b/1.6.6/i18n/angular-locale_fr-ga.js new file mode 100644 index 000000000..5722d4c88 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-ga.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-ga", + "localeID": "fr_GA", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-gf.js b/1.6.6/i18n/angular-locale_fr-gf.js new file mode 100644 index 000000000..172826d23 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-gf.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-gf", + "localeID": "fr_GF", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-gn.js b/1.6.6/i18n/angular-locale_fr-gn.js new file mode 100644 index 000000000..f0ea73ca7 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-gn.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FG", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-gn", + "localeID": "fr_GN", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-gp.js b/1.6.6/i18n/angular-locale_fr-gp.js new file mode 100644 index 000000000..3f2a2e875 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-gp.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-gp", + "localeID": "fr_GP", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-gq.js b/1.6.6/i18n/angular-locale_fr-gq.js new file mode 100644 index 000000000..e5a021f49 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-gq.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-gq", + "localeID": "fr_GQ", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-ht.js b/1.6.6/i18n/angular-locale_fr-ht.js new file mode 100644 index 000000000..0e1b439d9 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-ht.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "HTG", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-ht", + "localeID": "fr_HT", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-km.js b/1.6.6/i18n/angular-locale_fr-km.js new file mode 100644 index 000000000..945f80319 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-km.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CF", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-km", + "localeID": "fr_KM", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-lu.js b/1.6.6/i18n/angular-locale_fr-lu.js new file mode 100644 index 000000000..89e064284 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-lu.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-lu", + "localeID": "fr_LU", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-ma.js b/1.6.6/i18n/angular-locale_fr-ma.js new file mode 100644 index 000000000..33a62931d --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-ma.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "jan.", + "f\u00e9v.", + "mar.", + "avr.", + "mai", + "jui.", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "dh", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-ma", + "localeID": "fr_MA", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-mc.js b/1.6.6/i18n/angular-locale_fr-mc.js new file mode 100644 index 000000000..c87fbba8a --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-mc.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-mc", + "localeID": "fr_MC", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-mf.js b/1.6.6/i18n/angular-locale_fr-mf.js new file mode 100644 index 000000000..394556edb --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-mf.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-mf", + "localeID": "fr_MF", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-mg.js b/1.6.6/i18n/angular-locale_fr-mg.js new file mode 100644 index 000000000..5eaa9eed3 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-mg.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ar", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-mg", + "localeID": "fr_MG", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-ml.js b/1.6.6/i18n/angular-locale_fr-ml.js new file mode 100644 index 000000000..b6919e2d4 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-ml.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-ml", + "localeID": "fr_ML", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-mq.js b/1.6.6/i18n/angular-locale_fr-mq.js new file mode 100644 index 000000000..5afe4736e --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-mq.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-mq", + "localeID": "fr_MQ", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-mr.js b/1.6.6/i18n/angular-locale_fr-mr.js new file mode 100644 index 000000000..4ce2dc67a --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-mr.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "MRO", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-mr", + "localeID": "fr_MR", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-mu.js b/1.6.6/i18n/angular-locale_fr-mu.js new file mode 100644 index 000000000..0adcc0eac --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-mu.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "MURs", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-mu", + "localeID": "fr_MU", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-nc.js b/1.6.6/i18n/angular-locale_fr-nc.js new file mode 100644 index 000000000..9aeedbda3 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-nc.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFP", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-nc", + "localeID": "fr_NC", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-ne.js b/1.6.6/i18n/angular-locale_fr-ne.js new file mode 100644 index 000000000..ed930d61a --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-ne.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-ne", + "localeID": "fr_NE", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-pf.js b/1.6.6/i18n/angular-locale_fr-pf.js new file mode 100644 index 000000000..b4399ab91 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-pf.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFP", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-pf", + "localeID": "fr_PF", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-pm.js b/1.6.6/i18n/angular-locale_fr-pm.js new file mode 100644 index 000000000..bfd13dcea --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-pm.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-pm", + "localeID": "fr_PM", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-re.js b/1.6.6/i18n/angular-locale_fr-re.js new file mode 100644 index 000000000..36cec1f97 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-re.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-re", + "localeID": "fr_RE", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-rw.js b/1.6.6/i18n/angular-locale_fr-rw.js new file mode 100644 index 000000000..684b739c5 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-rw.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "RF", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-rw", + "localeID": "fr_RW", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-sc.js b/1.6.6/i18n/angular-locale_fr-sc.js new file mode 100644 index 000000000..a74c1059b --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-sc.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "SCR", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-sc", + "localeID": "fr_SC", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-sn.js b/1.6.6/i18n/angular-locale_fr-sn.js new file mode 100644 index 000000000..e4b33942d --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-sn.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-sn", + "localeID": "fr_SN", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-sy.js b/1.6.6/i18n/angular-locale_fr-sy.js new file mode 100644 index 000000000..7d4145aaf --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-sy.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-sy", + "localeID": "fr_SY", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-td.js b/1.6.6/i18n/angular-locale_fr-td.js new file mode 100644 index 000000000..ee43b39d9 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-td.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-td", + "localeID": "fr_TD", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-tg.js b/1.6.6/i18n/angular-locale_fr-tg.js new file mode 100644 index 000000000..eac965e92 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-tg.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-tg", + "localeID": "fr_TG", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-tn.js b/1.6.6/i18n/angular-locale_fr-tn.js new file mode 100644 index 000000000..158c8616a --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-tn.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 3, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-tn", + "localeID": "fr_TN", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-vu.js b/1.6.6/i18n/angular-locale_fr-vu.js new file mode 100644 index 000000000..874be5ef5 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-vu.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "VUV", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-vu", + "localeID": "fr_VU", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-wf.js b/1.6.6/i18n/angular-locale_fr-wf.js new file mode 100644 index 000000000..02f22ed66 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-wf.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFP", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-wf", + "localeID": "fr_WF", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr-yt.js b/1.6.6/i18n/angular-locale_fr-yt.js new file mode 100644 index 000000000..b98fd3afb --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr-yt.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr-yt", + "localeID": "fr_YT", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fr.js b/1.6.6/i18n/angular-locale_fr.js new file mode 100644 index 000000000..55c6bb2b6 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fr.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "ERANAMES": [ + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ" + ], + "ERAS": [ + "av. J.-C.", + "ap. J.-C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "STANDALONEMONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr", + "localeID": "fr", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fur-it.js b/1.6.6/i18n/angular-locale_fur-it.js new file mode 100644 index 000000000..4b5472cc0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fur-it.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.", + "p." + ], + "DAY": [ + "domenie", + "lunis", + "martars", + "miercus", + "joibe", + "vinars", + "sabide" + ], + "ERANAMES": [ + "pdC", + "ddC" + ], + "ERAS": [ + "pdC", + "ddC" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Zen\u00e2r", + "Fevr\u00e2r", + "Mar\u00e7", + "Avr\u00eel", + "Mai", + "Jugn", + "Lui", + "Avost", + "Setembar", + "Otubar", + "Novembar", + "Dicembar" + ], + "SHORTDAY": [ + "dom", + "lun", + "mar", + "mie", + "joi", + "vin", + "sab" + ], + "SHORTMONTH": [ + "Zen", + "Fev", + "Mar", + "Avr", + "Mai", + "Jug", + "Lui", + "Avo", + "Set", + "Otu", + "Nov", + "Dic" + ], + "STANDALONEMONTH": [ + "Zen\u00e2r", + "Fevr\u00e2r", + "Mar\u00e7", + "Avr\u00eel", + "Mai", + "Jugn", + "Lui", + "Avost", + "Setembar", + "Otubar", + "Novembar", + "Dicembar" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d 'di' MMMM 'dal' y", + "longDate": "d 'di' MMMM 'dal' y", + "medium": "dd/MM/y HH:mm:ss", + "mediumDate": "dd/MM/y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "fur-it", + "localeID": "fur_IT", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fur.js b/1.6.6/i18n/angular-locale_fur.js new file mode 100644 index 000000000..f25f4409c --- /dev/null +++ b/1.6.6/i18n/angular-locale_fur.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.", + "p." + ], + "DAY": [ + "domenie", + "lunis", + "martars", + "miercus", + "joibe", + "vinars", + "sabide" + ], + "ERANAMES": [ + "pdC", + "ddC" + ], + "ERAS": [ + "pdC", + "ddC" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Zen\u00e2r", + "Fevr\u00e2r", + "Mar\u00e7", + "Avr\u00eel", + "Mai", + "Jugn", + "Lui", + "Avost", + "Setembar", + "Otubar", + "Novembar", + "Dicembar" + ], + "SHORTDAY": [ + "dom", + "lun", + "mar", + "mie", + "joi", + "vin", + "sab" + ], + "SHORTMONTH": [ + "Zen", + "Fev", + "Mar", + "Avr", + "Mai", + "Jug", + "Lui", + "Avo", + "Set", + "Otu", + "Nov", + "Dic" + ], + "STANDALONEMONTH": [ + "Zen\u00e2r", + "Fevr\u00e2r", + "Mar\u00e7", + "Avr\u00eel", + "Mai", + "Jugn", + "Lui", + "Avost", + "Setembar", + "Otubar", + "Novembar", + "Dicembar" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d 'di' MMMM 'dal' y", + "longDate": "d 'di' MMMM 'dal' y", + "medium": "dd/MM/y HH:mm:ss", + "mediumDate": "dd/MM/y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "fur", + "localeID": "fur", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fy-nl.js b/1.6.6/i18n/angular-locale_fy-nl.js new file mode 100644 index 000000000..33e138ee0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fy-nl.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "snein", + "moandei", + "tiisdei", + "woansdei", + "tongersdei", + "freed", + "sneon" + ], + "ERANAMES": [ + "Foar Kristus", + "nei Kristus" + ], + "ERAS": [ + "f.Kr.", + "n.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Jannewaris", + "Febrewaris", + "Maart", + "April", + "Maaie", + "Juny", + "July", + "Augustus", + "Septimber", + "Oktober", + "Novimber", + "Desimber" + ], + "SHORTDAY": [ + "si", + "mo", + "ti", + "wo", + "to", + "fr", + "so" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mrt", + "Apr", + "Mai", + "Jun", + "Jul", + "Aug", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Jannewaris", + "Febrewaris", + "Maart", + "April", + "Maaie", + "Juny", + "July", + "Augustus", + "Septimber", + "Oktober", + "Novimber", + "Desimber" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd-MM-yy HH:mm", + "shortDate": "dd-MM-yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u00a4\u00a0", + "negSuf": "-", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "fy-nl", + "localeID": "fy_NL", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_fy.js b/1.6.6/i18n/angular-locale_fy.js new file mode 100644 index 000000000..c11f46376 --- /dev/null +++ b/1.6.6/i18n/angular-locale_fy.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "snein", + "moandei", + "tiisdei", + "woansdei", + "tongersdei", + "freed", + "sneon" + ], + "ERANAMES": [ + "Foar Kristus", + "nei Kristus" + ], + "ERAS": [ + "f.Kr.", + "n.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Jannewaris", + "Febrewaris", + "Maart", + "April", + "Maaie", + "Juny", + "July", + "Augustus", + "Septimber", + "Oktober", + "Novimber", + "Desimber" + ], + "SHORTDAY": [ + "si", + "mo", + "ti", + "wo", + "to", + "fr", + "so" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mrt", + "Apr", + "Mai", + "Jun", + "Jul", + "Aug", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Jannewaris", + "Febrewaris", + "Maart", + "April", + "Maaie", + "Juny", + "July", + "Augustus", + "Septimber", + "Oktober", + "Novimber", + "Desimber" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd-MM-yy HH:mm", + "shortDate": "dd-MM-yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u00a4\u00a0", + "negSuf": "-", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "fy", + "localeID": "fy", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ga-ie.js b/1.6.6/i18n/angular-locale_ga-ie.js new file mode 100644 index 000000000..13b91b7d2 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ga-ie.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "D\u00e9 Domhnaigh", + "D\u00e9 Luain", + "D\u00e9 M\u00e1irt", + "D\u00e9 C\u00e9adaoin", + "D\u00e9ardaoin", + "D\u00e9 hAoine", + "D\u00e9 Sathairn" + ], + "ERANAMES": [ + "Roimh Chr\u00edost", + "Anno Domini" + ], + "ERAS": [ + "RC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Ean\u00e1ir", + "Feabhra", + "M\u00e1rta", + "Aibre\u00e1n", + "Bealtaine", + "Meitheamh", + "I\u00fail", + "L\u00fanasa", + "Me\u00e1n F\u00f3mhair", + "Deireadh F\u00f3mhair", + "Samhain", + "Nollaig" + ], + "SHORTDAY": [ + "Domh", + "Luan", + "M\u00e1irt", + "C\u00e9ad", + "D\u00e9ar", + "Aoine", + "Sath" + ], + "SHORTMONTH": [ + "Ean", + "Feabh", + "M\u00e1rta", + "Aib", + "Beal", + "Meith", + "I\u00fail", + "L\u00fan", + "MF\u00f3mh", + "DF\u00f3mh", + "Samh", + "Noll" + ], + "STANDALONEMONTH": [ + "Ean\u00e1ir", + "Feabhra", + "M\u00e1rta", + "Aibre\u00e1n", + "Bealtaine", + "Meitheamh", + "I\u00fail", + "L\u00fanasa", + "Me\u00e1n F\u00f3mhair", + "Deireadh F\u00f3mhair", + "Samhain", + "Nollaig" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ga-ie", + "localeID": "ga_IE", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n >= 3 && n <= 6) { return PLURAL_CATEGORY.FEW; } if (n >= 7 && n <= 10) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ga.js b/1.6.6/i18n/angular-locale_ga.js new file mode 100644 index 000000000..6aa830ada --- /dev/null +++ b/1.6.6/i18n/angular-locale_ga.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "D\u00e9 Domhnaigh", + "D\u00e9 Luain", + "D\u00e9 M\u00e1irt", + "D\u00e9 C\u00e9adaoin", + "D\u00e9ardaoin", + "D\u00e9 hAoine", + "D\u00e9 Sathairn" + ], + "ERANAMES": [ + "Roimh Chr\u00edost", + "Anno Domini" + ], + "ERAS": [ + "RC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Ean\u00e1ir", + "Feabhra", + "M\u00e1rta", + "Aibre\u00e1n", + "Bealtaine", + "Meitheamh", + "I\u00fail", + "L\u00fanasa", + "Me\u00e1n F\u00f3mhair", + "Deireadh F\u00f3mhair", + "Samhain", + "Nollaig" + ], + "SHORTDAY": [ + "Domh", + "Luan", + "M\u00e1irt", + "C\u00e9ad", + "D\u00e9ar", + "Aoine", + "Sath" + ], + "SHORTMONTH": [ + "Ean", + "Feabh", + "M\u00e1rta", + "Aib", + "Beal", + "Meith", + "I\u00fail", + "L\u00fan", + "MF\u00f3mh", + "DF\u00f3mh", + "Samh", + "Noll" + ], + "STANDALONEMONTH": [ + "Ean\u00e1ir", + "Feabhra", + "M\u00e1rta", + "Aibre\u00e1n", + "Bealtaine", + "Meitheamh", + "I\u00fail", + "L\u00fanasa", + "Me\u00e1n F\u00f3mhair", + "Deireadh F\u00f3mhair", + "Samhain", + "Nollaig" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ga", + "localeID": "ga", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n >= 3 && n <= 6) { return PLURAL_CATEGORY.FEW; } if (n >= 7 && n <= 10) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_gd-gb.js b/1.6.6/i18n/angular-locale_gd-gb.js new file mode 100644 index 000000000..732788c04 --- /dev/null +++ b/1.6.6/i18n/angular-locale_gd-gb.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "m", + "f" + ], + "DAY": [ + "DiD\u00f2mhnaich", + "DiLuain", + "DiM\u00e0irt", + "DiCiadain", + "DiarDaoin", + "DihAoine", + "DiSathairne" + ], + "ERANAMES": [ + "Ro Chr\u00ecosta", + "An d\u00e8idh Chr\u00ecosta" + ], + "ERAS": [ + "RC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "dhen Fhaoilleach", + "dhen Ghearran", + "dhen Mh\u00e0rt", + "dhen Ghiblean", + "dhen Ch\u00e8itean", + "dhen \u00d2gmhios", + "dhen Iuchar", + "dhen L\u00f9nastal", + "dhen t-Sultain", + "dhen D\u00e0mhair", + "dhen t-Samhain", + "dhen D\u00f9bhlachd" + ], + "SHORTDAY": [ + "DiD", + "DiL", + "DiM", + "DiC", + "Dia", + "Dih", + "DiS" + ], + "SHORTMONTH": [ + "Faoi", + "Gearr", + "M\u00e0rt", + "Gibl", + "C\u00e8it", + "\u00d2gmh", + "Iuch", + "L\u00f9na", + "Sult", + "D\u00e0mh", + "Samh", + "D\u00f9bh" + ], + "STANDALONEMONTH": [ + "Am Faoilleach", + "An Gearran", + "Am M\u00e0rt", + "An Giblean", + "An C\u00e8itean", + "An t-\u00d2gmhios", + "An t-Iuchar", + "An L\u00f9nastal", + "An t-Sultain", + "An D\u00e0mhair", + "An t-Samhain", + "An D\u00f9bhlachd" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d'mh' MMMM y", + "longDate": "d'mh' MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "gd-gb", + "localeID": "gd_GB", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_gd.js b/1.6.6/i18n/angular-locale_gd.js new file mode 100644 index 000000000..e44083e77 --- /dev/null +++ b/1.6.6/i18n/angular-locale_gd.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "m", + "f" + ], + "DAY": [ + "DiD\u00f2mhnaich", + "DiLuain", + "DiM\u00e0irt", + "DiCiadain", + "DiarDaoin", + "DihAoine", + "DiSathairne" + ], + "ERANAMES": [ + "Ro Chr\u00ecosta", + "An d\u00e8idh Chr\u00ecosta" + ], + "ERAS": [ + "RC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "dhen Fhaoilleach", + "dhen Ghearran", + "dhen Mh\u00e0rt", + "dhen Ghiblean", + "dhen Ch\u00e8itean", + "dhen \u00d2gmhios", + "dhen Iuchar", + "dhen L\u00f9nastal", + "dhen t-Sultain", + "dhen D\u00e0mhair", + "dhen t-Samhain", + "dhen D\u00f9bhlachd" + ], + "SHORTDAY": [ + "DiD", + "DiL", + "DiM", + "DiC", + "Dia", + "Dih", + "DiS" + ], + "SHORTMONTH": [ + "Faoi", + "Gearr", + "M\u00e0rt", + "Gibl", + "C\u00e8it", + "\u00d2gmh", + "Iuch", + "L\u00f9na", + "Sult", + "D\u00e0mh", + "Samh", + "D\u00f9bh" + ], + "STANDALONEMONTH": [ + "Am Faoilleach", + "An Gearran", + "Am M\u00e0rt", + "An Giblean", + "An C\u00e8itean", + "An t-\u00d2gmhios", + "An t-Iuchar", + "An L\u00f9nastal", + "An t-Sultain", + "An D\u00e0mhair", + "An t-Samhain", + "An D\u00f9bhlachd" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d'mh' MMMM y", + "longDate": "d'mh' MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "gd", + "localeID": "gd", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_gl-es.js b/1.6.6/i18n/angular-locale_gl-es.js new file mode 100644 index 000000000..127afc48c --- /dev/null +++ b/1.6.6/i18n/angular-locale_gl-es.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "domingo", + "luns", + "martes", + "m\u00e9rcores", + "xoves", + "venres", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despois de Cristo" + ], + "ERAS": [ + "a.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "xaneiro", + "febreiro", + "marzo", + "abril", + "maio", + "xu\u00f1o", + "xullo", + "agosto", + "setembro", + "outubro", + "novembro", + "decembro" + ], + "SHORTDAY": [ + "dom.", + "luns", + "mar.", + "m\u00e9r.", + "xov.", + "ven.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "xan.", + "feb.", + "mar.", + "abr.", + "maio", + "xu\u00f1o", + "xul.", + "ago.", + "set.", + "out.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "Xaneiro", + "Febreiro", + "Marzo", + "Abril", + "Maio", + "Xu\u00f1o", + "Xullo", + "Agosto", + "Setembro", + "Outubro", + "Novembro", + "Decembro" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d 'de' MMM 'de' y HH:mm:ss", + "mediumDate": "d 'de' MMM 'de' y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "gl-es", + "localeID": "gl_ES", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_gl.js b/1.6.6/i18n/angular-locale_gl.js new file mode 100644 index 000000000..264b017c3 --- /dev/null +++ b/1.6.6/i18n/angular-locale_gl.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "domingo", + "luns", + "martes", + "m\u00e9rcores", + "xoves", + "venres", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despois de Cristo" + ], + "ERAS": [ + "a.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "xaneiro", + "febreiro", + "marzo", + "abril", + "maio", + "xu\u00f1o", + "xullo", + "agosto", + "setembro", + "outubro", + "novembro", + "decembro" + ], + "SHORTDAY": [ + "dom.", + "luns", + "mar.", + "m\u00e9r.", + "xov.", + "ven.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "xan.", + "feb.", + "mar.", + "abr.", + "maio", + "xu\u00f1o", + "xul.", + "ago.", + "set.", + "out.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "Xaneiro", + "Febreiro", + "Marzo", + "Abril", + "Maio", + "Xu\u00f1o", + "Xullo", + "Agosto", + "Setembro", + "Outubro", + "Novembro", + "Decembro" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d 'de' MMM 'de' y HH:mm:ss", + "mediumDate": "d 'de' MMM 'de' y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "gl", + "localeID": "gl", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_gsw-ch.js b/1.6.6/i18n/angular-locale_gsw-ch.js new file mode 100644 index 000000000..4dd95dbfa --- /dev/null +++ b/1.6.6/i18n/angular-locale_gsw-ch.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "am Vormittag", + "am Namittag" + ], + "DAY": [ + "Sunntig", + "M\u00e4\u00e4ntig", + "Ziischtig", + "Mittwuch", + "Dunschtig", + "Friitig", + "Samschtig" + ], + "ERANAMES": [ + "v. Chr.", + "n. Chr." + ], + "ERAS": [ + "v. Chr.", + "n. Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "Auguscht", + "Sept\u00e4mber", + "Oktoober", + "Nov\u00e4mber", + "Dez\u00e4mber" + ], + "SHORTDAY": [ + "Su.", + "M\u00e4.", + "Zi.", + "Mi.", + "Du.", + "Fr.", + "Sa." + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "M\u00e4r", + "Apr", + "Mai", + "Jun", + "Jul", + "Aug", + "Sep", + "Okt", + "Nov", + "Dez" + ], + "STANDALONEMONTH": [ + "Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "Auguscht", + "Sept\u00e4mber", + "Oktoober", + "Nov\u00e4mber", + "Dez\u00e4mber" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "dd.MM.y HH:mm:ss", + "mediumDate": "dd.MM.y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CHF", + "DECIMAL_SEP": ".", + "GROUP_SEP": "\u2019", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "gsw-ch", + "localeID": "gsw_CH", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_gsw-fr.js b/1.6.6/i18n/angular-locale_gsw-fr.js new file mode 100644 index 000000000..74dd423d4 --- /dev/null +++ b/1.6.6/i18n/angular-locale_gsw-fr.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "am Vormittag", + "am Namittag" + ], + "DAY": [ + "Sunntig", + "M\u00e4\u00e4ntig", + "Ziischtig", + "Mittwuch", + "Dunschtig", + "Friitig", + "Samschtig" + ], + "ERANAMES": [ + "v. Chr.", + "n. Chr." + ], + "ERAS": [ + "v. Chr.", + "n. Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "Auguscht", + "Sept\u00e4mber", + "Oktoober", + "Nov\u00e4mber", + "Dez\u00e4mber" + ], + "SHORTDAY": [ + "Su.", + "M\u00e4.", + "Zi.", + "Mi.", + "Du.", + "Fr.", + "Sa." + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "M\u00e4r", + "Apr", + "Mai", + "Jun", + "Jul", + "Aug", + "Sep", + "Okt", + "Nov", + "Dez" + ], + "STANDALONEMONTH": [ + "Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "Auguscht", + "Sept\u00e4mber", + "Oktoober", + "Nov\u00e4mber", + "Dez\u00e4mber" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "dd.MM.y HH:mm:ss", + "mediumDate": "dd.MM.y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ".", + "GROUP_SEP": "\u2019", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "gsw-fr", + "localeID": "gsw_FR", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_gsw-li.js b/1.6.6/i18n/angular-locale_gsw-li.js new file mode 100644 index 000000000..a13d6ec20 --- /dev/null +++ b/1.6.6/i18n/angular-locale_gsw-li.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "am Vormittag", + "am Namittag" + ], + "DAY": [ + "Sunntig", + "M\u00e4\u00e4ntig", + "Ziischtig", + "Mittwuch", + "Dunschtig", + "Friitig", + "Samschtig" + ], + "ERANAMES": [ + "v. Chr.", + "n. Chr." + ], + "ERAS": [ + "v. Chr.", + "n. Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "Auguscht", + "Sept\u00e4mber", + "Oktoober", + "Nov\u00e4mber", + "Dez\u00e4mber" + ], + "SHORTDAY": [ + "Su.", + "M\u00e4.", + "Zi.", + "Mi.", + "Du.", + "Fr.", + "Sa." + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "M\u00e4r", + "Apr", + "Mai", + "Jun", + "Jul", + "Aug", + "Sep", + "Okt", + "Nov", + "Dez" + ], + "STANDALONEMONTH": [ + "Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "Auguscht", + "Sept\u00e4mber", + "Oktoober", + "Nov\u00e4mber", + "Dez\u00e4mber" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "dd.MM.y HH:mm:ss", + "mediumDate": "dd.MM.y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CHF", + "DECIMAL_SEP": ".", + "GROUP_SEP": "\u2019", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "gsw-li", + "localeID": "gsw_LI", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_gsw.js b/1.6.6/i18n/angular-locale_gsw.js new file mode 100644 index 000000000..21bdc9821 --- /dev/null +++ b/1.6.6/i18n/angular-locale_gsw.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "am Vormittag", + "am Namittag" + ], + "DAY": [ + "Sunntig", + "M\u00e4\u00e4ntig", + "Ziischtig", + "Mittwuch", + "Dunschtig", + "Friitig", + "Samschtig" + ], + "ERANAMES": [ + "v. Chr.", + "n. Chr." + ], + "ERAS": [ + "v. Chr.", + "n. Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "Auguscht", + "Sept\u00e4mber", + "Oktoober", + "Nov\u00e4mber", + "Dez\u00e4mber" + ], + "SHORTDAY": [ + "Su.", + "M\u00e4.", + "Zi.", + "Mi.", + "Du.", + "Fr.", + "Sa." + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "M\u00e4r", + "Apr", + "Mai", + "Jun", + "Jul", + "Aug", + "Sep", + "Okt", + "Nov", + "Dez" + ], + "STANDALONEMONTH": [ + "Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "Auguscht", + "Sept\u00e4mber", + "Oktoober", + "Nov\u00e4mber", + "Dez\u00e4mber" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "dd.MM.y HH:mm:ss", + "mediumDate": "dd.MM.y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CHF", + "DECIMAL_SEP": ".", + "GROUP_SEP": "\u2019", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "gsw", + "localeID": "gsw", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_gu-in.js b/1.6.6/i18n/angular-locale_gu-in.js new file mode 100644 index 000000000..7596ea569 --- /dev/null +++ b/1.6.6/i18n/angular-locale_gu-in.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u0ab0\u0ab5\u0abf\u0ab5\u0abe\u0ab0", + "\u0ab8\u0acb\u0aae\u0ab5\u0abe\u0ab0", + "\u0aae\u0a82\u0a97\u0ab3\u0ab5\u0abe\u0ab0", + "\u0aac\u0ac1\u0aa7\u0ab5\u0abe\u0ab0", + "\u0a97\u0ac1\u0ab0\u0ac1\u0ab5\u0abe\u0ab0", + "\u0ab6\u0ac1\u0a95\u0acd\u0ab0\u0ab5\u0abe\u0ab0", + "\u0ab6\u0aa8\u0abf\u0ab5\u0abe\u0ab0" + ], + "ERANAMES": [ + "\u0a88\u0ab8\u0ab5\u0ac0\u0ab8\u0aa8 \u0aaa\u0ac2\u0ab0\u0acd\u0ab5\u0ac7", + "\u0a87\u0ab8\u0ab5\u0ac0\u0ab8\u0aa8" + ], + "ERAS": [ + "\u0a88.\u0ab8.\u0aaa\u0ac2\u0ab0\u0acd\u0ab5\u0ac7", + "\u0a88.\u0ab8." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1\u0a86\u0ab0\u0ac0", + "\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1\u0a86\u0ab0\u0ac0", + "\u0aae\u0abe\u0ab0\u0acd\u0a9a", + "\u0a8f\u0aaa\u0acd\u0ab0\u0abf\u0ab2", + "\u0aae\u0ac7", + "\u0a9c\u0ac2\u0aa8", + "\u0a9c\u0ac1\u0ab2\u0abe\u0a88", + "\u0a91\u0a97\u0ab8\u0acd\u0a9f", + "\u0ab8\u0aaa\u0acd\u0a9f\u0ac7\u0aae\u0acd\u0aac\u0ab0", + "\u0a91\u0a95\u0acd\u0a9f\u0acb\u0aac\u0ab0", + "\u0aa8\u0ab5\u0ac7\u0aae\u0acd\u0aac\u0ab0", + "\u0aa1\u0abf\u0ab8\u0ac7\u0aae\u0acd\u0aac\u0ab0" + ], + "SHORTDAY": [ + "\u0ab0\u0ab5\u0abf", + "\u0ab8\u0acb\u0aae", + "\u0aae\u0a82\u0a97\u0ab3", + "\u0aac\u0ac1\u0aa7", + "\u0a97\u0ac1\u0ab0\u0ac1", + "\u0ab6\u0ac1\u0a95\u0acd\u0ab0", + "\u0ab6\u0aa8\u0abf" + ], + "SHORTMONTH": [ + "\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1", + "\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1", + "\u0aae\u0abe\u0ab0\u0acd\u0a9a", + "\u0a8f\u0aaa\u0acd\u0ab0\u0abf\u0ab2", + "\u0aae\u0ac7", + "\u0a9c\u0ac2\u0aa8", + "\u0a9c\u0ac1\u0ab2\u0abe\u0a88", + "\u0a91\u0a97\u0ab8\u0acd\u0a9f", + "\u0ab8\u0aaa\u0acd\u0a9f\u0ac7", + "\u0a91\u0a95\u0acd\u0a9f\u0acb", + "\u0aa8\u0ab5\u0ac7", + "\u0aa1\u0abf\u0ab8\u0ac7" + ], + "STANDALONEMONTH": [ + "\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1\u0a86\u0ab0\u0ac0", + "\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1\u0a86\u0ab0\u0ac0", + "\u0aae\u0abe\u0ab0\u0acd\u0a9a", + "\u0a8f\u0aaa\u0acd\u0ab0\u0abf\u0ab2", + "\u0aae\u0ac7", + "\u0a9c\u0ac2\u0aa8", + "\u0a9c\u0ac1\u0ab2\u0abe\u0a88", + "\u0a91\u0a97\u0ab8\u0acd\u0a9f", + "\u0ab8\u0aaa\u0acd\u0a9f\u0ac7\u0aae\u0acd\u0aac\u0ab0", + "\u0a91\u0a95\u0acd\u0a9f\u0acb\u0aac\u0ab0", + "\u0aa8\u0ab5\u0ac7\u0aae\u0acd\u0aac\u0ab0", + "\u0aa1\u0abf\u0ab8\u0ac7\u0aae\u0acd\u0aac\u0ab0" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM, y hh:mm:ss a", + "mediumDate": "d MMM, y", + "mediumTime": "hh:mm:ss a", + "short": "d/M/yy hh:mm a", + "shortDate": "d/M/yy", + "shortTime": "hh:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "gu-in", + "localeID": "gu_IN", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_gu.js b/1.6.6/i18n/angular-locale_gu.js new file mode 100644 index 000000000..67f9a9eed --- /dev/null +++ b/1.6.6/i18n/angular-locale_gu.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u0ab0\u0ab5\u0abf\u0ab5\u0abe\u0ab0", + "\u0ab8\u0acb\u0aae\u0ab5\u0abe\u0ab0", + "\u0aae\u0a82\u0a97\u0ab3\u0ab5\u0abe\u0ab0", + "\u0aac\u0ac1\u0aa7\u0ab5\u0abe\u0ab0", + "\u0a97\u0ac1\u0ab0\u0ac1\u0ab5\u0abe\u0ab0", + "\u0ab6\u0ac1\u0a95\u0acd\u0ab0\u0ab5\u0abe\u0ab0", + "\u0ab6\u0aa8\u0abf\u0ab5\u0abe\u0ab0" + ], + "ERANAMES": [ + "\u0a88\u0ab8\u0ab5\u0ac0\u0ab8\u0aa8 \u0aaa\u0ac2\u0ab0\u0acd\u0ab5\u0ac7", + "\u0a87\u0ab8\u0ab5\u0ac0\u0ab8\u0aa8" + ], + "ERAS": [ + "\u0a88.\u0ab8.\u0aaa\u0ac2\u0ab0\u0acd\u0ab5\u0ac7", + "\u0a88.\u0ab8." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1\u0a86\u0ab0\u0ac0", + "\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1\u0a86\u0ab0\u0ac0", + "\u0aae\u0abe\u0ab0\u0acd\u0a9a", + "\u0a8f\u0aaa\u0acd\u0ab0\u0abf\u0ab2", + "\u0aae\u0ac7", + "\u0a9c\u0ac2\u0aa8", + "\u0a9c\u0ac1\u0ab2\u0abe\u0a88", + "\u0a91\u0a97\u0ab8\u0acd\u0a9f", + "\u0ab8\u0aaa\u0acd\u0a9f\u0ac7\u0aae\u0acd\u0aac\u0ab0", + "\u0a91\u0a95\u0acd\u0a9f\u0acb\u0aac\u0ab0", + "\u0aa8\u0ab5\u0ac7\u0aae\u0acd\u0aac\u0ab0", + "\u0aa1\u0abf\u0ab8\u0ac7\u0aae\u0acd\u0aac\u0ab0" + ], + "SHORTDAY": [ + "\u0ab0\u0ab5\u0abf", + "\u0ab8\u0acb\u0aae", + "\u0aae\u0a82\u0a97\u0ab3", + "\u0aac\u0ac1\u0aa7", + "\u0a97\u0ac1\u0ab0\u0ac1", + "\u0ab6\u0ac1\u0a95\u0acd\u0ab0", + "\u0ab6\u0aa8\u0abf" + ], + "SHORTMONTH": [ + "\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1", + "\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1", + "\u0aae\u0abe\u0ab0\u0acd\u0a9a", + "\u0a8f\u0aaa\u0acd\u0ab0\u0abf\u0ab2", + "\u0aae\u0ac7", + "\u0a9c\u0ac2\u0aa8", + "\u0a9c\u0ac1\u0ab2\u0abe\u0a88", + "\u0a91\u0a97\u0ab8\u0acd\u0a9f", + "\u0ab8\u0aaa\u0acd\u0a9f\u0ac7", + "\u0a91\u0a95\u0acd\u0a9f\u0acb", + "\u0aa8\u0ab5\u0ac7", + "\u0aa1\u0abf\u0ab8\u0ac7" + ], + "STANDALONEMONTH": [ + "\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1\u0a86\u0ab0\u0ac0", + "\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1\u0a86\u0ab0\u0ac0", + "\u0aae\u0abe\u0ab0\u0acd\u0a9a", + "\u0a8f\u0aaa\u0acd\u0ab0\u0abf\u0ab2", + "\u0aae\u0ac7", + "\u0a9c\u0ac2\u0aa8", + "\u0a9c\u0ac1\u0ab2\u0abe\u0a88", + "\u0a91\u0a97\u0ab8\u0acd\u0a9f", + "\u0ab8\u0aaa\u0acd\u0a9f\u0ac7\u0aae\u0acd\u0aac\u0ab0", + "\u0a91\u0a95\u0acd\u0a9f\u0acb\u0aac\u0ab0", + "\u0aa8\u0ab5\u0ac7\u0aae\u0acd\u0aac\u0ab0", + "\u0aa1\u0abf\u0ab8\u0ac7\u0aae\u0acd\u0aac\u0ab0" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM, y hh:mm:ss a", + "mediumDate": "d MMM, y", + "mediumTime": "hh:mm:ss a", + "short": "d/M/yy hh:mm a", + "shortDate": "d/M/yy", + "shortTime": "hh:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "gu", + "localeID": "gu", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_guz-ke.js b/1.6.6/i18n/angular-locale_guz-ke.js new file mode 100644 index 000000000..5d807f220 --- /dev/null +++ b/1.6.6/i18n/angular-locale_guz-ke.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Mambia", + "Mog" + ], + "DAY": [ + "Chumapiri", + "Chumatato", + "Chumaine", + "Chumatano", + "Aramisi", + "Ichuma", + "Esabato" + ], + "ERANAMES": [ + "Yeso ataiborwa", + "Yeso kaiboirwe" + ], + "ERAS": [ + "YA", + "YK" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Chanuari", + "Feburari", + "Machi", + "Apiriri", + "Mei", + "Juni", + "Chulai", + "Agosti", + "Septemba", + "Okitoba", + "Nobemba", + "Disemba" + ], + "SHORTDAY": [ + "Cpr", + "Ctt", + "Cmn", + "Cmt", + "Ars", + "Icm", + "Est" + ], + "SHORTMONTH": [ + "Can", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Cul", + "Agt", + "Sep", + "Okt", + "Nob", + "Dis" + ], + "STANDALONEMONTH": [ + "Chanuari", + "Feburari", + "Machi", + "Apiriri", + "Mei", + "Juni", + "Chulai", + "Agosti", + "Septemba", + "Okitoba", + "Nobemba", + "Disemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "guz-ke", + "localeID": "guz_KE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_guz.js b/1.6.6/i18n/angular-locale_guz.js new file mode 100644 index 000000000..d309804d7 --- /dev/null +++ b/1.6.6/i18n/angular-locale_guz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Mambia", + "Mog" + ], + "DAY": [ + "Chumapiri", + "Chumatato", + "Chumaine", + "Chumatano", + "Aramisi", + "Ichuma", + "Esabato" + ], + "ERANAMES": [ + "Yeso ataiborwa", + "Yeso kaiboirwe" + ], + "ERAS": [ + "YA", + "YK" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Chanuari", + "Feburari", + "Machi", + "Apiriri", + "Mei", + "Juni", + "Chulai", + "Agosti", + "Septemba", + "Okitoba", + "Nobemba", + "Disemba" + ], + "SHORTDAY": [ + "Cpr", + "Ctt", + "Cmn", + "Cmt", + "Ars", + "Icm", + "Est" + ], + "SHORTMONTH": [ + "Can", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Cul", + "Agt", + "Sep", + "Okt", + "Nob", + "Dis" + ], + "STANDALONEMONTH": [ + "Chanuari", + "Feburari", + "Machi", + "Apiriri", + "Mei", + "Juni", + "Chulai", + "Agosti", + "Septemba", + "Okitoba", + "Nobemba", + "Disemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "guz", + "localeID": "guz", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_gv-im.js b/1.6.6/i18n/angular-locale_gv-im.js new file mode 100644 index 000000000..118c67497 --- /dev/null +++ b/1.6.6/i18n/angular-locale_gv-im.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "Jedoonee", + "Jelhein", + "Jemayrt", + "Jercean", + "Jerdein", + "Jeheiney", + "Jesarn" + ], + "ERANAMES": [ + "RC", + "AD" + ], + "ERAS": [ + "RC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Jerrey-geuree", + "Toshiaght-arree", + "Mayrnt", + "Averil", + "Boaldyn", + "Mean-souree", + "Jerrey-souree", + "Luanistyn", + "Mean-fouyir", + "Jerrey-fouyir", + "Mee Houney", + "Mee ny Nollick" + ], + "SHORTDAY": [ + "Jed", + "Jel", + "Jem", + "Jerc", + "Jerd", + "Jeh", + "Jes" + ], + "SHORTMONTH": [ + "J-guer", + "T-arree", + "Mayrnt", + "Avrril", + "Boaldyn", + "M-souree", + "J-souree", + "Luanistyn", + "M-fouyir", + "J-fouyir", + "M-Houney", + "M-Nollick" + ], + "STANDALONEMONTH": [ + "Jerrey-geuree", + "Toshiaght-arree", + "Mayrnt", + "Averil", + "Boaldyn", + "Mean-souree", + "Jerrey-souree", + "Luanistyn", + "Mean-fouyir", + "Jerrey-fouyir", + "Mee Houney", + "Mee ny Nollick" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "gv-im", + "localeID": "gv_IM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_gv.js b/1.6.6/i18n/angular-locale_gv.js new file mode 100644 index 000000000..b8fb5d02c --- /dev/null +++ b/1.6.6/i18n/angular-locale_gv.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "Jedoonee", + "Jelhein", + "Jemayrt", + "Jercean", + "Jerdein", + "Jeheiney", + "Jesarn" + ], + "ERANAMES": [ + "RC", + "AD" + ], + "ERAS": [ + "RC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Jerrey-geuree", + "Toshiaght-arree", + "Mayrnt", + "Averil", + "Boaldyn", + "Mean-souree", + "Jerrey-souree", + "Luanistyn", + "Mean-fouyir", + "Jerrey-fouyir", + "Mee Houney", + "Mee ny Nollick" + ], + "SHORTDAY": [ + "Jed", + "Jel", + "Jem", + "Jerc", + "Jerd", + "Jeh", + "Jes" + ], + "SHORTMONTH": [ + "J-guer", + "T-arree", + "Mayrnt", + "Avrril", + "Boaldyn", + "M-souree", + "J-souree", + "Luanistyn", + "M-fouyir", + "J-fouyir", + "M-Houney", + "M-Nollick" + ], + "STANDALONEMONTH": [ + "Jerrey-geuree", + "Toshiaght-arree", + "Mayrnt", + "Averil", + "Boaldyn", + "Mean-souree", + "Jerrey-souree", + "Luanistyn", + "Mean-fouyir", + "Jerrey-fouyir", + "Mee Houney", + "Mee ny Nollick" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "gv", + "localeID": "gv", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ha-gh.js b/1.6.6/i18n/angular-locale_ha-gh.js new file mode 100644 index 000000000..24d46a972 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ha-gh.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Lahadi", + "Litinin", + "Talata", + "Laraba", + "Alhamis", + "Jumma\u02bca", + "Asabar" + ], + "ERANAMES": [ + "Kafin haihuwar annab", + "Bayan haihuwar annab" + ], + "ERAS": [ + "KHAI", + "BHAI" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Janairu", + "Faburairu", + "Maris", + "Afirilu", + "Mayu", + "Yuni", + "Yuli", + "Agusta", + "Satumba", + "Oktoba", + "Nuwamba", + "Disamba" + ], + "SHORTDAY": [ + "Lah", + "Lit", + "Tal", + "Lar", + "Alh", + "Jum", + "Asa" + ], + "SHORTMONTH": [ + "Jan", + "Fab", + "Mar", + "Afi", + "May", + "Yun", + "Yul", + "Agu", + "Sat", + "Okt", + "Nuw", + "Dis" + ], + "STANDALONEMONTH": [ + "Janairu", + "Faburairu", + "Maris", + "Afirilu", + "Mayu", + "Yuni", + "Yuli", + "Agusta", + "Satumba", + "Oktoba", + "Nuwamba", + "Disamba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "GHS", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ha-gh", + "localeID": "ha_GH", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ha-ne.js b/1.6.6/i18n/angular-locale_ha-ne.js new file mode 100644 index 000000000..75041d55c --- /dev/null +++ b/1.6.6/i18n/angular-locale_ha-ne.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Lahadi", + "Litinin", + "Talata", + "Laraba", + "Alhamis", + "Jumma\u02bca", + "Asabar" + ], + "ERANAMES": [ + "Kafin haihuwar annab", + "Bayan haihuwar annab" + ], + "ERAS": [ + "KHAI", + "BHAI" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Janairu", + "Faburairu", + "Maris", + "Afirilu", + "Mayu", + "Yuni", + "Yuli", + "Agusta", + "Satumba", + "Oktoba", + "Nuwamba", + "Disamba" + ], + "SHORTDAY": [ + "Lah", + "Lit", + "Tal", + "Lar", + "Alh", + "Jum", + "Asa" + ], + "SHORTMONTH": [ + "Jan", + "Fab", + "Mar", + "Afi", + "May", + "Yun", + "Yul", + "Agu", + "Sat", + "Okt", + "Nuw", + "Dis" + ], + "STANDALONEMONTH": [ + "Janairu", + "Faburairu", + "Maris", + "Afirilu", + "Mayu", + "Yuni", + "Yuli", + "Agusta", + "Satumba", + "Oktoba", + "Nuwamba", + "Disamba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ha-ne", + "localeID": "ha_NE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ha-ng.js b/1.6.6/i18n/angular-locale_ha-ng.js new file mode 100644 index 000000000..607899ce3 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ha-ng.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Lahadi", + "Litinin", + "Talata", + "Laraba", + "Alhamis", + "Jumma\u02bca", + "Asabar" + ], + "ERANAMES": [ + "Kafin haihuwar annab", + "Bayan haihuwar annab" + ], + "ERAS": [ + "KHAI", + "BHAI" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Janairu", + "Faburairu", + "Maris", + "Afirilu", + "Mayu", + "Yuni", + "Yuli", + "Agusta", + "Satumba", + "Oktoba", + "Nuwamba", + "Disamba" + ], + "SHORTDAY": [ + "Lah", + "Lit", + "Tal", + "Lar", + "Alh", + "Jum", + "Asa" + ], + "SHORTMONTH": [ + "Jan", + "Fab", + "Mar", + "Afi", + "May", + "Yun", + "Yul", + "Agu", + "Sat", + "Okt", + "Nuw", + "Dis" + ], + "STANDALONEMONTH": [ + "Janairu", + "Faburairu", + "Maris", + "Afirilu", + "Mayu", + "Yuni", + "Yuli", + "Agusta", + "Satumba", + "Oktoba", + "Nuwamba", + "Disamba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20a6", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ha-ng", + "localeID": "ha_NG", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ha.js b/1.6.6/i18n/angular-locale_ha.js new file mode 100644 index 000000000..8e6c865d6 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ha.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Lahadi", + "Litinin", + "Talata", + "Laraba", + "Alhamis", + "Jumma\u02bca", + "Asabar" + ], + "ERANAMES": [ + "Kafin haihuwar annab", + "Bayan haihuwar annab" + ], + "ERAS": [ + "KHAI", + "BHAI" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Janairu", + "Faburairu", + "Maris", + "Afirilu", + "Mayu", + "Yuni", + "Yuli", + "Agusta", + "Satumba", + "Oktoba", + "Nuwamba", + "Disamba" + ], + "SHORTDAY": [ + "Lah", + "Lit", + "Tal", + "Lar", + "Alh", + "Jum", + "Asa" + ], + "SHORTMONTH": [ + "Jan", + "Fab", + "Mar", + "Afi", + "May", + "Yun", + "Yul", + "Agu", + "Sat", + "Okt", + "Nuw", + "Dis" + ], + "STANDALONEMONTH": [ + "Janairu", + "Faburairu", + "Maris", + "Afirilu", + "Mayu", + "Yuni", + "Yuli", + "Agusta", + "Satumba", + "Oktoba", + "Nuwamba", + "Disamba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20a6", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ha", + "localeID": "ha", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_haw-us.js b/1.6.6/i18n/angular-locale_haw-us.js new file mode 100644 index 000000000..2dab59b50 --- /dev/null +++ b/1.6.6/i18n/angular-locale_haw-us.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "L\u0101pule", + "Po\u02bbakahi", + "Po\u02bbalua", + "Po\u02bbakolu", + "Po\u02bbah\u0101", + "Po\u02bbalima", + "Po\u02bbaono" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Ianuali", + "Pepeluali", + "Malaki", + "\u02bbApelila", + "Mei", + "Iune", + "Iulai", + "\u02bbAukake", + "Kepakemapa", + "\u02bbOkakopa", + "Nowemapa", + "Kekemapa" + ], + "SHORTDAY": [ + "LP", + "P1", + "P2", + "P3", + "P4", + "P5", + "P6" + ], + "SHORTMONTH": [ + "Ian.", + "Pep.", + "Mal.", + "\u02bbAp.", + "Mei", + "Iun.", + "Iul.", + "\u02bbAu.", + "Kep.", + "\u02bbOk.", + "Now.", + "Kek." + ], + "STANDALONEMONTH": [ + "Ianuali", + "Pepeluali", + "Malaki", + "\u02bbApelila", + "Mei", + "Iune", + "Iulai", + "\u02bbAukake", + "Kepakemapa", + "\u02bbOkakopa", + "Nowemapa", + "Kekemapa" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "haw-us", + "localeID": "haw_US", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_haw.js b/1.6.6/i18n/angular-locale_haw.js new file mode 100644 index 000000000..c1cd77e66 --- /dev/null +++ b/1.6.6/i18n/angular-locale_haw.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "L\u0101pule", + "Po\u02bbakahi", + "Po\u02bbalua", + "Po\u02bbakolu", + "Po\u02bbah\u0101", + "Po\u02bbalima", + "Po\u02bbaono" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Ianuali", + "Pepeluali", + "Malaki", + "\u02bbApelila", + "Mei", + "Iune", + "Iulai", + "\u02bbAukake", + "Kepakemapa", + "\u02bbOkakopa", + "Nowemapa", + "Kekemapa" + ], + "SHORTDAY": [ + "LP", + "P1", + "P2", + "P3", + "P4", + "P5", + "P6" + ], + "SHORTMONTH": [ + "Ian.", + "Pep.", + "Mal.", + "\u02bbAp.", + "Mei", + "Iun.", + "Iul.", + "\u02bbAu.", + "Kep.", + "\u02bbOk.", + "Now.", + "Kek." + ], + "STANDALONEMONTH": [ + "Ianuali", + "Pepeluali", + "Malaki", + "\u02bbApelila", + "Mei", + "Iune", + "Iulai", + "\u02bbAukake", + "Kepakemapa", + "\u02bbOkakopa", + "Nowemapa", + "Kekemapa" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "haw", + "localeID": "haw", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_he-il.js b/1.6.6/i18n/angular-locale_he-il.js new file mode 100644 index 000000000..6c8ed7d02 --- /dev/null +++ b/1.6.6/i18n/angular-locale_he-il.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e6", + "\u05d0\u05d7\u05d4\u05f4\u05e6" + ], + "DAY": [ + "\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df", + "\u05d9\u05d5\u05dd \u05e9\u05e0\u05d9", + "\u05d9\u05d5\u05dd \u05e9\u05dc\u05d9\u05e9\u05d9", + "\u05d9\u05d5\u05dd \u05e8\u05d1\u05d9\u05e2\u05d9", + "\u05d9\u05d5\u05dd \u05d7\u05de\u05d9\u05e9\u05d9", + "\u05d9\u05d5\u05dd \u05e9\u05d9\u05e9\u05d9", + "\u05d9\u05d5\u05dd \u05e9\u05d1\u05ea" + ], + "ERANAMES": [ + "\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e1\u05e4\u05d9\u05e8\u05d4", + "\u05dc\u05e1\u05e4\u05d9\u05e8\u05d4" + ], + "ERAS": [ + "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e1", + "\u05dc\u05e1\u05e4\u05d9\u05e8\u05d4" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u05d9\u05e0\u05d5\u05d0\u05e8", + "\u05e4\u05d1\u05e8\u05d5\u05d0\u05e8", + "\u05de\u05e8\u05e5", + "\u05d0\u05e4\u05e8\u05d9\u05dc", + "\u05de\u05d0\u05d9", + "\u05d9\u05d5\u05e0\u05d9", + "\u05d9\u05d5\u05dc\u05d9", + "\u05d0\u05d5\u05d2\u05d5\u05e1\u05d8", + "\u05e1\u05e4\u05d8\u05de\u05d1\u05e8", + "\u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8", + "\u05e0\u05d5\u05d1\u05de\u05d1\u05e8", + "\u05d3\u05e6\u05de\u05d1\u05e8" + ], + "SHORTDAY": [ + "\u05d9\u05d5\u05dd \u05d0\u05f3", + "\u05d9\u05d5\u05dd \u05d1\u05f3", + "\u05d9\u05d5\u05dd \u05d2\u05f3", + "\u05d9\u05d5\u05dd \u05d3\u05f3", + "\u05d9\u05d5\u05dd \u05d4\u05f3", + "\u05d9\u05d5\u05dd \u05d5\u05f3", + "\u05e9\u05d1\u05ea" + ], + "SHORTMONTH": [ + "\u05d9\u05e0\u05d5\u05f3", + "\u05e4\u05d1\u05e8\u05f3", + "\u05de\u05e8\u05e5", + "\u05d0\u05e4\u05e8\u05f3", + "\u05de\u05d0\u05d9", + "\u05d9\u05d5\u05e0\u05d9", + "\u05d9\u05d5\u05dc\u05d9", + "\u05d0\u05d5\u05d2\u05f3", + "\u05e1\u05e4\u05d8\u05f3", + "\u05d0\u05d5\u05e7\u05f3", + "\u05e0\u05d5\u05d1\u05f3", + "\u05d3\u05e6\u05de\u05f3" + ], + "STANDALONEMONTH": [ + "\u05d9\u05e0\u05d5\u05d0\u05e8", + "\u05e4\u05d1\u05e8\u05d5\u05d0\u05e8", + "\u05de\u05e8\u05e5", + "\u05d0\u05e4\u05e8\u05d9\u05dc", + "\u05de\u05d0\u05d9", + "\u05d9\u05d5\u05e0\u05d9", + "\u05d9\u05d5\u05dc\u05d9", + "\u05d0\u05d5\u05d2\u05d5\u05e1\u05d8", + "\u05e1\u05e4\u05d8\u05de\u05d1\u05e8", + "\u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8", + "\u05e0\u05d5\u05d1\u05de\u05d1\u05e8", + "\u05d3\u05e6\u05de\u05d1\u05e8" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE, d \u05d1MMMM y", + "longDate": "d \u05d1MMMM y", + "medium": "d \u05d1MMM y H:mm:ss", + "mediumDate": "d \u05d1MMM y", + "mediumTime": "H:mm:ss", + "short": "d.M.y H:mm", + "shortDate": "d.M.y", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20aa", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u200f-", + "negSuf": "\u00a0\u00a4", + "posPre": "\u200f", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "he-il", + "localeID": "he_IL", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (i == 2 && vf.v == 0) { return PLURAL_CATEGORY.TWO; } if (vf.v == 0 && (n < 0 || n > 10) && n % 10 == 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_he.js b/1.6.6/i18n/angular-locale_he.js new file mode 100644 index 000000000..c66acddfa --- /dev/null +++ b/1.6.6/i18n/angular-locale_he.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e6", + "\u05d0\u05d7\u05d4\u05f4\u05e6" + ], + "DAY": [ + "\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df", + "\u05d9\u05d5\u05dd \u05e9\u05e0\u05d9", + "\u05d9\u05d5\u05dd \u05e9\u05dc\u05d9\u05e9\u05d9", + "\u05d9\u05d5\u05dd \u05e8\u05d1\u05d9\u05e2\u05d9", + "\u05d9\u05d5\u05dd \u05d7\u05de\u05d9\u05e9\u05d9", + "\u05d9\u05d5\u05dd \u05e9\u05d9\u05e9\u05d9", + "\u05d9\u05d5\u05dd \u05e9\u05d1\u05ea" + ], + "ERANAMES": [ + "\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e1\u05e4\u05d9\u05e8\u05d4", + "\u05dc\u05e1\u05e4\u05d9\u05e8\u05d4" + ], + "ERAS": [ + "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e1", + "\u05dc\u05e1\u05e4\u05d9\u05e8\u05d4" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u05d9\u05e0\u05d5\u05d0\u05e8", + "\u05e4\u05d1\u05e8\u05d5\u05d0\u05e8", + "\u05de\u05e8\u05e5", + "\u05d0\u05e4\u05e8\u05d9\u05dc", + "\u05de\u05d0\u05d9", + "\u05d9\u05d5\u05e0\u05d9", + "\u05d9\u05d5\u05dc\u05d9", + "\u05d0\u05d5\u05d2\u05d5\u05e1\u05d8", + "\u05e1\u05e4\u05d8\u05de\u05d1\u05e8", + "\u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8", + "\u05e0\u05d5\u05d1\u05de\u05d1\u05e8", + "\u05d3\u05e6\u05de\u05d1\u05e8" + ], + "SHORTDAY": [ + "\u05d9\u05d5\u05dd \u05d0\u05f3", + "\u05d9\u05d5\u05dd \u05d1\u05f3", + "\u05d9\u05d5\u05dd \u05d2\u05f3", + "\u05d9\u05d5\u05dd \u05d3\u05f3", + "\u05d9\u05d5\u05dd \u05d4\u05f3", + "\u05d9\u05d5\u05dd \u05d5\u05f3", + "\u05e9\u05d1\u05ea" + ], + "SHORTMONTH": [ + "\u05d9\u05e0\u05d5\u05f3", + "\u05e4\u05d1\u05e8\u05f3", + "\u05de\u05e8\u05e5", + "\u05d0\u05e4\u05e8\u05f3", + "\u05de\u05d0\u05d9", + "\u05d9\u05d5\u05e0\u05d9", + "\u05d9\u05d5\u05dc\u05d9", + "\u05d0\u05d5\u05d2\u05f3", + "\u05e1\u05e4\u05d8\u05f3", + "\u05d0\u05d5\u05e7\u05f3", + "\u05e0\u05d5\u05d1\u05f3", + "\u05d3\u05e6\u05de\u05f3" + ], + "STANDALONEMONTH": [ + "\u05d9\u05e0\u05d5\u05d0\u05e8", + "\u05e4\u05d1\u05e8\u05d5\u05d0\u05e8", + "\u05de\u05e8\u05e5", + "\u05d0\u05e4\u05e8\u05d9\u05dc", + "\u05de\u05d0\u05d9", + "\u05d9\u05d5\u05e0\u05d9", + "\u05d9\u05d5\u05dc\u05d9", + "\u05d0\u05d5\u05d2\u05d5\u05e1\u05d8", + "\u05e1\u05e4\u05d8\u05de\u05d1\u05e8", + "\u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8", + "\u05e0\u05d5\u05d1\u05de\u05d1\u05e8", + "\u05d3\u05e6\u05de\u05d1\u05e8" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE, d \u05d1MMMM y", + "longDate": "d \u05d1MMMM y", + "medium": "d \u05d1MMM y H:mm:ss", + "mediumDate": "d \u05d1MMM y", + "mediumTime": "H:mm:ss", + "short": "d.M.y H:mm", + "shortDate": "d.M.y", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20aa", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u200f-", + "negSuf": "\u00a0\u00a4", + "posPre": "\u200f", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "he", + "localeID": "he", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (i == 2 && vf.v == 0) { return PLURAL_CATEGORY.TWO; } if (vf.v == 0 && (n < 0 || n > 10) && n % 10 == 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_hi-in.js b/1.6.6/i18n/angular-locale_hi-in.js new file mode 100644 index 000000000..f6117003b --- /dev/null +++ b/1.6.6/i18n/angular-locale_hi-in.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "am", + "pm" + ], + "DAY": [ + "\u0930\u0935\u093f\u0935\u093e\u0930", + "\u0938\u094b\u092e\u0935\u093e\u0930", + "\u092e\u0902\u0917\u0932\u0935\u093e\u0930", + "\u092c\u0941\u0927\u0935\u093e\u0930", + "\u0917\u0941\u0930\u0941\u0935\u093e\u0930", + "\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930", + "\u0936\u0928\u093f\u0935\u093e\u0930" + ], + "ERANAMES": [ + "\u0908\u0938\u093e-\u092a\u0942\u0930\u094d\u0935", + "\u0908\u0938\u0935\u0940 \u0938\u0928" + ], + "ERAS": [ + "\u0908\u0938\u093e-\u092a\u0942\u0930\u094d\u0935", + "\u0908\u0938\u094d\u0935\u0940" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u091c\u0928\u0935\u0930\u0940", + "\u092b\u093c\u0930\u0935\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u0905\u092a\u094d\u0930\u0948\u0932", + "\u092e\u0908", + "\u091c\u0942\u0928", + "\u091c\u0941\u0932\u093e\u0908", + "\u0905\u0917\u0938\u094d\u0924", + "\u0938\u093f\u0924\u0902\u092c\u0930", + "\u0905\u0915\u094d\u0924\u0942\u092c\u0930", + "\u0928\u0935\u0902\u092c\u0930", + "\u0926\u093f\u0938\u0902\u092c\u0930" + ], + "SHORTDAY": [ + "\u0930\u0935\u093f", + "\u0938\u094b\u092e", + "\u092e\u0902\u0917\u0932", + "\u092c\u0941\u0927", + "\u0917\u0941\u0930\u0941", + "\u0936\u0941\u0915\u094d\u0930", + "\u0936\u0928\u093f" + ], + "SHORTMONTH": [ + "\u091c\u0928\u0970", + "\u092b\u093c\u0930\u0970", + "\u092e\u093e\u0930\u094d\u091a", + "\u0905\u092a\u094d\u0930\u0948\u0932", + "\u092e\u0908", + "\u091c\u0942\u0928", + "\u091c\u0941\u0932\u0970", + "\u0905\u0917\u0970", + "\u0938\u093f\u0924\u0970", + "\u0905\u0915\u094d\u0924\u0942\u0970", + "\u0928\u0935\u0970", + "\u0926\u093f\u0938\u0970" + ], + "STANDALONEMONTH": [ + "\u091c\u0928\u0935\u0930\u0940", + "\u092b\u093c\u0930\u0935\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u0905\u092a\u094d\u0930\u0948\u0932", + "\u092e\u0908", + "\u091c\u0942\u0928", + "\u091c\u0941\u0932\u093e\u0908", + "\u0905\u0917\u0938\u094d\u0924", + "\u0938\u093f\u0924\u0902\u092c\u0930", + "\u0905\u0915\u094d\u0924\u0942\u092c\u0930", + "\u0928\u0935\u0902\u092c\u0930", + "\u0926\u093f\u0938\u0902\u092c\u0930" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "dd/MM/y h:mm:ss a", + "mediumDate": "dd/MM/y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "hi-in", + "localeID": "hi_IN", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_hi.js b/1.6.6/i18n/angular-locale_hi.js new file mode 100644 index 000000000..246678f13 --- /dev/null +++ b/1.6.6/i18n/angular-locale_hi.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "am", + "pm" + ], + "DAY": [ + "\u0930\u0935\u093f\u0935\u093e\u0930", + "\u0938\u094b\u092e\u0935\u093e\u0930", + "\u092e\u0902\u0917\u0932\u0935\u093e\u0930", + "\u092c\u0941\u0927\u0935\u093e\u0930", + "\u0917\u0941\u0930\u0941\u0935\u093e\u0930", + "\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930", + "\u0936\u0928\u093f\u0935\u093e\u0930" + ], + "ERANAMES": [ + "\u0908\u0938\u093e-\u092a\u0942\u0930\u094d\u0935", + "\u0908\u0938\u0935\u0940 \u0938\u0928" + ], + "ERAS": [ + "\u0908\u0938\u093e-\u092a\u0942\u0930\u094d\u0935", + "\u0908\u0938\u094d\u0935\u0940" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u091c\u0928\u0935\u0930\u0940", + "\u092b\u093c\u0930\u0935\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u0905\u092a\u094d\u0930\u0948\u0932", + "\u092e\u0908", + "\u091c\u0942\u0928", + "\u091c\u0941\u0932\u093e\u0908", + "\u0905\u0917\u0938\u094d\u0924", + "\u0938\u093f\u0924\u0902\u092c\u0930", + "\u0905\u0915\u094d\u0924\u0942\u092c\u0930", + "\u0928\u0935\u0902\u092c\u0930", + "\u0926\u093f\u0938\u0902\u092c\u0930" + ], + "SHORTDAY": [ + "\u0930\u0935\u093f", + "\u0938\u094b\u092e", + "\u092e\u0902\u0917\u0932", + "\u092c\u0941\u0927", + "\u0917\u0941\u0930\u0941", + "\u0936\u0941\u0915\u094d\u0930", + "\u0936\u0928\u093f" + ], + "SHORTMONTH": [ + "\u091c\u0928\u0970", + "\u092b\u093c\u0930\u0970", + "\u092e\u093e\u0930\u094d\u091a", + "\u0905\u092a\u094d\u0930\u0948\u0932", + "\u092e\u0908", + "\u091c\u0942\u0928", + "\u091c\u0941\u0932\u0970", + "\u0905\u0917\u0970", + "\u0938\u093f\u0924\u0970", + "\u0905\u0915\u094d\u0924\u0942\u0970", + "\u0928\u0935\u0970", + "\u0926\u093f\u0938\u0970" + ], + "STANDALONEMONTH": [ + "\u091c\u0928\u0935\u0930\u0940", + "\u092b\u093c\u0930\u0935\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u0905\u092a\u094d\u0930\u0948\u0932", + "\u092e\u0908", + "\u091c\u0942\u0928", + "\u091c\u0941\u0932\u093e\u0908", + "\u0905\u0917\u0938\u094d\u0924", + "\u0938\u093f\u0924\u0902\u092c\u0930", + "\u0905\u0915\u094d\u0924\u0942\u092c\u0930", + "\u0928\u0935\u0902\u092c\u0930", + "\u0926\u093f\u0938\u0902\u092c\u0930" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "dd/MM/y h:mm:ss a", + "mediumDate": "dd/MM/y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "hi", + "localeID": "hi", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_hr-ba.js b/1.6.6/i18n/angular-locale_hr-ba.js new file mode 100644 index 000000000..b593b53a5 --- /dev/null +++ b/1.6.6/i18n/angular-locale_hr-ba.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "nedjelja", + "ponedjeljak", + "utorak", + "srijeda", + "\u010detvrtak", + "petak", + "subota" + ], + "ERANAMES": [ + "prije Krista", + "poslije Krista" + ], + "ERAS": [ + "pr. Kr.", + "po. Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "sije\u010dnja", + "velja\u010de", + "o\u017eujka", + "travnja", + "svibnja", + "lipnja", + "srpnja", + "kolovoza", + "rujna", + "listopada", + "studenoga", + "prosinca" + ], + "SHORTDAY": [ + "ned", + "pon", + "uto", + "sri", + "\u010det", + "pet", + "sub" + ], + "SHORTMONTH": [ + "sij", + "velj", + "o\u017eu", + "tra", + "svi", + "lip", + "srp", + "kol", + "ruj", + "lis", + "stu", + "pro" + ], + "STANDALONEMONTH": [ + "sije\u010danj", + "velja\u010da", + "o\u017eujak", + "travanj", + "svibanj", + "lipanj", + "srpanj", + "kolovoz", + "rujan", + "listopad", + "studeni", + "prosinac" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y.", + "longDate": "d. MMMM y.", + "medium": "d. MMM y. HH:mm:ss", + "mediumDate": "d. MMM y.", + "mediumTime": "HH:mm:ss", + "short": "d. M. yy. HH:mm", + "shortDate": "d. M. yy.", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "KM", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "hr-ba", + "localeID": "hr_BA", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_hr-hr.js b/1.6.6/i18n/angular-locale_hr-hr.js new file mode 100644 index 000000000..b6a6bdb0d --- /dev/null +++ b/1.6.6/i18n/angular-locale_hr-hr.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "nedjelja", + "ponedjeljak", + "utorak", + "srijeda", + "\u010detvrtak", + "petak", + "subota" + ], + "ERANAMES": [ + "prije Krista", + "poslije Krista" + ], + "ERAS": [ + "pr. Kr.", + "po. Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "sije\u010dnja", + "velja\u010de", + "o\u017eujka", + "travnja", + "svibnja", + "lipnja", + "srpnja", + "kolovoza", + "rujna", + "listopada", + "studenoga", + "prosinca" + ], + "SHORTDAY": [ + "ned", + "pon", + "uto", + "sri", + "\u010det", + "pet", + "sub" + ], + "SHORTMONTH": [ + "sij", + "velj", + "o\u017eu", + "tra", + "svi", + "lip", + "srp", + "kol", + "ruj", + "lis", + "stu", + "pro" + ], + "STANDALONEMONTH": [ + "sije\u010danj", + "velja\u010da", + "o\u017eujak", + "travanj", + "svibanj", + "lipanj", + "srpanj", + "kolovoz", + "rujan", + "listopad", + "studeni", + "prosinac" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y.", + "longDate": "d. MMMM y.", + "medium": "d. MMM y. HH:mm:ss", + "mediumDate": "d. MMM y.", + "mediumTime": "HH:mm:ss", + "short": "dd. MM. y. HH:mm", + "shortDate": "dd. MM. y.", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kn", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "hr-hr", + "localeID": "hr_HR", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_hr.js b/1.6.6/i18n/angular-locale_hr.js new file mode 100644 index 000000000..254b57fcf --- /dev/null +++ b/1.6.6/i18n/angular-locale_hr.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "nedjelja", + "ponedjeljak", + "utorak", + "srijeda", + "\u010detvrtak", + "petak", + "subota" + ], + "ERANAMES": [ + "prije Krista", + "poslije Krista" + ], + "ERAS": [ + "pr. Kr.", + "po. Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "sije\u010dnja", + "velja\u010de", + "o\u017eujka", + "travnja", + "svibnja", + "lipnja", + "srpnja", + "kolovoza", + "rujna", + "listopada", + "studenoga", + "prosinca" + ], + "SHORTDAY": [ + "ned", + "pon", + "uto", + "sri", + "\u010det", + "pet", + "sub" + ], + "SHORTMONTH": [ + "sij", + "velj", + "o\u017eu", + "tra", + "svi", + "lip", + "srp", + "kol", + "ruj", + "lis", + "stu", + "pro" + ], + "STANDALONEMONTH": [ + "sije\u010danj", + "velja\u010da", + "o\u017eujak", + "travanj", + "svibanj", + "lipanj", + "srpanj", + "kolovoz", + "rujan", + "listopad", + "studeni", + "prosinac" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y.", + "longDate": "d. MMMM y.", + "medium": "d. MMM y. HH:mm:ss", + "mediumDate": "d. MMM y.", + "mediumTime": "HH:mm:ss", + "short": "dd. MM. y. HH:mm", + "shortDate": "dd. MM. y.", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kn", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "hr", + "localeID": "hr", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_hsb-de.js b/1.6.6/i18n/angular-locale_hsb-de.js new file mode 100644 index 000000000..5e5ff8dd8 --- /dev/null +++ b/1.6.6/i18n/angular-locale_hsb-de.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "dopo\u0142dnja", + "popo\u0142dnju" + ], + "DAY": [ + "njed\u017aela", + "p\u00f3nd\u017aela", + "wutora", + "srjeda", + "\u0161tw\u00f3rtk", + "pjatk", + "sobota" + ], + "ERANAMES": [ + "p\u0159ed Chrystowym narod\u017aenjom", + "po Chrystowym narod\u017aenju" + ], + "ERAS": [ + "p\u0159.Chr.n.", + "po Chr.n." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januara", + "februara", + "m\u011brca", + "apryla", + "meje", + "junija", + "julija", + "awgusta", + "septembra", + "oktobra", + "nowembra", + "decembra" + ], + "SHORTDAY": [ + "nje", + "p\u00f3n", + "wut", + "srj", + "\u0161tw", + "pja", + "sob" + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "m\u011br.", + "apr.", + "mej.", + "jun.", + "jul.", + "awg.", + "sep.", + "okt.", + "now.", + "dec." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "m\u011brc", + "apryl", + "meja", + "junij", + "julij", + "awgust", + "september", + "oktober", + "nowember", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d.M.y H:mm:ss", + "mediumDate": "d.M.y", + "mediumTime": "H:mm:ss", + "short": "d.M.yy H:mm 'hod\u017a'.", + "shortDate": "d.M.yy", + "shortTime": "H:mm 'hod\u017a'." + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "hsb-de", + "localeID": "hsb_DE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_hsb.js b/1.6.6/i18n/angular-locale_hsb.js new file mode 100644 index 000000000..513d70103 --- /dev/null +++ b/1.6.6/i18n/angular-locale_hsb.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "dopo\u0142dnja", + "popo\u0142dnju" + ], + "DAY": [ + "njed\u017aela", + "p\u00f3nd\u017aela", + "wutora", + "srjeda", + "\u0161tw\u00f3rtk", + "pjatk", + "sobota" + ], + "ERANAMES": [ + "p\u0159ed Chrystowym narod\u017aenjom", + "po Chrystowym narod\u017aenju" + ], + "ERAS": [ + "p\u0159.Chr.n.", + "po Chr.n." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januara", + "februara", + "m\u011brca", + "apryla", + "meje", + "junija", + "julija", + "awgusta", + "septembra", + "oktobra", + "nowembra", + "decembra" + ], + "SHORTDAY": [ + "nje", + "p\u00f3n", + "wut", + "srj", + "\u0161tw", + "pja", + "sob" + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "m\u011br.", + "apr.", + "mej.", + "jun.", + "jul.", + "awg.", + "sep.", + "okt.", + "now.", + "dec." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "m\u011brc", + "apryl", + "meja", + "junij", + "julij", + "awgust", + "september", + "oktober", + "nowember", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d.M.y H:mm:ss", + "mediumDate": "d.M.y", + "mediumTime": "H:mm:ss", + "short": "d.M.yy H:mm 'hod\u017a'.", + "shortDate": "d.M.yy", + "shortTime": "H:mm 'hod\u017a'." + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "hsb", + "localeID": "hsb", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_hu-hu.js b/1.6.6/i18n/angular-locale_hu-hu.js new file mode 100644 index 000000000..9d0bd6da9 --- /dev/null +++ b/1.6.6/i18n/angular-locale_hu-hu.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "de.", + "du." + ], + "DAY": [ + "vas\u00e1rnap", + "h\u00e9tf\u0151", + "kedd", + "szerda", + "cs\u00fct\u00f6rt\u00f6k", + "p\u00e9ntek", + "szombat" + ], + "ERANAMES": [ + "id\u0151sz\u00e1m\u00edt\u00e1sunk el\u0151tt", + "id\u0151sz\u00e1m\u00edt\u00e1sunk szerint" + ], + "ERAS": [ + "i. e.", + "i. sz." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janu\u00e1r", + "febru\u00e1r", + "m\u00e1rcius", + "\u00e1prilis", + "m\u00e1jus", + "j\u00fanius", + "j\u00falius", + "augusztus", + "szeptember", + "okt\u00f3ber", + "november", + "december" + ], + "SHORTDAY": [ + "V", + "H", + "K", + "Sze", + "Cs", + "P", + "Szo" + ], + "SHORTMONTH": [ + "jan.", + "febr.", + "m\u00e1rc.", + "\u00e1pr.", + "m\u00e1j.", + "j\u00fan.", + "j\u00fal.", + "aug.", + "szept.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "janu\u00e1r", + "febru\u00e1r", + "m\u00e1rcius", + "\u00e1prilis", + "m\u00e1jus", + "j\u00fanius", + "j\u00falius", + "augusztus", + "szeptember", + "okt\u00f3ber", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y. MMMM d., EEEE", + "longDate": "y. MMMM d.", + "medium": "y. MMM d. H:mm:ss", + "mediumDate": "y. MMM d.", + "mediumTime": "H:mm:ss", + "short": "y. MM. dd. H:mm", + "shortDate": "y. MM. dd.", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ft", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "hu-hu", + "localeID": "hu_HU", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_hu.js b/1.6.6/i18n/angular-locale_hu.js new file mode 100644 index 000000000..6fe1ec1e5 --- /dev/null +++ b/1.6.6/i18n/angular-locale_hu.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "de.", + "du." + ], + "DAY": [ + "vas\u00e1rnap", + "h\u00e9tf\u0151", + "kedd", + "szerda", + "cs\u00fct\u00f6rt\u00f6k", + "p\u00e9ntek", + "szombat" + ], + "ERANAMES": [ + "id\u0151sz\u00e1m\u00edt\u00e1sunk el\u0151tt", + "id\u0151sz\u00e1m\u00edt\u00e1sunk szerint" + ], + "ERAS": [ + "i. e.", + "i. sz." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janu\u00e1r", + "febru\u00e1r", + "m\u00e1rcius", + "\u00e1prilis", + "m\u00e1jus", + "j\u00fanius", + "j\u00falius", + "augusztus", + "szeptember", + "okt\u00f3ber", + "november", + "december" + ], + "SHORTDAY": [ + "V", + "H", + "K", + "Sze", + "Cs", + "P", + "Szo" + ], + "SHORTMONTH": [ + "jan.", + "febr.", + "m\u00e1rc.", + "\u00e1pr.", + "m\u00e1j.", + "j\u00fan.", + "j\u00fal.", + "aug.", + "szept.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "janu\u00e1r", + "febru\u00e1r", + "m\u00e1rcius", + "\u00e1prilis", + "m\u00e1jus", + "j\u00fanius", + "j\u00falius", + "augusztus", + "szeptember", + "okt\u00f3ber", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y. MMMM d., EEEE", + "longDate": "y. MMMM d.", + "medium": "y. MMM d. H:mm:ss", + "mediumDate": "y. MMM d.", + "mediumTime": "H:mm:ss", + "short": "y. MM. dd. H:mm", + "shortDate": "y. MM. dd.", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ft", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "hu", + "localeID": "hu", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_hy-am.js b/1.6.6/i18n/angular-locale_hy-am.js new file mode 100644 index 000000000..87bf47188 --- /dev/null +++ b/1.6.6/i18n/angular-locale_hy-am.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u056f\u056b\u0580\u0561\u056f\u056b", + "\u0565\u0580\u056f\u0578\u0582\u0577\u0561\u0562\u0569\u056b", + "\u0565\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b", + "\u0579\u0578\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b", + "\u0570\u056b\u0576\u0563\u0577\u0561\u0562\u0569\u056b", + "\u0578\u0582\u0580\u0562\u0561\u0569", + "\u0577\u0561\u0562\u0561\u0569" + ], + "ERANAMES": [ + "\u0554\u0580\u056b\u057d\u057f\u0578\u057d\u056b\u0581 \u0561\u057c\u0561\u057b", + "\u0554\u0580\u056b\u057d\u057f\u0578\u057d\u056b\u0581 \u0570\u0565\u057f\u0578" + ], + "ERAS": [ + "\u0574.\u0569.\u0561.", + "\u0574.\u0569." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0570\u0578\u0582\u0576\u057e\u0561\u0580\u056b", + "\u0583\u0565\u057f\u0580\u057e\u0561\u0580\u056b", + "\u0574\u0561\u0580\u057f\u056b", + "\u0561\u057a\u0580\u056b\u056c\u056b", + "\u0574\u0561\u0575\u056b\u057d\u056b", + "\u0570\u0578\u0582\u0576\u056b\u057d\u056b", + "\u0570\u0578\u0582\u056c\u056b\u057d\u056b", + "\u0585\u0563\u0578\u057d\u057f\u0578\u057d\u056b", + "\u057d\u0565\u057a\u057f\u0565\u0574\u0562\u0565\u0580\u056b", + "\u0570\u0578\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b", + "\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580\u056b", + "\u0564\u0565\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b" + ], + "SHORTDAY": [ + "\u056f\u056b\u0580", + "\u0565\u0580\u056f", + "\u0565\u0580\u0584", + "\u0579\u0580\u0584", + "\u0570\u0576\u0563", + "\u0578\u0582\u0580", + "\u0577\u0562\u0569" + ], + "SHORTMONTH": [ + "\u0570\u0576\u057e", + "\u0583\u057f\u057e", + "\u0574\u0580\u057f", + "\u0561\u057a\u0580", + "\u0574\u0575\u057d", + "\u0570\u0576\u057d", + "\u0570\u056c\u057d", + "\u0585\u0563\u057d", + "\u057d\u0565\u057a", + "\u0570\u0578\u056f", + "\u0576\u0578\u0575", + "\u0564\u0565\u056f" + ], + "STANDALONEMONTH": [ + "\u0570\u0578\u0582\u0576\u057e\u0561\u0580", + "\u0583\u0565\u057f\u0580\u057e\u0561\u0580", + "\u0574\u0561\u0580\u057f", + "\u0561\u057a\u0580\u056b\u056c", + "\u0574\u0561\u0575\u056b\u057d", + "\u0570\u0578\u0582\u0576\u056b\u057d", + "\u0570\u0578\u0582\u056c\u056b\u057d", + "\u0585\u0563\u0578\u057d\u057f\u0578\u057d", + "\u057d\u0565\u057a\u057f\u0565\u0574\u0562\u0565\u0580", + "\u0570\u0578\u056f\u057f\u0565\u0574\u0562\u0565\u0580", + "\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580", + "\u0564\u0565\u056f\u057f\u0565\u0574\u0562\u0565\u0580" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y \u0569. MMMM d, EEEE", + "longDate": "dd MMMM, y \u0569.", + "medium": "dd MMM, y \u0569. HH:mm:ss", + "mediumDate": "dd MMM, y \u0569.", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Dram", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "hy-am", + "localeID": "hy_AM", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_hy.js b/1.6.6/i18n/angular-locale_hy.js new file mode 100644 index 000000000..2c7d5122a --- /dev/null +++ b/1.6.6/i18n/angular-locale_hy.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u056f\u056b\u0580\u0561\u056f\u056b", + "\u0565\u0580\u056f\u0578\u0582\u0577\u0561\u0562\u0569\u056b", + "\u0565\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b", + "\u0579\u0578\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b", + "\u0570\u056b\u0576\u0563\u0577\u0561\u0562\u0569\u056b", + "\u0578\u0582\u0580\u0562\u0561\u0569", + "\u0577\u0561\u0562\u0561\u0569" + ], + "ERANAMES": [ + "\u0554\u0580\u056b\u057d\u057f\u0578\u057d\u056b\u0581 \u0561\u057c\u0561\u057b", + "\u0554\u0580\u056b\u057d\u057f\u0578\u057d\u056b\u0581 \u0570\u0565\u057f\u0578" + ], + "ERAS": [ + "\u0574.\u0569.\u0561.", + "\u0574.\u0569." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0570\u0578\u0582\u0576\u057e\u0561\u0580\u056b", + "\u0583\u0565\u057f\u0580\u057e\u0561\u0580\u056b", + "\u0574\u0561\u0580\u057f\u056b", + "\u0561\u057a\u0580\u056b\u056c\u056b", + "\u0574\u0561\u0575\u056b\u057d\u056b", + "\u0570\u0578\u0582\u0576\u056b\u057d\u056b", + "\u0570\u0578\u0582\u056c\u056b\u057d\u056b", + "\u0585\u0563\u0578\u057d\u057f\u0578\u057d\u056b", + "\u057d\u0565\u057a\u057f\u0565\u0574\u0562\u0565\u0580\u056b", + "\u0570\u0578\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b", + "\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580\u056b", + "\u0564\u0565\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b" + ], + "SHORTDAY": [ + "\u056f\u056b\u0580", + "\u0565\u0580\u056f", + "\u0565\u0580\u0584", + "\u0579\u0580\u0584", + "\u0570\u0576\u0563", + "\u0578\u0582\u0580", + "\u0577\u0562\u0569" + ], + "SHORTMONTH": [ + "\u0570\u0576\u057e", + "\u0583\u057f\u057e", + "\u0574\u0580\u057f", + "\u0561\u057a\u0580", + "\u0574\u0575\u057d", + "\u0570\u0576\u057d", + "\u0570\u056c\u057d", + "\u0585\u0563\u057d", + "\u057d\u0565\u057a", + "\u0570\u0578\u056f", + "\u0576\u0578\u0575", + "\u0564\u0565\u056f" + ], + "STANDALONEMONTH": [ + "\u0570\u0578\u0582\u0576\u057e\u0561\u0580", + "\u0583\u0565\u057f\u0580\u057e\u0561\u0580", + "\u0574\u0561\u0580\u057f", + "\u0561\u057a\u0580\u056b\u056c", + "\u0574\u0561\u0575\u056b\u057d", + "\u0570\u0578\u0582\u0576\u056b\u057d", + "\u0570\u0578\u0582\u056c\u056b\u057d", + "\u0585\u0563\u0578\u057d\u057f\u0578\u057d", + "\u057d\u0565\u057a\u057f\u0565\u0574\u0562\u0565\u0580", + "\u0570\u0578\u056f\u057f\u0565\u0574\u0562\u0565\u0580", + "\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580", + "\u0564\u0565\u056f\u057f\u0565\u0574\u0562\u0565\u0580" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y \u0569. MMMM d, EEEE", + "longDate": "dd MMMM, y \u0569.", + "medium": "dd MMM, y \u0569. HH:mm:ss", + "mediumDate": "dd MMM, y \u0569.", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Dram", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "hy", + "localeID": "hy", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_id-id.js b/1.6.6/i18n/angular-locale_id-id.js new file mode 100644 index 000000000..8b5d5602d --- /dev/null +++ b/1.6.6/i18n/angular-locale_id-id.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Minggu", + "Senin", + "Selasa", + "Rabu", + "Kamis", + "Jumat", + "Sabtu" + ], + "ERANAMES": [ + "Sebelum Masehi", + "Masehi" + ], + "ERAS": [ + "SM", + "M" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Januari", + "Februari", + "Maret", + "April", + "Mei", + "Juni", + "Juli", + "Agustus", + "September", + "Oktober", + "November", + "Desember" + ], + "SHORTDAY": [ + "Min", + "Sen", + "Sel", + "Rab", + "Kam", + "Jum", + "Sab" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "Mei", + "Jun", + "Jul", + "Agt", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Maret", + "April", + "Mei", + "Juni", + "Juli", + "Agustus", + "September", + "Oktober", + "November", + "Desember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH.mm.ss", + "mediumDate": "d MMM y", + "mediumTime": "HH.mm.ss", + "short": "dd/MM/yy HH.mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH.mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rp", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "id-id", + "localeID": "id_ID", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_id.js b/1.6.6/i18n/angular-locale_id.js new file mode 100644 index 000000000..12d48077a --- /dev/null +++ b/1.6.6/i18n/angular-locale_id.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Minggu", + "Senin", + "Selasa", + "Rabu", + "Kamis", + "Jumat", + "Sabtu" + ], + "ERANAMES": [ + "Sebelum Masehi", + "Masehi" + ], + "ERAS": [ + "SM", + "M" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Januari", + "Februari", + "Maret", + "April", + "Mei", + "Juni", + "Juli", + "Agustus", + "September", + "Oktober", + "November", + "Desember" + ], + "SHORTDAY": [ + "Min", + "Sen", + "Sel", + "Rab", + "Kam", + "Jum", + "Sab" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "Mei", + "Jun", + "Jul", + "Agt", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Maret", + "April", + "Mei", + "Juni", + "Juli", + "Agustus", + "September", + "Oktober", + "November", + "Desember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH.mm.ss", + "mediumDate": "d MMM y", + "mediumTime": "HH.mm.ss", + "short": "dd/MM/yy HH.mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH.mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rp", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "id", + "localeID": "id", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ig-ng.js b/1.6.6/i18n/angular-locale_ig-ng.js new file mode 100644 index 000000000..c8aa6c6c9 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ig-ng.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "A.M.", + "P.M." + ], + "DAY": [ + "Mb\u1ecds\u1ecb \u1ee4ka", + "M\u1ecdnde", + "Tiuzdee", + "Wenezdee", + "T\u1ecd\u1ecdzdee", + "Fra\u1ecbdee", + "Sat\u1ecddee" + ], + "ERANAMES": [ + "Tupu Kristi", + "Af\u1ecd Kristi" + ], + "ERAS": [ + "T.K.", + "A.K." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Jen\u1ee5war\u1ecb", + "Febr\u1ee5war\u1ecb", + "Maach\u1ecb", + "Eprel", + "Mee", + "Juun", + "Jula\u1ecb", + "\u1eccg\u1ecd\u1ecdst", + "Septemba", + "\u1eccktoba", + "Novemba", + "Disemba" + ], + "SHORTDAY": [ + "\u1ee4ka", + "M\u1ecdn", + "Tiu", + "Wen", + "T\u1ecd\u1ecd", + "Fra\u1ecb", + "Sat" + ], + "SHORTMONTH": [ + "Jen", + "Feb", + "Maa", + "Epr", + "Mee", + "Juu", + "Jul", + "\u1eccg\u1ecd", + "Sep", + "\u1ecckt", + "Nov", + "Dis" + ], + "STANDALONEMONTH": [ + "Jen\u1ee5war\u1ecb", + "Febr\u1ee5war\u1ecb", + "Maach\u1ecb", + "Eprel", + "Mee", + "Juun", + "Jula\u1ecb", + "\u1eccg\u1ecd\u1ecdst", + "Septemba", + "\u1eccktoba", + "Novemba", + "Disemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20a6", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ig-ng", + "localeID": "ig_NG", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ig.js b/1.6.6/i18n/angular-locale_ig.js new file mode 100644 index 000000000..34098ea5b --- /dev/null +++ b/1.6.6/i18n/angular-locale_ig.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "A.M.", + "P.M." + ], + "DAY": [ + "Mb\u1ecds\u1ecb \u1ee4ka", + "M\u1ecdnde", + "Tiuzdee", + "Wenezdee", + "T\u1ecd\u1ecdzdee", + "Fra\u1ecbdee", + "Sat\u1ecddee" + ], + "ERANAMES": [ + "Tupu Kristi", + "Af\u1ecd Kristi" + ], + "ERAS": [ + "T.K.", + "A.K." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Jen\u1ee5war\u1ecb", + "Febr\u1ee5war\u1ecb", + "Maach\u1ecb", + "Eprel", + "Mee", + "Juun", + "Jula\u1ecb", + "\u1eccg\u1ecd\u1ecdst", + "Septemba", + "\u1eccktoba", + "Novemba", + "Disemba" + ], + "SHORTDAY": [ + "\u1ee4ka", + "M\u1ecdn", + "Tiu", + "Wen", + "T\u1ecd\u1ecd", + "Fra\u1ecb", + "Sat" + ], + "SHORTMONTH": [ + "Jen", + "Feb", + "Maa", + "Epr", + "Mee", + "Juu", + "Jul", + "\u1eccg\u1ecd", + "Sep", + "\u1ecckt", + "Nov", + "Dis" + ], + "STANDALONEMONTH": [ + "Jen\u1ee5war\u1ecb", + "Febr\u1ee5war\u1ecb", + "Maach\u1ecb", + "Eprel", + "Mee", + "Juun", + "Jula\u1ecb", + "\u1eccg\u1ecd\u1ecdst", + "Septemba", + "\u1eccktoba", + "Novemba", + "Disemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20a6", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ig", + "localeID": "ig", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ii-cn.js b/1.6.6/i18n/angular-locale_ii-cn.js new file mode 100644 index 000000000..fc62f38f7 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ii-cn.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\ua3b8\ua111", + "\ua06f\ua2d2" + ], + "DAY": [ + "\ua46d\ua18f\ua44d", + "\ua18f\ua282\ua2cd", + "\ua18f\ua282\ua44d", + "\ua18f\ua282\ua315", + "\ua18f\ua282\ua1d6", + "\ua18f\ua282\ua26c", + "\ua18f\ua282\ua0d8" + ], + "ERANAMES": [ + "\ua0c5\ua2ca\ua0bf", + "\ua0c5\ua2ca\ua282" + ], + "ERAS": [ + "\ua0c5\ua2ca\ua0bf", + "\ua0c5\ua2ca\ua282" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\ua2cd\ua1aa", + "\ua44d\ua1aa", + "\ua315\ua1aa", + "\ua1d6\ua1aa", + "\ua26c\ua1aa", + "\ua0d8\ua1aa", + "\ua3c3\ua1aa", + "\ua246\ua1aa", + "\ua22c\ua1aa", + "\ua2b0\ua1aa", + "\ua2b0\ua2aa\ua1aa", + "\ua2b0\ua44b\ua1aa" + ], + "SHORTDAY": [ + "\ua46d\ua18f", + "\ua18f\ua2cd", + "\ua18f\ua44d", + "\ua18f\ua315", + "\ua18f\ua1d6", + "\ua18f\ua26c", + "\ua18f\ua0d8" + ], + "SHORTMONTH": [ + "\ua2cd\ua1aa", + "\ua44d\ua1aa", + "\ua315\ua1aa", + "\ua1d6\ua1aa", + "\ua26c\ua1aa", + "\ua0d8\ua1aa", + "\ua3c3\ua1aa", + "\ua246\ua1aa", + "\ua22c\ua1aa", + "\ua2b0\ua1aa", + "\ua2b0\ua2aa\ua1aa", + "\ua2b0\ua44b\ua1aa" + ], + "STANDALONEMONTH": [ + "\ua2cd\ua1aa", + "\ua44d\ua1aa", + "\ua315\ua1aa", + "\ua1d6\ua1aa", + "\ua26c\ua1aa", + "\ua0d8\ua1aa", + "\ua3c3\ua1aa", + "\ua246\ua1aa", + "\ua22c\ua1aa", + "\ua2b0\ua1aa", + "\ua2b0\ua2aa\ua1aa", + "\ua2b0\ua44b\ua1aa" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d h:mm:ss a", + "mediumDate": "y MMM d", + "mediumTime": "h:mm:ss a", + "short": "y-MM-dd h:mm a", + "shortDate": "y-MM-dd", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a5", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ii-cn", + "localeID": "ii_CN", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ii.js b/1.6.6/i18n/angular-locale_ii.js new file mode 100644 index 000000000..ca0e5fecb --- /dev/null +++ b/1.6.6/i18n/angular-locale_ii.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\ua3b8\ua111", + "\ua06f\ua2d2" + ], + "DAY": [ + "\ua46d\ua18f\ua44d", + "\ua18f\ua282\ua2cd", + "\ua18f\ua282\ua44d", + "\ua18f\ua282\ua315", + "\ua18f\ua282\ua1d6", + "\ua18f\ua282\ua26c", + "\ua18f\ua282\ua0d8" + ], + "ERANAMES": [ + "\ua0c5\ua2ca\ua0bf", + "\ua0c5\ua2ca\ua282" + ], + "ERAS": [ + "\ua0c5\ua2ca\ua0bf", + "\ua0c5\ua2ca\ua282" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\ua2cd\ua1aa", + "\ua44d\ua1aa", + "\ua315\ua1aa", + "\ua1d6\ua1aa", + "\ua26c\ua1aa", + "\ua0d8\ua1aa", + "\ua3c3\ua1aa", + "\ua246\ua1aa", + "\ua22c\ua1aa", + "\ua2b0\ua1aa", + "\ua2b0\ua2aa\ua1aa", + "\ua2b0\ua44b\ua1aa" + ], + "SHORTDAY": [ + "\ua46d\ua18f", + "\ua18f\ua2cd", + "\ua18f\ua44d", + "\ua18f\ua315", + "\ua18f\ua1d6", + "\ua18f\ua26c", + "\ua18f\ua0d8" + ], + "SHORTMONTH": [ + "\ua2cd\ua1aa", + "\ua44d\ua1aa", + "\ua315\ua1aa", + "\ua1d6\ua1aa", + "\ua26c\ua1aa", + "\ua0d8\ua1aa", + "\ua3c3\ua1aa", + "\ua246\ua1aa", + "\ua22c\ua1aa", + "\ua2b0\ua1aa", + "\ua2b0\ua2aa\ua1aa", + "\ua2b0\ua44b\ua1aa" + ], + "STANDALONEMONTH": [ + "\ua2cd\ua1aa", + "\ua44d\ua1aa", + "\ua315\ua1aa", + "\ua1d6\ua1aa", + "\ua26c\ua1aa", + "\ua0d8\ua1aa", + "\ua3c3\ua1aa", + "\ua246\ua1aa", + "\ua22c\ua1aa", + "\ua2b0\ua1aa", + "\ua2b0\ua2aa\ua1aa", + "\ua2b0\ua44b\ua1aa" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d h:mm:ss a", + "mediumDate": "y MMM d", + "mediumTime": "h:mm:ss a", + "short": "y-MM-dd h:mm a", + "shortDate": "y-MM-dd", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a5", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ii", + "localeID": "ii", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_in.js b/1.6.6/i18n/angular-locale_in.js new file mode 100644 index 000000000..98eaf0216 --- /dev/null +++ b/1.6.6/i18n/angular-locale_in.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Minggu", + "Senin", + "Selasa", + "Rabu", + "Kamis", + "Jumat", + "Sabtu" + ], + "ERANAMES": [ + "Sebelum Masehi", + "Masehi" + ], + "ERAS": [ + "SM", + "M" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Januari", + "Februari", + "Maret", + "April", + "Mei", + "Juni", + "Juli", + "Agustus", + "September", + "Oktober", + "November", + "Desember" + ], + "SHORTDAY": [ + "Min", + "Sen", + "Sel", + "Rab", + "Kam", + "Jum", + "Sab" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "Mei", + "Jun", + "Jul", + "Agt", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Maret", + "April", + "Mei", + "Juni", + "Juli", + "Agustus", + "September", + "Oktober", + "November", + "Desember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH.mm.ss", + "mediumDate": "d MMM y", + "mediumTime": "HH.mm.ss", + "short": "dd/MM/yy HH.mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH.mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rp", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "in", + "localeID": "in", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_is-is.js b/1.6.6/i18n/angular-locale_is-is.js new file mode 100644 index 000000000..85a79055d --- /dev/null +++ b/1.6.6/i18n/angular-locale_is-is.js @@ -0,0 +1,156 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +function getWT(v, f) { + if (f === 0) { + return {w: 0, t: 0}; + } + + while ((f % 10) === 0) { + f /= 10; + v--; + } + + return {w: v, t: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "f.h.", + "e.h." + ], + "DAY": [ + "sunnudagur", + "m\u00e1nudagur", + "\u00feri\u00f0judagur", + "mi\u00f0vikudagur", + "fimmtudagur", + "f\u00f6studagur", + "laugardagur" + ], + "ERANAMES": [ + "fyrir Krist", + "eftir Krist" + ], + "ERAS": [ + "f.Kr.", + "e.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "jan\u00faar", + "febr\u00faar", + "mars", + "apr\u00edl", + "ma\u00ed", + "j\u00fan\u00ed", + "j\u00fal\u00ed", + "\u00e1g\u00fast", + "september", + "okt\u00f3ber", + "n\u00f3vember", + "desember" + ], + "SHORTDAY": [ + "sun.", + "m\u00e1n.", + "\u00feri.", + "mi\u00f0.", + "fim.", + "f\u00f6s.", + "lau." + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mar.", + "apr.", + "ma\u00ed", + "j\u00fan.", + "j\u00fal.", + "\u00e1g\u00fa.", + "sep.", + "okt.", + "n\u00f3v.", + "des." + ], + "STANDALONEMONTH": [ + "jan\u00faar", + "febr\u00faar", + "mars", + "apr\u00edl", + "ma\u00ed", + "j\u00fan\u00ed", + "j\u00fal\u00ed", + "\u00e1g\u00fast", + "september", + "okt\u00f3ber", + "n\u00f3vember", + "desember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. MMM y HH:mm:ss", + "mediumDate": "d. MMM y", + "mediumTime": "HH:mm:ss", + "short": "d.M.y HH:mm", + "shortDate": "d.M.y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "is-is", + "localeID": "is_IS", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); var wt = getWT(vf.v, vf.f); if (wt.t == 0 && i % 10 == 1 && i % 100 != 11 || wt.t != 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_is.js b/1.6.6/i18n/angular-locale_is.js new file mode 100644 index 000000000..8a602c2f7 --- /dev/null +++ b/1.6.6/i18n/angular-locale_is.js @@ -0,0 +1,156 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +function getWT(v, f) { + if (f === 0) { + return {w: 0, t: 0}; + } + + while ((f % 10) === 0) { + f /= 10; + v--; + } + + return {w: v, t: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "f.h.", + "e.h." + ], + "DAY": [ + "sunnudagur", + "m\u00e1nudagur", + "\u00feri\u00f0judagur", + "mi\u00f0vikudagur", + "fimmtudagur", + "f\u00f6studagur", + "laugardagur" + ], + "ERANAMES": [ + "fyrir Krist", + "eftir Krist" + ], + "ERAS": [ + "f.Kr.", + "e.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "jan\u00faar", + "febr\u00faar", + "mars", + "apr\u00edl", + "ma\u00ed", + "j\u00fan\u00ed", + "j\u00fal\u00ed", + "\u00e1g\u00fast", + "september", + "okt\u00f3ber", + "n\u00f3vember", + "desember" + ], + "SHORTDAY": [ + "sun.", + "m\u00e1n.", + "\u00feri.", + "mi\u00f0.", + "fim.", + "f\u00f6s.", + "lau." + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mar.", + "apr.", + "ma\u00ed", + "j\u00fan.", + "j\u00fal.", + "\u00e1g\u00fa.", + "sep.", + "okt.", + "n\u00f3v.", + "des." + ], + "STANDALONEMONTH": [ + "jan\u00faar", + "febr\u00faar", + "mars", + "apr\u00edl", + "ma\u00ed", + "j\u00fan\u00ed", + "j\u00fal\u00ed", + "\u00e1g\u00fast", + "september", + "okt\u00f3ber", + "n\u00f3vember", + "desember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. MMM y HH:mm:ss", + "mediumDate": "d. MMM y", + "mediumTime": "HH:mm:ss", + "short": "d.M.y HH:mm", + "shortDate": "d.M.y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "is", + "localeID": "is", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); var wt = getWT(vf.v, vf.f); if (wt.t == 0 && i % 10 == 1 && i % 100 != 11 || wt.t != 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_it-ch.js b/1.6.6/i18n/angular-locale_it-ch.js new file mode 100644 index 000000000..c469d675f --- /dev/null +++ b/1.6.6/i18n/angular-locale_it-ch.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "domenica", + "luned\u00ec", + "marted\u00ec", + "mercoled\u00ec", + "gioved\u00ec", + "venerd\u00ec", + "sabato" + ], + "ERANAMES": [ + "avanti Cristo", + "dopo Cristo" + ], + "ERAS": [ + "a.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "gennaio", + "febbraio", + "marzo", + "aprile", + "maggio", + "giugno", + "luglio", + "agosto", + "settembre", + "ottobre", + "novembre", + "dicembre" + ], + "SHORTDAY": [ + "dom", + "lun", + "mar", + "mer", + "gio", + "ven", + "sab" + ], + "SHORTMONTH": [ + "gen", + "feb", + "mar", + "apr", + "mag", + "giu", + "lug", + "ago", + "set", + "ott", + "nov", + "dic" + ], + "STANDALONEMONTH": [ + "gennaio", + "febbraio", + "marzo", + "aprile", + "maggio", + "giugno", + "luglio", + "agosto", + "settembre", + "ottobre", + "novembre", + "dicembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CHF", + "DECIMAL_SEP": ".", + "GROUP_SEP": "\u2019", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u00a4-", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "it-ch", + "localeID": "it_CH", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_it-it.js b/1.6.6/i18n/angular-locale_it-it.js new file mode 100644 index 000000000..ba723af2d --- /dev/null +++ b/1.6.6/i18n/angular-locale_it-it.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "domenica", + "luned\u00ec", + "marted\u00ec", + "mercoled\u00ec", + "gioved\u00ec", + "venerd\u00ec", + "sabato" + ], + "ERANAMES": [ + "avanti Cristo", + "dopo Cristo" + ], + "ERAS": [ + "a.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "gennaio", + "febbraio", + "marzo", + "aprile", + "maggio", + "giugno", + "luglio", + "agosto", + "settembre", + "ottobre", + "novembre", + "dicembre" + ], + "SHORTDAY": [ + "dom", + "lun", + "mar", + "mer", + "gio", + "ven", + "sab" + ], + "SHORTMONTH": [ + "gen", + "feb", + "mar", + "apr", + "mag", + "giu", + "lug", + "ago", + "set", + "ott", + "nov", + "dic" + ], + "STANDALONEMONTH": [ + "gennaio", + "febbraio", + "marzo", + "aprile", + "maggio", + "giugno", + "luglio", + "agosto", + "settembre", + "ottobre", + "novembre", + "dicembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "dd MMM y HH:mm:ss", + "mediumDate": "dd MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "it-it", + "localeID": "it_IT", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_it-sm.js b/1.6.6/i18n/angular-locale_it-sm.js new file mode 100644 index 000000000..cb9d4351d --- /dev/null +++ b/1.6.6/i18n/angular-locale_it-sm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "domenica", + "luned\u00ec", + "marted\u00ec", + "mercoled\u00ec", + "gioved\u00ec", + "venerd\u00ec", + "sabato" + ], + "ERANAMES": [ + "avanti Cristo", + "dopo Cristo" + ], + "ERAS": [ + "a.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "gennaio", + "febbraio", + "marzo", + "aprile", + "maggio", + "giugno", + "luglio", + "agosto", + "settembre", + "ottobre", + "novembre", + "dicembre" + ], + "SHORTDAY": [ + "dom", + "lun", + "mar", + "mer", + "gio", + "ven", + "sab" + ], + "SHORTMONTH": [ + "gen", + "feb", + "mar", + "apr", + "mag", + "giu", + "lug", + "ago", + "set", + "ott", + "nov", + "dic" + ], + "STANDALONEMONTH": [ + "gennaio", + "febbraio", + "marzo", + "aprile", + "maggio", + "giugno", + "luglio", + "agosto", + "settembre", + "ottobre", + "novembre", + "dicembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "dd MMM y HH:mm:ss", + "mediumDate": "dd MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "it-sm", + "localeID": "it_SM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_it-va.js b/1.6.6/i18n/angular-locale_it-va.js new file mode 100644 index 000000000..4ab07dbea --- /dev/null +++ b/1.6.6/i18n/angular-locale_it-va.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "domenica", + "luned\u00ec", + "marted\u00ec", + "mercoled\u00ec", + "gioved\u00ec", + "venerd\u00ec", + "sabato" + ], + "ERANAMES": [ + "avanti Cristo", + "dopo Cristo" + ], + "ERAS": [ + "a.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "gennaio", + "febbraio", + "marzo", + "aprile", + "maggio", + "giugno", + "luglio", + "agosto", + "settembre", + "ottobre", + "novembre", + "dicembre" + ], + "SHORTDAY": [ + "dom", + "lun", + "mar", + "mer", + "gio", + "ven", + "sab" + ], + "SHORTMONTH": [ + "gen", + "feb", + "mar", + "apr", + "mag", + "giu", + "lug", + "ago", + "set", + "ott", + "nov", + "dic" + ], + "STANDALONEMONTH": [ + "gennaio", + "febbraio", + "marzo", + "aprile", + "maggio", + "giugno", + "luglio", + "agosto", + "settembre", + "ottobre", + "novembre", + "dicembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "dd MMM y HH:mm:ss", + "mediumDate": "dd MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "it-va", + "localeID": "it_VA", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_it.js b/1.6.6/i18n/angular-locale_it.js new file mode 100644 index 000000000..138872188 --- /dev/null +++ b/1.6.6/i18n/angular-locale_it.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "domenica", + "luned\u00ec", + "marted\u00ec", + "mercoled\u00ec", + "gioved\u00ec", + "venerd\u00ec", + "sabato" + ], + "ERANAMES": [ + "avanti Cristo", + "dopo Cristo" + ], + "ERAS": [ + "a.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "gennaio", + "febbraio", + "marzo", + "aprile", + "maggio", + "giugno", + "luglio", + "agosto", + "settembre", + "ottobre", + "novembre", + "dicembre" + ], + "SHORTDAY": [ + "dom", + "lun", + "mar", + "mer", + "gio", + "ven", + "sab" + ], + "SHORTMONTH": [ + "gen", + "feb", + "mar", + "apr", + "mag", + "giu", + "lug", + "ago", + "set", + "ott", + "nov", + "dic" + ], + "STANDALONEMONTH": [ + "gennaio", + "febbraio", + "marzo", + "aprile", + "maggio", + "giugno", + "luglio", + "agosto", + "settembre", + "ottobre", + "novembre", + "dicembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "dd MMM y HH:mm:ss", + "mediumDate": "dd MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "it", + "localeID": "it", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_iw.js b/1.6.6/i18n/angular-locale_iw.js new file mode 100644 index 000000000..88be53633 --- /dev/null +++ b/1.6.6/i18n/angular-locale_iw.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e6", + "\u05d0\u05d7\u05d4\u05f4\u05e6" + ], + "DAY": [ + "\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df", + "\u05d9\u05d5\u05dd \u05e9\u05e0\u05d9", + "\u05d9\u05d5\u05dd \u05e9\u05dc\u05d9\u05e9\u05d9", + "\u05d9\u05d5\u05dd \u05e8\u05d1\u05d9\u05e2\u05d9", + "\u05d9\u05d5\u05dd \u05d7\u05de\u05d9\u05e9\u05d9", + "\u05d9\u05d5\u05dd \u05e9\u05d9\u05e9\u05d9", + "\u05d9\u05d5\u05dd \u05e9\u05d1\u05ea" + ], + "ERANAMES": [ + "\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e1\u05e4\u05d9\u05e8\u05d4", + "\u05dc\u05e1\u05e4\u05d9\u05e8\u05d4" + ], + "ERAS": [ + "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e1", + "\u05dc\u05e1\u05e4\u05d9\u05e8\u05d4" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u05d9\u05e0\u05d5\u05d0\u05e8", + "\u05e4\u05d1\u05e8\u05d5\u05d0\u05e8", + "\u05de\u05e8\u05e5", + "\u05d0\u05e4\u05e8\u05d9\u05dc", + "\u05de\u05d0\u05d9", + "\u05d9\u05d5\u05e0\u05d9", + "\u05d9\u05d5\u05dc\u05d9", + "\u05d0\u05d5\u05d2\u05d5\u05e1\u05d8", + "\u05e1\u05e4\u05d8\u05de\u05d1\u05e8", + "\u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8", + "\u05e0\u05d5\u05d1\u05de\u05d1\u05e8", + "\u05d3\u05e6\u05de\u05d1\u05e8" + ], + "SHORTDAY": [ + "\u05d9\u05d5\u05dd \u05d0\u05f3", + "\u05d9\u05d5\u05dd \u05d1\u05f3", + "\u05d9\u05d5\u05dd \u05d2\u05f3", + "\u05d9\u05d5\u05dd \u05d3\u05f3", + "\u05d9\u05d5\u05dd \u05d4\u05f3", + "\u05d9\u05d5\u05dd \u05d5\u05f3", + "\u05e9\u05d1\u05ea" + ], + "SHORTMONTH": [ + "\u05d9\u05e0\u05d5\u05f3", + "\u05e4\u05d1\u05e8\u05f3", + "\u05de\u05e8\u05e5", + "\u05d0\u05e4\u05e8\u05f3", + "\u05de\u05d0\u05d9", + "\u05d9\u05d5\u05e0\u05d9", + "\u05d9\u05d5\u05dc\u05d9", + "\u05d0\u05d5\u05d2\u05f3", + "\u05e1\u05e4\u05d8\u05f3", + "\u05d0\u05d5\u05e7\u05f3", + "\u05e0\u05d5\u05d1\u05f3", + "\u05d3\u05e6\u05de\u05f3" + ], + "STANDALONEMONTH": [ + "\u05d9\u05e0\u05d5\u05d0\u05e8", + "\u05e4\u05d1\u05e8\u05d5\u05d0\u05e8", + "\u05de\u05e8\u05e5", + "\u05d0\u05e4\u05e8\u05d9\u05dc", + "\u05de\u05d0\u05d9", + "\u05d9\u05d5\u05e0\u05d9", + "\u05d9\u05d5\u05dc\u05d9", + "\u05d0\u05d5\u05d2\u05d5\u05e1\u05d8", + "\u05e1\u05e4\u05d8\u05de\u05d1\u05e8", + "\u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8", + "\u05e0\u05d5\u05d1\u05de\u05d1\u05e8", + "\u05d3\u05e6\u05de\u05d1\u05e8" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE, d \u05d1MMMM y", + "longDate": "d \u05d1MMMM y", + "medium": "d \u05d1MMM y H:mm:ss", + "mediumDate": "d \u05d1MMM y", + "mediumTime": "H:mm:ss", + "short": "d.M.y H:mm", + "shortDate": "d.M.y", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20aa", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u200f-", + "negSuf": "\u00a0\u00a4", + "posPre": "\u200f", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "iw", + "localeID": "iw", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (i == 2 && vf.v == 0) { return PLURAL_CATEGORY.TWO; } if (vf.v == 0 && (n < 0 || n > 10) && n % 10 == 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ja-jp.js b/1.6.6/i18n/angular-locale_ja-jp.js new file mode 100644 index 000000000..e4b9d5baf --- /dev/null +++ b/1.6.6/i18n/angular-locale_ja-jp.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u5348\u524d", + "\u5348\u5f8c" + ], + "DAY": [ + "\u65e5\u66dc\u65e5", + "\u6708\u66dc\u65e5", + "\u706b\u66dc\u65e5", + "\u6c34\u66dc\u65e5", + "\u6728\u66dc\u65e5", + "\u91d1\u66dc\u65e5", + "\u571f\u66dc\u65e5" + ], + "ERANAMES": [ + "\u7d00\u5143\u524d", + "\u897f\u66a6" + ], + "ERAS": [ + "\u7d00\u5143\u524d", + "\u897f\u66a6" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "SHORTDAY": [ + "\u65e5", + "\u6708", + "\u706b", + "\u6c34", + "\u6728", + "\u91d1", + "\u571f" + ], + "SHORTMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "STANDALONEMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y\u5e74M\u6708d\u65e5EEEE", + "longDate": "y\u5e74M\u6708d\u65e5", + "medium": "y/MM/dd H:mm:ss", + "mediumDate": "y/MM/dd", + "mediumTime": "H:mm:ss", + "short": "y/MM/dd H:mm", + "shortDate": "y/MM/dd", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a5", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ja-jp", + "localeID": "ja_JP", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ja.js b/1.6.6/i18n/angular-locale_ja.js new file mode 100644 index 000000000..f528314ec --- /dev/null +++ b/1.6.6/i18n/angular-locale_ja.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u5348\u524d", + "\u5348\u5f8c" + ], + "DAY": [ + "\u65e5\u66dc\u65e5", + "\u6708\u66dc\u65e5", + "\u706b\u66dc\u65e5", + "\u6c34\u66dc\u65e5", + "\u6728\u66dc\u65e5", + "\u91d1\u66dc\u65e5", + "\u571f\u66dc\u65e5" + ], + "ERANAMES": [ + "\u7d00\u5143\u524d", + "\u897f\u66a6" + ], + "ERAS": [ + "\u7d00\u5143\u524d", + "\u897f\u66a6" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "SHORTDAY": [ + "\u65e5", + "\u6708", + "\u706b", + "\u6c34", + "\u6728", + "\u91d1", + "\u571f" + ], + "SHORTMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "STANDALONEMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y\u5e74M\u6708d\u65e5EEEE", + "longDate": "y\u5e74M\u6708d\u65e5", + "medium": "y/MM/dd H:mm:ss", + "mediumDate": "y/MM/dd", + "mediumTime": "H:mm:ss", + "short": "y/MM/dd H:mm", + "shortDate": "y/MM/dd", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a5", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ja", + "localeID": "ja", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_jgo-cm.js b/1.6.6/i18n/angular-locale_jgo-cm.js new file mode 100644 index 000000000..9d6b05d78 --- /dev/null +++ b/1.6.6/i18n/angular-locale_jgo-cm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "mba\ua78cmba\ua78c", + "\u014bka mb\u0254\u0301t nji" + ], + "DAY": [ + "S\u0254\u0301ndi", + "M\u0254\u0301ndi", + "\u00c1pta M\u0254\u0301ndi", + "W\u025b\u0301n\u025bs\u025bd\u025b", + "T\u0254\u0301s\u025bd\u025b", + "F\u025bl\u00e2y\u025bd\u025b", + "S\u00e1sid\u025b" + ], + "ERANAMES": [ + "ts\u025btts\u025bt m\u025b\u014bgu\ua78c mi \u025b\u0301 l\u025b\u025bn\u025b K\u025bl\u00eds\u025bt\u0254 g\u0254 \u0144\u0254\u0301", + "ts\u025btts\u025bt m\u025b\u014bgu\ua78c mi \u025b\u0301 f\u00fan\u025b K\u025bl\u00eds\u025bt\u0254 t\u0254\u0301 m\u0254\u0301" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Ndu\u014bmbi Sa\u014b", + "P\u025bsa\u014b P\u025b\u0301p\u00e1", + "P\u025bsa\u014b P\u025b\u0301t\u00e1t", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301kwa", + "P\u025bsa\u014b Pataa", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301nt\u00fak\u00fa", + "P\u025bsa\u014b Saamb\u00e1", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301f\u0254m", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301pf\u00fa\ua78b\u00fa", + "P\u025bsa\u014b N\u025bg\u025b\u0301m", + "P\u025bsa\u014b Nts\u0254\u030cpm\u0254\u0301", + "P\u025bsa\u014b Nts\u0254\u030cpp\u00e1" + ], + "SHORTDAY": [ + "S\u0254\u0301ndi", + "M\u0254\u0301ndi", + "\u00c1pta M\u0254\u0301ndi", + "W\u025b\u0301n\u025bs\u025bd\u025b", + "T\u0254\u0301s\u025bd\u025b", + "F\u025bl\u00e2y\u025bd\u025b", + "S\u00e1sid\u025b" + ], + "SHORTMONTH": [ + "Ndu\u014bmbi Sa\u014b", + "P\u025bsa\u014b P\u025b\u0301p\u00e1", + "P\u025bsa\u014b P\u025b\u0301t\u00e1t", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301kwa", + "P\u025bsa\u014b Pataa", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301nt\u00fak\u00fa", + "P\u025bsa\u014b Saamb\u00e1", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301f\u0254m", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301pf\u00fa\ua78b\u00fa", + "P\u025bsa\u014b N\u025bg\u025b\u0301m", + "P\u025bsa\u014b Nts\u0254\u030cpm\u0254\u0301", + "P\u025bsa\u014b Nts\u0254\u030cpp\u00e1" + ], + "STANDALONEMONTH": [ + "Ndu\u014bmbi Sa\u014b", + "P\u025bsa\u014b P\u025b\u0301p\u00e1", + "P\u025bsa\u014b P\u025b\u0301t\u00e1t", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301kwa", + "P\u025bsa\u014b Pataa", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301nt\u00fak\u00fa", + "P\u025bsa\u014b Saamb\u00e1", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301f\u0254m", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301pf\u00fa\ua78b\u00fa", + "P\u025bsa\u014b N\u025bg\u025b\u0301m", + "P\u025bsa\u014b Nts\u0254\u030cpm\u0254\u0301", + "P\u025bsa\u014b Nts\u0254\u030cpp\u00e1" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, y MMMM dd", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "jgo-cm", + "localeID": "jgo_CM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_jgo.js b/1.6.6/i18n/angular-locale_jgo.js new file mode 100644 index 000000000..1879a505b --- /dev/null +++ b/1.6.6/i18n/angular-locale_jgo.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "mba\ua78cmba\ua78c", + "\u014bka mb\u0254\u0301t nji" + ], + "DAY": [ + "S\u0254\u0301ndi", + "M\u0254\u0301ndi", + "\u00c1pta M\u0254\u0301ndi", + "W\u025b\u0301n\u025bs\u025bd\u025b", + "T\u0254\u0301s\u025bd\u025b", + "F\u025bl\u00e2y\u025bd\u025b", + "S\u00e1sid\u025b" + ], + "ERANAMES": [ + "ts\u025btts\u025bt m\u025b\u014bgu\ua78c mi \u025b\u0301 l\u025b\u025bn\u025b K\u025bl\u00eds\u025bt\u0254 g\u0254 \u0144\u0254\u0301", + "ts\u025btts\u025bt m\u025b\u014bgu\ua78c mi \u025b\u0301 f\u00fan\u025b K\u025bl\u00eds\u025bt\u0254 t\u0254\u0301 m\u0254\u0301" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Ndu\u014bmbi Sa\u014b", + "P\u025bsa\u014b P\u025b\u0301p\u00e1", + "P\u025bsa\u014b P\u025b\u0301t\u00e1t", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301kwa", + "P\u025bsa\u014b Pataa", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301nt\u00fak\u00fa", + "P\u025bsa\u014b Saamb\u00e1", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301f\u0254m", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301pf\u00fa\ua78b\u00fa", + "P\u025bsa\u014b N\u025bg\u025b\u0301m", + "P\u025bsa\u014b Nts\u0254\u030cpm\u0254\u0301", + "P\u025bsa\u014b Nts\u0254\u030cpp\u00e1" + ], + "SHORTDAY": [ + "S\u0254\u0301ndi", + "M\u0254\u0301ndi", + "\u00c1pta M\u0254\u0301ndi", + "W\u025b\u0301n\u025bs\u025bd\u025b", + "T\u0254\u0301s\u025bd\u025b", + "F\u025bl\u00e2y\u025bd\u025b", + "S\u00e1sid\u025b" + ], + "SHORTMONTH": [ + "Ndu\u014bmbi Sa\u014b", + "P\u025bsa\u014b P\u025b\u0301p\u00e1", + "P\u025bsa\u014b P\u025b\u0301t\u00e1t", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301kwa", + "P\u025bsa\u014b Pataa", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301nt\u00fak\u00fa", + "P\u025bsa\u014b Saamb\u00e1", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301f\u0254m", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301pf\u00fa\ua78b\u00fa", + "P\u025bsa\u014b N\u025bg\u025b\u0301m", + "P\u025bsa\u014b Nts\u0254\u030cpm\u0254\u0301", + "P\u025bsa\u014b Nts\u0254\u030cpp\u00e1" + ], + "STANDALONEMONTH": [ + "Ndu\u014bmbi Sa\u014b", + "P\u025bsa\u014b P\u025b\u0301p\u00e1", + "P\u025bsa\u014b P\u025b\u0301t\u00e1t", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301kwa", + "P\u025bsa\u014b Pataa", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301nt\u00fak\u00fa", + "P\u025bsa\u014b Saamb\u00e1", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301f\u0254m", + "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301pf\u00fa\ua78b\u00fa", + "P\u025bsa\u014b N\u025bg\u025b\u0301m", + "P\u025bsa\u014b Nts\u0254\u030cpm\u0254\u0301", + "P\u025bsa\u014b Nts\u0254\u030cpp\u00e1" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, y MMMM dd", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "jgo", + "localeID": "jgo", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_jmc-tz.js b/1.6.6/i18n/angular-locale_jmc-tz.js new file mode 100644 index 000000000..9cb38f863 --- /dev/null +++ b/1.6.6/i18n/angular-locale_jmc-tz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "utuko", + "kyiukonyi" + ], + "DAY": [ + "Jumapilyi", + "Jumatatuu", + "Jumanne", + "Jumatanu", + "Alhamisi", + "Ijumaa", + "Jumamosi" + ], + "ERANAMES": [ + "Kabla ya Kristu", + "Baada ya Kristu" + ], + "ERAS": [ + "KK", + "BK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januari", + "Februari", + "Machi", + "Aprilyi", + "Mei", + "Junyi", + "Julyai", + "Agusti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "SHORTDAY": [ + "Jpi", + "Jtt", + "Jnn", + "Jtn", + "Alh", + "Iju", + "Jmo" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Jul", + "Ago", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Machi", + "Aprilyi", + "Mei", + "Junyi", + "Julyai", + "Agusti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "jmc-tz", + "localeID": "jmc_TZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_jmc.js b/1.6.6/i18n/angular-locale_jmc.js new file mode 100644 index 000000000..eb35f9b10 --- /dev/null +++ b/1.6.6/i18n/angular-locale_jmc.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "utuko", + "kyiukonyi" + ], + "DAY": [ + "Jumapilyi", + "Jumatatuu", + "Jumanne", + "Jumatanu", + "Alhamisi", + "Ijumaa", + "Jumamosi" + ], + "ERANAMES": [ + "Kabla ya Kristu", + "Baada ya Kristu" + ], + "ERAS": [ + "KK", + "BK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januari", + "Februari", + "Machi", + "Aprilyi", + "Mei", + "Junyi", + "Julyai", + "Agusti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "SHORTDAY": [ + "Jpi", + "Jtt", + "Jnn", + "Jtn", + "Alh", + "Iju", + "Jmo" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Jul", + "Ago", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Machi", + "Aprilyi", + "Mei", + "Junyi", + "Julyai", + "Agusti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "jmc", + "localeID": "jmc", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ka-ge.js b/1.6.6/i18n/angular-locale_ka-ge.js new file mode 100644 index 000000000..db989ad46 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ka-ge.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u10d9\u10d5\u10d8\u10e0\u10d0", + "\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8", + "\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8", + "\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8", + "\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8", + "\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10d8", + "\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8" + ], + "ERANAMES": [ + "\u10eb\u10d5\u10d4\u10da\u10d8 \u10ec\u10d4\u10da\u10d7\u10d0\u10e6\u10e0\u10d8\u10ea\u10ee\u10d5\u10d8\u10d7", + "\u10d0\u10ee\u10d0\u10da\u10d8 \u10ec\u10d4\u10da\u10d7\u10d0\u10e6\u10e0\u10d8\u10ea\u10ee\u10d5\u10d8\u10d7" + ], + "ERAS": [ + "\u10eb\u10d5. \u10ec.", + "\u10d0\u10ee. \u10ec." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u10d8\u10d0\u10dc\u10d5\u10d0\u10e0\u10d8", + "\u10d7\u10d4\u10d1\u10d4\u10e0\u10d5\u10d0\u10da\u10d8", + "\u10db\u10d0\u10e0\u10e2\u10d8", + "\u10d0\u10de\u10e0\u10d8\u10da\u10d8", + "\u10db\u10d0\u10d8\u10e1\u10d8", + "\u10d8\u10d5\u10dc\u10d8\u10e1\u10d8", + "\u10d8\u10d5\u10da\u10d8\u10e1\u10d8", + "\u10d0\u10d2\u10d5\u10d8\u10e1\u10e2\u10dd", + "\u10e1\u10d4\u10e5\u10e2\u10d4\u10db\u10d1\u10d4\u10e0\u10d8", + "\u10dd\u10e5\u10e2\u10dd\u10db\u10d1\u10d4\u10e0\u10d8", + "\u10dc\u10dd\u10d4\u10db\u10d1\u10d4\u10e0\u10d8", + "\u10d3\u10d4\u10d9\u10d4\u10db\u10d1\u10d4\u10e0\u10d8" + ], + "SHORTDAY": [ + "\u10d9\u10d5\u10d8", + "\u10dd\u10e0\u10e8", + "\u10e1\u10d0\u10db", + "\u10dd\u10d7\u10ee", + "\u10ee\u10e3\u10d7", + "\u10de\u10d0\u10e0", + "\u10e8\u10d0\u10d1" + ], + "SHORTMONTH": [ + "\u10d8\u10d0\u10dc", + "\u10d7\u10d4\u10d1", + "\u10db\u10d0\u10e0", + "\u10d0\u10de\u10e0", + "\u10db\u10d0\u10d8", + "\u10d8\u10d5\u10dc", + "\u10d8\u10d5\u10da", + "\u10d0\u10d2\u10d5", + "\u10e1\u10d4\u10e5", + "\u10dd\u10e5\u10e2", + "\u10dc\u10dd\u10d4", + "\u10d3\u10d4\u10d9" + ], + "STANDALONEMONTH": [ + "\u10d8\u10d0\u10dc\u10d5\u10d0\u10e0\u10d8", + "\u10d7\u10d4\u10d1\u10d4\u10e0\u10d5\u10d0\u10da\u10d8", + "\u10db\u10d0\u10e0\u10e2\u10d8", + "\u10d0\u10de\u10e0\u10d8\u10da\u10d8", + "\u10db\u10d0\u10d8\u10e1\u10d8", + "\u10d8\u10d5\u10dc\u10d8\u10e1\u10d8", + "\u10d8\u10d5\u10da\u10d8\u10e1\u10d8", + "\u10d0\u10d2\u10d5\u10d8\u10e1\u10e2\u10dd", + "\u10e1\u10d4\u10e5\u10e2\u10d4\u10db\u10d1\u10d4\u10e0\u10d8", + "\u10dd\u10e5\u10e2\u10dd\u10db\u10d1\u10d4\u10e0\u10d8", + "\u10dc\u10dd\u10d4\u10db\u10d1\u10d4\u10e0\u10d8", + "\u10d3\u10d4\u10d9\u10d4\u10db\u10d1\u10d4\u10e0\u10d8" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM. y HH:mm:ss", + "mediumDate": "d MMM. y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "GEL", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ka-ge", + "localeID": "ka_GE", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ka.js b/1.6.6/i18n/angular-locale_ka.js new file mode 100644 index 000000000..41cb4a435 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ka.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u10d9\u10d5\u10d8\u10e0\u10d0", + "\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8", + "\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8", + "\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8", + "\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8", + "\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10d8", + "\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8" + ], + "ERANAMES": [ + "\u10eb\u10d5\u10d4\u10da\u10d8 \u10ec\u10d4\u10da\u10d7\u10d0\u10e6\u10e0\u10d8\u10ea\u10ee\u10d5\u10d8\u10d7", + "\u10d0\u10ee\u10d0\u10da\u10d8 \u10ec\u10d4\u10da\u10d7\u10d0\u10e6\u10e0\u10d8\u10ea\u10ee\u10d5\u10d8\u10d7" + ], + "ERAS": [ + "\u10eb\u10d5. \u10ec.", + "\u10d0\u10ee. \u10ec." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u10d8\u10d0\u10dc\u10d5\u10d0\u10e0\u10d8", + "\u10d7\u10d4\u10d1\u10d4\u10e0\u10d5\u10d0\u10da\u10d8", + "\u10db\u10d0\u10e0\u10e2\u10d8", + "\u10d0\u10de\u10e0\u10d8\u10da\u10d8", + "\u10db\u10d0\u10d8\u10e1\u10d8", + "\u10d8\u10d5\u10dc\u10d8\u10e1\u10d8", + "\u10d8\u10d5\u10da\u10d8\u10e1\u10d8", + "\u10d0\u10d2\u10d5\u10d8\u10e1\u10e2\u10dd", + "\u10e1\u10d4\u10e5\u10e2\u10d4\u10db\u10d1\u10d4\u10e0\u10d8", + "\u10dd\u10e5\u10e2\u10dd\u10db\u10d1\u10d4\u10e0\u10d8", + "\u10dc\u10dd\u10d4\u10db\u10d1\u10d4\u10e0\u10d8", + "\u10d3\u10d4\u10d9\u10d4\u10db\u10d1\u10d4\u10e0\u10d8" + ], + "SHORTDAY": [ + "\u10d9\u10d5\u10d8", + "\u10dd\u10e0\u10e8", + "\u10e1\u10d0\u10db", + "\u10dd\u10d7\u10ee", + "\u10ee\u10e3\u10d7", + "\u10de\u10d0\u10e0", + "\u10e8\u10d0\u10d1" + ], + "SHORTMONTH": [ + "\u10d8\u10d0\u10dc", + "\u10d7\u10d4\u10d1", + "\u10db\u10d0\u10e0", + "\u10d0\u10de\u10e0", + "\u10db\u10d0\u10d8", + "\u10d8\u10d5\u10dc", + "\u10d8\u10d5\u10da", + "\u10d0\u10d2\u10d5", + "\u10e1\u10d4\u10e5", + "\u10dd\u10e5\u10e2", + "\u10dc\u10dd\u10d4", + "\u10d3\u10d4\u10d9" + ], + "STANDALONEMONTH": [ + "\u10d8\u10d0\u10dc\u10d5\u10d0\u10e0\u10d8", + "\u10d7\u10d4\u10d1\u10d4\u10e0\u10d5\u10d0\u10da\u10d8", + "\u10db\u10d0\u10e0\u10e2\u10d8", + "\u10d0\u10de\u10e0\u10d8\u10da\u10d8", + "\u10db\u10d0\u10d8\u10e1\u10d8", + "\u10d8\u10d5\u10dc\u10d8\u10e1\u10d8", + "\u10d8\u10d5\u10da\u10d8\u10e1\u10d8", + "\u10d0\u10d2\u10d5\u10d8\u10e1\u10e2\u10dd", + "\u10e1\u10d4\u10e5\u10e2\u10d4\u10db\u10d1\u10d4\u10e0\u10d8", + "\u10dd\u10e5\u10e2\u10dd\u10db\u10d1\u10d4\u10e0\u10d8", + "\u10dc\u10dd\u10d4\u10db\u10d1\u10d4\u10e0\u10d8", + "\u10d3\u10d4\u10d9\u10d4\u10db\u10d1\u10d4\u10e0\u10d8" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM. y HH:mm:ss", + "mediumDate": "d MMM. y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "GEL", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ka", + "localeID": "ka", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kab-dz.js b/1.6.6/i18n/angular-locale_kab-dz.js new file mode 100644 index 000000000..bb00bb3b0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_kab-dz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "n tufat", + "n tmeddit" + ], + "DAY": [ + "Yanass", + "Sanass", + "Kra\u1e0dass", + "Ku\u1e93ass", + "Samass", + "S\u1e0disass", + "Sayass" + ], + "ERANAMES": [ + "send talalit n \u0190isa", + "seld talalit n \u0190isa" + ], + "ERAS": [ + "snd. T.\u0190", + "sld. T.\u0190" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "Yennayer", + "Fu\u1e5bar", + "Me\u0263res", + "Yebrir", + "Mayyu", + "Yunyu", + "Yulyu", + "\u0194uct", + "Ctembe\u1e5b", + "Tube\u1e5b", + "Nunembe\u1e5b", + "Du\u01e7embe\u1e5b" + ], + "SHORTDAY": [ + "Yan", + "San", + "Kra\u1e0d", + "Ku\u1e93", + "Sam", + "S\u1e0dis", + "Say" + ], + "SHORTMONTH": [ + "Yen", + "Fur", + "Me\u0263", + "Yeb", + "May", + "Yun", + "Yul", + "\u0194uc", + "Cte", + "Tub", + "Nun", + "Du\u01e7" + ], + "STANDALONEMONTH": [ + "Yennayer", + "Fu\u1e5bar", + "Me\u0263res", + "Yebrir", + "Mayyu", + "Yunyu", + "Yulyu", + "\u0194uct", + "Ctembe\u1e5b", + "Tube\u1e5b", + "Nunembe\u1e5b", + "Du\u01e7embe\u1e5b" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y h:mm:ss a", + "mediumDate": "d MMM, y", + "mediumTime": "h:mm:ss a", + "short": "d/M/y h:mm a", + "shortDate": "d/M/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "kab-dz", + "localeID": "kab_DZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kab.js b/1.6.6/i18n/angular-locale_kab.js new file mode 100644 index 000000000..00dbb5c36 --- /dev/null +++ b/1.6.6/i18n/angular-locale_kab.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "n tufat", + "n tmeddit" + ], + "DAY": [ + "Yanass", + "Sanass", + "Kra\u1e0dass", + "Ku\u1e93ass", + "Samass", + "S\u1e0disass", + "Sayass" + ], + "ERANAMES": [ + "send talalit n \u0190isa", + "seld talalit n \u0190isa" + ], + "ERAS": [ + "snd. T.\u0190", + "sld. T.\u0190" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "Yennayer", + "Fu\u1e5bar", + "Me\u0263res", + "Yebrir", + "Mayyu", + "Yunyu", + "Yulyu", + "\u0194uct", + "Ctembe\u1e5b", + "Tube\u1e5b", + "Nunembe\u1e5b", + "Du\u01e7embe\u1e5b" + ], + "SHORTDAY": [ + "Yan", + "San", + "Kra\u1e0d", + "Ku\u1e93", + "Sam", + "S\u1e0dis", + "Say" + ], + "SHORTMONTH": [ + "Yen", + "Fur", + "Me\u0263", + "Yeb", + "May", + "Yun", + "Yul", + "\u0194uc", + "Cte", + "Tub", + "Nun", + "Du\u01e7" + ], + "STANDALONEMONTH": [ + "Yennayer", + "Fu\u1e5bar", + "Me\u0263res", + "Yebrir", + "Mayyu", + "Yunyu", + "Yulyu", + "\u0194uct", + "Ctembe\u1e5b", + "Tube\u1e5b", + "Nunembe\u1e5b", + "Du\u01e7embe\u1e5b" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y h:mm:ss a", + "mediumDate": "d MMM, y", + "mediumTime": "h:mm:ss a", + "short": "d/M/y h:mm a", + "shortDate": "d/M/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "kab", + "localeID": "kab", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kam-ke.js b/1.6.6/i18n/angular-locale_kam-ke.js new file mode 100644 index 000000000..cb34eac35 --- /dev/null +++ b/1.6.6/i18n/angular-locale_kam-ke.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0128yakwakya", + "\u0128yaw\u0129oo" + ], + "DAY": [ + "Wa kyumwa", + "Wa kwamb\u0129l\u0129lya", + "Wa kel\u0129", + "Wa katat\u0169", + "Wa kana", + "Wa katano", + "Wa thanthat\u0169" + ], + "ERANAMES": [ + "Mbee wa Yes\u0169", + "\u0128tina wa Yes\u0169" + ], + "ERAS": [ + "MY", + "IY" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Mwai wa mbee", + "Mwai wa kel\u0129", + "Mwai wa katat\u0169", + "Mwai wa kana", + "Mwai wa katano", + "Mwai wa thanthat\u0169", + "Mwai wa muonza", + "Mwai wa nyaanya", + "Mwai wa kenda", + "Mwai wa \u0129kumi", + "Mwai wa \u0129kumi na \u0129mwe", + "Mwai wa \u0129kumi na il\u0129" + ], + "SHORTDAY": [ + "Wky", + "Wkw", + "Wkl", + "Wt\u0169", + "Wkn", + "Wtn", + "Wth" + ], + "SHORTMONTH": [ + "Mbe", + "Kel", + "Kt\u0169", + "Kan", + "Ktn", + "Tha", + "Moo", + "Nya", + "Knd", + "\u0128ku", + "\u0128km", + "\u0128kl" + ], + "STANDALONEMONTH": [ + "Mwai wa mbee", + "Mwai wa kel\u0129", + "Mwai wa katat\u0169", + "Mwai wa kana", + "Mwai wa katano", + "Mwai wa thanthat\u0169", + "Mwai wa muonza", + "Mwai wa nyaanya", + "Mwai wa kenda", + "Mwai wa \u0129kumi", + "Mwai wa \u0129kumi na \u0129mwe", + "Mwai wa \u0129kumi na il\u0129" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "kam-ke", + "localeID": "kam_KE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kam.js b/1.6.6/i18n/angular-locale_kam.js new file mode 100644 index 000000000..f6db3268c --- /dev/null +++ b/1.6.6/i18n/angular-locale_kam.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0128yakwakya", + "\u0128yaw\u0129oo" + ], + "DAY": [ + "Wa kyumwa", + "Wa kwamb\u0129l\u0129lya", + "Wa kel\u0129", + "Wa katat\u0169", + "Wa kana", + "Wa katano", + "Wa thanthat\u0169" + ], + "ERANAMES": [ + "Mbee wa Yes\u0169", + "\u0128tina wa Yes\u0169" + ], + "ERAS": [ + "MY", + "IY" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Mwai wa mbee", + "Mwai wa kel\u0129", + "Mwai wa katat\u0169", + "Mwai wa kana", + "Mwai wa katano", + "Mwai wa thanthat\u0169", + "Mwai wa muonza", + "Mwai wa nyaanya", + "Mwai wa kenda", + "Mwai wa \u0129kumi", + "Mwai wa \u0129kumi na \u0129mwe", + "Mwai wa \u0129kumi na il\u0129" + ], + "SHORTDAY": [ + "Wky", + "Wkw", + "Wkl", + "Wt\u0169", + "Wkn", + "Wtn", + "Wth" + ], + "SHORTMONTH": [ + "Mbe", + "Kel", + "Kt\u0169", + "Kan", + "Ktn", + "Tha", + "Moo", + "Nya", + "Knd", + "\u0128ku", + "\u0128km", + "\u0128kl" + ], + "STANDALONEMONTH": [ + "Mwai wa mbee", + "Mwai wa kel\u0129", + "Mwai wa katat\u0169", + "Mwai wa kana", + "Mwai wa katano", + "Mwai wa thanthat\u0169", + "Mwai wa muonza", + "Mwai wa nyaanya", + "Mwai wa kenda", + "Mwai wa \u0129kumi", + "Mwai wa \u0129kumi na \u0129mwe", + "Mwai wa \u0129kumi na il\u0129" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "kam", + "localeID": "kam", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kde-tz.js b/1.6.6/i18n/angular-locale_kde-tz.js new file mode 100644 index 000000000..9d95a23bb --- /dev/null +++ b/1.6.6/i18n/angular-locale_kde-tz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Muhi", + "Chilo" + ], + "DAY": [ + "Liduva lyapili", + "Liduva lyatatu", + "Liduva lyanchechi", + "Liduva lyannyano", + "Liduva lyannyano na linji", + "Liduva lyannyano na mavili", + "Liduva litandi" + ], + "ERANAMES": [ + "Akanapawa Yesu", + "Nankuida Yesu" + ], + "ERAS": [ + "AY", + "NY" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Mwedi Ntandi", + "Mwedi wa Pili", + "Mwedi wa Tatu", + "Mwedi wa Nchechi", + "Mwedi wa Nnyano", + "Mwedi wa Nnyano na Umo", + "Mwedi wa Nnyano na Mivili", + "Mwedi wa Nnyano na Mitatu", + "Mwedi wa Nnyano na Nchechi", + "Mwedi wa Nnyano na Nnyano", + "Mwedi wa Nnyano na Nnyano na U", + "Mwedi wa Nnyano na Nnyano na M" + ], + "SHORTDAY": [ + "Ll2", + "Ll3", + "Ll4", + "Ll5", + "Ll6", + "Ll7", + "Ll1" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Jul", + "Ago", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Mwedi Ntandi", + "Mwedi wa Pili", + "Mwedi wa Tatu", + "Mwedi wa Nchechi", + "Mwedi wa Nnyano", + "Mwedi wa Nnyano na Umo", + "Mwedi wa Nnyano na Mivili", + "Mwedi wa Nnyano na Mitatu", + "Mwedi wa Nnyano na Nchechi", + "Mwedi wa Nnyano na Nnyano", + "Mwedi wa Nnyano na Nnyano na U", + "Mwedi wa Nnyano na Nnyano na M" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "kde-tz", + "localeID": "kde_TZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kde.js b/1.6.6/i18n/angular-locale_kde.js new file mode 100644 index 000000000..322c48dfd --- /dev/null +++ b/1.6.6/i18n/angular-locale_kde.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Muhi", + "Chilo" + ], + "DAY": [ + "Liduva lyapili", + "Liduva lyatatu", + "Liduva lyanchechi", + "Liduva lyannyano", + "Liduva lyannyano na linji", + "Liduva lyannyano na mavili", + "Liduva litandi" + ], + "ERANAMES": [ + "Akanapawa Yesu", + "Nankuida Yesu" + ], + "ERAS": [ + "AY", + "NY" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Mwedi Ntandi", + "Mwedi wa Pili", + "Mwedi wa Tatu", + "Mwedi wa Nchechi", + "Mwedi wa Nnyano", + "Mwedi wa Nnyano na Umo", + "Mwedi wa Nnyano na Mivili", + "Mwedi wa Nnyano na Mitatu", + "Mwedi wa Nnyano na Nchechi", + "Mwedi wa Nnyano na Nnyano", + "Mwedi wa Nnyano na Nnyano na U", + "Mwedi wa Nnyano na Nnyano na M" + ], + "SHORTDAY": [ + "Ll2", + "Ll3", + "Ll4", + "Ll5", + "Ll6", + "Ll7", + "Ll1" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Jul", + "Ago", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Mwedi Ntandi", + "Mwedi wa Pili", + "Mwedi wa Tatu", + "Mwedi wa Nchechi", + "Mwedi wa Nnyano", + "Mwedi wa Nnyano na Umo", + "Mwedi wa Nnyano na Mivili", + "Mwedi wa Nnyano na Mitatu", + "Mwedi wa Nnyano na Nchechi", + "Mwedi wa Nnyano na Nnyano", + "Mwedi wa Nnyano na Nnyano na U", + "Mwedi wa Nnyano na Nnyano na M" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "kde", + "localeID": "kde", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kea-cv.js b/1.6.6/i18n/angular-locale_kea-cv.js new file mode 100644 index 000000000..e396a6979 --- /dev/null +++ b/1.6.6/i18n/angular-locale_kea-cv.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "am", + "pm" + ], + "DAY": [ + "dumingu", + "sigunda-fera", + "tersa-fera", + "kuarta-fera", + "kinta-fera", + "sesta-fera", + "sabadu" + ], + "ERANAMES": [ + "Antis di Kristu", + "Dispos di Kristu" + ], + "ERAS": [ + "AK", + "DK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Janeru", + "Febreru", + "Marsu", + "Abril", + "Maiu", + "Junhu", + "Julhu", + "Agostu", + "Setenbru", + "Otubru", + "Nuvenbru", + "Dizenbru" + ], + "SHORTDAY": [ + "dum", + "sig", + "ter", + "kua", + "kin", + "ses", + "sab" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Abr", + "Mai", + "Jun", + "Jul", + "Ago", + "Set", + "Otu", + "Nuv", + "Diz" + ], + "STANDALONEMONTH": [ + "Janeru", + "Febreru", + "Marsu", + "Abril", + "Maiu", + "Junhu", + "Julhu", + "Agostu", + "Setenbru", + "Otubru", + "Nuvenbru", + "Dizenbru" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'di' MMMM 'di' y", + "longDate": "d 'di' MMMM 'di' y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CVE", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "kea-cv", + "localeID": "kea_CV", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kea.js b/1.6.6/i18n/angular-locale_kea.js new file mode 100644 index 000000000..7bd3cab36 --- /dev/null +++ b/1.6.6/i18n/angular-locale_kea.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "am", + "pm" + ], + "DAY": [ + "dumingu", + "sigunda-fera", + "tersa-fera", + "kuarta-fera", + "kinta-fera", + "sesta-fera", + "sabadu" + ], + "ERANAMES": [ + "Antis di Kristu", + "Dispos di Kristu" + ], + "ERAS": [ + "AK", + "DK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Janeru", + "Febreru", + "Marsu", + "Abril", + "Maiu", + "Junhu", + "Julhu", + "Agostu", + "Setenbru", + "Otubru", + "Nuvenbru", + "Dizenbru" + ], + "SHORTDAY": [ + "dum", + "sig", + "ter", + "kua", + "kin", + "ses", + "sab" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Abr", + "Mai", + "Jun", + "Jul", + "Ago", + "Set", + "Otu", + "Nuv", + "Diz" + ], + "STANDALONEMONTH": [ + "Janeru", + "Febreru", + "Marsu", + "Abril", + "Maiu", + "Junhu", + "Julhu", + "Agostu", + "Setenbru", + "Otubru", + "Nuvenbru", + "Dizenbru" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'di' MMMM 'di' y", + "longDate": "d 'di' MMMM 'di' y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CVE", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "kea", + "localeID": "kea", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_khq-ml.js b/1.6.6/i18n/angular-locale_khq-ml.js new file mode 100644 index 000000000..e26e8db85 --- /dev/null +++ b/1.6.6/i18n/angular-locale_khq-ml.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Adduha", + "Aluula" + ], + "DAY": [ + "Alhadi", + "Atini", + "Atalata", + "Alarba", + "Alhamiisa", + "Aljuma", + "Assabdu" + ], + "ERANAMES": [ + "Isaa jine", + "Isaa jamanoo" + ], + "ERAS": [ + "IJ", + "IZ" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u017danwiye", + "Feewiriye", + "Marsi", + "Awiril", + "Me", + "\u017duwe\u014b", + "\u017duyye", + "Ut", + "Sektanbur", + "Oktoobur", + "Noowanbur", + "Deesanbur" + ], + "SHORTDAY": [ + "Alh", + "Ati", + "Ata", + "Ala", + "Alm", + "Alj", + "Ass" + ], + "SHORTMONTH": [ + "\u017dan", + "Fee", + "Mar", + "Awi", + "Me", + "\u017duw", + "\u017duy", + "Ut", + "Sek", + "Okt", + "Noo", + "Dee" + ], + "STANDALONEMONTH": [ + "\u017danwiye", + "Feewiriye", + "Marsi", + "Awiril", + "Me", + "\u017duwe\u014b", + "\u017duyye", + "Ut", + "Sektanbur", + "Oktoobur", + "Noowanbur", + "Deesanbur" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ".", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "khq-ml", + "localeID": "khq_ML", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_khq.js b/1.6.6/i18n/angular-locale_khq.js new file mode 100644 index 000000000..8035933cf --- /dev/null +++ b/1.6.6/i18n/angular-locale_khq.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Adduha", + "Aluula" + ], + "DAY": [ + "Alhadi", + "Atini", + "Atalata", + "Alarba", + "Alhamiisa", + "Aljuma", + "Assabdu" + ], + "ERANAMES": [ + "Isaa jine", + "Isaa jamanoo" + ], + "ERAS": [ + "IJ", + "IZ" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u017danwiye", + "Feewiriye", + "Marsi", + "Awiril", + "Me", + "\u017duwe\u014b", + "\u017duyye", + "Ut", + "Sektanbur", + "Oktoobur", + "Noowanbur", + "Deesanbur" + ], + "SHORTDAY": [ + "Alh", + "Ati", + "Ata", + "Ala", + "Alm", + "Alj", + "Ass" + ], + "SHORTMONTH": [ + "\u017dan", + "Fee", + "Mar", + "Awi", + "Me", + "\u017duw", + "\u017duy", + "Ut", + "Sek", + "Okt", + "Noo", + "Dee" + ], + "STANDALONEMONTH": [ + "\u017danwiye", + "Feewiriye", + "Marsi", + "Awiril", + "Me", + "\u017duwe\u014b", + "\u017duyye", + "Ut", + "Sektanbur", + "Oktoobur", + "Noowanbur", + "Deesanbur" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ".", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "khq", + "localeID": "khq", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ki-ke.js b/1.6.6/i18n/angular-locale_ki-ke.js new file mode 100644 index 000000000..ffae9b898 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ki-ke.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Kiroko", + "Hwa\u0129-in\u0129" + ], + "DAY": [ + "Kiumia", + "Njumatat\u0169", + "Njumaine", + "Njumatana", + "Aramithi", + "Njumaa", + "Njumamothi" + ], + "ERANAMES": [ + "Mbere ya Kristo", + "Thutha wa Kristo" + ], + "ERAS": [ + "MK", + "TK" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Njenuar\u0129", + "Mwere wa ker\u0129", + "Mwere wa gatat\u0169", + "Mwere wa kana", + "Mwere wa gatano", + "Mwere wa gatandat\u0169", + "Mwere wa m\u0169gwanja", + "Mwere wa kanana", + "Mwere wa kenda", + "Mwere wa ik\u0169mi", + "Mwere wa ik\u0169mi na \u0169mwe", + "Ndithemba" + ], + "SHORTDAY": [ + "KMA", + "NTT", + "NMN", + "NMT", + "ART", + "NMA", + "NMM" + ], + "SHORTMONTH": [ + "JEN", + "WKR", + "WGT", + "WKN", + "WTN", + "WTD", + "WMJ", + "WNN", + "WKD", + "WIK", + "WMW", + "DIT" + ], + "STANDALONEMONTH": [ + "Njenuar\u0129", + "Mwere wa ker\u0129", + "Mwere wa gatat\u0169", + "Mwere wa kana", + "Mwere wa gatano", + "Mwere wa gatandat\u0169", + "Mwere wa m\u0169gwanja", + "Mwere wa kanana", + "Mwere wa kenda", + "Mwere wa ik\u0169mi", + "Mwere wa ik\u0169mi na \u0169mwe", + "Ndithemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ki-ke", + "localeID": "ki_KE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ki.js b/1.6.6/i18n/angular-locale_ki.js new file mode 100644 index 000000000..aa511cc94 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ki.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Kiroko", + "Hwa\u0129-in\u0129" + ], + "DAY": [ + "Kiumia", + "Njumatat\u0169", + "Njumaine", + "Njumatana", + "Aramithi", + "Njumaa", + "Njumamothi" + ], + "ERANAMES": [ + "Mbere ya Kristo", + "Thutha wa Kristo" + ], + "ERAS": [ + "MK", + "TK" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Njenuar\u0129", + "Mwere wa ker\u0129", + "Mwere wa gatat\u0169", + "Mwere wa kana", + "Mwere wa gatano", + "Mwere wa gatandat\u0169", + "Mwere wa m\u0169gwanja", + "Mwere wa kanana", + "Mwere wa kenda", + "Mwere wa ik\u0169mi", + "Mwere wa ik\u0169mi na \u0169mwe", + "Ndithemba" + ], + "SHORTDAY": [ + "KMA", + "NTT", + "NMN", + "NMT", + "ART", + "NMA", + "NMM" + ], + "SHORTMONTH": [ + "JEN", + "WKR", + "WGT", + "WKN", + "WTN", + "WTD", + "WMJ", + "WNN", + "WKD", + "WIK", + "WMW", + "DIT" + ], + "STANDALONEMONTH": [ + "Njenuar\u0129", + "Mwere wa ker\u0129", + "Mwere wa gatat\u0169", + "Mwere wa kana", + "Mwere wa gatano", + "Mwere wa gatandat\u0169", + "Mwere wa m\u0169gwanja", + "Mwere wa kanana", + "Mwere wa kenda", + "Mwere wa ik\u0169mi", + "Mwere wa ik\u0169mi na \u0169mwe", + "Ndithemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ki", + "localeID": "ki", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kk-kz.js b/1.6.6/i18n/angular-locale_kk-kz.js new file mode 100644 index 000000000..6c6db105e --- /dev/null +++ b/1.6.6/i18n/angular-locale_kk-kz.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u0436\u0435\u043a\u0441\u0435\u043d\u0431\u0456", + "\u0434\u04af\u0439\u0441\u0435\u043d\u0431\u0456", + "\u0441\u0435\u0439\u0441\u0435\u043d\u0431\u0456", + "\u0441\u04d9\u0440\u0441\u0435\u043d\u0431\u0456", + "\u0431\u0435\u0439\u0441\u0435\u043d\u0431\u0456", + "\u0436\u04b1\u043c\u0430", + "\u0441\u0435\u043d\u0431\u0456" + ], + "ERANAMES": [ + "\u0411\u0456\u0437\u0434\u0456\u04a3 \u0437\u0430\u043c\u0430\u043d\u044b\u043c\u044b\u0437\u0493\u0430 \u0434\u0435\u0439\u0456\u043d", + "\u0411\u0456\u0437\u0434\u0456\u04a3 \u0437\u0430\u043c\u0430\u043d\u044b\u043c\u044b\u0437" + ], + "ERAS": [ + "\u0431.\u0437.\u0434.", + "\u0431.\u0437." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u049b\u0430\u04a3\u0442\u0430\u0440", + "\u0430\u049b\u043f\u0430\u043d", + "\u043d\u0430\u0443\u0440\u044b\u0437", + "\u0441\u04d9\u0443\u0456\u0440", + "\u043c\u0430\u043c\u044b\u0440", + "\u043c\u0430\u0443\u0441\u044b\u043c", + "\u0448\u0456\u043b\u0434\u0435", + "\u0442\u0430\u043c\u044b\u0437", + "\u049b\u044b\u0440\u043a\u04af\u0439\u0435\u043a", + "\u049b\u0430\u0437\u0430\u043d", + "\u049b\u0430\u0440\u0430\u0448\u0430", + "\u0436\u0435\u043b\u0442\u043e\u049b\u0441\u0430\u043d" + ], + "SHORTDAY": [ + "\u0416\u0441", + "\u0414\u0441", + "\u0421\u0441", + "\u0421\u0440", + "\u0411\u0441", + "\u0416\u043c", + "\u0421\u0431" + ], + "SHORTMONTH": [ + "\u049b\u0430\u04a3.", + "\u0430\u049b\u043f.", + "\u043d\u0430\u0443.", + "\u0441\u04d9\u0443.", + "\u043c\u0430\u043c.", + "\u043c\u0430\u0443.", + "\u0448\u0456\u043b.", + "\u0442\u0430\u043c.", + "\u049b\u044b\u0440.", + "\u049b\u0430\u0437.", + "\u049b\u0430\u0440.", + "\u0436\u0435\u043b." + ], + "STANDALONEMONTH": [ + "\u049a\u0430\u04a3\u0442\u0430\u0440", + "\u0410\u049b\u043f\u0430\u043d", + "\u041d\u0430\u0443\u0440\u044b\u0437", + "\u0421\u04d9\u0443\u0456\u0440", + "\u041c\u0430\u043c\u044b\u0440", + "\u041c\u0430\u0443\u0441\u044b\u043c", + "\u0428\u0456\u043b\u0434\u0435", + "\u0422\u0430\u043c\u044b\u0437", + "\u049a\u044b\u0440\u043a\u04af\u0439\u0435\u043a", + "\u049a\u0430\u0437\u0430\u043d", + "\u049a\u0430\u0440\u0430\u0448\u0430", + "\u0416\u0435\u043b\u0442\u043e\u049b\u0441\u0430\u043d" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y '\u0436'. d MMMM, EEEE", + "longDate": "y '\u0436'. d MMMM", + "medium": "y '\u0436'. dd MMM HH:mm:ss", + "mediumDate": "y '\u0436'. dd MMM", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b8", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "kk-kz", + "localeID": "kk_KZ", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kk.js b/1.6.6/i18n/angular-locale_kk.js new file mode 100644 index 000000000..7babcd0b0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_kk.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u0436\u0435\u043a\u0441\u0435\u043d\u0431\u0456", + "\u0434\u04af\u0439\u0441\u0435\u043d\u0431\u0456", + "\u0441\u0435\u0439\u0441\u0435\u043d\u0431\u0456", + "\u0441\u04d9\u0440\u0441\u0435\u043d\u0431\u0456", + "\u0431\u0435\u0439\u0441\u0435\u043d\u0431\u0456", + "\u0436\u04b1\u043c\u0430", + "\u0441\u0435\u043d\u0431\u0456" + ], + "ERANAMES": [ + "\u0411\u0456\u0437\u0434\u0456\u04a3 \u0437\u0430\u043c\u0430\u043d\u044b\u043c\u044b\u0437\u0493\u0430 \u0434\u0435\u0439\u0456\u043d", + "\u0411\u0456\u0437\u0434\u0456\u04a3 \u0437\u0430\u043c\u0430\u043d\u044b\u043c\u044b\u0437" + ], + "ERAS": [ + "\u0431.\u0437.\u0434.", + "\u0431.\u0437." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u049b\u0430\u04a3\u0442\u0430\u0440", + "\u0430\u049b\u043f\u0430\u043d", + "\u043d\u0430\u0443\u0440\u044b\u0437", + "\u0441\u04d9\u0443\u0456\u0440", + "\u043c\u0430\u043c\u044b\u0440", + "\u043c\u0430\u0443\u0441\u044b\u043c", + "\u0448\u0456\u043b\u0434\u0435", + "\u0442\u0430\u043c\u044b\u0437", + "\u049b\u044b\u0440\u043a\u04af\u0439\u0435\u043a", + "\u049b\u0430\u0437\u0430\u043d", + "\u049b\u0430\u0440\u0430\u0448\u0430", + "\u0436\u0435\u043b\u0442\u043e\u049b\u0441\u0430\u043d" + ], + "SHORTDAY": [ + "\u0416\u0441", + "\u0414\u0441", + "\u0421\u0441", + "\u0421\u0440", + "\u0411\u0441", + "\u0416\u043c", + "\u0421\u0431" + ], + "SHORTMONTH": [ + "\u049b\u0430\u04a3.", + "\u0430\u049b\u043f.", + "\u043d\u0430\u0443.", + "\u0441\u04d9\u0443.", + "\u043c\u0430\u043c.", + "\u043c\u0430\u0443.", + "\u0448\u0456\u043b.", + "\u0442\u0430\u043c.", + "\u049b\u044b\u0440.", + "\u049b\u0430\u0437.", + "\u049b\u0430\u0440.", + "\u0436\u0435\u043b." + ], + "STANDALONEMONTH": [ + "\u049a\u0430\u04a3\u0442\u0430\u0440", + "\u0410\u049b\u043f\u0430\u043d", + "\u041d\u0430\u0443\u0440\u044b\u0437", + "\u0421\u04d9\u0443\u0456\u0440", + "\u041c\u0430\u043c\u044b\u0440", + "\u041c\u0430\u0443\u0441\u044b\u043c", + "\u0428\u0456\u043b\u0434\u0435", + "\u0422\u0430\u043c\u044b\u0437", + "\u049a\u044b\u0440\u043a\u04af\u0439\u0435\u043a", + "\u049a\u0430\u0437\u0430\u043d", + "\u049a\u0430\u0440\u0430\u0448\u0430", + "\u0416\u0435\u043b\u0442\u043e\u049b\u0441\u0430\u043d" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y '\u0436'. d MMMM, EEEE", + "longDate": "y '\u0436'. d MMMM", + "medium": "y '\u0436'. dd MMM HH:mm:ss", + "mediumDate": "y '\u0436'. dd MMM", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b8", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "kk", + "localeID": "kk", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kkj-cm.js b/1.6.6/i18n/angular-locale_kkj-cm.js new file mode 100644 index 000000000..99559e507 --- /dev/null +++ b/1.6.6/i18n/angular-locale_kkj-cm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "s\u0254ndi", + "lundi", + "mardi", + "m\u025brk\u025br\u025bdi", + "yedi", + "va\u014bd\u025br\u025bdi", + "m\u0254n\u0254 s\u0254ndi" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "pamba", + "wanja", + "mbiy\u0254 m\u025bndo\u014bg\u0254", + "Ny\u0254l\u0254mb\u0254\u014bg\u0254", + "M\u0254n\u0254 \u014bgbanja", + "Nya\u014bgw\u025b \u014bgbanja", + "ku\u014bgw\u025b", + "f\u025b", + "njapi", + "nyukul", + "11", + "\u0253ul\u0253us\u025b" + ], + "SHORTDAY": [ + "s\u0254ndi", + "lundi", + "mardi", + "m\u025brk\u025br\u025bdi", + "yedi", + "va\u014bd\u025br\u025bdi", + "m\u0254n\u0254 s\u0254ndi" + ], + "SHORTMONTH": [ + "pamba", + "wanja", + "mbiy\u0254 m\u025bndo\u014bg\u0254", + "Ny\u0254l\u0254mb\u0254\u014bg\u0254", + "M\u0254n\u0254 \u014bgbanja", + "Nya\u014bgw\u025b \u014bgbanja", + "ku\u014bgw\u025b", + "f\u025b", + "njapi", + "nyukul", + "11", + "\u0253ul\u0253us\u025b" + ], + "STANDALONEMONTH": [ + "pamba", + "wanja", + "mbiy\u0254 m\u025bndo\u014bg\u0254", + "Ny\u0254l\u0254mb\u0254\u014bg\u0254", + "M\u0254n\u0254 \u014bgbanja", + "Nya\u014bgw\u025b \u014bgbanja", + "ku\u014bgw\u025b", + "f\u025b", + "njapi", + "nyukul", + "11", + "\u0253ul\u0253us\u025b" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE dd MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM y HH:mm", + "shortDate": "dd/MM y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "kkj-cm", + "localeID": "kkj_CM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kkj.js b/1.6.6/i18n/angular-locale_kkj.js new file mode 100644 index 000000000..247c7aaf3 --- /dev/null +++ b/1.6.6/i18n/angular-locale_kkj.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "s\u0254ndi", + "lundi", + "mardi", + "m\u025brk\u025br\u025bdi", + "yedi", + "va\u014bd\u025br\u025bdi", + "m\u0254n\u0254 s\u0254ndi" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "pamba", + "wanja", + "mbiy\u0254 m\u025bndo\u014bg\u0254", + "Ny\u0254l\u0254mb\u0254\u014bg\u0254", + "M\u0254n\u0254 \u014bgbanja", + "Nya\u014bgw\u025b \u014bgbanja", + "ku\u014bgw\u025b", + "f\u025b", + "njapi", + "nyukul", + "11", + "\u0253ul\u0253us\u025b" + ], + "SHORTDAY": [ + "s\u0254ndi", + "lundi", + "mardi", + "m\u025brk\u025br\u025bdi", + "yedi", + "va\u014bd\u025br\u025bdi", + "m\u0254n\u0254 s\u0254ndi" + ], + "SHORTMONTH": [ + "pamba", + "wanja", + "mbiy\u0254 m\u025bndo\u014bg\u0254", + "Ny\u0254l\u0254mb\u0254\u014bg\u0254", + "M\u0254n\u0254 \u014bgbanja", + "Nya\u014bgw\u025b \u014bgbanja", + "ku\u014bgw\u025b", + "f\u025b", + "njapi", + "nyukul", + "11", + "\u0253ul\u0253us\u025b" + ], + "STANDALONEMONTH": [ + "pamba", + "wanja", + "mbiy\u0254 m\u025bndo\u014bg\u0254", + "Ny\u0254l\u0254mb\u0254\u014bg\u0254", + "M\u0254n\u0254 \u014bgbanja", + "Nya\u014bgw\u025b \u014bgbanja", + "ku\u014bgw\u025b", + "f\u025b", + "njapi", + "nyukul", + "11", + "\u0253ul\u0253us\u025b" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE dd MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM y HH:mm", + "shortDate": "dd/MM y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "kkj", + "localeID": "kkj", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kl-gl.js b/1.6.6/i18n/angular-locale_kl-gl.js new file mode 100644 index 000000000..92d9770a2 --- /dev/null +++ b/1.6.6/i18n/angular-locale_kl-gl.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "sabaat", + "ataasinngorneq", + "marlunngorneq", + "pingasunngorneq", + "sisamanngorneq", + "tallimanngorneq", + "arfininngorneq" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januari", + "februari", + "martsi", + "aprili", + "maji", + "juni", + "juli", + "augustusi", + "septemberi", + "oktoberi", + "novemberi", + "decemberi" + ], + "SHORTDAY": [ + "sab", + "ata", + "mar", + "pin", + "sis", + "tal", + "arf" + ], + "SHORTMONTH": [ + "jan", + "feb", + "mar", + "apr", + "maj", + "jun", + "jul", + "aug", + "sep", + "okt", + "nov", + "dec" + ], + "STANDALONEMONTH": [ + "januari", + "februari", + "martsi", + "aprili", + "maji", + "juni", + "juli", + "augustusi", + "septemberi", + "oktoberi", + "novemberi", + "decemberi" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr.", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u00a4-", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "kl-gl", + "localeID": "kl_GL", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kl.js b/1.6.6/i18n/angular-locale_kl.js new file mode 100644 index 000000000..f2d9d9e21 --- /dev/null +++ b/1.6.6/i18n/angular-locale_kl.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "sabaat", + "ataasinngorneq", + "marlunngorneq", + "pingasunngorneq", + "sisamanngorneq", + "tallimanngorneq", + "arfininngorneq" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januari", + "februari", + "martsi", + "aprili", + "maji", + "juni", + "juli", + "augustusi", + "septemberi", + "oktoberi", + "novemberi", + "decemberi" + ], + "SHORTDAY": [ + "sab", + "ata", + "mar", + "pin", + "sis", + "tal", + "arf" + ], + "SHORTMONTH": [ + "jan", + "feb", + "mar", + "apr", + "maj", + "jun", + "jul", + "aug", + "sep", + "okt", + "nov", + "dec" + ], + "STANDALONEMONTH": [ + "januari", + "februari", + "martsi", + "aprili", + "maji", + "juni", + "juli", + "augustusi", + "septemberi", + "oktoberi", + "novemberi", + "decemberi" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr.", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u00a4-", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "kl", + "localeID": "kl", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kln-ke.js b/1.6.6/i18n/angular-locale_kln-ke.js new file mode 100644 index 000000000..25e2e7a0b --- /dev/null +++ b/1.6.6/i18n/angular-locale_kln-ke.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "karoon", + "kooskoliny" + ], + "DAY": [ + "Kotisap", + "Kotaai", + "Koaeng\u2019", + "Kosomok", + "Koang\u2019wan", + "Komuut", + "Kolo" + ], + "ERANAMES": [ + "Amait kesich Jesu", + "Kokakesich Jesu" + ], + "ERAS": [ + "AM", + "KO" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Mulgul", + "Ng\u2019atyaato", + "Kiptaamo", + "Iwootkuut", + "Mamuut", + "Paagi", + "Ng\u2019eiyeet", + "Rooptui", + "Bureet", + "Epeeso", + "Kipsuunde ne taai", + "Kipsuunde nebo aeng\u2019" + ], + "SHORTDAY": [ + "Kts", + "Kot", + "Koo", + "Kos", + "Koa", + "Kom", + "Kol" + ], + "SHORTMONTH": [ + "Mul", + "Ngat", + "Taa", + "Iwo", + "Mam", + "Paa", + "Nge", + "Roo", + "Bur", + "Epe", + "Kpt", + "Kpa" + ], + "STANDALONEMONTH": [ + "Mulgul", + "Ng\u2019atyaato", + "Kiptaamo", + "Iwootkuut", + "Mamuut", + "Paagi", + "Ng\u2019eiyeet", + "Rooptui", + "Bureet", + "Epeeso", + "Kipsuunde ne taai", + "Kipsuunde nebo aeng\u2019" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "kln-ke", + "localeID": "kln_KE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kln.js b/1.6.6/i18n/angular-locale_kln.js new file mode 100644 index 000000000..ab3938905 --- /dev/null +++ b/1.6.6/i18n/angular-locale_kln.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "karoon", + "kooskoliny" + ], + "DAY": [ + "Kotisap", + "Kotaai", + "Koaeng\u2019", + "Kosomok", + "Koang\u2019wan", + "Komuut", + "Kolo" + ], + "ERANAMES": [ + "Amait kesich Jesu", + "Kokakesich Jesu" + ], + "ERAS": [ + "AM", + "KO" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Mulgul", + "Ng\u2019atyaato", + "Kiptaamo", + "Iwootkuut", + "Mamuut", + "Paagi", + "Ng\u2019eiyeet", + "Rooptui", + "Bureet", + "Epeeso", + "Kipsuunde ne taai", + "Kipsuunde nebo aeng\u2019" + ], + "SHORTDAY": [ + "Kts", + "Kot", + "Koo", + "Kos", + "Koa", + "Kom", + "Kol" + ], + "SHORTMONTH": [ + "Mul", + "Ngat", + "Taa", + "Iwo", + "Mam", + "Paa", + "Nge", + "Roo", + "Bur", + "Epe", + "Kpt", + "Kpa" + ], + "STANDALONEMONTH": [ + "Mulgul", + "Ng\u2019atyaato", + "Kiptaamo", + "Iwootkuut", + "Mamuut", + "Paagi", + "Ng\u2019eiyeet", + "Rooptui", + "Bureet", + "Epeeso", + "Kipsuunde ne taai", + "Kipsuunde nebo aeng\u2019" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "kln", + "localeID": "kln", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_km-kh.js b/1.6.6/i18n/angular-locale_km-kh.js new file mode 100644 index 000000000..9118a3a3f --- /dev/null +++ b/1.6.6/i18n/angular-locale_km-kh.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u17a2\u17b6\u1791\u17b7\u178f\u17d2\u1799", + "\u1785\u17d0\u1793\u17d2\u1791", + "\u17a2\u1784\u17d2\u1782\u17b6\u179a", + "\u1796\u17bb\u1792", + "\u1796\u17d2\u179a\u17a0\u179f\u17d2\u1794\u178f\u17b7\u17cd", + "\u179f\u17bb\u1780\u17d2\u179a", + "\u179f\u17c5\u179a\u17cd" + ], + "ERANAMES": [ + "\u1798\u17bb\u1793\u200b\u1782\u17d2\u179a\u17b7\u179f\u17d2\u178f\u179f\u1780\u179a\u17b6\u1787", + "\u1782\u17d2\u179a\u17b7\u179f\u17d2\u178f\u179f\u1780\u179a\u17b6\u1787" + ], + "ERAS": [ + "\u1798\u17bb\u1793 \u1782.\u179f.", + "\u1782.\u179f." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u1798\u1780\u179a\u17b6", + "\u1780\u17bb\u1798\u17d2\u1797\u17c8", + "\u1798\u17b8\u1793\u17b6", + "\u1798\u17c1\u179f\u17b6", + "\u17a7\u179f\u1797\u17b6", + "\u1798\u17b7\u1790\u17bb\u1793\u17b6", + "\u1780\u1780\u17d2\u1780\u178a\u17b6", + "\u179f\u17b8\u17a0\u17b6", + "\u1780\u1789\u17d2\u1789\u17b6", + "\u178f\u17bb\u179b\u17b6", + "\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6", + "\u1792\u17d2\u1793\u17bc" + ], + "SHORTDAY": [ + "\u17a2\u17b6\u1791\u17b7\u178f\u17d2\u1799", + "\u1785\u17d0\u1793\u17d2\u1791", + "\u17a2\u1784\u17d2\u1782\u17b6\u179a", + "\u1796\u17bb\u1792", + "\u1796\u17d2\u179a\u17a0\u179f\u17d2\u1794\u178f\u17b7\u17cd", + "\u179f\u17bb\u1780\u17d2\u179a", + "\u179f\u17c5\u179a\u17cd" + ], + "SHORTMONTH": [ + "\u1798\u1780\u179a\u17b6", + "\u1780\u17bb\u1798\u17d2\u1797\u17c8", + "\u1798\u17b8\u1793\u17b6", + "\u1798\u17c1\u179f\u17b6", + "\u17a7\u179f\u1797\u17b6", + "\u1798\u17b7\u1790\u17bb\u1793\u17b6", + "\u1780\u1780\u17d2\u1780\u178a\u17b6", + "\u179f\u17b8\u17a0\u17b6", + "\u1780\u1789\u17d2\u1789\u17b6", + "\u178f\u17bb\u179b\u17b6", + "\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6", + "\u1792\u17d2\u1793\u17bc" + ], + "STANDALONEMONTH": [ + "\u1798\u1780\u179a\u17b6", + "\u1780\u17bb\u1798\u17d2\u1797\u17c8", + "\u1798\u17b8\u1793\u17b6", + "\u1798\u17c1\u179f\u17b6", + "\u17a7\u179f\u1797\u17b6", + "\u1798\u17b7\u1790\u17bb\u1793\u17b6", + "\u1780\u1780\u17d2\u1780\u178a\u17b6", + "\u179f\u17b8\u17a0\u17b6", + "\u1780\u1789\u17d2\u1789\u17b6", + "\u178f\u17bb\u179b\u17b6", + "\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6", + "\u1792\u17d2\u1793\u17bc" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Riel", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "km-kh", + "localeID": "km_KH", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_km.js b/1.6.6/i18n/angular-locale_km.js new file mode 100644 index 000000000..af5af7fdb --- /dev/null +++ b/1.6.6/i18n/angular-locale_km.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u17a2\u17b6\u1791\u17b7\u178f\u17d2\u1799", + "\u1785\u17d0\u1793\u17d2\u1791", + "\u17a2\u1784\u17d2\u1782\u17b6\u179a", + "\u1796\u17bb\u1792", + "\u1796\u17d2\u179a\u17a0\u179f\u17d2\u1794\u178f\u17b7\u17cd", + "\u179f\u17bb\u1780\u17d2\u179a", + "\u179f\u17c5\u179a\u17cd" + ], + "ERANAMES": [ + "\u1798\u17bb\u1793\u200b\u1782\u17d2\u179a\u17b7\u179f\u17d2\u178f\u179f\u1780\u179a\u17b6\u1787", + "\u1782\u17d2\u179a\u17b7\u179f\u17d2\u178f\u179f\u1780\u179a\u17b6\u1787" + ], + "ERAS": [ + "\u1798\u17bb\u1793 \u1782.\u179f.", + "\u1782.\u179f." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u1798\u1780\u179a\u17b6", + "\u1780\u17bb\u1798\u17d2\u1797\u17c8", + "\u1798\u17b8\u1793\u17b6", + "\u1798\u17c1\u179f\u17b6", + "\u17a7\u179f\u1797\u17b6", + "\u1798\u17b7\u1790\u17bb\u1793\u17b6", + "\u1780\u1780\u17d2\u1780\u178a\u17b6", + "\u179f\u17b8\u17a0\u17b6", + "\u1780\u1789\u17d2\u1789\u17b6", + "\u178f\u17bb\u179b\u17b6", + "\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6", + "\u1792\u17d2\u1793\u17bc" + ], + "SHORTDAY": [ + "\u17a2\u17b6\u1791\u17b7\u178f\u17d2\u1799", + "\u1785\u17d0\u1793\u17d2\u1791", + "\u17a2\u1784\u17d2\u1782\u17b6\u179a", + "\u1796\u17bb\u1792", + "\u1796\u17d2\u179a\u17a0\u179f\u17d2\u1794\u178f\u17b7\u17cd", + "\u179f\u17bb\u1780\u17d2\u179a", + "\u179f\u17c5\u179a\u17cd" + ], + "SHORTMONTH": [ + "\u1798\u1780\u179a\u17b6", + "\u1780\u17bb\u1798\u17d2\u1797\u17c8", + "\u1798\u17b8\u1793\u17b6", + "\u1798\u17c1\u179f\u17b6", + "\u17a7\u179f\u1797\u17b6", + "\u1798\u17b7\u1790\u17bb\u1793\u17b6", + "\u1780\u1780\u17d2\u1780\u178a\u17b6", + "\u179f\u17b8\u17a0\u17b6", + "\u1780\u1789\u17d2\u1789\u17b6", + "\u178f\u17bb\u179b\u17b6", + "\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6", + "\u1792\u17d2\u1793\u17bc" + ], + "STANDALONEMONTH": [ + "\u1798\u1780\u179a\u17b6", + "\u1780\u17bb\u1798\u17d2\u1797\u17c8", + "\u1798\u17b8\u1793\u17b6", + "\u1798\u17c1\u179f\u17b6", + "\u17a7\u179f\u1797\u17b6", + "\u1798\u17b7\u1790\u17bb\u1793\u17b6", + "\u1780\u1780\u17d2\u1780\u178a\u17b6", + "\u179f\u17b8\u17a0\u17b6", + "\u1780\u1789\u17d2\u1789\u17b6", + "\u178f\u17bb\u179b\u17b6", + "\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6", + "\u1792\u17d2\u1793\u17bc" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Riel", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "km", + "localeID": "km", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kn-in.js b/1.6.6/i18n/angular-locale_kn-in.js new file mode 100644 index 000000000..bc40a6058 --- /dev/null +++ b/1.6.6/i18n/angular-locale_kn-in.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0caa\u0cc2\u0cb0\u0ccd\u0cb5\u0cbe\u0cb9\u0ccd\u0ca8", + "\u0c85\u0caa\u0cb0\u0cbe\u0cb9\u0ccd\u0ca8" + ], + "DAY": [ + "\u0cad\u0cbe\u0ca8\u0cc1\u0cb5\u0cbe\u0cb0", + "\u0cb8\u0ccb\u0cae\u0cb5\u0cbe\u0cb0", + "\u0cae\u0c82\u0c97\u0cb3\u0cb5\u0cbe\u0cb0", + "\u0cac\u0cc1\u0ca7\u0cb5\u0cbe\u0cb0", + "\u0c97\u0cc1\u0cb0\u0cc1\u0cb5\u0cbe\u0cb0", + "\u0cb6\u0cc1\u0c95\u0ccd\u0cb0\u0cb5\u0cbe\u0cb0", + "\u0cb6\u0ca8\u0cbf\u0cb5\u0cbe\u0cb0" + ], + "ERANAMES": [ + "\u0c95\u0ccd\u0cb0\u0cbf\u0cb8\u0ccd\u0ca4 \u0caa\u0cc2\u0cb0\u0ccd\u0cb5", + "\u0c95\u0ccd\u0cb0\u0cbf\u0cb8\u0ccd\u0ca4 \u0cb6\u0c95" + ], + "ERAS": [ + "\u0c95\u0ccd\u0cb0\u0cbf.\u0caa\u0cc2", + "\u0c95\u0ccd\u0cb0\u0cbf.\u0cb6" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0c9c\u0ca8\u0cb5\u0cb0\u0cbf", + "\u0cab\u0cc6\u0cac\u0ccd\u0cb0\u0cb5\u0cb0\u0cbf", + "\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd", + "\u0c8f\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd", + "\u0cae\u0cc7", + "\u0c9c\u0cc2\u0ca8\u0ccd", + "\u0c9c\u0cc1\u0cb2\u0cc8", + "\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd", + "\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82\u0cac\u0cb0\u0ccd", + "\u0c85\u0c95\u0ccd\u0c9f\u0ccb\u0cac\u0cb0\u0ccd", + "\u0ca8\u0cb5\u0cc6\u0c82\u0cac\u0cb0\u0ccd", + "\u0ca1\u0cbf\u0cb8\u0cc6\u0c82\u0cac\u0cb0\u0ccd" + ], + "SHORTDAY": [ + "\u0cad\u0cbe\u0ca8\u0cc1", + "\u0cb8\u0ccb\u0cae", + "\u0cae\u0c82\u0c97\u0cb3", + "\u0cac\u0cc1\u0ca7", + "\u0c97\u0cc1\u0cb0\u0cc1", + "\u0cb6\u0cc1\u0c95\u0ccd\u0cb0", + "\u0cb6\u0ca8\u0cbf" + ], + "SHORTMONTH": [ + "\u0c9c\u0ca8", + "\u0cab\u0cc6\u0cac\u0ccd\u0cb0", + "\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd", + "\u0c8f\u0caa\u0ccd\u0cb0\u0cbf", + "\u0cae\u0cc7", + "\u0c9c\u0cc2\u0ca8\u0ccd", + "\u0c9c\u0cc1\u0cb2\u0cc8", + "\u0c86\u0c97", + "\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82", + "\u0c85\u0c95\u0ccd\u0c9f\u0ccb", + "\u0ca8\u0cb5\u0cc6\u0c82", + "\u0ca1\u0cbf\u0cb8\u0cc6\u0c82" + ], + "STANDALONEMONTH": [ + "\u0c9c\u0ca8\u0cb5\u0cb0\u0cbf", + "\u0cab\u0cc6\u0cac\u0ccd\u0cb0\u0cb5\u0cb0\u0cbf", + "\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd", + "\u0c8f\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd", + "\u0cae\u0cc7", + "\u0c9c\u0cc2\u0ca8\u0ccd", + "\u0c9c\u0cc1\u0cb2\u0cc8", + "\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd", + "\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82\u0cac\u0cb0\u0ccd", + "\u0c85\u0c95\u0ccd\u0c9f\u0ccb\u0cac\u0cb0\u0ccd", + "\u0ca8\u0cb5\u0cc6\u0c82\u0cac\u0cb0\u0ccd", + "\u0ca1\u0cbf\u0cb8\u0cc6\u0c82\u0cac\u0cb0\u0ccd" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y hh:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "hh:mm:ss a", + "short": "d/M/yy hh:mm a", + "shortDate": "d/M/yy", + "shortTime": "hh:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "kn-in", + "localeID": "kn_IN", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kn.js b/1.6.6/i18n/angular-locale_kn.js new file mode 100644 index 000000000..18196c092 --- /dev/null +++ b/1.6.6/i18n/angular-locale_kn.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0caa\u0cc2\u0cb0\u0ccd\u0cb5\u0cbe\u0cb9\u0ccd\u0ca8", + "\u0c85\u0caa\u0cb0\u0cbe\u0cb9\u0ccd\u0ca8" + ], + "DAY": [ + "\u0cad\u0cbe\u0ca8\u0cc1\u0cb5\u0cbe\u0cb0", + "\u0cb8\u0ccb\u0cae\u0cb5\u0cbe\u0cb0", + "\u0cae\u0c82\u0c97\u0cb3\u0cb5\u0cbe\u0cb0", + "\u0cac\u0cc1\u0ca7\u0cb5\u0cbe\u0cb0", + "\u0c97\u0cc1\u0cb0\u0cc1\u0cb5\u0cbe\u0cb0", + "\u0cb6\u0cc1\u0c95\u0ccd\u0cb0\u0cb5\u0cbe\u0cb0", + "\u0cb6\u0ca8\u0cbf\u0cb5\u0cbe\u0cb0" + ], + "ERANAMES": [ + "\u0c95\u0ccd\u0cb0\u0cbf\u0cb8\u0ccd\u0ca4 \u0caa\u0cc2\u0cb0\u0ccd\u0cb5", + "\u0c95\u0ccd\u0cb0\u0cbf\u0cb8\u0ccd\u0ca4 \u0cb6\u0c95" + ], + "ERAS": [ + "\u0c95\u0ccd\u0cb0\u0cbf.\u0caa\u0cc2", + "\u0c95\u0ccd\u0cb0\u0cbf.\u0cb6" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0c9c\u0ca8\u0cb5\u0cb0\u0cbf", + "\u0cab\u0cc6\u0cac\u0ccd\u0cb0\u0cb5\u0cb0\u0cbf", + "\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd", + "\u0c8f\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd", + "\u0cae\u0cc7", + "\u0c9c\u0cc2\u0ca8\u0ccd", + "\u0c9c\u0cc1\u0cb2\u0cc8", + "\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd", + "\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82\u0cac\u0cb0\u0ccd", + "\u0c85\u0c95\u0ccd\u0c9f\u0ccb\u0cac\u0cb0\u0ccd", + "\u0ca8\u0cb5\u0cc6\u0c82\u0cac\u0cb0\u0ccd", + "\u0ca1\u0cbf\u0cb8\u0cc6\u0c82\u0cac\u0cb0\u0ccd" + ], + "SHORTDAY": [ + "\u0cad\u0cbe\u0ca8\u0cc1", + "\u0cb8\u0ccb\u0cae", + "\u0cae\u0c82\u0c97\u0cb3", + "\u0cac\u0cc1\u0ca7", + "\u0c97\u0cc1\u0cb0\u0cc1", + "\u0cb6\u0cc1\u0c95\u0ccd\u0cb0", + "\u0cb6\u0ca8\u0cbf" + ], + "SHORTMONTH": [ + "\u0c9c\u0ca8", + "\u0cab\u0cc6\u0cac\u0ccd\u0cb0", + "\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd", + "\u0c8f\u0caa\u0ccd\u0cb0\u0cbf", + "\u0cae\u0cc7", + "\u0c9c\u0cc2\u0ca8\u0ccd", + "\u0c9c\u0cc1\u0cb2\u0cc8", + "\u0c86\u0c97", + "\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82", + "\u0c85\u0c95\u0ccd\u0c9f\u0ccb", + "\u0ca8\u0cb5\u0cc6\u0c82", + "\u0ca1\u0cbf\u0cb8\u0cc6\u0c82" + ], + "STANDALONEMONTH": [ + "\u0c9c\u0ca8\u0cb5\u0cb0\u0cbf", + "\u0cab\u0cc6\u0cac\u0ccd\u0cb0\u0cb5\u0cb0\u0cbf", + "\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd", + "\u0c8f\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd", + "\u0cae\u0cc7", + "\u0c9c\u0cc2\u0ca8\u0ccd", + "\u0c9c\u0cc1\u0cb2\u0cc8", + "\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd", + "\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82\u0cac\u0cb0\u0ccd", + "\u0c85\u0c95\u0ccd\u0c9f\u0ccb\u0cac\u0cb0\u0ccd", + "\u0ca8\u0cb5\u0cc6\u0c82\u0cac\u0cb0\u0ccd", + "\u0ca1\u0cbf\u0cb8\u0cc6\u0c82\u0cac\u0cb0\u0ccd" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y hh:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "hh:mm:ss a", + "short": "d/M/yy hh:mm a", + "shortDate": "d/M/yy", + "shortTime": "hh:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "kn", + "localeID": "kn", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ko-kp.js b/1.6.6/i18n/angular-locale_ko-kp.js new file mode 100644 index 000000000..8e126ec8e --- /dev/null +++ b/1.6.6/i18n/angular-locale_ko-kp.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\uc624\uc804", + "\uc624\ud6c4" + ], + "DAY": [ + "\uc77c\uc694\uc77c", + "\uc6d4\uc694\uc77c", + "\ud654\uc694\uc77c", + "\uc218\uc694\uc77c", + "\ubaa9\uc694\uc77c", + "\uae08\uc694\uc77c", + "\ud1a0\uc694\uc77c" + ], + "ERANAMES": [ + "\uae30\uc6d0\uc804", + "\uc11c\uae30" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "1\uc6d4", + "2\uc6d4", + "3\uc6d4", + "4\uc6d4", + "5\uc6d4", + "6\uc6d4", + "7\uc6d4", + "8\uc6d4", + "9\uc6d4", + "10\uc6d4", + "11\uc6d4", + "12\uc6d4" + ], + "SHORTDAY": [ + "\uc77c", + "\uc6d4", + "\ud654", + "\uc218", + "\ubaa9", + "\uae08", + "\ud1a0" + ], + "SHORTMONTH": [ + "1\uc6d4", + "2\uc6d4", + "3\uc6d4", + "4\uc6d4", + "5\uc6d4", + "6\uc6d4", + "7\uc6d4", + "8\uc6d4", + "9\uc6d4", + "10\uc6d4", + "11\uc6d4", + "12\uc6d4" + ], + "STANDALONEMONTH": [ + "1\uc6d4", + "2\uc6d4", + "3\uc6d4", + "4\uc6d4", + "5\uc6d4", + "6\uc6d4", + "7\uc6d4", + "8\uc6d4", + "9\uc6d4", + "10\uc6d4", + "11\uc6d4", + "12\uc6d4" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y\ub144 M\uc6d4 d\uc77c EEEE", + "longDate": "y\ub144 M\uc6d4 d\uc77c", + "medium": "y. M. d. a h:mm:ss", + "mediumDate": "y. M. d.", + "mediumTime": "a h:mm:ss", + "short": "yy. M. d. a h:mm", + "shortDate": "yy. M. d.", + "shortTime": "a h:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20a9KP", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ko-kp", + "localeID": "ko_KP", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ko-kr.js b/1.6.6/i18n/angular-locale_ko-kr.js new file mode 100644 index 000000000..96a33fe96 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ko-kr.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\uc624\uc804", + "\uc624\ud6c4" + ], + "DAY": [ + "\uc77c\uc694\uc77c", + "\uc6d4\uc694\uc77c", + "\ud654\uc694\uc77c", + "\uc218\uc694\uc77c", + "\ubaa9\uc694\uc77c", + "\uae08\uc694\uc77c", + "\ud1a0\uc694\uc77c" + ], + "ERANAMES": [ + "\uae30\uc6d0\uc804", + "\uc11c\uae30" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "1\uc6d4", + "2\uc6d4", + "3\uc6d4", + "4\uc6d4", + "5\uc6d4", + "6\uc6d4", + "7\uc6d4", + "8\uc6d4", + "9\uc6d4", + "10\uc6d4", + "11\uc6d4", + "12\uc6d4" + ], + "SHORTDAY": [ + "\uc77c", + "\uc6d4", + "\ud654", + "\uc218", + "\ubaa9", + "\uae08", + "\ud1a0" + ], + "SHORTMONTH": [ + "1\uc6d4", + "2\uc6d4", + "3\uc6d4", + "4\uc6d4", + "5\uc6d4", + "6\uc6d4", + "7\uc6d4", + "8\uc6d4", + "9\uc6d4", + "10\uc6d4", + "11\uc6d4", + "12\uc6d4" + ], + "STANDALONEMONTH": [ + "1\uc6d4", + "2\uc6d4", + "3\uc6d4", + "4\uc6d4", + "5\uc6d4", + "6\uc6d4", + "7\uc6d4", + "8\uc6d4", + "9\uc6d4", + "10\uc6d4", + "11\uc6d4", + "12\uc6d4" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y\ub144 M\uc6d4 d\uc77c EEEE", + "longDate": "y\ub144 M\uc6d4 d\uc77c", + "medium": "y. M. d. a h:mm:ss", + "mediumDate": "y. M. d.", + "mediumTime": "a h:mm:ss", + "short": "yy. M. d. a h:mm", + "shortDate": "yy. M. d.", + "shortTime": "a h:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20a9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ko-kr", + "localeID": "ko_KR", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ko.js b/1.6.6/i18n/angular-locale_ko.js new file mode 100644 index 000000000..50958e043 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ko.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\uc624\uc804", + "\uc624\ud6c4" + ], + "DAY": [ + "\uc77c\uc694\uc77c", + "\uc6d4\uc694\uc77c", + "\ud654\uc694\uc77c", + "\uc218\uc694\uc77c", + "\ubaa9\uc694\uc77c", + "\uae08\uc694\uc77c", + "\ud1a0\uc694\uc77c" + ], + "ERANAMES": [ + "\uae30\uc6d0\uc804", + "\uc11c\uae30" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "1\uc6d4", + "2\uc6d4", + "3\uc6d4", + "4\uc6d4", + "5\uc6d4", + "6\uc6d4", + "7\uc6d4", + "8\uc6d4", + "9\uc6d4", + "10\uc6d4", + "11\uc6d4", + "12\uc6d4" + ], + "SHORTDAY": [ + "\uc77c", + "\uc6d4", + "\ud654", + "\uc218", + "\ubaa9", + "\uae08", + "\ud1a0" + ], + "SHORTMONTH": [ + "1\uc6d4", + "2\uc6d4", + "3\uc6d4", + "4\uc6d4", + "5\uc6d4", + "6\uc6d4", + "7\uc6d4", + "8\uc6d4", + "9\uc6d4", + "10\uc6d4", + "11\uc6d4", + "12\uc6d4" + ], + "STANDALONEMONTH": [ + "1\uc6d4", + "2\uc6d4", + "3\uc6d4", + "4\uc6d4", + "5\uc6d4", + "6\uc6d4", + "7\uc6d4", + "8\uc6d4", + "9\uc6d4", + "10\uc6d4", + "11\uc6d4", + "12\uc6d4" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y\ub144 M\uc6d4 d\uc77c EEEE", + "longDate": "y\ub144 M\uc6d4 d\uc77c", + "medium": "y. M. d. a h:mm:ss", + "mediumDate": "y. M. d.", + "mediumTime": "a h:mm:ss", + "short": "yy. M. d. a h:mm", + "shortDate": "yy. M. d.", + "shortTime": "a h:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20a9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ko", + "localeID": "ko", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kok-in.js b/1.6.6/i18n/angular-locale_kok-in.js new file mode 100644 index 000000000..c5c33aebd --- /dev/null +++ b/1.6.6/i18n/angular-locale_kok-in.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u092e.\u092a\u0942.", + "\u092e.\u0928\u0902." + ], + "DAY": [ + "\u0906\u0926\u093f\u0924\u094d\u092f\u0935\u093e\u0930", + "\u0938\u094b\u092e\u0935\u093e\u0930", + "\u092e\u0902\u0917\u0933\u093e\u0930", + "\u092c\u0941\u0927\u0935\u093e\u0930", + "\u0917\u0941\u0930\u0941\u0935\u093e\u0930", + "\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930", + "\u0936\u0928\u093f\u0935\u093e\u0930" + ], + "ERANAMES": [ + "\u0915\u094d\u0930\u093f\u0938\u094d\u0924\u092a\u0942\u0930\u094d\u0935", + "\u0915\u094d\u0930\u093f\u0938\u094d\u0924\u0936\u0916\u093e" + ], + "ERAS": [ + "\u0915\u094d\u0930\u093f\u0938\u094d\u0924\u092a\u0942\u0930\u094d\u0935", + "\u0915\u094d\u0930\u093f\u0938\u094d\u0924\u0936\u0916\u093e" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u090f\u092a\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0942\u0928", + "\u091c\u0941\u0932\u0948", + "\u0913\u0917\u0938\u094d\u091f", + "\u0938\u0947\u092a\u094d\u091f\u0947\u0902\u092c\u0930", + "\u0913\u0915\u094d\u091f\u094b\u092c\u0930", + "\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930", + "\u0921\u093f\u0938\u0947\u0902\u092c\u0930" + ], + "SHORTDAY": [ + "\u0930\u0935\u093f", + "\u0938\u094b\u092e", + "\u092e\u0902\u0917\u0933", + "\u092c\u0941\u0927", + "\u0917\u0941\u0930\u0941", + "\u0936\u0941\u0915\u094d\u0930", + "\u0936\u0928\u093f" + ], + "SHORTMONTH": [ + "\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u090f\u092a\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0942\u0928", + "\u091c\u0941\u0932\u0948", + "\u0913\u0917\u0938\u094d\u091f", + "\u0938\u0947\u092a\u094d\u091f\u0947\u0902\u092c\u0930", + "\u0913\u0915\u094d\u091f\u094b\u092c\u0930", + "\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930", + "\u0921\u093f\u0938\u0947\u0902\u092c\u0930" + ], + "STANDALONEMONTH": [ + "\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u090f\u092a\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0942\u0928", + "\u091c\u0941\u0932\u0948", + "\u0913\u0917\u0938\u094d\u091f", + "\u0938\u0947\u092a\u094d\u091f\u0947\u0902\u092c\u0930", + "\u0913\u0915\u094d\u091f\u094b\u092c\u0930", + "\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930", + "\u0921\u093f\u0938\u0947\u0902\u092c\u0930" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "kok-in", + "localeID": "kok_IN", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kok.js b/1.6.6/i18n/angular-locale_kok.js new file mode 100644 index 000000000..63944905f --- /dev/null +++ b/1.6.6/i18n/angular-locale_kok.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u092e.\u092a\u0942.", + "\u092e.\u0928\u0902." + ], + "DAY": [ + "\u0906\u0926\u093f\u0924\u094d\u092f\u0935\u093e\u0930", + "\u0938\u094b\u092e\u0935\u093e\u0930", + "\u092e\u0902\u0917\u0933\u093e\u0930", + "\u092c\u0941\u0927\u0935\u093e\u0930", + "\u0917\u0941\u0930\u0941\u0935\u093e\u0930", + "\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930", + "\u0936\u0928\u093f\u0935\u093e\u0930" + ], + "ERANAMES": [ + "\u0915\u094d\u0930\u093f\u0938\u094d\u0924\u092a\u0942\u0930\u094d\u0935", + "\u0915\u094d\u0930\u093f\u0938\u094d\u0924\u0936\u0916\u093e" + ], + "ERAS": [ + "\u0915\u094d\u0930\u093f\u0938\u094d\u0924\u092a\u0942\u0930\u094d\u0935", + "\u0915\u094d\u0930\u093f\u0938\u094d\u0924\u0936\u0916\u093e" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u090f\u092a\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0942\u0928", + "\u091c\u0941\u0932\u0948", + "\u0913\u0917\u0938\u094d\u091f", + "\u0938\u0947\u092a\u094d\u091f\u0947\u0902\u092c\u0930", + "\u0913\u0915\u094d\u091f\u094b\u092c\u0930", + "\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930", + "\u0921\u093f\u0938\u0947\u0902\u092c\u0930" + ], + "SHORTDAY": [ + "\u0930\u0935\u093f", + "\u0938\u094b\u092e", + "\u092e\u0902\u0917\u0933", + "\u092c\u0941\u0927", + "\u0917\u0941\u0930\u0941", + "\u0936\u0941\u0915\u094d\u0930", + "\u0936\u0928\u093f" + ], + "SHORTMONTH": [ + "\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u090f\u092a\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0942\u0928", + "\u091c\u0941\u0932\u0948", + "\u0913\u0917\u0938\u094d\u091f", + "\u0938\u0947\u092a\u094d\u091f\u0947\u0902\u092c\u0930", + "\u0913\u0915\u094d\u091f\u094b\u092c\u0930", + "\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930", + "\u0921\u093f\u0938\u0947\u0902\u092c\u0930" + ], + "STANDALONEMONTH": [ + "\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u090f\u092a\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0942\u0928", + "\u091c\u0941\u0932\u0948", + "\u0913\u0917\u0938\u094d\u091f", + "\u0938\u0947\u092a\u094d\u091f\u0947\u0902\u092c\u0930", + "\u0913\u0915\u094d\u091f\u094b\u092c\u0930", + "\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930", + "\u0921\u093f\u0938\u0947\u0902\u092c\u0930" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "kok", + "localeID": "kok", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ks-in.js b/1.6.6/i18n/angular-locale_ks-in.js new file mode 100644 index 000000000..3789d8cae --- /dev/null +++ b/1.6.6/i18n/angular-locale_ks-in.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u0627\u064e\u062a\u06be\u0648\u0627\u0631", + "\u0698\u0654\u0646\u065b\u062f\u0631\u0655\u0631\u0648\u0627\u0631", + "\u0628\u0648\u065a\u0645\u0648\u0627\u0631", + "\u0628\u0648\u062f\u0648\u0627\u0631", + "\u0628\u0631\u065b\u066e\u06ea\u0633\u0648\u0627\u0631", + "\u062c\u064f\u0645\u06c1", + "\u0628\u0679\u0648\u0627\u0631" + ], + "ERANAMES": [ + "\u0642\u0628\u0655\u0644 \u0645\u0633\u06cc\u0656\u062d", + "\u0639\u06cc\u0656\u0633\u0648\u06cc \u0633\u0646\u06c1\u0655" + ], + "ERAS": [ + "\u0628\u06cc \u0633\u06cc", + "\u0627\u06d2 \u0688\u06cc" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u062c\u0646\u0624\u0631\u06cc", + "\u0641\u0631\u0624\u0631\u06cc", + "\u0645\u0627\u0631\u0655\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u06cc\u0654", + "\u062c\u0648\u0657\u0646", + "\u062c\u0648\u0657\u0644\u0627\u06cc\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0657\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0622\u062a\u06be\u0648\u0627\u0631", + "\u0698\u0654\u0646\u065b\u062f\u0655\u0631\u0648\u0627\u0631", + "\u0628\u0648\u065a\u0645\u0648\u0627\u0631", + "\u0628\u0648\u062f\u0648\u0627\u0631", + "\u0628\u0631\u065b\u066e\u06ea\u0633\u0648\u0627\u0631", + "\u062c\u064f\u0645\u06c1", + "\u0628\u0679\u0648\u0627\u0631" + ], + "SHORTMONTH": [ + "\u062c\u0646\u0624\u0631\u06cc", + "\u0641\u0631\u0624\u0631\u06cc", + "\u0645\u0627\u0631\u0655\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u06cc\u0654", + "\u062c\u0648\u0657\u0646", + "\u062c\u0648\u0657\u0644\u0627\u06cc\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0657\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u062c\u0646\u0624\u0631\u06cc", + "\u0641\u0631\u0624\u0631\u06cc", + "\u0645\u0627\u0631\u0655\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u06cc\u0654", + "\u062c\u0648\u0657\u0646", + "\u062c\u0648\u0657\u0644\u0627\u06cc\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0657\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ks-in", + "localeID": "ks_IN", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ks.js b/1.6.6/i18n/angular-locale_ks.js new file mode 100644 index 000000000..7c64c70b6 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ks.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u0627\u064e\u062a\u06be\u0648\u0627\u0631", + "\u0698\u0654\u0646\u065b\u062f\u0631\u0655\u0631\u0648\u0627\u0631", + "\u0628\u0648\u065a\u0645\u0648\u0627\u0631", + "\u0628\u0648\u062f\u0648\u0627\u0631", + "\u0628\u0631\u065b\u066e\u06ea\u0633\u0648\u0627\u0631", + "\u062c\u064f\u0645\u06c1", + "\u0628\u0679\u0648\u0627\u0631" + ], + "ERANAMES": [ + "\u0642\u0628\u0655\u0644 \u0645\u0633\u06cc\u0656\u062d", + "\u0639\u06cc\u0656\u0633\u0648\u06cc \u0633\u0646\u06c1\u0655" + ], + "ERAS": [ + "\u0628\u06cc \u0633\u06cc", + "\u0627\u06d2 \u0688\u06cc" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u062c\u0646\u0624\u0631\u06cc", + "\u0641\u0631\u0624\u0631\u06cc", + "\u0645\u0627\u0631\u0655\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u06cc\u0654", + "\u062c\u0648\u0657\u0646", + "\u062c\u0648\u0657\u0644\u0627\u06cc\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0657\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0622\u062a\u06be\u0648\u0627\u0631", + "\u0698\u0654\u0646\u065b\u062f\u0655\u0631\u0648\u0627\u0631", + "\u0628\u0648\u065a\u0645\u0648\u0627\u0631", + "\u0628\u0648\u062f\u0648\u0627\u0631", + "\u0628\u0631\u065b\u066e\u06ea\u0633\u0648\u0627\u0631", + "\u062c\u064f\u0645\u06c1", + "\u0628\u0679\u0648\u0627\u0631" + ], + "SHORTMONTH": [ + "\u062c\u0646\u0624\u0631\u06cc", + "\u0641\u0631\u0624\u0631\u06cc", + "\u0645\u0627\u0631\u0655\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u06cc\u0654", + "\u062c\u0648\u0657\u0646", + "\u062c\u0648\u0657\u0644\u0627\u06cc\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0657\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u062c\u0646\u0624\u0631\u06cc", + "\u0641\u0631\u0624\u0631\u06cc", + "\u0645\u0627\u0631\u0655\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u06cc\u0654", + "\u062c\u0648\u0657\u0646", + "\u062c\u0648\u0657\u0644\u0627\u06cc\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0657\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ks", + "localeID": "ks", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ksb-tz.js b/1.6.6/i18n/angular-locale_ksb-tz.js new file mode 100644 index 000000000..dce2395d0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ksb-tz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "makeo", + "nyiaghuo" + ], + "DAY": [ + "Jumaapii", + "Jumaatatu", + "Jumaane", + "Jumaatano", + "Alhamisi", + "Ijumaa", + "Jumaamosi" + ], + "ERANAMES": [ + "Kabla ya Klisto", + "Baada ya Klisto" + ], + "ERAS": [ + "KK", + "BK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januali", + "Febluali", + "Machi", + "Aplili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "SHORTDAY": [ + "Jpi", + "Jtt", + "Jmn", + "Jtn", + "Alh", + "Iju", + "Jmo" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Jul", + "Ago", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Januali", + "Febluali", + "Machi", + "Aplili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "ksb-tz", + "localeID": "ksb_TZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ksb.js b/1.6.6/i18n/angular-locale_ksb.js new file mode 100644 index 000000000..5ca5dd971 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ksb.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "makeo", + "nyiaghuo" + ], + "DAY": [ + "Jumaapii", + "Jumaatatu", + "Jumaane", + "Jumaatano", + "Alhamisi", + "Ijumaa", + "Jumaamosi" + ], + "ERANAMES": [ + "Kabla ya Klisto", + "Baada ya Klisto" + ], + "ERAS": [ + "KK", + "BK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januali", + "Febluali", + "Machi", + "Aplili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "SHORTDAY": [ + "Jpi", + "Jtt", + "Jmn", + "Jtn", + "Alh", + "Iju", + "Jmo" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Jul", + "Ago", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Januali", + "Febluali", + "Machi", + "Aplili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "ksb", + "localeID": "ksb", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ksf-cm.js b/1.6.6/i18n/angular-locale_ksf-cm.js new file mode 100644 index 000000000..19ea5d6a4 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ksf-cm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "s\u00e1r\u00faw\u00e1", + "c\u025b\u025b\u0301nko" + ], + "DAY": [ + "s\u0254\u0301nd\u01dd", + "l\u01ddnd\u00ed", + "maad\u00ed", + "m\u025bkr\u025bd\u00ed", + "j\u01dd\u01ddd\u00ed", + "j\u00famb\u00e1", + "samd\u00ed" + ], + "ERANAMES": [ + "di Y\u025b\u0301sus ak\u00e1 y\u00e1l\u025b", + "c\u00e1m\u025b\u025bn k\u01dd k\u01ddb\u0254pka Y" + ], + "ERAS": [ + "d.Y.", + "k.Y." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u014bw\u00ed\u00ed a nt\u0254\u0301nt\u0254", + "\u014bw\u00ed\u00ed ak\u01dd b\u025b\u0301\u025b", + "\u014bw\u00ed\u00ed ak\u01dd r\u00e1\u00e1", + "\u014bw\u00ed\u00ed ak\u01dd nin", + "\u014bw\u00ed\u00ed ak\u01dd t\u00e1an", + "\u014bw\u00ed\u00ed ak\u01dd t\u00e1af\u0254k", + "\u014bw\u00ed\u00ed ak\u01dd t\u00e1ab\u025b\u025b", + "\u014bw\u00ed\u00ed ak\u01dd t\u00e1araa", + "\u014bw\u00ed\u00ed ak\u01dd t\u00e1anin", + "\u014bw\u00ed\u00ed ak\u01dd nt\u025bk", + "\u014bw\u00ed\u00ed ak\u01dd nt\u025bk di b\u0254\u0301k", + "\u014bw\u00ed\u00ed ak\u01dd nt\u025bk di b\u025b\u0301\u025b" + ], + "SHORTDAY": [ + "s\u0254\u0301n", + "l\u01ddn", + "maa", + "m\u025bk", + "j\u01dd\u01dd", + "j\u00fam", + "sam" + ], + "SHORTMONTH": [ + "\u014b1", + "\u014b2", + "\u014b3", + "\u014b4", + "\u014b5", + "\u014b6", + "\u014b7", + "\u014b8", + "\u014b9", + "\u014b10", + "\u014b11", + "\u014b12" + ], + "STANDALONEMONTH": [ + "\u014bw\u00ed\u00ed a nt\u0254\u0301nt\u0254", + "\u014bw\u00ed\u00ed ak\u01dd b\u025b\u0301\u025b", + "\u014bw\u00ed\u00ed ak\u01dd r\u00e1\u00e1", + "\u014bw\u00ed\u00ed ak\u01dd nin", + "\u014bw\u00ed\u00ed ak\u01dd t\u00e1an", + "\u014bw\u00ed\u00ed ak\u01dd t\u00e1af\u0254k", + "\u014bw\u00ed\u00ed ak\u01dd t\u00e1ab\u025b\u025b", + "\u014bw\u00ed\u00ed ak\u01dd t\u00e1araa", + "\u014bw\u00ed\u00ed ak\u01dd t\u00e1anin", + "\u014bw\u00ed\u00ed ak\u01dd nt\u025bk", + "\u014bw\u00ed\u00ed ak\u01dd nt\u025bk di b\u0254\u0301k", + "\u014bw\u00ed\u00ed ak\u01dd nt\u025bk di b\u025b\u0301\u025b" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ksf-cm", + "localeID": "ksf_CM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ksf.js b/1.6.6/i18n/angular-locale_ksf.js new file mode 100644 index 000000000..36e62a8d0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ksf.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "s\u00e1r\u00faw\u00e1", + "c\u025b\u025b\u0301nko" + ], + "DAY": [ + "s\u0254\u0301nd\u01dd", + "l\u01ddnd\u00ed", + "maad\u00ed", + "m\u025bkr\u025bd\u00ed", + "j\u01dd\u01ddd\u00ed", + "j\u00famb\u00e1", + "samd\u00ed" + ], + "ERANAMES": [ + "di Y\u025b\u0301sus ak\u00e1 y\u00e1l\u025b", + "c\u00e1m\u025b\u025bn k\u01dd k\u01ddb\u0254pka Y" + ], + "ERAS": [ + "d.Y.", + "k.Y." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u014bw\u00ed\u00ed a nt\u0254\u0301nt\u0254", + "\u014bw\u00ed\u00ed ak\u01dd b\u025b\u0301\u025b", + "\u014bw\u00ed\u00ed ak\u01dd r\u00e1\u00e1", + "\u014bw\u00ed\u00ed ak\u01dd nin", + "\u014bw\u00ed\u00ed ak\u01dd t\u00e1an", + "\u014bw\u00ed\u00ed ak\u01dd t\u00e1af\u0254k", + "\u014bw\u00ed\u00ed ak\u01dd t\u00e1ab\u025b\u025b", + "\u014bw\u00ed\u00ed ak\u01dd t\u00e1araa", + "\u014bw\u00ed\u00ed ak\u01dd t\u00e1anin", + "\u014bw\u00ed\u00ed ak\u01dd nt\u025bk", + "\u014bw\u00ed\u00ed ak\u01dd nt\u025bk di b\u0254\u0301k", + "\u014bw\u00ed\u00ed ak\u01dd nt\u025bk di b\u025b\u0301\u025b" + ], + "SHORTDAY": [ + "s\u0254\u0301n", + "l\u01ddn", + "maa", + "m\u025bk", + "j\u01dd\u01dd", + "j\u00fam", + "sam" + ], + "SHORTMONTH": [ + "\u014b1", + "\u014b2", + "\u014b3", + "\u014b4", + "\u014b5", + "\u014b6", + "\u014b7", + "\u014b8", + "\u014b9", + "\u014b10", + "\u014b11", + "\u014b12" + ], + "STANDALONEMONTH": [ + "\u014bw\u00ed\u00ed a nt\u0254\u0301nt\u0254", + "\u014bw\u00ed\u00ed ak\u01dd b\u025b\u0301\u025b", + "\u014bw\u00ed\u00ed ak\u01dd r\u00e1\u00e1", + "\u014bw\u00ed\u00ed ak\u01dd nin", + "\u014bw\u00ed\u00ed ak\u01dd t\u00e1an", + "\u014bw\u00ed\u00ed ak\u01dd t\u00e1af\u0254k", + "\u014bw\u00ed\u00ed ak\u01dd t\u00e1ab\u025b\u025b", + "\u014bw\u00ed\u00ed ak\u01dd t\u00e1araa", + "\u014bw\u00ed\u00ed ak\u01dd t\u00e1anin", + "\u014bw\u00ed\u00ed ak\u01dd nt\u025bk", + "\u014bw\u00ed\u00ed ak\u01dd nt\u025bk di b\u0254\u0301k", + "\u014bw\u00ed\u00ed ak\u01dd nt\u025bk di b\u025b\u0301\u025b" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ksf", + "localeID": "ksf", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ksh-de.js b/1.6.6/i18n/angular-locale_ksh-de.js new file mode 100644 index 000000000..b38f41139 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ksh-de.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Uhr v\u00f6rmiddaachs", + "Uhr nommendaachs" + ], + "DAY": [ + "Sunndaach", + "Mohndaach", + "Dinnsdaach", + "Metwoch", + "Dunnersdaach", + "Friidaach", + "Samsdaach" + ], + "ERANAMES": [ + "v\u00fcr Krestos", + "noh Krestos" + ], + "ERAS": [ + "v. Chr.", + "n. Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Jannewa", + "F\u00e4browa", + "M\u00e4\u00e4z", + "Aprell", + "Mai", + "Juuni", + "Juuli", + "Oujo\u00df", + "Sept\u00e4mber", + "Oktohber", + "Nov\u00e4mber", + "Dez\u00e4mber" + ], + "SHORTDAY": [ + "Su.", + "Mo.", + "Di.", + "Me.", + "Du.", + "Fr.", + "Sa." + ], + "SHORTMONTH": [ + "Jan", + "F\u00e4b", + "M\u00e4z", + "Apr", + "Mai", + "Jun", + "Jul", + "Ouj", + "S\u00e4p", + "Okt", + "Nov", + "Dez" + ], + "STANDALONEMONTH": [ + "Jannewa", + "F\u00e4browa", + "M\u00e4\u00e4z", + "Aprell", + "Mai", + "Juuni", + "Juuli", + "Oujo\u00df", + "Sept\u00e4mber", + "Oktohber", + "Nov\u00e4mber", + "Dez\u00e4mber" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, 'd\u00e4' d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. MMM. y HH:mm:ss", + "mediumDate": "d. MMM. y", + "mediumTime": "HH:mm:ss", + "short": "d. M. y HH:mm", + "shortDate": "d. M. y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ksh-de", + "localeID": "ksh_DE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ksh.js b/1.6.6/i18n/angular-locale_ksh.js new file mode 100644 index 000000000..b6e38cb61 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ksh.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Uhr v\u00f6rmiddaachs", + "Uhr nommendaachs" + ], + "DAY": [ + "Sunndaach", + "Mohndaach", + "Dinnsdaach", + "Metwoch", + "Dunnersdaach", + "Friidaach", + "Samsdaach" + ], + "ERANAMES": [ + "v\u00fcr Krestos", + "noh Krestos" + ], + "ERAS": [ + "v. Chr.", + "n. Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Jannewa", + "F\u00e4browa", + "M\u00e4\u00e4z", + "Aprell", + "Mai", + "Juuni", + "Juuli", + "Oujo\u00df", + "Sept\u00e4mber", + "Oktohber", + "Nov\u00e4mber", + "Dez\u00e4mber" + ], + "SHORTDAY": [ + "Su.", + "Mo.", + "Di.", + "Me.", + "Du.", + "Fr.", + "Sa." + ], + "SHORTMONTH": [ + "Jan", + "F\u00e4b", + "M\u00e4z", + "Apr", + "Mai", + "Jun", + "Jul", + "Ouj", + "S\u00e4p", + "Okt", + "Nov", + "Dez" + ], + "STANDALONEMONTH": [ + "Jannewa", + "F\u00e4browa", + "M\u00e4\u00e4z", + "Aprell", + "Mai", + "Juuni", + "Juuli", + "Oujo\u00df", + "Sept\u00e4mber", + "Oktohber", + "Nov\u00e4mber", + "Dez\u00e4mber" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, 'd\u00e4' d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. MMM. y HH:mm:ss", + "mediumDate": "d. MMM. y", + "mediumTime": "HH:mm:ss", + "short": "d. M. y HH:mm", + "shortDate": "d. M. y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ksh", + "localeID": "ksh", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kw-gb.js b/1.6.6/i18n/angular-locale_kw-gb.js new file mode 100644 index 000000000..8aad7fc55 --- /dev/null +++ b/1.6.6/i18n/angular-locale_kw-gb.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "dy Sul", + "dy Lun", + "dy Meurth", + "dy Merher", + "dy Yow", + "dy Gwener", + "dy Sadorn" + ], + "ERANAMES": [ + "RC", + "AD" + ], + "ERAS": [ + "RC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "mis Genver", + "mis Hwevrer", + "mis Meurth", + "mis Ebrel", + "mis Me", + "mis Metheven", + "mis Gortheren", + "mis Est", + "mis Gwynngala", + "mis Hedra", + "mis Du", + "mis Kevardhu" + ], + "SHORTDAY": [ + "Sul", + "Lun", + "Mth", + "Mhr", + "Yow", + "Gwe", + "Sad" + ], + "SHORTMONTH": [ + "Gen", + "Hwe", + "Meu", + "Ebr", + "Me", + "Met", + "Gor", + "Est", + "Gwn", + "Hed", + "Du", + "Kev" + ], + "STANDALONEMONTH": [ + "mis Genver", + "mis Hwevrer", + "mis Meurth", + "mis Ebrel", + "mis Me", + "mis Metheven", + "mis Gortheren", + "mis Est", + "mis Gwynngala", + "mis Hedra", + "mis Du", + "mis Kevardhu" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "kw-gb", + "localeID": "kw_GB", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_kw.js b/1.6.6/i18n/angular-locale_kw.js new file mode 100644 index 000000000..2df471a71 --- /dev/null +++ b/1.6.6/i18n/angular-locale_kw.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "dy Sul", + "dy Lun", + "dy Meurth", + "dy Merher", + "dy Yow", + "dy Gwener", + "dy Sadorn" + ], + "ERANAMES": [ + "RC", + "AD" + ], + "ERAS": [ + "RC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "mis Genver", + "mis Hwevrer", + "mis Meurth", + "mis Ebrel", + "mis Me", + "mis Metheven", + "mis Gortheren", + "mis Est", + "mis Gwynngala", + "mis Hedra", + "mis Du", + "mis Kevardhu" + ], + "SHORTDAY": [ + "Sul", + "Lun", + "Mth", + "Mhr", + "Yow", + "Gwe", + "Sad" + ], + "SHORTMONTH": [ + "Gen", + "Hwe", + "Meu", + "Ebr", + "Me", + "Met", + "Gor", + "Est", + "Gwn", + "Hed", + "Du", + "Kev" + ], + "STANDALONEMONTH": [ + "mis Genver", + "mis Hwevrer", + "mis Meurth", + "mis Ebrel", + "mis Me", + "mis Metheven", + "mis Gortheren", + "mis Est", + "mis Gwynngala", + "mis Hedra", + "mis Du", + "mis Kevardhu" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "kw", + "localeID": "kw", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ky-kg.js b/1.6.6/i18n/angular-locale_ky-kg.js new file mode 100644 index 000000000..e79cd4ce0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ky-kg.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0442\u0430\u04a3\u043a\u044b", + "\u0442\u04af\u0448\u0442\u04e9\u043d \u043a\u0438\u0439\u0438\u043d\u043a\u0438" + ], + "DAY": [ + "\u0436\u0435\u043a\u0448\u0435\u043c\u0431\u0438", + "\u0434\u04af\u0439\u0448\u04e9\u043c\u0431\u04af", + "\u0448\u0435\u0439\u0448\u0435\u043c\u0431\u0438", + "\u0448\u0430\u0440\u0448\u0435\u043c\u0431\u0438", + "\u0431\u0435\u0439\u0448\u0435\u043c\u0431\u0438", + "\u0436\u0443\u043c\u0430", + "\u0438\u0448\u0435\u043c\u0431\u0438" + ], + "ERANAMES": [ + "\u0431\u0438\u0437\u0434\u0438\u043d \u0437\u0430\u043c\u0430\u043d\u0433\u0430 \u0447\u0435\u0439\u0438\u043d", + "\u0431\u0438\u0437\u0434\u0438\u043d \u0437\u0430\u043c\u0430\u043d" + ], + "ERAS": [ + "\u0431.\u0437.\u0447.", + "\u0431.\u0437." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044c", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044c", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0435\u043b\u044c", + "\u043c\u0430\u0439", + "\u0438\u044e\u043d\u044c", + "\u0438\u044e\u043b\u044c", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044c", + "\u043d\u043e\u044f\u0431\u0440\u044c", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044c" + ], + "SHORTDAY": [ + "\u0436\u0435\u043a.", + "\u0434\u04af\u0439.", + "\u0448\u0435\u0439\u0448.", + "\u0448\u0430\u0440\u0448.", + "\u0431\u0435\u0439\u0448.", + "\u0436\u0443\u043c\u0430", + "\u0438\u0448\u043c." + ], + "SHORTMONTH": [ + "\u044f\u043d\u0432.", + "\u0444\u0435\u0432.", + "\u043c\u0430\u0440.", + "\u0430\u043f\u0440.", + "\u043c\u0430\u0439", + "\u0438\u044e\u043d.", + "\u0438\u044e\u043b.", + "\u0430\u0432\u0433.", + "\u0441\u0435\u043d.", + "\u043e\u043a\u0442.", + "\u043d\u043e\u044f.", + "\u0434\u0435\u043a." + ], + "STANDALONEMONTH": [ + "\u042f\u043d\u0432\u0430\u0440\u044c", + "\u0424\u0435\u0432\u0440\u0430\u043b\u044c", + "\u041c\u0430\u0440\u0442", + "\u0410\u043f\u0440\u0435\u043b\u044c", + "\u041c\u0430\u0439", + "\u0418\u044e\u043d\u044c", + "\u0418\u044e\u043b\u044c", + "\u0410\u0432\u0433\u0443\u0441\u0442", + "\u0421\u0435\u043d\u0442\u044f\u0431\u0440\u044c", + "\u041e\u043a\u0442\u044f\u0431\u0440\u044c", + "\u041d\u043e\u044f\u0431\u0440\u044c", + "\u0414\u0435\u043a\u0430\u0431\u0440\u044c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y-'\u0436'., d-MMMM, EEEE", + "longDate": "y-'\u0436'., d-MMMM", + "medium": "y-'\u0436'., d-MMM HH:mm:ss", + "mediumDate": "y-'\u0436'., d-MMM", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "KGS", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ky-kg", + "localeID": "ky_KG", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ky.js b/1.6.6/i18n/angular-locale_ky.js new file mode 100644 index 000000000..5d0780e4f --- /dev/null +++ b/1.6.6/i18n/angular-locale_ky.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0442\u0430\u04a3\u043a\u044b", + "\u0442\u04af\u0448\u0442\u04e9\u043d \u043a\u0438\u0439\u0438\u043d\u043a\u0438" + ], + "DAY": [ + "\u0436\u0435\u043a\u0448\u0435\u043c\u0431\u0438", + "\u0434\u04af\u0439\u0448\u04e9\u043c\u0431\u04af", + "\u0448\u0435\u0439\u0448\u0435\u043c\u0431\u0438", + "\u0448\u0430\u0440\u0448\u0435\u043c\u0431\u0438", + "\u0431\u0435\u0439\u0448\u0435\u043c\u0431\u0438", + "\u0436\u0443\u043c\u0430", + "\u0438\u0448\u0435\u043c\u0431\u0438" + ], + "ERANAMES": [ + "\u0431\u0438\u0437\u0434\u0438\u043d \u0437\u0430\u043c\u0430\u043d\u0433\u0430 \u0447\u0435\u0439\u0438\u043d", + "\u0431\u0438\u0437\u0434\u0438\u043d \u0437\u0430\u043c\u0430\u043d" + ], + "ERAS": [ + "\u0431.\u0437.\u0447.", + "\u0431.\u0437." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044c", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044c", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0435\u043b\u044c", + "\u043c\u0430\u0439", + "\u0438\u044e\u043d\u044c", + "\u0438\u044e\u043b\u044c", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044c", + "\u043d\u043e\u044f\u0431\u0440\u044c", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044c" + ], + "SHORTDAY": [ + "\u0436\u0435\u043a.", + "\u0434\u04af\u0439.", + "\u0448\u0435\u0439\u0448.", + "\u0448\u0430\u0440\u0448.", + "\u0431\u0435\u0439\u0448.", + "\u0436\u0443\u043c\u0430", + "\u0438\u0448\u043c." + ], + "SHORTMONTH": [ + "\u044f\u043d\u0432.", + "\u0444\u0435\u0432.", + "\u043c\u0430\u0440.", + "\u0430\u043f\u0440.", + "\u043c\u0430\u0439", + "\u0438\u044e\u043d.", + "\u0438\u044e\u043b.", + "\u0430\u0432\u0433.", + "\u0441\u0435\u043d.", + "\u043e\u043a\u0442.", + "\u043d\u043e\u044f.", + "\u0434\u0435\u043a." + ], + "STANDALONEMONTH": [ + "\u042f\u043d\u0432\u0430\u0440\u044c", + "\u0424\u0435\u0432\u0440\u0430\u043b\u044c", + "\u041c\u0430\u0440\u0442", + "\u0410\u043f\u0440\u0435\u043b\u044c", + "\u041c\u0430\u0439", + "\u0418\u044e\u043d\u044c", + "\u0418\u044e\u043b\u044c", + "\u0410\u0432\u0433\u0443\u0441\u0442", + "\u0421\u0435\u043d\u0442\u044f\u0431\u0440\u044c", + "\u041e\u043a\u0442\u044f\u0431\u0440\u044c", + "\u041d\u043e\u044f\u0431\u0440\u044c", + "\u0414\u0435\u043a\u0430\u0431\u0440\u044c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y-'\u0436'., d-MMMM, EEEE", + "longDate": "y-'\u0436'., d-MMMM", + "medium": "y-'\u0436'., d-MMM HH:mm:ss", + "mediumDate": "y-'\u0436'., d-MMM", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "KGS", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ky", + "localeID": "ky", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_lag-tz.js b/1.6.6/i18n/angular-locale_lag-tz.js new file mode 100644 index 000000000..40c9a58d2 --- /dev/null +++ b/1.6.6/i18n/angular-locale_lag-tz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "TOO", + "MUU" + ], + "DAY": [ + "Jumap\u00ediri", + "Jumat\u00e1tu", + "Juma\u00edne", + "Jumat\u00e1ano", + "Alam\u00edisi", + "Ijum\u00e1a", + "Jumam\u00f3osi" + ], + "ERANAMES": [ + "K\u0268r\u0268sit\u0289 s\u0268 anavyaal", + "K\u0268r\u0268sit\u0289 akavyaalwe" + ], + "ERAS": [ + "KSA", + "KA" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "K\u0289f\u00fangat\u0268", + "K\u0289naan\u0268", + "K\u0289keenda", + "Kwiikumi", + "Kwiinyamb\u00e1la", + "Kwiidwaata", + "K\u0289m\u0289\u0289nch\u0268", + "K\u0289v\u0268\u0268r\u0268", + "K\u0289saat\u0289", + "Kwiinyi", + "K\u0289saano", + "K\u0289sasat\u0289" + ], + "SHORTDAY": [ + "P\u00edili", + "T\u00e1atu", + "\u00cdne", + "T\u00e1ano", + "Alh", + "Ijm", + "M\u00f3osi" + ], + "SHORTMONTH": [ + "F\u00fangat\u0268", + "Naan\u0268", + "Keenda", + "Ik\u00fami", + "Inyambala", + "Idwaata", + "M\u0289\u0289nch\u0268", + "V\u0268\u0268r\u0268", + "Saat\u0289", + "Inyi", + "Saano", + "Sasat\u0289" + ], + "STANDALONEMONTH": [ + "K\u0289f\u00fangat\u0268", + "K\u0289naan\u0268", + "K\u0289keenda", + "Kwiikumi", + "Kwiinyamb\u00e1la", + "Kwiidwaata", + "K\u0289m\u0289\u0289nch\u0268", + "K\u0289v\u0268\u0268r\u0268", + "K\u0289saat\u0289", + "Kwiinyi", + "K\u0289saano", + "K\u0289sasat\u0289" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "lag-tz", + "localeID": "lag_TZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_lag.js b/1.6.6/i18n/angular-locale_lag.js new file mode 100644 index 000000000..b17c57ad0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_lag.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "TOO", + "MUU" + ], + "DAY": [ + "Jumap\u00ediri", + "Jumat\u00e1tu", + "Juma\u00edne", + "Jumat\u00e1ano", + "Alam\u00edisi", + "Ijum\u00e1a", + "Jumam\u00f3osi" + ], + "ERANAMES": [ + "K\u0268r\u0268sit\u0289 s\u0268 anavyaal", + "K\u0268r\u0268sit\u0289 akavyaalwe" + ], + "ERAS": [ + "KSA", + "KA" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "K\u0289f\u00fangat\u0268", + "K\u0289naan\u0268", + "K\u0289keenda", + "Kwiikumi", + "Kwiinyamb\u00e1la", + "Kwiidwaata", + "K\u0289m\u0289\u0289nch\u0268", + "K\u0289v\u0268\u0268r\u0268", + "K\u0289saat\u0289", + "Kwiinyi", + "K\u0289saano", + "K\u0289sasat\u0289" + ], + "SHORTDAY": [ + "P\u00edili", + "T\u00e1atu", + "\u00cdne", + "T\u00e1ano", + "Alh", + "Ijm", + "M\u00f3osi" + ], + "SHORTMONTH": [ + "F\u00fangat\u0268", + "Naan\u0268", + "Keenda", + "Ik\u00fami", + "Inyambala", + "Idwaata", + "M\u0289\u0289nch\u0268", + "V\u0268\u0268r\u0268", + "Saat\u0289", + "Inyi", + "Saano", + "Sasat\u0289" + ], + "STANDALONEMONTH": [ + "K\u0289f\u00fangat\u0268", + "K\u0289naan\u0268", + "K\u0289keenda", + "Kwiikumi", + "Kwiinyamb\u00e1la", + "Kwiidwaata", + "K\u0289m\u0289\u0289nch\u0268", + "K\u0289v\u0268\u0268r\u0268", + "K\u0289saat\u0289", + "Kwiinyi", + "K\u0289saano", + "K\u0289sasat\u0289" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "lag", + "localeID": "lag", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_lb-lu.js b/1.6.6/i18n/angular-locale_lb-lu.js new file mode 100644 index 000000000..a55c1f030 --- /dev/null +++ b/1.6.6/i18n/angular-locale_lb-lu.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "moies", + "nom\u00ebttes" + ], + "DAY": [ + "Sonndeg", + "M\u00e9indeg", + "D\u00ebnschdeg", + "M\u00ebttwoch", + "Donneschdeg", + "Freideg", + "Samschdeg" + ], + "ERANAMES": [ + "v. Chr.", + "n. Chr." + ], + "ERAS": [ + "v. Chr.", + "n. Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januar", + "Februar", + "M\u00e4erz", + "Abr\u00ebll", + "Mee", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "SHORTDAY": [ + "Son.", + "M\u00e9i.", + "D\u00ebn.", + "M\u00ebt.", + "Don.", + "Fre.", + "Sam." + ], + "SHORTMONTH": [ + "Jan.", + "Feb.", + "M\u00e4e.", + "Abr.", + "Mee", + "Juni", + "Juli", + "Aug.", + "Sep.", + "Okt.", + "Nov.", + "Dez." + ], + "STANDALONEMONTH": [ + "Januar", + "Februar", + "M\u00e4erz", + "Abr\u00ebll", + "Mee", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. MMM y HH:mm:ss", + "mediumDate": "d. MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "lb-lu", + "localeID": "lb_LU", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_lb.js b/1.6.6/i18n/angular-locale_lb.js new file mode 100644 index 000000000..92fd0f938 --- /dev/null +++ b/1.6.6/i18n/angular-locale_lb.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "moies", + "nom\u00ebttes" + ], + "DAY": [ + "Sonndeg", + "M\u00e9indeg", + "D\u00ebnschdeg", + "M\u00ebttwoch", + "Donneschdeg", + "Freideg", + "Samschdeg" + ], + "ERANAMES": [ + "v. Chr.", + "n. Chr." + ], + "ERAS": [ + "v. Chr.", + "n. Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januar", + "Februar", + "M\u00e4erz", + "Abr\u00ebll", + "Mee", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "SHORTDAY": [ + "Son.", + "M\u00e9i.", + "D\u00ebn.", + "M\u00ebt.", + "Don.", + "Fre.", + "Sam." + ], + "SHORTMONTH": [ + "Jan.", + "Feb.", + "M\u00e4e.", + "Abr.", + "Mee", + "Juni", + "Juli", + "Aug.", + "Sep.", + "Okt.", + "Nov.", + "Dez." + ], + "STANDALONEMONTH": [ + "Januar", + "Februar", + "M\u00e4erz", + "Abr\u00ebll", + "Mee", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. MMM y HH:mm:ss", + "mediumDate": "d. MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "lb", + "localeID": "lb", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_lg-ug.js b/1.6.6/i18n/angular-locale_lg-ug.js new file mode 100644 index 000000000..c6b6b0e21 --- /dev/null +++ b/1.6.6/i18n/angular-locale_lg-ug.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sabbiiti", + "Balaza", + "Lwakubiri", + "Lwakusatu", + "Lwakuna", + "Lwakutaano", + "Lwamukaaga" + ], + "ERANAMES": [ + "Kulisito nga tannaza", + "Bukya Kulisito Azaal" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Janwaliyo", + "Febwaliyo", + "Marisi", + "Apuli", + "Maayi", + "Juuni", + "Julaayi", + "Agusito", + "Sebuttemba", + "Okitobba", + "Novemba", + "Desemba" + ], + "SHORTDAY": [ + "Sab", + "Bal", + "Lw2", + "Lw3", + "Lw4", + "Lw5", + "Lw6" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apu", + "Maa", + "Juu", + "Jul", + "Agu", + "Seb", + "Oki", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Janwaliyo", + "Febwaliyo", + "Marisi", + "Apuli", + "Maayi", + "Juuni", + "Julaayi", + "Agusito", + "Sebuttemba", + "Okitobba", + "Novemba", + "Desemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "UGX", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "lg-ug", + "localeID": "lg_UG", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_lg.js b/1.6.6/i18n/angular-locale_lg.js new file mode 100644 index 000000000..32e75c399 --- /dev/null +++ b/1.6.6/i18n/angular-locale_lg.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sabbiiti", + "Balaza", + "Lwakubiri", + "Lwakusatu", + "Lwakuna", + "Lwakutaano", + "Lwamukaaga" + ], + "ERANAMES": [ + "Kulisito nga tannaza", + "Bukya Kulisito Azaal" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Janwaliyo", + "Febwaliyo", + "Marisi", + "Apuli", + "Maayi", + "Juuni", + "Julaayi", + "Agusito", + "Sebuttemba", + "Okitobba", + "Novemba", + "Desemba" + ], + "SHORTDAY": [ + "Sab", + "Bal", + "Lw2", + "Lw3", + "Lw4", + "Lw5", + "Lw6" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apu", + "Maa", + "Juu", + "Jul", + "Agu", + "Seb", + "Oki", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Janwaliyo", + "Febwaliyo", + "Marisi", + "Apuli", + "Maayi", + "Juuni", + "Julaayi", + "Agusito", + "Sebuttemba", + "Okitobba", + "Novemba", + "Desemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "UGX", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "lg", + "localeID": "lg", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_lkt-us.js b/1.6.6/i18n/angular-locale_lkt-us.js new file mode 100644 index 000000000..5b25fb62a --- /dev/null +++ b/1.6.6/i18n/angular-locale_lkt-us.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "A\u014bp\u00e9tuwak\u021fa\u014b", + "A\u014bp\u00e9tuwa\u014b\u017ei", + "A\u014bp\u00e9tunu\u014bpa", + "A\u014bp\u00e9tuyamni", + "A\u014bp\u00e9tutopa", + "A\u014bp\u00e9tuzapta\u014b", + "Ow\u00e1\u014bgyu\u017ea\u017eapi" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Wi\u00f3the\u021fika W\u00ed", + "Thiy\u00f3\u021feyu\u014bka W\u00ed", + "I\u0161t\u00e1wi\u010dhayaza\u014b W\u00ed", + "P\u021fe\u017e\u00edt\u021fo W\u00ed", + "\u010cha\u014bw\u00e1pet\u021fo W\u00ed", + "W\u00edpazuk\u021fa-wa\u0161t\u00e9 W\u00ed", + "\u010cha\u014bp\u021f\u00e1sapa W\u00ed", + "Was\u00fat\u021fu\u014b W\u00ed", + "\u010cha\u014bw\u00e1pe\u01e7i W\u00ed", + "\u010cha\u014bw\u00e1pe-kasn\u00e1 W\u00ed", + "Wan\u00edyetu W\u00ed", + "T\u021fah\u00e9kap\u0161u\u014b W\u00ed" + ], + "SHORTDAY": [ + "A\u014bp\u00e9tuwak\u021fa\u014b", + "A\u014bp\u00e9tuwa\u014b\u017ei", + "A\u014bp\u00e9tunu\u014bpa", + "A\u014bp\u00e9tuyamni", + "A\u014bp\u00e9tutopa", + "A\u014bp\u00e9tuzapta\u014b", + "Ow\u00e1\u014bgyu\u017ea\u017eapi" + ], + "SHORTMONTH": [ + "Wi\u00f3the\u021fika W\u00ed", + "Thiy\u00f3\u021feyu\u014bka W\u00ed", + "I\u0161t\u00e1wi\u010dhayaza\u014b W\u00ed", + "P\u021fe\u017e\u00edt\u021fo W\u00ed", + "\u010cha\u014bw\u00e1pet\u021fo W\u00ed", + "W\u00edpazuk\u021fa-wa\u0161t\u00e9 W\u00ed", + "\u010cha\u014bp\u021f\u00e1sapa W\u00ed", + "Was\u00fat\u021fu\u014b W\u00ed", + "\u010cha\u014bw\u00e1pe\u01e7i W\u00ed", + "\u010cha\u014bw\u00e1pe-kasn\u00e1 W\u00ed", + "Wan\u00edyetu W\u00ed", + "T\u021fah\u00e9kap\u0161u\u014b W\u00ed" + ], + "STANDALONEMONTH": [ + "Wi\u00f3the\u021fika W\u00ed", + "Thiy\u00f3\u021feyu\u014bka W\u00ed", + "I\u0161t\u00e1wi\u010dhayaza\u014b W\u00ed", + "P\u021fe\u017e\u00edt\u021fo W\u00ed", + "\u010cha\u014bw\u00e1pet\u021fo W\u00ed", + "W\u00edpazuk\u021fa-wa\u0161t\u00e9 W\u00ed", + "\u010cha\u014bp\u021f\u00e1sapa W\u00ed", + "Was\u00fat\u021fu\u014b W\u00ed", + "\u010cha\u014bw\u00e1pe\u01e7i W\u00ed", + "\u010cha\u014bw\u00e1pe-kasn\u00e1 W\u00ed", + "Wan\u00edyetu W\u00ed", + "T\u021fah\u00e9kap\u0161u\u014b W\u00ed" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "lkt-us", + "localeID": "lkt_US", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_lkt.js b/1.6.6/i18n/angular-locale_lkt.js new file mode 100644 index 000000000..db9c59fd1 --- /dev/null +++ b/1.6.6/i18n/angular-locale_lkt.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "A\u014bp\u00e9tuwak\u021fa\u014b", + "A\u014bp\u00e9tuwa\u014b\u017ei", + "A\u014bp\u00e9tunu\u014bpa", + "A\u014bp\u00e9tuyamni", + "A\u014bp\u00e9tutopa", + "A\u014bp\u00e9tuzapta\u014b", + "Ow\u00e1\u014bgyu\u017ea\u017eapi" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Wi\u00f3the\u021fika W\u00ed", + "Thiy\u00f3\u021feyu\u014bka W\u00ed", + "I\u0161t\u00e1wi\u010dhayaza\u014b W\u00ed", + "P\u021fe\u017e\u00edt\u021fo W\u00ed", + "\u010cha\u014bw\u00e1pet\u021fo W\u00ed", + "W\u00edpazuk\u021fa-wa\u0161t\u00e9 W\u00ed", + "\u010cha\u014bp\u021f\u00e1sapa W\u00ed", + "Was\u00fat\u021fu\u014b W\u00ed", + "\u010cha\u014bw\u00e1pe\u01e7i W\u00ed", + "\u010cha\u014bw\u00e1pe-kasn\u00e1 W\u00ed", + "Wan\u00edyetu W\u00ed", + "T\u021fah\u00e9kap\u0161u\u014b W\u00ed" + ], + "SHORTDAY": [ + "A\u014bp\u00e9tuwak\u021fa\u014b", + "A\u014bp\u00e9tuwa\u014b\u017ei", + "A\u014bp\u00e9tunu\u014bpa", + "A\u014bp\u00e9tuyamni", + "A\u014bp\u00e9tutopa", + "A\u014bp\u00e9tuzapta\u014b", + "Ow\u00e1\u014bgyu\u017ea\u017eapi" + ], + "SHORTMONTH": [ + "Wi\u00f3the\u021fika W\u00ed", + "Thiy\u00f3\u021feyu\u014bka W\u00ed", + "I\u0161t\u00e1wi\u010dhayaza\u014b W\u00ed", + "P\u021fe\u017e\u00edt\u021fo W\u00ed", + "\u010cha\u014bw\u00e1pet\u021fo W\u00ed", + "W\u00edpazuk\u021fa-wa\u0161t\u00e9 W\u00ed", + "\u010cha\u014bp\u021f\u00e1sapa W\u00ed", + "Was\u00fat\u021fu\u014b W\u00ed", + "\u010cha\u014bw\u00e1pe\u01e7i W\u00ed", + "\u010cha\u014bw\u00e1pe-kasn\u00e1 W\u00ed", + "Wan\u00edyetu W\u00ed", + "T\u021fah\u00e9kap\u0161u\u014b W\u00ed" + ], + "STANDALONEMONTH": [ + "Wi\u00f3the\u021fika W\u00ed", + "Thiy\u00f3\u021feyu\u014bka W\u00ed", + "I\u0161t\u00e1wi\u010dhayaza\u014b W\u00ed", + "P\u021fe\u017e\u00edt\u021fo W\u00ed", + "\u010cha\u014bw\u00e1pet\u021fo W\u00ed", + "W\u00edpazuk\u021fa-wa\u0161t\u00e9 W\u00ed", + "\u010cha\u014bp\u021f\u00e1sapa W\u00ed", + "Was\u00fat\u021fu\u014b W\u00ed", + "\u010cha\u014bw\u00e1pe\u01e7i W\u00ed", + "\u010cha\u014bw\u00e1pe-kasn\u00e1 W\u00ed", + "Wan\u00edyetu W\u00ed", + "T\u021fah\u00e9kap\u0161u\u014b W\u00ed" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "lkt", + "localeID": "lkt", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ln-ao.js b/1.6.6/i18n/angular-locale_ln-ao.js new file mode 100644 index 000000000..a3bc1090f --- /dev/null +++ b/1.6.6/i18n/angular-locale_ln-ao.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "nt\u0254\u0301ng\u0254\u0301", + "mp\u00f3kwa" + ], + "DAY": [ + "eyenga", + "mok\u0254l\u0254 mwa yambo", + "mok\u0254l\u0254 mwa m\u00edbal\u00e9", + "mok\u0254l\u0254 mwa m\u00eds\u00e1to", + "mok\u0254l\u0254 ya m\u00edn\u00e9i", + "mok\u0254l\u0254 ya m\u00edt\u00e1no", + "mp\u0254\u0301s\u0254" + ], + "ERANAMES": [ + "Yambo ya Y\u00e9zu Kr\u00eds", + "Nsima ya Y\u00e9zu Kr\u00eds" + ], + "ERAS": [ + "lib\u00f3so ya", + "nsima ya Y" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "s\u00e1nz\u00e1 ya yambo", + "s\u00e1nz\u00e1 ya m\u00edbal\u00e9", + "s\u00e1nz\u00e1 ya m\u00eds\u00e1to", + "s\u00e1nz\u00e1 ya m\u00ednei", + "s\u00e1nz\u00e1 ya m\u00edt\u00e1no", + "s\u00e1nz\u00e1 ya mot\u00f3b\u00e1", + "s\u00e1nz\u00e1 ya nsambo", + "s\u00e1nz\u00e1 ya mwambe", + "s\u00e1nz\u00e1 ya libwa", + "s\u00e1nz\u00e1 ya z\u00f3mi", + "s\u00e1nz\u00e1 ya z\u00f3mi na m\u0254\u030ck\u0254\u0301", + "s\u00e1nz\u00e1 ya z\u00f3mi na m\u00edbal\u00e9" + ], + "SHORTDAY": [ + "eye", + "ybo", + "mbl", + "mst", + "min", + "mtn", + "mps" + ], + "SHORTMONTH": [ + "yan", + "fbl", + "msi", + "apl", + "mai", + "yun", + "yul", + "agt", + "stb", + "\u0254tb", + "nvb", + "dsb" + ], + "STANDALONEMONTH": [ + "s\u00e1nz\u00e1 ya yambo", + "s\u00e1nz\u00e1 ya m\u00edbal\u00e9", + "s\u00e1nz\u00e1 ya m\u00eds\u00e1to", + "s\u00e1nz\u00e1 ya m\u00ednei", + "s\u00e1nz\u00e1 ya m\u00edt\u00e1no", + "s\u00e1nz\u00e1 ya mot\u00f3b\u00e1", + "s\u00e1nz\u00e1 ya nsambo", + "s\u00e1nz\u00e1 ya mwambe", + "s\u00e1nz\u00e1 ya libwa", + "s\u00e1nz\u00e1 ya z\u00f3mi", + "s\u00e1nz\u00e1 ya z\u00f3mi na m\u0254\u030ck\u0254\u0301", + "s\u00e1nz\u00e1 ya z\u00f3mi na m\u00edbal\u00e9" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Kz", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ln-ao", + "localeID": "ln_AO", + "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ln-cd.js b/1.6.6/i18n/angular-locale_ln-cd.js new file mode 100644 index 000000000..d46aa944f --- /dev/null +++ b/1.6.6/i18n/angular-locale_ln-cd.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "nt\u0254\u0301ng\u0254\u0301", + "mp\u00f3kwa" + ], + "DAY": [ + "eyenga", + "mok\u0254l\u0254 mwa yambo", + "mok\u0254l\u0254 mwa m\u00edbal\u00e9", + "mok\u0254l\u0254 mwa m\u00eds\u00e1to", + "mok\u0254l\u0254 ya m\u00edn\u00e9i", + "mok\u0254l\u0254 ya m\u00edt\u00e1no", + "mp\u0254\u0301s\u0254" + ], + "ERANAMES": [ + "Yambo ya Y\u00e9zu Kr\u00eds", + "Nsima ya Y\u00e9zu Kr\u00eds" + ], + "ERAS": [ + "lib\u00f3so ya", + "nsima ya Y" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "s\u00e1nz\u00e1 ya yambo", + "s\u00e1nz\u00e1 ya m\u00edbal\u00e9", + "s\u00e1nz\u00e1 ya m\u00eds\u00e1to", + "s\u00e1nz\u00e1 ya m\u00ednei", + "s\u00e1nz\u00e1 ya m\u00edt\u00e1no", + "s\u00e1nz\u00e1 ya mot\u00f3b\u00e1", + "s\u00e1nz\u00e1 ya nsambo", + "s\u00e1nz\u00e1 ya mwambe", + "s\u00e1nz\u00e1 ya libwa", + "s\u00e1nz\u00e1 ya z\u00f3mi", + "s\u00e1nz\u00e1 ya z\u00f3mi na m\u0254\u030ck\u0254\u0301", + "s\u00e1nz\u00e1 ya z\u00f3mi na m\u00edbal\u00e9" + ], + "SHORTDAY": [ + "eye", + "ybo", + "mbl", + "mst", + "min", + "mtn", + "mps" + ], + "SHORTMONTH": [ + "yan", + "fbl", + "msi", + "apl", + "mai", + "yun", + "yul", + "agt", + "stb", + "\u0254tb", + "nvb", + "dsb" + ], + "STANDALONEMONTH": [ + "s\u00e1nz\u00e1 ya yambo", + "s\u00e1nz\u00e1 ya m\u00edbal\u00e9", + "s\u00e1nz\u00e1 ya m\u00eds\u00e1to", + "s\u00e1nz\u00e1 ya m\u00ednei", + "s\u00e1nz\u00e1 ya m\u00edt\u00e1no", + "s\u00e1nz\u00e1 ya mot\u00f3b\u00e1", + "s\u00e1nz\u00e1 ya nsambo", + "s\u00e1nz\u00e1 ya mwambe", + "s\u00e1nz\u00e1 ya libwa", + "s\u00e1nz\u00e1 ya z\u00f3mi", + "s\u00e1nz\u00e1 ya z\u00f3mi na m\u0254\u030ck\u0254\u0301", + "s\u00e1nz\u00e1 ya z\u00f3mi na m\u00edbal\u00e9" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FrCD", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ln-cd", + "localeID": "ln_CD", + "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ln-cf.js b/1.6.6/i18n/angular-locale_ln-cf.js new file mode 100644 index 000000000..9f2a70b3d --- /dev/null +++ b/1.6.6/i18n/angular-locale_ln-cf.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "nt\u0254\u0301ng\u0254\u0301", + "mp\u00f3kwa" + ], + "DAY": [ + "eyenga", + "mok\u0254l\u0254 mwa yambo", + "mok\u0254l\u0254 mwa m\u00edbal\u00e9", + "mok\u0254l\u0254 mwa m\u00eds\u00e1to", + "mok\u0254l\u0254 ya m\u00edn\u00e9i", + "mok\u0254l\u0254 ya m\u00edt\u00e1no", + "mp\u0254\u0301s\u0254" + ], + "ERANAMES": [ + "Yambo ya Y\u00e9zu Kr\u00eds", + "Nsima ya Y\u00e9zu Kr\u00eds" + ], + "ERAS": [ + "lib\u00f3so ya", + "nsima ya Y" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "s\u00e1nz\u00e1 ya yambo", + "s\u00e1nz\u00e1 ya m\u00edbal\u00e9", + "s\u00e1nz\u00e1 ya m\u00eds\u00e1to", + "s\u00e1nz\u00e1 ya m\u00ednei", + "s\u00e1nz\u00e1 ya m\u00edt\u00e1no", + "s\u00e1nz\u00e1 ya mot\u00f3b\u00e1", + "s\u00e1nz\u00e1 ya nsambo", + "s\u00e1nz\u00e1 ya mwambe", + "s\u00e1nz\u00e1 ya libwa", + "s\u00e1nz\u00e1 ya z\u00f3mi", + "s\u00e1nz\u00e1 ya z\u00f3mi na m\u0254\u030ck\u0254\u0301", + "s\u00e1nz\u00e1 ya z\u00f3mi na m\u00edbal\u00e9" + ], + "SHORTDAY": [ + "eye", + "ybo", + "mbl", + "mst", + "min", + "mtn", + "mps" + ], + "SHORTMONTH": [ + "yan", + "fbl", + "msi", + "apl", + "mai", + "yun", + "yul", + "agt", + "stb", + "\u0254tb", + "nvb", + "dsb" + ], + "STANDALONEMONTH": [ + "s\u00e1nz\u00e1 ya yambo", + "s\u00e1nz\u00e1 ya m\u00edbal\u00e9", + "s\u00e1nz\u00e1 ya m\u00eds\u00e1to", + "s\u00e1nz\u00e1 ya m\u00ednei", + "s\u00e1nz\u00e1 ya m\u00edt\u00e1no", + "s\u00e1nz\u00e1 ya mot\u00f3b\u00e1", + "s\u00e1nz\u00e1 ya nsambo", + "s\u00e1nz\u00e1 ya mwambe", + "s\u00e1nz\u00e1 ya libwa", + "s\u00e1nz\u00e1 ya z\u00f3mi", + "s\u00e1nz\u00e1 ya z\u00f3mi na m\u0254\u030ck\u0254\u0301", + "s\u00e1nz\u00e1 ya z\u00f3mi na m\u00edbal\u00e9" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ln-cf", + "localeID": "ln_CF", + "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ln-cg.js b/1.6.6/i18n/angular-locale_ln-cg.js new file mode 100644 index 000000000..4402f5e92 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ln-cg.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "nt\u0254\u0301ng\u0254\u0301", + "mp\u00f3kwa" + ], + "DAY": [ + "eyenga", + "mok\u0254l\u0254 mwa yambo", + "mok\u0254l\u0254 mwa m\u00edbal\u00e9", + "mok\u0254l\u0254 mwa m\u00eds\u00e1to", + "mok\u0254l\u0254 ya m\u00edn\u00e9i", + "mok\u0254l\u0254 ya m\u00edt\u00e1no", + "mp\u0254\u0301s\u0254" + ], + "ERANAMES": [ + "Yambo ya Y\u00e9zu Kr\u00eds", + "Nsima ya Y\u00e9zu Kr\u00eds" + ], + "ERAS": [ + "lib\u00f3so ya", + "nsima ya Y" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "s\u00e1nz\u00e1 ya yambo", + "s\u00e1nz\u00e1 ya m\u00edbal\u00e9", + "s\u00e1nz\u00e1 ya m\u00eds\u00e1to", + "s\u00e1nz\u00e1 ya m\u00ednei", + "s\u00e1nz\u00e1 ya m\u00edt\u00e1no", + "s\u00e1nz\u00e1 ya mot\u00f3b\u00e1", + "s\u00e1nz\u00e1 ya nsambo", + "s\u00e1nz\u00e1 ya mwambe", + "s\u00e1nz\u00e1 ya libwa", + "s\u00e1nz\u00e1 ya z\u00f3mi", + "s\u00e1nz\u00e1 ya z\u00f3mi na m\u0254\u030ck\u0254\u0301", + "s\u00e1nz\u00e1 ya z\u00f3mi na m\u00edbal\u00e9" + ], + "SHORTDAY": [ + "eye", + "ybo", + "mbl", + "mst", + "min", + "mtn", + "mps" + ], + "SHORTMONTH": [ + "yan", + "fbl", + "msi", + "apl", + "mai", + "yun", + "yul", + "agt", + "stb", + "\u0254tb", + "nvb", + "dsb" + ], + "STANDALONEMONTH": [ + "s\u00e1nz\u00e1 ya yambo", + "s\u00e1nz\u00e1 ya m\u00edbal\u00e9", + "s\u00e1nz\u00e1 ya m\u00eds\u00e1to", + "s\u00e1nz\u00e1 ya m\u00ednei", + "s\u00e1nz\u00e1 ya m\u00edt\u00e1no", + "s\u00e1nz\u00e1 ya mot\u00f3b\u00e1", + "s\u00e1nz\u00e1 ya nsambo", + "s\u00e1nz\u00e1 ya mwambe", + "s\u00e1nz\u00e1 ya libwa", + "s\u00e1nz\u00e1 ya z\u00f3mi", + "s\u00e1nz\u00e1 ya z\u00f3mi na m\u0254\u030ck\u0254\u0301", + "s\u00e1nz\u00e1 ya z\u00f3mi na m\u00edbal\u00e9" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ln-cg", + "localeID": "ln_CG", + "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ln.js b/1.6.6/i18n/angular-locale_ln.js new file mode 100644 index 000000000..63ad366ed --- /dev/null +++ b/1.6.6/i18n/angular-locale_ln.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "nt\u0254\u0301ng\u0254\u0301", + "mp\u00f3kwa" + ], + "DAY": [ + "eyenga", + "mok\u0254l\u0254 mwa yambo", + "mok\u0254l\u0254 mwa m\u00edbal\u00e9", + "mok\u0254l\u0254 mwa m\u00eds\u00e1to", + "mok\u0254l\u0254 ya m\u00edn\u00e9i", + "mok\u0254l\u0254 ya m\u00edt\u00e1no", + "mp\u0254\u0301s\u0254" + ], + "ERANAMES": [ + "Yambo ya Y\u00e9zu Kr\u00eds", + "Nsima ya Y\u00e9zu Kr\u00eds" + ], + "ERAS": [ + "lib\u00f3so ya", + "nsima ya Y" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "s\u00e1nz\u00e1 ya yambo", + "s\u00e1nz\u00e1 ya m\u00edbal\u00e9", + "s\u00e1nz\u00e1 ya m\u00eds\u00e1to", + "s\u00e1nz\u00e1 ya m\u00ednei", + "s\u00e1nz\u00e1 ya m\u00edt\u00e1no", + "s\u00e1nz\u00e1 ya mot\u00f3b\u00e1", + "s\u00e1nz\u00e1 ya nsambo", + "s\u00e1nz\u00e1 ya mwambe", + "s\u00e1nz\u00e1 ya libwa", + "s\u00e1nz\u00e1 ya z\u00f3mi", + "s\u00e1nz\u00e1 ya z\u00f3mi na m\u0254\u030ck\u0254\u0301", + "s\u00e1nz\u00e1 ya z\u00f3mi na m\u00edbal\u00e9" + ], + "SHORTDAY": [ + "eye", + "ybo", + "mbl", + "mst", + "min", + "mtn", + "mps" + ], + "SHORTMONTH": [ + "yan", + "fbl", + "msi", + "apl", + "mai", + "yun", + "yul", + "agt", + "stb", + "\u0254tb", + "nvb", + "dsb" + ], + "STANDALONEMONTH": [ + "s\u00e1nz\u00e1 ya yambo", + "s\u00e1nz\u00e1 ya m\u00edbal\u00e9", + "s\u00e1nz\u00e1 ya m\u00eds\u00e1to", + "s\u00e1nz\u00e1 ya m\u00ednei", + "s\u00e1nz\u00e1 ya m\u00edt\u00e1no", + "s\u00e1nz\u00e1 ya mot\u00f3b\u00e1", + "s\u00e1nz\u00e1 ya nsambo", + "s\u00e1nz\u00e1 ya mwambe", + "s\u00e1nz\u00e1 ya libwa", + "s\u00e1nz\u00e1 ya z\u00f3mi", + "s\u00e1nz\u00e1 ya z\u00f3mi na m\u0254\u030ck\u0254\u0301", + "s\u00e1nz\u00e1 ya z\u00f3mi na m\u00edbal\u00e9" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FrCD", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ln", + "localeID": "ln", + "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_lo-la.js b/1.6.6/i18n/angular-locale_lo-la.js new file mode 100644 index 000000000..192bf3785 --- /dev/null +++ b/1.6.6/i18n/angular-locale_lo-la.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0e81\u0ec8\u0ead\u0e99\u0e97\u0ec8\u0ebd\u0e87", + "\u0eab\u0ebc\u0eb1\u0e87\u0e97\u0ec8\u0ebd\u0e87" + ], + "DAY": [ + "\u0ea7\u0eb1\u0e99\u0ead\u0eb2\u0e97\u0eb4\u0e94", + "\u0ea7\u0eb1\u0e99\u0e88\u0eb1\u0e99", + "\u0ea7\u0eb1\u0e99\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99", + "\u0ea7\u0eb1\u0e99\u0e9e\u0eb8\u0e94", + "\u0ea7\u0eb1\u0e99\u0e9e\u0eb0\u0eab\u0eb1\u0e94", + "\u0ea7\u0eb1\u0e99\u0eaa\u0eb8\u0e81", + "\u0ea7\u0eb1\u0e99\u0ec0\u0eaa\u0ebb\u0eb2" + ], + "ERANAMES": [ + "\u0e81\u0ec8\u0ead\u0e99\u0e84\u0ea3\u0eb4\u0e94\u0eaa\u0eb1\u0e81\u0e81\u0eb0\u0ea5\u0eb2\u0e94", + "\u0e84\u0ea3\u0eb4\u0e94\u0eaa\u0eb1\u0e81\u0e81\u0eb0\u0ea5\u0eb2\u0e94" + ], + "ERAS": [ + "\u0e81\u0ec8\u0ead\u0e99 \u0e84.\u0eaa.", + "\u0e84.\u0eaa." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0ea1\u0eb1\u0e87\u0e81\u0ead\u0e99", + "\u0e81\u0eb8\u0ea1\u0e9e\u0eb2", + "\u0ea1\u0eb5\u0e99\u0eb2", + "\u0ec0\u0ea1\u0eaa\u0eb2", + "\u0e9e\u0eb6\u0e94\u0eaa\u0eb0\u0e9e\u0eb2", + "\u0ea1\u0eb4\u0e96\u0eb8\u0e99\u0eb2", + "\u0e81\u0ecd\u0ea5\u0eb0\u0e81\u0ebb\u0e94", + "\u0eaa\u0eb4\u0e87\u0eab\u0eb2", + "\u0e81\u0eb1\u0e99\u0e8d\u0eb2", + "\u0e95\u0eb8\u0ea5\u0eb2", + "\u0e9e\u0eb0\u0e88\u0eb4\u0e81", + "\u0e97\u0eb1\u0e99\u0ea7\u0eb2" + ], + "SHORTDAY": [ + "\u0ead\u0eb2\u0e97\u0eb4\u0e94", + "\u0e88\u0eb1\u0e99", + "\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99", + "\u0e9e\u0eb8\u0e94", + "\u0e9e\u0eb0\u0eab\u0eb1\u0e94", + "\u0eaa\u0eb8\u0e81", + "\u0ec0\u0eaa\u0ebb\u0eb2" + ], + "SHORTMONTH": [ + "\u0ea1.\u0e81.", + "\u0e81.\u0e9e.", + "\u0ea1.\u0e99.", + "\u0ea1.\u0eaa.", + "\u0e9e.\u0e9e.", + "\u0ea1\u0eb4.\u0e96.", + "\u0e81.\u0ea5.", + "\u0eaa.\u0eab.", + "\u0e81.\u0e8d.", + "\u0e95.\u0ea5.", + "\u0e9e.\u0e88.", + "\u0e97.\u0ea7." + ], + "STANDALONEMONTH": [ + "\u0ea1\u0eb1\u0e87\u0e81\u0ead\u0e99", + "\u0e81\u0eb8\u0ea1\u0e9e\u0eb2", + "\u0ea1\u0eb5\u0e99\u0eb2", + "\u0ec0\u0ea1\u0eaa\u0eb2", + "\u0e9e\u0eb6\u0e94\u0eaa\u0eb0\u0e9e\u0eb2", + "\u0ea1\u0eb4\u0e96\u0eb8\u0e99\u0eb2", + "\u0e81\u0ecd\u0ea5\u0eb0\u0e81\u0ebb\u0e94", + "\u0eaa\u0eb4\u0e87\u0eab\u0eb2", + "\u0e81\u0eb1\u0e99\u0e8d\u0eb2", + "\u0e95\u0eb8\u0ea5\u0eb2", + "\u0e9e\u0eb0\u0e88\u0eb4\u0e81", + "\u0e97\u0eb1\u0e99\u0ea7\u0eb2" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE \u0e97\u0eb5 d MMMM G y", + "longDate": "d MMMM y", + "medium": "d MMM y H:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "H:mm:ss", + "short": "d/M/y H:mm", + "shortDate": "d/M/y", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ad", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "\u00a4-", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "lo-la", + "localeID": "lo_LA", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_lo.js b/1.6.6/i18n/angular-locale_lo.js new file mode 100644 index 000000000..6d488d193 --- /dev/null +++ b/1.6.6/i18n/angular-locale_lo.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0e81\u0ec8\u0ead\u0e99\u0e97\u0ec8\u0ebd\u0e87", + "\u0eab\u0ebc\u0eb1\u0e87\u0e97\u0ec8\u0ebd\u0e87" + ], + "DAY": [ + "\u0ea7\u0eb1\u0e99\u0ead\u0eb2\u0e97\u0eb4\u0e94", + "\u0ea7\u0eb1\u0e99\u0e88\u0eb1\u0e99", + "\u0ea7\u0eb1\u0e99\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99", + "\u0ea7\u0eb1\u0e99\u0e9e\u0eb8\u0e94", + "\u0ea7\u0eb1\u0e99\u0e9e\u0eb0\u0eab\u0eb1\u0e94", + "\u0ea7\u0eb1\u0e99\u0eaa\u0eb8\u0e81", + "\u0ea7\u0eb1\u0e99\u0ec0\u0eaa\u0ebb\u0eb2" + ], + "ERANAMES": [ + "\u0e81\u0ec8\u0ead\u0e99\u0e84\u0ea3\u0eb4\u0e94\u0eaa\u0eb1\u0e81\u0e81\u0eb0\u0ea5\u0eb2\u0e94", + "\u0e84\u0ea3\u0eb4\u0e94\u0eaa\u0eb1\u0e81\u0e81\u0eb0\u0ea5\u0eb2\u0e94" + ], + "ERAS": [ + "\u0e81\u0ec8\u0ead\u0e99 \u0e84.\u0eaa.", + "\u0e84.\u0eaa." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0ea1\u0eb1\u0e87\u0e81\u0ead\u0e99", + "\u0e81\u0eb8\u0ea1\u0e9e\u0eb2", + "\u0ea1\u0eb5\u0e99\u0eb2", + "\u0ec0\u0ea1\u0eaa\u0eb2", + "\u0e9e\u0eb6\u0e94\u0eaa\u0eb0\u0e9e\u0eb2", + "\u0ea1\u0eb4\u0e96\u0eb8\u0e99\u0eb2", + "\u0e81\u0ecd\u0ea5\u0eb0\u0e81\u0ebb\u0e94", + "\u0eaa\u0eb4\u0e87\u0eab\u0eb2", + "\u0e81\u0eb1\u0e99\u0e8d\u0eb2", + "\u0e95\u0eb8\u0ea5\u0eb2", + "\u0e9e\u0eb0\u0e88\u0eb4\u0e81", + "\u0e97\u0eb1\u0e99\u0ea7\u0eb2" + ], + "SHORTDAY": [ + "\u0ead\u0eb2\u0e97\u0eb4\u0e94", + "\u0e88\u0eb1\u0e99", + "\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99", + "\u0e9e\u0eb8\u0e94", + "\u0e9e\u0eb0\u0eab\u0eb1\u0e94", + "\u0eaa\u0eb8\u0e81", + "\u0ec0\u0eaa\u0ebb\u0eb2" + ], + "SHORTMONTH": [ + "\u0ea1.\u0e81.", + "\u0e81.\u0e9e.", + "\u0ea1.\u0e99.", + "\u0ea1.\u0eaa.", + "\u0e9e.\u0e9e.", + "\u0ea1\u0eb4.\u0e96.", + "\u0e81.\u0ea5.", + "\u0eaa.\u0eab.", + "\u0e81.\u0e8d.", + "\u0e95.\u0ea5.", + "\u0e9e.\u0e88.", + "\u0e97.\u0ea7." + ], + "STANDALONEMONTH": [ + "\u0ea1\u0eb1\u0e87\u0e81\u0ead\u0e99", + "\u0e81\u0eb8\u0ea1\u0e9e\u0eb2", + "\u0ea1\u0eb5\u0e99\u0eb2", + "\u0ec0\u0ea1\u0eaa\u0eb2", + "\u0e9e\u0eb6\u0e94\u0eaa\u0eb0\u0e9e\u0eb2", + "\u0ea1\u0eb4\u0e96\u0eb8\u0e99\u0eb2", + "\u0e81\u0ecd\u0ea5\u0eb0\u0e81\u0ebb\u0e94", + "\u0eaa\u0eb4\u0e87\u0eab\u0eb2", + "\u0e81\u0eb1\u0e99\u0e8d\u0eb2", + "\u0e95\u0eb8\u0ea5\u0eb2", + "\u0e9e\u0eb0\u0e88\u0eb4\u0e81", + "\u0e97\u0eb1\u0e99\u0ea7\u0eb2" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE \u0e97\u0eb5 d MMMM G y", + "longDate": "d MMMM y", + "medium": "d MMM y H:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "H:mm:ss", + "short": "d/M/y H:mm", + "shortDate": "d/M/y", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ad", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u00a4-", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "lo", + "localeID": "lo", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_lrc-iq.js b/1.6.6/i18n/angular-locale_lrc-iq.js new file mode 100644 index 000000000..83a3a0c13 --- /dev/null +++ b/1.6.6/i18n/angular-locale_lrc-iq.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u062c\u0627\u0646\u06a4\u06cc\u06d5", + "\u0641\u0626\u06a4\u0631\u06cc\u06d5", + "\u0645\u0627\u0631\u0633", + "\u0622\u06a4\u0631\u06cc\u0644", + "\u0645\u0626\u06cc", + "\u062c\u0648\u0659\u0623\u0646", + "\u062c\u0648\u0659\u0644\u0627", + "\u0622\u06af\u0648\u0633\u062a", + "\u0633\u0626\u067e\u062a\u0627\u0645\u0631", + "\u0626\u0648\u06a9\u062a\u0648\u06a4\u0631", + "\u0646\u0648\u06a4\u0627\u0645\u0631", + "\u062f\u0626\u0633\u0627\u0645\u0631" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "\u062c\u0627\u0646\u06a4\u06cc\u06d5", + "\u0641\u0626\u06a4\u0631\u06cc\u06d5", + "\u0645\u0627\u0631\u0633", + "\u0622\u06a4\u0631\u06cc\u0644", + "\u0645\u0626\u06cc", + "\u062c\u0648\u0659\u0623\u0646", + "\u062c\u0648\u0659\u0644\u0627", + "\u0622\u06af\u0648\u0633\u062a", + "\u0633\u0626\u067e\u062a\u0627\u0645\u0631", + "\u0626\u0648\u06a9\u062a\u0648\u06a4\u0631", + "\u0646\u0648\u06a4\u0627\u0645\u0631", + "\u062f\u0626\u0633\u0627\u0645\u0631" + ], + "STANDALONEMONTH": [ + "\u062c\u0627\u0646\u06a4\u06cc\u06d5", + "\u0641\u0626\u06a4\u0631\u06cc\u06d5", + "\u0645\u0627\u0631\u0633", + "\u0622\u06a4\u0631\u06cc\u0644", + "\u0645\u0626\u06cc", + "\u062c\u0648\u0659\u0623\u0646", + "\u062c\u0648\u0659\u0644\u0627", + "\u0622\u06af\u0648\u0633\u062a", + "\u0633\u0626\u067e\u062a\u0627\u0645\u0631", + "\u0626\u0648\u06a9\u062a\u0648\u06a4\u0631", + "\u0646\u0648\u06a4\u0627\u0645\u0631", + "\u062f\u0626\u0633\u0627\u0645\u0631" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d h:mm:ss a", + "mediumDate": "y MMM d", + "mediumTime": "h:mm:ss a", + "short": "y-MM-dd h:mm a", + "shortDate": "y-MM-dd", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "lrc-iq", + "localeID": "lrc_IQ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_lrc-ir.js b/1.6.6/i18n/angular-locale_lrc-ir.js new file mode 100644 index 000000000..bf6e2e1d3 --- /dev/null +++ b/1.6.6/i18n/angular-locale_lrc-ir.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u062c\u0627\u0646\u06a4\u06cc\u06d5", + "\u0641\u0626\u06a4\u0631\u06cc\u06d5", + "\u0645\u0627\u0631\u0633", + "\u0622\u06a4\u0631\u06cc\u0644", + "\u0645\u0626\u06cc", + "\u062c\u0648\u0659\u0623\u0646", + "\u062c\u0648\u0659\u0644\u0627", + "\u0622\u06af\u0648\u0633\u062a", + "\u0633\u0626\u067e\u062a\u0627\u0645\u0631", + "\u0626\u0648\u06a9\u062a\u0648\u06a4\u0631", + "\u0646\u0648\u06a4\u0627\u0645\u0631", + "\u062f\u0626\u0633\u0627\u0645\u0631" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "\u062c\u0627\u0646\u06a4\u06cc\u06d5", + "\u0641\u0626\u06a4\u0631\u06cc\u06d5", + "\u0645\u0627\u0631\u0633", + "\u0622\u06a4\u0631\u06cc\u0644", + "\u0645\u0626\u06cc", + "\u062c\u0648\u0659\u0623\u0646", + "\u062c\u0648\u0659\u0644\u0627", + "\u0622\u06af\u0648\u0633\u062a", + "\u0633\u0626\u067e\u062a\u0627\u0645\u0631", + "\u0626\u0648\u06a9\u062a\u0648\u06a4\u0631", + "\u0646\u0648\u06a4\u0627\u0645\u0631", + "\u062f\u0626\u0633\u0627\u0645\u0631" + ], + "STANDALONEMONTH": [ + "\u062c\u0627\u0646\u06a4\u06cc\u06d5", + "\u0641\u0626\u06a4\u0631\u06cc\u06d5", + "\u0645\u0627\u0631\u0633", + "\u0622\u06a4\u0631\u06cc\u0644", + "\u0645\u0626\u06cc", + "\u062c\u0648\u0659\u0623\u0646", + "\u062c\u0648\u0659\u0644\u0627", + "\u0622\u06af\u0648\u0633\u062a", + "\u0633\u0626\u067e\u062a\u0627\u0645\u0631", + "\u0626\u0648\u06a9\u062a\u0648\u06a4\u0631", + "\u0646\u0648\u06a4\u0627\u0645\u0631", + "\u062f\u0626\u0633\u0627\u0645\u0631" + ], + "WEEKENDRANGE": [ + 4, + 4 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rial", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "lrc-ir", + "localeID": "lrc_IR", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_lrc.js b/1.6.6/i18n/angular-locale_lrc.js new file mode 100644 index 000000000..1351fbf3f --- /dev/null +++ b/1.6.6/i18n/angular-locale_lrc.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u062c\u0627\u0646\u06a4\u06cc\u06d5", + "\u0641\u0626\u06a4\u0631\u06cc\u06d5", + "\u0645\u0627\u0631\u0633", + "\u0622\u06a4\u0631\u06cc\u0644", + "\u0645\u0626\u06cc", + "\u062c\u0648\u0659\u0623\u0646", + "\u062c\u0648\u0659\u0644\u0627", + "\u0622\u06af\u0648\u0633\u062a", + "\u0633\u0626\u067e\u062a\u0627\u0645\u0631", + "\u0626\u0648\u06a9\u062a\u0648\u06a4\u0631", + "\u0646\u0648\u06a4\u0627\u0645\u0631", + "\u062f\u0626\u0633\u0627\u0645\u0631" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "\u062c\u0627\u0646\u06a4\u06cc\u06d5", + "\u0641\u0626\u06a4\u0631\u06cc\u06d5", + "\u0645\u0627\u0631\u0633", + "\u0622\u06a4\u0631\u06cc\u0644", + "\u0645\u0626\u06cc", + "\u062c\u0648\u0659\u0623\u0646", + "\u062c\u0648\u0659\u0644\u0627", + "\u0622\u06af\u0648\u0633\u062a", + "\u0633\u0626\u067e\u062a\u0627\u0645\u0631", + "\u0626\u0648\u06a9\u062a\u0648\u06a4\u0631", + "\u0646\u0648\u06a4\u0627\u0645\u0631", + "\u062f\u0626\u0633\u0627\u0645\u0631" + ], + "STANDALONEMONTH": [ + "\u062c\u0627\u0646\u06a4\u06cc\u06d5", + "\u0641\u0626\u06a4\u0631\u06cc\u06d5", + "\u0645\u0627\u0631\u0633", + "\u0622\u06a4\u0631\u06cc\u0644", + "\u0645\u0626\u06cc", + "\u062c\u0648\u0659\u0623\u0646", + "\u062c\u0648\u0659\u0644\u0627", + "\u0622\u06af\u0648\u0633\u062a", + "\u0633\u0626\u067e\u062a\u0627\u0645\u0631", + "\u0626\u0648\u06a9\u062a\u0648\u06a4\u0631", + "\u0646\u0648\u06a4\u0627\u0645\u0631", + "\u062f\u0626\u0633\u0627\u0645\u0631" + ], + "WEEKENDRANGE": [ + 4, + 4 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rial", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "lrc", + "localeID": "lrc", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_lt-lt.js b/1.6.6/i18n/angular-locale_lt-lt.js new file mode 100644 index 000000000..cd4d0e9a0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_lt-lt.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "prie\u0161piet", + "popiet" + ], + "DAY": [ + "sekmadienis", + "pirmadienis", + "antradienis", + "tre\u010diadienis", + "ketvirtadienis", + "penktadienis", + "\u0161e\u0161tadienis" + ], + "ERANAMES": [ + "prie\u0161 Krist\u0173", + "po Kristaus" + ], + "ERAS": [ + "pr. Kr.", + "po Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "sausio", + "vasario", + "kovo", + "baland\u017eio", + "gegu\u017e\u0117s", + "bir\u017eelio", + "liepos", + "rugpj\u016b\u010dio", + "rugs\u0117jo", + "spalio", + "lapkri\u010dio", + "gruod\u017eio" + ], + "SHORTDAY": [ + "sk", + "pr", + "an", + "tr", + "kt", + "pn", + "\u0161t" + ], + "SHORTMONTH": [ + "saus.", + "vas.", + "kov.", + "bal.", + "geg.", + "bir\u017e.", + "liep.", + "rugp.", + "rugs.", + "spal.", + "lapkr.", + "gruod." + ], + "STANDALONEMONTH": [ + "sausis", + "vasaris", + "kovas", + "balandis", + "gegu\u017e\u0117", + "bir\u017eelis", + "liepa", + "rugpj\u016btis", + "rugs\u0117jis", + "spalis", + "lapkritis", + "gruodis" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y 'm'. MMMM d 'd'., EEEE", + "longDate": "y 'm'. MMMM d 'd'.", + "medium": "y-MM-dd HH:mm:ss", + "mediumDate": "y-MM-dd", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "lt-lt", + "localeID": "lt_LT", + "pluralCat": function(n, opt_precision) { var vf = getVF(n, opt_precision); if (n % 10 == 1 && (n % 100 < 11 || n % 100 > 19)) { return PLURAL_CATEGORY.ONE; } if (n % 10 >= 2 && n % 10 <= 9 && (n % 100 < 11 || n % 100 > 19)) { return PLURAL_CATEGORY.FEW; } if (vf.f != 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_lt.js b/1.6.6/i18n/angular-locale_lt.js new file mode 100644 index 000000000..24cb31503 --- /dev/null +++ b/1.6.6/i18n/angular-locale_lt.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "prie\u0161piet", + "popiet" + ], + "DAY": [ + "sekmadienis", + "pirmadienis", + "antradienis", + "tre\u010diadienis", + "ketvirtadienis", + "penktadienis", + "\u0161e\u0161tadienis" + ], + "ERANAMES": [ + "prie\u0161 Krist\u0173", + "po Kristaus" + ], + "ERAS": [ + "pr. Kr.", + "po Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "sausio", + "vasario", + "kovo", + "baland\u017eio", + "gegu\u017e\u0117s", + "bir\u017eelio", + "liepos", + "rugpj\u016b\u010dio", + "rugs\u0117jo", + "spalio", + "lapkri\u010dio", + "gruod\u017eio" + ], + "SHORTDAY": [ + "sk", + "pr", + "an", + "tr", + "kt", + "pn", + "\u0161t" + ], + "SHORTMONTH": [ + "saus.", + "vas.", + "kov.", + "bal.", + "geg.", + "bir\u017e.", + "liep.", + "rugp.", + "rugs.", + "spal.", + "lapkr.", + "gruod." + ], + "STANDALONEMONTH": [ + "sausis", + "vasaris", + "kovas", + "balandis", + "gegu\u017e\u0117", + "bir\u017eelis", + "liepa", + "rugpj\u016btis", + "rugs\u0117jis", + "spalis", + "lapkritis", + "gruodis" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y 'm'. MMMM d 'd'., EEEE", + "longDate": "y 'm'. MMMM d 'd'.", + "medium": "y-MM-dd HH:mm:ss", + "mediumDate": "y-MM-dd", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "lt", + "localeID": "lt", + "pluralCat": function(n, opt_precision) { var vf = getVF(n, opt_precision); if (n % 10 == 1 && (n % 100 < 11 || n % 100 > 19)) { return PLURAL_CATEGORY.ONE; } if (n % 10 >= 2 && n % 10 <= 9 && (n % 100 < 11 || n % 100 > 19)) { return PLURAL_CATEGORY.FEW; } if (vf.f != 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_lu-cd.js b/1.6.6/i18n/angular-locale_lu-cd.js new file mode 100644 index 000000000..a274e9d81 --- /dev/null +++ b/1.6.6/i18n/angular-locale_lu-cd.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Dinda", + "Dilolo" + ], + "DAY": [ + "Lumingu", + "Nkodya", + "Nd\u00e0ay\u00e0", + "Ndang\u00f9", + "Nj\u00f2wa", + "Ng\u00f2vya", + "Lubingu" + ], + "ERANAMES": [ + "Kumpala kwa Yezu Kli", + "Kunyima kwa Yezu Kli" + ], + "ERAS": [ + "kmp. Y.K.", + "kny. Y. K." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Ciongo", + "L\u00f9ishi", + "Lus\u00f2lo", + "M\u00f9uy\u00e0", + "Lum\u00f9ng\u00f9l\u00f9", + "Lufuimi", + "Kab\u00e0l\u00e0sh\u00ecp\u00f9", + "L\u00f9sh\u00eck\u00e0", + "Lutongolo", + "Lung\u00f9di", + "Kasw\u00e8k\u00e8s\u00e8", + "Cisw\u00e0" + ], + "SHORTDAY": [ + "Lum", + "Nko", + "Ndy", + "Ndg", + "Njw", + "Ngv", + "Lub" + ], + "SHORTMONTH": [ + "Cio", + "Lui", + "Lus", + "Muu", + "Lum", + "Luf", + "Kab", + "Lush", + "Lut", + "Lun", + "Kas", + "Cis" + ], + "STANDALONEMONTH": [ + "Ciongo", + "L\u00f9ishi", + "Lus\u00f2lo", + "M\u00f9uy\u00e0", + "Lum\u00f9ng\u00f9l\u00f9", + "Lufuimi", + "Kab\u00e0l\u00e0sh\u00ecp\u00f9", + "L\u00f9sh\u00eck\u00e0", + "Lutongolo", + "Lung\u00f9di", + "Kasw\u00e8k\u00e8s\u00e8", + "Cisw\u00e0" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FrCD", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "lu-cd", + "localeID": "lu_CD", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_lu.js b/1.6.6/i18n/angular-locale_lu.js new file mode 100644 index 000000000..efbfd6a87 --- /dev/null +++ b/1.6.6/i18n/angular-locale_lu.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Dinda", + "Dilolo" + ], + "DAY": [ + "Lumingu", + "Nkodya", + "Nd\u00e0ay\u00e0", + "Ndang\u00f9", + "Nj\u00f2wa", + "Ng\u00f2vya", + "Lubingu" + ], + "ERANAMES": [ + "Kumpala kwa Yezu Kli", + "Kunyima kwa Yezu Kli" + ], + "ERAS": [ + "kmp. Y.K.", + "kny. Y. K." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Ciongo", + "L\u00f9ishi", + "Lus\u00f2lo", + "M\u00f9uy\u00e0", + "Lum\u00f9ng\u00f9l\u00f9", + "Lufuimi", + "Kab\u00e0l\u00e0sh\u00ecp\u00f9", + "L\u00f9sh\u00eck\u00e0", + "Lutongolo", + "Lung\u00f9di", + "Kasw\u00e8k\u00e8s\u00e8", + "Cisw\u00e0" + ], + "SHORTDAY": [ + "Lum", + "Nko", + "Ndy", + "Ndg", + "Njw", + "Ngv", + "Lub" + ], + "SHORTMONTH": [ + "Cio", + "Lui", + "Lus", + "Muu", + "Lum", + "Luf", + "Kab", + "Lush", + "Lut", + "Lun", + "Kas", + "Cis" + ], + "STANDALONEMONTH": [ + "Ciongo", + "L\u00f9ishi", + "Lus\u00f2lo", + "M\u00f9uy\u00e0", + "Lum\u00f9ng\u00f9l\u00f9", + "Lufuimi", + "Kab\u00e0l\u00e0sh\u00ecp\u00f9", + "L\u00f9sh\u00eck\u00e0", + "Lutongolo", + "Lung\u00f9di", + "Kasw\u00e8k\u00e8s\u00e8", + "Cisw\u00e0" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FrCD", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "lu", + "localeID": "lu", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_luo-ke.js b/1.6.6/i18n/angular-locale_luo-ke.js new file mode 100644 index 000000000..2a36813f4 --- /dev/null +++ b/1.6.6/i18n/angular-locale_luo-ke.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "OD", + "OT" + ], + "DAY": [ + "Jumapil", + "Wuok Tich", + "Tich Ariyo", + "Tich Adek", + "Tich Ang\u2019wen", + "Tich Abich", + "Ngeso" + ], + "ERANAMES": [ + "Kapok Kristo obiro", + "Ka Kristo osebiro" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Dwe mar Achiel", + "Dwe mar Ariyo", + "Dwe mar Adek", + "Dwe mar Ang\u2019wen", + "Dwe mar Abich", + "Dwe mar Auchiel", + "Dwe mar Abiriyo", + "Dwe mar Aboro", + "Dwe mar Ochiko", + "Dwe mar Apar", + "Dwe mar gi achiel", + "Dwe mar Apar gi ariyo" + ], + "SHORTDAY": [ + "JMP", + "WUT", + "TAR", + "TAD", + "TAN", + "TAB", + "NGS" + ], + "SHORTMONTH": [ + "DAC", + "DAR", + "DAD", + "DAN", + "DAH", + "DAU", + "DAO", + "DAB", + "DOC", + "DAP", + "DGI", + "DAG" + ], + "STANDALONEMONTH": [ + "Dwe mar Achiel", + "Dwe mar Ariyo", + "Dwe mar Adek", + "Dwe mar Ang\u2019wen", + "Dwe mar Abich", + "Dwe mar Auchiel", + "Dwe mar Abiriyo", + "Dwe mar Aboro", + "Dwe mar Ochiko", + "Dwe mar Apar", + "Dwe mar gi achiel", + "Dwe mar Apar gi ariyo" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "luo-ke", + "localeID": "luo_KE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_luo.js b/1.6.6/i18n/angular-locale_luo.js new file mode 100644 index 000000000..1ab5517db --- /dev/null +++ b/1.6.6/i18n/angular-locale_luo.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "OD", + "OT" + ], + "DAY": [ + "Jumapil", + "Wuok Tich", + "Tich Ariyo", + "Tich Adek", + "Tich Ang\u2019wen", + "Tich Abich", + "Ngeso" + ], + "ERANAMES": [ + "Kapok Kristo obiro", + "Ka Kristo osebiro" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Dwe mar Achiel", + "Dwe mar Ariyo", + "Dwe mar Adek", + "Dwe mar Ang\u2019wen", + "Dwe mar Abich", + "Dwe mar Auchiel", + "Dwe mar Abiriyo", + "Dwe mar Aboro", + "Dwe mar Ochiko", + "Dwe mar Apar", + "Dwe mar gi achiel", + "Dwe mar Apar gi ariyo" + ], + "SHORTDAY": [ + "JMP", + "WUT", + "TAR", + "TAD", + "TAN", + "TAB", + "NGS" + ], + "SHORTMONTH": [ + "DAC", + "DAR", + "DAD", + "DAN", + "DAH", + "DAU", + "DAO", + "DAB", + "DOC", + "DAP", + "DGI", + "DAG" + ], + "STANDALONEMONTH": [ + "Dwe mar Achiel", + "Dwe mar Ariyo", + "Dwe mar Adek", + "Dwe mar Ang\u2019wen", + "Dwe mar Abich", + "Dwe mar Auchiel", + "Dwe mar Abiriyo", + "Dwe mar Aboro", + "Dwe mar Ochiko", + "Dwe mar Apar", + "Dwe mar gi achiel", + "Dwe mar Apar gi ariyo" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "luo", + "localeID": "luo", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_luy-ke.js b/1.6.6/i18n/angular-locale_luy-ke.js new file mode 100644 index 000000000..59ccdbafe --- /dev/null +++ b/1.6.6/i18n/angular-locale_luy-ke.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "Jumapiri", + "Jumatatu", + "Jumanne", + "Jumatano", + "Murwa wa Kanne", + "Murwa wa Katano", + "Jumamosi" + ], + "ERANAMES": [ + "Imberi ya Kuuza Kwa", + "Muhiga Kuvita Kuuza" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Januari", + "Februari", + "Machi", + "Aprili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "SHORTDAY": [ + "J2", + "J3", + "J4", + "J5", + "Al", + "Ij", + "J1" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "Mei", + "Jun", + "Jul", + "Ago", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Machi", + "Aprili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u00a4-\u00a0", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "luy-ke", + "localeID": "luy_KE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_luy.js b/1.6.6/i18n/angular-locale_luy.js new file mode 100644 index 000000000..90735f358 --- /dev/null +++ b/1.6.6/i18n/angular-locale_luy.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "Jumapiri", + "Jumatatu", + "Jumanne", + "Jumatano", + "Murwa wa Kanne", + "Murwa wa Katano", + "Jumamosi" + ], + "ERANAMES": [ + "Imberi ya Kuuza Kwa", + "Muhiga Kuvita Kuuza" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Januari", + "Februari", + "Machi", + "Aprili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "SHORTDAY": [ + "J2", + "J3", + "J4", + "J5", + "Al", + "Ij", + "J1" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "Mei", + "Jun", + "Jul", + "Ago", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Machi", + "Aprili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u00a4-\u00a0", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "luy", + "localeID": "luy", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_lv-lv.js b/1.6.6/i18n/angular-locale_lv-lv.js new file mode 100644 index 000000000..e06a9225e --- /dev/null +++ b/1.6.6/i18n/angular-locale_lv-lv.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "priek\u0161pusdien\u0101", + "p\u0113cpusdien\u0101" + ], + "DAY": [ + "sv\u0113tdiena", + "pirmdiena", + "otrdiena", + "tre\u0161diena", + "ceturtdiena", + "piektdiena", + "sestdiena" + ], + "ERANAMES": [ + "pirms m\u016bsu \u0113ras", + "m\u016bsu \u0113r\u0101" + ], + "ERAS": [ + "p.m.\u0113.", + "m.\u0113." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janv\u0101ris", + "febru\u0101ris", + "marts", + "apr\u012blis", + "maijs", + "j\u016bnijs", + "j\u016blijs", + "augusts", + "septembris", + "oktobris", + "novembris", + "decembris" + ], + "SHORTDAY": [ + "sv\u0113td.", + "pirmd.", + "otrd.", + "tre\u0161d.", + "ceturtd.", + "piektd.", + "sestd." + ], + "SHORTMONTH": [ + "janv.", + "febr.", + "marts", + "apr.", + "maijs", + "j\u016bn.", + "j\u016bl.", + "aug.", + "sept.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "janv\u0101ris", + "febru\u0101ris", + "marts", + "apr\u012blis", + "maijs", + "j\u016bnijs", + "j\u016blijs", + "augusts", + "septembris", + "oktobris", + "novembris", + "decembris" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, y. 'gada' d. MMMM", + "longDate": "y. 'gada' d. MMMM", + "medium": "y. 'gada' d. MMM HH:mm:ss", + "mediumDate": "y. 'gada' d. MMM", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "lv-lv", + "localeID": "lv_LV", + "pluralCat": function(n, opt_precision) { var vf = getVF(n, opt_precision); if (n % 10 == 0 || n % 100 >= 11 && n % 100 <= 19 || vf.v == 2 && vf.f % 100 >= 11 && vf.f % 100 <= 19) { return PLURAL_CATEGORY.ZERO; } if (n % 10 == 1 && n % 100 != 11 || vf.v == 2 && vf.f % 10 == 1 && vf.f % 100 != 11 || vf.v != 2 && vf.f % 10 == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_lv.js b/1.6.6/i18n/angular-locale_lv.js new file mode 100644 index 000000000..9f5f3887d --- /dev/null +++ b/1.6.6/i18n/angular-locale_lv.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "priek\u0161pusdien\u0101", + "p\u0113cpusdien\u0101" + ], + "DAY": [ + "sv\u0113tdiena", + "pirmdiena", + "otrdiena", + "tre\u0161diena", + "ceturtdiena", + "piektdiena", + "sestdiena" + ], + "ERANAMES": [ + "pirms m\u016bsu \u0113ras", + "m\u016bsu \u0113r\u0101" + ], + "ERAS": [ + "p.m.\u0113.", + "m.\u0113." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janv\u0101ris", + "febru\u0101ris", + "marts", + "apr\u012blis", + "maijs", + "j\u016bnijs", + "j\u016blijs", + "augusts", + "septembris", + "oktobris", + "novembris", + "decembris" + ], + "SHORTDAY": [ + "sv\u0113td.", + "pirmd.", + "otrd.", + "tre\u0161d.", + "ceturtd.", + "piektd.", + "sestd." + ], + "SHORTMONTH": [ + "janv.", + "febr.", + "marts", + "apr.", + "maijs", + "j\u016bn.", + "j\u016bl.", + "aug.", + "sept.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "janv\u0101ris", + "febru\u0101ris", + "marts", + "apr\u012blis", + "maijs", + "j\u016bnijs", + "j\u016blijs", + "augusts", + "septembris", + "oktobris", + "novembris", + "decembris" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, y. 'gada' d. MMMM", + "longDate": "y. 'gada' d. MMMM", + "medium": "y. 'gada' d. MMM HH:mm:ss", + "mediumDate": "y. 'gada' d. MMM", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "lv", + "localeID": "lv", + "pluralCat": function(n, opt_precision) { var vf = getVF(n, opt_precision); if (n % 10 == 0 || n % 100 >= 11 && n % 100 <= 19 || vf.v == 2 && vf.f % 100 >= 11 && vf.f % 100 <= 19) { return PLURAL_CATEGORY.ZERO; } if (n % 10 == 1 && n % 100 != 11 || vf.v == 2 && vf.f % 10 == 1 && vf.f % 100 != 11 || vf.v != 2 && vf.f % 10 == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mas-ke.js b/1.6.6/i18n/angular-locale_mas-ke.js new file mode 100644 index 000000000..b16170298 --- /dev/null +++ b/1.6.6/i18n/angular-locale_mas-ke.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0190nkak\u025bny\u00e1", + "\u0190nd\u00e1m\u00e2" + ], + "DAY": [ + "Jumap\u00edl\u00ed", + "Jumat\u00e1tu", + "Jumane", + "Jumat\u00e1n\u0254", + "Ala\u00e1misi", + "Jum\u00e1a", + "Jumam\u00f3si" + ], + "ERANAMES": [ + "Me\u00edn\u014d Y\u025b\u0301s\u0289", + "E\u00edn\u014d Y\u025b\u0301s\u0289" + ], + "ERAS": [ + "MY", + "EY" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Oladal\u0289\u0301", + "Ar\u00e1t", + "\u0186\u025bn\u0268\u0301\u0254\u0268\u014b\u0254k", + "Olodoy\u00ed\u00f3r\u00ed\u00ea ink\u00f3k\u00fa\u00e2", + "Oloil\u00e9p\u016bny\u012b\u0113 ink\u00f3k\u00fa\u00e2", + "K\u00faj\u00fa\u0254r\u0254k", + "M\u00f3rus\u00e1sin", + "\u0186l\u0254\u0301\u0268\u0301b\u0254\u0301r\u00e1r\u025b", + "K\u00fash\u00een", + "Olg\u00edsan", + "P\u0289sh\u0289\u0301ka", + "Nt\u0289\u0301\u014b\u0289\u0301s" + ], + "SHORTDAY": [ + "Jpi", + "Jtt", + "Jnn", + "Jtn", + "Alh", + "Iju", + "Jmo" + ], + "SHORTMONTH": [ + "Dal", + "Ar\u00e1", + "\u0186\u025bn", + "Doy", + "L\u00e9p", + "Rok", + "S\u00e1s", + "B\u0254\u0301r", + "K\u00fas", + "G\u00eds", + "Sh\u0289\u0301", + "Nt\u0289\u0301" + ], + "STANDALONEMONTH": [ + "Oladal\u0289\u0301", + "Ar\u00e1t", + "\u0186\u025bn\u0268\u0301\u0254\u0268\u014b\u0254k", + "Olodoy\u00ed\u00f3r\u00ed\u00ea ink\u00f3k\u00fa\u00e2", + "Oloil\u00e9p\u016bny\u012b\u0113 ink\u00f3k\u00fa\u00e2", + "K\u00faj\u00fa\u0254r\u0254k", + "M\u00f3rus\u00e1sin", + "\u0186l\u0254\u0301\u0268\u0301b\u0254\u0301r\u00e1r\u025b", + "K\u00fash\u00een", + "Olg\u00edsan", + "P\u0289sh\u0289\u0301ka", + "Nt\u0289\u0301\u014b\u0289\u0301s" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "mas-ke", + "localeID": "mas_KE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mas-tz.js b/1.6.6/i18n/angular-locale_mas-tz.js new file mode 100644 index 000000000..2e7a42945 --- /dev/null +++ b/1.6.6/i18n/angular-locale_mas-tz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0190nkak\u025bny\u00e1", + "\u0190nd\u00e1m\u00e2" + ], + "DAY": [ + "Jumap\u00edl\u00ed", + "Jumat\u00e1tu", + "Jumane", + "Jumat\u00e1n\u0254", + "Ala\u00e1misi", + "Jum\u00e1a", + "Jumam\u00f3si" + ], + "ERANAMES": [ + "Me\u00edn\u014d Y\u025b\u0301s\u0289", + "E\u00edn\u014d Y\u025b\u0301s\u0289" + ], + "ERAS": [ + "MY", + "EY" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Oladal\u0289\u0301", + "Ar\u00e1t", + "\u0186\u025bn\u0268\u0301\u0254\u0268\u014b\u0254k", + "Olodoy\u00ed\u00f3r\u00ed\u00ea ink\u00f3k\u00fa\u00e2", + "Oloil\u00e9p\u016bny\u012b\u0113 ink\u00f3k\u00fa\u00e2", + "K\u00faj\u00fa\u0254r\u0254k", + "M\u00f3rus\u00e1sin", + "\u0186l\u0254\u0301\u0268\u0301b\u0254\u0301r\u00e1r\u025b", + "K\u00fash\u00een", + "Olg\u00edsan", + "P\u0289sh\u0289\u0301ka", + "Nt\u0289\u0301\u014b\u0289\u0301s" + ], + "SHORTDAY": [ + "Jpi", + "Jtt", + "Jnn", + "Jtn", + "Alh", + "Iju", + "Jmo" + ], + "SHORTMONTH": [ + "Dal", + "Ar\u00e1", + "\u0186\u025bn", + "Doy", + "L\u00e9p", + "Rok", + "S\u00e1s", + "B\u0254\u0301r", + "K\u00fas", + "G\u00eds", + "Sh\u0289\u0301", + "Nt\u0289\u0301" + ], + "STANDALONEMONTH": [ + "Oladal\u0289\u0301", + "Ar\u00e1t", + "\u0186\u025bn\u0268\u0301\u0254\u0268\u014b\u0254k", + "Olodoy\u00ed\u00f3r\u00ed\u00ea ink\u00f3k\u00fa\u00e2", + "Oloil\u00e9p\u016bny\u012b\u0113 ink\u00f3k\u00fa\u00e2", + "K\u00faj\u00fa\u0254r\u0254k", + "M\u00f3rus\u00e1sin", + "\u0186l\u0254\u0301\u0268\u0301b\u0254\u0301r\u00e1r\u025b", + "K\u00fash\u00een", + "Olg\u00edsan", + "P\u0289sh\u0289\u0301ka", + "Nt\u0289\u0301\u014b\u0289\u0301s" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "mas-tz", + "localeID": "mas_TZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mas.js b/1.6.6/i18n/angular-locale_mas.js new file mode 100644 index 000000000..44f41f774 --- /dev/null +++ b/1.6.6/i18n/angular-locale_mas.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0190nkak\u025bny\u00e1", + "\u0190nd\u00e1m\u00e2" + ], + "DAY": [ + "Jumap\u00edl\u00ed", + "Jumat\u00e1tu", + "Jumane", + "Jumat\u00e1n\u0254", + "Ala\u00e1misi", + "Jum\u00e1a", + "Jumam\u00f3si" + ], + "ERANAMES": [ + "Me\u00edn\u014d Y\u025b\u0301s\u0289", + "E\u00edn\u014d Y\u025b\u0301s\u0289" + ], + "ERAS": [ + "MY", + "EY" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Oladal\u0289\u0301", + "Ar\u00e1t", + "\u0186\u025bn\u0268\u0301\u0254\u0268\u014b\u0254k", + "Olodoy\u00ed\u00f3r\u00ed\u00ea ink\u00f3k\u00fa\u00e2", + "Oloil\u00e9p\u016bny\u012b\u0113 ink\u00f3k\u00fa\u00e2", + "K\u00faj\u00fa\u0254r\u0254k", + "M\u00f3rus\u00e1sin", + "\u0186l\u0254\u0301\u0268\u0301b\u0254\u0301r\u00e1r\u025b", + "K\u00fash\u00een", + "Olg\u00edsan", + "P\u0289sh\u0289\u0301ka", + "Nt\u0289\u0301\u014b\u0289\u0301s" + ], + "SHORTDAY": [ + "Jpi", + "Jtt", + "Jnn", + "Jtn", + "Alh", + "Iju", + "Jmo" + ], + "SHORTMONTH": [ + "Dal", + "Ar\u00e1", + "\u0186\u025bn", + "Doy", + "L\u00e9p", + "Rok", + "S\u00e1s", + "B\u0254\u0301r", + "K\u00fas", + "G\u00eds", + "Sh\u0289\u0301", + "Nt\u0289\u0301" + ], + "STANDALONEMONTH": [ + "Oladal\u0289\u0301", + "Ar\u00e1t", + "\u0186\u025bn\u0268\u0301\u0254\u0268\u014b\u0254k", + "Olodoy\u00ed\u00f3r\u00ed\u00ea ink\u00f3k\u00fa\u00e2", + "Oloil\u00e9p\u016bny\u012b\u0113 ink\u00f3k\u00fa\u00e2", + "K\u00faj\u00fa\u0254r\u0254k", + "M\u00f3rus\u00e1sin", + "\u0186l\u0254\u0301\u0268\u0301b\u0254\u0301r\u00e1r\u025b", + "K\u00fash\u00een", + "Olg\u00edsan", + "P\u0289sh\u0289\u0301ka", + "Nt\u0289\u0301\u014b\u0289\u0301s" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "mas", + "localeID": "mas", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mer-ke.js b/1.6.6/i18n/angular-locale_mer-ke.js new file mode 100644 index 000000000..d826ab034 --- /dev/null +++ b/1.6.6/i18n/angular-locale_mer-ke.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "R\u0168", + "\u0168G" + ], + "DAY": [ + "Kiumia", + "Muramuko", + "Wairi", + "Wethatu", + "Wena", + "Wetano", + "Jumamosi" + ], + "ERANAMES": [ + "Mbere ya Krist\u0169", + "Nyuma ya Krist\u0169" + ], + "ERAS": [ + "MK", + "NK" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Januar\u0129", + "Feburuar\u0129", + "Machi", + "\u0128pur\u0169", + "M\u0129\u0129", + "Njuni", + "Njura\u0129", + "Agasti", + "Septemba", + "Okt\u0169ba", + "Novemba", + "Dicemba" + ], + "SHORTDAY": [ + "KIU", + "MRA", + "WAI", + "WET", + "WEN", + "WTN", + "JUM" + ], + "SHORTMONTH": [ + "JAN", + "FEB", + "MAC", + "\u0128PU", + "M\u0128\u0128", + "NJU", + "NJR", + "AGA", + "SPT", + "OKT", + "NOV", + "DEC" + ], + "STANDALONEMONTH": [ + "Januar\u0129", + "Feburuar\u0129", + "Machi", + "\u0128pur\u0169", + "M\u0129\u0129", + "Njuni", + "Njura\u0129", + "Agasti", + "Septemba", + "Okt\u0169ba", + "Novemba", + "Dicemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "mer-ke", + "localeID": "mer_KE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mer.js b/1.6.6/i18n/angular-locale_mer.js new file mode 100644 index 000000000..22367fb78 --- /dev/null +++ b/1.6.6/i18n/angular-locale_mer.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "R\u0168", + "\u0168G" + ], + "DAY": [ + "Kiumia", + "Muramuko", + "Wairi", + "Wethatu", + "Wena", + "Wetano", + "Jumamosi" + ], + "ERANAMES": [ + "Mbere ya Krist\u0169", + "Nyuma ya Krist\u0169" + ], + "ERAS": [ + "MK", + "NK" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Januar\u0129", + "Feburuar\u0129", + "Machi", + "\u0128pur\u0169", + "M\u0129\u0129", + "Njuni", + "Njura\u0129", + "Agasti", + "Septemba", + "Okt\u0169ba", + "Novemba", + "Dicemba" + ], + "SHORTDAY": [ + "KIU", + "MRA", + "WAI", + "WET", + "WEN", + "WTN", + "JUM" + ], + "SHORTMONTH": [ + "JAN", + "FEB", + "MAC", + "\u0128PU", + "M\u0128\u0128", + "NJU", + "NJR", + "AGA", + "SPT", + "OKT", + "NOV", + "DEC" + ], + "STANDALONEMONTH": [ + "Januar\u0129", + "Feburuar\u0129", + "Machi", + "\u0128pur\u0169", + "M\u0129\u0129", + "Njuni", + "Njura\u0129", + "Agasti", + "Septemba", + "Okt\u0169ba", + "Novemba", + "Dicemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "mer", + "localeID": "mer", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mfe-mu.js b/1.6.6/i18n/angular-locale_mfe-mu.js new file mode 100644 index 000000000..4e158b0d7 --- /dev/null +++ b/1.6.6/i18n/angular-locale_mfe-mu.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimans", + "lindi", + "mardi", + "merkredi", + "zedi", + "vandredi", + "samdi" + ], + "ERANAMES": [ + "avan Zezi-Krist", + "apre Zezi-Krist" + ], + "ERAS": [ + "av. Z-K", + "ap. Z-K" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "zanvie", + "fevriye", + "mars", + "avril", + "me", + "zin", + "zilye", + "out", + "septam", + "oktob", + "novam", + "desam" + ], + "SHORTDAY": [ + "dim", + "lin", + "mar", + "mer", + "ze", + "van", + "sam" + ], + "SHORTMONTH": [ + "zan", + "fev", + "mar", + "avr", + "me", + "zin", + "zil", + "out", + "sep", + "okt", + "nov", + "des" + ], + "STANDALONEMONTH": [ + "zanvie", + "fevriye", + "mars", + "avril", + "me", + "zin", + "zilye", + "out", + "septam", + "oktob", + "novam", + "desam" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "MURs", + "DECIMAL_SEP": ".", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "mfe-mu", + "localeID": "mfe_MU", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mfe.js b/1.6.6/i18n/angular-locale_mfe.js new file mode 100644 index 000000000..e48e27bd3 --- /dev/null +++ b/1.6.6/i18n/angular-locale_mfe.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimans", + "lindi", + "mardi", + "merkredi", + "zedi", + "vandredi", + "samdi" + ], + "ERANAMES": [ + "avan Zezi-Krist", + "apre Zezi-Krist" + ], + "ERAS": [ + "av. Z-K", + "ap. Z-K" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "zanvie", + "fevriye", + "mars", + "avril", + "me", + "zin", + "zilye", + "out", + "septam", + "oktob", + "novam", + "desam" + ], + "SHORTDAY": [ + "dim", + "lin", + "mar", + "mer", + "ze", + "van", + "sam" + ], + "SHORTMONTH": [ + "zan", + "fev", + "mar", + "avr", + "me", + "zin", + "zil", + "out", + "sep", + "okt", + "nov", + "des" + ], + "STANDALONEMONTH": [ + "zanvie", + "fevriye", + "mars", + "avril", + "me", + "zin", + "zilye", + "out", + "septam", + "oktob", + "novam", + "desam" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "MURs", + "DECIMAL_SEP": ".", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "mfe", + "localeID": "mfe", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mg-mg.js b/1.6.6/i18n/angular-locale_mg-mg.js new file mode 100644 index 000000000..951c4e3ea --- /dev/null +++ b/1.6.6/i18n/angular-locale_mg-mg.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Alahady", + "Alatsinainy", + "Talata", + "Alarobia", + "Alakamisy", + "Zoma", + "Asabotsy" + ], + "ERANAMES": [ + "Alohan\u2019i JK", + "Aorian\u2019i JK" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Janoary", + "Febroary", + "Martsa", + "Aprily", + "Mey", + "Jona", + "Jolay", + "Aogositra", + "Septambra", + "Oktobra", + "Novambra", + "Desambra" + ], + "SHORTDAY": [ + "Alah", + "Alats", + "Tal", + "Alar", + "Alak", + "Zom", + "Asab" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "Mey", + "Jon", + "Jol", + "Aog", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Janoary", + "Febroary", + "Martsa", + "Aprily", + "Mey", + "Jona", + "Jolay", + "Aogositra", + "Septambra", + "Oktobra", + "Novambra", + "Desambra" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ar", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "mg-mg", + "localeID": "mg_MG", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mg.js b/1.6.6/i18n/angular-locale_mg.js new file mode 100644 index 000000000..bab587d1b --- /dev/null +++ b/1.6.6/i18n/angular-locale_mg.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Alahady", + "Alatsinainy", + "Talata", + "Alarobia", + "Alakamisy", + "Zoma", + "Asabotsy" + ], + "ERANAMES": [ + "Alohan\u2019i JK", + "Aorian\u2019i JK" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Janoary", + "Febroary", + "Martsa", + "Aprily", + "Mey", + "Jona", + "Jolay", + "Aogositra", + "Septambra", + "Oktobra", + "Novambra", + "Desambra" + ], + "SHORTDAY": [ + "Alah", + "Alats", + "Tal", + "Alar", + "Alak", + "Zom", + "Asab" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "Mey", + "Jon", + "Jol", + "Aog", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Janoary", + "Febroary", + "Martsa", + "Aprily", + "Mey", + "Jona", + "Jolay", + "Aogositra", + "Septambra", + "Oktobra", + "Novambra", + "Desambra" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ar", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "mg", + "localeID": "mg", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mgh-mz.js b/1.6.6/i18n/angular-locale_mgh-mz.js new file mode 100644 index 000000000..72ddab6da --- /dev/null +++ b/1.6.6/i18n/angular-locale_mgh-mz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "wichishu", + "mchochil\u2019l" + ], + "DAY": [ + "Sabato", + "Jumatatu", + "Jumanne", + "Jumatano", + "Arahamisi", + "Ijumaa", + "Jumamosi" + ], + "ERANAMES": [ + "Hinapiya yesu", + "Yopia yesu" + ], + "ERAS": [ + "HY", + "YY" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Mweri wo kwanza", + "Mweri wo unayeli", + "Mweri wo uneraru", + "Mweri wo unecheshe", + "Mweri wo unethanu", + "Mweri wo thanu na mocha", + "Mweri wo saba", + "Mweri wo nane", + "Mweri wo tisa", + "Mweri wo kumi", + "Mweri wo kumi na moja", + "Mweri wo kumi na yel\u2019li" + ], + "SHORTDAY": [ + "Sab", + "Jtt", + "Jnn", + "Jtn", + "Ara", + "Iju", + "Jmo" + ], + "SHORTMONTH": [ + "Kwa", + "Una", + "Rar", + "Che", + "Tha", + "Moc", + "Sab", + "Nan", + "Tis", + "Kum", + "Moj", + "Yel" + ], + "STANDALONEMONTH": [ + "Mweri wo kwanza", + "Mweri wo unayeli", + "Mweri wo uneraru", + "Mweri wo unecheshe", + "Mweri wo unethanu", + "Mweri wo thanu na mocha", + "Mweri wo saba", + "Mweri wo nane", + "Mweri wo tisa", + "Mweri wo kumi", + "Mweri wo kumi na moja", + "Mweri wo kumi na yel\u2019li" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "MTn", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "mgh-mz", + "localeID": "mgh_MZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mgh.js b/1.6.6/i18n/angular-locale_mgh.js new file mode 100644 index 000000000..3c34989ae --- /dev/null +++ b/1.6.6/i18n/angular-locale_mgh.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "wichishu", + "mchochil\u2019l" + ], + "DAY": [ + "Sabato", + "Jumatatu", + "Jumanne", + "Jumatano", + "Arahamisi", + "Ijumaa", + "Jumamosi" + ], + "ERANAMES": [ + "Hinapiya yesu", + "Yopia yesu" + ], + "ERAS": [ + "HY", + "YY" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Mweri wo kwanza", + "Mweri wo unayeli", + "Mweri wo uneraru", + "Mweri wo unecheshe", + "Mweri wo unethanu", + "Mweri wo thanu na mocha", + "Mweri wo saba", + "Mweri wo nane", + "Mweri wo tisa", + "Mweri wo kumi", + "Mweri wo kumi na moja", + "Mweri wo kumi na yel\u2019li" + ], + "SHORTDAY": [ + "Sab", + "Jtt", + "Jnn", + "Jtn", + "Ara", + "Iju", + "Jmo" + ], + "SHORTMONTH": [ + "Kwa", + "Una", + "Rar", + "Che", + "Tha", + "Moc", + "Sab", + "Nan", + "Tis", + "Kum", + "Moj", + "Yel" + ], + "STANDALONEMONTH": [ + "Mweri wo kwanza", + "Mweri wo unayeli", + "Mweri wo uneraru", + "Mweri wo unecheshe", + "Mweri wo unethanu", + "Mweri wo thanu na mocha", + "Mweri wo saba", + "Mweri wo nane", + "Mweri wo tisa", + "Mweri wo kumi", + "Mweri wo kumi na moja", + "Mweri wo kumi na yel\u2019li" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "MTn", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "mgh", + "localeID": "mgh", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mgo-cm.js b/1.6.6/i18n/angular-locale_mgo-cm.js new file mode 100644 index 000000000..f1f4cf4c9 --- /dev/null +++ b/1.6.6/i18n/angular-locale_mgo-cm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Aneg 1", + "Aneg 2", + "Aneg 3", + "Aneg 4", + "Aneg 5", + "Aneg 6", + "Aneg 7" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "im\u0259g mbegtug", + "imeg \u00e0b\u00f9b\u00ec", + "imeg mb\u0259\u014bchubi", + "im\u0259g ngw\u0259\u0300t", + "im\u0259g fog", + "im\u0259g ichiib\u0254d", + "im\u0259g \u00e0d\u00f9mb\u0259\u0300\u014b", + "im\u0259g ichika", + "im\u0259g kud", + "im\u0259g t\u00e8si\u02bce", + "im\u0259g z\u00f2", + "im\u0259g krizmed" + ], + "SHORTDAY": [ + "Aneg 1", + "Aneg 2", + "Aneg 3", + "Aneg 4", + "Aneg 5", + "Aneg 6", + "Aneg 7" + ], + "SHORTMONTH": [ + "mbegtug", + "imeg \u00e0b\u00f9b\u00ec", + "imeg mb\u0259\u014bchubi", + "im\u0259g ngw\u0259\u0300t", + "im\u0259g fog", + "im\u0259g ichiib\u0254d", + "im\u0259g \u00e0d\u00f9mb\u0259\u0300\u014b", + "im\u0259g ichika", + "im\u0259g kud", + "im\u0259g t\u00e8si\u02bce", + "im\u0259g z\u00f2", + "im\u0259g krizmed" + ], + "STANDALONEMONTH": [ + "im\u0259g mbegtug", + "imeg \u00e0b\u00f9b\u00ec", + "imeg mb\u0259\u014bchubi", + "im\u0259g ngw\u0259\u0300t", + "im\u0259g fog", + "im\u0259g ichiib\u0254d", + "im\u0259g \u00e0d\u00f9mb\u0259\u0300\u014b", + "im\u0259g ichika", + "im\u0259g kud", + "im\u0259g t\u00e8si\u02bce", + "im\u0259g z\u00f2", + "im\u0259g krizmed" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, y MMMM dd", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "mgo-cm", + "localeID": "mgo_CM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mgo.js b/1.6.6/i18n/angular-locale_mgo.js new file mode 100644 index 000000000..23ab0b1e5 --- /dev/null +++ b/1.6.6/i18n/angular-locale_mgo.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Aneg 1", + "Aneg 2", + "Aneg 3", + "Aneg 4", + "Aneg 5", + "Aneg 6", + "Aneg 7" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "im\u0259g mbegtug", + "imeg \u00e0b\u00f9b\u00ec", + "imeg mb\u0259\u014bchubi", + "im\u0259g ngw\u0259\u0300t", + "im\u0259g fog", + "im\u0259g ichiib\u0254d", + "im\u0259g \u00e0d\u00f9mb\u0259\u0300\u014b", + "im\u0259g ichika", + "im\u0259g kud", + "im\u0259g t\u00e8si\u02bce", + "im\u0259g z\u00f2", + "im\u0259g krizmed" + ], + "SHORTDAY": [ + "Aneg 1", + "Aneg 2", + "Aneg 3", + "Aneg 4", + "Aneg 5", + "Aneg 6", + "Aneg 7" + ], + "SHORTMONTH": [ + "mbegtug", + "imeg \u00e0b\u00f9b\u00ec", + "imeg mb\u0259\u014bchubi", + "im\u0259g ngw\u0259\u0300t", + "im\u0259g fog", + "im\u0259g ichiib\u0254d", + "im\u0259g \u00e0d\u00f9mb\u0259\u0300\u014b", + "im\u0259g ichika", + "im\u0259g kud", + "im\u0259g t\u00e8si\u02bce", + "im\u0259g z\u00f2", + "im\u0259g krizmed" + ], + "STANDALONEMONTH": [ + "im\u0259g mbegtug", + "imeg \u00e0b\u00f9b\u00ec", + "imeg mb\u0259\u014bchubi", + "im\u0259g ngw\u0259\u0300t", + "im\u0259g fog", + "im\u0259g ichiib\u0254d", + "im\u0259g \u00e0d\u00f9mb\u0259\u0300\u014b", + "im\u0259g ichika", + "im\u0259g kud", + "im\u0259g t\u00e8si\u02bce", + "im\u0259g z\u00f2", + "im\u0259g krizmed" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, y MMMM dd", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "mgo", + "localeID": "mgo", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mk-mk.js b/1.6.6/i18n/angular-locale_mk-mk.js new file mode 100644 index 000000000..0e211176d --- /dev/null +++ b/1.6.6/i18n/angular-locale_mk-mk.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u043f\u0440\u0435\u0442\u043f\u043b\u0430\u0434\u043d\u0435", + "\u043f\u043e\u043f\u043b\u0430\u0434\u043d\u0435" + ], + "DAY": [ + "\u043d\u0435\u0434\u0435\u043b\u0430", + "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a", + "\u0432\u0442\u043e\u0440\u043d\u0438\u043a", + "\u0441\u0440\u0435\u0434\u0430", + "\u0447\u0435\u0442\u0432\u0440\u0442\u043e\u043a", + "\u043f\u0435\u0442\u043e\u043a", + "\u0441\u0430\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u043f\u0440\u0435\u0434 \u043d\u0430\u0448\u0430\u0442\u0430 \u0435\u0440\u0430", + "\u043e\u0434 \u043d\u0430\u0448\u0430\u0442\u0430 \u0435\u0440\u0430" + ], + "ERAS": [ + "\u043f\u0440.\u043d.\u0435.", + "\u043d.\u0435." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0458\u0430\u043d\u0443\u0430\u0440\u0438", + "\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d\u0438", + "\u0458\u0443\u043b\u0438", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438", + "\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438", + "\u043d\u043e\u0435\u043c\u0432\u0440\u0438", + "\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438" + ], + "SHORTDAY": [ + "\u043d\u0435\u0434.", + "\u043f\u043e\u043d.", + "\u0432\u0442.", + "\u0441\u0440\u0435.", + "\u0447\u0435\u0442.", + "\u043f\u0435\u0442.", + "\u0441\u0430\u0431." + ], + "SHORTMONTH": [ + "\u0458\u0430\u043d.", + "\u0444\u0435\u0432.", + "\u043c\u0430\u0440.", + "\u0430\u043f\u0440.", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d.", + "\u0458\u0443\u043b.", + "\u0430\u0432\u0433.", + "\u0441\u0435\u043f\u0442.", + "\u043e\u043a\u0442.", + "\u043d\u043e\u0435\u043c.", + "\u0434\u0435\u043a." + ], + "STANDALONEMONTH": [ + "\u0458\u0430\u043d\u0443\u0430\u0440\u0438", + "\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d\u0438", + "\u0458\u0443\u043b\u0438", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438", + "\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438", + "\u043d\u043e\u0435\u043c\u0432\u0440\u0438", + "\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd MMMM y", + "longDate": "dd MMMM y", + "medium": "dd.M.y HH:mm:ss", + "mediumDate": "dd.M.y", + "mediumTime": "HH:mm:ss", + "short": "dd.M.yy HH:mm", + "shortDate": "dd.M.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "mk-mk", + "localeID": "mk_MK", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 || vf.f % 10 == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mk.js b/1.6.6/i18n/angular-locale_mk.js new file mode 100644 index 000000000..7437a24e8 --- /dev/null +++ b/1.6.6/i18n/angular-locale_mk.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u043f\u0440\u0435\u0442\u043f\u043b\u0430\u0434\u043d\u0435", + "\u043f\u043e\u043f\u043b\u0430\u0434\u043d\u0435" + ], + "DAY": [ + "\u043d\u0435\u0434\u0435\u043b\u0430", + "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a", + "\u0432\u0442\u043e\u0440\u043d\u0438\u043a", + "\u0441\u0440\u0435\u0434\u0430", + "\u0447\u0435\u0442\u0432\u0440\u0442\u043e\u043a", + "\u043f\u0435\u0442\u043e\u043a", + "\u0441\u0430\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u043f\u0440\u0435\u0434 \u043d\u0430\u0448\u0430\u0442\u0430 \u0435\u0440\u0430", + "\u043e\u0434 \u043d\u0430\u0448\u0430\u0442\u0430 \u0435\u0440\u0430" + ], + "ERAS": [ + "\u043f\u0440.\u043d.\u0435.", + "\u043d.\u0435." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0458\u0430\u043d\u0443\u0430\u0440\u0438", + "\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d\u0438", + "\u0458\u0443\u043b\u0438", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438", + "\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438", + "\u043d\u043e\u0435\u043c\u0432\u0440\u0438", + "\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438" + ], + "SHORTDAY": [ + "\u043d\u0435\u0434.", + "\u043f\u043e\u043d.", + "\u0432\u0442.", + "\u0441\u0440\u0435.", + "\u0447\u0435\u0442.", + "\u043f\u0435\u0442.", + "\u0441\u0430\u0431." + ], + "SHORTMONTH": [ + "\u0458\u0430\u043d.", + "\u0444\u0435\u0432.", + "\u043c\u0430\u0440.", + "\u0430\u043f\u0440.", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d.", + "\u0458\u0443\u043b.", + "\u0430\u0432\u0433.", + "\u0441\u0435\u043f\u0442.", + "\u043e\u043a\u0442.", + "\u043d\u043e\u0435\u043c.", + "\u0434\u0435\u043a." + ], + "STANDALONEMONTH": [ + "\u0458\u0430\u043d\u0443\u0430\u0440\u0438", + "\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d\u0438", + "\u0458\u0443\u043b\u0438", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438", + "\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438", + "\u043d\u043e\u0435\u043c\u0432\u0440\u0438", + "\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd MMMM y", + "longDate": "dd MMMM y", + "medium": "dd.M.y HH:mm:ss", + "mediumDate": "dd.M.y", + "mediumTime": "HH:mm:ss", + "short": "dd.M.yy HH:mm", + "shortDate": "dd.M.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "mk", + "localeID": "mk", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 || vf.f % 10 == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ml-in.js b/1.6.6/i18n/angular-locale_ml-in.js new file mode 100644 index 000000000..2ad814ffc --- /dev/null +++ b/1.6.6/i18n/angular-locale_ml-in.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u0d1e\u0d3e\u0d2f\u0d31\u0d3e\u0d34\u0d4d\u200c\u0d1a", + "\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d33\u0d3e\u0d34\u0d4d\u200c\u0d1a", + "\u0d1a\u0d4a\u0d35\u0d4d\u0d35\u0d3e\u0d34\u0d4d\u0d1a", + "\u0d2c\u0d41\u0d27\u0d28\u0d3e\u0d34\u0d4d\u200c\u0d1a", + "\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d3e\u0d34\u0d4d\u200c\u0d1a", + "\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u200c\u0d1a", + "\u0d36\u0d28\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u200c\u0d1a" + ], + "ERANAMES": [ + "\u0d15\u0d4d\u0d30\u0d3f\u0d38\u0d4d\u200c\u0d24\u0d41\u0d35\u0d3f\u0d28\u0d4d \u0d2e\u0d41\u0d2e\u0d4d\u0d2a\u0d4d", + "\u0d06\u0d28\u0d4d\u0d28\u0d4b \u0d21\u0d4a\u0d2e\u0d3f\u0d28\u0d3f" + ], + "ERAS": [ + "\u0d15\u0d4d\u0d30\u0d3f.\u0d2e\u0d41.", + "\u0d0e\u0d21\u0d3f" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0d1c\u0d28\u0d41\u0d35\u0d30\u0d3f", + "\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41\u0d35\u0d30\u0d3f", + "\u0d2e\u0d3e\u0d7c\u0d1a\u0d4d\u0d1a\u0d4d", + "\u0d0f\u0d2a\u0d4d\u0d30\u0d3f\u0d7d", + "\u0d2e\u0d47\u0d2f\u0d4d", + "\u0d1c\u0d42\u0d7a", + "\u0d1c\u0d42\u0d32\u0d48", + "\u0d13\u0d17\u0d38\u0d4d\u0d31\u0d4d\u0d31\u0d4d", + "\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31\u0d02\u0d2c\u0d7c", + "\u0d12\u0d15\u0d4d\u200c\u0d1f\u0d4b\u0d2c\u0d7c", + "\u0d28\u0d35\u0d02\u0d2c\u0d7c", + "\u0d21\u0d3f\u0d38\u0d02\u0d2c\u0d7c" + ], + "SHORTDAY": [ + "\u0d1e\u0d3e\u0d2f\u0d7c", + "\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d7e", + "\u0d1a\u0d4a\u0d35\u0d4d\u0d35", + "\u0d2c\u0d41\u0d27\u0d7b", + "\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d02", + "\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f", + "\u0d36\u0d28\u0d3f" + ], + "SHORTMONTH": [ + "\u0d1c\u0d28\u0d41", + "\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41", + "\u0d2e\u0d3e\u0d7c", + "\u0d0f\u0d2a\u0d4d\u0d30\u0d3f", + "\u0d2e\u0d47\u0d2f\u0d4d", + "\u0d1c\u0d42\u0d7a", + "\u0d1c\u0d42\u0d32\u0d48", + "\u0d13\u0d17", + "\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31\u0d02", + "\u0d12\u0d15\u0d4d\u0d1f\u0d4b", + "\u0d28\u0d35\u0d02", + "\u0d21\u0d3f\u0d38\u0d02" + ], + "STANDALONEMONTH": [ + "\u0d1c\u0d28\u0d41\u0d35\u0d30\u0d3f", + "\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41\u0d35\u0d30\u0d3f", + "\u0d2e\u0d3e\u0d7c\u0d1a\u0d4d\u0d1a\u0d4d", + "\u0d0f\u0d2a\u0d4d\u0d30\u0d3f\u0d7d", + "\u0d2e\u0d47\u0d2f\u0d4d", + "\u0d1c\u0d42\u0d7a", + "\u0d1c\u0d42\u0d32\u0d48", + "\u0d13\u0d17\u0d38\u0d4d\u0d31\u0d4d\u0d31\u0d4d", + "\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31\u0d02\u0d2c\u0d7c", + "\u0d12\u0d15\u0d4d\u200c\u0d1f\u0d4b\u0d2c\u0d7c", + "\u0d28\u0d35\u0d02\u0d2c\u0d7c", + "\u0d21\u0d3f\u0d38\u0d02\u0d2c\u0d7c" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "y, MMMM d, EEEE", + "longDate": "y, MMMM d", + "medium": "y, MMM d h:mm:ss a", + "mediumDate": "y, MMM d", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ml-in", + "localeID": "ml_IN", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ml.js b/1.6.6/i18n/angular-locale_ml.js new file mode 100644 index 000000000..6dd78842f --- /dev/null +++ b/1.6.6/i18n/angular-locale_ml.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u0d1e\u0d3e\u0d2f\u0d31\u0d3e\u0d34\u0d4d\u200c\u0d1a", + "\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d33\u0d3e\u0d34\u0d4d\u200c\u0d1a", + "\u0d1a\u0d4a\u0d35\u0d4d\u0d35\u0d3e\u0d34\u0d4d\u0d1a", + "\u0d2c\u0d41\u0d27\u0d28\u0d3e\u0d34\u0d4d\u200c\u0d1a", + "\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d3e\u0d34\u0d4d\u200c\u0d1a", + "\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u200c\u0d1a", + "\u0d36\u0d28\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u200c\u0d1a" + ], + "ERANAMES": [ + "\u0d15\u0d4d\u0d30\u0d3f\u0d38\u0d4d\u200c\u0d24\u0d41\u0d35\u0d3f\u0d28\u0d4d \u0d2e\u0d41\u0d2e\u0d4d\u0d2a\u0d4d", + "\u0d06\u0d28\u0d4d\u0d28\u0d4b \u0d21\u0d4a\u0d2e\u0d3f\u0d28\u0d3f" + ], + "ERAS": [ + "\u0d15\u0d4d\u0d30\u0d3f.\u0d2e\u0d41.", + "\u0d0e\u0d21\u0d3f" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0d1c\u0d28\u0d41\u0d35\u0d30\u0d3f", + "\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41\u0d35\u0d30\u0d3f", + "\u0d2e\u0d3e\u0d7c\u0d1a\u0d4d\u0d1a\u0d4d", + "\u0d0f\u0d2a\u0d4d\u0d30\u0d3f\u0d7d", + "\u0d2e\u0d47\u0d2f\u0d4d", + "\u0d1c\u0d42\u0d7a", + "\u0d1c\u0d42\u0d32\u0d48", + "\u0d13\u0d17\u0d38\u0d4d\u0d31\u0d4d\u0d31\u0d4d", + "\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31\u0d02\u0d2c\u0d7c", + "\u0d12\u0d15\u0d4d\u200c\u0d1f\u0d4b\u0d2c\u0d7c", + "\u0d28\u0d35\u0d02\u0d2c\u0d7c", + "\u0d21\u0d3f\u0d38\u0d02\u0d2c\u0d7c" + ], + "SHORTDAY": [ + "\u0d1e\u0d3e\u0d2f\u0d7c", + "\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d7e", + "\u0d1a\u0d4a\u0d35\u0d4d\u0d35", + "\u0d2c\u0d41\u0d27\u0d7b", + "\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d02", + "\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f", + "\u0d36\u0d28\u0d3f" + ], + "SHORTMONTH": [ + "\u0d1c\u0d28\u0d41", + "\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41", + "\u0d2e\u0d3e\u0d7c", + "\u0d0f\u0d2a\u0d4d\u0d30\u0d3f", + "\u0d2e\u0d47\u0d2f\u0d4d", + "\u0d1c\u0d42\u0d7a", + "\u0d1c\u0d42\u0d32\u0d48", + "\u0d13\u0d17", + "\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31\u0d02", + "\u0d12\u0d15\u0d4d\u0d1f\u0d4b", + "\u0d28\u0d35\u0d02", + "\u0d21\u0d3f\u0d38\u0d02" + ], + "STANDALONEMONTH": [ + "\u0d1c\u0d28\u0d41\u0d35\u0d30\u0d3f", + "\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41\u0d35\u0d30\u0d3f", + "\u0d2e\u0d3e\u0d7c\u0d1a\u0d4d\u0d1a\u0d4d", + "\u0d0f\u0d2a\u0d4d\u0d30\u0d3f\u0d7d", + "\u0d2e\u0d47\u0d2f\u0d4d", + "\u0d1c\u0d42\u0d7a", + "\u0d1c\u0d42\u0d32\u0d48", + "\u0d13\u0d17\u0d38\u0d4d\u0d31\u0d4d\u0d31\u0d4d", + "\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31\u0d02\u0d2c\u0d7c", + "\u0d12\u0d15\u0d4d\u200c\u0d1f\u0d4b\u0d2c\u0d7c", + "\u0d28\u0d35\u0d02\u0d2c\u0d7c", + "\u0d21\u0d3f\u0d38\u0d02\u0d2c\u0d7c" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "y, MMMM d, EEEE", + "longDate": "y, MMMM d", + "medium": "y, MMM d h:mm:ss a", + "mediumDate": "y, MMM d", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ml", + "localeID": "ml", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mn-mn.js b/1.6.6/i18n/angular-locale_mn-mn.js new file mode 100644 index 000000000..aff52e045 --- /dev/null +++ b/1.6.6/i18n/angular-locale_mn-mn.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u04af.\u04e9", + "\u04af.\u0445" + ], + "DAY": [ + "\u043d\u044f\u043c", + "\u0434\u0430\u0432\u0430\u0430", + "\u043c\u044f\u0433\u043c\u0430\u0440", + "\u043b\u0445\u0430\u0433\u0432\u0430", + "\u043f\u04af\u0440\u044d\u0432", + "\u0431\u0430\u0430\u0441\u0430\u043d", + "\u0431\u044f\u043c\u0431\u0430" + ], + "ERANAMES": [ + "\u043c\u0430\u043d\u0430\u0439 \u044d\u0440\u0438\u043d\u0438\u0439 \u04e9\u043c\u043d\u04e9\u0445", + "\u043c\u0430\u043d\u0430\u0439 \u044d\u0440\u0438\u043d\u0438\u0439" + ], + "ERAS": [ + "\u043c.\u044d.\u04e9", + "\u043c.\u044d." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u041d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440", + "\u0425\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0413\u0443\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0414\u04e9\u0440\u04e9\u0432\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440", + "\u0422\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0417\u0443\u0440\u0433\u0430\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0414\u043e\u043b\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u041d\u0430\u0439\u043c\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0415\u0441\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440", + "\u0410\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0410\u0440\u0432\u0430\u043d \u043d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440", + "\u0410\u0440\u0432\u0430\u043d \u0445\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440" + ], + "SHORTDAY": [ + "\u041d\u044f", + "\u0414\u0430", + "\u041c\u044f", + "\u041b\u0445", + "\u041f\u04af", + "\u0411\u0430", + "\u0411\u044f" + ], + "SHORTMONTH": [ + "1-\u0440 \u0441\u0430\u0440", + "2-\u0440 \u0441\u0430\u0440", + "3-\u0440 \u0441\u0430\u0440", + "4-\u0440 \u0441\u0430\u0440", + "5-\u0440 \u0441\u0430\u0440", + "6-\u0440 \u0441\u0430\u0440", + "7-\u0440 \u0441\u0430\u0440", + "8-\u0440 \u0441\u0430\u0440", + "9-\u0440 \u0441\u0430\u0440", + "10-\u0440 \u0441\u0430\u0440", + "11-\u0440 \u0441\u0430\u0440", + "12-\u0440 \u0441\u0430\u0440" + ], + "STANDALONEMONTH": [ + "\u041d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440", + "\u0425\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0413\u0443\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0414\u04e9\u0440\u04e9\u0432\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440", + "\u0422\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0417\u0443\u0440\u0433\u0430\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0414\u043e\u043b\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u041d\u0430\u0439\u043c\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0415\u0441\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440", + "\u0410\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0410\u0440\u0432\u0430\u043d \u043d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440", + "\u0410\u0440\u0432\u0430\u043d \u0445\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, y '\u043e\u043d\u044b' MM '\u0441\u0430\u0440\u044b\u043d' d", + "longDate": "y'\u043e\u043d\u044b' MMMM'\u0441\u0430\u0440\u044b\u043d' d'\u04e9\u0434\u04e9\u0440'", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ae", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "mn-mn", + "localeID": "mn_MN", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mn.js b/1.6.6/i18n/angular-locale_mn.js new file mode 100644 index 000000000..890e8614f --- /dev/null +++ b/1.6.6/i18n/angular-locale_mn.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u04af.\u04e9", + "\u04af.\u0445" + ], + "DAY": [ + "\u043d\u044f\u043c", + "\u0434\u0430\u0432\u0430\u0430", + "\u043c\u044f\u0433\u043c\u0430\u0440", + "\u043b\u0445\u0430\u0433\u0432\u0430", + "\u043f\u04af\u0440\u044d\u0432", + "\u0431\u0430\u0430\u0441\u0430\u043d", + "\u0431\u044f\u043c\u0431\u0430" + ], + "ERANAMES": [ + "\u043c\u0430\u043d\u0430\u0439 \u044d\u0440\u0438\u043d\u0438\u0439 \u04e9\u043c\u043d\u04e9\u0445", + "\u043c\u0430\u043d\u0430\u0439 \u044d\u0440\u0438\u043d\u0438\u0439" + ], + "ERAS": [ + "\u043c.\u044d.\u04e9", + "\u043c.\u044d." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u041d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440", + "\u0425\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0413\u0443\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0414\u04e9\u0440\u04e9\u0432\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440", + "\u0422\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0417\u0443\u0440\u0433\u0430\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0414\u043e\u043b\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u041d\u0430\u0439\u043c\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0415\u0441\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440", + "\u0410\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0410\u0440\u0432\u0430\u043d \u043d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440", + "\u0410\u0440\u0432\u0430\u043d \u0445\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440" + ], + "SHORTDAY": [ + "\u041d\u044f", + "\u0414\u0430", + "\u041c\u044f", + "\u041b\u0445", + "\u041f\u04af", + "\u0411\u0430", + "\u0411\u044f" + ], + "SHORTMONTH": [ + "1-\u0440 \u0441\u0430\u0440", + "2-\u0440 \u0441\u0430\u0440", + "3-\u0440 \u0441\u0430\u0440", + "4-\u0440 \u0441\u0430\u0440", + "5-\u0440 \u0441\u0430\u0440", + "6-\u0440 \u0441\u0430\u0440", + "7-\u0440 \u0441\u0430\u0440", + "8-\u0440 \u0441\u0430\u0440", + "9-\u0440 \u0441\u0430\u0440", + "10-\u0440 \u0441\u0430\u0440", + "11-\u0440 \u0441\u0430\u0440", + "12-\u0440 \u0441\u0430\u0440" + ], + "STANDALONEMONTH": [ + "\u041d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440", + "\u0425\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0413\u0443\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0414\u04e9\u0440\u04e9\u0432\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440", + "\u0422\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0417\u0443\u0440\u0433\u0430\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0414\u043e\u043b\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u041d\u0430\u0439\u043c\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0415\u0441\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440", + "\u0410\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440", + "\u0410\u0440\u0432\u0430\u043d \u043d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440", + "\u0410\u0440\u0432\u0430\u043d \u0445\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, y '\u043e\u043d\u044b' MM '\u0441\u0430\u0440\u044b\u043d' d", + "longDate": "y'\u043e\u043d\u044b' MMMM'\u0441\u0430\u0440\u044b\u043d' d'\u04e9\u0434\u04e9\u0440'", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ae", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "mn", + "localeID": "mn", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mo.js b/1.6.6/i18n/angular-locale_mo.js new file mode 100644 index 000000000..b79013849 --- /dev/null +++ b/1.6.6/i18n/angular-locale_mo.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "duminic\u0103", + "luni", + "mar\u021bi", + "miercuri", + "joi", + "vineri", + "s\u00e2mb\u0103t\u0103" + ], + "ERANAMES": [ + "\u00eenainte de Hristos", + "dup\u0103 Hristos" + ], + "ERAS": [ + "\u00ee.Hr.", + "d.Hr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "ianuarie", + "februarie", + "martie", + "aprilie", + "mai", + "iunie", + "iulie", + "august", + "septembrie", + "octombrie", + "noiembrie", + "decembrie" + ], + "SHORTDAY": [ + "Dum", + "Lun", + "Mar", + "Mie", + "Joi", + "Vin", + "S\u00e2m" + ], + "SHORTMONTH": [ + "ian.", + "feb.", + "mar.", + "apr.", + "mai", + "iun.", + "iul.", + "aug.", + "sept.", + "oct.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "ianuarie", + "februarie", + "martie", + "aprilie", + "mai", + "iunie", + "iulie", + "august", + "septembrie", + "octombrie", + "noiembrie", + "decembrie" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.y HH:mm", + "shortDate": "dd.MM.y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "MDL", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "mo", + "localeID": "mo", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (vf.v != 0 || n == 0 || n != 1 && n % 100 >= 1 && n % 100 <= 19) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mr-in.js b/1.6.6/i18n/angular-locale_mr-in.js new file mode 100644 index 000000000..d184dd6cc --- /dev/null +++ b/1.6.6/i18n/angular-locale_mr-in.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u092e.\u092a\u0942.", + "\u092e.\u0909." + ], + "DAY": [ + "\u0930\u0935\u093f\u0935\u093e\u0930", + "\u0938\u094b\u092e\u0935\u093e\u0930", + "\u092e\u0902\u0917\u0933\u0935\u093e\u0930", + "\u092c\u0941\u0927\u0935\u093e\u0930", + "\u0917\u0941\u0930\u0941\u0935\u093e\u0930", + "\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930", + "\u0936\u0928\u093f\u0935\u093e\u0930" + ], + "ERANAMES": [ + "\u0908\u0938\u0935\u0940\u0938\u0928\u092a\u0942\u0930\u094d\u0935", + "\u0908\u0938\u0935\u0940\u0938\u0928" + ], + "ERAS": [ + "\u0907. \u0938. \u092a\u0942.", + "\u0907. \u0938." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u090f\u092a\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0942\u0928", + "\u091c\u0941\u0932\u0948", + "\u0911\u0917\u0938\u094d\u091f", + "\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930", + "\u0911\u0915\u094d\u091f\u094b\u092c\u0930", + "\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930", + "\u0921\u093f\u0938\u0947\u0902\u092c\u0930" + ], + "SHORTDAY": [ + "\u0930\u0935\u093f", + "\u0938\u094b\u092e", + "\u092e\u0902\u0917\u0933", + "\u092c\u0941\u0927", + "\u0917\u0941\u0930\u0941", + "\u0936\u0941\u0915\u094d\u0930", + "\u0936\u0928\u093f" + ], + "SHORTMONTH": [ + "\u091c\u093e\u0928\u0947", + "\u092b\u0947\u092c\u094d\u0930\u0941", + "\u092e\u093e\u0930\u094d\u091a", + "\u090f\u092a\u094d\u0930\u093f", + "\u092e\u0947", + "\u091c\u0942\u0928", + "\u091c\u0941\u0932\u0948", + "\u0911\u0917", + "\u0938\u092a\u094d\u091f\u0947\u0902", + "\u0911\u0915\u094d\u091f\u094b", + "\u0928\u094b\u0935\u094d\u0939\u0947\u0902", + "\u0921\u093f\u0938\u0947\u0902" + ], + "STANDALONEMONTH": [ + "\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u090f\u092a\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0942\u0928", + "\u091c\u0941\u0932\u0948", + "\u0911\u0917\u0938\u094d\u091f", + "\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930", + "\u0911\u0915\u094d\u091f\u094b\u092c\u0930", + "\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930", + "\u0921\u093f\u0938\u0947\u0902\u092c\u0930" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM, y h:mm:ss a", + "mediumDate": "d MMM, y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "mr-in", + "localeID": "mr_IN", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mr.js b/1.6.6/i18n/angular-locale_mr.js new file mode 100644 index 000000000..868b0d0e3 --- /dev/null +++ b/1.6.6/i18n/angular-locale_mr.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u092e.\u092a\u0942.", + "\u092e.\u0909." + ], + "DAY": [ + "\u0930\u0935\u093f\u0935\u093e\u0930", + "\u0938\u094b\u092e\u0935\u093e\u0930", + "\u092e\u0902\u0917\u0933\u0935\u093e\u0930", + "\u092c\u0941\u0927\u0935\u093e\u0930", + "\u0917\u0941\u0930\u0941\u0935\u093e\u0930", + "\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930", + "\u0936\u0928\u093f\u0935\u093e\u0930" + ], + "ERANAMES": [ + "\u0908\u0938\u0935\u0940\u0938\u0928\u092a\u0942\u0930\u094d\u0935", + "\u0908\u0938\u0935\u0940\u0938\u0928" + ], + "ERAS": [ + "\u0907. \u0938. \u092a\u0942.", + "\u0907. \u0938." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u090f\u092a\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0942\u0928", + "\u091c\u0941\u0932\u0948", + "\u0911\u0917\u0938\u094d\u091f", + "\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930", + "\u0911\u0915\u094d\u091f\u094b\u092c\u0930", + "\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930", + "\u0921\u093f\u0938\u0947\u0902\u092c\u0930" + ], + "SHORTDAY": [ + "\u0930\u0935\u093f", + "\u0938\u094b\u092e", + "\u092e\u0902\u0917\u0933", + "\u092c\u0941\u0927", + "\u0917\u0941\u0930\u0941", + "\u0936\u0941\u0915\u094d\u0930", + "\u0936\u0928\u093f" + ], + "SHORTMONTH": [ + "\u091c\u093e\u0928\u0947", + "\u092b\u0947\u092c\u094d\u0930\u0941", + "\u092e\u093e\u0930\u094d\u091a", + "\u090f\u092a\u094d\u0930\u093f", + "\u092e\u0947", + "\u091c\u0942\u0928", + "\u091c\u0941\u0932\u0948", + "\u0911\u0917", + "\u0938\u092a\u094d\u091f\u0947\u0902", + "\u0911\u0915\u094d\u091f\u094b", + "\u0928\u094b\u0935\u094d\u0939\u0947\u0902", + "\u0921\u093f\u0938\u0947\u0902" + ], + "STANDALONEMONTH": [ + "\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u090f\u092a\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0942\u0928", + "\u091c\u0941\u0932\u0948", + "\u0911\u0917\u0938\u094d\u091f", + "\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930", + "\u0911\u0915\u094d\u091f\u094b\u092c\u0930", + "\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930", + "\u0921\u093f\u0938\u0947\u0902\u092c\u0930" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM, y h:mm:ss a", + "mediumDate": "d MMM, y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "mr", + "localeID": "mr", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ms-bn.js b/1.6.6/i18n/angular-locale_ms-bn.js new file mode 100644 index 000000000..fbe09b76d --- /dev/null +++ b/1.6.6/i18n/angular-locale_ms-bn.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "PG", + "PTG" + ], + "DAY": [ + "Ahad", + "Isnin", + "Selasa", + "Rabu", + "Khamis", + "Jumaat", + "Sabtu" + ], + "ERANAMES": [ + "S.M.", + "TM" + ], + "ERAS": [ + "S.M.", + "TM" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januari", + "Februari", + "Mac", + "April", + "Mei", + "Jun", + "Julai", + "Ogos", + "September", + "Oktober", + "November", + "Disember" + ], + "SHORTDAY": [ + "Ahd", + "Isn", + "Sel", + "Rab", + "Kha", + "Jum", + "Sab" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Jul", + "Ogo", + "Sep", + "Okt", + "Nov", + "Dis" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Mac", + "April", + "Mei", + "Jun", + "Julai", + "Ogos", + "September", + "Oktober", + "November", + "Disember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "dd MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/MM/yy h:mm a", + "shortDate": "d/MM/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ms-bn", + "localeID": "ms_BN", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ms-my.js b/1.6.6/i18n/angular-locale_ms-my.js new file mode 100644 index 000000000..5da0298a2 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ms-my.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "PG", + "PTG" + ], + "DAY": [ + "Ahad", + "Isnin", + "Selasa", + "Rabu", + "Khamis", + "Jumaat", + "Sabtu" + ], + "ERANAMES": [ + "S.M.", + "TM" + ], + "ERAS": [ + "S.M.", + "TM" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januari", + "Februari", + "Mac", + "April", + "Mei", + "Jun", + "Julai", + "Ogos", + "September", + "Oktober", + "November", + "Disember" + ], + "SHORTDAY": [ + "Ahd", + "Isn", + "Sel", + "Rab", + "Kha", + "Jum", + "Sab" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Jul", + "Ogo", + "Sep", + "Okt", + "Nov", + "Dis" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Mac", + "April", + "Mei", + "Jun", + "Julai", + "Ogos", + "September", + "Oktober", + "November", + "Disember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/MM/yy h:mm a", + "shortDate": "d/MM/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "RM", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ms-my", + "localeID": "ms_MY", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ms-sg.js b/1.6.6/i18n/angular-locale_ms-sg.js new file mode 100644 index 000000000..854031fe2 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ms-sg.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "PG", + "PTG" + ], + "DAY": [ + "Ahad", + "Isnin", + "Selasa", + "Rabu", + "Khamis", + "Jumaat", + "Sabtu" + ], + "ERANAMES": [ + "S.M.", + "TM" + ], + "ERAS": [ + "S.M.", + "TM" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Januari", + "Februari", + "Mac", + "April", + "Mei", + "Jun", + "Julai", + "Ogos", + "September", + "Oktober", + "November", + "Disember" + ], + "SHORTDAY": [ + "Ahd", + "Isn", + "Sel", + "Rab", + "Kha", + "Jum", + "Sab" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Jul", + "Ogo", + "Sep", + "Okt", + "Nov", + "Dis" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Mac", + "April", + "Mei", + "Jun", + "Julai", + "Ogos", + "September", + "Oktober", + "November", + "Disember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/MM/yy h:mm a", + "shortDate": "d/MM/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ms-sg", + "localeID": "ms_SG", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ms.js b/1.6.6/i18n/angular-locale_ms.js new file mode 100644 index 000000000..14b9b40b0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ms.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "PG", + "PTG" + ], + "DAY": [ + "Ahad", + "Isnin", + "Selasa", + "Rabu", + "Khamis", + "Jumaat", + "Sabtu" + ], + "ERANAMES": [ + "S.M.", + "TM" + ], + "ERAS": [ + "S.M.", + "TM" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januari", + "Februari", + "Mac", + "April", + "Mei", + "Jun", + "Julai", + "Ogos", + "September", + "Oktober", + "November", + "Disember" + ], + "SHORTDAY": [ + "Ahd", + "Isn", + "Sel", + "Rab", + "Kha", + "Jum", + "Sab" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Jul", + "Ogo", + "Sep", + "Okt", + "Nov", + "Dis" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Mac", + "April", + "Mei", + "Jun", + "Julai", + "Ogos", + "September", + "Oktober", + "November", + "Disember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/MM/yy h:mm a", + "shortDate": "d/MM/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "RM", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ms", + "localeID": "ms", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mt-mt.js b/1.6.6/i18n/angular-locale_mt-mt.js new file mode 100644 index 000000000..bb1e89d8e --- /dev/null +++ b/1.6.6/i18n/angular-locale_mt-mt.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Il-\u0126add", + "It-Tnejn", + "It-Tlieta", + "L-Erbg\u0127a", + "Il-\u0126amis", + "Il-\u0120img\u0127a", + "Is-Sibt" + ], + "ERANAMES": [ + "Qabel Kristu", + "Wara Kristu" + ], + "ERAS": [ + "QK", + "WK" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Jannar", + "Frar", + "Marzu", + "April", + "Mejju", + "\u0120unju", + "Lulju", + "Awwissu", + "Settembru", + "Ottubru", + "Novembru", + "Di\u010bembru" + ], + "SHORTDAY": [ + "\u0126ad", + "Tne", + "Tli", + "Erb", + "\u0126am", + "\u0120im", + "Sib" + ], + "SHORTMONTH": [ + "Jan", + "Fra", + "Mar", + "Apr", + "Mej", + "\u0120un", + "Lul", + "Aww", + "Set", + "Ott", + "Nov", + "Di\u010b" + ], + "STANDALONEMONTH": [ + "Jannar", + "Frar", + "Marzu", + "April", + "Mejju", + "\u0120unju", + "Lulju", + "Awwissu", + "Settembru", + "Ottubru", + "Novembru", + "Di\u010bembru" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'ta'\u2019 MMMM y", + "longDate": "d 'ta'\u2019 MMMM y", + "medium": "dd MMM y HH:mm:ss", + "mediumDate": "dd MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "mt-mt", + "localeID": "mt_MT", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 0 || n % 100 >= 2 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 19) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mt.js b/1.6.6/i18n/angular-locale_mt.js new file mode 100644 index 000000000..48da84e96 --- /dev/null +++ b/1.6.6/i18n/angular-locale_mt.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Il-\u0126add", + "It-Tnejn", + "It-Tlieta", + "L-Erbg\u0127a", + "Il-\u0126amis", + "Il-\u0120img\u0127a", + "Is-Sibt" + ], + "ERANAMES": [ + "Qabel Kristu", + "Wara Kristu" + ], + "ERAS": [ + "QK", + "WK" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Jannar", + "Frar", + "Marzu", + "April", + "Mejju", + "\u0120unju", + "Lulju", + "Awwissu", + "Settembru", + "Ottubru", + "Novembru", + "Di\u010bembru" + ], + "SHORTDAY": [ + "\u0126ad", + "Tne", + "Tli", + "Erb", + "\u0126am", + "\u0120im", + "Sib" + ], + "SHORTMONTH": [ + "Jan", + "Fra", + "Mar", + "Apr", + "Mej", + "\u0120un", + "Lul", + "Aww", + "Set", + "Ott", + "Nov", + "Di\u010b" + ], + "STANDALONEMONTH": [ + "Jannar", + "Frar", + "Marzu", + "April", + "Mejju", + "\u0120unju", + "Lulju", + "Awwissu", + "Settembru", + "Ottubru", + "Novembru", + "Di\u010bembru" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'ta'\u2019 MMMM y", + "longDate": "d 'ta'\u2019 MMMM y", + "medium": "dd MMM y HH:mm:ss", + "mediumDate": "dd MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "mt", + "localeID": "mt", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 0 || n % 100 >= 2 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 19) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mua-cm.js b/1.6.6/i18n/angular-locale_mua-cm.js new file mode 100644 index 000000000..74dc6309c --- /dev/null +++ b/1.6.6/i18n/angular-locale_mua-cm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "comme", + "lilli" + ], + "DAY": [ + "Com\u2019yakke", + "Comlaa\u0257ii", + "Comzyii\u0257ii", + "Comkolle", + "Comkald\u01dd\u0253lii", + "Comgaisuu", + "Comzye\u0253suu" + ], + "ERANAMES": [ + "K\u01ddPel Kristu", + "Pel Kristu" + ], + "ERAS": [ + "KK", + "PK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "F\u0129i Loo", + "Cokcwakla\u014bne", + "Cokcwaklii", + "F\u0129i Marfoo", + "Mad\u01dd\u01dduut\u01ddbija\u014b", + "Mam\u01dd\u014bgw\u00e3afahbii", + "Mam\u01dd\u014bgw\u00e3alii", + "Mad\u01ddmbii", + "F\u0129i D\u01dd\u0253lii", + "F\u0129i Munda\u014b", + "F\u0129i Gwahlle", + "F\u0129i Yuru" + ], + "SHORTDAY": [ + "Cya", + "Cla", + "Czi", + "Cko", + "Cka", + "Cga", + "Cze" + ], + "SHORTMONTH": [ + "FLO", + "CLA", + "CKI", + "FMF", + "MAD", + "MBI", + "MLI", + "MAM", + "FDE", + "FMU", + "FGW", + "FYU" + ], + "STANDALONEMONTH": [ + "F\u0129i Loo", + "Cokcwakla\u014bne", + "Cokcwaklii", + "F\u0129i Marfoo", + "Mad\u01dd\u01dduut\u01ddbija\u014b", + "Mam\u01dd\u014bgw\u00e3afahbii", + "Mam\u01dd\u014bgw\u00e3alii", + "Mad\u01ddmbii", + "F\u0129i D\u01dd\u0253lii", + "F\u0129i Munda\u014b", + "F\u0129i Gwahlle", + "F\u0129i Yuru" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "mua-cm", + "localeID": "mua_CM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mua.js b/1.6.6/i18n/angular-locale_mua.js new file mode 100644 index 000000000..3035de87e --- /dev/null +++ b/1.6.6/i18n/angular-locale_mua.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "comme", + "lilli" + ], + "DAY": [ + "Com\u2019yakke", + "Comlaa\u0257ii", + "Comzyii\u0257ii", + "Comkolle", + "Comkald\u01dd\u0253lii", + "Comgaisuu", + "Comzye\u0253suu" + ], + "ERANAMES": [ + "K\u01ddPel Kristu", + "Pel Kristu" + ], + "ERAS": [ + "KK", + "PK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "F\u0129i Loo", + "Cokcwakla\u014bne", + "Cokcwaklii", + "F\u0129i Marfoo", + "Mad\u01dd\u01dduut\u01ddbija\u014b", + "Mam\u01dd\u014bgw\u00e3afahbii", + "Mam\u01dd\u014bgw\u00e3alii", + "Mad\u01ddmbii", + "F\u0129i D\u01dd\u0253lii", + "F\u0129i Munda\u014b", + "F\u0129i Gwahlle", + "F\u0129i Yuru" + ], + "SHORTDAY": [ + "Cya", + "Cla", + "Czi", + "Cko", + "Cka", + "Cga", + "Cze" + ], + "SHORTMONTH": [ + "FLO", + "CLA", + "CKI", + "FMF", + "MAD", + "MBI", + "MLI", + "MAM", + "FDE", + "FMU", + "FGW", + "FYU" + ], + "STANDALONEMONTH": [ + "F\u0129i Loo", + "Cokcwakla\u014bne", + "Cokcwaklii", + "F\u0129i Marfoo", + "Mad\u01dd\u01dduut\u01ddbija\u014b", + "Mam\u01dd\u014bgw\u00e3afahbii", + "Mam\u01dd\u014bgw\u00e3alii", + "Mad\u01ddmbii", + "F\u0129i D\u01dd\u0253lii", + "F\u0129i Munda\u014b", + "F\u0129i Gwahlle", + "F\u0129i Yuru" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "mua", + "localeID": "mua", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_my-mm.js b/1.6.6/i18n/angular-locale_my-mm.js new file mode 100644 index 000000000..721d59d82 --- /dev/null +++ b/1.6.6/i18n/angular-locale_my-mm.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u1014\u1036\u1014\u1000\u103a", + "\u100a\u1014\u1031" + ], + "DAY": [ + "\u1010\u1014\u1004\u103a\u1039\u1002\u1014\u103d\u1031", + "\u1010\u1014\u1004\u103a\u1039\u101c\u102c", + "\u1021\u1004\u103a\u1039\u1002\u102b", + "\u1017\u102f\u1012\u1039\u1013\u101f\u1030\u1038", + "\u1000\u103c\u102c\u101e\u1015\u1010\u1031\u1038", + "\u101e\u1031\u102c\u1000\u103c\u102c", + "\u1005\u1014\u1031" + ], + "ERANAMES": [ + "\u1001\u101b\u1005\u103a\u1010\u1031\u102c\u103a \u1019\u1015\u1031\u102b\u103a\u1019\u102e\u1014\u103e\u1005\u103a", + "\u1001\u101b\u1005\u103a\u1014\u103e\u1005\u103a" + ], + "ERAS": [ + "\u1018\u102e\u1005\u102e", + "\u1021\u1031\u1012\u102e" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u1007\u1014\u103a\u1014\u101d\u102b\u101b\u102e", + "\u1016\u1031\u1016\u1031\u102c\u103a\u101d\u102b\u101b\u102e", + "\u1019\u1010\u103a", + "\u1027\u1015\u103c\u102e", + "\u1019\u1031", + "\u1007\u103d\u1014\u103a", + "\u1007\u1030\u101c\u102d\u102f\u1004\u103a", + "\u1029\u1002\u102f\u1010\u103a", + "\u1005\u1000\u103a\u1010\u1004\u103a\u1018\u102c", + "\u1021\u1031\u102c\u1000\u103a\u1010\u102d\u102f\u1018\u102c", + "\u1014\u102d\u102f\u101d\u1004\u103a\u1018\u102c", + "\u1012\u102e\u1007\u1004\u103a\u1018\u102c" + ], + "SHORTDAY": [ + "\u1010\u1014\u1004\u103a\u1039\u1002\u1014\u103d\u1031", + "\u1010\u1014\u1004\u103a\u1039\u101c\u102c", + "\u1021\u1004\u103a\u1039\u1002\u102b", + "\u1017\u102f\u1012\u1039\u1013\u101f\u1030\u1038", + "\u1000\u103c\u102c\u101e\u1015\u1010\u1031\u1038", + "\u101e\u1031\u102c\u1000\u103c\u102c", + "\u1005\u1014\u1031" + ], + "SHORTMONTH": [ + "\u1007\u1014\u103a", + "\u1016\u1031", + "\u1019\u1010\u103a", + "\u1027", + "\u1019\u1031", + "\u1007\u103d\u1014\u103a", + "\u1007\u1030", + "\u1029", + "\u1005\u1000\u103a", + "\u1021\u1031\u102c\u1000\u103a", + "\u1014\u102d\u102f", + "\u1012\u102e" + ], + "STANDALONEMONTH": [ + "\u1007\u1014\u103a\u1014\u101d\u102b\u101b\u102e", + "\u1016\u1031\u1016\u1031\u102c\u103a\u101d\u102b\u101b\u102e", + "\u1019\u1010\u103a", + "\u1027\u1015\u103c\u102e", + "\u1019\u1031", + "\u1007\u103d\u1014\u103a", + "\u1007\u1030\u101c\u102d\u102f\u1004\u103a", + "\u1029\u1002\u102f\u1010\u103a", + "\u1005\u1000\u103a\u1010\u1004\u103a\u1018\u102c", + "\u1021\u1031\u102c\u1000\u103a\u1010\u102d\u102f\u1018\u102c", + "\u1014\u102d\u102f\u101d\u1004\u103a\u1018\u102c", + "\u1012\u102e\u1007\u1004\u103a\u1018\u102c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd-MM-yy HH:mm", + "shortDate": "dd-MM-yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "K", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "my-mm", + "localeID": "my_MM", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_my.js b/1.6.6/i18n/angular-locale_my.js new file mode 100644 index 000000000..92e3a3ed1 --- /dev/null +++ b/1.6.6/i18n/angular-locale_my.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u1014\u1036\u1014\u1000\u103a", + "\u100a\u1014\u1031" + ], + "DAY": [ + "\u1010\u1014\u1004\u103a\u1039\u1002\u1014\u103d\u1031", + "\u1010\u1014\u1004\u103a\u1039\u101c\u102c", + "\u1021\u1004\u103a\u1039\u1002\u102b", + "\u1017\u102f\u1012\u1039\u1013\u101f\u1030\u1038", + "\u1000\u103c\u102c\u101e\u1015\u1010\u1031\u1038", + "\u101e\u1031\u102c\u1000\u103c\u102c", + "\u1005\u1014\u1031" + ], + "ERANAMES": [ + "\u1001\u101b\u1005\u103a\u1010\u1031\u102c\u103a \u1019\u1015\u1031\u102b\u103a\u1019\u102e\u1014\u103e\u1005\u103a", + "\u1001\u101b\u1005\u103a\u1014\u103e\u1005\u103a" + ], + "ERAS": [ + "\u1018\u102e\u1005\u102e", + "\u1021\u1031\u1012\u102e" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u1007\u1014\u103a\u1014\u101d\u102b\u101b\u102e", + "\u1016\u1031\u1016\u1031\u102c\u103a\u101d\u102b\u101b\u102e", + "\u1019\u1010\u103a", + "\u1027\u1015\u103c\u102e", + "\u1019\u1031", + "\u1007\u103d\u1014\u103a", + "\u1007\u1030\u101c\u102d\u102f\u1004\u103a", + "\u1029\u1002\u102f\u1010\u103a", + "\u1005\u1000\u103a\u1010\u1004\u103a\u1018\u102c", + "\u1021\u1031\u102c\u1000\u103a\u1010\u102d\u102f\u1018\u102c", + "\u1014\u102d\u102f\u101d\u1004\u103a\u1018\u102c", + "\u1012\u102e\u1007\u1004\u103a\u1018\u102c" + ], + "SHORTDAY": [ + "\u1010\u1014\u1004\u103a\u1039\u1002\u1014\u103d\u1031", + "\u1010\u1014\u1004\u103a\u1039\u101c\u102c", + "\u1021\u1004\u103a\u1039\u1002\u102b", + "\u1017\u102f\u1012\u1039\u1013\u101f\u1030\u1038", + "\u1000\u103c\u102c\u101e\u1015\u1010\u1031\u1038", + "\u101e\u1031\u102c\u1000\u103c\u102c", + "\u1005\u1014\u1031" + ], + "SHORTMONTH": [ + "\u1007\u1014\u103a", + "\u1016\u1031", + "\u1019\u1010\u103a", + "\u1027", + "\u1019\u1031", + "\u1007\u103d\u1014\u103a", + "\u1007\u1030", + "\u1029", + "\u1005\u1000\u103a", + "\u1021\u1031\u102c\u1000\u103a", + "\u1014\u102d\u102f", + "\u1012\u102e" + ], + "STANDALONEMONTH": [ + "\u1007\u1014\u103a\u1014\u101d\u102b\u101b\u102e", + "\u1016\u1031\u1016\u1031\u102c\u103a\u101d\u102b\u101b\u102e", + "\u1019\u1010\u103a", + "\u1027\u1015\u103c\u102e", + "\u1019\u1031", + "\u1007\u103d\u1014\u103a", + "\u1007\u1030\u101c\u102d\u102f\u1004\u103a", + "\u1029\u1002\u102f\u1010\u103a", + "\u1005\u1000\u103a\u1010\u1004\u103a\u1018\u102c", + "\u1021\u1031\u102c\u1000\u103a\u1010\u102d\u102f\u1018\u102c", + "\u1014\u102d\u102f\u101d\u1004\u103a\u1018\u102c", + "\u1012\u102e\u1007\u1004\u103a\u1018\u102c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd-MM-yy HH:mm", + "shortDate": "dd-MM-yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "K", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "my", + "localeID": "my", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mzn-ir.js b/1.6.6/i18n/angular-locale_mzn-ir.js new file mode 100644 index 000000000..335ca39e7 --- /dev/null +++ b/1.6.6/i18n/angular-locale_mzn-ir.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0645\u06cc\u0644\u0627\u062f", + "\u0628\u0639\u062f \u0645\u06cc\u0644\u0627\u062f" + ], + "ERAS": [ + "\u067e.\u0645", + "\u0645." + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u0698\u0627\u0646\u0648\u06cc\u0647", + "\u0641\u0648\u0631\u06cc\u0647", + "\u0645\u0627\u0631\u0633", + "\u0622\u0648\u0631\u06cc\u0644", + "\u0645\u0647", + "\u0698\u0648\u0626\u0646", + "\u0698\u0648\u0626\u06cc\u0647", + "\u0627\u0648\u062a", + "\u0633\u067e\u062a\u0627\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0628\u0631", + "\u0646\u0648\u0627\u0645\u0628\u0631", + "\u062f\u0633\u0627\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "\u0698\u0627\u0646\u0648\u06cc\u0647", + "\u0641\u0648\u0631\u06cc\u0647", + "\u0645\u0627\u0631\u0633", + "\u0622\u0648\u0631\u06cc\u0644", + "\u0645\u0647", + "\u0698\u0648\u0626\u0646", + "\u0698\u0648\u0626\u06cc\u0647", + "\u0627\u0648\u062a", + "\u0633\u067e\u062a\u0627\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0628\u0631", + "\u0646\u0648\u0627\u0645\u0628\u0631", + "\u062f\u0633\u0627\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u0698\u0627\u0646\u0648\u06cc\u0647", + "\u0641\u0648\u0631\u06cc\u0647", + "\u0645\u0627\u0631\u0633", + "\u0622\u0648\u0631\u06cc\u0644", + "\u0645\u0647", + "\u0698\u0648\u0626\u0646", + "\u0698\u0648\u0626\u06cc\u0647", + "\u0627\u0648\u062a", + "\u0633\u067e\u062a\u0627\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0628\u0631", + "\u0646\u0648\u0627\u0645\u0628\u0631", + "\u062f\u0633\u0627\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 4, + 4 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rial", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "mzn-ir", + "localeID": "mzn_IR", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_mzn.js b/1.6.6/i18n/angular-locale_mzn.js new file mode 100644 index 000000000..3f014bca9 --- /dev/null +++ b/1.6.6/i18n/angular-locale_mzn.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0645\u06cc\u0644\u0627\u062f", + "\u0628\u0639\u062f \u0645\u06cc\u0644\u0627\u062f" + ], + "ERAS": [ + "\u067e.\u0645", + "\u0645." + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u0698\u0627\u0646\u0648\u06cc\u0647", + "\u0641\u0648\u0631\u06cc\u0647", + "\u0645\u0627\u0631\u0633", + "\u0622\u0648\u0631\u06cc\u0644", + "\u0645\u0647", + "\u0698\u0648\u0626\u0646", + "\u0698\u0648\u0626\u06cc\u0647", + "\u0627\u0648\u062a", + "\u0633\u067e\u062a\u0627\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0628\u0631", + "\u0646\u0648\u0627\u0645\u0628\u0631", + "\u062f\u0633\u0627\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "\u0698\u0627\u0646\u0648\u06cc\u0647", + "\u0641\u0648\u0631\u06cc\u0647", + "\u0645\u0627\u0631\u0633", + "\u0622\u0648\u0631\u06cc\u0644", + "\u0645\u0647", + "\u0698\u0648\u0626\u0646", + "\u0698\u0648\u0626\u06cc\u0647", + "\u0627\u0648\u062a", + "\u0633\u067e\u062a\u0627\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0628\u0631", + "\u0646\u0648\u0627\u0645\u0628\u0631", + "\u062f\u0633\u0627\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u0698\u0627\u0646\u0648\u06cc\u0647", + "\u0641\u0648\u0631\u06cc\u0647", + "\u0645\u0627\u0631\u0633", + "\u0622\u0648\u0631\u06cc\u0644", + "\u0645\u0647", + "\u0698\u0648\u0626\u0646", + "\u0698\u0648\u0626\u06cc\u0647", + "\u0627\u0648\u062a", + "\u0633\u067e\u062a\u0627\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0628\u0631", + "\u0646\u0648\u0627\u0645\u0628\u0631", + "\u062f\u0633\u0627\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 4, + 4 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rial", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "mzn", + "localeID": "mzn", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_naq-na.js b/1.6.6/i18n/angular-locale_naq-na.js new file mode 100644 index 000000000..89b0ae42f --- /dev/null +++ b/1.6.6/i18n/angular-locale_naq-na.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u01c1goagas", + "\u01c3uias" + ], + "DAY": [ + "Sontaxtsees", + "Mantaxtsees", + "Denstaxtsees", + "Wunstaxtsees", + "Dondertaxtsees", + "Fraitaxtsees", + "Satertaxtsees" + ], + "ERANAMES": [ + "Xristub ai\u01c3\u00e2", + "Xristub khao\u01c3g\u00e2" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u01c3Khanni", + "\u01c3Khan\u01c0g\u00f4ab", + "\u01c0Khuu\u01c1kh\u00e2b", + "\u01c3H\u00f4a\u01c2khaib", + "\u01c3Khaits\u00e2b", + "Gama\u01c0aeb", + "\u01c2Khoesaob", + "Ao\u01c1khuum\u00fb\u01c1kh\u00e2b", + "Tara\u01c0khuum\u00fb\u01c1kh\u00e2b", + "\u01c2N\u00fb\u01c1n\u00e2iseb", + "\u01c0Hoo\u01c2gaeb", + "H\u00f4asore\u01c1kh\u00e2b" + ], + "SHORTDAY": [ + "Son", + "Ma", + "De", + "Wu", + "Do", + "Fr", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "\u01c3Khanni", + "\u01c3Khan\u01c0g\u00f4ab", + "\u01c0Khuu\u01c1kh\u00e2b", + "\u01c3H\u00f4a\u01c2khaib", + "\u01c3Khaits\u00e2b", + "Gama\u01c0aeb", + "\u01c2Khoesaob", + "Ao\u01c1khuum\u00fb\u01c1kh\u00e2b", + "Tara\u01c0khuum\u00fb\u01c1kh\u00e2b", + "\u01c2N\u00fb\u01c1n\u00e2iseb", + "\u01c0Hoo\u01c2gaeb", + "H\u00f4asore\u01c1kh\u00e2b" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "naq-na", + "localeID": "naq_NA", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_naq.js b/1.6.6/i18n/angular-locale_naq.js new file mode 100644 index 000000000..e4297ea4c --- /dev/null +++ b/1.6.6/i18n/angular-locale_naq.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u01c1goagas", + "\u01c3uias" + ], + "DAY": [ + "Sontaxtsees", + "Mantaxtsees", + "Denstaxtsees", + "Wunstaxtsees", + "Dondertaxtsees", + "Fraitaxtsees", + "Satertaxtsees" + ], + "ERANAMES": [ + "Xristub ai\u01c3\u00e2", + "Xristub khao\u01c3g\u00e2" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u01c3Khanni", + "\u01c3Khan\u01c0g\u00f4ab", + "\u01c0Khuu\u01c1kh\u00e2b", + "\u01c3H\u00f4a\u01c2khaib", + "\u01c3Khaits\u00e2b", + "Gama\u01c0aeb", + "\u01c2Khoesaob", + "Ao\u01c1khuum\u00fb\u01c1kh\u00e2b", + "Tara\u01c0khuum\u00fb\u01c1kh\u00e2b", + "\u01c2N\u00fb\u01c1n\u00e2iseb", + "\u01c0Hoo\u01c2gaeb", + "H\u00f4asore\u01c1kh\u00e2b" + ], + "SHORTDAY": [ + "Son", + "Ma", + "De", + "Wu", + "Do", + "Fr", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "\u01c3Khanni", + "\u01c3Khan\u01c0g\u00f4ab", + "\u01c0Khuu\u01c1kh\u00e2b", + "\u01c3H\u00f4a\u01c2khaib", + "\u01c3Khaits\u00e2b", + "Gama\u01c0aeb", + "\u01c2Khoesaob", + "Ao\u01c1khuum\u00fb\u01c1kh\u00e2b", + "Tara\u01c0khuum\u00fb\u01c1kh\u00e2b", + "\u01c2N\u00fb\u01c1n\u00e2iseb", + "\u01c0Hoo\u01c2gaeb", + "H\u00f4asore\u01c1kh\u00e2b" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "naq", + "localeID": "naq", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nb-no.js b/1.6.6/i18n/angular-locale_nb-no.js new file mode 100644 index 000000000..4b90ae07f --- /dev/null +++ b/1.6.6/i18n/angular-locale_nb-no.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "s\u00f8ndag", + "mandag", + "tirsdag", + "onsdag", + "torsdag", + "fredag", + "l\u00f8rdag" + ], + "ERANAMES": [ + "f\u00f8r Kristus", + "etter Kristus" + ], + "ERAS": [ + "f.Kr.", + "e.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "mars", + "april", + "mai", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "desember" + ], + "SHORTDAY": [ + "s\u00f8n.", + "man.", + "tir.", + "ons.", + "tor.", + "fre.", + "l\u00f8r." + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mar.", + "apr.", + "mai", + "jun.", + "jul.", + "aug.", + "sep.", + "okt.", + "nov.", + "des." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "mars", + "april", + "mai", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "desember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. MMM y HH:mm:ss", + "mediumDate": "d. MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.y HH:mm", + "shortDate": "dd.MM.y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "nb-no", + "localeID": "nb_NO", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nb-sj.js b/1.6.6/i18n/angular-locale_nb-sj.js new file mode 100644 index 000000000..2e9ff7001 --- /dev/null +++ b/1.6.6/i18n/angular-locale_nb-sj.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "s\u00f8ndag", + "mandag", + "tirsdag", + "onsdag", + "torsdag", + "fredag", + "l\u00f8rdag" + ], + "ERANAMES": [ + "f\u00f8r Kristus", + "etter Kristus" + ], + "ERAS": [ + "f.Kr.", + "e.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "mars", + "april", + "mai", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "desember" + ], + "SHORTDAY": [ + "s\u00f8n.", + "man.", + "tir.", + "ons.", + "tor.", + "fre.", + "l\u00f8r." + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mar.", + "apr.", + "mai", + "jun.", + "jul.", + "aug.", + "sep.", + "okt.", + "nov.", + "des." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "mars", + "april", + "mai", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "desember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. MMM y HH:mm:ss", + "mediumDate": "d. MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.y HH:mm", + "shortDate": "dd.MM.y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "nb-sj", + "localeID": "nb_SJ", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nb.js b/1.6.6/i18n/angular-locale_nb.js new file mode 100644 index 000000000..3db8284c0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_nb.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "s\u00f8ndag", + "mandag", + "tirsdag", + "onsdag", + "torsdag", + "fredag", + "l\u00f8rdag" + ], + "ERANAMES": [ + "f\u00f8r Kristus", + "etter Kristus" + ], + "ERAS": [ + "f.Kr.", + "e.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "mars", + "april", + "mai", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "desember" + ], + "SHORTDAY": [ + "s\u00f8n.", + "man.", + "tir.", + "ons.", + "tor.", + "fre.", + "l\u00f8r." + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mar.", + "apr.", + "mai", + "jun.", + "jul.", + "aug.", + "sep.", + "okt.", + "nov.", + "des." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "mars", + "april", + "mai", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "desember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. MMM y HH:mm:ss", + "mediumDate": "d. MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.y HH:mm", + "shortDate": "dd.MM.y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "nb", + "localeID": "nb", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nd-zw.js b/1.6.6/i18n/angular-locale_nd-zw.js new file mode 100644 index 000000000..3bb8b1716 --- /dev/null +++ b/1.6.6/i18n/angular-locale_nd-zw.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sonto", + "Mvulo", + "Sibili", + "Sithathu", + "Sine", + "Sihlanu", + "Mgqibelo" + ], + "ERANAMES": [ + "UKristo angakabuyi", + "Ukristo ebuyile" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Zibandlela", + "Nhlolanja", + "Mbimbitho", + "Mabasa", + "Nkwenkwezi", + "Nhlangula", + "Ntulikazi", + "Ncwabakazi", + "Mpandula", + "Mfumfu", + "Lwezi", + "Mpalakazi" + ], + "SHORTDAY": [ + "Son", + "Mvu", + "Sib", + "Sit", + "Sin", + "Sih", + "Mgq" + ], + "SHORTMONTH": [ + "Zib", + "Nhlo", + "Mbi", + "Mab", + "Nkw", + "Nhla", + "Ntu", + "Ncw", + "Mpan", + "Mfu", + "Lwe", + "Mpal" + ], + "STANDALONEMONTH": [ + "Zibandlela", + "Nhlolanja", + "Mbimbitho", + "Mabasa", + "Nkwenkwezi", + "Nhlangula", + "Ntulikazi", + "Ncwabakazi", + "Mpandula", + "Mfumfu", + "Lwezi", + "Mpalakazi" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "nd-zw", + "localeID": "nd_ZW", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nd.js b/1.6.6/i18n/angular-locale_nd.js new file mode 100644 index 000000000..c03642c59 --- /dev/null +++ b/1.6.6/i18n/angular-locale_nd.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sonto", + "Mvulo", + "Sibili", + "Sithathu", + "Sine", + "Sihlanu", + "Mgqibelo" + ], + "ERANAMES": [ + "UKristo angakabuyi", + "Ukristo ebuyile" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Zibandlela", + "Nhlolanja", + "Mbimbitho", + "Mabasa", + "Nkwenkwezi", + "Nhlangula", + "Ntulikazi", + "Ncwabakazi", + "Mpandula", + "Mfumfu", + "Lwezi", + "Mpalakazi" + ], + "SHORTDAY": [ + "Son", + "Mvu", + "Sib", + "Sit", + "Sin", + "Sih", + "Mgq" + ], + "SHORTMONTH": [ + "Zib", + "Nhlo", + "Mbi", + "Mab", + "Nkw", + "Nhla", + "Ntu", + "Ncw", + "Mpan", + "Mfu", + "Lwe", + "Mpal" + ], + "STANDALONEMONTH": [ + "Zibandlela", + "Nhlolanja", + "Mbimbitho", + "Mabasa", + "Nkwenkwezi", + "Nhlangula", + "Ntulikazi", + "Ncwabakazi", + "Mpandula", + "Mfumfu", + "Lwezi", + "Mpalakazi" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "nd", + "localeID": "nd", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nds-de.js b/1.6.6/i18n/angular-locale_nds-de.js new file mode 100644 index 000000000..21778c783 --- /dev/null +++ b/1.6.6/i18n/angular-locale_nds-de.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "M01", + "M02", + "M03", + "M04", + "M05", + "M06", + "M07", + "M08", + "M09", + "M10", + "M11", + "M12" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "M01", + "M02", + "M03", + "M04", + "M05", + "M06", + "M07", + "M08", + "M09", + "M10", + "M11", + "M12" + ], + "STANDALONEMONTH": [ + "M01", + "M02", + "M03", + "M04", + "M05", + "M06", + "M07", + "M08", + "M09", + "M10", + "M11", + "M12" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "nds-de", + "localeID": "nds_DE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nds-nl.js b/1.6.6/i18n/angular-locale_nds-nl.js new file mode 100644 index 000000000..3eb28a026 --- /dev/null +++ b/1.6.6/i18n/angular-locale_nds-nl.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "M01", + "M02", + "M03", + "M04", + "M05", + "M06", + "M07", + "M08", + "M09", + "M10", + "M11", + "M12" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "M01", + "M02", + "M03", + "M04", + "M05", + "M06", + "M07", + "M08", + "M09", + "M10", + "M11", + "M12" + ], + "STANDALONEMONTH": [ + "M01", + "M02", + "M03", + "M04", + "M05", + "M06", + "M07", + "M08", + "M09", + "M10", + "M11", + "M12" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "nds-nl", + "localeID": "nds_NL", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nds.js b/1.6.6/i18n/angular-locale_nds.js new file mode 100644 index 000000000..af7dadc43 --- /dev/null +++ b/1.6.6/i18n/angular-locale_nds.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "M01", + "M02", + "M03", + "M04", + "M05", + "M06", + "M07", + "M08", + "M09", + "M10", + "M11", + "M12" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "M01", + "M02", + "M03", + "M04", + "M05", + "M06", + "M07", + "M08", + "M09", + "M10", + "M11", + "M12" + ], + "STANDALONEMONTH": [ + "M01", + "M02", + "M03", + "M04", + "M05", + "M06", + "M07", + "M08", + "M09", + "M10", + "M11", + "M12" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "nds", + "localeID": "nds", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ne-in.js b/1.6.6/i18n/angular-locale_ne-in.js new file mode 100644 index 000000000..e13a8e991 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ne-in.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u092a\u0942\u0930\u094d\u0935\u093e\u0939\u094d\u0928", + "\u0905\u092a\u0930\u093e\u0939\u094d\u0928" + ], + "DAY": [ + "\u0906\u0907\u0924\u092c\u093e\u0930", + "\u0938\u094b\u092e\u092c\u093e\u0930", + "\u092e\u0919\u094d\u0917\u0932\u092c\u093e\u0930", + "\u092c\u0941\u0927\u092c\u093e\u0930", + "\u092c\u093f\u0939\u093f\u092c\u093e\u0930", + "\u0936\u0941\u0915\u094d\u0930\u092c\u093e\u0930", + "\u0936\u0928\u093f\u092c\u093e\u0930" + ], + "ERANAMES": [ + "\u0908\u0938\u093e \u092a\u0942\u0930\u094d\u0935", + "\u0938\u0928\u094d" + ], + "ERAS": [ + "\u0908\u0938\u093e \u092a\u0942\u0930\u094d\u0935", + "\u0938\u0928\u094d" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u091c\u0928\u0935\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0905\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u0905\u092a\u094d\u0930\u093f\u0932", + "\u092e\u0908", + "\u091c\u0941\u0928", + "\u091c\u0941\u0932\u093e\u0908", + "\u0905\u0917\u0938\u094d\u091f", + "\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930", + "\u0905\u0915\u094d\u091f\u094b\u092c\u0930", + "\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930", + "\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930" + ], + "SHORTDAY": [ + "\u0906\u0907\u0924", + "\u0938\u094b\u092e", + "\u092e\u0919\u094d\u0917\u0932", + "\u092c\u0941\u0927", + "\u092c\u093f\u0939\u093f", + "\u0936\u0941\u0915\u094d\u0930", + "\u0936\u0928\u093f" + ], + "SHORTMONTH": [ + "\u091c\u0928\u0935\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0905\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u0905\u092a\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0941\u0928", + "\u091c\u0941\u0932\u093e\u0908", + "\u0905\u0917\u0938\u094d\u091f", + "\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930", + "\u0905\u0915\u094d\u091f\u094b\u092c\u0930", + "\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930", + "\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930" + ], + "STANDALONEMONTH": [ + "\u091c\u0928\u0935\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0905\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u0905\u092a\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0941\u0928", + "\u091c\u0941\u0932\u093e\u0908", + "\u0905\u0917\u0938\u094d\u091f", + "\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930", + "\u0905\u0915\u094d\u091f\u094b\u092c\u0930", + "\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930", + "\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d h:mm:ss a", + "mediumDate": "y MMM d", + "mediumTime": "h:mm:ss a", + "short": "y-MM-dd h:mm a", + "shortDate": "y-MM-dd", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ne-in", + "localeID": "ne_IN", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ne-np.js b/1.6.6/i18n/angular-locale_ne-np.js new file mode 100644 index 000000000..0eace95f5 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ne-np.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u092a\u0942\u0930\u094d\u0935\u093e\u0939\u094d\u0928", + "\u0905\u092a\u0930\u093e\u0939\u094d\u0928" + ], + "DAY": [ + "\u0906\u0907\u0924\u092c\u093e\u0930", + "\u0938\u094b\u092e\u092c\u093e\u0930", + "\u092e\u0919\u094d\u0917\u0932\u092c\u093e\u0930", + "\u092c\u0941\u0927\u092c\u093e\u0930", + "\u092c\u093f\u0939\u093f\u092c\u093e\u0930", + "\u0936\u0941\u0915\u094d\u0930\u092c\u093e\u0930", + "\u0936\u0928\u093f\u092c\u093e\u0930" + ], + "ERANAMES": [ + "\u0908\u0938\u093e \u092a\u0942\u0930\u094d\u0935", + "\u0938\u0928\u094d" + ], + "ERAS": [ + "\u0908\u0938\u093e \u092a\u0942\u0930\u094d\u0935", + "\u0938\u0928\u094d" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u091c\u0928\u0935\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0905\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u0905\u092a\u094d\u0930\u093f\u0932", + "\u092e\u0908", + "\u091c\u0941\u0928", + "\u091c\u0941\u0932\u093e\u0908", + "\u0905\u0917\u0938\u094d\u091f", + "\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930", + "\u0905\u0915\u094d\u091f\u094b\u092c\u0930", + "\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930", + "\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930" + ], + "SHORTDAY": [ + "\u0906\u0907\u0924", + "\u0938\u094b\u092e", + "\u092e\u0919\u094d\u0917\u0932", + "\u092c\u0941\u0927", + "\u092c\u093f\u0939\u093f", + "\u0936\u0941\u0915\u094d\u0930", + "\u0936\u0928\u093f" + ], + "SHORTMONTH": [ + "\u091c\u0928\u0935\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0905\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u0905\u092a\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0941\u0928", + "\u091c\u0941\u0932\u093e\u0908", + "\u0905\u0917\u0938\u094d\u091f", + "\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930", + "\u0905\u0915\u094d\u091f\u094b\u092c\u0930", + "\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930", + "\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930" + ], + "STANDALONEMONTH": [ + "\u091c\u0928\u0935\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0905\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u0905\u092a\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0941\u0928", + "\u091c\u0941\u0932\u093e\u0908", + "\u0905\u0917\u0938\u094d\u091f", + "\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930", + "\u0905\u0915\u094d\u091f\u094b\u092c\u0930", + "\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930", + "\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rs", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ne-np", + "localeID": "ne_NP", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ne.js b/1.6.6/i18n/angular-locale_ne.js new file mode 100644 index 000000000..57deb6361 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ne.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u092a\u0942\u0930\u094d\u0935\u093e\u0939\u094d\u0928", + "\u0905\u092a\u0930\u093e\u0939\u094d\u0928" + ], + "DAY": [ + "\u0906\u0907\u0924\u092c\u093e\u0930", + "\u0938\u094b\u092e\u092c\u093e\u0930", + "\u092e\u0919\u094d\u0917\u0932\u092c\u093e\u0930", + "\u092c\u0941\u0927\u092c\u093e\u0930", + "\u092c\u093f\u0939\u093f\u092c\u093e\u0930", + "\u0936\u0941\u0915\u094d\u0930\u092c\u093e\u0930", + "\u0936\u0928\u093f\u092c\u093e\u0930" + ], + "ERANAMES": [ + "\u0908\u0938\u093e \u092a\u0942\u0930\u094d\u0935", + "\u0938\u0928\u094d" + ], + "ERAS": [ + "\u0908\u0938\u093e \u092a\u0942\u0930\u094d\u0935", + "\u0938\u0928\u094d" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u091c\u0928\u0935\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0905\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u0905\u092a\u094d\u0930\u093f\u0932", + "\u092e\u0908", + "\u091c\u0941\u0928", + "\u091c\u0941\u0932\u093e\u0908", + "\u0905\u0917\u0938\u094d\u091f", + "\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930", + "\u0905\u0915\u094d\u091f\u094b\u092c\u0930", + "\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930", + "\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930" + ], + "SHORTDAY": [ + "\u0906\u0907\u0924", + "\u0938\u094b\u092e", + "\u092e\u0919\u094d\u0917\u0932", + "\u092c\u0941\u0927", + "\u092c\u093f\u0939\u093f", + "\u0936\u0941\u0915\u094d\u0930", + "\u0936\u0928\u093f" + ], + "SHORTMONTH": [ + "\u091c\u0928\u0935\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0905\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u0905\u092a\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0941\u0928", + "\u091c\u0941\u0932\u093e\u0908", + "\u0905\u0917\u0938\u094d\u091f", + "\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930", + "\u0905\u0915\u094d\u091f\u094b\u092c\u0930", + "\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930", + "\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930" + ], + "STANDALONEMONTH": [ + "\u091c\u0928\u0935\u0930\u0940", + "\u092b\u0947\u092c\u094d\u0930\u0941\u0905\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u0905\u092a\u094d\u0930\u093f\u0932", + "\u092e\u0947", + "\u091c\u0941\u0928", + "\u091c\u0941\u0932\u093e\u0908", + "\u0905\u0917\u0938\u094d\u091f", + "\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930", + "\u0905\u0915\u094d\u091f\u094b\u092c\u0930", + "\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930", + "\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rs", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ne", + "localeID": "ne", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nl-aw.js b/1.6.6/i18n/angular-locale_nl-aw.js new file mode 100644 index 000000000..76a15853f --- /dev/null +++ b/1.6.6/i18n/angular-locale_nl-aw.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "zondag", + "maandag", + "dinsdag", + "woensdag", + "donderdag", + "vrijdag", + "zaterdag" + ], + "ERANAMES": [ + "voor Christus", + "na Christus" + ], + "ERAS": [ + "v.Chr.", + "n.Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januari", + "februari", + "maart", + "april", + "mei", + "juni", + "juli", + "augustus", + "september", + "oktober", + "november", + "december" + ], + "SHORTDAY": [ + "zo", + "ma", + "di", + "wo", + "do", + "vr", + "za" + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mrt.", + "apr.", + "mei", + "jun.", + "jul.", + "aug.", + "sep.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "januari", + "februari", + "maart", + "april", + "mei", + "juni", + "juli", + "augustus", + "september", + "oktober", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd-MM-yy HH:mm", + "shortDate": "dd-MM-yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Afl.", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u00a4\u00a0-", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "nl-aw", + "localeID": "nl_AW", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nl-be.js b/1.6.6/i18n/angular-locale_nl-be.js new file mode 100644 index 000000000..c7ccb05ba --- /dev/null +++ b/1.6.6/i18n/angular-locale_nl-be.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "zondag", + "maandag", + "dinsdag", + "woensdag", + "donderdag", + "vrijdag", + "zaterdag" + ], + "ERANAMES": [ + "voor Christus", + "na Christus" + ], + "ERAS": [ + "v.Chr.", + "n.Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januari", + "februari", + "maart", + "april", + "mei", + "juni", + "juli", + "augustus", + "september", + "oktober", + "november", + "december" + ], + "SHORTDAY": [ + "zo", + "ma", + "di", + "wo", + "do", + "vr", + "za" + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mrt.", + "apr.", + "mei", + "jun.", + "jul.", + "aug.", + "sep.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "januari", + "februari", + "maart", + "april", + "mei", + "juni", + "juli", + "augustus", + "september", + "oktober", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/MM/yy HH:mm", + "shortDate": "d/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "nl-be", + "localeID": "nl_BE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nl-bq.js b/1.6.6/i18n/angular-locale_nl-bq.js new file mode 100644 index 000000000..9bf46a1cc --- /dev/null +++ b/1.6.6/i18n/angular-locale_nl-bq.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "zondag", + "maandag", + "dinsdag", + "woensdag", + "donderdag", + "vrijdag", + "zaterdag" + ], + "ERANAMES": [ + "voor Christus", + "na Christus" + ], + "ERAS": [ + "v.Chr.", + "n.Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januari", + "februari", + "maart", + "april", + "mei", + "juni", + "juli", + "augustus", + "september", + "oktober", + "november", + "december" + ], + "SHORTDAY": [ + "zo", + "ma", + "di", + "wo", + "do", + "vr", + "za" + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mrt.", + "apr.", + "mei", + "jun.", + "jul.", + "aug.", + "sep.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "januari", + "februari", + "maart", + "april", + "mei", + "juni", + "juli", + "augustus", + "september", + "oktober", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd-MM-yy HH:mm", + "shortDate": "dd-MM-yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u00a4\u00a0-", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "nl-bq", + "localeID": "nl_BQ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nl-cw.js b/1.6.6/i18n/angular-locale_nl-cw.js new file mode 100644 index 000000000..57efc8922 --- /dev/null +++ b/1.6.6/i18n/angular-locale_nl-cw.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "zondag", + "maandag", + "dinsdag", + "woensdag", + "donderdag", + "vrijdag", + "zaterdag" + ], + "ERANAMES": [ + "voor Christus", + "na Christus" + ], + "ERAS": [ + "v.Chr.", + "n.Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januari", + "februari", + "maart", + "april", + "mei", + "juni", + "juli", + "augustus", + "september", + "oktober", + "november", + "december" + ], + "SHORTDAY": [ + "zo", + "ma", + "di", + "wo", + "do", + "vr", + "za" + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mrt.", + "apr.", + "mei", + "jun.", + "jul.", + "aug.", + "sep.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "januari", + "februari", + "maart", + "april", + "mei", + "juni", + "juli", + "augustus", + "september", + "oktober", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd-MM-yy HH:mm", + "shortDate": "dd-MM-yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "NAf.", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u00a4\u00a0-", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "nl-cw", + "localeID": "nl_CW", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nl-nl.js b/1.6.6/i18n/angular-locale_nl-nl.js new file mode 100644 index 000000000..ad00626ee --- /dev/null +++ b/1.6.6/i18n/angular-locale_nl-nl.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "zondag", + "maandag", + "dinsdag", + "woensdag", + "donderdag", + "vrijdag", + "zaterdag" + ], + "ERANAMES": [ + "voor Christus", + "na Christus" + ], + "ERAS": [ + "v.Chr.", + "n.Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januari", + "februari", + "maart", + "april", + "mei", + "juni", + "juli", + "augustus", + "september", + "oktober", + "november", + "december" + ], + "SHORTDAY": [ + "zo", + "ma", + "di", + "wo", + "do", + "vr", + "za" + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mrt.", + "apr.", + "mei", + "jun.", + "jul.", + "aug.", + "sep.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "januari", + "februari", + "maart", + "april", + "mei", + "juni", + "juli", + "augustus", + "september", + "oktober", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd-MM-yy HH:mm", + "shortDate": "dd-MM-yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u00a4\u00a0-", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "nl-nl", + "localeID": "nl_NL", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nl-sr.js b/1.6.6/i18n/angular-locale_nl-sr.js new file mode 100644 index 000000000..2baf21cf0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_nl-sr.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "zondag", + "maandag", + "dinsdag", + "woensdag", + "donderdag", + "vrijdag", + "zaterdag" + ], + "ERANAMES": [ + "voor Christus", + "na Christus" + ], + "ERAS": [ + "v.Chr.", + "n.Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januari", + "februari", + "maart", + "april", + "mei", + "juni", + "juli", + "augustus", + "september", + "oktober", + "november", + "december" + ], + "SHORTDAY": [ + "zo", + "ma", + "di", + "wo", + "do", + "vr", + "za" + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mrt.", + "apr.", + "mei", + "jun.", + "jul.", + "aug.", + "sep.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "januari", + "februari", + "maart", + "april", + "mei", + "juni", + "juli", + "augustus", + "september", + "oktober", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd-MM-yy HH:mm", + "shortDate": "dd-MM-yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u00a4\u00a0-", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "nl-sr", + "localeID": "nl_SR", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nl-sx.js b/1.6.6/i18n/angular-locale_nl-sx.js new file mode 100644 index 000000000..e314d4f86 --- /dev/null +++ b/1.6.6/i18n/angular-locale_nl-sx.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "zondag", + "maandag", + "dinsdag", + "woensdag", + "donderdag", + "vrijdag", + "zaterdag" + ], + "ERANAMES": [ + "voor Christus", + "na Christus" + ], + "ERAS": [ + "v.Chr.", + "n.Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januari", + "februari", + "maart", + "april", + "mei", + "juni", + "juli", + "augustus", + "september", + "oktober", + "november", + "december" + ], + "SHORTDAY": [ + "zo", + "ma", + "di", + "wo", + "do", + "vr", + "za" + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mrt.", + "apr.", + "mei", + "jun.", + "jul.", + "aug.", + "sep.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "januari", + "februari", + "maart", + "april", + "mei", + "juni", + "juli", + "augustus", + "september", + "oktober", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd-MM-yy HH:mm", + "shortDate": "dd-MM-yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "NAf.", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u00a4\u00a0-", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "nl-sx", + "localeID": "nl_SX", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nl.js b/1.6.6/i18n/angular-locale_nl.js new file mode 100644 index 000000000..51f6fbc43 --- /dev/null +++ b/1.6.6/i18n/angular-locale_nl.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "zondag", + "maandag", + "dinsdag", + "woensdag", + "donderdag", + "vrijdag", + "zaterdag" + ], + "ERANAMES": [ + "voor Christus", + "na Christus" + ], + "ERAS": [ + "v.Chr.", + "n.Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januari", + "februari", + "maart", + "april", + "mei", + "juni", + "juli", + "augustus", + "september", + "oktober", + "november", + "december" + ], + "SHORTDAY": [ + "zo", + "ma", + "di", + "wo", + "do", + "vr", + "za" + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mrt.", + "apr.", + "mei", + "jun.", + "jul.", + "aug.", + "sep.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "januari", + "februari", + "maart", + "april", + "mei", + "juni", + "juli", + "augustus", + "september", + "oktober", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd-MM-yy HH:mm", + "shortDate": "dd-MM-yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u00a4\u00a0-", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "nl", + "localeID": "nl", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nmg-cm.js b/1.6.6/i18n/angular-locale_nmg-cm.js new file mode 100644 index 000000000..38ab5a9b6 --- /dev/null +++ b/1.6.6/i18n/angular-locale_nmg-cm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "man\u00e1", + "kug\u00fa" + ], + "DAY": [ + "s\u0254\u0301nd\u0254", + "m\u0254\u0301nd\u0254", + "s\u0254\u0301nd\u0254 maf\u00fa m\u00e1ba", + "s\u0254\u0301nd\u0254 maf\u00fa m\u00e1lal", + "s\u0254\u0301nd\u0254 maf\u00fa m\u00e1na", + "mab\u00e1g\u00e1 m\u00e1 sukul", + "s\u00e1sadi" + ], + "ERANAMES": [ + "B\u00f3 Lahl\u025b\u0304", + "Pfi\u025b Bur\u012b" + ], + "ERAS": [ + "BL", + "PB" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "ngw\u025bn mat\u00e1hra", + "ngw\u025bn \u0144mba", + "ngw\u025bn \u0144lal", + "ngw\u025bn \u0144na", + "ngw\u025bn \u0144tan", + "ngw\u025bn \u0144tu\u00f3", + "ngw\u025bn h\u025bmbu\u025br\u00ed", + "ngw\u025bn l\u0254mbi", + "ngw\u025bn r\u025bbvu\u00e2", + "ngw\u025bn wum", + "ngw\u025bn wum nav\u01d4r", + "kr\u00edsimin" + ], + "SHORTDAY": [ + "s\u0254\u0301n", + "m\u0254\u0301n", + "smb", + "sml", + "smn", + "mbs", + "sas" + ], + "SHORTMONTH": [ + "ng1", + "ng2", + "ng3", + "ng4", + "ng5", + "ng6", + "ng7", + "ng8", + "ng9", + "ng10", + "ng11", + "kris" + ], + "STANDALONEMONTH": [ + "ngw\u025bn mat\u00e1hra", + "ngw\u025bn \u0144mba", + "ngw\u025bn \u0144lal", + "ngw\u025bn \u0144na", + "ngw\u025bn \u0144tan", + "ngw\u025bn \u0144tu\u00f3", + "ngw\u025bn h\u025bmbu\u025br\u00ed", + "ngw\u025bn l\u0254mbi", + "ngw\u025bn r\u025bbvu\u00e2", + "ngw\u025bn wum", + "ngw\u025bn wum nav\u01d4r", + "kr\u00edsimin" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "nmg-cm", + "localeID": "nmg_CM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nmg.js b/1.6.6/i18n/angular-locale_nmg.js new file mode 100644 index 000000000..254572516 --- /dev/null +++ b/1.6.6/i18n/angular-locale_nmg.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "man\u00e1", + "kug\u00fa" + ], + "DAY": [ + "s\u0254\u0301nd\u0254", + "m\u0254\u0301nd\u0254", + "s\u0254\u0301nd\u0254 maf\u00fa m\u00e1ba", + "s\u0254\u0301nd\u0254 maf\u00fa m\u00e1lal", + "s\u0254\u0301nd\u0254 maf\u00fa m\u00e1na", + "mab\u00e1g\u00e1 m\u00e1 sukul", + "s\u00e1sadi" + ], + "ERANAMES": [ + "B\u00f3 Lahl\u025b\u0304", + "Pfi\u025b Bur\u012b" + ], + "ERAS": [ + "BL", + "PB" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "ngw\u025bn mat\u00e1hra", + "ngw\u025bn \u0144mba", + "ngw\u025bn \u0144lal", + "ngw\u025bn \u0144na", + "ngw\u025bn \u0144tan", + "ngw\u025bn \u0144tu\u00f3", + "ngw\u025bn h\u025bmbu\u025br\u00ed", + "ngw\u025bn l\u0254mbi", + "ngw\u025bn r\u025bbvu\u00e2", + "ngw\u025bn wum", + "ngw\u025bn wum nav\u01d4r", + "kr\u00edsimin" + ], + "SHORTDAY": [ + "s\u0254\u0301n", + "m\u0254\u0301n", + "smb", + "sml", + "smn", + "mbs", + "sas" + ], + "SHORTMONTH": [ + "ng1", + "ng2", + "ng3", + "ng4", + "ng5", + "ng6", + "ng7", + "ng8", + "ng9", + "ng10", + "ng11", + "kris" + ], + "STANDALONEMONTH": [ + "ngw\u025bn mat\u00e1hra", + "ngw\u025bn \u0144mba", + "ngw\u025bn \u0144lal", + "ngw\u025bn \u0144na", + "ngw\u025bn \u0144tan", + "ngw\u025bn \u0144tu\u00f3", + "ngw\u025bn h\u025bmbu\u025br\u00ed", + "ngw\u025bn l\u0254mbi", + "ngw\u025bn r\u025bbvu\u00e2", + "ngw\u025bn wum", + "ngw\u025bn wum nav\u01d4r", + "kr\u00edsimin" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "nmg", + "localeID": "nmg", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nn-no.js b/1.6.6/i18n/angular-locale_nn-no.js new file mode 100644 index 000000000..15370bc07 --- /dev/null +++ b/1.6.6/i18n/angular-locale_nn-no.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "formiddag", + "ettermiddag" + ], + "DAY": [ + "s\u00f8ndag", + "m\u00e5ndag", + "tysdag", + "onsdag", + "torsdag", + "fredag", + "laurdag" + ], + "ERANAMES": [ + "f.Kr.", + "e.Kr." + ], + "ERAS": [ + "f.Kr.", + "e.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "mars", + "april", + "mai", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "desember" + ], + "SHORTDAY": [ + "s\u00f8.", + "m\u00e5.", + "ty.", + "on.", + "to.", + "fr.", + "la." + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mars", + "apr.", + "mai", + "juni", + "juli", + "aug.", + "sep.", + "okt.", + "nov.", + "des." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "mars", + "april", + "mai", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "desember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. MMM y HH:mm:ss", + "mediumDate": "d. MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.y HH:mm", + "shortDate": "dd.MM.y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "nn-no", + "localeID": "nn_NO", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nn.js b/1.6.6/i18n/angular-locale_nn.js new file mode 100644 index 000000000..2ca6886b2 --- /dev/null +++ b/1.6.6/i18n/angular-locale_nn.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "formiddag", + "ettermiddag" + ], + "DAY": [ + "s\u00f8ndag", + "m\u00e5ndag", + "tysdag", + "onsdag", + "torsdag", + "fredag", + "laurdag" + ], + "ERANAMES": [ + "f.Kr.", + "e.Kr." + ], + "ERAS": [ + "f.Kr.", + "e.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "mars", + "april", + "mai", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "desember" + ], + "SHORTDAY": [ + "s\u00f8.", + "m\u00e5.", + "ty.", + "on.", + "to.", + "fr.", + "la." + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mars", + "apr.", + "mai", + "juni", + "juli", + "aug.", + "sep.", + "okt.", + "nov.", + "des." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "mars", + "april", + "mai", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "desember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. MMM y HH:mm:ss", + "mediumDate": "d. MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.y HH:mm", + "shortDate": "dd.MM.y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "nn", + "localeID": "nn", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nnh-cm.js b/1.6.6/i18n/angular-locale_nnh-cm.js new file mode 100644 index 000000000..9d3a3e29e --- /dev/null +++ b/1.6.6/i18n/angular-locale_nnh-cm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "mba\u02bc\u00e1mba\u02bc", + "ncw\u00f2nz\u00e9m" + ], + "DAY": [ + "ly\u025b\u02bc\u025b\u0301 s\u1e85\u00ed\u014bt\u00e8", + "mvf\u00f2 ly\u025b\u030c\u02bc", + "mb\u0254\u0301\u0254nt\u00e8 mvf\u00f2 ly\u025b\u030c\u02bc", + "ts\u00e8ts\u025b\u0300\u025b ly\u025b\u030c\u02bc", + "mb\u0254\u0301\u0254nt\u00e8 tsets\u025b\u0300\u025b ly\u025b\u030c\u02bc", + "mvf\u00f2 m\u00e0ga ly\u025b\u030c\u02bc", + "m\u00e0ga ly\u025b\u030c\u02bc" + ], + "ERANAMES": [ + "m\u00e9 zy\u00e9 Y\u011bs\u00f4", + "m\u00e9 g\u00ffo \u0144zy\u00e9 Y\u011bs\u00f4" + ], + "ERAS": [ + "m.z.Y.", + "m.g.n.Y." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "sa\u014b tsets\u025b\u0300\u025b l\u00f9m", + "sa\u014b k\u00e0g ngw\u00f3\u014b", + "sa\u014b lepy\u00e8 sh\u00fam", + "sa\u014b c\u00ff\u00f3", + "sa\u014b ts\u025b\u0300\u025b c\u00ff\u00f3", + "sa\u014b nj\u00ffol\u00e1\u02bc", + "sa\u014b ty\u025b\u0300b ty\u025b\u0300b mb\u0289\u0300\u014b", + "sa\u014b mb\u0289\u0300\u014b", + "sa\u014b ngw\u0254\u0300\u02bc mb\u00ff\u025b", + "sa\u014b t\u00e0\u014ba tsets\u00e1\u02bc", + "sa\u014b mejwo\u014b\u00f3", + "sa\u014b l\u00f9m" + ], + "SHORTDAY": [ + "ly\u025b\u02bc\u025b\u0301 s\u1e85\u00ed\u014bt\u00e8", + "mvf\u00f2 ly\u025b\u030c\u02bc", + "mb\u0254\u0301\u0254nt\u00e8 mvf\u00f2 ly\u025b\u030c\u02bc", + "ts\u00e8ts\u025b\u0300\u025b ly\u025b\u030c\u02bc", + "mb\u0254\u0301\u0254nt\u00e8 tsets\u025b\u0300\u025b ly\u025b\u030c\u02bc", + "mvf\u00f2 m\u00e0ga ly\u025b\u030c\u02bc", + "m\u00e0ga ly\u025b\u030c\u02bc" + ], + "SHORTMONTH": [ + "sa\u014b tsets\u025b\u0300\u025b l\u00f9m", + "sa\u014b k\u00e0g ngw\u00f3\u014b", + "sa\u014b lepy\u00e8 sh\u00fam", + "sa\u014b c\u00ff\u00f3", + "sa\u014b ts\u025b\u0300\u025b c\u00ff\u00f3", + "sa\u014b nj\u00ffol\u00e1\u02bc", + "sa\u014b ty\u025b\u0300b ty\u025b\u0300b mb\u0289\u0300\u014b", + "sa\u014b mb\u0289\u0300\u014b", + "sa\u014b ngw\u0254\u0300\u02bc mb\u00ff\u025b", + "sa\u014b t\u00e0\u014ba tsets\u00e1\u02bc", + "sa\u014b mejwo\u014b\u00f3", + "sa\u014b l\u00f9m" + ], + "STANDALONEMONTH": [ + "sa\u014b tsets\u025b\u0300\u025b l\u00f9m", + "sa\u014b k\u00e0g ngw\u00f3\u014b", + "sa\u014b lepy\u00e8 sh\u00fam", + "sa\u014b c\u00ff\u00f3", + "sa\u014b ts\u025b\u0300\u025b c\u00ff\u00f3", + "sa\u014b nj\u00ffol\u00e1\u02bc", + "sa\u014b ty\u025b\u0300b ty\u025b\u0300b mb\u0289\u0300\u014b", + "sa\u014b mb\u0289\u0300\u014b", + "sa\u014b ngw\u0254\u0300\u02bc mb\u00ff\u025b", + "sa\u014b t\u00e0\u014ba tsets\u00e1\u02bc", + "sa\u014b mejwo\u014b\u00f3", + "sa\u014b l\u00f9m" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE , 'ly\u025b'\u030c\u02bc d 'na' MMMM, y", + "longDate": "'ly\u025b'\u030c\u02bc d 'na' MMMM, y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "nnh-cm", + "localeID": "nnh_CM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nnh.js b/1.6.6/i18n/angular-locale_nnh.js new file mode 100644 index 000000000..28e4c761d --- /dev/null +++ b/1.6.6/i18n/angular-locale_nnh.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "mba\u02bc\u00e1mba\u02bc", + "ncw\u00f2nz\u00e9m" + ], + "DAY": [ + "ly\u025b\u02bc\u025b\u0301 s\u1e85\u00ed\u014bt\u00e8", + "mvf\u00f2 ly\u025b\u030c\u02bc", + "mb\u0254\u0301\u0254nt\u00e8 mvf\u00f2 ly\u025b\u030c\u02bc", + "ts\u00e8ts\u025b\u0300\u025b ly\u025b\u030c\u02bc", + "mb\u0254\u0301\u0254nt\u00e8 tsets\u025b\u0300\u025b ly\u025b\u030c\u02bc", + "mvf\u00f2 m\u00e0ga ly\u025b\u030c\u02bc", + "m\u00e0ga ly\u025b\u030c\u02bc" + ], + "ERANAMES": [ + "m\u00e9 zy\u00e9 Y\u011bs\u00f4", + "m\u00e9 g\u00ffo \u0144zy\u00e9 Y\u011bs\u00f4" + ], + "ERAS": [ + "m.z.Y.", + "m.g.n.Y." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "sa\u014b tsets\u025b\u0300\u025b l\u00f9m", + "sa\u014b k\u00e0g ngw\u00f3\u014b", + "sa\u014b lepy\u00e8 sh\u00fam", + "sa\u014b c\u00ff\u00f3", + "sa\u014b ts\u025b\u0300\u025b c\u00ff\u00f3", + "sa\u014b nj\u00ffol\u00e1\u02bc", + "sa\u014b ty\u025b\u0300b ty\u025b\u0300b mb\u0289\u0300\u014b", + "sa\u014b mb\u0289\u0300\u014b", + "sa\u014b ngw\u0254\u0300\u02bc mb\u00ff\u025b", + "sa\u014b t\u00e0\u014ba tsets\u00e1\u02bc", + "sa\u014b mejwo\u014b\u00f3", + "sa\u014b l\u00f9m" + ], + "SHORTDAY": [ + "ly\u025b\u02bc\u025b\u0301 s\u1e85\u00ed\u014bt\u00e8", + "mvf\u00f2 ly\u025b\u030c\u02bc", + "mb\u0254\u0301\u0254nt\u00e8 mvf\u00f2 ly\u025b\u030c\u02bc", + "ts\u00e8ts\u025b\u0300\u025b ly\u025b\u030c\u02bc", + "mb\u0254\u0301\u0254nt\u00e8 tsets\u025b\u0300\u025b ly\u025b\u030c\u02bc", + "mvf\u00f2 m\u00e0ga ly\u025b\u030c\u02bc", + "m\u00e0ga ly\u025b\u030c\u02bc" + ], + "SHORTMONTH": [ + "sa\u014b tsets\u025b\u0300\u025b l\u00f9m", + "sa\u014b k\u00e0g ngw\u00f3\u014b", + "sa\u014b lepy\u00e8 sh\u00fam", + "sa\u014b c\u00ff\u00f3", + "sa\u014b ts\u025b\u0300\u025b c\u00ff\u00f3", + "sa\u014b nj\u00ffol\u00e1\u02bc", + "sa\u014b ty\u025b\u0300b ty\u025b\u0300b mb\u0289\u0300\u014b", + "sa\u014b mb\u0289\u0300\u014b", + "sa\u014b ngw\u0254\u0300\u02bc mb\u00ff\u025b", + "sa\u014b t\u00e0\u014ba tsets\u00e1\u02bc", + "sa\u014b mejwo\u014b\u00f3", + "sa\u014b l\u00f9m" + ], + "STANDALONEMONTH": [ + "sa\u014b tsets\u025b\u0300\u025b l\u00f9m", + "sa\u014b k\u00e0g ngw\u00f3\u014b", + "sa\u014b lepy\u00e8 sh\u00fam", + "sa\u014b c\u00ff\u00f3", + "sa\u014b ts\u025b\u0300\u025b c\u00ff\u00f3", + "sa\u014b nj\u00ffol\u00e1\u02bc", + "sa\u014b ty\u025b\u0300b ty\u025b\u0300b mb\u0289\u0300\u014b", + "sa\u014b mb\u0289\u0300\u014b", + "sa\u014b ngw\u0254\u0300\u02bc mb\u00ff\u025b", + "sa\u014b t\u00e0\u014ba tsets\u00e1\u02bc", + "sa\u014b mejwo\u014b\u00f3", + "sa\u014b l\u00f9m" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE , 'ly\u025b'\u030c\u02bc d 'na' MMMM, y", + "longDate": "'ly\u025b'\u030c\u02bc d 'na' MMMM, y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "nnh", + "localeID": "nnh", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_no-no.js b/1.6.6/i18n/angular-locale_no-no.js new file mode 100644 index 000000000..48b969e92 --- /dev/null +++ b/1.6.6/i18n/angular-locale_no-no.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "s\u00f8ndag", + "mandag", + "tirsdag", + "onsdag", + "torsdag", + "fredag", + "l\u00f8rdag" + ], + "ERANAMES": [ + "f\u00f8r Kristus", + "etter Kristus" + ], + "ERAS": [ + "f.Kr.", + "e.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "mars", + "april", + "mai", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "desember" + ], + "SHORTDAY": [ + "s\u00f8n.", + "man.", + "tir.", + "ons.", + "tor.", + "fre.", + "l\u00f8r." + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mar.", + "apr.", + "mai", + "jun.", + "jul.", + "aug.", + "sep.", + "okt.", + "nov.", + "des." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "mars", + "april", + "mai", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "desember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. MMM y HH:mm:ss", + "mediumDate": "d. MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.y HH:mm", + "shortDate": "dd.MM.y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "no-no", + "localeID": "no_NO", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_no.js b/1.6.6/i18n/angular-locale_no.js new file mode 100644 index 000000000..61c3b3d00 --- /dev/null +++ b/1.6.6/i18n/angular-locale_no.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "s\u00f8ndag", + "mandag", + "tirsdag", + "onsdag", + "torsdag", + "fredag", + "l\u00f8rdag" + ], + "ERANAMES": [ + "f\u00f8r Kristus", + "etter Kristus" + ], + "ERAS": [ + "f.Kr.", + "e.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "mars", + "april", + "mai", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "desember" + ], + "SHORTDAY": [ + "s\u00f8n.", + "man.", + "tir.", + "ons.", + "tor.", + "fre.", + "l\u00f8r." + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mar.", + "apr.", + "mai", + "jun.", + "jul.", + "aug.", + "sep.", + "okt.", + "nov.", + "des." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "mars", + "april", + "mai", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "desember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. MMM y HH:mm:ss", + "mediumDate": "d. MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.y HH:mm", + "shortDate": "dd.MM.y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "no", + "localeID": "no", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nus-ss.js b/1.6.6/i18n/angular-locale_nus-ss.js new file mode 100644 index 000000000..d3824dcb4 --- /dev/null +++ b/1.6.6/i18n/angular-locale_nus-ss.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "RW", + "T\u014a" + ], + "DAY": [ + "C\u00e4\u014b ku\u0254th", + "Jiec la\u0331t", + "R\u025bw l\u00e4tni", + "Di\u0254\u0331k l\u00e4tni", + "\u014auaan l\u00e4tni", + "Dhieec l\u00e4tni", + "B\u00e4k\u025bl l\u00e4tni" + ], + "ERANAMES": [ + "A ka\u0331n Yecu ni dap", + "\u0190 ca Yecu dap" + ], + "ERAS": [ + "AY", + "\u0190Y" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Tiop thar p\u025bt", + "P\u025bt", + "Du\u0254\u0331\u0254\u0331\u014b", + "Guak", + "Du\u00e4t", + "Kornyoot", + "Pay yie\u0331tni", + "Tho\u0331o\u0331r", + "T\u025b\u025br", + "Laath", + "Kur", + "Tio\u0331p in di\u0331i\u0331t" + ], + "SHORTDAY": [ + "C\u00e4\u014b", + "Jiec", + "R\u025bw", + "Di\u0254\u0331k", + "\u014auaan", + "Dhieec", + "B\u00e4k\u025bl" + ], + "SHORTMONTH": [ + "Tiop", + "P\u025bt", + "Du\u0254\u0331\u0254\u0331", + "Guak", + "Du\u00e4", + "Kor", + "Pay", + "Thoo", + "T\u025b\u025b", + "Laa", + "Kur", + "Tid" + ], + "STANDALONEMONTH": [ + "Tiop thar p\u025bt", + "P\u025bt", + "Du\u0254\u0331\u0254\u0331\u014b", + "Guak", + "Du\u00e4t", + "Kornyoot", + "Pay yie\u0331tni", + "Tho\u0331o\u0331r", + "T\u025b\u025br", + "Laath", + "Kur", + "Tio\u0331p in di\u0331i\u0331t" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/MM/y h:mm a", + "shortDate": "d/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "nus-ss", + "localeID": "nus_SS", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nus.js b/1.6.6/i18n/angular-locale_nus.js new file mode 100644 index 000000000..351dff878 --- /dev/null +++ b/1.6.6/i18n/angular-locale_nus.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "RW", + "T\u014a" + ], + "DAY": [ + "C\u00e4\u014b ku\u0254th", + "Jiec la\u0331t", + "R\u025bw l\u00e4tni", + "Di\u0254\u0331k l\u00e4tni", + "\u014auaan l\u00e4tni", + "Dhieec l\u00e4tni", + "B\u00e4k\u025bl l\u00e4tni" + ], + "ERANAMES": [ + "A ka\u0331n Yecu ni dap", + "\u0190 ca Yecu dap" + ], + "ERAS": [ + "AY", + "\u0190Y" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Tiop thar p\u025bt", + "P\u025bt", + "Du\u0254\u0331\u0254\u0331\u014b", + "Guak", + "Du\u00e4t", + "Kornyoot", + "Pay yie\u0331tni", + "Tho\u0331o\u0331r", + "T\u025b\u025br", + "Laath", + "Kur", + "Tio\u0331p in di\u0331i\u0331t" + ], + "SHORTDAY": [ + "C\u00e4\u014b", + "Jiec", + "R\u025bw", + "Di\u0254\u0331k", + "\u014auaan", + "Dhieec", + "B\u00e4k\u025bl" + ], + "SHORTMONTH": [ + "Tiop", + "P\u025bt", + "Du\u0254\u0331\u0254\u0331", + "Guak", + "Du\u00e4", + "Kor", + "Pay", + "Thoo", + "T\u025b\u025b", + "Laa", + "Kur", + "Tid" + ], + "STANDALONEMONTH": [ + "Tiop thar p\u025bt", + "P\u025bt", + "Du\u0254\u0331\u0254\u0331\u014b", + "Guak", + "Du\u00e4t", + "Kornyoot", + "Pay yie\u0331tni", + "Tho\u0331o\u0331r", + "T\u025b\u025br", + "Laath", + "Kur", + "Tio\u0331p in di\u0331i\u0331t" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/MM/y h:mm a", + "shortDate": "d/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a3", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "nus", + "localeID": "nus", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nyn-ug.js b/1.6.6/i18n/angular-locale_nyn-ug.js new file mode 100644 index 000000000..946c8c144 --- /dev/null +++ b/1.6.6/i18n/angular-locale_nyn-ug.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sande", + "Orwokubanza", + "Orwakabiri", + "Orwakashatu", + "Orwakana", + "Orwakataano", + "Orwamukaaga" + ], + "ERANAMES": [ + "Kurisito Atakaijire", + "Kurisito Yaijire" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Okwokubanza", + "Okwakabiri", + "Okwakashatu", + "Okwakana", + "Okwakataana", + "Okwamukaaga", + "Okwamushanju", + "Okwamunaana", + "Okwamwenda", + "Okwaikumi", + "Okwaikumi na kumwe", + "Okwaikumi na ibiri" + ], + "SHORTDAY": [ + "SAN", + "ORK", + "OKB", + "OKS", + "OKN", + "OKT", + "OMK" + ], + "SHORTMONTH": [ + "KBZ", + "KBR", + "KST", + "KKN", + "KTN", + "KMK", + "KMS", + "KMN", + "KMW", + "KKM", + "KNK", + "KNB" + ], + "STANDALONEMONTH": [ + "Okwokubanza", + "Okwakabiri", + "Okwakashatu", + "Okwakana", + "Okwakataana", + "Okwamukaaga", + "Okwamushanju", + "Okwamunaana", + "Okwamwenda", + "Okwaikumi", + "Okwaikumi na kumwe", + "Okwaikumi na ibiri" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "UGX", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "nyn-ug", + "localeID": "nyn_UG", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_nyn.js b/1.6.6/i18n/angular-locale_nyn.js new file mode 100644 index 000000000..856972932 --- /dev/null +++ b/1.6.6/i18n/angular-locale_nyn.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sande", + "Orwokubanza", + "Orwakabiri", + "Orwakashatu", + "Orwakana", + "Orwakataano", + "Orwamukaaga" + ], + "ERANAMES": [ + "Kurisito Atakaijire", + "Kurisito Yaijire" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Okwokubanza", + "Okwakabiri", + "Okwakashatu", + "Okwakana", + "Okwakataana", + "Okwamukaaga", + "Okwamushanju", + "Okwamunaana", + "Okwamwenda", + "Okwaikumi", + "Okwaikumi na kumwe", + "Okwaikumi na ibiri" + ], + "SHORTDAY": [ + "SAN", + "ORK", + "OKB", + "OKS", + "OKN", + "OKT", + "OMK" + ], + "SHORTMONTH": [ + "KBZ", + "KBR", + "KST", + "KKN", + "KTN", + "KMK", + "KMS", + "KMN", + "KMW", + "KKM", + "KNK", + "KNB" + ], + "STANDALONEMONTH": [ + "Okwokubanza", + "Okwakabiri", + "Okwakashatu", + "Okwakana", + "Okwakataana", + "Okwamukaaga", + "Okwamushanju", + "Okwamunaana", + "Okwamwenda", + "Okwaikumi", + "Okwaikumi na kumwe", + "Okwaikumi na ibiri" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "UGX", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "nyn", + "localeID": "nyn", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_om-et.js b/1.6.6/i18n/angular-locale_om-et.js new file mode 100644 index 000000000..0adcf1b1c --- /dev/null +++ b/1.6.6/i18n/angular-locale_om-et.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "WD", + "WB" + ], + "DAY": [ + "Dilbata", + "Wiixata", + "Qibxata", + "Roobii", + "Kamiisa", + "Jimaata", + "Sanbata" + ], + "ERANAMES": [ + "Dheengadda Jeesu", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Amajjii", + "Guraandhala", + "Bitooteessa", + "Elba", + "Caamsa", + "Waxabajjii", + "Adooleessa", + "Hagayya", + "Fuulbana", + "Onkololeessa", + "Sadaasa", + "Muddee" + ], + "SHORTDAY": [ + "Dil", + "Wix", + "Qib", + "Rob", + "Kam", + "Jim", + "San" + ], + "SHORTMONTH": [ + "Ama", + "Gur", + "Bit", + "Elb", + "Cam", + "Wax", + "Ado", + "Hag", + "Ful", + "Onk", + "Sad", + "Mud" + ], + "STANDALONEMONTH": [ + "Amajjii", + "Guraandhala", + "Bitooteessa", + "Elba", + "Caamsa", + "Waxabajjii", + "Adooleessa", + "Hagayya", + "Fuulbana", + "Onkololeessa", + "Sadaasa", + "Muddee" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "dd MMMM y", + "medium": "dd-MMM-y h:mm:ss a", + "mediumDate": "dd-MMM-y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/yy h:mm a", + "shortDate": "dd/MM/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Birr", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "om-et", + "localeID": "om_ET", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_om-ke.js b/1.6.6/i18n/angular-locale_om-ke.js new file mode 100644 index 000000000..ba8e91f38 --- /dev/null +++ b/1.6.6/i18n/angular-locale_om-ke.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "WD", + "WB" + ], + "DAY": [ + "Dilbata", + "Wiixata", + "Qibxata", + "Roobii", + "Kamiisa", + "Jimaata", + "Sanbata" + ], + "ERANAMES": [ + "Dheengadda Jeesu", + "CE" + ], + "ERAS": [ + "KD", + "CE" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Amajjii", + "Guraandhala", + "Bitooteessa", + "Elba", + "Caamsa", + "Waxabajjii", + "Adooleessa", + "Hagayya", + "Fuulbana", + "Onkololeessa", + "Sadaasa", + "Muddee" + ], + "SHORTDAY": [ + "Dil", + "Wix", + "Qib", + "Rob", + "Kam", + "Jim", + "San" + ], + "SHORTMONTH": [ + "Ama", + "Gur", + "Bit", + "Elb", + "Cam", + "Wax", + "Ado", + "Hag", + "Ful", + "Onk", + "Sad", + "Mud" + ], + "STANDALONEMONTH": [ + "Amajjii", + "Guraandhala", + "Bitooteessa", + "Elba", + "Caamsa", + "Waxabajjii", + "Adooleessa", + "Hagayya", + "Fuulbana", + "Onkololeessa", + "Sadaasa", + "Muddee" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "dd MMMM y", + "medium": "dd-MMM-y HH:mm:ss", + "mediumDate": "dd-MMM-y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "om-ke", + "localeID": "om_KE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_om.js b/1.6.6/i18n/angular-locale_om.js new file mode 100644 index 000000000..ed44a7bc4 --- /dev/null +++ b/1.6.6/i18n/angular-locale_om.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "WD", + "WB" + ], + "DAY": [ + "Dilbata", + "Wiixata", + "Qibxata", + "Roobii", + "Kamiisa", + "Jimaata", + "Sanbata" + ], + "ERANAMES": [ + "Dheengadda Jeesu", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Amajjii", + "Guraandhala", + "Bitooteessa", + "Elba", + "Caamsa", + "Waxabajjii", + "Adooleessa", + "Hagayya", + "Fuulbana", + "Onkololeessa", + "Sadaasa", + "Muddee" + ], + "SHORTDAY": [ + "Dil", + "Wix", + "Qib", + "Rob", + "Kam", + "Jim", + "San" + ], + "SHORTMONTH": [ + "Ama", + "Gur", + "Bit", + "Elb", + "Cam", + "Wax", + "Ado", + "Hag", + "Ful", + "Onk", + "Sad", + "Mud" + ], + "STANDALONEMONTH": [ + "Amajjii", + "Guraandhala", + "Bitooteessa", + "Elba", + "Caamsa", + "Waxabajjii", + "Adooleessa", + "Hagayya", + "Fuulbana", + "Onkololeessa", + "Sadaasa", + "Muddee" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "dd MMMM y", + "medium": "dd-MMM-y h:mm:ss a", + "mediumDate": "dd-MMM-y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/yy h:mm a", + "shortDate": "dd/MM/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Birr", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "om", + "localeID": "om", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_or-in.js b/1.6.6/i18n/angular-locale_or-in.js new file mode 100644 index 000000000..1e560908e --- /dev/null +++ b/1.6.6/i18n/angular-locale_or-in.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "am", + "pm" + ], + "DAY": [ + "\u0b30\u0b2c\u0b3f\u0b2c\u0b3e\u0b30", + "\u0b38\u0b4b\u0b2e\u0b2c\u0b3e\u0b30", + "\u0b2e\u0b19\u0b4d\u0b17\u0b33\u0b2c\u0b3e\u0b30", + "\u0b2c\u0b41\u0b27\u0b2c\u0b3e\u0b30", + "\u0b17\u0b41\u0b30\u0b41\u0b2c\u0b3e\u0b30", + "\u0b36\u0b41\u0b15\u0b4d\u0b30\u0b2c\u0b3e\u0b30", + "\u0b36\u0b28\u0b3f\u0b2c\u0b3e\u0b30" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0b1c\u0b3e\u0b28\u0b41\u0b06\u0b30\u0b40", + "\u0b2b\u0b47\u0b2c\u0b43\u0b06\u0b30\u0b40", + "\u0b2e\u0b3e\u0b30\u0b4d\u0b1a\u0b4d\u0b1a", + "\u0b05\u0b2a\u0b4d\u0b30\u0b47\u0b32", + "\u0b2e\u0b07", + "\u0b1c\u0b41\u0b28", + "\u0b1c\u0b41\u0b32\u0b3e\u0b07", + "\u0b05\u0b17\u0b37\u0b4d\u0b1f", + "\u0b38\u0b47\u0b2a\u0b4d\u0b1f\u0b47\u0b2e\u0b4d\u0b2c\u0b30", + "\u0b05\u0b15\u0b4d\u0b1f\u0b4b\u0b2c\u0b30", + "\u0b28\u0b2d\u0b47\u0b2e\u0b4d\u0b2c\u0b30", + "\u0b21\u0b3f\u0b38\u0b47\u0b2e\u0b4d\u0b2c\u0b30" + ], + "SHORTDAY": [ + "\u0b30\u0b2c\u0b3f", + "\u0b38\u0b4b\u0b2e", + "\u0b2e\u0b19\u0b4d\u0b17\u0b33", + "\u0b2c\u0b41\u0b27", + "\u0b17\u0b41\u0b30\u0b41", + "\u0b36\u0b41\u0b15\u0b4d\u0b30", + "\u0b36\u0b28\u0b3f" + ], + "SHORTMONTH": [ + "\u0b1c\u0b3e\u0b28\u0b41\u0b06\u0b30\u0b40", + "\u0b2b\u0b47\u0b2c\u0b43\u0b06\u0b30\u0b40", + "\u0b2e\u0b3e\u0b30\u0b4d\u0b1a\u0b4d\u0b1a", + "\u0b05\u0b2a\u0b4d\u0b30\u0b47\u0b32", + "\u0b2e\u0b07", + "\u0b1c\u0b41\u0b28", + "\u0b1c\u0b41\u0b32\u0b3e\u0b07", + "\u0b05\u0b17\u0b37\u0b4d\u0b1f", + "\u0b38\u0b47\u0b2a\u0b4d\u0b1f\u0b47\u0b2e\u0b4d\u0b2c\u0b30", + "\u0b05\u0b15\u0b4d\u0b1f\u0b4b\u0b2c\u0b30", + "\u0b28\u0b2d\u0b47\u0b2e\u0b4d\u0b2c\u0b30", + "\u0b21\u0b3f\u0b38\u0b47\u0b2e\u0b4d\u0b2c\u0b30" + ], + "STANDALONEMONTH": [ + "\u0b1c\u0b3e\u0b28\u0b41\u0b06\u0b30\u0b40", + "\u0b2b\u0b47\u0b2c\u0b43\u0b06\u0b30\u0b40", + "\u0b2e\u0b3e\u0b30\u0b4d\u0b1a\u0b4d\u0b1a", + "\u0b05\u0b2a\u0b4d\u0b30\u0b47\u0b32", + "\u0b2e\u0b07", + "\u0b1c\u0b41\u0b28", + "\u0b1c\u0b41\u0b32\u0b3e\u0b07", + "\u0b05\u0b17\u0b37\u0b4d\u0b1f", + "\u0b38\u0b47\u0b2a\u0b4d\u0b1f\u0b47\u0b2e\u0b4d\u0b2c\u0b30", + "\u0b05\u0b15\u0b4d\u0b1f\u0b4b\u0b2c\u0b30", + "\u0b28\u0b2d\u0b47\u0b2e\u0b4d\u0b2c\u0b30", + "\u0b21\u0b3f\u0b38\u0b47\u0b2e\u0b4d\u0b2c\u0b30" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d-M-yy h:mm a", + "shortDate": "d-M-yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "or-in", + "localeID": "or_IN", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_or.js b/1.6.6/i18n/angular-locale_or.js new file mode 100644 index 000000000..9e4623524 --- /dev/null +++ b/1.6.6/i18n/angular-locale_or.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "am", + "pm" + ], + "DAY": [ + "\u0b30\u0b2c\u0b3f\u0b2c\u0b3e\u0b30", + "\u0b38\u0b4b\u0b2e\u0b2c\u0b3e\u0b30", + "\u0b2e\u0b19\u0b4d\u0b17\u0b33\u0b2c\u0b3e\u0b30", + "\u0b2c\u0b41\u0b27\u0b2c\u0b3e\u0b30", + "\u0b17\u0b41\u0b30\u0b41\u0b2c\u0b3e\u0b30", + "\u0b36\u0b41\u0b15\u0b4d\u0b30\u0b2c\u0b3e\u0b30", + "\u0b36\u0b28\u0b3f\u0b2c\u0b3e\u0b30" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0b1c\u0b3e\u0b28\u0b41\u0b06\u0b30\u0b40", + "\u0b2b\u0b47\u0b2c\u0b43\u0b06\u0b30\u0b40", + "\u0b2e\u0b3e\u0b30\u0b4d\u0b1a\u0b4d\u0b1a", + "\u0b05\u0b2a\u0b4d\u0b30\u0b47\u0b32", + "\u0b2e\u0b07", + "\u0b1c\u0b41\u0b28", + "\u0b1c\u0b41\u0b32\u0b3e\u0b07", + "\u0b05\u0b17\u0b37\u0b4d\u0b1f", + "\u0b38\u0b47\u0b2a\u0b4d\u0b1f\u0b47\u0b2e\u0b4d\u0b2c\u0b30", + "\u0b05\u0b15\u0b4d\u0b1f\u0b4b\u0b2c\u0b30", + "\u0b28\u0b2d\u0b47\u0b2e\u0b4d\u0b2c\u0b30", + "\u0b21\u0b3f\u0b38\u0b47\u0b2e\u0b4d\u0b2c\u0b30" + ], + "SHORTDAY": [ + "\u0b30\u0b2c\u0b3f", + "\u0b38\u0b4b\u0b2e", + "\u0b2e\u0b19\u0b4d\u0b17\u0b33", + "\u0b2c\u0b41\u0b27", + "\u0b17\u0b41\u0b30\u0b41", + "\u0b36\u0b41\u0b15\u0b4d\u0b30", + "\u0b36\u0b28\u0b3f" + ], + "SHORTMONTH": [ + "\u0b1c\u0b3e\u0b28\u0b41\u0b06\u0b30\u0b40", + "\u0b2b\u0b47\u0b2c\u0b43\u0b06\u0b30\u0b40", + "\u0b2e\u0b3e\u0b30\u0b4d\u0b1a\u0b4d\u0b1a", + "\u0b05\u0b2a\u0b4d\u0b30\u0b47\u0b32", + "\u0b2e\u0b07", + "\u0b1c\u0b41\u0b28", + "\u0b1c\u0b41\u0b32\u0b3e\u0b07", + "\u0b05\u0b17\u0b37\u0b4d\u0b1f", + "\u0b38\u0b47\u0b2a\u0b4d\u0b1f\u0b47\u0b2e\u0b4d\u0b2c\u0b30", + "\u0b05\u0b15\u0b4d\u0b1f\u0b4b\u0b2c\u0b30", + "\u0b28\u0b2d\u0b47\u0b2e\u0b4d\u0b2c\u0b30", + "\u0b21\u0b3f\u0b38\u0b47\u0b2e\u0b4d\u0b2c\u0b30" + ], + "STANDALONEMONTH": [ + "\u0b1c\u0b3e\u0b28\u0b41\u0b06\u0b30\u0b40", + "\u0b2b\u0b47\u0b2c\u0b43\u0b06\u0b30\u0b40", + "\u0b2e\u0b3e\u0b30\u0b4d\u0b1a\u0b4d\u0b1a", + "\u0b05\u0b2a\u0b4d\u0b30\u0b47\u0b32", + "\u0b2e\u0b07", + "\u0b1c\u0b41\u0b28", + "\u0b1c\u0b41\u0b32\u0b3e\u0b07", + "\u0b05\u0b17\u0b37\u0b4d\u0b1f", + "\u0b38\u0b47\u0b2a\u0b4d\u0b1f\u0b47\u0b2e\u0b4d\u0b2c\u0b30", + "\u0b05\u0b15\u0b4d\u0b1f\u0b4b\u0b2c\u0b30", + "\u0b28\u0b2d\u0b47\u0b2e\u0b4d\u0b2c\u0b30", + "\u0b21\u0b3f\u0b38\u0b47\u0b2e\u0b4d\u0b2c\u0b30" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d-M-yy h:mm a", + "shortDate": "d-M-yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "or", + "localeID": "or", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_os-ge.js b/1.6.6/i18n/angular-locale_os-ge.js new file mode 100644 index 000000000..e90201223 --- /dev/null +++ b/1.6.6/i18n/angular-locale_os-ge.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u04d5\u043c\u0431\u0438\u0441\u0431\u043e\u043d\u044b \u0440\u0430\u0437\u043c\u04d5", + "\u04d5\u043c\u0431\u0438\u0441\u0431\u043e\u043d\u044b \u0444\u04d5\u0441\u0442\u04d5" + ], + "DAY": [ + "\u0445\u0443\u044b\u0446\u0430\u0443\u0431\u043e\u043d", + "\u043a\u044a\u0443\u044b\u0440\u0438\u0441\u04d5\u0440", + "\u0434\u044b\u0446\u0446\u04d5\u0433", + "\u04d5\u0440\u0442\u044b\u0446\u0446\u04d5\u0433", + "\u0446\u044b\u043f\u043f\u04d5\u0440\u04d5\u043c", + "\u043c\u0430\u0439\u0440\u04d5\u043c\u0431\u043e\u043d", + "\u0441\u0430\u0431\u0430\u0442" + ], + "ERANAMES": [ + "\u043d.\u0434.\u0430.", + "\u043d.\u0434." + ], + "ERAS": [ + "\u043d.\u0434.\u0430.", + "\u043d.\u0434." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044b", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044b", + "\u043c\u0430\u0440\u0442\u044a\u0438\u0439\u044b", + "\u0430\u043f\u0440\u0435\u043b\u044b", + "\u043c\u0430\u0439\u044b", + "\u0438\u044e\u043d\u044b", + "\u0438\u044e\u043b\u044b", + "\u0430\u0432\u0433\u0443\u0441\u0442\u044b", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044b", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044b", + "\u043d\u043e\u044f\u0431\u0440\u044b", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044b" + ], + "SHORTDAY": [ + "\u0445\u0446\u0431", + "\u043a\u0440\u0441", + "\u0434\u0446\u0433", + "\u04d5\u0440\u0442", + "\u0446\u043f\u0440", + "\u043c\u0440\u0431", + "\u0441\u0431\u0442" + ], + "SHORTMONTH": [ + "\u044f\u043d\u0432.", + "\u0444\u0435\u0432.", + "\u043c\u0430\u0440.", + "\u0430\u043f\u0440.", + "\u043c\u0430\u0439\u044b", + "\u0438\u044e\u043d\u044b", + "\u0438\u044e\u043b\u044b", + "\u0430\u0432\u0433.", + "\u0441\u0435\u043d.", + "\u043e\u043a\u0442.", + "\u043d\u043e\u044f.", + "\u0434\u0435\u043a." + ], + "STANDALONEMONTH": [ + "\u042f\u043d\u0432\u0430\u0440\u044c", + "\u0424\u0435\u0432\u0440\u0430\u043b\u044c", + "\u041c\u0430\u0440\u0442\u044a\u0438", + "\u0410\u043f\u0440\u0435\u043b\u044c", + "\u041c\u0430\u0439", + "\u0418\u044e\u043d\u044c", + "\u0418\u044e\u043b\u044c", + "\u0410\u0432\u0433\u0443\u0441\u0442", + "\u0421\u0435\u043d\u0442\u044f\u0431\u0440\u044c", + "\u041e\u043a\u0442\u044f\u0431\u0440\u044c", + "\u041d\u043e\u044f\u0431\u0440\u044c", + "\u0414\u0435\u043a\u0430\u0431\u0440\u044c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM, y '\u0430\u0437'", + "longDate": "d MMMM, y '\u0430\u0437'", + "medium": "dd MMM y '\u0430\u0437' HH:mm:ss", + "mediumDate": "dd MMM y '\u0430\u0437'", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "GEL", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "os-ge", + "localeID": "os_GE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_os-ru.js b/1.6.6/i18n/angular-locale_os-ru.js new file mode 100644 index 000000000..c31981c48 --- /dev/null +++ b/1.6.6/i18n/angular-locale_os-ru.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u04d5\u043c\u0431\u0438\u0441\u0431\u043e\u043d\u044b \u0440\u0430\u0437\u043c\u04d5", + "\u04d5\u043c\u0431\u0438\u0441\u0431\u043e\u043d\u044b \u0444\u04d5\u0441\u0442\u04d5" + ], + "DAY": [ + "\u0445\u0443\u044b\u0446\u0430\u0443\u0431\u043e\u043d", + "\u043a\u044a\u0443\u044b\u0440\u0438\u0441\u04d5\u0440", + "\u0434\u044b\u0446\u0446\u04d5\u0433", + "\u04d5\u0440\u0442\u044b\u0446\u0446\u04d5\u0433", + "\u0446\u044b\u043f\u043f\u04d5\u0440\u04d5\u043c", + "\u043c\u0430\u0439\u0440\u04d5\u043c\u0431\u043e\u043d", + "\u0441\u0430\u0431\u0430\u0442" + ], + "ERANAMES": [ + "\u043d.\u0434.\u0430.", + "\u043d.\u0434." + ], + "ERAS": [ + "\u043d.\u0434.\u0430.", + "\u043d.\u0434." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044b", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044b", + "\u043c\u0430\u0440\u0442\u044a\u0438\u0439\u044b", + "\u0430\u043f\u0440\u0435\u043b\u044b", + "\u043c\u0430\u0439\u044b", + "\u0438\u044e\u043d\u044b", + "\u0438\u044e\u043b\u044b", + "\u0430\u0432\u0433\u0443\u0441\u0442\u044b", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044b", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044b", + "\u043d\u043e\u044f\u0431\u0440\u044b", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044b" + ], + "SHORTDAY": [ + "\u0445\u0446\u0431", + "\u043a\u0440\u0441", + "\u0434\u0446\u0433", + "\u04d5\u0440\u0442", + "\u0446\u043f\u0440", + "\u043c\u0440\u0431", + "\u0441\u0431\u0442" + ], + "SHORTMONTH": [ + "\u044f\u043d\u0432.", + "\u0444\u0435\u0432.", + "\u043c\u0430\u0440.", + "\u0430\u043f\u0440.", + "\u043c\u0430\u0439\u044b", + "\u0438\u044e\u043d\u044b", + "\u0438\u044e\u043b\u044b", + "\u0430\u0432\u0433.", + "\u0441\u0435\u043d.", + "\u043e\u043a\u0442.", + "\u043d\u043e\u044f.", + "\u0434\u0435\u043a." + ], + "STANDALONEMONTH": [ + "\u042f\u043d\u0432\u0430\u0440\u044c", + "\u0424\u0435\u0432\u0440\u0430\u043b\u044c", + "\u041c\u0430\u0440\u0442\u044a\u0438", + "\u0410\u043f\u0440\u0435\u043b\u044c", + "\u041c\u0430\u0439", + "\u0418\u044e\u043d\u044c", + "\u0418\u044e\u043b\u044c", + "\u0410\u0432\u0433\u0443\u0441\u0442", + "\u0421\u0435\u043d\u0442\u044f\u0431\u0440\u044c", + "\u041e\u043a\u0442\u044f\u0431\u0440\u044c", + "\u041d\u043e\u044f\u0431\u0440\u044c", + "\u0414\u0435\u043a\u0430\u0431\u0440\u044c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM, y '\u0430\u0437'", + "longDate": "d MMMM, y '\u0430\u0437'", + "medium": "dd MMM y '\u0430\u0437' HH:mm:ss", + "mediumDate": "dd MMM y '\u0430\u0437'", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20bd", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "os-ru", + "localeID": "os_RU", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_os.js b/1.6.6/i18n/angular-locale_os.js new file mode 100644 index 000000000..1ac44eae6 --- /dev/null +++ b/1.6.6/i18n/angular-locale_os.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u04d5\u043c\u0431\u0438\u0441\u0431\u043e\u043d\u044b \u0440\u0430\u0437\u043c\u04d5", + "\u04d5\u043c\u0431\u0438\u0441\u0431\u043e\u043d\u044b \u0444\u04d5\u0441\u0442\u04d5" + ], + "DAY": [ + "\u0445\u0443\u044b\u0446\u0430\u0443\u0431\u043e\u043d", + "\u043a\u044a\u0443\u044b\u0440\u0438\u0441\u04d5\u0440", + "\u0434\u044b\u0446\u0446\u04d5\u0433", + "\u04d5\u0440\u0442\u044b\u0446\u0446\u04d5\u0433", + "\u0446\u044b\u043f\u043f\u04d5\u0440\u04d5\u043c", + "\u043c\u0430\u0439\u0440\u04d5\u043c\u0431\u043e\u043d", + "\u0441\u0430\u0431\u0430\u0442" + ], + "ERANAMES": [ + "\u043d.\u0434.\u0430.", + "\u043d.\u0434." + ], + "ERAS": [ + "\u043d.\u0434.\u0430.", + "\u043d.\u0434." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044b", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044b", + "\u043c\u0430\u0440\u0442\u044a\u0438\u0439\u044b", + "\u0430\u043f\u0440\u0435\u043b\u044b", + "\u043c\u0430\u0439\u044b", + "\u0438\u044e\u043d\u044b", + "\u0438\u044e\u043b\u044b", + "\u0430\u0432\u0433\u0443\u0441\u0442\u044b", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044b", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044b", + "\u043d\u043e\u044f\u0431\u0440\u044b", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044b" + ], + "SHORTDAY": [ + "\u0445\u0446\u0431", + "\u043a\u0440\u0441", + "\u0434\u0446\u0433", + "\u04d5\u0440\u0442", + "\u0446\u043f\u0440", + "\u043c\u0440\u0431", + "\u0441\u0431\u0442" + ], + "SHORTMONTH": [ + "\u044f\u043d\u0432.", + "\u0444\u0435\u0432.", + "\u043c\u0430\u0440.", + "\u0430\u043f\u0440.", + "\u043c\u0430\u0439\u044b", + "\u0438\u044e\u043d\u044b", + "\u0438\u044e\u043b\u044b", + "\u0430\u0432\u0433.", + "\u0441\u0435\u043d.", + "\u043e\u043a\u0442.", + "\u043d\u043e\u044f.", + "\u0434\u0435\u043a." + ], + "STANDALONEMONTH": [ + "\u042f\u043d\u0432\u0430\u0440\u044c", + "\u0424\u0435\u0432\u0440\u0430\u043b\u044c", + "\u041c\u0430\u0440\u0442\u044a\u0438", + "\u0410\u043f\u0440\u0435\u043b\u044c", + "\u041c\u0430\u0439", + "\u0418\u044e\u043d\u044c", + "\u0418\u044e\u043b\u044c", + "\u0410\u0432\u0433\u0443\u0441\u0442", + "\u0421\u0435\u043d\u0442\u044f\u0431\u0440\u044c", + "\u041e\u043a\u0442\u044f\u0431\u0440\u044c", + "\u041d\u043e\u044f\u0431\u0440\u044c", + "\u0414\u0435\u043a\u0430\u0431\u0440\u044c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM, y '\u0430\u0437'", + "longDate": "d MMMM, y '\u0430\u0437'", + "medium": "dd MMM y '\u0430\u0437' HH:mm:ss", + "mediumDate": "dd MMM y '\u0430\u0437'", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "GEL", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "os", + "localeID": "os", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_pa-arab-pk.js b/1.6.6/i18n/angular-locale_pa-arab-pk.js new file mode 100644 index 000000000..fd36b6c31 --- /dev/null +++ b/1.6.6/i18n/angular-locale_pa-arab-pk.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u0627\u062a\u0648\u0627\u0631", + "\u067e\u06cc\u0631", + "\u0645\u0646\u06af\u0644", + "\u0628\u064f\u062f\u06be", + "\u062c\u0645\u0639\u0631\u0627\u062a", + "\u062c\u0645\u0639\u06c1", + "\u06c1\u0641\u062a\u06c1" + ], + "ERANAMES": [ + "\u0627\u064a\u0633\u0627\u067e\u0648\u0631\u0648", + "\u0633\u06ba" + ], + "ERAS": [ + "\u0627\u064a\u0633\u0627\u067e\u0648\u0631\u0648", + "\u0633\u06ba" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u062c\u0646\u0648\u0631\u06cc", + "\u0641\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u0626", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u0626\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u062a\u0648\u0627\u0631", + "\u067e\u06cc\u0631", + "\u0645\u0646\u06af\u0644", + "\u0628\u064f\u062f\u06be", + "\u062c\u0645\u0639\u0631\u0627\u062a", + "\u062c\u0645\u0639\u06c1", + "\u06c1\u0641\u062a\u06c1" + ], + "SHORTMONTH": [ + "\u062c\u0646\u0648\u0631\u06cc", + "\u0641\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u0626", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u0626\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u062c\u0646\u0648\u0631\u06cc", + "\u0641\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u0626", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u0626\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rs", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "pa-arab-pk", + "localeID": "pa_Arab_PK", + "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_pa-arab.js b/1.6.6/i18n/angular-locale_pa-arab.js new file mode 100644 index 000000000..5ddf75247 --- /dev/null +++ b/1.6.6/i18n/angular-locale_pa-arab.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u0627\u062a\u0648\u0627\u0631", + "\u067e\u06cc\u0631", + "\u0645\u0646\u06af\u0644", + "\u0628\u064f\u062f\u06be", + "\u062c\u0645\u0639\u0631\u0627\u062a", + "\u062c\u0645\u0639\u06c1", + "\u06c1\u0641\u062a\u06c1" + ], + "ERANAMES": [ + "\u0627\u064a\u0633\u0627\u067e\u0648\u0631\u0648", + "\u0633\u06ba" + ], + "ERAS": [ + "\u0627\u064a\u0633\u0627\u067e\u0648\u0631\u0648", + "\u0633\u06ba" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u062c\u0646\u0648\u0631\u06cc", + "\u0641\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u0626", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u0626\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u062a\u0648\u0627\u0631", + "\u067e\u06cc\u0631", + "\u0645\u0646\u06af\u0644", + "\u0628\u064f\u062f\u06be", + "\u062c\u0645\u0639\u0631\u0627\u062a", + "\u062c\u0645\u0639\u06c1", + "\u06c1\u0641\u062a\u06c1" + ], + "SHORTMONTH": [ + "\u062c\u0646\u0648\u0631\u06cc", + "\u0641\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u0626", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u0626\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u062c\u0646\u0648\u0631\u06cc", + "\u0641\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u0626", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u0626\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rs", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "pa-arab", + "localeID": "pa_Arab", + "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_pa-guru-in.js b/1.6.6/i18n/angular-locale_pa-guru-in.js new file mode 100644 index 000000000..a1378f2af --- /dev/null +++ b/1.6.6/i18n/angular-locale_pa-guru-in.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0a2a\u0a42.\u0a26\u0a41.", + "\u0a2c\u0a3e.\u0a26\u0a41." + ], + "DAY": [ + "\u0a10\u0a24\u0a35\u0a3e\u0a30", + "\u0a38\u0a4b\u0a2e\u0a35\u0a3e\u0a30", + "\u0a2e\u0a70\u0a17\u0a32\u0a35\u0a3e\u0a30", + "\u0a2c\u0a41\u0a71\u0a27\u0a35\u0a3e\u0a30", + "\u0a35\u0a40\u0a30\u0a35\u0a3e\u0a30", + "\u0a38\u0a3c\u0a41\u0a71\u0a15\u0a30\u0a35\u0a3e\u0a30", + "\u0a38\u0a3c\u0a28\u0a3f\u0a71\u0a1a\u0a30\u0a35\u0a3e\u0a30" + ], + "ERANAMES": [ + "\u0a08\u0a38\u0a35\u0a40 \u0a2a\u0a42\u0a30\u0a35", + "\u0a08\u0a38\u0a35\u0a40 \u0a38\u0a70\u0a28" + ], + "ERAS": [ + "\u0a08. \u0a2a\u0a42.", + "\u0a38\u0a70\u0a28" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0a1c\u0a28\u0a35\u0a30\u0a40", + "\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40", + "\u0a2e\u0a3e\u0a30\u0a1a", + "\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32", + "\u0a2e\u0a08", + "\u0a1c\u0a42\u0a28", + "\u0a1c\u0a41\u0a32\u0a3e\u0a08", + "\u0a05\u0a17\u0a38\u0a24", + "\u0a38\u0a24\u0a70\u0a2c\u0a30", + "\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30", + "\u0a28\u0a35\u0a70\u0a2c\u0a30", + "\u0a26\u0a38\u0a70\u0a2c\u0a30" + ], + "SHORTDAY": [ + "\u0a10\u0a24", + "\u0a38\u0a4b\u0a2e", + "\u0a2e\u0a70\u0a17\u0a32", + "\u0a2c\u0a41\u0a71\u0a27", + "\u0a35\u0a40\u0a30", + "\u0a38\u0a3c\u0a41\u0a71\u0a15\u0a30", + "\u0a38\u0a3c\u0a28\u0a3f\u0a71\u0a1a\u0a30" + ], + "SHORTMONTH": [ + "\u0a1c\u0a28", + "\u0a2b\u0a3c\u0a30", + "\u0a2e\u0a3e\u0a30\u0a1a", + "\u0a05\u0a2a\u0a4d\u0a30\u0a48", + "\u0a2e\u0a08", + "\u0a1c\u0a42\u0a28", + "\u0a1c\u0a41\u0a32\u0a3e", + "\u0a05\u0a17", + "\u0a38\u0a24\u0a70", + "\u0a05\u0a15\u0a24\u0a42", + "\u0a28\u0a35\u0a70", + "\u0a26\u0a38\u0a70" + ], + "STANDALONEMONTH": [ + "\u0a1c\u0a28\u0a35\u0a30\u0a40", + "\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40", + "\u0a2e\u0a3e\u0a30\u0a1a", + "\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32", + "\u0a2e\u0a08", + "\u0a1c\u0a42\u0a28", + "\u0a1c\u0a41\u0a32\u0a3e\u0a08", + "\u0a05\u0a17\u0a38\u0a24", + "\u0a38\u0a24\u0a70\u0a2c\u0a30", + "\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30", + "\u0a28\u0a35\u0a70\u0a2c\u0a30", + "\u0a26\u0a38\u0a70\u0a2c\u0a30" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "pa-guru-in", + "localeID": "pa_Guru_IN", + "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_pa-guru.js b/1.6.6/i18n/angular-locale_pa-guru.js new file mode 100644 index 000000000..1b470081d --- /dev/null +++ b/1.6.6/i18n/angular-locale_pa-guru.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0a2a\u0a42.\u0a26\u0a41.", + "\u0a2c\u0a3e.\u0a26\u0a41." + ], + "DAY": [ + "\u0a10\u0a24\u0a35\u0a3e\u0a30", + "\u0a38\u0a4b\u0a2e\u0a35\u0a3e\u0a30", + "\u0a2e\u0a70\u0a17\u0a32\u0a35\u0a3e\u0a30", + "\u0a2c\u0a41\u0a71\u0a27\u0a35\u0a3e\u0a30", + "\u0a35\u0a40\u0a30\u0a35\u0a3e\u0a30", + "\u0a38\u0a3c\u0a41\u0a71\u0a15\u0a30\u0a35\u0a3e\u0a30", + "\u0a38\u0a3c\u0a28\u0a3f\u0a71\u0a1a\u0a30\u0a35\u0a3e\u0a30" + ], + "ERANAMES": [ + "\u0a08\u0a38\u0a35\u0a40 \u0a2a\u0a42\u0a30\u0a35", + "\u0a08\u0a38\u0a35\u0a40 \u0a38\u0a70\u0a28" + ], + "ERAS": [ + "\u0a08. \u0a2a\u0a42.", + "\u0a38\u0a70\u0a28" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0a1c\u0a28\u0a35\u0a30\u0a40", + "\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40", + "\u0a2e\u0a3e\u0a30\u0a1a", + "\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32", + "\u0a2e\u0a08", + "\u0a1c\u0a42\u0a28", + "\u0a1c\u0a41\u0a32\u0a3e\u0a08", + "\u0a05\u0a17\u0a38\u0a24", + "\u0a38\u0a24\u0a70\u0a2c\u0a30", + "\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30", + "\u0a28\u0a35\u0a70\u0a2c\u0a30", + "\u0a26\u0a38\u0a70\u0a2c\u0a30" + ], + "SHORTDAY": [ + "\u0a10\u0a24", + "\u0a38\u0a4b\u0a2e", + "\u0a2e\u0a70\u0a17\u0a32", + "\u0a2c\u0a41\u0a71\u0a27", + "\u0a35\u0a40\u0a30", + "\u0a38\u0a3c\u0a41\u0a71\u0a15\u0a30", + "\u0a38\u0a3c\u0a28\u0a3f\u0a71\u0a1a\u0a30" + ], + "SHORTMONTH": [ + "\u0a1c\u0a28", + "\u0a2b\u0a3c\u0a30", + "\u0a2e\u0a3e\u0a30\u0a1a", + "\u0a05\u0a2a\u0a4d\u0a30\u0a48", + "\u0a2e\u0a08", + "\u0a1c\u0a42\u0a28", + "\u0a1c\u0a41\u0a32\u0a3e", + "\u0a05\u0a17", + "\u0a38\u0a24\u0a70", + "\u0a05\u0a15\u0a24\u0a42", + "\u0a28\u0a35\u0a70", + "\u0a26\u0a38\u0a70" + ], + "STANDALONEMONTH": [ + "\u0a1c\u0a28\u0a35\u0a30\u0a40", + "\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40", + "\u0a2e\u0a3e\u0a30\u0a1a", + "\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32", + "\u0a2e\u0a08", + "\u0a1c\u0a42\u0a28", + "\u0a1c\u0a41\u0a32\u0a3e\u0a08", + "\u0a05\u0a17\u0a38\u0a24", + "\u0a38\u0a24\u0a70\u0a2c\u0a30", + "\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30", + "\u0a28\u0a35\u0a70\u0a2c\u0a30", + "\u0a26\u0a38\u0a70\u0a2c\u0a30" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "pa-guru", + "localeID": "pa_Guru", + "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_pa.js b/1.6.6/i18n/angular-locale_pa.js new file mode 100644 index 000000000..b1d9d5153 --- /dev/null +++ b/1.6.6/i18n/angular-locale_pa.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0a2a\u0a42.\u0a26\u0a41.", + "\u0a2c\u0a3e.\u0a26\u0a41." + ], + "DAY": [ + "\u0a10\u0a24\u0a35\u0a3e\u0a30", + "\u0a38\u0a4b\u0a2e\u0a35\u0a3e\u0a30", + "\u0a2e\u0a70\u0a17\u0a32\u0a35\u0a3e\u0a30", + "\u0a2c\u0a41\u0a71\u0a27\u0a35\u0a3e\u0a30", + "\u0a35\u0a40\u0a30\u0a35\u0a3e\u0a30", + "\u0a38\u0a3c\u0a41\u0a71\u0a15\u0a30\u0a35\u0a3e\u0a30", + "\u0a38\u0a3c\u0a28\u0a3f\u0a71\u0a1a\u0a30\u0a35\u0a3e\u0a30" + ], + "ERANAMES": [ + "\u0a08\u0a38\u0a35\u0a40 \u0a2a\u0a42\u0a30\u0a35", + "\u0a08\u0a38\u0a35\u0a40 \u0a38\u0a70\u0a28" + ], + "ERAS": [ + "\u0a08. \u0a2a\u0a42.", + "\u0a38\u0a70\u0a28" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0a1c\u0a28\u0a35\u0a30\u0a40", + "\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40", + "\u0a2e\u0a3e\u0a30\u0a1a", + "\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32", + "\u0a2e\u0a08", + "\u0a1c\u0a42\u0a28", + "\u0a1c\u0a41\u0a32\u0a3e\u0a08", + "\u0a05\u0a17\u0a38\u0a24", + "\u0a38\u0a24\u0a70\u0a2c\u0a30", + "\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30", + "\u0a28\u0a35\u0a70\u0a2c\u0a30", + "\u0a26\u0a38\u0a70\u0a2c\u0a30" + ], + "SHORTDAY": [ + "\u0a10\u0a24", + "\u0a38\u0a4b\u0a2e", + "\u0a2e\u0a70\u0a17\u0a32", + "\u0a2c\u0a41\u0a71\u0a27", + "\u0a35\u0a40\u0a30", + "\u0a38\u0a3c\u0a41\u0a71\u0a15\u0a30", + "\u0a38\u0a3c\u0a28\u0a3f\u0a71\u0a1a\u0a30" + ], + "SHORTMONTH": [ + "\u0a1c\u0a28", + "\u0a2b\u0a3c\u0a30", + "\u0a2e\u0a3e\u0a30\u0a1a", + "\u0a05\u0a2a\u0a4d\u0a30\u0a48", + "\u0a2e\u0a08", + "\u0a1c\u0a42\u0a28", + "\u0a1c\u0a41\u0a32\u0a3e", + "\u0a05\u0a17", + "\u0a38\u0a24\u0a70", + "\u0a05\u0a15\u0a24\u0a42", + "\u0a28\u0a35\u0a70", + "\u0a26\u0a38\u0a70" + ], + "STANDALONEMONTH": [ + "\u0a1c\u0a28\u0a35\u0a30\u0a40", + "\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40", + "\u0a2e\u0a3e\u0a30\u0a1a", + "\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32", + "\u0a2e\u0a08", + "\u0a1c\u0a42\u0a28", + "\u0a1c\u0a41\u0a32\u0a3e\u0a08", + "\u0a05\u0a17\u0a38\u0a24", + "\u0a38\u0a24\u0a70\u0a2c\u0a30", + "\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30", + "\u0a28\u0a35\u0a70\u0a2c\u0a30", + "\u0a26\u0a38\u0a70\u0a2c\u0a30" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "pa", + "localeID": "pa", + "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_pl-pl.js b/1.6.6/i18n/angular-locale_pl-pl.js new file mode 100644 index 000000000..3ff2180ec --- /dev/null +++ b/1.6.6/i18n/angular-locale_pl-pl.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "niedziela", + "poniedzia\u0142ek", + "wtorek", + "\u015broda", + "czwartek", + "pi\u0105tek", + "sobota" + ], + "ERANAMES": [ + "przed nasz\u0105 er\u0105", + "naszej ery" + ], + "ERAS": [ + "p.n.e.", + "n.e." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "stycznia", + "lutego", + "marca", + "kwietnia", + "maja", + "czerwca", + "lipca", + "sierpnia", + "wrze\u015bnia", + "pa\u017adziernika", + "listopada", + "grudnia" + ], + "SHORTDAY": [ + "niedz.", + "pon.", + "wt.", + "\u015br.", + "czw.", + "pt.", + "sob." + ], + "SHORTMONTH": [ + "sty", + "lut", + "mar", + "kwi", + "maj", + "cze", + "lip", + "sie", + "wrz", + "pa\u017a", + "lis", + "gru" + ], + "STANDALONEMONTH": [ + "stycze\u0144", + "luty", + "marzec", + "kwiecie\u0144", + "maj", + "czerwiec", + "lipiec", + "sierpie\u0144", + "wrzesie\u0144", + "pa\u017adziernik", + "listopad", + "grudzie\u0144" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.y HH:mm", + "shortDate": "dd.MM.y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "z\u0142", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "pl-pl", + "localeID": "pl_PL", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i != 1 && i % 10 >= 0 && i % 10 <= 1 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 12 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_pl.js b/1.6.6/i18n/angular-locale_pl.js new file mode 100644 index 000000000..5816af8aa --- /dev/null +++ b/1.6.6/i18n/angular-locale_pl.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "niedziela", + "poniedzia\u0142ek", + "wtorek", + "\u015broda", + "czwartek", + "pi\u0105tek", + "sobota" + ], + "ERANAMES": [ + "przed nasz\u0105 er\u0105", + "naszej ery" + ], + "ERAS": [ + "p.n.e.", + "n.e." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "stycznia", + "lutego", + "marca", + "kwietnia", + "maja", + "czerwca", + "lipca", + "sierpnia", + "wrze\u015bnia", + "pa\u017adziernika", + "listopada", + "grudnia" + ], + "SHORTDAY": [ + "niedz.", + "pon.", + "wt.", + "\u015br.", + "czw.", + "pt.", + "sob." + ], + "SHORTMONTH": [ + "sty", + "lut", + "mar", + "kwi", + "maj", + "cze", + "lip", + "sie", + "wrz", + "pa\u017a", + "lis", + "gru" + ], + "STANDALONEMONTH": [ + "stycze\u0144", + "luty", + "marzec", + "kwiecie\u0144", + "maj", + "czerwiec", + "lipiec", + "sierpie\u0144", + "wrzesie\u0144", + "pa\u017adziernik", + "listopad", + "grudzie\u0144" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.y HH:mm", + "shortDate": "dd.MM.y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "z\u0142", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "pl", + "localeID": "pl", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i != 1 && i % 10 >= 0 && i % 10 <= 1 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 12 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_prg-001.js b/1.6.6/i18n/angular-locale_prg-001.js new file mode 100644 index 000000000..672f9b1a8 --- /dev/null +++ b/1.6.6/i18n/angular-locale_prg-001.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "ankst\u0101inan", + "pa pussideinan" + ], + "DAY": [ + "nad\u012bli", + "panad\u012bli", + "wisas\u012bdis", + "pussisawaiti", + "ketwirtiks", + "p\u0113ntniks", + "sabattika" + ], + "ERANAMES": [ + "BC", + "AD" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "rags", + "wassarins", + "p\u016blis", + "sakkis", + "zallaws", + "s\u012bmenis", + "l\u012bpa", + "daggis", + "sillins", + "spallins", + "lapkr\u016btis", + "sallaws" + ], + "SHORTDAY": [ + "nad", + "pan", + "wis", + "pus", + "ket", + "p\u0113n", + "sab" + ], + "SHORTMONTH": [ + "rag", + "was", + "p\u016bl", + "sak", + "zal", + "s\u012bm", + "l\u012bp", + "dag", + "sil", + "spa", + "lap", + "sal" + ], + "STANDALONEMONTH": [ + "rags", + "wassarins", + "p\u016blis", + "sakkis", + "zallaws", + "s\u012bmenis", + "l\u012bpa", + "daggis", + "sillins", + "spallins", + "lapkr\u016btis", + "sallaws" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, y 'mettas' d. MMMM", + "longDate": "y 'mettas' d. MMMM", + "medium": "dd.MM 'st'. y HH:mm:ss", + "mediumDate": "dd.MM 'st'. y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "prg-001", + "localeID": "prg_001", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_prg.js b/1.6.6/i18n/angular-locale_prg.js new file mode 100644 index 000000000..d2023c87e --- /dev/null +++ b/1.6.6/i18n/angular-locale_prg.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "ankst\u0101inan", + "pa pussideinan" + ], + "DAY": [ + "nad\u012bli", + "panad\u012bli", + "wisas\u012bdis", + "pussisawaiti", + "ketwirtiks", + "p\u0113ntniks", + "sabattika" + ], + "ERANAMES": [ + "BC", + "AD" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "rags", + "wassarins", + "p\u016blis", + "sakkis", + "zallaws", + "s\u012bmenis", + "l\u012bpa", + "daggis", + "sillins", + "spallins", + "lapkr\u016btis", + "sallaws" + ], + "SHORTDAY": [ + "nad", + "pan", + "wis", + "pus", + "ket", + "p\u0113n", + "sab" + ], + "SHORTMONTH": [ + "rag", + "was", + "p\u016bl", + "sak", + "zal", + "s\u012bm", + "l\u012bp", + "dag", + "sil", + "spa", + "lap", + "sal" + ], + "STANDALONEMONTH": [ + "rags", + "wassarins", + "p\u016blis", + "sakkis", + "zallaws", + "s\u012bmenis", + "l\u012bpa", + "daggis", + "sillins", + "spallins", + "lapkr\u016btis", + "sallaws" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, y 'mettas' d. MMMM", + "longDate": "y 'mettas' d. MMMM", + "medium": "dd.MM 'st'. y HH:mm:ss", + "mediumDate": "dd.MM 'st'. y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "prg", + "localeID": "prg", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ps-af.js b/1.6.6/i18n/angular-locale_ps-af.js new file mode 100644 index 000000000..ebc0b1ac0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ps-af.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u063a.\u0645.", + "\u063a.\u0648." + ], + "DAY": [ + "\u06cc\u06a9\u0634\u0646\u0628\u0647", + "\u062f\u0648\u0634\u0646\u0628\u0647", + "\u0633\u0647\u200c\u0634\u0646\u0628\u0647", + "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647", + "\u067e\u0646\u062c\u0634\u0646\u0628\u0647", + "\u062c\u0645\u0639\u0647", + "\u0634\u0646\u0628\u0647" + ], + "ERANAMES": [ + "\u0644\u0647 \u0645\u06cc\u0644\u0627\u062f \u0685\u062e\u0647 \u0648\u0693\u0627\u0646\u062f\u06d0", + "\u0644\u0647 \u0645\u06cc\u0644\u0627\u062f \u0685\u062e\u0647 \u0648\u0631\u0648\u0633\u062a\u0647" + ], + "ERAS": [ + "\u0644\u0647 \u0645\u06cc\u0644\u0627\u062f \u0648\u0693\u0627\u0646\u062f\u06d0", + "\u0645." + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u062c\u0646\u0648\u0631\u064a", + "\u0641\u0628\u0631\u0648\u0631\u064a", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u06cd", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u06cc", + "\u0627\u06ab\u0633\u062a", + "\u0633\u067e\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u06cc\u06a9\u0634\u0646\u0628\u0647", + "\u062f\u0648\u0634\u0646\u0628\u0647", + "\u0633\u0647\u200c\u0634\u0646\u0628\u0647", + "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647", + "\u067e\u0646\u062c\u0634\u0646\u0628\u0647", + "\u062c\u0645\u0639\u0647", + "\u0634\u0646\u0628\u0647" + ], + "SHORTMONTH": [ + "\u062c\u0646\u0648\u0631\u064a", + "\u0641\u0628\u0631\u0648\u0631\u064a", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u06cd", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u06cc", + "\u0627\u06ab\u0633\u062a", + "\u0633\u067e\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u062c\u0646\u0648\u0631\u064a", + "\u0641\u0628\u0631\u0648\u0631\u064a", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u06cd", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u06cc", + "\u0627\u06ab\u0633\u062a", + "\u0633\u067e\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 3, + 4 + ], + "fullDate": "EEEE \u062f y \u062f MMMM d", + "longDate": "\u062f y \u062f MMMM d", + "medium": "y MMM d H:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "H:mm:ss", + "short": "y/M/d H:mm", + "shortDate": "y/M/d", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Af.", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ps-af", + "localeID": "ps_AF", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ps.js b/1.6.6/i18n/angular-locale_ps.js new file mode 100644 index 000000000..66eb24591 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ps.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u063a.\u0645.", + "\u063a.\u0648." + ], + "DAY": [ + "\u06cc\u06a9\u0634\u0646\u0628\u0647", + "\u062f\u0648\u0634\u0646\u0628\u0647", + "\u0633\u0647\u200c\u0634\u0646\u0628\u0647", + "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647", + "\u067e\u0646\u062c\u0634\u0646\u0628\u0647", + "\u062c\u0645\u0639\u0647", + "\u0634\u0646\u0628\u0647" + ], + "ERANAMES": [ + "\u0644\u0647 \u0645\u06cc\u0644\u0627\u062f \u0685\u062e\u0647 \u0648\u0693\u0627\u0646\u062f\u06d0", + "\u0644\u0647 \u0645\u06cc\u0644\u0627\u062f \u0685\u062e\u0647 \u0648\u0631\u0648\u0633\u062a\u0647" + ], + "ERAS": [ + "\u0644\u0647 \u0645\u06cc\u0644\u0627\u062f \u0648\u0693\u0627\u0646\u062f\u06d0", + "\u0645." + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u062c\u0646\u0648\u0631\u064a", + "\u0641\u0628\u0631\u0648\u0631\u064a", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u06cd", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u06cc", + "\u0627\u06ab\u0633\u062a", + "\u0633\u067e\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u06cc\u06a9\u0634\u0646\u0628\u0647", + "\u062f\u0648\u0634\u0646\u0628\u0647", + "\u0633\u0647\u200c\u0634\u0646\u0628\u0647", + "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647", + "\u067e\u0646\u062c\u0634\u0646\u0628\u0647", + "\u062c\u0645\u0639\u0647", + "\u0634\u0646\u0628\u0647" + ], + "SHORTMONTH": [ + "\u062c\u0646\u0648\u0631\u064a", + "\u0641\u0628\u0631\u0648\u0631\u064a", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u06cd", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u06cc", + "\u0627\u06ab\u0633\u062a", + "\u0633\u067e\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u062c\u0646\u0648\u0631\u064a", + "\u0641\u0628\u0631\u0648\u0631\u064a", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u06cd", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u06cc", + "\u0627\u06ab\u0633\u062a", + "\u0633\u067e\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 3, + 4 + ], + "fullDate": "EEEE \u062f y \u062f MMMM d", + "longDate": "\u062f y \u062f MMMM d", + "medium": "y MMM d H:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "H:mm:ss", + "short": "y/M/d H:mm", + "shortDate": "y/M/d", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Af.", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ps", + "localeID": "ps", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_pt-ao.js b/1.6.6/i18n/angular-locale_pt-ao.js new file mode 100644 index 000000000..164609a5a --- /dev/null +++ b/1.6.6/i18n/angular-locale_pt-ao.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "da manh\u00e3", + "da tarde" + ], + "DAY": [ + "domingo", + "segunda-feira", + "ter\u00e7a-feira", + "quarta-feira", + "quinta-feira", + "sexta-feira", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "depois de Cristo" + ], + "ERAS": [ + "a.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "SHORTDAY": [ + "domingo", + "segunda", + "ter\u00e7a", + "quarta", + "quinta", + "sexta", + "s\u00e1bado" + ], + "SHORTMONTH": [ + "jan", + "fev", + "mar", + "abr", + "mai", + "jun", + "jul", + "ago", + "set", + "out", + "nov", + "dez" + ], + "STANDALONEMONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "dd/MM/y HH:mm:ss", + "mediumDate": "dd/MM/y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Kz", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "pt-ao", + "localeID": "pt_AO", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i >= 0 && i <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_pt-br.js b/1.6.6/i18n/angular-locale_pt-br.js new file mode 100644 index 000000000..0e2332a3a --- /dev/null +++ b/1.6.6/i18n/angular-locale_pt-br.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "domingo", + "segunda-feira", + "ter\u00e7a-feira", + "quarta-feira", + "quinta-feira", + "sexta-feira", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "depois de Cristo" + ], + "ERAS": [ + "a.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "SHORTDAY": [ + "dom", + "seg", + "ter", + "qua", + "qui", + "sex", + "s\u00e1b" + ], + "SHORTMONTH": [ + "jan", + "fev", + "mar", + "abr", + "mai", + "jun", + "jul", + "ago", + "set", + "out", + "nov", + "dez" + ], + "STANDALONEMONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d 'de' MMM 'de' y HH:mm:ss", + "mediumDate": "d 'de' MMM 'de' y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "R$", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "pt-br", + "localeID": "pt_BR", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i >= 0 && i <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_pt-ch.js b/1.6.6/i18n/angular-locale_pt-ch.js new file mode 100644 index 000000000..7fffa7200 --- /dev/null +++ b/1.6.6/i18n/angular-locale_pt-ch.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "da manh\u00e3", + "da tarde" + ], + "DAY": [ + "domingo", + "segunda-feira", + "ter\u00e7a-feira", + "quarta-feira", + "quinta-feira", + "sexta-feira", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "depois de Cristo" + ], + "ERAS": [ + "a.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "SHORTDAY": [ + "domingo", + "segunda", + "ter\u00e7a", + "quarta", + "quinta", + "sexta", + "s\u00e1bado" + ], + "SHORTMONTH": [ + "jan", + "fev", + "mar", + "abr", + "mai", + "jun", + "jul", + "ago", + "set", + "out", + "nov", + "dez" + ], + "STANDALONEMONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "dd/MM/y HH:mm:ss", + "mediumDate": "dd/MM/y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CHF", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "pt-ch", + "localeID": "pt_CH", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i >= 0 && i <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_pt-cv.js b/1.6.6/i18n/angular-locale_pt-cv.js new file mode 100644 index 000000000..00a0b2fe4 --- /dev/null +++ b/1.6.6/i18n/angular-locale_pt-cv.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "da manh\u00e3", + "da tarde" + ], + "DAY": [ + "domingo", + "segunda-feira", + "ter\u00e7a-feira", + "quarta-feira", + "quinta-feira", + "sexta-feira", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "depois de Cristo" + ], + "ERAS": [ + "a.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "SHORTDAY": [ + "domingo", + "segunda", + "ter\u00e7a", + "quarta", + "quinta", + "sexta", + "s\u00e1bado" + ], + "SHORTMONTH": [ + "jan", + "fev", + "mar", + "abr", + "mai", + "jun", + "jul", + "ago", + "set", + "out", + "nov", + "dez" + ], + "STANDALONEMONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "dd/MM/y HH:mm:ss", + "mediumDate": "dd/MM/y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CVE", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "pt-cv", + "localeID": "pt_CV", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i >= 0 && i <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_pt-gq.js b/1.6.6/i18n/angular-locale_pt-gq.js new file mode 100644 index 000000000..f9862d17f --- /dev/null +++ b/1.6.6/i18n/angular-locale_pt-gq.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "da manh\u00e3", + "da tarde" + ], + "DAY": [ + "domingo", + "segunda-feira", + "ter\u00e7a-feira", + "quarta-feira", + "quinta-feira", + "sexta-feira", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "depois de Cristo" + ], + "ERAS": [ + "a.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "SHORTDAY": [ + "domingo", + "segunda", + "ter\u00e7a", + "quarta", + "quinta", + "sexta", + "s\u00e1bado" + ], + "SHORTMONTH": [ + "jan", + "fev", + "mar", + "abr", + "mai", + "jun", + "jul", + "ago", + "set", + "out", + "nov", + "dez" + ], + "STANDALONEMONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "dd/MM/y HH:mm:ss", + "mediumDate": "dd/MM/y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "pt-gq", + "localeID": "pt_GQ", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i >= 0 && i <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_pt-gw.js b/1.6.6/i18n/angular-locale_pt-gw.js new file mode 100644 index 000000000..dd86bc388 --- /dev/null +++ b/1.6.6/i18n/angular-locale_pt-gw.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "da manh\u00e3", + "da tarde" + ], + "DAY": [ + "domingo", + "segunda-feira", + "ter\u00e7a-feira", + "quarta-feira", + "quinta-feira", + "sexta-feira", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "depois de Cristo" + ], + "ERAS": [ + "a.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "SHORTDAY": [ + "domingo", + "segunda", + "ter\u00e7a", + "quarta", + "quinta", + "sexta", + "s\u00e1bado" + ], + "SHORTMONTH": [ + "jan", + "fev", + "mar", + "abr", + "mai", + "jun", + "jul", + "ago", + "set", + "out", + "nov", + "dez" + ], + "STANDALONEMONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "dd/MM/y HH:mm:ss", + "mediumDate": "dd/MM/y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "pt-gw", + "localeID": "pt_GW", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i >= 0 && i <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_pt-lu.js b/1.6.6/i18n/angular-locale_pt-lu.js new file mode 100644 index 000000000..fcb132dc0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_pt-lu.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "da manh\u00e3", + "da tarde" + ], + "DAY": [ + "domingo", + "segunda-feira", + "ter\u00e7a-feira", + "quarta-feira", + "quinta-feira", + "sexta-feira", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "depois de Cristo" + ], + "ERAS": [ + "a.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "SHORTDAY": [ + "domingo", + "segunda", + "ter\u00e7a", + "quarta", + "quinta", + "sexta", + "s\u00e1bado" + ], + "SHORTMONTH": [ + "jan", + "fev", + "mar", + "abr", + "mai", + "jun", + "jul", + "ago", + "set", + "out", + "nov", + "dez" + ], + "STANDALONEMONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "dd/MM/y HH:mm:ss", + "mediumDate": "dd/MM/y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "pt-lu", + "localeID": "pt_LU", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i >= 0 && i <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_pt-mo.js b/1.6.6/i18n/angular-locale_pt-mo.js new file mode 100644 index 000000000..3122fb0f3 --- /dev/null +++ b/1.6.6/i18n/angular-locale_pt-mo.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "da manh\u00e3", + "da tarde" + ], + "DAY": [ + "domingo", + "segunda-feira", + "ter\u00e7a-feira", + "quarta-feira", + "quinta-feira", + "sexta-feira", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "depois de Cristo" + ], + "ERAS": [ + "a.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "SHORTDAY": [ + "domingo", + "segunda", + "ter\u00e7a", + "quarta", + "quinta", + "sexta", + "s\u00e1bado" + ], + "SHORTMONTH": [ + "jan", + "fev", + "mar", + "abr", + "mai", + "jun", + "jul", + "ago", + "set", + "out", + "nov", + "dez" + ], + "STANDALONEMONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "dd/MM/y h:mm:ss a", + "mediumDate": "dd/MM/y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/yy h:mm a", + "shortDate": "dd/MM/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "MOP", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "pt-mo", + "localeID": "pt_MO", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i >= 0 && i <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_pt-mz.js b/1.6.6/i18n/angular-locale_pt-mz.js new file mode 100644 index 000000000..fdf84c6b9 --- /dev/null +++ b/1.6.6/i18n/angular-locale_pt-mz.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "da manh\u00e3", + "da tarde" + ], + "DAY": [ + "domingo", + "segunda-feira", + "ter\u00e7a-feira", + "quarta-feira", + "quinta-feira", + "sexta-feira", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "depois de Cristo" + ], + "ERAS": [ + "a.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "SHORTDAY": [ + "domingo", + "segunda", + "ter\u00e7a", + "quarta", + "quinta", + "sexta", + "s\u00e1bado" + ], + "SHORTMONTH": [ + "jan", + "fev", + "mar", + "abr", + "mai", + "jun", + "jul", + "ago", + "set", + "out", + "nov", + "dez" + ], + "STANDALONEMONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "dd/MM/y HH:mm:ss", + "mediumDate": "dd/MM/y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "MTn", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "pt-mz", + "localeID": "pt_MZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i >= 0 && i <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_pt-pt.js b/1.6.6/i18n/angular-locale_pt-pt.js new file mode 100644 index 000000000..30146f67d --- /dev/null +++ b/1.6.6/i18n/angular-locale_pt-pt.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "da manh\u00e3", + "da tarde" + ], + "DAY": [ + "domingo", + "segunda-feira", + "ter\u00e7a-feira", + "quarta-feira", + "quinta-feira", + "sexta-feira", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "depois de Cristo" + ], + "ERAS": [ + "a.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "SHORTDAY": [ + "domingo", + "segunda", + "ter\u00e7a", + "quarta", + "quinta", + "sexta", + "s\u00e1bado" + ], + "SHORTMONTH": [ + "jan", + "fev", + "mar", + "abr", + "mai", + "jun", + "jul", + "ago", + "set", + "out", + "nov", + "dez" + ], + "STANDALONEMONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "dd/MM/y HH:mm:ss", + "mediumDate": "dd/MM/y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "pt-pt", + "localeID": "pt_PT", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i >= 0 && i <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_pt-st.js b/1.6.6/i18n/angular-locale_pt-st.js new file mode 100644 index 000000000..678565506 --- /dev/null +++ b/1.6.6/i18n/angular-locale_pt-st.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "da manh\u00e3", + "da tarde" + ], + "DAY": [ + "domingo", + "segunda-feira", + "ter\u00e7a-feira", + "quarta-feira", + "quinta-feira", + "sexta-feira", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "depois de Cristo" + ], + "ERAS": [ + "a.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "SHORTDAY": [ + "domingo", + "segunda", + "ter\u00e7a", + "quarta", + "quinta", + "sexta", + "s\u00e1bado" + ], + "SHORTMONTH": [ + "jan", + "fev", + "mar", + "abr", + "mai", + "jun", + "jul", + "ago", + "set", + "out", + "nov", + "dez" + ], + "STANDALONEMONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "dd/MM/y HH:mm:ss", + "mediumDate": "dd/MM/y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Db", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "pt-st", + "localeID": "pt_ST", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i >= 0 && i <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_pt-tl.js b/1.6.6/i18n/angular-locale_pt-tl.js new file mode 100644 index 000000000..57b2fdcae --- /dev/null +++ b/1.6.6/i18n/angular-locale_pt-tl.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "da manh\u00e3", + "da tarde" + ], + "DAY": [ + "domingo", + "segunda-feira", + "ter\u00e7a-feira", + "quarta-feira", + "quinta-feira", + "sexta-feira", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "depois de Cristo" + ], + "ERAS": [ + "a.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "SHORTDAY": [ + "domingo", + "segunda", + "ter\u00e7a", + "quarta", + "quinta", + "sexta", + "s\u00e1bado" + ], + "SHORTMONTH": [ + "jan", + "fev", + "mar", + "abr", + "mai", + "jun", + "jul", + "ago", + "set", + "out", + "nov", + "dez" + ], + "STANDALONEMONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "dd/MM/y HH:mm:ss", + "mediumDate": "dd/MM/y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "pt-tl", + "localeID": "pt_TL", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i >= 0 && i <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_pt.js b/1.6.6/i18n/angular-locale_pt.js new file mode 100644 index 000000000..b7c915ce0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_pt.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "domingo", + "segunda-feira", + "ter\u00e7a-feira", + "quarta-feira", + "quinta-feira", + "sexta-feira", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "depois de Cristo" + ], + "ERAS": [ + "a.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "SHORTDAY": [ + "dom", + "seg", + "ter", + "qua", + "qui", + "sex", + "s\u00e1b" + ], + "SHORTMONTH": [ + "jan", + "fev", + "mar", + "abr", + "mai", + "jun", + "jul", + "ago", + "set", + "out", + "nov", + "dez" + ], + "STANDALONEMONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d 'de' MMM 'de' y HH:mm:ss", + "mediumDate": "d 'de' MMM 'de' y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "R$", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "pt", + "localeID": "pt", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i >= 0 && i <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_qu-bo.js b/1.6.6/i18n/angular-locale_qu-bo.js new file mode 100644 index 000000000..b1fbf1ee7 --- /dev/null +++ b/1.6.6/i18n/angular-locale_qu-bo.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "Domingo", + "Lunes", + "Martes", + "Mi\u00e9rcoles", + "Jueves", + "Viernes", + "S\u00e1bado" + ], + "ERANAMES": [ + "BCE", + "d.C." + ], + "ERAS": [ + "BCE", + "d.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Qulla puquy", + "Hatun puquy", + "Pauqar waray", + "Ayriwa", + "Aymuray", + "Inti raymi", + "Anta Sitwa", + "Qhapaq Sitwa", + "Uma raymi", + "Kantaray", + "Ayamarq\u02bca", + "Kapaq Raymi" + ], + "SHORTDAY": [ + "Dom", + "Lun", + "Mar", + "Mi\u00e9", + "Jue", + "Vie", + "Sab" + ], + "SHORTMONTH": [ + "Qul", + "Hat", + "Pau", + "Ayr", + "Aym", + "Int", + "Ant", + "Qha", + "Uma", + "Kan", + "Aya", + "Kap" + ], + "STANDALONEMONTH": [ + "Qulla puquy", + "Hatun puquy", + "Pauqar waray", + "Ayriwa", + "Aymuray", + "Inti raymi", + "Anta Sitwa", + "Qhapaq Sitwa", + "Uma raymi", + "Kantaray", + "Ayamarq\u02bca", + "Kapaq Raymi" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Bs", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "qu-bo", + "localeID": "qu_BO", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_qu-ec.js b/1.6.6/i18n/angular-locale_qu-ec.js new file mode 100644 index 000000000..4266caf00 --- /dev/null +++ b/1.6.6/i18n/angular-locale_qu-ec.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "Domingo", + "Lunes", + "Martes", + "Mi\u00e9rcoles", + "Jueves", + "Viernes", + "S\u00e1bado" + ], + "ERANAMES": [ + "BCE", + "d.C." + ], + "ERAS": [ + "BCE", + "d.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Qulla puquy", + "Hatun puquy", + "Pauqar waray", + "Ayriwa", + "Aymuray", + "Inti raymi", + "Anta Sitwa", + "Qhapaq Sitwa", + "Uma raymi", + "Kantaray", + "Ayamarq\u02bca", + "Kapaq Raymi" + ], + "SHORTDAY": [ + "Dom", + "Lun", + "Mar", + "Mi\u00e9", + "Jue", + "Vie", + "Sab" + ], + "SHORTMONTH": [ + "Qul", + "Hat", + "Pau", + "Ayr", + "Aym", + "Int", + "Ant", + "Qha", + "Uma", + "Kan", + "Aya", + "Kap" + ], + "STANDALONEMONTH": [ + "Qulla puquy", + "Hatun puquy", + "Pauqar waray", + "Ayriwa", + "Aymuray", + "Inti raymi", + "Anta Sitwa", + "Qhapaq Sitwa", + "Uma raymi", + "Kantaray", + "Ayamarq\u02bca", + "Kapaq Raymi" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "qu-ec", + "localeID": "qu_EC", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_qu-pe.js b/1.6.6/i18n/angular-locale_qu-pe.js new file mode 100644 index 000000000..f440a6239 --- /dev/null +++ b/1.6.6/i18n/angular-locale_qu-pe.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "Domingo", + "Lunes", + "Martes", + "Mi\u00e9rcoles", + "Jueves", + "Viernes", + "S\u00e1bado" + ], + "ERANAMES": [ + "BCE", + "d.C." + ], + "ERAS": [ + "BCE", + "d.C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Qulla puquy", + "Hatun puquy", + "Pauqar waray", + "Ayriwa", + "Aymuray", + "Inti raymi", + "Anta Sitwa", + "Qhapaq Sitwa", + "Uma raymi", + "Kantaray", + "Ayamarq\u02bca", + "Kapaq Raymi" + ], + "SHORTDAY": [ + "Dom", + "Lun", + "Mar", + "Mi\u00e9", + "Jue", + "Vie", + "Sab" + ], + "SHORTMONTH": [ + "Qul", + "Hat", + "Pau", + "Ayr", + "Aym", + "Int", + "Ant", + "Qha", + "Uma", + "Kan", + "Aya", + "Kap" + ], + "STANDALONEMONTH": [ + "Qulla puquy", + "Hatun puquy", + "Pauqar waray", + "Ayriwa", + "Aymuray", + "Inti raymi", + "Anta Sitwa", + "Qhapaq Sitwa", + "Uma raymi", + "Kantaray", + "Ayamarq\u02bca", + "Kapaq Raymi" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "S/.", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "qu-pe", + "localeID": "qu_PE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_qu.js b/1.6.6/i18n/angular-locale_qu.js new file mode 100644 index 000000000..5688150db --- /dev/null +++ b/1.6.6/i18n/angular-locale_qu.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "Domingo", + "Lunes", + "Martes", + "Mi\u00e9rcoles", + "Jueves", + "Viernes", + "S\u00e1bado" + ], + "ERANAMES": [ + "BCE", + "d.C." + ], + "ERAS": [ + "BCE", + "d.C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Qulla puquy", + "Hatun puquy", + "Pauqar waray", + "Ayriwa", + "Aymuray", + "Inti raymi", + "Anta Sitwa", + "Qhapaq Sitwa", + "Uma raymi", + "Kantaray", + "Ayamarq\u02bca", + "Kapaq Raymi" + ], + "SHORTDAY": [ + "Dom", + "Lun", + "Mar", + "Mi\u00e9", + "Jue", + "Vie", + "Sab" + ], + "SHORTMONTH": [ + "Qul", + "Hat", + "Pau", + "Ayr", + "Aym", + "Int", + "Ant", + "Qha", + "Uma", + "Kan", + "Aya", + "Kap" + ], + "STANDALONEMONTH": [ + "Qulla puquy", + "Hatun puquy", + "Pauqar waray", + "Ayriwa", + "Aymuray", + "Inti raymi", + "Anta Sitwa", + "Qhapaq Sitwa", + "Uma raymi", + "Kantaray", + "Ayamarq\u02bca", + "Kapaq Raymi" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "S/.", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "qu", + "localeID": "qu", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_rm-ch.js b/1.6.6/i18n/angular-locale_rm-ch.js new file mode 100644 index 000000000..25d9d3236 --- /dev/null +++ b/1.6.6/i18n/angular-locale_rm-ch.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dumengia", + "glindesdi", + "mardi", + "mesemna", + "gievgia", + "venderdi", + "sonda" + ], + "ERANAMES": [ + "avant Cristus", + "suenter Cristus" + ], + "ERAS": [ + "av. Cr.", + "s. Cr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "schaner", + "favrer", + "mars", + "avrigl", + "matg", + "zercladur", + "fanadur", + "avust", + "settember", + "october", + "november", + "december" + ], + "SHORTDAY": [ + "du", + "gli", + "ma", + "me", + "gie", + "ve", + "so" + ], + "SHORTMONTH": [ + "schan.", + "favr.", + "mars", + "avr.", + "matg", + "zercl.", + "fan.", + "avust", + "sett.", + "oct.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "schaner", + "favrer", + "mars", + "avrigl", + "matg", + "zercladur", + "fanadur", + "avust", + "settember", + "october", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, 'ils' d 'da' MMMM y", + "longDate": "d 'da' MMMM y", + "medium": "dd-MM-y HH:mm:ss", + "mediumDate": "dd-MM-y", + "mediumTime": "HH:mm:ss", + "short": "dd-MM-yy HH:mm", + "shortDate": "dd-MM-yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CHF", + "DECIMAL_SEP": ".", + "GROUP_SEP": "\u2019", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "rm-ch", + "localeID": "rm_CH", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_rm.js b/1.6.6/i18n/angular-locale_rm.js new file mode 100644 index 000000000..179220af6 --- /dev/null +++ b/1.6.6/i18n/angular-locale_rm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dumengia", + "glindesdi", + "mardi", + "mesemna", + "gievgia", + "venderdi", + "sonda" + ], + "ERANAMES": [ + "avant Cristus", + "suenter Cristus" + ], + "ERAS": [ + "av. Cr.", + "s. Cr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "schaner", + "favrer", + "mars", + "avrigl", + "matg", + "zercladur", + "fanadur", + "avust", + "settember", + "october", + "november", + "december" + ], + "SHORTDAY": [ + "du", + "gli", + "ma", + "me", + "gie", + "ve", + "so" + ], + "SHORTMONTH": [ + "schan.", + "favr.", + "mars", + "avr.", + "matg", + "zercl.", + "fan.", + "avust", + "sett.", + "oct.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "schaner", + "favrer", + "mars", + "avrigl", + "matg", + "zercladur", + "fanadur", + "avust", + "settember", + "october", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, 'ils' d 'da' MMMM y", + "longDate": "d 'da' MMMM y", + "medium": "dd-MM-y HH:mm:ss", + "mediumDate": "dd-MM-y", + "mediumTime": "HH:mm:ss", + "short": "dd-MM-yy HH:mm", + "shortDate": "dd-MM-yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CHF", + "DECIMAL_SEP": ".", + "GROUP_SEP": "\u2019", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "rm", + "localeID": "rm", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_rn-bi.js b/1.6.6/i18n/angular-locale_rn-bi.js new file mode 100644 index 000000000..c51776503 --- /dev/null +++ b/1.6.6/i18n/angular-locale_rn-bi.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Z.MU.", + "Z.MW." + ], + "DAY": [ + "Ku w\u2019indwi", + "Ku wa mbere", + "Ku wa kabiri", + "Ku wa gatatu", + "Ku wa kane", + "Ku wa gatanu", + "Ku wa gatandatu" + ], + "ERANAMES": [ + "Mbere ya Yezu", + "Nyuma ya Yezu" + ], + "ERAS": [ + "Mb.Y.", + "Ny.Y" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Nzero", + "Ruhuhuma", + "Ntwarante", + "Ndamukiza", + "Rusama", + "Ruheshi", + "Mukakaro", + "Nyandagaro", + "Nyakanga", + "Gitugutu", + "Munyonyo", + "Kigarama" + ], + "SHORTDAY": [ + "cu.", + "mbe.", + "kab.", + "gtu.", + "kan.", + "gnu.", + "gnd." + ], + "SHORTMONTH": [ + "Mut.", + "Gas.", + "Wer.", + "Mat.", + "Gic.", + "Kam.", + "Nya.", + "Kan.", + "Nze.", + "Ukw.", + "Ugu.", + "Uku." + ], + "STANDALONEMONTH": [ + "Nzero", + "Ruhuhuma", + "Ntwarante", + "Ndamukiza", + "Rusama", + "Ruheshi", + "Mukakaro", + "Nyandagaro", + "Nyakanga", + "Gitugutu", + "Munyonyo", + "Kigarama" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FBu", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "rn-bi", + "localeID": "rn_BI", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_rn.js b/1.6.6/i18n/angular-locale_rn.js new file mode 100644 index 000000000..8dee14cef --- /dev/null +++ b/1.6.6/i18n/angular-locale_rn.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Z.MU.", + "Z.MW." + ], + "DAY": [ + "Ku w\u2019indwi", + "Ku wa mbere", + "Ku wa kabiri", + "Ku wa gatatu", + "Ku wa kane", + "Ku wa gatanu", + "Ku wa gatandatu" + ], + "ERANAMES": [ + "Mbere ya Yezu", + "Nyuma ya Yezu" + ], + "ERAS": [ + "Mb.Y.", + "Ny.Y" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Nzero", + "Ruhuhuma", + "Ntwarante", + "Ndamukiza", + "Rusama", + "Ruheshi", + "Mukakaro", + "Nyandagaro", + "Nyakanga", + "Gitugutu", + "Munyonyo", + "Kigarama" + ], + "SHORTDAY": [ + "cu.", + "mbe.", + "kab.", + "gtu.", + "kan.", + "gnu.", + "gnd." + ], + "SHORTMONTH": [ + "Mut.", + "Gas.", + "Wer.", + "Mat.", + "Gic.", + "Kam.", + "Nya.", + "Kan.", + "Nze.", + "Ukw.", + "Ugu.", + "Uku." + ], + "STANDALONEMONTH": [ + "Nzero", + "Ruhuhuma", + "Ntwarante", + "Ndamukiza", + "Rusama", + "Ruheshi", + "Mukakaro", + "Nyandagaro", + "Nyakanga", + "Gitugutu", + "Munyonyo", + "Kigarama" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FBu", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "rn", + "localeID": "rn", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ro-md.js b/1.6.6/i18n/angular-locale_ro-md.js new file mode 100644 index 000000000..5213ad478 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ro-md.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "duminic\u0103", + "luni", + "mar\u021bi", + "miercuri", + "joi", + "vineri", + "s\u00e2mb\u0103t\u0103" + ], + "ERANAMES": [ + "\u00eenainte de Hristos", + "dup\u0103 Hristos" + ], + "ERAS": [ + "\u00ee.Hr.", + "d.Hr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "ianuarie", + "februarie", + "martie", + "aprilie", + "mai", + "iunie", + "iulie", + "august", + "septembrie", + "octombrie", + "noiembrie", + "decembrie" + ], + "SHORTDAY": [ + "Dum", + "Lun", + "Mar", + "Mie", + "Joi", + "Vin", + "S\u00e2m" + ], + "SHORTMONTH": [ + "ian.", + "feb.", + "mar.", + "apr.", + "mai", + "iun.", + "iul.", + "aug.", + "sept.", + "oct.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "ianuarie", + "februarie", + "martie", + "aprilie", + "mai", + "iunie", + "iulie", + "august", + "septembrie", + "octombrie", + "noiembrie", + "decembrie" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.y HH:mm", + "shortDate": "dd.MM.y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "MDL", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ro-md", + "localeID": "ro_MD", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (vf.v != 0 || n == 0 || n != 1 && n % 100 >= 1 && n % 100 <= 19) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ro-ro.js b/1.6.6/i18n/angular-locale_ro-ro.js new file mode 100644 index 000000000..933162581 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ro-ro.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "duminic\u0103", + "luni", + "mar\u021bi", + "miercuri", + "joi", + "vineri", + "s\u00e2mb\u0103t\u0103" + ], + "ERANAMES": [ + "\u00eenainte de Hristos", + "dup\u0103 Hristos" + ], + "ERAS": [ + "\u00ee.Hr.", + "d.Hr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "ianuarie", + "februarie", + "martie", + "aprilie", + "mai", + "iunie", + "iulie", + "august", + "septembrie", + "octombrie", + "noiembrie", + "decembrie" + ], + "SHORTDAY": [ + "dum.", + "lun.", + "mar.", + "mie.", + "joi", + "vin.", + "s\u00e2m." + ], + "SHORTMONTH": [ + "ian.", + "feb.", + "mar.", + "apr.", + "mai", + "iun.", + "iul.", + "aug.", + "sept.", + "oct.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "ianuarie", + "februarie", + "martie", + "aprilie", + "mai", + "iunie", + "iulie", + "august", + "septembrie", + "octombrie", + "noiembrie", + "decembrie" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.y HH:mm", + "shortDate": "dd.MM.y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "RON", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ro-ro", + "localeID": "ro_RO", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (vf.v != 0 || n == 0 || n != 1 && n % 100 >= 1 && n % 100 <= 19) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ro.js b/1.6.6/i18n/angular-locale_ro.js new file mode 100644 index 000000000..02bfbe2bb --- /dev/null +++ b/1.6.6/i18n/angular-locale_ro.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "duminic\u0103", + "luni", + "mar\u021bi", + "miercuri", + "joi", + "vineri", + "s\u00e2mb\u0103t\u0103" + ], + "ERANAMES": [ + "\u00eenainte de Hristos", + "dup\u0103 Hristos" + ], + "ERAS": [ + "\u00ee.Hr.", + "d.Hr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "ianuarie", + "februarie", + "martie", + "aprilie", + "mai", + "iunie", + "iulie", + "august", + "septembrie", + "octombrie", + "noiembrie", + "decembrie" + ], + "SHORTDAY": [ + "dum.", + "lun.", + "mar.", + "mie.", + "joi", + "vin.", + "s\u00e2m." + ], + "SHORTMONTH": [ + "ian.", + "feb.", + "mar.", + "apr.", + "mai", + "iun.", + "iul.", + "aug.", + "sept.", + "oct.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "ianuarie", + "februarie", + "martie", + "aprilie", + "mai", + "iunie", + "iulie", + "august", + "septembrie", + "octombrie", + "noiembrie", + "decembrie" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.y HH:mm", + "shortDate": "dd.MM.y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "RON", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ro", + "localeID": "ro", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (vf.v != 0 || n == 0 || n != 1 && n % 100 >= 1 && n % 100 <= 19) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_rof-tz.js b/1.6.6/i18n/angular-locale_rof-tz.js new file mode 100644 index 000000000..a36b94f0b --- /dev/null +++ b/1.6.6/i18n/angular-locale_rof-tz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "kang\u2019ama", + "kingoto" + ], + "DAY": [ + "Ijumapili", + "Ijumatatu", + "Ijumanne", + "Ijumatano", + "Alhamisi", + "Ijumaa", + "Ijumamosi" + ], + "ERANAMES": [ + "Kabla ya Mayesu", + "Baada ya Mayesu" + ], + "ERAS": [ + "KM", + "BM" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Mweri wa kwanza", + "Mweri wa kaili", + "Mweri wa katatu", + "Mweri wa kaana", + "Mweri wa tanu", + "Mweri wa sita", + "Mweri wa saba", + "Mweri wa nane", + "Mweri wa tisa", + "Mweri wa ikumi", + "Mweri wa ikumi na moja", + "Mweri wa ikumi na mbili" + ], + "SHORTDAY": [ + "Ijp", + "Ijt", + "Ijn", + "Ijtn", + "Alh", + "Iju", + "Ijm" + ], + "SHORTMONTH": [ + "M1", + "M2", + "M3", + "M4", + "M5", + "M6", + "M7", + "M8", + "M9", + "M10", + "M11", + "M12" + ], + "STANDALONEMONTH": [ + "Mweri wa kwanza", + "Mweri wa kaili", + "Mweri wa katatu", + "Mweri wa kaana", + "Mweri wa tanu", + "Mweri wa sita", + "Mweri wa saba", + "Mweri wa nane", + "Mweri wa tisa", + "Mweri wa ikumi", + "Mweri wa ikumi na moja", + "Mweri wa ikumi na mbili" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "rof-tz", + "localeID": "rof_TZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_rof.js b/1.6.6/i18n/angular-locale_rof.js new file mode 100644 index 000000000..2d62de253 --- /dev/null +++ b/1.6.6/i18n/angular-locale_rof.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "kang\u2019ama", + "kingoto" + ], + "DAY": [ + "Ijumapili", + "Ijumatatu", + "Ijumanne", + "Ijumatano", + "Alhamisi", + "Ijumaa", + "Ijumamosi" + ], + "ERANAMES": [ + "Kabla ya Mayesu", + "Baada ya Mayesu" + ], + "ERAS": [ + "KM", + "BM" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Mweri wa kwanza", + "Mweri wa kaili", + "Mweri wa katatu", + "Mweri wa kaana", + "Mweri wa tanu", + "Mweri wa sita", + "Mweri wa saba", + "Mweri wa nane", + "Mweri wa tisa", + "Mweri wa ikumi", + "Mweri wa ikumi na moja", + "Mweri wa ikumi na mbili" + ], + "SHORTDAY": [ + "Ijp", + "Ijt", + "Ijn", + "Ijtn", + "Alh", + "Iju", + "Ijm" + ], + "SHORTMONTH": [ + "M1", + "M2", + "M3", + "M4", + "M5", + "M6", + "M7", + "M8", + "M9", + "M10", + "M11", + "M12" + ], + "STANDALONEMONTH": [ + "Mweri wa kwanza", + "Mweri wa kaili", + "Mweri wa katatu", + "Mweri wa kaana", + "Mweri wa tanu", + "Mweri wa sita", + "Mweri wa saba", + "Mweri wa nane", + "Mweri wa tisa", + "Mweri wa ikumi", + "Mweri wa ikumi na moja", + "Mweri wa ikumi na mbili" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "rof", + "localeID": "rof", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ru-by.js b/1.6.6/i18n/angular-locale_ru-by.js new file mode 100644 index 000000000..fd75de259 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ru-by.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0414\u041f", + "\u041f\u041f" + ], + "DAY": [ + "\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435", + "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a", + "\u0432\u0442\u043e\u0440\u043d\u0438\u043a", + "\u0441\u0440\u0435\u0434\u0430", + "\u0447\u0435\u0442\u0432\u0435\u0440\u0433", + "\u043f\u044f\u0442\u043d\u0438\u0446\u0430", + "\u0441\u0443\u0431\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u0434\u043e \u0420\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u0430 \u0425\u0440\u0438\u0441\u0442\u043e\u0432\u0430", + "\u043e\u0442 \u0420\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u0430 \u0425\u0440\u0438\u0441\u0442\u043e\u0432\u0430" + ], + "ERAS": [ + "\u0434\u043e \u043d. \u044d.", + "\u043d. \u044d." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044f", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044f", + "\u043c\u0430\u0440\u0442\u0430", + "\u0430\u043f\u0440\u0435\u043b\u044f", + "\u043c\u0430\u044f", + "\u0438\u044e\u043d\u044f", + "\u0438\u044e\u043b\u044f", + "\u0430\u0432\u0433\u0443\u0441\u0442\u0430", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044f", + "\u043d\u043e\u044f\u0431\u0440\u044f", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044f" + ], + "SHORTDAY": [ + "\u0432\u0441", + "\u043f\u043d", + "\u0432\u0442", + "\u0441\u0440", + "\u0447\u0442", + "\u043f\u0442", + "\u0441\u0431" + ], + "SHORTMONTH": [ + "\u044f\u043d\u0432.", + "\u0444\u0435\u0432\u0440.", + "\u043c\u0430\u0440.", + "\u0430\u043f\u0440.", + "\u043c\u0430\u044f", + "\u0438\u044e\u043d.", + "\u0438\u044e\u043b.", + "\u0430\u0432\u0433.", + "\u0441\u0435\u043d\u0442.", + "\u043e\u043a\u0442.", + "\u043d\u043e\u044f\u0431.", + "\u0434\u0435\u043a." + ], + "STANDALONEMONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044c", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044c", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0435\u043b\u044c", + "\u043c\u0430\u0439", + "\u0438\u044e\u043d\u044c", + "\u0438\u044e\u043b\u044c", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044c", + "\u043d\u043e\u044f\u0431\u0440\u044c", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y '\u0433'.", + "longDate": "d MMMM y '\u0433'.", + "medium": "d MMM y '\u0433'. H:mm:ss", + "mediumDate": "d MMM y '\u0433'.", + "mediumTime": "H:mm:ss", + "short": "dd.MM.y H:mm", + "shortDate": "dd.MM.y", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "BYN", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ru-by", + "localeID": "ru_BY", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ru-kg.js b/1.6.6/i18n/angular-locale_ru-kg.js new file mode 100644 index 000000000..302ab2afe --- /dev/null +++ b/1.6.6/i18n/angular-locale_ru-kg.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0414\u041f", + "\u041f\u041f" + ], + "DAY": [ + "\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435", + "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a", + "\u0432\u0442\u043e\u0440\u043d\u0438\u043a", + "\u0441\u0440\u0435\u0434\u0430", + "\u0447\u0435\u0442\u0432\u0435\u0440\u0433", + "\u043f\u044f\u0442\u043d\u0438\u0446\u0430", + "\u0441\u0443\u0431\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u0434\u043e \u0420\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u0430 \u0425\u0440\u0438\u0441\u0442\u043e\u0432\u0430", + "\u043e\u0442 \u0420\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u0430 \u0425\u0440\u0438\u0441\u0442\u043e\u0432\u0430" + ], + "ERAS": [ + "\u0434\u043e \u043d. \u044d.", + "\u043d. \u044d." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044f", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044f", + "\u043c\u0430\u0440\u0442\u0430", + "\u0430\u043f\u0440\u0435\u043b\u044f", + "\u043c\u0430\u044f", + "\u0438\u044e\u043d\u044f", + "\u0438\u044e\u043b\u044f", + "\u0430\u0432\u0433\u0443\u0441\u0442\u0430", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044f", + "\u043d\u043e\u044f\u0431\u0440\u044f", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044f" + ], + "SHORTDAY": [ + "\u0432\u0441", + "\u043f\u043d", + "\u0432\u0442", + "\u0441\u0440", + "\u0447\u0442", + "\u043f\u0442", + "\u0441\u0431" + ], + "SHORTMONTH": [ + "\u044f\u043d\u0432.", + "\u0444\u0435\u0432\u0440.", + "\u043c\u0430\u0440.", + "\u0430\u043f\u0440.", + "\u043c\u0430\u044f", + "\u0438\u044e\u043d.", + "\u0438\u044e\u043b.", + "\u0430\u0432\u0433.", + "\u0441\u0435\u043d\u0442.", + "\u043e\u043a\u0442.", + "\u043d\u043e\u044f\u0431.", + "\u0434\u0435\u043a." + ], + "STANDALONEMONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044c", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044c", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0435\u043b\u044c", + "\u043c\u0430\u0439", + "\u0438\u044e\u043d\u044c", + "\u0438\u044e\u043b\u044c", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044c", + "\u043d\u043e\u044f\u0431\u0440\u044c", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y '\u0433'.", + "longDate": "d MMMM y '\u0433'.", + "medium": "d MMM y '\u0433'. H:mm:ss", + "mediumDate": "d MMM y '\u0433'.", + "mediumTime": "H:mm:ss", + "short": "dd.MM.y H:mm", + "shortDate": "dd.MM.y", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "KGS", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ru-kg", + "localeID": "ru_KG", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ru-kz.js b/1.6.6/i18n/angular-locale_ru-kz.js new file mode 100644 index 000000000..57e1a52d7 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ru-kz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0414\u041f", + "\u041f\u041f" + ], + "DAY": [ + "\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435", + "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a", + "\u0432\u0442\u043e\u0440\u043d\u0438\u043a", + "\u0441\u0440\u0435\u0434\u0430", + "\u0447\u0435\u0442\u0432\u0435\u0440\u0433", + "\u043f\u044f\u0442\u043d\u0438\u0446\u0430", + "\u0441\u0443\u0431\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u0434\u043e \u0420\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u0430 \u0425\u0440\u0438\u0441\u0442\u043e\u0432\u0430", + "\u043e\u0442 \u0420\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u0430 \u0425\u0440\u0438\u0441\u0442\u043e\u0432\u0430" + ], + "ERAS": [ + "\u0434\u043e \u043d. \u044d.", + "\u043d. \u044d." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044f", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044f", + "\u043c\u0430\u0440\u0442\u0430", + "\u0430\u043f\u0440\u0435\u043b\u044f", + "\u043c\u0430\u044f", + "\u0438\u044e\u043d\u044f", + "\u0438\u044e\u043b\u044f", + "\u0430\u0432\u0433\u0443\u0441\u0442\u0430", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044f", + "\u043d\u043e\u044f\u0431\u0440\u044f", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044f" + ], + "SHORTDAY": [ + "\u0432\u0441", + "\u043f\u043d", + "\u0432\u0442", + "\u0441\u0440", + "\u0447\u0442", + "\u043f\u0442", + "\u0441\u0431" + ], + "SHORTMONTH": [ + "\u044f\u043d\u0432.", + "\u0444\u0435\u0432\u0440.", + "\u043c\u0430\u0440.", + "\u0430\u043f\u0440.", + "\u043c\u0430\u044f", + "\u0438\u044e\u043d.", + "\u0438\u044e\u043b.", + "\u0430\u0432\u0433.", + "\u0441\u0435\u043d\u0442.", + "\u043e\u043a\u0442.", + "\u043d\u043e\u044f\u0431.", + "\u0434\u0435\u043a." + ], + "STANDALONEMONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044c", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044c", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0435\u043b\u044c", + "\u043c\u0430\u0439", + "\u0438\u044e\u043d\u044c", + "\u0438\u044e\u043b\u044c", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044c", + "\u043d\u043e\u044f\u0431\u0440\u044c", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y '\u0433'.", + "longDate": "d MMMM y '\u0433'.", + "medium": "d MMM y '\u0433'. H:mm:ss", + "mediumDate": "d MMM y '\u0433'.", + "mediumTime": "H:mm:ss", + "short": "dd.MM.y H:mm", + "shortDate": "dd.MM.y", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b8", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ru-kz", + "localeID": "ru_KZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ru-md.js b/1.6.6/i18n/angular-locale_ru-md.js new file mode 100644 index 000000000..b3837e022 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ru-md.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0414\u041f", + "\u041f\u041f" + ], + "DAY": [ + "\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435", + "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a", + "\u0432\u0442\u043e\u0440\u043d\u0438\u043a", + "\u0441\u0440\u0435\u0434\u0430", + "\u0447\u0435\u0442\u0432\u0435\u0440\u0433", + "\u043f\u044f\u0442\u043d\u0438\u0446\u0430", + "\u0441\u0443\u0431\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u0434\u043e \u0420\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u0430 \u0425\u0440\u0438\u0441\u0442\u043e\u0432\u0430", + "\u043e\u0442 \u0420\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u0430 \u0425\u0440\u0438\u0441\u0442\u043e\u0432\u0430" + ], + "ERAS": [ + "\u0434\u043e \u043d. \u044d.", + "\u043d. \u044d." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044f", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044f", + "\u043c\u0430\u0440\u0442\u0430", + "\u0430\u043f\u0440\u0435\u043b\u044f", + "\u043c\u0430\u044f", + "\u0438\u044e\u043d\u044f", + "\u0438\u044e\u043b\u044f", + "\u0430\u0432\u0433\u0443\u0441\u0442\u0430", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044f", + "\u043d\u043e\u044f\u0431\u0440\u044f", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044f" + ], + "SHORTDAY": [ + "\u0432\u0441", + "\u043f\u043d", + "\u0432\u0442", + "\u0441\u0440", + "\u0447\u0442", + "\u043f\u0442", + "\u0441\u0431" + ], + "SHORTMONTH": [ + "\u044f\u043d\u0432.", + "\u0444\u0435\u0432\u0440.", + "\u043c\u0430\u0440.", + "\u0430\u043f\u0440.", + "\u043c\u0430\u044f", + "\u0438\u044e\u043d.", + "\u0438\u044e\u043b.", + "\u0430\u0432\u0433.", + "\u0441\u0435\u043d\u0442.", + "\u043e\u043a\u0442.", + "\u043d\u043e\u044f\u0431.", + "\u0434\u0435\u043a." + ], + "STANDALONEMONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044c", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044c", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0435\u043b\u044c", + "\u043c\u0430\u0439", + "\u0438\u044e\u043d\u044c", + "\u0438\u044e\u043b\u044c", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044c", + "\u043d\u043e\u044f\u0431\u0440\u044c", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y '\u0433'.", + "longDate": "d MMMM y '\u0433'.", + "medium": "d MMM y '\u0433'. H:mm:ss", + "mediumDate": "d MMM y '\u0433'.", + "mediumTime": "H:mm:ss", + "short": "dd.MM.y H:mm", + "shortDate": "dd.MM.y", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "MDL", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ru-md", + "localeID": "ru_MD", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ru-ru.js b/1.6.6/i18n/angular-locale_ru-ru.js new file mode 100644 index 000000000..34d443169 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ru-ru.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0414\u041f", + "\u041f\u041f" + ], + "DAY": [ + "\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435", + "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a", + "\u0432\u0442\u043e\u0440\u043d\u0438\u043a", + "\u0441\u0440\u0435\u0434\u0430", + "\u0447\u0435\u0442\u0432\u0435\u0440\u0433", + "\u043f\u044f\u0442\u043d\u0438\u0446\u0430", + "\u0441\u0443\u0431\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u0434\u043e \u0420\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u0430 \u0425\u0440\u0438\u0441\u0442\u043e\u0432\u0430", + "\u043e\u0442 \u0420\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u0430 \u0425\u0440\u0438\u0441\u0442\u043e\u0432\u0430" + ], + "ERAS": [ + "\u0434\u043e \u043d. \u044d.", + "\u043d. \u044d." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044f", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044f", + "\u043c\u0430\u0440\u0442\u0430", + "\u0430\u043f\u0440\u0435\u043b\u044f", + "\u043c\u0430\u044f", + "\u0438\u044e\u043d\u044f", + "\u0438\u044e\u043b\u044f", + "\u0430\u0432\u0433\u0443\u0441\u0442\u0430", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044f", + "\u043d\u043e\u044f\u0431\u0440\u044f", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044f" + ], + "SHORTDAY": [ + "\u0432\u0441", + "\u043f\u043d", + "\u0432\u0442", + "\u0441\u0440", + "\u0447\u0442", + "\u043f\u0442", + "\u0441\u0431" + ], + "SHORTMONTH": [ + "\u044f\u043d\u0432.", + "\u0444\u0435\u0432\u0440.", + "\u043c\u0430\u0440.", + "\u0430\u043f\u0440.", + "\u043c\u0430\u044f", + "\u0438\u044e\u043d.", + "\u0438\u044e\u043b.", + "\u0430\u0432\u0433.", + "\u0441\u0435\u043d\u0442.", + "\u043e\u043a\u0442.", + "\u043d\u043e\u044f\u0431.", + "\u0434\u0435\u043a." + ], + "STANDALONEMONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044c", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044c", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0435\u043b\u044c", + "\u043c\u0430\u0439", + "\u0438\u044e\u043d\u044c", + "\u0438\u044e\u043b\u044c", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044c", + "\u043d\u043e\u044f\u0431\u0440\u044c", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y '\u0433'.", + "longDate": "d MMMM y '\u0433'.", + "medium": "d MMM y '\u0433'. H:mm:ss", + "mediumDate": "d MMM y '\u0433'.", + "mediumTime": "H:mm:ss", + "short": "dd.MM.y H:mm", + "shortDate": "dd.MM.y", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20bd", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ru-ru", + "localeID": "ru_RU", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ru-ua.js b/1.6.6/i18n/angular-locale_ru-ua.js new file mode 100644 index 000000000..0958afad6 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ru-ua.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435", + "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a", + "\u0432\u0442\u043e\u0440\u043d\u0438\u043a", + "\u0441\u0440\u0435\u0434\u0430", + "\u0447\u0435\u0442\u0432\u0435\u0440\u0433", + "\u043f\u044f\u0442\u043d\u0438\u0446\u0430", + "\u0441\u0443\u0431\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u0434\u043e \u0420\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u0430 \u0425\u0440\u0438\u0441\u0442\u043e\u0432\u0430", + "\u043e\u0442 \u0420\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u0430 \u0425\u0440\u0438\u0441\u0442\u043e\u0432\u0430" + ], + "ERAS": [ + "\u0434\u043e \u043d. \u044d.", + "\u043d. \u044d." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044f", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044f", + "\u043c\u0430\u0440\u0442\u0430", + "\u0430\u043f\u0440\u0435\u043b\u044f", + "\u043c\u0430\u044f", + "\u0438\u044e\u043d\u044f", + "\u0438\u044e\u043b\u044f", + "\u0430\u0432\u0433\u0443\u0441\u0442\u0430", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044f", + "\u043d\u043e\u044f\u0431\u0440\u044f", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044f" + ], + "SHORTDAY": [ + "\u0432\u0441", + "\u043f\u043d", + "\u0432\u0442", + "\u0441\u0440", + "\u0447\u0442", + "\u043f\u0442", + "\u0441\u0431" + ], + "SHORTMONTH": [ + "\u044f\u043d\u0432.", + "\u0444\u0435\u0432\u0440.", + "\u043c\u0430\u0440.", + "\u0430\u043f\u0440.", + "\u043c\u0430\u044f", + "\u0438\u044e\u043d.", + "\u0438\u044e\u043b.", + "\u0430\u0432\u0433.", + "\u0441\u0435\u043d\u0442.", + "\u043e\u043a\u0442.", + "\u043d\u043e\u044f\u0431.", + "\u0434\u0435\u043a." + ], + "STANDALONEMONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044c", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044c", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0435\u043b\u044c", + "\u043c\u0430\u0439", + "\u0438\u044e\u043d\u044c", + "\u0438\u044e\u043b\u044c", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044c", + "\u043d\u043e\u044f\u0431\u0440\u044c", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y '\u0433'.", + "longDate": "d MMMM y '\u0433'.", + "medium": "d MMM y '\u0433'. HH:mm:ss", + "mediumDate": "d MMM y '\u0433'.", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.y HH:mm", + "shortDate": "dd.MM.y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u0433\u0440\u043d.", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ru-ua", + "localeID": "ru_UA", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ru.js b/1.6.6/i18n/angular-locale_ru.js new file mode 100644 index 000000000..3e66f05d2 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ru.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0414\u041f", + "\u041f\u041f" + ], + "DAY": [ + "\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435", + "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a", + "\u0432\u0442\u043e\u0440\u043d\u0438\u043a", + "\u0441\u0440\u0435\u0434\u0430", + "\u0447\u0435\u0442\u0432\u0435\u0440\u0433", + "\u043f\u044f\u0442\u043d\u0438\u0446\u0430", + "\u0441\u0443\u0431\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u0434\u043e \u0420\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u0430 \u0425\u0440\u0438\u0441\u0442\u043e\u0432\u0430", + "\u043e\u0442 \u0420\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u0430 \u0425\u0440\u0438\u0441\u0442\u043e\u0432\u0430" + ], + "ERAS": [ + "\u0434\u043e \u043d. \u044d.", + "\u043d. \u044d." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044f", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044f", + "\u043c\u0430\u0440\u0442\u0430", + "\u0430\u043f\u0440\u0435\u043b\u044f", + "\u043c\u0430\u044f", + "\u0438\u044e\u043d\u044f", + "\u0438\u044e\u043b\u044f", + "\u0430\u0432\u0433\u0443\u0441\u0442\u0430", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044f", + "\u043d\u043e\u044f\u0431\u0440\u044f", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044f" + ], + "SHORTDAY": [ + "\u0432\u0441", + "\u043f\u043d", + "\u0432\u0442", + "\u0441\u0440", + "\u0447\u0442", + "\u043f\u0442", + "\u0441\u0431" + ], + "SHORTMONTH": [ + "\u044f\u043d\u0432.", + "\u0444\u0435\u0432\u0440.", + "\u043c\u0430\u0440.", + "\u0430\u043f\u0440.", + "\u043c\u0430\u044f", + "\u0438\u044e\u043d.", + "\u0438\u044e\u043b.", + "\u0430\u0432\u0433.", + "\u0441\u0435\u043d\u0442.", + "\u043e\u043a\u0442.", + "\u043d\u043e\u044f\u0431.", + "\u0434\u0435\u043a." + ], + "STANDALONEMONTH": [ + "\u044f\u043d\u0432\u0430\u0440\u044c", + "\u0444\u0435\u0432\u0440\u0430\u043b\u044c", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0435\u043b\u044c", + "\u043c\u0430\u0439", + "\u0438\u044e\u043d\u044c", + "\u0438\u044e\u043b\u044c", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c", + "\u043e\u043a\u0442\u044f\u0431\u0440\u044c", + "\u043d\u043e\u044f\u0431\u0440\u044c", + "\u0434\u0435\u043a\u0430\u0431\u0440\u044c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y '\u0433'.", + "longDate": "d MMMM y '\u0433'.", + "medium": "d MMM y '\u0433'. H:mm:ss", + "mediumDate": "d MMM y '\u0433'.", + "mediumTime": "H:mm:ss", + "short": "dd.MM.y H:mm", + "shortDate": "dd.MM.y", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20bd", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ru", + "localeID": "ru", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_rw-rw.js b/1.6.6/i18n/angular-locale_rw-rw.js new file mode 100644 index 000000000..1210a3a6e --- /dev/null +++ b/1.6.6/i18n/angular-locale_rw-rw.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Ku cyumweru", + "Kuwa mbere", + "Kuwa kabiri", + "Kuwa gatatu", + "Kuwa kane", + "Kuwa gatanu", + "Kuwa gatandatu" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Mutarama", + "Gashyantare", + "Werurwe", + "Mata", + "Gicuransi", + "Kamena", + "Nyakanga", + "Kanama", + "Nzeli", + "Ukwakira", + "Ugushyingo", + "Ukuboza" + ], + "SHORTDAY": [ + "cyu.", + "mbe.", + "kab.", + "gtu.", + "kan.", + "gnu.", + "gnd." + ], + "SHORTMONTH": [ + "mut.", + "gas.", + "wer.", + "mat.", + "gic.", + "kam.", + "nya.", + "kan.", + "nze.", + "ukw.", + "ugu.", + "uku." + ], + "STANDALONEMONTH": [ + "Mutarama", + "Gashyantare", + "Werurwe", + "Mata", + "Gicuransi", + "Kamena", + "Nyakanga", + "Kanama", + "Nzeli", + "Ukwakira", + "Ugushyingo", + "Ukuboza" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "RF", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "rw-rw", + "localeID": "rw_RW", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_rw.js b/1.6.6/i18n/angular-locale_rw.js new file mode 100644 index 000000000..bad381891 --- /dev/null +++ b/1.6.6/i18n/angular-locale_rw.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Ku cyumweru", + "Kuwa mbere", + "Kuwa kabiri", + "Kuwa gatatu", + "Kuwa kane", + "Kuwa gatanu", + "Kuwa gatandatu" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Mutarama", + "Gashyantare", + "Werurwe", + "Mata", + "Gicuransi", + "Kamena", + "Nyakanga", + "Kanama", + "Nzeli", + "Ukwakira", + "Ugushyingo", + "Ukuboza" + ], + "SHORTDAY": [ + "cyu.", + "mbe.", + "kab.", + "gtu.", + "kan.", + "gnu.", + "gnd." + ], + "SHORTMONTH": [ + "mut.", + "gas.", + "wer.", + "mat.", + "gic.", + "kam.", + "nya.", + "kan.", + "nze.", + "ukw.", + "ugu.", + "uku." + ], + "STANDALONEMONTH": [ + "Mutarama", + "Gashyantare", + "Werurwe", + "Mata", + "Gicuransi", + "Kamena", + "Nyakanga", + "Kanama", + "Nzeli", + "Ukwakira", + "Ugushyingo", + "Ukuboza" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "RF", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "rw", + "localeID": "rw", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_rwk-tz.js b/1.6.6/i18n/angular-locale_rwk-tz.js new file mode 100644 index 000000000..38b85962c --- /dev/null +++ b/1.6.6/i18n/angular-locale_rwk-tz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "utuko", + "kyiukonyi" + ], + "DAY": [ + "Jumapilyi", + "Jumatatuu", + "Jumanne", + "Jumatanu", + "Alhamisi", + "Ijumaa", + "Jumamosi" + ], + "ERANAMES": [ + "Kabla ya Kristu", + "Baada ya Kristu" + ], + "ERAS": [ + "KK", + "BK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januari", + "Februari", + "Machi", + "Aprilyi", + "Mei", + "Junyi", + "Julyai", + "Agusti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "SHORTDAY": [ + "Jpi", + "Jtt", + "Jnn", + "Jtn", + "Alh", + "Iju", + "Jmo" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Jul", + "Ago", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Machi", + "Aprilyi", + "Mei", + "Junyi", + "Julyai", + "Agusti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "rwk-tz", + "localeID": "rwk_TZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_rwk.js b/1.6.6/i18n/angular-locale_rwk.js new file mode 100644 index 000000000..8c4a48a7f --- /dev/null +++ b/1.6.6/i18n/angular-locale_rwk.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "utuko", + "kyiukonyi" + ], + "DAY": [ + "Jumapilyi", + "Jumatatuu", + "Jumanne", + "Jumatanu", + "Alhamisi", + "Ijumaa", + "Jumamosi" + ], + "ERANAMES": [ + "Kabla ya Kristu", + "Baada ya Kristu" + ], + "ERAS": [ + "KK", + "BK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januari", + "Februari", + "Machi", + "Aprilyi", + "Mei", + "Junyi", + "Julyai", + "Agusti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "SHORTDAY": [ + "Jpi", + "Jtt", + "Jnn", + "Jtn", + "Alh", + "Iju", + "Jmo" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Jul", + "Ago", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Machi", + "Aprilyi", + "Mei", + "Junyi", + "Julyai", + "Agusti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "rwk", + "localeID": "rwk", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sah-ru.js b/1.6.6/i18n/angular-locale_sah-ru.js new file mode 100644 index 000000000..2a90d28c6 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sah-ru.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u042d\u0418", + "\u042d\u041a" + ], + "DAY": [ + "\u0431\u0430\u0441\u043a\u044b\u04bb\u044b\u0430\u043d\u043d\u044c\u0430", + "\u0431\u044d\u043d\u0438\u0434\u0438\u044d\u043d\u043d\u044c\u0438\u043a", + "\u043e\u043f\u0442\u0443\u043e\u0440\u0443\u043d\u043d\u044c\u0443\u043a", + "\u0441\u044d\u0440\u044d\u0434\u044d", + "\u0447\u044d\u043f\u043f\u0438\u044d\u0440", + "\u0411\u044d\u044d\u0442\u0438\u04a5\u0441\u044d", + "\u0441\u0443\u0431\u0443\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u0431. \u044d. \u0438.", + "\u0431. \u044d" + ], + "ERAS": [ + "\u0431. \u044d. \u0438.", + "\u0431. \u044d" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0422\u043e\u0445\u0441\u0443\u043d\u043d\u044c\u0443", + "\u041e\u043b\u0443\u043d\u043d\u044c\u0443", + "\u041a\u0443\u043b\u0443\u043d \u0442\u0443\u0442\u0430\u0440", + "\u041c\u0443\u0443\u0441 \u0443\u0441\u0442\u0430\u0440", + "\u042b\u0430\u043c \u044b\u0439\u044b\u043d", + "\u0411\u044d\u0441 \u044b\u0439\u044b\u043d", + "\u041e\u0442 \u044b\u0439\u044b\u043d", + "\u0410\u0442\u044b\u0440\u0434\u044c\u044b\u0445 \u044b\u0439\u044b\u043d", + "\u0411\u0430\u043b\u0430\u0495\u0430\u043d \u044b\u0439\u044b\u043d", + "\u0410\u043b\u0442\u044b\u043d\u043d\u044c\u044b", + "\u0421\u044d\u0442\u0438\u043d\u043d\u044c\u0438", + "\u0430\u0445\u0441\u044b\u043d\u043d\u044c\u044b" + ], + "SHORTDAY": [ + "\u0431\u0441", + "\u0431\u043d", + "\u043e\u043f", + "\u0441\u044d", + "\u0447\u043f", + "\u0431\u044d", + "\u0441\u0431" + ], + "SHORTMONTH": [ + "\u0422\u043e\u0445\u0441", + "\u041e\u043b\u0443\u043d", + "\u041a\u043b\u043d", + "\u041c\u0441\u0443", + "\u042b\u0430\u043c", + "\u0411\u044d\u0441", + "\u041e\u0442\u0439", + "\u0410\u0442\u0440", + "\u0411\u043b\u0495", + "\u0410\u043b\u0442", + "\u0421\u044d\u0442", + "\u0410\u0445\u0441" + ], + "STANDALONEMONTH": [ + "\u0442\u043e\u0445\u0441\u0443\u043d\u043d\u044c\u0443", + "\u043e\u043b\u0443\u043d\u043d\u044c\u0443", + "\u043a\u0443\u043b\u0443\u043d \u0442\u0443\u0442\u0430\u0440", + "\u043c\u0443\u0443\u0441 \u0443\u0441\u0442\u0430\u0440", + "\u044b\u0430\u043c \u044b\u0439\u0430", + "\u0431\u044d\u0441 \u044b\u0439\u0430", + "\u043e\u0442 \u044b\u0439\u0430", + "\u0430\u0442\u044b\u0440\u0434\u044c\u044b\u0445 \u044b\u0439\u0430", + "\u0431\u0430\u043b\u0430\u0495\u0430\u043d \u044b\u0439\u0430", + "\u0430\u043b\u0442\u044b\u043d\u043d\u044c\u044b", + "\u0441\u044d\u0442\u0438\u043d\u043d\u044c\u0438", + "\u0430\u0445\u0441\u044b\u043d\u043d\u044c\u044b" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y '\u0441\u044b\u043b' MMMM d '\u043a\u04af\u043d\u044d', EEEE", + "longDate": "y, MMMM d", + "medium": "y, MMM d HH:mm:ss", + "mediumDate": "y, MMM d", + "mediumTime": "HH:mm:ss", + "short": "yy/M/d HH:mm", + "shortDate": "yy/M/d", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20bd", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sah-ru", + "localeID": "sah_RU", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sah.js b/1.6.6/i18n/angular-locale_sah.js new file mode 100644 index 000000000..f844ac53f --- /dev/null +++ b/1.6.6/i18n/angular-locale_sah.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u042d\u0418", + "\u042d\u041a" + ], + "DAY": [ + "\u0431\u0430\u0441\u043a\u044b\u04bb\u044b\u0430\u043d\u043d\u044c\u0430", + "\u0431\u044d\u043d\u0438\u0434\u0438\u044d\u043d\u043d\u044c\u0438\u043a", + "\u043e\u043f\u0442\u0443\u043e\u0440\u0443\u043d\u043d\u044c\u0443\u043a", + "\u0441\u044d\u0440\u044d\u0434\u044d", + "\u0447\u044d\u043f\u043f\u0438\u044d\u0440", + "\u0411\u044d\u044d\u0442\u0438\u04a5\u0441\u044d", + "\u0441\u0443\u0431\u0443\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u0431. \u044d. \u0438.", + "\u0431. \u044d" + ], + "ERAS": [ + "\u0431. \u044d. \u0438.", + "\u0431. \u044d" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0422\u043e\u0445\u0441\u0443\u043d\u043d\u044c\u0443", + "\u041e\u043b\u0443\u043d\u043d\u044c\u0443", + "\u041a\u0443\u043b\u0443\u043d \u0442\u0443\u0442\u0430\u0440", + "\u041c\u0443\u0443\u0441 \u0443\u0441\u0442\u0430\u0440", + "\u042b\u0430\u043c \u044b\u0439\u044b\u043d", + "\u0411\u044d\u0441 \u044b\u0439\u044b\u043d", + "\u041e\u0442 \u044b\u0439\u044b\u043d", + "\u0410\u0442\u044b\u0440\u0434\u044c\u044b\u0445 \u044b\u0439\u044b\u043d", + "\u0411\u0430\u043b\u0430\u0495\u0430\u043d \u044b\u0439\u044b\u043d", + "\u0410\u043b\u0442\u044b\u043d\u043d\u044c\u044b", + "\u0421\u044d\u0442\u0438\u043d\u043d\u044c\u0438", + "\u0430\u0445\u0441\u044b\u043d\u043d\u044c\u044b" + ], + "SHORTDAY": [ + "\u0431\u0441", + "\u0431\u043d", + "\u043e\u043f", + "\u0441\u044d", + "\u0447\u043f", + "\u0431\u044d", + "\u0441\u0431" + ], + "SHORTMONTH": [ + "\u0422\u043e\u0445\u0441", + "\u041e\u043b\u0443\u043d", + "\u041a\u043b\u043d", + "\u041c\u0441\u0443", + "\u042b\u0430\u043c", + "\u0411\u044d\u0441", + "\u041e\u0442\u0439", + "\u0410\u0442\u0440", + "\u0411\u043b\u0495", + "\u0410\u043b\u0442", + "\u0421\u044d\u0442", + "\u0410\u0445\u0441" + ], + "STANDALONEMONTH": [ + "\u0442\u043e\u0445\u0441\u0443\u043d\u043d\u044c\u0443", + "\u043e\u043b\u0443\u043d\u043d\u044c\u0443", + "\u043a\u0443\u043b\u0443\u043d \u0442\u0443\u0442\u0430\u0440", + "\u043c\u0443\u0443\u0441 \u0443\u0441\u0442\u0430\u0440", + "\u044b\u0430\u043c \u044b\u0439\u0430", + "\u0431\u044d\u0441 \u044b\u0439\u0430", + "\u043e\u0442 \u044b\u0439\u0430", + "\u0430\u0442\u044b\u0440\u0434\u044c\u044b\u0445 \u044b\u0439\u0430", + "\u0431\u0430\u043b\u0430\u0495\u0430\u043d \u044b\u0439\u0430", + "\u0430\u043b\u0442\u044b\u043d\u043d\u044c\u044b", + "\u0441\u044d\u0442\u0438\u043d\u043d\u044c\u0438", + "\u0430\u0445\u0441\u044b\u043d\u043d\u044c\u044b" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y '\u0441\u044b\u043b' MMMM d '\u043a\u04af\u043d\u044d', EEEE", + "longDate": "y, MMMM d", + "medium": "y, MMM d HH:mm:ss", + "mediumDate": "y, MMM d", + "mediumTime": "HH:mm:ss", + "short": "yy/M/d HH:mm", + "shortDate": "yy/M/d", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20bd", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sah", + "localeID": "sah", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_saq-ke.js b/1.6.6/i18n/angular-locale_saq-ke.js new file mode 100644 index 000000000..01e2328d7 --- /dev/null +++ b/1.6.6/i18n/angular-locale_saq-ke.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Tesiran", + "Teipa" + ], + "DAY": [ + "Mderot ee are", + "Mderot ee kuni", + "Mderot ee ong\u2019wan", + "Mderot ee inet", + "Mderot ee ile", + "Mderot ee sapa", + "Mderot ee kwe" + ], + "ERANAMES": [ + "Kabla ya Christo", + "Baada ya Christo" + ], + "ERAS": [ + "KK", + "BK" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Lapa le obo", + "Lapa le waare", + "Lapa le okuni", + "Lapa le ong\u2019wan", + "Lapa le imet", + "Lapa le ile", + "Lapa le sapa", + "Lapa le isiet", + "Lapa le saal", + "Lapa le tomon", + "Lapa le tomon obo", + "Lapa le tomon waare" + ], + "SHORTDAY": [ + "Are", + "Kun", + "Ong", + "Ine", + "Ile", + "Sap", + "Kwe" + ], + "SHORTMONTH": [ + "Obo", + "Waa", + "Oku", + "Ong", + "Ime", + "Ile", + "Sap", + "Isi", + "Saa", + "Tom", + "Tob", + "Tow" + ], + "STANDALONEMONTH": [ + "Lapa le obo", + "Lapa le waare", + "Lapa le okuni", + "Lapa le ong\u2019wan", + "Lapa le imet", + "Lapa le ile", + "Lapa le sapa", + "Lapa le isiet", + "Lapa le saal", + "Lapa le tomon", + "Lapa le tomon obo", + "Lapa le tomon waare" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "saq-ke", + "localeID": "saq_KE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_saq.js b/1.6.6/i18n/angular-locale_saq.js new file mode 100644 index 000000000..24fe989e2 --- /dev/null +++ b/1.6.6/i18n/angular-locale_saq.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Tesiran", + "Teipa" + ], + "DAY": [ + "Mderot ee are", + "Mderot ee kuni", + "Mderot ee ong\u2019wan", + "Mderot ee inet", + "Mderot ee ile", + "Mderot ee sapa", + "Mderot ee kwe" + ], + "ERANAMES": [ + "Kabla ya Christo", + "Baada ya Christo" + ], + "ERAS": [ + "KK", + "BK" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Lapa le obo", + "Lapa le waare", + "Lapa le okuni", + "Lapa le ong\u2019wan", + "Lapa le imet", + "Lapa le ile", + "Lapa le sapa", + "Lapa le isiet", + "Lapa le saal", + "Lapa le tomon", + "Lapa le tomon obo", + "Lapa le tomon waare" + ], + "SHORTDAY": [ + "Are", + "Kun", + "Ong", + "Ine", + "Ile", + "Sap", + "Kwe" + ], + "SHORTMONTH": [ + "Obo", + "Waa", + "Oku", + "Ong", + "Ime", + "Ile", + "Sap", + "Isi", + "Saa", + "Tom", + "Tob", + "Tow" + ], + "STANDALONEMONTH": [ + "Lapa le obo", + "Lapa le waare", + "Lapa le okuni", + "Lapa le ong\u2019wan", + "Lapa le imet", + "Lapa le ile", + "Lapa le sapa", + "Lapa le isiet", + "Lapa le saal", + "Lapa le tomon", + "Lapa le tomon obo", + "Lapa le tomon waare" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "saq", + "localeID": "saq", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sbp-tz.js b/1.6.6/i18n/angular-locale_sbp-tz.js new file mode 100644 index 000000000..3464a84c9 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sbp-tz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Lwamilawu", + "Pashamihe" + ], + "DAY": [ + "Mulungu", + "Jumatatu", + "Jumanne", + "Jumatano", + "Alahamisi", + "Ijumaa", + "Jumamosi" + ], + "ERANAMES": [ + "Ashanali uKilisito", + "Pamwandi ya Kilisto" + ], + "ERAS": [ + "AK", + "PK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Mupalangulwa", + "Mwitope", + "Mushende", + "Munyi", + "Mushende Magali", + "Mujimbi", + "Mushipepo", + "Mupuguto", + "Munyense", + "Mokhu", + "Musongandembwe", + "Muhaano" + ], + "SHORTDAY": [ + "Mul", + "Jtt", + "Jnn", + "Jtn", + "Alh", + "Iju", + "Jmo" + ], + "SHORTMONTH": [ + "Mup", + "Mwi", + "Msh", + "Mun", + "Mag", + "Muj", + "Msp", + "Mpg", + "Mye", + "Mok", + "Mus", + "Muh" + ], + "STANDALONEMONTH": [ + "Mupalangulwa", + "Mwitope", + "Mushende", + "Munyi", + "Mushende Magali", + "Mujimbi", + "Mushipepo", + "Mupuguto", + "Munyense", + "Mokhu", + "Musongandembwe", + "Muhaano" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "sbp-tz", + "localeID": "sbp_TZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sbp.js b/1.6.6/i18n/angular-locale_sbp.js new file mode 100644 index 000000000..a198bf6bd --- /dev/null +++ b/1.6.6/i18n/angular-locale_sbp.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Lwamilawu", + "Pashamihe" + ], + "DAY": [ + "Mulungu", + "Jumatatu", + "Jumanne", + "Jumatano", + "Alahamisi", + "Ijumaa", + "Jumamosi" + ], + "ERANAMES": [ + "Ashanali uKilisito", + "Pamwandi ya Kilisto" + ], + "ERAS": [ + "AK", + "PK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Mupalangulwa", + "Mwitope", + "Mushende", + "Munyi", + "Mushende Magali", + "Mujimbi", + "Mushipepo", + "Mupuguto", + "Munyense", + "Mokhu", + "Musongandembwe", + "Muhaano" + ], + "SHORTDAY": [ + "Mul", + "Jtt", + "Jnn", + "Jtn", + "Alh", + "Iju", + "Jmo" + ], + "SHORTMONTH": [ + "Mup", + "Mwi", + "Msh", + "Mun", + "Mag", + "Muj", + "Msp", + "Mpg", + "Mye", + "Mok", + "Mus", + "Muh" + ], + "STANDALONEMONTH": [ + "Mupalangulwa", + "Mwitope", + "Mushende", + "Munyi", + "Mushende Magali", + "Mujimbi", + "Mushipepo", + "Mupuguto", + "Munyense", + "Mokhu", + "Musongandembwe", + "Muhaano" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "sbp", + "localeID": "sbp", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_se-fi.js b/1.6.6/i18n/angular-locale_se-fi.js new file mode 100644 index 000000000..4fdcceec8 --- /dev/null +++ b/1.6.6/i18n/angular-locale_se-fi.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "i\u0111itbeaivet", + "eahketbeaivet" + ], + "DAY": [ + "sotnabeaivi", + "vuoss\u00e1rgga", + "ma\u014b\u014beb\u00e1rgga", + "gaskavahku", + "duorastaga", + "bearjadaga", + "l\u00e1vvardaga" + ], + "ERANAMES": [ + "ovdal Kristtusa", + "ma\u014b\u014bel Kristtusa" + ], + "ERAS": [ + "o.Kr.", + "m.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "o\u0111\u0111ajagem\u00e1nnu", + "guovvam\u00e1nnu", + "njuk\u010dam\u00e1nnu", + "cuo\u014bom\u00e1nnu", + "miessem\u00e1nnu", + "geassem\u00e1nnu", + "suoidnem\u00e1nnu", + "borgem\u00e1nnu", + "\u010dak\u010dam\u00e1nnu", + "golggotm\u00e1nnu", + "sk\u00e1bmam\u00e1nnu", + "juovlam\u00e1nnu" + ], + "SHORTDAY": [ + "sotn", + "vuos", + "ma\u014b", + "gask", + "duor", + "bear", + "l\u00e1v" + ], + "SHORTMONTH": [ + "o\u0111\u0111j", + "guov", + "njuk", + "cuo", + "mies", + "geas", + "suoi", + "borg", + "\u010dak\u010d", + "golg", + "sk\u00e1b", + "juov" + ], + "STANDALONEMONTH": [ + "o\u0111\u0111ajagem\u00e1nnu", + "guovvam\u00e1nnu", + "njuk\u010dam\u00e1nnu", + "cuo\u014bom\u00e1nnu", + "miessem\u00e1nnu", + "geassem\u00e1nnu", + "suoidnem\u00e1nnu", + "borgem\u00e1nnu", + "\u010dak\u010dam\u00e1nnu", + "golggotm\u00e1nnu", + "sk\u00e1bmam\u00e1nnu", + "juovlam\u00e1nnu" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "se-fi", + "localeID": "se_FI", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_se-no.js b/1.6.6/i18n/angular-locale_se-no.js new file mode 100644 index 000000000..4fa6e3a19 --- /dev/null +++ b/1.6.6/i18n/angular-locale_se-no.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "i\u0111itbeaivet", + "eahketbeaivet" + ], + "DAY": [ + "sotnabeaivi", + "vuoss\u00e1rga", + "ma\u014b\u014beb\u00e1rga", + "gaskavahkku", + "duorasdat", + "bearjadat", + "l\u00e1vvardat" + ], + "ERANAMES": [ + "ovdal Kristtusa", + "ma\u014b\u014bel Kristtusa" + ], + "ERAS": [ + "o.Kr.", + "m.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "o\u0111\u0111ajagem\u00e1nnu", + "guovvam\u00e1nnu", + "njuk\u010dam\u00e1nnu", + "cuo\u014bom\u00e1nnu", + "miessem\u00e1nnu", + "geassem\u00e1nnu", + "suoidnem\u00e1nnu", + "borgem\u00e1nnu", + "\u010dak\u010dam\u00e1nnu", + "golggotm\u00e1nnu", + "sk\u00e1bmam\u00e1nnu", + "juovlam\u00e1nnu" + ], + "SHORTDAY": [ + "sotn", + "vuos", + "ma\u014b", + "gask", + "duor", + "bear", + "l\u00e1v" + ], + "SHORTMONTH": [ + "o\u0111\u0111j", + "guov", + "njuk", + "cuo", + "mies", + "geas", + "suoi", + "borg", + "\u010dak\u010d", + "golg", + "sk\u00e1b", + "juov" + ], + "STANDALONEMONTH": [ + "o\u0111\u0111ajagem\u00e1nnu", + "guovvam\u00e1nnu", + "njuk\u010dam\u00e1nnu", + "cuo\u014bom\u00e1nnu", + "miessem\u00e1nnu", + "geassem\u00e1nnu", + "suoidnem\u00e1nnu", + "borgem\u00e1nnu", + "\u010dak\u010dam\u00e1nnu", + "golggotm\u00e1nnu", + "sk\u00e1bmam\u00e1nnu", + "juovlam\u00e1nnu" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "se-no", + "localeID": "se_NO", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_se-se.js b/1.6.6/i18n/angular-locale_se-se.js new file mode 100644 index 000000000..ea4545ea9 --- /dev/null +++ b/1.6.6/i18n/angular-locale_se-se.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "i\u0111itbeaivet", + "eahketbeaivet" + ], + "DAY": [ + "sotnabeaivi", + "vuoss\u00e1rga", + "ma\u014b\u014beb\u00e1rga", + "gaskavahkku", + "duorasdat", + "bearjadat", + "l\u00e1vvardat" + ], + "ERANAMES": [ + "ovdal Kristtusa", + "ma\u014b\u014bel Kristtusa" + ], + "ERAS": [ + "o.Kr.", + "m.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "o\u0111\u0111ajagem\u00e1nnu", + "guovvam\u00e1nnu", + "njuk\u010dam\u00e1nnu", + "cuo\u014bom\u00e1nnu", + "miessem\u00e1nnu", + "geassem\u00e1nnu", + "suoidnem\u00e1nnu", + "borgem\u00e1nnu", + "\u010dak\u010dam\u00e1nnu", + "golggotm\u00e1nnu", + "sk\u00e1bmam\u00e1nnu", + "juovlam\u00e1nnu" + ], + "SHORTDAY": [ + "sotn", + "vuos", + "ma\u014b", + "gask", + "duor", + "bear", + "l\u00e1v" + ], + "SHORTMONTH": [ + "o\u0111\u0111j", + "guov", + "njuk", + "cuo", + "mies", + "geas", + "suoi", + "borg", + "\u010dak\u010d", + "golg", + "sk\u00e1b", + "juov" + ], + "STANDALONEMONTH": [ + "o\u0111\u0111ajagem\u00e1nnu", + "guovvam\u00e1nnu", + "njuk\u010dam\u00e1nnu", + "cuo\u014bom\u00e1nnu", + "miessem\u00e1nnu", + "geassem\u00e1nnu", + "suoidnem\u00e1nnu", + "borgem\u00e1nnu", + "\u010dak\u010dam\u00e1nnu", + "golggotm\u00e1nnu", + "sk\u00e1bmam\u00e1nnu", + "juovlam\u00e1nnu" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "se-se", + "localeID": "se_SE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_se.js b/1.6.6/i18n/angular-locale_se.js new file mode 100644 index 000000000..2434e7bdc --- /dev/null +++ b/1.6.6/i18n/angular-locale_se.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "i\u0111itbeaivet", + "eahketbeaivet" + ], + "DAY": [ + "sotnabeaivi", + "vuoss\u00e1rga", + "ma\u014b\u014beb\u00e1rga", + "gaskavahkku", + "duorasdat", + "bearjadat", + "l\u00e1vvardat" + ], + "ERANAMES": [ + "ovdal Kristtusa", + "ma\u014b\u014bel Kristtusa" + ], + "ERAS": [ + "o.Kr.", + "m.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "o\u0111\u0111ajagem\u00e1nnu", + "guovvam\u00e1nnu", + "njuk\u010dam\u00e1nnu", + "cuo\u014bom\u00e1nnu", + "miessem\u00e1nnu", + "geassem\u00e1nnu", + "suoidnem\u00e1nnu", + "borgem\u00e1nnu", + "\u010dak\u010dam\u00e1nnu", + "golggotm\u00e1nnu", + "sk\u00e1bmam\u00e1nnu", + "juovlam\u00e1nnu" + ], + "SHORTDAY": [ + "sotn", + "vuos", + "ma\u014b", + "gask", + "duor", + "bear", + "l\u00e1v" + ], + "SHORTMONTH": [ + "o\u0111\u0111j", + "guov", + "njuk", + "cuo", + "mies", + "geas", + "suoi", + "borg", + "\u010dak\u010d", + "golg", + "sk\u00e1b", + "juov" + ], + "STANDALONEMONTH": [ + "o\u0111\u0111ajagem\u00e1nnu", + "guovvam\u00e1nnu", + "njuk\u010dam\u00e1nnu", + "cuo\u014bom\u00e1nnu", + "miessem\u00e1nnu", + "geassem\u00e1nnu", + "suoidnem\u00e1nnu", + "borgem\u00e1nnu", + "\u010dak\u010dam\u00e1nnu", + "golggotm\u00e1nnu", + "sk\u00e1bmam\u00e1nnu", + "juovlam\u00e1nnu" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "se", + "localeID": "se", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_seh-mz.js b/1.6.6/i18n/angular-locale_seh-mz.js new file mode 100644 index 000000000..754cf3a28 --- /dev/null +++ b/1.6.6/i18n/angular-locale_seh-mz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Dimingu", + "Chiposi", + "Chipiri", + "Chitatu", + "Chinai", + "Chishanu", + "Sabudu" + ], + "ERANAMES": [ + "Antes de Cristo", + "Anno Domini" + ], + "ERAS": [ + "AC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Janeiro", + "Fevreiro", + "Marco", + "Abril", + "Maio", + "Junho", + "Julho", + "Augusto", + "Setembro", + "Otubro", + "Novembro", + "Decembro" + ], + "SHORTDAY": [ + "Dim", + "Pos", + "Pir", + "Tat", + "Nai", + "Sha", + "Sab" + ], + "SHORTMONTH": [ + "Jan", + "Fev", + "Mar", + "Abr", + "Mai", + "Jun", + "Jul", + "Aug", + "Set", + "Otu", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "Janeiro", + "Fevreiro", + "Marco", + "Abril", + "Maio", + "Junho", + "Julho", + "Augusto", + "Setembro", + "Otubro", + "Novembro", + "Decembro" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d 'de' MMM 'de' y HH:mm:ss", + "mediumDate": "d 'de' MMM 'de' y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "MTn", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "seh-mz", + "localeID": "seh_MZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_seh.js b/1.6.6/i18n/angular-locale_seh.js new file mode 100644 index 000000000..69e4680a4 --- /dev/null +++ b/1.6.6/i18n/angular-locale_seh.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Dimingu", + "Chiposi", + "Chipiri", + "Chitatu", + "Chinai", + "Chishanu", + "Sabudu" + ], + "ERANAMES": [ + "Antes de Cristo", + "Anno Domini" + ], + "ERAS": [ + "AC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Janeiro", + "Fevreiro", + "Marco", + "Abril", + "Maio", + "Junho", + "Julho", + "Augusto", + "Setembro", + "Otubro", + "Novembro", + "Decembro" + ], + "SHORTDAY": [ + "Dim", + "Pos", + "Pir", + "Tat", + "Nai", + "Sha", + "Sab" + ], + "SHORTMONTH": [ + "Jan", + "Fev", + "Mar", + "Abr", + "Mai", + "Jun", + "Jul", + "Aug", + "Set", + "Otu", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "Janeiro", + "Fevreiro", + "Marco", + "Abril", + "Maio", + "Junho", + "Julho", + "Augusto", + "Setembro", + "Otubro", + "Novembro", + "Decembro" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d 'de' MMM 'de' y HH:mm:ss", + "mediumDate": "d 'de' MMM 'de' y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "MTn", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "seh", + "localeID": "seh", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ses-ml.js b/1.6.6/i18n/angular-locale_ses-ml.js new file mode 100644 index 000000000..16f810b1b --- /dev/null +++ b/1.6.6/i18n/angular-locale_ses-ml.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Adduha", + "Aluula" + ], + "DAY": [ + "Alhadi", + "Atinni", + "Atalaata", + "Alarba", + "Alhamiisa", + "Alzuma", + "Asibti" + ], + "ERANAMES": [ + "Isaa jine", + "Isaa zamanoo" + ], + "ERAS": [ + "IJ", + "IZ" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u017danwiye", + "Feewiriye", + "Marsi", + "Awiril", + "Me", + "\u017duwe\u014b", + "\u017duyye", + "Ut", + "Sektanbur", + "Oktoobur", + "Noowanbur", + "Deesanbur" + ], + "SHORTDAY": [ + "Alh", + "Ati", + "Ata", + "Ala", + "Alm", + "Alz", + "Asi" + ], + "SHORTMONTH": [ + "\u017dan", + "Fee", + "Mar", + "Awi", + "Me", + "\u017duw", + "\u017duy", + "Ut", + "Sek", + "Okt", + "Noo", + "Dee" + ], + "STANDALONEMONTH": [ + "\u017danwiye", + "Feewiriye", + "Marsi", + "Awiril", + "Me", + "\u017duwe\u014b", + "\u017duyye", + "Ut", + "Sektanbur", + "Oktoobur", + "Noowanbur", + "Deesanbur" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ".", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "ses-ml", + "localeID": "ses_ML", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ses.js b/1.6.6/i18n/angular-locale_ses.js new file mode 100644 index 000000000..816e7d87e --- /dev/null +++ b/1.6.6/i18n/angular-locale_ses.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Adduha", + "Aluula" + ], + "DAY": [ + "Alhadi", + "Atinni", + "Atalaata", + "Alarba", + "Alhamiisa", + "Alzuma", + "Asibti" + ], + "ERANAMES": [ + "Isaa jine", + "Isaa zamanoo" + ], + "ERAS": [ + "IJ", + "IZ" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u017danwiye", + "Feewiriye", + "Marsi", + "Awiril", + "Me", + "\u017duwe\u014b", + "\u017duyye", + "Ut", + "Sektanbur", + "Oktoobur", + "Noowanbur", + "Deesanbur" + ], + "SHORTDAY": [ + "Alh", + "Ati", + "Ata", + "Ala", + "Alm", + "Alz", + "Asi" + ], + "SHORTMONTH": [ + "\u017dan", + "Fee", + "Mar", + "Awi", + "Me", + "\u017duw", + "\u017duy", + "Ut", + "Sek", + "Okt", + "Noo", + "Dee" + ], + "STANDALONEMONTH": [ + "\u017danwiye", + "Feewiriye", + "Marsi", + "Awiril", + "Me", + "\u017duwe\u014b", + "\u017duyye", + "Ut", + "Sektanbur", + "Oktoobur", + "Noowanbur", + "Deesanbur" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ".", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "ses", + "localeID": "ses", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sg-cf.js b/1.6.6/i18n/angular-locale_sg-cf.js new file mode 100644 index 000000000..c988bf943 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sg-cf.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "ND", + "LK" + ], + "DAY": [ + "Bikua-\u00f4ko", + "B\u00efkua-\u00fbse", + "B\u00efkua-pt\u00e2", + "B\u00efkua-us\u00ef\u00f6", + "B\u00efkua-ok\u00fc", + "L\u00e2p\u00f4s\u00f6", + "L\u00e2yenga" + ], + "ERANAMES": [ + "K\u00f4zo na Kr\u00eestu", + "Na pek\u00f4 t\u00ee Kr\u00eestu" + ], + "ERAS": [ + "KnK", + "NpK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Nyenye", + "Fulund\u00efgi", + "Mb\u00e4ng\u00fc", + "Ngub\u00f9e", + "B\u00eal\u00e4w\u00fc", + "F\u00f6ndo", + "Lengua", + "K\u00fck\u00fcr\u00fc", + "Mvuka", + "Ngberere", + "Nab\u00e4nd\u00fcru", + "Kakauka" + ], + "SHORTDAY": [ + "Bk1", + "Bk2", + "Bk3", + "Bk4", + "Bk5", + "L\u00e2p", + "L\u00e2y" + ], + "SHORTMONTH": [ + "Nye", + "Ful", + "Mb\u00e4", + "Ngu", + "B\u00eal", + "F\u00f6n", + "Len", + "K\u00fck", + "Mvu", + "Ngb", + "Nab", + "Kak" + ], + "STANDALONEMONTH": [ + "Nyenye", + "Fulund\u00efgi", + "Mb\u00e4ng\u00fc", + "Ngub\u00f9e", + "B\u00eal\u00e4w\u00fc", + "F\u00f6ndo", + "Lengua", + "K\u00fck\u00fcr\u00fc", + "Mvuka", + "Ngberere", + "Nab\u00e4nd\u00fcru", + "Kakauka" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "\u00a4-", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "sg-cf", + "localeID": "sg_CF", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sg.js b/1.6.6/i18n/angular-locale_sg.js new file mode 100644 index 000000000..d4b9a504f --- /dev/null +++ b/1.6.6/i18n/angular-locale_sg.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "ND", + "LK" + ], + "DAY": [ + "Bikua-\u00f4ko", + "B\u00efkua-\u00fbse", + "B\u00efkua-pt\u00e2", + "B\u00efkua-us\u00ef\u00f6", + "B\u00efkua-ok\u00fc", + "L\u00e2p\u00f4s\u00f6", + "L\u00e2yenga" + ], + "ERANAMES": [ + "K\u00f4zo na Kr\u00eestu", + "Na pek\u00f4 t\u00ee Kr\u00eestu" + ], + "ERAS": [ + "KnK", + "NpK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Nyenye", + "Fulund\u00efgi", + "Mb\u00e4ng\u00fc", + "Ngub\u00f9e", + "B\u00eal\u00e4w\u00fc", + "F\u00f6ndo", + "Lengua", + "K\u00fck\u00fcr\u00fc", + "Mvuka", + "Ngberere", + "Nab\u00e4nd\u00fcru", + "Kakauka" + ], + "SHORTDAY": [ + "Bk1", + "Bk2", + "Bk3", + "Bk4", + "Bk5", + "L\u00e2p", + "L\u00e2y" + ], + "SHORTMONTH": [ + "Nye", + "Ful", + "Mb\u00e4", + "Ngu", + "B\u00eal", + "F\u00f6n", + "Len", + "K\u00fck", + "Mvu", + "Ngb", + "Nab", + "Kak" + ], + "STANDALONEMONTH": [ + "Nyenye", + "Fulund\u00efgi", + "Mb\u00e4ng\u00fc", + "Ngub\u00f9e", + "B\u00eal\u00e4w\u00fc", + "F\u00f6ndo", + "Lengua", + "K\u00fck\u00fcr\u00fc", + "Mvuka", + "Ngberere", + "Nab\u00e4nd\u00fcru", + "Kakauka" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u00a4-", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "sg", + "localeID": "sg", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sh.js b/1.6.6/i18n/angular-locale_sh.js new file mode 100644 index 000000000..2a242aedd --- /dev/null +++ b/1.6.6/i18n/angular-locale_sh.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "pre podne", + "po podne" + ], + "DAY": [ + "nedelja", + "ponedeljak", + "utorak", + "sreda", + "\u010detvrtak", + "petak", + "subota" + ], + "ERANAMES": [ + "pre nove ere", + "nove ere" + ], + "ERAS": [ + "p. n. e.", + "n. e." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "mart", + "april", + "maj", + "jun", + "jul", + "avgust", + "septembar", + "oktobar", + "novembar", + "decembar" + ], + "SHORTDAY": [ + "ned", + "pon", + "uto", + "sre", + "\u010det", + "pet", + "sub" + ], + "SHORTMONTH": [ + "jan", + "feb", + "mar", + "apr", + "maj", + "jun", + "jul", + "avg", + "sep", + "okt", + "nov", + "dec" + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "mart", + "april", + "maj", + "jun", + "jul", + "avgust", + "septembar", + "oktobar", + "novembar", + "decembar" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd. MMMM y.", + "longDate": "dd. MMMM y.", + "medium": "dd.MM.y. HH:mm:ss", + "mediumDate": "dd.MM.y.", + "mediumTime": "HH:mm:ss", + "short": "d.M.yy. HH:mm", + "shortDate": "d.M.yy.", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sh", + "localeID": "sh", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_shi-latn-ma.js b/1.6.6/i18n/angular-locale_shi-latn-ma.js new file mode 100644 index 000000000..7fdd8709e --- /dev/null +++ b/1.6.6/i18n/angular-locale_shi-latn-ma.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "tifawt", + "tadgg\u02b7at" + ], + "DAY": [ + "asamas", + "aynas", + "asinas", + "ak\u1e5bas", + "akwas", + "asimwas", + "asi\u1e0dyas" + ], + "ERANAMES": [ + "dat n \u025bisa", + "dffir n \u025bisa" + ], + "ERAS": [ + "da\u025b", + "df\u025b" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "innayr", + "b\u1e5bay\u1e5b", + "ma\u1e5b\u1e63", + "ibrir", + "mayyu", + "yunyu", + "yulyuz", + "\u0263uct", + "cutanbir", + "ktubr", + "nuwanbir", + "dujanbir" + ], + "SHORTDAY": [ + "asa", + "ayn", + "asi", + "ak\u1e5b", + "akw", + "asim", + "asi\u1e0d" + ], + "SHORTMONTH": [ + "inn", + "b\u1e5ba", + "ma\u1e5b", + "ibr", + "may", + "yun", + "yul", + "\u0263uc", + "cut", + "ktu", + "nuw", + "duj" + ], + "STANDALONEMONTH": [ + "innayr", + "b\u1e5bay\u1e5b", + "ma\u1e5b\u1e63", + "ibrir", + "mayyu", + "yunyu", + "yulyuz", + "\u0263uct", + "cutanbir", + "ktubr", + "nuwanbir", + "dujanbir" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "dh", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "shi-latn-ma", + "localeID": "shi_Latn_MA", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_shi-latn.js b/1.6.6/i18n/angular-locale_shi-latn.js new file mode 100644 index 000000000..b7265b627 --- /dev/null +++ b/1.6.6/i18n/angular-locale_shi-latn.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "tifawt", + "tadgg\u02b7at" + ], + "DAY": [ + "asamas", + "aynas", + "asinas", + "ak\u1e5bas", + "akwas", + "asimwas", + "asi\u1e0dyas" + ], + "ERANAMES": [ + "dat n \u025bisa", + "dffir n \u025bisa" + ], + "ERAS": [ + "da\u025b", + "df\u025b" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "innayr", + "b\u1e5bay\u1e5b", + "ma\u1e5b\u1e63", + "ibrir", + "mayyu", + "yunyu", + "yulyuz", + "\u0263uct", + "cutanbir", + "ktubr", + "nuwanbir", + "dujanbir" + ], + "SHORTDAY": [ + "asa", + "ayn", + "asi", + "ak\u1e5b", + "akw", + "asim", + "asi\u1e0d" + ], + "SHORTMONTH": [ + "inn", + "b\u1e5ba", + "ma\u1e5b", + "ibr", + "may", + "yun", + "yul", + "\u0263uc", + "cut", + "ktu", + "nuw", + "duj" + ], + "STANDALONEMONTH": [ + "innayr", + "b\u1e5bay\u1e5b", + "ma\u1e5b\u1e63", + "ibrir", + "mayyu", + "yunyu", + "yulyuz", + "\u0263uct", + "cutanbir", + "ktubr", + "nuwanbir", + "dujanbir" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "dh", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "shi-latn", + "localeID": "shi_Latn", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_shi-tfng-ma.js b/1.6.6/i18n/angular-locale_shi-tfng-ma.js new file mode 100644 index 000000000..a4ba70442 --- /dev/null +++ b/1.6.6/i18n/angular-locale_shi-tfng-ma.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u2d5c\u2d49\u2d3c\u2d30\u2d61\u2d5c", + "\u2d5c\u2d30\u2d37\u2d33\u2d33\u2d6f\u2d30\u2d5c" + ], + "DAY": [ + "\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59", + "\u2d30\u2d62\u2d4f\u2d30\u2d59", + "\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59", + "\u2d30\u2d3d\u2d55\u2d30\u2d59", + "\u2d30\u2d3d\u2d61\u2d30\u2d59", + "\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59", + "\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59" + ], + "ERANAMES": [ + "\u2d37\u2d30\u2d5c \u2d4f \u2d44\u2d49\u2d59\u2d30", + "\u2d37\u2d3c\u2d3c\u2d49\u2d54 \u2d4f \u2d44\u2d49\u2d59\u2d30" + ], + "ERAS": [ + "\u2d37\u2d30\u2d44", + "\u2d37\u2d3c\u2d44" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54", + "\u2d31\u2d55\u2d30\u2d62\u2d55", + "\u2d4e\u2d30\u2d55\u2d5a", + "\u2d49\u2d31\u2d54\u2d49\u2d54", + "\u2d4e\u2d30\u2d62\u2d62\u2d53", + "\u2d62\u2d53\u2d4f\u2d62\u2d53", + "\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63", + "\u2d56\u2d53\u2d5b\u2d5c", + "\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54", + "\u2d3d\u2d5c\u2d53\u2d31\u2d54", + "\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54", + "\u2d37\u2d53\u2d4a\u2d30\u2d4f\u2d31\u2d49\u2d54" + ], + "SHORTDAY": [ + "\u2d30\u2d59\u2d30", + "\u2d30\u2d62\u2d4f", + "\u2d30\u2d59\u2d49", + "\u2d30\u2d3d\u2d55", + "\u2d30\u2d3d\u2d61", + "\u2d30\u2d59\u2d49\u2d4e", + "\u2d30\u2d59\u2d49\u2d39" + ], + "SHORTMONTH": [ + "\u2d49\u2d4f\u2d4f", + "\u2d31\u2d55\u2d30", + "\u2d4e\u2d30\u2d55", + "\u2d49\u2d31\u2d54", + "\u2d4e\u2d30\u2d62", + "\u2d62\u2d53\u2d4f", + "\u2d62\u2d53\u2d4d", + "\u2d56\u2d53\u2d5b", + "\u2d5b\u2d53\u2d5c", + "\u2d3d\u2d5c\u2d53", + "\u2d4f\u2d53\u2d61", + "\u2d37\u2d53\u2d4a" + ], + "STANDALONEMONTH": [ + "\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54", + "\u2d31\u2d55\u2d30\u2d62\u2d55", + "\u2d4e\u2d30\u2d55\u2d5a", + "\u2d49\u2d31\u2d54\u2d49\u2d54", + "\u2d4e\u2d30\u2d62\u2d62\u2d53", + "\u2d62\u2d53\u2d4f\u2d62\u2d53", + "\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63", + "\u2d56\u2d53\u2d5b\u2d5c", + "\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54", + "\u2d3d\u2d5c\u2d53\u2d31\u2d54", + "\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54", + "\u2d37\u2d53\u2d4a\u2d30\u2d4f\u2d31\u2d49\u2d54" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "dh", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "shi-tfng-ma", + "localeID": "shi_Tfng_MA", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_shi-tfng.js b/1.6.6/i18n/angular-locale_shi-tfng.js new file mode 100644 index 000000000..2186dacda --- /dev/null +++ b/1.6.6/i18n/angular-locale_shi-tfng.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u2d5c\u2d49\u2d3c\u2d30\u2d61\u2d5c", + "\u2d5c\u2d30\u2d37\u2d33\u2d33\u2d6f\u2d30\u2d5c" + ], + "DAY": [ + "\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59", + "\u2d30\u2d62\u2d4f\u2d30\u2d59", + "\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59", + "\u2d30\u2d3d\u2d55\u2d30\u2d59", + "\u2d30\u2d3d\u2d61\u2d30\u2d59", + "\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59", + "\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59" + ], + "ERANAMES": [ + "\u2d37\u2d30\u2d5c \u2d4f \u2d44\u2d49\u2d59\u2d30", + "\u2d37\u2d3c\u2d3c\u2d49\u2d54 \u2d4f \u2d44\u2d49\u2d59\u2d30" + ], + "ERAS": [ + "\u2d37\u2d30\u2d44", + "\u2d37\u2d3c\u2d44" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54", + "\u2d31\u2d55\u2d30\u2d62\u2d55", + "\u2d4e\u2d30\u2d55\u2d5a", + "\u2d49\u2d31\u2d54\u2d49\u2d54", + "\u2d4e\u2d30\u2d62\u2d62\u2d53", + "\u2d62\u2d53\u2d4f\u2d62\u2d53", + "\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63", + "\u2d56\u2d53\u2d5b\u2d5c", + "\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54", + "\u2d3d\u2d5c\u2d53\u2d31\u2d54", + "\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54", + "\u2d37\u2d53\u2d4a\u2d30\u2d4f\u2d31\u2d49\u2d54" + ], + "SHORTDAY": [ + "\u2d30\u2d59\u2d30", + "\u2d30\u2d62\u2d4f", + "\u2d30\u2d59\u2d49", + "\u2d30\u2d3d\u2d55", + "\u2d30\u2d3d\u2d61", + "\u2d30\u2d59\u2d49\u2d4e", + "\u2d30\u2d59\u2d49\u2d39" + ], + "SHORTMONTH": [ + "\u2d49\u2d4f\u2d4f", + "\u2d31\u2d55\u2d30", + "\u2d4e\u2d30\u2d55", + "\u2d49\u2d31\u2d54", + "\u2d4e\u2d30\u2d62", + "\u2d62\u2d53\u2d4f", + "\u2d62\u2d53\u2d4d", + "\u2d56\u2d53\u2d5b", + "\u2d5b\u2d53\u2d5c", + "\u2d3d\u2d5c\u2d53", + "\u2d4f\u2d53\u2d61", + "\u2d37\u2d53\u2d4a" + ], + "STANDALONEMONTH": [ + "\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54", + "\u2d31\u2d55\u2d30\u2d62\u2d55", + "\u2d4e\u2d30\u2d55\u2d5a", + "\u2d49\u2d31\u2d54\u2d49\u2d54", + "\u2d4e\u2d30\u2d62\u2d62\u2d53", + "\u2d62\u2d53\u2d4f\u2d62\u2d53", + "\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63", + "\u2d56\u2d53\u2d5b\u2d5c", + "\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54", + "\u2d3d\u2d5c\u2d53\u2d31\u2d54", + "\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54", + "\u2d37\u2d53\u2d4a\u2d30\u2d4f\u2d31\u2d49\u2d54" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "dh", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "shi-tfng", + "localeID": "shi_Tfng", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_shi.js b/1.6.6/i18n/angular-locale_shi.js new file mode 100644 index 000000000..a3cd7b7ee --- /dev/null +++ b/1.6.6/i18n/angular-locale_shi.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u2d5c\u2d49\u2d3c\u2d30\u2d61\u2d5c", + "\u2d5c\u2d30\u2d37\u2d33\u2d33\u2d6f\u2d30\u2d5c" + ], + "DAY": [ + "\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59", + "\u2d30\u2d62\u2d4f\u2d30\u2d59", + "\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59", + "\u2d30\u2d3d\u2d55\u2d30\u2d59", + "\u2d30\u2d3d\u2d61\u2d30\u2d59", + "\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59", + "\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59" + ], + "ERANAMES": [ + "\u2d37\u2d30\u2d5c \u2d4f \u2d44\u2d49\u2d59\u2d30", + "\u2d37\u2d3c\u2d3c\u2d49\u2d54 \u2d4f \u2d44\u2d49\u2d59\u2d30" + ], + "ERAS": [ + "\u2d37\u2d30\u2d44", + "\u2d37\u2d3c\u2d44" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54", + "\u2d31\u2d55\u2d30\u2d62\u2d55", + "\u2d4e\u2d30\u2d55\u2d5a", + "\u2d49\u2d31\u2d54\u2d49\u2d54", + "\u2d4e\u2d30\u2d62\u2d62\u2d53", + "\u2d62\u2d53\u2d4f\u2d62\u2d53", + "\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63", + "\u2d56\u2d53\u2d5b\u2d5c", + "\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54", + "\u2d3d\u2d5c\u2d53\u2d31\u2d54", + "\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54", + "\u2d37\u2d53\u2d4a\u2d30\u2d4f\u2d31\u2d49\u2d54" + ], + "SHORTDAY": [ + "\u2d30\u2d59\u2d30", + "\u2d30\u2d62\u2d4f", + "\u2d30\u2d59\u2d49", + "\u2d30\u2d3d\u2d55", + "\u2d30\u2d3d\u2d61", + "\u2d30\u2d59\u2d49\u2d4e", + "\u2d30\u2d59\u2d49\u2d39" + ], + "SHORTMONTH": [ + "\u2d49\u2d4f\u2d4f", + "\u2d31\u2d55\u2d30", + "\u2d4e\u2d30\u2d55", + "\u2d49\u2d31\u2d54", + "\u2d4e\u2d30\u2d62", + "\u2d62\u2d53\u2d4f", + "\u2d62\u2d53\u2d4d", + "\u2d56\u2d53\u2d5b", + "\u2d5b\u2d53\u2d5c", + "\u2d3d\u2d5c\u2d53", + "\u2d4f\u2d53\u2d61", + "\u2d37\u2d53\u2d4a" + ], + "STANDALONEMONTH": [ + "\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54", + "\u2d31\u2d55\u2d30\u2d62\u2d55", + "\u2d4e\u2d30\u2d55\u2d5a", + "\u2d49\u2d31\u2d54\u2d49\u2d54", + "\u2d4e\u2d30\u2d62\u2d62\u2d53", + "\u2d62\u2d53\u2d4f\u2d62\u2d53", + "\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63", + "\u2d56\u2d53\u2d5b\u2d5c", + "\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54", + "\u2d3d\u2d5c\u2d53\u2d31\u2d54", + "\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54", + "\u2d37\u2d53\u2d4a\u2d30\u2d4f\u2d31\u2d49\u2d54" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "dh", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "shi", + "localeID": "shi", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_si-lk.js b/1.6.6/i18n/angular-locale_si-lk.js new file mode 100644 index 000000000..b6e49f8d4 --- /dev/null +++ b/1.6.6/i18n/angular-locale_si-lk.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0db4\u0dd9.\u0dc0.", + "\u0db4.\u0dc0." + ], + "DAY": [ + "\u0d89\u0dbb\u0dd2\u0daf\u0dcf", + "\u0dc3\u0db3\u0dd4\u0daf\u0dcf", + "\u0d85\u0d9f\u0dc4\u0dbb\u0dd4\u0dc0\u0dcf\u0daf\u0dcf", + "\u0db6\u0daf\u0dcf\u0daf\u0dcf", + "\u0db6\u0dca\u200d\u0dbb\u0dc4\u0dc3\u0dca\u0db4\u0dad\u0dd2\u0db1\u0dca\u0daf\u0dcf", + "\u0dc3\u0dd2\u0d9a\u0dd4\u0dbb\u0dcf\u0daf\u0dcf", + "\u0dc3\u0dd9\u0db1\u0dc3\u0dd4\u0dbb\u0dcf\u0daf\u0dcf" + ], + "ERANAMES": [ + "\u0d9a\u0dca\u200d\u0dbb\u0dd2\u0dc3\u0dca\u0dad\u0dd4 \u0db4\u0dd6\u0dbb\u0dca\u0dc0", + "\u0d9a\u0dca\u200d\u0dbb\u0dd2\u0dc3\u0dca\u0dad\u0dd4 \u0dc0\u0dbb\u0dca\u0dc2" + ], + "ERAS": [ + "\u0d9a\u0dca\u200d\u0dbb\u0dd2.\u0db4\u0dd6.", + "\u0d9a\u0dca\u200d\u0dbb\u0dd2.\u0dc0." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0da2\u0db1\u0dc0\u0dcf\u0dbb\u0dd2", + "\u0db4\u0dd9\u0db6\u0dbb\u0dc0\u0dcf\u0dbb\u0dd2", + "\u0db8\u0dcf\u0dbb\u0dca\u0dad\u0dd4", + "\u0d85\u0db4\u0dca\u200d\u0dbb\u0dda\u0dbd\u0dca", + "\u0db8\u0dd0\u0dba\u0dd2", + "\u0da2\u0dd6\u0db1\u0dd2", + "\u0da2\u0dd6\u0dbd\u0dd2", + "\u0d85\u0d9c\u0ddd\u0dc3\u0dca\u0dad\u0dd4", + "\u0dc3\u0dd0\u0db4\u0dca\u0dad\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca", + "\u0d94\u0d9a\u0dca\u0dad\u0ddd\u0db6\u0dbb\u0dca", + "\u0db1\u0ddc\u0dc0\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca", + "\u0daf\u0dd9\u0dc3\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca" + ], + "SHORTDAY": [ + "\u0d89\u0dbb\u0dd2\u0daf\u0dcf", + "\u0dc3\u0db3\u0dd4\u0daf\u0dcf", + "\u0d85\u0d9f\u0dc4", + "\u0db6\u0daf\u0dcf\u0daf\u0dcf", + "\u0db6\u0dca\u200d\u0dbb\u0dc4\u0dc3\u0dca", + "\u0dc3\u0dd2\u0d9a\u0dd4", + "\u0dc3\u0dd9\u0db1" + ], + "SHORTMONTH": [ + "\u0da2\u0db1", + "\u0db4\u0dd9\u0db6", + "\u0db8\u0dcf\u0dbb\u0dca\u0dad\u0dd4", + "\u0d85\u0db4\u0dca\u200d\u0dbb\u0dda\u0dbd\u0dca", + "\u0db8\u0dd0\u0dba\u0dd2", + "\u0da2\u0dd6\u0db1\u0dd2", + "\u0da2\u0dd6\u0dbd\u0dd2", + "\u0d85\u0d9c\u0ddd", + "\u0dc3\u0dd0\u0db4\u0dca", + "\u0d94\u0d9a\u0dca", + "\u0db1\u0ddc\u0dc0\u0dd0", + "\u0daf\u0dd9\u0dc3\u0dd0" + ], + "STANDALONEMONTH": [ + "\u0da2\u0db1\u0dc0\u0dcf\u0dbb\u0dd2", + "\u0db4\u0dd9\u0db6\u0dbb\u0dc0\u0dcf\u0dbb\u0dd2", + "\u0db8\u0dcf\u0dbb\u0dca\u0dad\u0dd4", + "\u0d85\u0db4\u0dca\u200d\u0dbb\u0dda\u0dbd\u0dca", + "\u0db8\u0dd0\u0dba\u0dd2", + "\u0da2\u0dd6\u0db1\u0dd2", + "\u0da2\u0dd6\u0dbd\u0dd2", + "\u0d85\u0d9c\u0ddd\u0dc3\u0dca\u0dad\u0dd4", + "\u0dc3\u0dd0\u0db4\u0dca\u0dad\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca", + "\u0d94\u0d9a\u0dca\u0dad\u0ddd\u0db6\u0dbb\u0dca", + "\u0db1\u0ddc\u0dc0\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca", + "\u0daf\u0dd9\u0dc3\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH.mm.ss", + "mediumDate": "y MMM d", + "mediumTime": "HH.mm.ss", + "short": "y-MM-dd HH.mm", + "shortDate": "y-MM-dd", + "shortTime": "HH.mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rs", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "si-lk", + "localeID": "si_LK", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if ((n == 0 || n == 1) || i == 0 && vf.f == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_si.js b/1.6.6/i18n/angular-locale_si.js new file mode 100644 index 000000000..e16b93e29 --- /dev/null +++ b/1.6.6/i18n/angular-locale_si.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0db4\u0dd9.\u0dc0.", + "\u0db4.\u0dc0." + ], + "DAY": [ + "\u0d89\u0dbb\u0dd2\u0daf\u0dcf", + "\u0dc3\u0db3\u0dd4\u0daf\u0dcf", + "\u0d85\u0d9f\u0dc4\u0dbb\u0dd4\u0dc0\u0dcf\u0daf\u0dcf", + "\u0db6\u0daf\u0dcf\u0daf\u0dcf", + "\u0db6\u0dca\u200d\u0dbb\u0dc4\u0dc3\u0dca\u0db4\u0dad\u0dd2\u0db1\u0dca\u0daf\u0dcf", + "\u0dc3\u0dd2\u0d9a\u0dd4\u0dbb\u0dcf\u0daf\u0dcf", + "\u0dc3\u0dd9\u0db1\u0dc3\u0dd4\u0dbb\u0dcf\u0daf\u0dcf" + ], + "ERANAMES": [ + "\u0d9a\u0dca\u200d\u0dbb\u0dd2\u0dc3\u0dca\u0dad\u0dd4 \u0db4\u0dd6\u0dbb\u0dca\u0dc0", + "\u0d9a\u0dca\u200d\u0dbb\u0dd2\u0dc3\u0dca\u0dad\u0dd4 \u0dc0\u0dbb\u0dca\u0dc2" + ], + "ERAS": [ + "\u0d9a\u0dca\u200d\u0dbb\u0dd2.\u0db4\u0dd6.", + "\u0d9a\u0dca\u200d\u0dbb\u0dd2.\u0dc0." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0da2\u0db1\u0dc0\u0dcf\u0dbb\u0dd2", + "\u0db4\u0dd9\u0db6\u0dbb\u0dc0\u0dcf\u0dbb\u0dd2", + "\u0db8\u0dcf\u0dbb\u0dca\u0dad\u0dd4", + "\u0d85\u0db4\u0dca\u200d\u0dbb\u0dda\u0dbd\u0dca", + "\u0db8\u0dd0\u0dba\u0dd2", + "\u0da2\u0dd6\u0db1\u0dd2", + "\u0da2\u0dd6\u0dbd\u0dd2", + "\u0d85\u0d9c\u0ddd\u0dc3\u0dca\u0dad\u0dd4", + "\u0dc3\u0dd0\u0db4\u0dca\u0dad\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca", + "\u0d94\u0d9a\u0dca\u0dad\u0ddd\u0db6\u0dbb\u0dca", + "\u0db1\u0ddc\u0dc0\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca", + "\u0daf\u0dd9\u0dc3\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca" + ], + "SHORTDAY": [ + "\u0d89\u0dbb\u0dd2\u0daf\u0dcf", + "\u0dc3\u0db3\u0dd4\u0daf\u0dcf", + "\u0d85\u0d9f\u0dc4", + "\u0db6\u0daf\u0dcf\u0daf\u0dcf", + "\u0db6\u0dca\u200d\u0dbb\u0dc4\u0dc3\u0dca", + "\u0dc3\u0dd2\u0d9a\u0dd4", + "\u0dc3\u0dd9\u0db1" + ], + "SHORTMONTH": [ + "\u0da2\u0db1", + "\u0db4\u0dd9\u0db6", + "\u0db8\u0dcf\u0dbb\u0dca\u0dad\u0dd4", + "\u0d85\u0db4\u0dca\u200d\u0dbb\u0dda\u0dbd\u0dca", + "\u0db8\u0dd0\u0dba\u0dd2", + "\u0da2\u0dd6\u0db1\u0dd2", + "\u0da2\u0dd6\u0dbd\u0dd2", + "\u0d85\u0d9c\u0ddd", + "\u0dc3\u0dd0\u0db4\u0dca", + "\u0d94\u0d9a\u0dca", + "\u0db1\u0ddc\u0dc0\u0dd0", + "\u0daf\u0dd9\u0dc3\u0dd0" + ], + "STANDALONEMONTH": [ + "\u0da2\u0db1\u0dc0\u0dcf\u0dbb\u0dd2", + "\u0db4\u0dd9\u0db6\u0dbb\u0dc0\u0dcf\u0dbb\u0dd2", + "\u0db8\u0dcf\u0dbb\u0dca\u0dad\u0dd4", + "\u0d85\u0db4\u0dca\u200d\u0dbb\u0dda\u0dbd\u0dca", + "\u0db8\u0dd0\u0dba\u0dd2", + "\u0da2\u0dd6\u0db1\u0dd2", + "\u0da2\u0dd6\u0dbd\u0dd2", + "\u0d85\u0d9c\u0ddd\u0dc3\u0dca\u0dad\u0dd4", + "\u0dc3\u0dd0\u0db4\u0dca\u0dad\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca", + "\u0d94\u0d9a\u0dca\u0dad\u0ddd\u0db6\u0dbb\u0dca", + "\u0db1\u0ddc\u0dc0\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca", + "\u0daf\u0dd9\u0dc3\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH.mm.ss", + "mediumDate": "y MMM d", + "mediumTime": "HH.mm.ss", + "short": "y-MM-dd HH.mm", + "shortDate": "y-MM-dd", + "shortTime": "HH.mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rs", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "si", + "localeID": "si", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if ((n == 0 || n == 1) || i == 0 && vf.f == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sk-sk.js b/1.6.6/i18n/angular-locale_sk-sk.js new file mode 100644 index 000000000..4a3427e73 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sk-sk.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "nede\u013ea", + "pondelok", + "utorok", + "streda", + "\u0161tvrtok", + "piatok", + "sobota" + ], + "ERANAMES": [ + "pred Kristom", + "po Kristovi" + ], + "ERAS": [ + "pred Kr.", + "po Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janu\u00e1ra", + "febru\u00e1ra", + "marca", + "apr\u00edla", + "m\u00e1ja", + "j\u00fana", + "j\u00fala", + "augusta", + "septembra", + "okt\u00f3bra", + "novembra", + "decembra" + ], + "SHORTDAY": [ + "ne", + "po", + "ut", + "st", + "\u0161t", + "pi", + "so" + ], + "SHORTMONTH": [ + "jan", + "feb", + "mar", + "apr", + "m\u00e1j", + "j\u00fan", + "j\u00fal", + "aug", + "sep", + "okt", + "nov", + "dec" + ], + "STANDALONEMONTH": [ + "janu\u00e1r", + "febru\u00e1r", + "marec", + "apr\u00edl", + "m\u00e1j", + "j\u00fan", + "j\u00fal", + "august", + "september", + "okt\u00f3ber", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. M. y H:mm:ss", + "mediumDate": "d. M. y", + "mediumTime": "H:mm:ss", + "short": "d. M. y H:mm", + "shortDate": "d. M. y", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sk-sk", + "localeID": "sk_SK", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (i >= 2 && i <= 4 && vf.v == 0) { return PLURAL_CATEGORY.FEW; } if (vf.v != 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sk.js b/1.6.6/i18n/angular-locale_sk.js new file mode 100644 index 000000000..6ff0148f4 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sk.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "nede\u013ea", + "pondelok", + "utorok", + "streda", + "\u0161tvrtok", + "piatok", + "sobota" + ], + "ERANAMES": [ + "pred Kristom", + "po Kristovi" + ], + "ERAS": [ + "pred Kr.", + "po Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janu\u00e1ra", + "febru\u00e1ra", + "marca", + "apr\u00edla", + "m\u00e1ja", + "j\u00fana", + "j\u00fala", + "augusta", + "septembra", + "okt\u00f3bra", + "novembra", + "decembra" + ], + "SHORTDAY": [ + "ne", + "po", + "ut", + "st", + "\u0161t", + "pi", + "so" + ], + "SHORTMONTH": [ + "jan", + "feb", + "mar", + "apr", + "m\u00e1j", + "j\u00fan", + "j\u00fal", + "aug", + "sep", + "okt", + "nov", + "dec" + ], + "STANDALONEMONTH": [ + "janu\u00e1r", + "febru\u00e1r", + "marec", + "apr\u00edl", + "m\u00e1j", + "j\u00fan", + "j\u00fal", + "august", + "september", + "okt\u00f3ber", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. M. y H:mm:ss", + "mediumDate": "d. M. y", + "mediumTime": "H:mm:ss", + "short": "d. M. y H:mm", + "shortDate": "d. M. y", + "shortTime": "H:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sk", + "localeID": "sk", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (i >= 2 && i <= 4 && vf.v == 0) { return PLURAL_CATEGORY.FEW; } if (vf.v != 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sl-si.js b/1.6.6/i18n/angular-locale_sl-si.js new file mode 100644 index 000000000..648932155 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sl-si.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "dop.", + "pop." + ], + "DAY": [ + "nedelja", + "ponedeljek", + "torek", + "sreda", + "\u010detrtek", + "petek", + "sobota" + ], + "ERANAMES": [ + "pred Kristusom", + "po Kristusu" + ], + "ERAS": [ + "pr. Kr.", + "po Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "marec", + "april", + "maj", + "junij", + "julij", + "avgust", + "september", + "oktober", + "november", + "december" + ], + "SHORTDAY": [ + "ned.", + "pon.", + "tor.", + "sre.", + "\u010det.", + "pet.", + "sob." + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mar.", + "apr.", + "maj", + "jun.", + "jul.", + "avg.", + "sep.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "marec", + "april", + "maj", + "junij", + "julij", + "avgust", + "september", + "oktober", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd. MMMM y", + "longDate": "dd. MMMM y", + "medium": "d. MMM y HH:mm:ss", + "mediumDate": "d. MMM y", + "mediumTime": "HH:mm:ss", + "short": "d. MM. yy HH:mm", + "shortDate": "d. MM. yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sl-si", + "localeID": "sl_SI", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 100 == 1) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 100 == 2) { return PLURAL_CATEGORY.TWO; } if (vf.v == 0 && i % 100 >= 3 && i % 100 <= 4 || vf.v != 0) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sl.js b/1.6.6/i18n/angular-locale_sl.js new file mode 100644 index 000000000..3fccc5fef --- /dev/null +++ b/1.6.6/i18n/angular-locale_sl.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "dop.", + "pop." + ], + "DAY": [ + "nedelja", + "ponedeljek", + "torek", + "sreda", + "\u010detrtek", + "petek", + "sobota" + ], + "ERANAMES": [ + "pred Kristusom", + "po Kristusu" + ], + "ERAS": [ + "pr. Kr.", + "po Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "marec", + "april", + "maj", + "junij", + "julij", + "avgust", + "september", + "oktober", + "november", + "december" + ], + "SHORTDAY": [ + "ned.", + "pon.", + "tor.", + "sre.", + "\u010det.", + "pet.", + "sob." + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mar.", + "apr.", + "maj", + "jun.", + "jul.", + "avg.", + "sep.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "marec", + "april", + "maj", + "junij", + "julij", + "avgust", + "september", + "oktober", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd. MMMM y", + "longDate": "dd. MMMM y", + "medium": "d. MMM y HH:mm:ss", + "mediumDate": "d. MMM y", + "mediumTime": "HH:mm:ss", + "short": "d. MM. yy HH:mm", + "shortDate": "d. MM. yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sl", + "localeID": "sl", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 100 == 1) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 100 == 2) { return PLURAL_CATEGORY.TWO; } if (vf.v == 0 && i % 100 >= 3 && i % 100 <= 4 || vf.v != 0) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_smn-fi.js b/1.6.6/i18n/angular-locale_smn-fi.js new file mode 100644 index 000000000..fd9483f0e --- /dev/null +++ b/1.6.6/i18n/angular-locale_smn-fi.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "ip.", + "ep." + ], + "DAY": [ + "pasepeeivi", + "vuossaarg\u00e2", + "majebaarg\u00e2", + "koskoho", + "tuor\u00e2stuv", + "v\u00e1stuppeeivi", + "l\u00e1vurduv" + ], + "ERANAMES": [ + "Ovdil Kristus \u0161odd\u00e2m", + "ma\u014ba Kristus \u0161odd\u00e2m" + ], + "ERAS": [ + "oKr.", + "mKr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "u\u0111\u0111\u00e2ivem\u00e1\u00e1nu", + "kuov\u00e2m\u00e1\u00e1nu", + "njuh\u010d\u00e2m\u00e1\u00e1nu", + "cu\u00e1\u014buim\u00e1\u00e1nu", + "vyesim\u00e1\u00e1nu", + "kesim\u00e1\u00e1nu", + "syeinim\u00e1\u00e1nu", + "porgem\u00e1\u00e1nu", + "\u010doh\u010d\u00e2m\u00e1\u00e1nu", + "roovv\u00e2dm\u00e1\u00e1nu", + "skamm\u00e2m\u00e1\u00e1nu", + "juovl\u00e2m\u00e1\u00e1nu" + ], + "SHORTDAY": [ + "pas", + "vuo", + "maj", + "kos", + "tuo", + "v\u00e1s", + "l\u00e1v" + ], + "SHORTMONTH": [ + "u\u0111iv", + "kuov\u00e2", + "njuh\u010d\u00e2", + "cu\u00e1\u014bui", + "vyesi", + "kesi", + "syeini", + "porge", + "\u010doh\u010d\u00e2", + "roovv\u00e2d", + "skamm\u00e2", + "juovl\u00e2" + ], + "STANDALONEMONTH": [ + "u\u0111\u0111\u00e2ivem\u00e1\u00e1nu", + "kuov\u00e2m\u00e1\u00e1nu", + "njuh\u010d\u00e2m\u00e1\u00e1nu", + "cu\u00e1\u014buim\u00e1\u00e1nu", + "vyesim\u00e1\u00e1nu", + "kesim\u00e1\u00e1nu", + "syeinim\u00e1\u00e1nu", + "porgem\u00e1\u00e1nu", + "\u010doh\u010d\u00e2m\u00e1\u00e1nu", + "roovv\u00e2dm\u00e1\u00e1nu", + "skamm\u00e2m\u00e1\u00e1nu", + "juovl\u00e2m\u00e1\u00e1nu" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "cccc, MMMM d. y", + "longDate": "MMMM d. y", + "medium": "MMM d. y H.mm.ss", + "mediumDate": "MMM d. y", + "mediumTime": "H.mm.ss", + "short": "d.M.y H.mm", + "shortDate": "d.M.y", + "shortTime": "H.mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "smn-fi", + "localeID": "smn_FI", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_smn.js b/1.6.6/i18n/angular-locale_smn.js new file mode 100644 index 000000000..d122e7444 --- /dev/null +++ b/1.6.6/i18n/angular-locale_smn.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "ip.", + "ep." + ], + "DAY": [ + "pasepeeivi", + "vuossaarg\u00e2", + "majebaarg\u00e2", + "koskoho", + "tuor\u00e2stuv", + "v\u00e1stuppeeivi", + "l\u00e1vurduv" + ], + "ERANAMES": [ + "Ovdil Kristus \u0161odd\u00e2m", + "ma\u014ba Kristus \u0161odd\u00e2m" + ], + "ERAS": [ + "oKr.", + "mKr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "u\u0111\u0111\u00e2ivem\u00e1\u00e1nu", + "kuov\u00e2m\u00e1\u00e1nu", + "njuh\u010d\u00e2m\u00e1\u00e1nu", + "cu\u00e1\u014buim\u00e1\u00e1nu", + "vyesim\u00e1\u00e1nu", + "kesim\u00e1\u00e1nu", + "syeinim\u00e1\u00e1nu", + "porgem\u00e1\u00e1nu", + "\u010doh\u010d\u00e2m\u00e1\u00e1nu", + "roovv\u00e2dm\u00e1\u00e1nu", + "skamm\u00e2m\u00e1\u00e1nu", + "juovl\u00e2m\u00e1\u00e1nu" + ], + "SHORTDAY": [ + "pas", + "vuo", + "maj", + "kos", + "tuo", + "v\u00e1s", + "l\u00e1v" + ], + "SHORTMONTH": [ + "u\u0111iv", + "kuov\u00e2", + "njuh\u010d\u00e2", + "cu\u00e1\u014bui", + "vyesi", + "kesi", + "syeini", + "porge", + "\u010doh\u010d\u00e2", + "roovv\u00e2d", + "skamm\u00e2", + "juovl\u00e2" + ], + "STANDALONEMONTH": [ + "u\u0111\u0111\u00e2ivem\u00e1\u00e1nu", + "kuov\u00e2m\u00e1\u00e1nu", + "njuh\u010d\u00e2m\u00e1\u00e1nu", + "cu\u00e1\u014buim\u00e1\u00e1nu", + "vyesim\u00e1\u00e1nu", + "kesim\u00e1\u00e1nu", + "syeinim\u00e1\u00e1nu", + "porgem\u00e1\u00e1nu", + "\u010doh\u010d\u00e2m\u00e1\u00e1nu", + "roovv\u00e2dm\u00e1\u00e1nu", + "skamm\u00e2m\u00e1\u00e1nu", + "juovl\u00e2m\u00e1\u00e1nu" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "cccc, MMMM d. y", + "longDate": "MMMM d. y", + "medium": "MMM d. y H.mm.ss", + "mediumDate": "MMM d. y", + "mediumTime": "H.mm.ss", + "short": "d.M.y H.mm", + "shortDate": "d.M.y", + "shortTime": "H.mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "smn", + "localeID": "smn", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sn-zw.js b/1.6.6/i18n/angular-locale_sn-zw.js new file mode 100644 index 000000000..9efc08183 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sn-zw.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Svondo", + "Muvhuro", + "Chipiri", + "Chitatu", + "China", + "Chishanu", + "Mugovera" + ], + "ERANAMES": [ + "Kristo asati auya", + "mugore ramambo vedu" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Ndira", + "Kukadzi", + "Kurume", + "Kubvumbi", + "Chivabvu", + "Chikumi", + "Chikunguru", + "Nyamavhuvhu", + "Gunyana", + "Gumiguru", + "Mbudzi", + "Zvita" + ], + "SHORTDAY": [ + "Svo", + "Muv", + "Chp", + "Cht", + "Chn", + "Chs", + "Mug" + ], + "SHORTMONTH": [ + "Ndi", + "Kuk", + "Kur", + "Kub", + "Chv", + "Chk", + "Chg", + "Nya", + "Gun", + "Gum", + "Mbu", + "Zvi" + ], + "STANDALONEMONTH": [ + "Ndira", + "Kukadzi", + "Kurume", + "Kubvumbi", + "Chivabvu", + "Chikumi", + "Chikunguru", + "Nyamavhuvhu", + "Gunyana", + "Gumiguru", + "Mbudzi", + "Zvita" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "sn-zw", + "localeID": "sn_ZW", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sn.js b/1.6.6/i18n/angular-locale_sn.js new file mode 100644 index 000000000..a59bb09a3 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sn.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Svondo", + "Muvhuro", + "Chipiri", + "Chitatu", + "China", + "Chishanu", + "Mugovera" + ], + "ERANAMES": [ + "Kristo asati auya", + "mugore ramambo vedu" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Ndira", + "Kukadzi", + "Kurume", + "Kubvumbi", + "Chivabvu", + "Chikumi", + "Chikunguru", + "Nyamavhuvhu", + "Gunyana", + "Gumiguru", + "Mbudzi", + "Zvita" + ], + "SHORTDAY": [ + "Svo", + "Muv", + "Chp", + "Cht", + "Chn", + "Chs", + "Mug" + ], + "SHORTMONTH": [ + "Ndi", + "Kuk", + "Kur", + "Kub", + "Chv", + "Chk", + "Chg", + "Nya", + "Gun", + "Gum", + "Mbu", + "Zvi" + ], + "STANDALONEMONTH": [ + "Ndira", + "Kukadzi", + "Kurume", + "Kubvumbi", + "Chivabvu", + "Chikumi", + "Chikunguru", + "Nyamavhuvhu", + "Gunyana", + "Gumiguru", + "Mbudzi", + "Zvita" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "sn", + "localeID": "sn", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_so-dj.js b/1.6.6/i18n/angular-locale_so-dj.js new file mode 100644 index 000000000..71ac78562 --- /dev/null +++ b/1.6.6/i18n/angular-locale_so-dj.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "sn.", + "gn." + ], + "DAY": [ + "Axad", + "Isniin", + "Talaado", + "Arbaco", + "Khamiis", + "Jimco", + "Sabti" + ], + "ERANAMES": [ + "CK", + "CD" + ], + "ERAS": [ + "CK", + "CD" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "Bisha Koobaad", + "Bisha Labaad", + "Bisha Saddexaad", + "Bisha Afraad", + "Bisha Shanaad", + "Bisha Lixaad", + "Bisha Todobaad", + "Bisha Sideedaad", + "Bisha Sagaalaad", + "Bisha Tobnaad", + "Bisha Kow iyo Tobnaad", + "Bisha Laba iyo Tobnaad" + ], + "SHORTDAY": [ + "Axd", + "Isn", + "Tal", + "Arb", + "Kha", + "Jim", + "Sab" + ], + "SHORTMONTH": [ + "Kob", + "Lab", + "Sad", + "Afr", + "Sha", + "Lix", + "Tod", + "Sid", + "Sag", + "Tob", + "KIT", + "LIT" + ], + "STANDALONEMONTH": [ + "Bisha Koobaad", + "Bisha Labaad", + "Bisha Saddexaad", + "Bisha Afraad", + "Bisha Shanaad", + "Bisha Lixaad", + "Bisha Todobaad", + "Bisha Sideedaad", + "Bisha Sagaalaad", + "Bisha Tobnaad", + "Bisha Kow iyo Tobnaad", + "Bisha Laba iyo Tobnaad" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM dd, y", + "longDate": "dd MMMM y", + "medium": "dd-MMM-y h:mm:ss a", + "mediumDate": "dd-MMM-y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/yy h:mm a", + "shortDate": "dd/MM/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Fdj", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "so-dj", + "localeID": "so_DJ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_so-et.js b/1.6.6/i18n/angular-locale_so-et.js new file mode 100644 index 000000000..a78b24426 --- /dev/null +++ b/1.6.6/i18n/angular-locale_so-et.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "sn.", + "gn." + ], + "DAY": [ + "Axad", + "Isniin", + "Talaado", + "Arbaco", + "Khamiis", + "Jimco", + "Sabti" + ], + "ERANAMES": [ + "CK", + "CD" + ], + "ERAS": [ + "CK", + "CD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Bisha Koobaad", + "Bisha Labaad", + "Bisha Saddexaad", + "Bisha Afraad", + "Bisha Shanaad", + "Bisha Lixaad", + "Bisha Todobaad", + "Bisha Sideedaad", + "Bisha Sagaalaad", + "Bisha Tobnaad", + "Bisha Kow iyo Tobnaad", + "Bisha Laba iyo Tobnaad" + ], + "SHORTDAY": [ + "Axd", + "Isn", + "Tal", + "Arb", + "Kha", + "Jim", + "Sab" + ], + "SHORTMONTH": [ + "Kob", + "Lab", + "Sad", + "Afr", + "Sha", + "Lix", + "Tod", + "Sid", + "Sag", + "Tob", + "KIT", + "LIT" + ], + "STANDALONEMONTH": [ + "Bisha Koobaad", + "Bisha Labaad", + "Bisha Saddexaad", + "Bisha Afraad", + "Bisha Shanaad", + "Bisha Lixaad", + "Bisha Todobaad", + "Bisha Sideedaad", + "Bisha Sagaalaad", + "Bisha Tobnaad", + "Bisha Kow iyo Tobnaad", + "Bisha Laba iyo Tobnaad" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM dd, y", + "longDate": "dd MMMM y", + "medium": "dd-MMM-y h:mm:ss a", + "mediumDate": "dd-MMM-y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/yy h:mm a", + "shortDate": "dd/MM/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Birr", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "so-et", + "localeID": "so_ET", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_so-ke.js b/1.6.6/i18n/angular-locale_so-ke.js new file mode 100644 index 000000000..cd67c8469 --- /dev/null +++ b/1.6.6/i18n/angular-locale_so-ke.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "sn.", + "gn." + ], + "DAY": [ + "Axad", + "Isniin", + "Talaado", + "Arbaco", + "Khamiis", + "Jimco", + "Sabti" + ], + "ERANAMES": [ + "CK", + "CD" + ], + "ERAS": [ + "CK", + "CD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Bisha Koobaad", + "Bisha Labaad", + "Bisha Saddexaad", + "Bisha Afraad", + "Bisha Shanaad", + "Bisha Lixaad", + "Bisha Todobaad", + "Bisha Sideedaad", + "Bisha Sagaalaad", + "Bisha Tobnaad", + "Bisha Kow iyo Tobnaad", + "Bisha Laba iyo Tobnaad" + ], + "SHORTDAY": [ + "Axd", + "Isn", + "Tal", + "Arb", + "Kha", + "Jim", + "Sab" + ], + "SHORTMONTH": [ + "Kob", + "Lab", + "Sad", + "Afr", + "Sha", + "Lix", + "Tod", + "Sid", + "Sag", + "Tob", + "KIT", + "LIT" + ], + "STANDALONEMONTH": [ + "Bisha Koobaad", + "Bisha Labaad", + "Bisha Saddexaad", + "Bisha Afraad", + "Bisha Shanaad", + "Bisha Lixaad", + "Bisha Todobaad", + "Bisha Sideedaad", + "Bisha Sagaalaad", + "Bisha Tobnaad", + "Bisha Kow iyo Tobnaad", + "Bisha Laba iyo Tobnaad" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM dd, y", + "longDate": "dd MMMM y", + "medium": "dd-MMM-y HH:mm:ss", + "mediumDate": "dd-MMM-y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "so-ke", + "localeID": "so_KE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_so-so.js b/1.6.6/i18n/angular-locale_so-so.js new file mode 100644 index 000000000..6bca4081e --- /dev/null +++ b/1.6.6/i18n/angular-locale_so-so.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "sn.", + "gn." + ], + "DAY": [ + "Axad", + "Isniin", + "Talaado", + "Arbaco", + "Khamiis", + "Jimco", + "Sabti" + ], + "ERANAMES": [ + "CK", + "CD" + ], + "ERAS": [ + "CK", + "CD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Bisha Koobaad", + "Bisha Labaad", + "Bisha Saddexaad", + "Bisha Afraad", + "Bisha Shanaad", + "Bisha Lixaad", + "Bisha Todobaad", + "Bisha Sideedaad", + "Bisha Sagaalaad", + "Bisha Tobnaad", + "Bisha Kow iyo Tobnaad", + "Bisha Laba iyo Tobnaad" + ], + "SHORTDAY": [ + "Axd", + "Isn", + "Tal", + "Arb", + "Kha", + "Jim", + "Sab" + ], + "SHORTMONTH": [ + "Kob", + "Lab", + "Sad", + "Afr", + "Sha", + "Lix", + "Tod", + "Sid", + "Sag", + "Tob", + "KIT", + "LIT" + ], + "STANDALONEMONTH": [ + "Bisha Koobaad", + "Bisha Labaad", + "Bisha Saddexaad", + "Bisha Afraad", + "Bisha Shanaad", + "Bisha Lixaad", + "Bisha Todobaad", + "Bisha Sideedaad", + "Bisha Sagaalaad", + "Bisha Tobnaad", + "Bisha Kow iyo Tobnaad", + "Bisha Laba iyo Tobnaad" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM dd, y", + "longDate": "dd MMMM y", + "medium": "dd-MMM-y h:mm:ss a", + "mediumDate": "dd-MMM-y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/yy h:mm a", + "shortDate": "dd/MM/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "SOS", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "so-so", + "localeID": "so_SO", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_so.js b/1.6.6/i18n/angular-locale_so.js new file mode 100644 index 000000000..307c6cb5a --- /dev/null +++ b/1.6.6/i18n/angular-locale_so.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "sn.", + "gn." + ], + "DAY": [ + "Axad", + "Isniin", + "Talaado", + "Arbaco", + "Khamiis", + "Jimco", + "Sabti" + ], + "ERANAMES": [ + "CK", + "CD" + ], + "ERAS": [ + "CK", + "CD" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Bisha Koobaad", + "Bisha Labaad", + "Bisha Saddexaad", + "Bisha Afraad", + "Bisha Shanaad", + "Bisha Lixaad", + "Bisha Todobaad", + "Bisha Sideedaad", + "Bisha Sagaalaad", + "Bisha Tobnaad", + "Bisha Kow iyo Tobnaad", + "Bisha Laba iyo Tobnaad" + ], + "SHORTDAY": [ + "Axd", + "Isn", + "Tal", + "Arb", + "Kha", + "Jim", + "Sab" + ], + "SHORTMONTH": [ + "Kob", + "Lab", + "Sad", + "Afr", + "Sha", + "Lix", + "Tod", + "Sid", + "Sag", + "Tob", + "KIT", + "LIT" + ], + "STANDALONEMONTH": [ + "Bisha Koobaad", + "Bisha Labaad", + "Bisha Saddexaad", + "Bisha Afraad", + "Bisha Shanaad", + "Bisha Lixaad", + "Bisha Todobaad", + "Bisha Sideedaad", + "Bisha Sagaalaad", + "Bisha Tobnaad", + "Bisha Kow iyo Tobnaad", + "Bisha Laba iyo Tobnaad" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM dd, y", + "longDate": "dd MMMM y", + "medium": "dd-MMM-y h:mm:ss a", + "mediumDate": "dd-MMM-y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/yy h:mm a", + "shortDate": "dd/MM/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "SOS", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "so", + "localeID": "so", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sq-al.js b/1.6.6/i18n/angular-locale_sq-al.js new file mode 100644 index 000000000..db4e4ba7c --- /dev/null +++ b/1.6.6/i18n/angular-locale_sq-al.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "e paradites", + "e pasdites" + ], + "DAY": [ + "e diel", + "e h\u00ebn\u00eb", + "e mart\u00eb", + "e m\u00ebrkur\u00eb", + "e enjte", + "e premte", + "e shtun\u00eb" + ], + "ERANAMES": [ + "para Krishtit", + "mbas Krishtit" + ], + "ERAS": [ + "p.K.", + "mb.K." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janar", + "shkurt", + "mars", + "prill", + "maj", + "qershor", + "korrik", + "gusht", + "shtator", + "tetor", + "n\u00ebntor", + "dhjetor" + ], + "SHORTDAY": [ + "Die", + "H\u00ebn", + "Mar", + "M\u00ebr", + "Enj", + "Pre", + "Sht" + ], + "SHORTMONTH": [ + "jan", + "shk", + "mar", + "pri", + "maj", + "qer", + "kor", + "gsh", + "sht", + "tet", + "n\u00ebn", + "dhj" + ], + "STANDALONEMONTH": [ + "Janar", + "Shkurt", + "Mars", + "Prill", + "Maj", + "Qershor", + "Korrik", + "Gusht", + "Shtator", + "Tetor", + "N\u00ebntor", + "Dhjetor" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d.M.yy h:mm a", + "shortDate": "d.M.yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Lek", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sq-al", + "localeID": "sq_AL", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sq-mk.js b/1.6.6/i18n/angular-locale_sq-mk.js new file mode 100644 index 000000000..4f18094f2 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sq-mk.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "e paradites", + "e pasdites" + ], + "DAY": [ + "e diel", + "e h\u00ebn\u00eb", + "e mart\u00eb", + "e m\u00ebrkur\u00eb", + "e enjte", + "e premte", + "e shtun\u00eb" + ], + "ERANAMES": [ + "para Krishtit", + "mbas Krishtit" + ], + "ERAS": [ + "p.K.", + "mb.K." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janar", + "shkurt", + "mars", + "prill", + "maj", + "qershor", + "korrik", + "gusht", + "shtator", + "tetor", + "n\u00ebntor", + "dhjetor" + ], + "SHORTDAY": [ + "Die", + "H\u00ebn", + "Mar", + "M\u00ebr", + "Enj", + "Pre", + "Sht" + ], + "SHORTMONTH": [ + "jan", + "shk", + "mar", + "pri", + "maj", + "qer", + "kor", + "gsh", + "sht", + "tet", + "n\u00ebn", + "dhj" + ], + "STANDALONEMONTH": [ + "Janar", + "Shkurt", + "Mars", + "Prill", + "Maj", + "Qershor", + "Korrik", + "Gusht", + "Shtator", + "Tetor", + "N\u00ebntor", + "Dhjetor" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d.M.yy HH:mm", + "shortDate": "d.M.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sq-mk", + "localeID": "sq_MK", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sq-xk.js b/1.6.6/i18n/angular-locale_sq-xk.js new file mode 100644 index 000000000..bfa8d80de --- /dev/null +++ b/1.6.6/i18n/angular-locale_sq-xk.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "e paradites", + "e pasdites" + ], + "DAY": [ + "e diel", + "e h\u00ebn\u00eb", + "e mart\u00eb", + "e m\u00ebrkur\u00eb", + "e enjte", + "e premte", + "e shtun\u00eb" + ], + "ERANAMES": [ + "para Krishtit", + "mbas Krishtit" + ], + "ERAS": [ + "p.K.", + "mb.K." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janar", + "shkurt", + "mars", + "prill", + "maj", + "qershor", + "korrik", + "gusht", + "shtator", + "tetor", + "n\u00ebntor", + "dhjetor" + ], + "SHORTDAY": [ + "Die", + "H\u00ebn", + "Mar", + "M\u00ebr", + "Enj", + "Pre", + "Sht" + ], + "SHORTMONTH": [ + "jan", + "shk", + "mar", + "pri", + "maj", + "qer", + "kor", + "gsh", + "sht", + "tet", + "n\u00ebn", + "dhj" + ], + "STANDALONEMONTH": [ + "Janar", + "Shkurt", + "Mars", + "Prill", + "Maj", + "Qershor", + "Korrik", + "Gusht", + "Shtator", + "Tetor", + "N\u00ebntor", + "Dhjetor" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d.M.yy HH:mm", + "shortDate": "d.M.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sq-xk", + "localeID": "sq_XK", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sq.js b/1.6.6/i18n/angular-locale_sq.js new file mode 100644 index 000000000..f8d1cb2b7 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sq.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "e paradites", + "e pasdites" + ], + "DAY": [ + "e diel", + "e h\u00ebn\u00eb", + "e mart\u00eb", + "e m\u00ebrkur\u00eb", + "e enjte", + "e premte", + "e shtun\u00eb" + ], + "ERANAMES": [ + "para Krishtit", + "mbas Krishtit" + ], + "ERAS": [ + "p.K.", + "mb.K." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "janar", + "shkurt", + "mars", + "prill", + "maj", + "qershor", + "korrik", + "gusht", + "shtator", + "tetor", + "n\u00ebntor", + "dhjetor" + ], + "SHORTDAY": [ + "Die", + "H\u00ebn", + "Mar", + "M\u00ebr", + "Enj", + "Pre", + "Sht" + ], + "SHORTMONTH": [ + "jan", + "shk", + "mar", + "pri", + "maj", + "qer", + "kor", + "gsh", + "sht", + "tet", + "n\u00ebn", + "dhj" + ], + "STANDALONEMONTH": [ + "Janar", + "Shkurt", + "Mars", + "Prill", + "Maj", + "Qershor", + "Korrik", + "Gusht", + "Shtator", + "Tetor", + "N\u00ebntor", + "Dhjetor" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d.M.yy h:mm a", + "shortDate": "d.M.yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Lek", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sq", + "localeID": "sq", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sr-cyrl-ba.js b/1.6.6/i18n/angular-locale_sr-cyrl-ba.js new file mode 100644 index 000000000..164bdf591 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sr-cyrl-ba.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u043f\u0440\u0438\u0458\u0435 \u043f\u043e\u0434\u043d\u0435", + "\u043f\u043e \u043f\u043e\u0434\u043d\u0435" + ], + "DAY": [ + "\u043d\u0435\u0434\u0458\u0435\u0459\u0430", + "\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a", + "\u0443\u0442\u043e\u0440\u0430\u043a", + "\u0441\u0440\u0438\u0458\u0435\u0434\u0430", + "\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a", + "\u043f\u0435\u0442\u0430\u043a", + "\u0441\u0443\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u043f\u0440\u0438\u0458\u0435 \u043d\u043e\u0432\u0435 \u0435\u0440\u0435", + "\u043d\u043e\u0432\u0435 \u0435\u0440\u0435" + ], + "ERAS": [ + "\u043f. \u043d. \u0435.", + "\u043d. \u0435." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0458\u0430\u043d\u0443\u0430\u0440", + "\u0444\u0435\u0431\u0440\u0443\u0430\u0440", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d", + "\u0458\u0443\u043b", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440", + "\u043e\u043a\u0442\u043e\u0431\u0430\u0440", + "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440", + "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440" + ], + "SHORTDAY": [ + "\u043d\u0435\u0434.", + "\u043f\u043e\u043d.", + "\u0443\u0442.", + "\u0441\u0440.", + "\u0447\u0435\u0442.", + "\u043f\u0435\u0442.", + "\u0441\u0443\u0431." + ], + "SHORTMONTH": [ + "\u0458\u0430\u043d.", + "\u0444\u0435\u0431.", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440.", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d", + "\u0458\u0443\u043b", + "\u0430\u0432\u0433.", + "\u0441\u0435\u043f\u0442.", + "\u043e\u043a\u0442.", + "\u043d\u043e\u0432.", + "\u0434\u0435\u0446." + ], + "STANDALONEMONTH": [ + "\u0458\u0430\u043d\u0443\u0430\u0440", + "\u0444\u0435\u0431\u0440\u0443\u0430\u0440", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d", + "\u0458\u0443\u043b", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440", + "\u043e\u043a\u0442\u043e\u0431\u0430\u0440", + "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440", + "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd. MMMM y.", + "longDate": "dd. MMMM y.", + "medium": "dd.MM.y. HH:mm:ss", + "mediumDate": "dd.MM.y.", + "mediumTime": "HH:mm:ss", + "short": "d.M.yy. HH:mm", + "shortDate": "d.M.yy.", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "KM", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sr-cyrl-ba", + "localeID": "sr_Cyrl_BA", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sr-cyrl-me.js b/1.6.6/i18n/angular-locale_sr-cyrl-me.js new file mode 100644 index 000000000..12979456c --- /dev/null +++ b/1.6.6/i18n/angular-locale_sr-cyrl-me.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u043f\u0440\u0438\u0458\u0435 \u043f\u043e\u0434\u043d\u0435", + "\u043f\u043e \u043f\u043e\u0434\u043d\u0435" + ], + "DAY": [ + "\u043d\u0435\u0434\u0458\u0435\u0459\u0430", + "\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a", + "\u0443\u0442\u043e\u0440\u0430\u043a", + "\u0441\u0440\u0438\u0458\u0435\u0434\u0430", + "\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a", + "\u043f\u0435\u0442\u0430\u043a", + "\u0441\u0443\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u043f\u0440\u0438\u0458\u0435 \u043d\u043e\u0432\u0435 \u0435\u0440\u0435", + "\u043d\u043e\u0432\u0435 \u0435\u0440\u0435" + ], + "ERAS": [ + "\u043f. \u043d. \u0435.", + "\u043d. \u0435." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0458\u0430\u043d\u0443\u0430\u0440", + "\u0444\u0435\u0431\u0440\u0443\u0430\u0440", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d", + "\u0458\u0443\u043b", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440", + "\u043e\u043a\u0442\u043e\u0431\u0430\u0440", + "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440", + "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440" + ], + "SHORTDAY": [ + "\u043d\u0435\u0434.", + "\u043f\u043e\u043d.", + "\u0443\u0442.", + "\u0441\u0440.", + "\u0447\u0435\u0442.", + "\u043f\u0435\u0442.", + "\u0441\u0443\u0431." + ], + "SHORTMONTH": [ + "\u0458\u0430\u043d.", + "\u0444\u0435\u0431.", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440.", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d", + "\u0458\u0443\u043b", + "\u0430\u0432\u0433.", + "\u0441\u0435\u043f\u0442.", + "\u043e\u043a\u0442.", + "\u043d\u043e\u0432.", + "\u0434\u0435\u0446." + ], + "STANDALONEMONTH": [ + "\u0458\u0430\u043d\u0443\u0430\u0440", + "\u0444\u0435\u0431\u0440\u0443\u0430\u0440", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d", + "\u0458\u0443\u043b", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440", + "\u043e\u043a\u0442\u043e\u0431\u0430\u0440", + "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440", + "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd. MMMM y.", + "longDate": "dd. MMMM y.", + "medium": "dd.MM.y. HH:mm:ss", + "mediumDate": "dd.MM.y.", + "mediumTime": "HH:mm:ss", + "short": "d.M.yy. HH:mm", + "shortDate": "d.M.yy.", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sr-cyrl-me", + "localeID": "sr_Cyrl_ME", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sr-cyrl-rs.js b/1.6.6/i18n/angular-locale_sr-cyrl-rs.js new file mode 100644 index 000000000..3bbf26ab3 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sr-cyrl-rs.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435", + "\u043f\u043e \u043f\u043e\u0434\u043d\u0435" + ], + "DAY": [ + "\u043d\u0435\u0434\u0435\u0459\u0430", + "\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a", + "\u0443\u0442\u043e\u0440\u0430\u043a", + "\u0441\u0440\u0435\u0434\u0430", + "\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a", + "\u043f\u0435\u0442\u0430\u043a", + "\u0441\u0443\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u043f\u0440\u0435 \u043d\u043e\u0432\u0435 \u0435\u0440\u0435", + "\u043d\u043e\u0432\u0435 \u0435\u0440\u0435" + ], + "ERAS": [ + "\u043f. \u043d. \u0435.", + "\u043d. \u0435." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0458\u0430\u043d\u0443\u0430\u0440", + "\u0444\u0435\u0431\u0440\u0443\u0430\u0440", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d", + "\u0458\u0443\u043b", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440", + "\u043e\u043a\u0442\u043e\u0431\u0430\u0440", + "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440", + "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440" + ], + "SHORTDAY": [ + "\u043d\u0435\u0434", + "\u043f\u043e\u043d", + "\u0443\u0442\u043e", + "\u0441\u0440\u0435", + "\u0447\u0435\u0442", + "\u043f\u0435\u0442", + "\u0441\u0443\u0431" + ], + "SHORTMONTH": [ + "\u0458\u0430\u043d", + "\u0444\u0435\u0431", + "\u043c\u0430\u0440", + "\u0430\u043f\u0440", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d", + "\u0458\u0443\u043b", + "\u0430\u0432\u0433", + "\u0441\u0435\u043f", + "\u043e\u043a\u0442", + "\u043d\u043e\u0432", + "\u0434\u0435\u0446" + ], + "STANDALONEMONTH": [ + "\u0458\u0430\u043d\u0443\u0430\u0440", + "\u0444\u0435\u0431\u0440\u0443\u0430\u0440", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d", + "\u0458\u0443\u043b", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440", + "\u043e\u043a\u0442\u043e\u0431\u0430\u0440", + "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440", + "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd. MMMM y.", + "longDate": "dd. MMMM y.", + "medium": "dd.MM.y. HH:mm:ss", + "mediumDate": "dd.MM.y.", + "mediumTime": "HH:mm:ss", + "short": "d.M.yy. HH:mm", + "shortDate": "d.M.yy.", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sr-cyrl-rs", + "localeID": "sr_Cyrl_RS", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sr-cyrl-xk.js b/1.6.6/i18n/angular-locale_sr-cyrl-xk.js new file mode 100644 index 000000000..1d8ad8863 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sr-cyrl-xk.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435", + "\u043f\u043e \u043f\u043e\u0434\u043d\u0435" + ], + "DAY": [ + "\u043d\u0435\u0434\u0435\u0459\u0430", + "\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a", + "\u0443\u0442\u043e\u0440\u0430\u043a", + "\u0441\u0440\u0435\u0434\u0430", + "\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a", + "\u043f\u0435\u0442\u0430\u043a", + "\u0441\u0443\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u043f\u0440\u0435 \u043d\u043e\u0432\u0435 \u0435\u0440\u0435", + "\u043d\u043e\u0432\u0435 \u0435\u0440\u0435" + ], + "ERAS": [ + "\u043f. \u043d. \u0435.", + "\u043d. \u0435." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0458\u0430\u043d\u0443\u0430\u0440", + "\u0444\u0435\u0431\u0440\u0443\u0430\u0440", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d", + "\u0458\u0443\u043b", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440", + "\u043e\u043a\u0442\u043e\u0431\u0430\u0440", + "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440", + "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440" + ], + "SHORTDAY": [ + "\u043d\u0435\u0434.", + "\u043f\u043e\u043d.", + "\u0443\u0442.", + "\u0441\u0440.", + "\u0447\u0435\u0442.", + "\u043f\u0435\u0442.", + "\u0441\u0443\u0431." + ], + "SHORTMONTH": [ + "\u0458\u0430\u043d.", + "\u0444\u0435\u0431.", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440.", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d", + "\u0458\u0443\u043b", + "\u0430\u0432\u0433.", + "\u0441\u0435\u043f\u0442.", + "\u043e\u043a\u0442.", + "\u043d\u043e\u0432.", + "\u0434\u0435\u0446." + ], + "STANDALONEMONTH": [ + "\u0458\u0430\u043d\u0443\u0430\u0440", + "\u0444\u0435\u0431\u0440\u0443\u0430\u0440", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d", + "\u0458\u0443\u043b", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440", + "\u043e\u043a\u0442\u043e\u0431\u0430\u0440", + "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440", + "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd. MMMM y.", + "longDate": "dd. MMMM y.", + "medium": "dd.MM.y. HH:mm:ss", + "mediumDate": "dd.MM.y.", + "mediumTime": "HH:mm:ss", + "short": "d.M.yy. HH:mm", + "shortDate": "d.M.yy.", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sr-cyrl-xk", + "localeID": "sr_Cyrl_XK", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sr-cyrl.js b/1.6.6/i18n/angular-locale_sr-cyrl.js new file mode 100644 index 000000000..679afb834 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sr-cyrl.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435", + "\u043f\u043e \u043f\u043e\u0434\u043d\u0435" + ], + "DAY": [ + "\u043d\u0435\u0434\u0435\u0459\u0430", + "\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a", + "\u0443\u0442\u043e\u0440\u0430\u043a", + "\u0441\u0440\u0435\u0434\u0430", + "\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a", + "\u043f\u0435\u0442\u0430\u043a", + "\u0441\u0443\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u043f\u0440\u0435 \u043d\u043e\u0432\u0435 \u0435\u0440\u0435", + "\u043d\u043e\u0432\u0435 \u0435\u0440\u0435" + ], + "ERAS": [ + "\u043f. \u043d. \u0435.", + "\u043d. \u0435." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0458\u0430\u043d\u0443\u0430\u0440", + "\u0444\u0435\u0431\u0440\u0443\u0430\u0440", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d", + "\u0458\u0443\u043b", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440", + "\u043e\u043a\u0442\u043e\u0431\u0430\u0440", + "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440", + "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440" + ], + "SHORTDAY": [ + "\u043d\u0435\u0434", + "\u043f\u043e\u043d", + "\u0443\u0442\u043e", + "\u0441\u0440\u0435", + "\u0447\u0435\u0442", + "\u043f\u0435\u0442", + "\u0441\u0443\u0431" + ], + "SHORTMONTH": [ + "\u0458\u0430\u043d", + "\u0444\u0435\u0431", + "\u043c\u0430\u0440", + "\u0430\u043f\u0440", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d", + "\u0458\u0443\u043b", + "\u0430\u0432\u0433", + "\u0441\u0435\u043f", + "\u043e\u043a\u0442", + "\u043d\u043e\u0432", + "\u0434\u0435\u0446" + ], + "STANDALONEMONTH": [ + "\u0458\u0430\u043d\u0443\u0430\u0440", + "\u0444\u0435\u0431\u0440\u0443\u0430\u0440", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d", + "\u0458\u0443\u043b", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440", + "\u043e\u043a\u0442\u043e\u0431\u0430\u0440", + "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440", + "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd. MMMM y.", + "longDate": "dd. MMMM y.", + "medium": "dd.MM.y. HH:mm:ss", + "mediumDate": "dd.MM.y.", + "mediumTime": "HH:mm:ss", + "short": "d.M.yy. HH:mm", + "shortDate": "d.M.yy.", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sr-cyrl", + "localeID": "sr_Cyrl", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sr-latn-ba.js b/1.6.6/i18n/angular-locale_sr-latn-ba.js new file mode 100644 index 000000000..fd67003c1 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sr-latn-ba.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "prije podne", + "po podne" + ], + "DAY": [ + "nedjelja", + "ponedeljak", + "utorak", + "srijeda", + "\u010detvrtak", + "petak", + "subota" + ], + "ERANAMES": [ + "prije nove ere", + "nove ere" + ], + "ERAS": [ + "p. n. e.", + "n. e." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "mart", + "april", + "maj", + "jun", + "jul", + "avgust", + "septembar", + "oktobar", + "novembar", + "decembar" + ], + "SHORTDAY": [ + "ned.", + "pon.", + "ut.", + "sr.", + "\u010det.", + "pet.", + "sub." + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mart", + "apr.", + "maj", + "jun", + "jul", + "avg.", + "sept.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "mart", + "april", + "maj", + "jun", + "jul", + "avgust", + "septembar", + "oktobar", + "novembar", + "decembar" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd. MMMM y.", + "longDate": "dd. MMMM y.", + "medium": "dd.MM.y. HH:mm:ss", + "mediumDate": "dd.MM.y.", + "mediumTime": "HH:mm:ss", + "short": "d.M.yy. HH:mm", + "shortDate": "d.M.yy.", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "KM", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sr-latn-ba", + "localeID": "sr_Latn_BA", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sr-latn-me.js b/1.6.6/i18n/angular-locale_sr-latn-me.js new file mode 100644 index 000000000..b5c189625 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sr-latn-me.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "prije podne", + "po podne" + ], + "DAY": [ + "nedjelja", + "ponedeljak", + "utorak", + "srijeda", + "\u010detvrtak", + "petak", + "subota" + ], + "ERANAMES": [ + "prije nove ere", + "nove ere" + ], + "ERAS": [ + "p. n. e.", + "n. e." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "mart", + "april", + "maj", + "jun", + "jul", + "avgust", + "septembar", + "oktobar", + "novembar", + "decembar" + ], + "SHORTDAY": [ + "ned.", + "pon.", + "ut.", + "sr.", + "\u010det.", + "pet.", + "sub." + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mart", + "apr.", + "maj", + "jun", + "jul", + "avg.", + "sept.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "mart", + "april", + "maj", + "jun", + "jul", + "avgust", + "septembar", + "oktobar", + "novembar", + "decembar" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd. MMMM y.", + "longDate": "dd. MMMM y.", + "medium": "dd.MM.y. HH:mm:ss", + "mediumDate": "dd.MM.y.", + "mediumTime": "HH:mm:ss", + "short": "d.M.yy. HH:mm", + "shortDate": "d.M.yy.", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sr-latn-me", + "localeID": "sr_Latn_ME", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sr-latn-rs.js b/1.6.6/i18n/angular-locale_sr-latn-rs.js new file mode 100644 index 000000000..47ef1d5f6 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sr-latn-rs.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "pre podne", + "po podne" + ], + "DAY": [ + "nedelja", + "ponedeljak", + "utorak", + "sreda", + "\u010detvrtak", + "petak", + "subota" + ], + "ERANAMES": [ + "pre nove ere", + "nove ere" + ], + "ERAS": [ + "p. n. e.", + "n. e." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "mart", + "april", + "maj", + "jun", + "jul", + "avgust", + "septembar", + "oktobar", + "novembar", + "decembar" + ], + "SHORTDAY": [ + "ned", + "pon", + "uto", + "sre", + "\u010det", + "pet", + "sub" + ], + "SHORTMONTH": [ + "jan", + "feb", + "mar", + "apr", + "maj", + "jun", + "jul", + "avg", + "sep", + "okt", + "nov", + "dec" + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "mart", + "april", + "maj", + "jun", + "jul", + "avgust", + "septembar", + "oktobar", + "novembar", + "decembar" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd. MMMM y.", + "longDate": "dd. MMMM y.", + "medium": "dd.MM.y. HH:mm:ss", + "mediumDate": "dd.MM.y.", + "mediumTime": "HH:mm:ss", + "short": "d.M.yy. HH:mm", + "shortDate": "d.M.yy.", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sr-latn-rs", + "localeID": "sr_Latn_RS", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sr-latn-xk.js b/1.6.6/i18n/angular-locale_sr-latn-xk.js new file mode 100644 index 000000000..63d12b1fc --- /dev/null +++ b/1.6.6/i18n/angular-locale_sr-latn-xk.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "pre podne", + "po podne" + ], + "DAY": [ + "nedelja", + "ponedeljak", + "utorak", + "sreda", + "\u010detvrtak", + "petak", + "subota" + ], + "ERANAMES": [ + "pre nove ere", + "nove ere" + ], + "ERAS": [ + "p. n. e.", + "n. e." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "mart", + "april", + "maj", + "jun", + "jul", + "avgust", + "septembar", + "oktobar", + "novembar", + "decembar" + ], + "SHORTDAY": [ + "ned.", + "pon.", + "ut.", + "sr.", + "\u010det.", + "pet.", + "sub." + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mart", + "apr.", + "maj", + "jun", + "jul", + "avg.", + "sept.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "mart", + "april", + "maj", + "jun", + "jul", + "avgust", + "septembar", + "oktobar", + "novembar", + "decembar" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd. MMMM y.", + "longDate": "dd. MMMM y.", + "medium": "dd.MM.y. HH:mm:ss", + "mediumDate": "dd.MM.y.", + "mediumTime": "HH:mm:ss", + "short": "d.M.yy. HH:mm", + "shortDate": "d.M.yy.", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sr-latn-xk", + "localeID": "sr_Latn_XK", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sr-latn.js b/1.6.6/i18n/angular-locale_sr-latn.js new file mode 100644 index 000000000..184584937 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sr-latn.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "pre podne", + "po podne" + ], + "DAY": [ + "nedelja", + "ponedeljak", + "utorak", + "sreda", + "\u010detvrtak", + "petak", + "subota" + ], + "ERANAMES": [ + "pre nove ere", + "nove ere" + ], + "ERAS": [ + "p. n. e.", + "n. e." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "mart", + "april", + "maj", + "jun", + "jul", + "avgust", + "septembar", + "oktobar", + "novembar", + "decembar" + ], + "SHORTDAY": [ + "ned", + "pon", + "uto", + "sre", + "\u010det", + "pet", + "sub" + ], + "SHORTMONTH": [ + "jan", + "feb", + "mar", + "apr", + "maj", + "jun", + "jul", + "avg", + "sep", + "okt", + "nov", + "dec" + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "mart", + "april", + "maj", + "jun", + "jul", + "avgust", + "septembar", + "oktobar", + "novembar", + "decembar" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd. MMMM y.", + "longDate": "dd. MMMM y.", + "medium": "dd.MM.y. HH:mm:ss", + "mediumDate": "dd.MM.y.", + "mediumTime": "HH:mm:ss", + "short": "d.M.yy. HH:mm", + "shortDate": "d.M.yy.", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sr-latn", + "localeID": "sr_Latn", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sr.js b/1.6.6/i18n/angular-locale_sr.js new file mode 100644 index 000000000..1199c0e8d --- /dev/null +++ b/1.6.6/i18n/angular-locale_sr.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435", + "\u043f\u043e \u043f\u043e\u0434\u043d\u0435" + ], + "DAY": [ + "\u043d\u0435\u0434\u0435\u0459\u0430", + "\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a", + "\u0443\u0442\u043e\u0440\u0430\u043a", + "\u0441\u0440\u0435\u0434\u0430", + "\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a", + "\u043f\u0435\u0442\u0430\u043a", + "\u0441\u0443\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u043f\u0440\u0435 \u043d\u043e\u0432\u0435 \u0435\u0440\u0435", + "\u043d\u043e\u0432\u0435 \u0435\u0440\u0435" + ], + "ERAS": [ + "\u043f. \u043d. \u0435.", + "\u043d. \u0435." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0458\u0430\u043d\u0443\u0430\u0440", + "\u0444\u0435\u0431\u0440\u0443\u0430\u0440", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d", + "\u0458\u0443\u043b", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440", + "\u043e\u043a\u0442\u043e\u0431\u0430\u0440", + "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440", + "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440" + ], + "SHORTDAY": [ + "\u043d\u0435\u0434", + "\u043f\u043e\u043d", + "\u0443\u0442\u043e", + "\u0441\u0440\u0435", + "\u0447\u0435\u0442", + "\u043f\u0435\u0442", + "\u0441\u0443\u0431" + ], + "SHORTMONTH": [ + "\u0458\u0430\u043d", + "\u0444\u0435\u0431", + "\u043c\u0430\u0440", + "\u0430\u043f\u0440", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d", + "\u0458\u0443\u043b", + "\u0430\u0432\u0433", + "\u0441\u0435\u043f", + "\u043e\u043a\u0442", + "\u043d\u043e\u0432", + "\u0434\u0435\u0446" + ], + "STANDALONEMONTH": [ + "\u0458\u0430\u043d\u0443\u0430\u0440", + "\u0444\u0435\u0431\u0440\u0443\u0430\u0440", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0438\u043b", + "\u043c\u0430\u0458", + "\u0458\u0443\u043d", + "\u0458\u0443\u043b", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440", + "\u043e\u043a\u0442\u043e\u0431\u0430\u0440", + "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440", + "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd. MMMM y.", + "longDate": "dd. MMMM y.", + "medium": "dd.MM.y. HH:mm:ss", + "mediumDate": "dd.MM.y.", + "mediumTime": "HH:mm:ss", + "short": "d.M.yy. HH:mm", + "shortDate": "d.M.yy.", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sr", + "localeID": "sr", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sv-ax.js b/1.6.6/i18n/angular-locale_sv-ax.js new file mode 100644 index 000000000..919d4a69d --- /dev/null +++ b/1.6.6/i18n/angular-locale_sv-ax.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "fm", + "em" + ], + "DAY": [ + "s\u00f6ndag", + "m\u00e5ndag", + "tisdag", + "onsdag", + "torsdag", + "fredag", + "l\u00f6rdag" + ], + "ERANAMES": [ + "f\u00f6re Kristus", + "efter Kristus" + ], + "ERAS": [ + "f.Kr.", + "e.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januari", + "februari", + "mars", + "april", + "maj", + "juni", + "juli", + "augusti", + "september", + "oktober", + "november", + "december" + ], + "SHORTDAY": [ + "s\u00f6n", + "m\u00e5n", + "tis", + "ons", + "tors", + "fre", + "l\u00f6r" + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mars", + "apr.", + "maj", + "juni", + "juli", + "aug.", + "sep.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "januari", + "februari", + "mars", + "april", + "maj", + "juni", + "juli", + "augusti", + "september", + "oktober", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sv-ax", + "localeID": "sv_AX", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sv-fi.js b/1.6.6/i18n/angular-locale_sv-fi.js new file mode 100644 index 000000000..0a8bd8f20 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sv-fi.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "fm", + "em" + ], + "DAY": [ + "s\u00f6ndag", + "m\u00e5ndag", + "tisdag", + "onsdag", + "torsdag", + "fredag", + "l\u00f6rdag" + ], + "ERANAMES": [ + "f\u00f6re Kristus", + "efter Kristus" + ], + "ERAS": [ + "f.Kr.", + "e.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januari", + "februari", + "mars", + "april", + "maj", + "juni", + "juli", + "augusti", + "september", + "oktober", + "november", + "december" + ], + "SHORTDAY": [ + "s\u00f6n", + "m\u00e5n", + "tis", + "ons", + "tors", + "fre", + "l\u00f6r" + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mars", + "apr.", + "maj", + "juni", + "juli", + "aug.", + "sep.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "januari", + "februari", + "mars", + "april", + "maj", + "juni", + "juli", + "augusti", + "september", + "oktober", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd-MM-y HH:mm", + "shortDate": "dd-MM-y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sv-fi", + "localeID": "sv_FI", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sv-se.js b/1.6.6/i18n/angular-locale_sv-se.js new file mode 100644 index 000000000..4498117b0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sv-se.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "fm", + "em" + ], + "DAY": [ + "s\u00f6ndag", + "m\u00e5ndag", + "tisdag", + "onsdag", + "torsdag", + "fredag", + "l\u00f6rdag" + ], + "ERANAMES": [ + "f\u00f6re Kristus", + "efter Kristus" + ], + "ERAS": [ + "f.Kr.", + "e.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januari", + "februari", + "mars", + "april", + "maj", + "juni", + "juli", + "augusti", + "september", + "oktober", + "november", + "december" + ], + "SHORTDAY": [ + "s\u00f6n", + "m\u00e5n", + "tis", + "ons", + "tors", + "fre", + "l\u00f6r" + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mars", + "apr.", + "maj", + "juni", + "juli", + "aug.", + "sep.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "januari", + "februari", + "mars", + "april", + "maj", + "juni", + "juli", + "augusti", + "september", + "oktober", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sv-se", + "localeID": "sv_SE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sv.js b/1.6.6/i18n/angular-locale_sv.js new file mode 100644 index 000000000..684941584 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sv.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "fm", + "em" + ], + "DAY": [ + "s\u00f6ndag", + "m\u00e5ndag", + "tisdag", + "onsdag", + "torsdag", + "fredag", + "l\u00f6rdag" + ], + "ERANAMES": [ + "f\u00f6re Kristus", + "efter Kristus" + ], + "ERAS": [ + "f.Kr.", + "e.Kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januari", + "februari", + "mars", + "april", + "maj", + "juni", + "juli", + "augusti", + "september", + "oktober", + "november", + "december" + ], + "SHORTDAY": [ + "s\u00f6n", + "m\u00e5n", + "tis", + "ons", + "tors", + "fre", + "l\u00f6r" + ], + "SHORTMONTH": [ + "jan.", + "feb.", + "mars", + "apr.", + "maj", + "juni", + "juli", + "aug.", + "sep.", + "okt.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "januari", + "februari", + "mars", + "april", + "maj", + "juni", + "juli", + "augusti", + "september", + "oktober", + "november", + "december" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "kr", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sv", + "localeID": "sv", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sw-cd.js b/1.6.6/i18n/angular-locale_sw-cd.js new file mode 100644 index 000000000..855a037fc --- /dev/null +++ b/1.6.6/i18n/angular-locale_sw-cd.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Asubuhi", + "Mchana" + ], + "DAY": [ + "Jumapili", + "Jumatatu", + "Jumanne", + "Jumatano", + "Alhamisi", + "Ijumaa", + "Jumamosi" + ], + "ERANAMES": [ + "Kabla ya Kristo", + "Baada ya Kristo" + ], + "ERAS": [ + "KK", + "BK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januari", + "Februari", + "Machi", + "Aprili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "SHORTDAY": [ + "Jumapili", + "Jumatatu", + "Jumanne", + "Jumatano", + "Alhamisi", + "Ijumaa", + "Jumamosi" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Jul", + "Ago", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Machi", + "Aprili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FrCD", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "sw-cd", + "localeID": "sw_CD", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sw-ke.js b/1.6.6/i18n/angular-locale_sw-ke.js new file mode 100644 index 000000000..9f6e9974b --- /dev/null +++ b/1.6.6/i18n/angular-locale_sw-ke.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Jumapili", + "Jumatatu", + "Jumanne", + "Jumatano", + "Alhamisi", + "Ijumaa", + "Jumamosi" + ], + "ERANAMES": [ + "Kabla ya Kristo", + "Baada ya Kristo" + ], + "ERAS": [ + "KK", + "BK" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Januari", + "Februari", + "Machi", + "Aprili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "SHORTDAY": [ + "Jumapili", + "Jumatatu", + "Jumanne", + "Jumatano", + "Alhamisi", + "Ijumaa", + "Jumamosi" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Jul", + "Ago", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Machi", + "Aprili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "sw-ke", + "localeID": "sw_KE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sw-tz.js b/1.6.6/i18n/angular-locale_sw-tz.js new file mode 100644 index 000000000..1d02d0a54 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sw-tz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Asubuhi", + "Mchana" + ], + "DAY": [ + "Jumapili", + "Jumatatu", + "Jumanne", + "Jumatano", + "Alhamisi", + "Ijumaa", + "Jumamosi" + ], + "ERANAMES": [ + "Kabla ya Kristo", + "Baada ya Kristo" + ], + "ERAS": [ + "KK", + "BK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januari", + "Februari", + "Machi", + "Aprili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "SHORTDAY": [ + "Jumapili", + "Jumatatu", + "Jumanne", + "Jumatano", + "Alhamisi", + "Ijumaa", + "Jumamosi" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Jul", + "Ago", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Machi", + "Aprili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "sw-tz", + "localeID": "sw_TZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sw-ug.js b/1.6.6/i18n/angular-locale_sw-ug.js new file mode 100644 index 000000000..93f702530 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sw-ug.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Asubuhi", + "Mchana" + ], + "DAY": [ + "Jumapili", + "Jumatatu", + "Jumanne", + "Jumatano", + "Alhamisi", + "Ijumaa", + "Jumamosi" + ], + "ERANAMES": [ + "Kabla ya Kristo", + "Baada ya Kristo" + ], + "ERAS": [ + "KK", + "BK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januari", + "Februari", + "Machi", + "Aprili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "SHORTDAY": [ + "Jumapili", + "Jumatatu", + "Jumanne", + "Jumatano", + "Alhamisi", + "Ijumaa", + "Jumamosi" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Jul", + "Ago", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Machi", + "Aprili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "UGX", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "sw-ug", + "localeID": "sw_UG", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_sw.js b/1.6.6/i18n/angular-locale_sw.js new file mode 100644 index 000000000..324142674 --- /dev/null +++ b/1.6.6/i18n/angular-locale_sw.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Asubuhi", + "Mchana" + ], + "DAY": [ + "Jumapili", + "Jumatatu", + "Jumanne", + "Jumatano", + "Alhamisi", + "Ijumaa", + "Jumamosi" + ], + "ERANAMES": [ + "Kabla ya Kristo", + "Baada ya Kristo" + ], + "ERAS": [ + "KK", + "BK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januari", + "Februari", + "Machi", + "Aprili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "SHORTDAY": [ + "Jumapili", + "Jumatatu", + "Jumanne", + "Jumatano", + "Alhamisi", + "Ijumaa", + "Jumamosi" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Jul", + "Ago", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Machi", + "Aprili", + "Mei", + "Juni", + "Julai", + "Agosti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "sw", + "localeID": "sw", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ta-in.js b/1.6.6/i18n/angular-locale_ta-in.js new file mode 100644 index 000000000..29c561497 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ta-in.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0bae\u0bc1\u0bb1\u0bcd\u0baa\u0b95\u0bb2\u0bcd", + "\u0baa\u0bbf\u0bb1\u0bcd\u0baa\u0b95\u0bb2\u0bcd" + ], + "DAY": [ + "\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bc1", + "\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0bb3\u0bcd", + "\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd", + "\u0baa\u0bc1\u0ba4\u0ba9\u0bcd", + "\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0ba9\u0bcd", + "\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf", + "\u0b9a\u0ba9\u0bbf" + ], + "ERANAMES": [ + "\u0b95\u0bbf\u0bb1\u0bbf\u0bb8\u0bcd\u0ba4\u0bc1\u0bb5\u0bc1\u0b95\u0bcd\u0b95\u0bc1 \u0bae\u0bc1\u0ba9\u0bcd", + "\u0b85\u0ba9\u0bcd\u0ba9\u0bcb \u0b9f\u0bcb\u0bae\u0bbf\u0ba9\u0bbf" + ], + "ERAS": [ + "\u0b95\u0bbf.\u0bae\u0bc1.", + "\u0b95\u0bbf.\u0baa\u0bbf." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf", + "\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf", + "\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd", + "\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd", + "\u0bae\u0bc7", + "\u0b9c\u0bc2\u0ba9\u0bcd", + "\u0b9c\u0bc2\u0bb2\u0bc8", + "\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd", + "\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bae\u0bcd\u0baa\u0bb0\u0bcd", + "\u0b85\u0b95\u0bcd\u0b9f\u0bcb\u0baa\u0bb0\u0bcd", + "\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd", + "\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd" + ], + "SHORTDAY": [ + "\u0b9e\u0bbe\u0baf\u0bbf.", + "\u0ba4\u0bbf\u0b99\u0bcd.", + "\u0b9a\u0bc6\u0bb5\u0bcd.", + "\u0baa\u0bc1\u0ba4.", + "\u0bb5\u0bbf\u0baf\u0bbe.", + "\u0bb5\u0bc6\u0bb3\u0bcd.", + "\u0b9a\u0ba9\u0bbf" + ], + "SHORTMONTH": [ + "\u0b9c\u0ba9.", + "\u0baa\u0bbf\u0baa\u0bcd.", + "\u0bae\u0bbe\u0bb0\u0bcd.", + "\u0b8f\u0baa\u0bcd.", + "\u0bae\u0bc7", + "\u0b9c\u0bc2\u0ba9\u0bcd", + "\u0b9c\u0bc2\u0bb2\u0bc8", + "\u0b86\u0b95.", + "\u0b9a\u0bc6\u0baa\u0bcd.", + "\u0b85\u0b95\u0bcd.", + "\u0ba8\u0bb5.", + "\u0b9f\u0bbf\u0b9a." + ], + "STANDALONEMONTH": [ + "\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf", + "\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf", + "\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd", + "\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd", + "\u0bae\u0bc7", + "\u0b9c\u0bc2\u0ba9\u0bcd", + "\u0b9c\u0bc2\u0bb2\u0bc8", + "\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd", + "\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bae\u0bcd\u0baa\u0bb0\u0bcd", + "\u0b85\u0b95\u0bcd\u0b9f\u0bcb\u0baa\u0bb0\u0bcd", + "\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd", + "\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM, y a h:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "a h:mm:ss", + "short": "d/M/yy a h:mm", + "shortDate": "d/M/yy", + "shortTime": "a h:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ta-in", + "localeID": "ta_IN", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ta-lk.js b/1.6.6/i18n/angular-locale_ta-lk.js new file mode 100644 index 000000000..21942eb7f --- /dev/null +++ b/1.6.6/i18n/angular-locale_ta-lk.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0bae\u0bc1\u0bb1\u0bcd\u0baa\u0b95\u0bb2\u0bcd", + "\u0baa\u0bbf\u0bb1\u0bcd\u0baa\u0b95\u0bb2\u0bcd" + ], + "DAY": [ + "\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bc1", + "\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0bb3\u0bcd", + "\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd", + "\u0baa\u0bc1\u0ba4\u0ba9\u0bcd", + "\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0ba9\u0bcd", + "\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf", + "\u0b9a\u0ba9\u0bbf" + ], + "ERANAMES": [ + "\u0b95\u0bbf\u0bb1\u0bbf\u0bb8\u0bcd\u0ba4\u0bc1\u0bb5\u0bc1\u0b95\u0bcd\u0b95\u0bc1 \u0bae\u0bc1\u0ba9\u0bcd", + "\u0b85\u0ba9\u0bcd\u0ba9\u0bcb \u0b9f\u0bcb\u0bae\u0bbf\u0ba9\u0bbf" + ], + "ERAS": [ + "\u0b95\u0bbf.\u0bae\u0bc1.", + "\u0b95\u0bbf.\u0baa\u0bbf." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf", + "\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf", + "\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd", + "\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd", + "\u0bae\u0bc7", + "\u0b9c\u0bc2\u0ba9\u0bcd", + "\u0b9c\u0bc2\u0bb2\u0bc8", + "\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd", + "\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bae\u0bcd\u0baa\u0bb0\u0bcd", + "\u0b85\u0b95\u0bcd\u0b9f\u0bcb\u0baa\u0bb0\u0bcd", + "\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd", + "\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd" + ], + "SHORTDAY": [ + "\u0b9e\u0bbe\u0baf\u0bbf.", + "\u0ba4\u0bbf\u0b99\u0bcd.", + "\u0b9a\u0bc6\u0bb5\u0bcd.", + "\u0baa\u0bc1\u0ba4.", + "\u0bb5\u0bbf\u0baf\u0bbe.", + "\u0bb5\u0bc6\u0bb3\u0bcd.", + "\u0b9a\u0ba9\u0bbf" + ], + "SHORTMONTH": [ + "\u0b9c\u0ba9.", + "\u0baa\u0bbf\u0baa\u0bcd.", + "\u0bae\u0bbe\u0bb0\u0bcd.", + "\u0b8f\u0baa\u0bcd.", + "\u0bae\u0bc7", + "\u0b9c\u0bc2\u0ba9\u0bcd", + "\u0b9c\u0bc2\u0bb2\u0bc8", + "\u0b86\u0b95.", + "\u0b9a\u0bc6\u0baa\u0bcd.", + "\u0b85\u0b95\u0bcd.", + "\u0ba8\u0bb5.", + "\u0b9f\u0bbf\u0b9a." + ], + "STANDALONEMONTH": [ + "\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf", + "\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf", + "\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd", + "\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd", + "\u0bae\u0bc7", + "\u0b9c\u0bc2\u0ba9\u0bcd", + "\u0b9c\u0bc2\u0bb2\u0bc8", + "\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd", + "\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bae\u0bcd\u0baa\u0bb0\u0bcd", + "\u0b85\u0b95\u0bcd\u0b9f\u0bcb\u0baa\u0bb0\u0bcd", + "\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd", + "\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rs", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ta-lk", + "localeID": "ta_LK", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ta-my.js b/1.6.6/i18n/angular-locale_ta-my.js new file mode 100644 index 000000000..7963f1bb9 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ta-my.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0bae\u0bc1\u0bb1\u0bcd\u0baa\u0b95\u0bb2\u0bcd", + "\u0baa\u0bbf\u0bb1\u0bcd\u0baa\u0b95\u0bb2\u0bcd" + ], + "DAY": [ + "\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bc1", + "\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0bb3\u0bcd", + "\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd", + "\u0baa\u0bc1\u0ba4\u0ba9\u0bcd", + "\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0ba9\u0bcd", + "\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf", + "\u0b9a\u0ba9\u0bbf" + ], + "ERANAMES": [ + "\u0b95\u0bbf\u0bb1\u0bbf\u0bb8\u0bcd\u0ba4\u0bc1\u0bb5\u0bc1\u0b95\u0bcd\u0b95\u0bc1 \u0bae\u0bc1\u0ba9\u0bcd", + "\u0b85\u0ba9\u0bcd\u0ba9\u0bcb \u0b9f\u0bcb\u0bae\u0bbf\u0ba9\u0bbf" + ], + "ERAS": [ + "\u0b95\u0bbf.\u0bae\u0bc1.", + "\u0b95\u0bbf.\u0baa\u0bbf." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf", + "\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf", + "\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd", + "\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd", + "\u0bae\u0bc7", + "\u0b9c\u0bc2\u0ba9\u0bcd", + "\u0b9c\u0bc2\u0bb2\u0bc8", + "\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd", + "\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bae\u0bcd\u0baa\u0bb0\u0bcd", + "\u0b85\u0b95\u0bcd\u0b9f\u0bcb\u0baa\u0bb0\u0bcd", + "\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd", + "\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd" + ], + "SHORTDAY": [ + "\u0b9e\u0bbe\u0baf\u0bbf.", + "\u0ba4\u0bbf\u0b99\u0bcd.", + "\u0b9a\u0bc6\u0bb5\u0bcd.", + "\u0baa\u0bc1\u0ba4.", + "\u0bb5\u0bbf\u0baf\u0bbe.", + "\u0bb5\u0bc6\u0bb3\u0bcd.", + "\u0b9a\u0ba9\u0bbf" + ], + "SHORTMONTH": [ + "\u0b9c\u0ba9.", + "\u0baa\u0bbf\u0baa\u0bcd.", + "\u0bae\u0bbe\u0bb0\u0bcd.", + "\u0b8f\u0baa\u0bcd.", + "\u0bae\u0bc7", + "\u0b9c\u0bc2\u0ba9\u0bcd", + "\u0b9c\u0bc2\u0bb2\u0bc8", + "\u0b86\u0b95.", + "\u0b9a\u0bc6\u0baa\u0bcd.", + "\u0b85\u0b95\u0bcd.", + "\u0ba8\u0bb5.", + "\u0b9f\u0bbf\u0b9a." + ], + "STANDALONEMONTH": [ + "\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf", + "\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf", + "\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd", + "\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd", + "\u0bae\u0bc7", + "\u0b9c\u0bc2\u0ba9\u0bcd", + "\u0b9c\u0bc2\u0bb2\u0bc8", + "\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd", + "\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bae\u0bcd\u0baa\u0bb0\u0bcd", + "\u0b85\u0b95\u0bcd\u0b9f\u0bcb\u0baa\u0bb0\u0bcd", + "\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd", + "\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM, y a h:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "a h:mm:ss", + "short": "d/M/yy a h:mm", + "shortDate": "d/M/yy", + "shortTime": "a h:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "RM", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ta-my", + "localeID": "ta_MY", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ta-sg.js b/1.6.6/i18n/angular-locale_ta-sg.js new file mode 100644 index 000000000..c862ad306 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ta-sg.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0bae\u0bc1\u0bb1\u0bcd\u0baa\u0b95\u0bb2\u0bcd", + "\u0baa\u0bbf\u0bb1\u0bcd\u0baa\u0b95\u0bb2\u0bcd" + ], + "DAY": [ + "\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bc1", + "\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0bb3\u0bcd", + "\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd", + "\u0baa\u0bc1\u0ba4\u0ba9\u0bcd", + "\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0ba9\u0bcd", + "\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf", + "\u0b9a\u0ba9\u0bbf" + ], + "ERANAMES": [ + "\u0b95\u0bbf\u0bb1\u0bbf\u0bb8\u0bcd\u0ba4\u0bc1\u0bb5\u0bc1\u0b95\u0bcd\u0b95\u0bc1 \u0bae\u0bc1\u0ba9\u0bcd", + "\u0b85\u0ba9\u0bcd\u0ba9\u0bcb \u0b9f\u0bcb\u0bae\u0bbf\u0ba9\u0bbf" + ], + "ERAS": [ + "\u0b95\u0bbf.\u0bae\u0bc1.", + "\u0b95\u0bbf.\u0baa\u0bbf." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf", + "\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf", + "\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd", + "\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd", + "\u0bae\u0bc7", + "\u0b9c\u0bc2\u0ba9\u0bcd", + "\u0b9c\u0bc2\u0bb2\u0bc8", + "\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd", + "\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bae\u0bcd\u0baa\u0bb0\u0bcd", + "\u0b85\u0b95\u0bcd\u0b9f\u0bcb\u0baa\u0bb0\u0bcd", + "\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd", + "\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd" + ], + "SHORTDAY": [ + "\u0b9e\u0bbe\u0baf\u0bbf.", + "\u0ba4\u0bbf\u0b99\u0bcd.", + "\u0b9a\u0bc6\u0bb5\u0bcd.", + "\u0baa\u0bc1\u0ba4.", + "\u0bb5\u0bbf\u0baf\u0bbe.", + "\u0bb5\u0bc6\u0bb3\u0bcd.", + "\u0b9a\u0ba9\u0bbf" + ], + "SHORTMONTH": [ + "\u0b9c\u0ba9.", + "\u0baa\u0bbf\u0baa\u0bcd.", + "\u0bae\u0bbe\u0bb0\u0bcd.", + "\u0b8f\u0baa\u0bcd.", + "\u0bae\u0bc7", + "\u0b9c\u0bc2\u0ba9\u0bcd", + "\u0b9c\u0bc2\u0bb2\u0bc8", + "\u0b86\u0b95.", + "\u0b9a\u0bc6\u0baa\u0bcd.", + "\u0b85\u0b95\u0bcd.", + "\u0ba8\u0bb5.", + "\u0b9f\u0bbf\u0b9a." + ], + "STANDALONEMONTH": [ + "\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf", + "\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf", + "\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd", + "\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd", + "\u0bae\u0bc7", + "\u0b9c\u0bc2\u0ba9\u0bcd", + "\u0b9c\u0bc2\u0bb2\u0bc8", + "\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd", + "\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bae\u0bcd\u0baa\u0bb0\u0bcd", + "\u0b85\u0b95\u0bcd\u0b9f\u0bcb\u0baa\u0bb0\u0bcd", + "\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd", + "\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM, y a h:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "a h:mm:ss", + "short": "d/M/yy a h:mm", + "shortDate": "d/M/yy", + "shortTime": "a h:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ta-sg", + "localeID": "ta_SG", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ta.js b/1.6.6/i18n/angular-locale_ta.js new file mode 100644 index 000000000..9701a55ba --- /dev/null +++ b/1.6.6/i18n/angular-locale_ta.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0bae\u0bc1\u0bb1\u0bcd\u0baa\u0b95\u0bb2\u0bcd", + "\u0baa\u0bbf\u0bb1\u0bcd\u0baa\u0b95\u0bb2\u0bcd" + ], + "DAY": [ + "\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bc1", + "\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0bb3\u0bcd", + "\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd", + "\u0baa\u0bc1\u0ba4\u0ba9\u0bcd", + "\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0ba9\u0bcd", + "\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf", + "\u0b9a\u0ba9\u0bbf" + ], + "ERANAMES": [ + "\u0b95\u0bbf\u0bb1\u0bbf\u0bb8\u0bcd\u0ba4\u0bc1\u0bb5\u0bc1\u0b95\u0bcd\u0b95\u0bc1 \u0bae\u0bc1\u0ba9\u0bcd", + "\u0b85\u0ba9\u0bcd\u0ba9\u0bcb \u0b9f\u0bcb\u0bae\u0bbf\u0ba9\u0bbf" + ], + "ERAS": [ + "\u0b95\u0bbf.\u0bae\u0bc1.", + "\u0b95\u0bbf.\u0baa\u0bbf." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf", + "\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf", + "\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd", + "\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd", + "\u0bae\u0bc7", + "\u0b9c\u0bc2\u0ba9\u0bcd", + "\u0b9c\u0bc2\u0bb2\u0bc8", + "\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd", + "\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bae\u0bcd\u0baa\u0bb0\u0bcd", + "\u0b85\u0b95\u0bcd\u0b9f\u0bcb\u0baa\u0bb0\u0bcd", + "\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd", + "\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd" + ], + "SHORTDAY": [ + "\u0b9e\u0bbe\u0baf\u0bbf.", + "\u0ba4\u0bbf\u0b99\u0bcd.", + "\u0b9a\u0bc6\u0bb5\u0bcd.", + "\u0baa\u0bc1\u0ba4.", + "\u0bb5\u0bbf\u0baf\u0bbe.", + "\u0bb5\u0bc6\u0bb3\u0bcd.", + "\u0b9a\u0ba9\u0bbf" + ], + "SHORTMONTH": [ + "\u0b9c\u0ba9.", + "\u0baa\u0bbf\u0baa\u0bcd.", + "\u0bae\u0bbe\u0bb0\u0bcd.", + "\u0b8f\u0baa\u0bcd.", + "\u0bae\u0bc7", + "\u0b9c\u0bc2\u0ba9\u0bcd", + "\u0b9c\u0bc2\u0bb2\u0bc8", + "\u0b86\u0b95.", + "\u0b9a\u0bc6\u0baa\u0bcd.", + "\u0b85\u0b95\u0bcd.", + "\u0ba8\u0bb5.", + "\u0b9f\u0bbf\u0b9a." + ], + "STANDALONEMONTH": [ + "\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf", + "\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf", + "\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd", + "\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd", + "\u0bae\u0bc7", + "\u0b9c\u0bc2\u0ba9\u0bcd", + "\u0b9c\u0bc2\u0bb2\u0bc8", + "\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd", + "\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bae\u0bcd\u0baa\u0bb0\u0bcd", + "\u0b85\u0b95\u0bcd\u0b9f\u0bcb\u0baa\u0bb0\u0bcd", + "\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd", + "\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM, y a h:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "a h:mm:ss", + "short": "d/M/yy a h:mm", + "shortDate": "d/M/yy", + "shortTime": "a h:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ta", + "localeID": "ta", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_te-in.js b/1.6.6/i18n/angular-locale_te-in.js new file mode 100644 index 000000000..dd4dfe1c1 --- /dev/null +++ b/1.6.6/i18n/angular-locale_te-in.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u0c06\u0c26\u0c3f\u0c35\u0c3e\u0c30\u0c02", + "\u0c38\u0c4b\u0c2e\u0c35\u0c3e\u0c30\u0c02", + "\u0c2e\u0c02\u0c17\u0c33\u0c35\u0c3e\u0c30\u0c02", + "\u0c2c\u0c41\u0c27\u0c35\u0c3e\u0c30\u0c02", + "\u0c17\u0c41\u0c30\u0c41\u0c35\u0c3e\u0c30\u0c02", + "\u0c36\u0c41\u0c15\u0c4d\u0c30\u0c35\u0c3e\u0c30\u0c02", + "\u0c36\u0c28\u0c3f\u0c35\u0c3e\u0c30\u0c02" + ], + "ERANAMES": [ + "\u0c15\u0c4d\u0c30\u0c40\u0c38\u0c4d\u0c24\u0c41 \u0c2a\u0c42\u0c30\u0c4d\u0c35\u0c02", + "\u0c15\u0c4d\u0c30\u0c40\u0c38\u0c4d\u0c24\u0c41 \u0c36\u0c15\u0c02" + ], + "ERAS": [ + "\u0c15\u0c4d\u0c30\u0c40\u0c2a\u0c42", + "\u0c15\u0c4d\u0c30\u0c40\u0c36" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0c1c\u0c28\u0c35\u0c30\u0c3f", + "\u0c2b\u0c3f\u0c2c\u0c4d\u0c30\u0c35\u0c30\u0c3f", + "\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f", + "\u0c0f\u0c2a\u0c4d\u0c30\u0c3f\u0c32\u0c4d", + "\u0c2e\u0c47", + "\u0c1c\u0c42\u0c28\u0c4d", + "\u0c1c\u0c41\u0c32\u0c48", + "\u0c06\u0c17\u0c38\u0c4d\u0c1f\u0c41", + "\u0c38\u0c46\u0c2a\u0c4d\u0c1f\u0c46\u0c02\u0c2c\u0c30\u0c4d", + "\u0c05\u0c15\u0c4d\u0c1f\u0c4b\u0c2c\u0c30\u0c4d", + "\u0c28\u0c35\u0c02\u0c2c\u0c30\u0c4d", + "\u0c21\u0c3f\u0c38\u0c46\u0c02\u0c2c\u0c30\u0c4d" + ], + "SHORTDAY": [ + "\u0c06\u0c26\u0c3f", + "\u0c38\u0c4b\u0c2e", + "\u0c2e\u0c02\u0c17\u0c33", + "\u0c2c\u0c41\u0c27", + "\u0c17\u0c41\u0c30\u0c41", + "\u0c36\u0c41\u0c15\u0c4d\u0c30", + "\u0c36\u0c28\u0c3f" + ], + "SHORTMONTH": [ + "\u0c1c\u0c28", + "\u0c2b\u0c3f\u0c2c\u0c4d\u0c30", + "\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f", + "\u0c0f\u0c2a\u0c4d\u0c30\u0c3f", + "\u0c2e\u0c47", + "\u0c1c\u0c42\u0c28\u0c4d", + "\u0c1c\u0c41\u0c32\u0c48", + "\u0c06\u0c17", + "\u0c38\u0c46\u0c2a\u0c4d\u0c1f\u0c46\u0c02", + "\u0c05\u0c15\u0c4d\u0c1f\u0c4b", + "\u0c28\u0c35\u0c02", + "\u0c21\u0c3f\u0c38\u0c46\u0c02" + ], + "STANDALONEMONTH": [ + "\u0c1c\u0c28\u0c35\u0c30\u0c3f", + "\u0c2b\u0c3f\u0c2c\u0c4d\u0c30\u0c35\u0c30\u0c3f", + "\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f", + "\u0c0f\u0c2a\u0c4d\u0c30\u0c3f\u0c32\u0c4d", + "\u0c2e\u0c47", + "\u0c1c\u0c42\u0c28\u0c4d", + "\u0c1c\u0c41\u0c32\u0c48", + "\u0c06\u0c17\u0c38\u0c4d\u0c1f\u0c41", + "\u0c38\u0c46\u0c2a\u0c4d\u0c1f\u0c46\u0c02\u0c2c\u0c30\u0c4d", + "\u0c05\u0c15\u0c4d\u0c1f\u0c4b\u0c2c\u0c30\u0c4d", + "\u0c28\u0c35\u0c02\u0c2c\u0c30\u0c4d", + "\u0c21\u0c3f\u0c38\u0c46\u0c02\u0c2c\u0c30\u0c4d" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "d, MMMM y, EEEE", + "longDate": "d MMMM, y", + "medium": "d MMM, y h:mm:ss a", + "mediumDate": "d MMM, y", + "mediumTime": "h:mm:ss a", + "short": "dd-MM-yy h:mm a", + "shortDate": "dd-MM-yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "te-in", + "localeID": "te_IN", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_te.js b/1.6.6/i18n/angular-locale_te.js new file mode 100644 index 000000000..5154acd12 --- /dev/null +++ b/1.6.6/i18n/angular-locale_te.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u0c06\u0c26\u0c3f\u0c35\u0c3e\u0c30\u0c02", + "\u0c38\u0c4b\u0c2e\u0c35\u0c3e\u0c30\u0c02", + "\u0c2e\u0c02\u0c17\u0c33\u0c35\u0c3e\u0c30\u0c02", + "\u0c2c\u0c41\u0c27\u0c35\u0c3e\u0c30\u0c02", + "\u0c17\u0c41\u0c30\u0c41\u0c35\u0c3e\u0c30\u0c02", + "\u0c36\u0c41\u0c15\u0c4d\u0c30\u0c35\u0c3e\u0c30\u0c02", + "\u0c36\u0c28\u0c3f\u0c35\u0c3e\u0c30\u0c02" + ], + "ERANAMES": [ + "\u0c15\u0c4d\u0c30\u0c40\u0c38\u0c4d\u0c24\u0c41 \u0c2a\u0c42\u0c30\u0c4d\u0c35\u0c02", + "\u0c15\u0c4d\u0c30\u0c40\u0c38\u0c4d\u0c24\u0c41 \u0c36\u0c15\u0c02" + ], + "ERAS": [ + "\u0c15\u0c4d\u0c30\u0c40\u0c2a\u0c42", + "\u0c15\u0c4d\u0c30\u0c40\u0c36" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0c1c\u0c28\u0c35\u0c30\u0c3f", + "\u0c2b\u0c3f\u0c2c\u0c4d\u0c30\u0c35\u0c30\u0c3f", + "\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f", + "\u0c0f\u0c2a\u0c4d\u0c30\u0c3f\u0c32\u0c4d", + "\u0c2e\u0c47", + "\u0c1c\u0c42\u0c28\u0c4d", + "\u0c1c\u0c41\u0c32\u0c48", + "\u0c06\u0c17\u0c38\u0c4d\u0c1f\u0c41", + "\u0c38\u0c46\u0c2a\u0c4d\u0c1f\u0c46\u0c02\u0c2c\u0c30\u0c4d", + "\u0c05\u0c15\u0c4d\u0c1f\u0c4b\u0c2c\u0c30\u0c4d", + "\u0c28\u0c35\u0c02\u0c2c\u0c30\u0c4d", + "\u0c21\u0c3f\u0c38\u0c46\u0c02\u0c2c\u0c30\u0c4d" + ], + "SHORTDAY": [ + "\u0c06\u0c26\u0c3f", + "\u0c38\u0c4b\u0c2e", + "\u0c2e\u0c02\u0c17\u0c33", + "\u0c2c\u0c41\u0c27", + "\u0c17\u0c41\u0c30\u0c41", + "\u0c36\u0c41\u0c15\u0c4d\u0c30", + "\u0c36\u0c28\u0c3f" + ], + "SHORTMONTH": [ + "\u0c1c\u0c28", + "\u0c2b\u0c3f\u0c2c\u0c4d\u0c30", + "\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f", + "\u0c0f\u0c2a\u0c4d\u0c30\u0c3f", + "\u0c2e\u0c47", + "\u0c1c\u0c42\u0c28\u0c4d", + "\u0c1c\u0c41\u0c32\u0c48", + "\u0c06\u0c17", + "\u0c38\u0c46\u0c2a\u0c4d\u0c1f\u0c46\u0c02", + "\u0c05\u0c15\u0c4d\u0c1f\u0c4b", + "\u0c28\u0c35\u0c02", + "\u0c21\u0c3f\u0c38\u0c46\u0c02" + ], + "STANDALONEMONTH": [ + "\u0c1c\u0c28\u0c35\u0c30\u0c3f", + "\u0c2b\u0c3f\u0c2c\u0c4d\u0c30\u0c35\u0c30\u0c3f", + "\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f", + "\u0c0f\u0c2a\u0c4d\u0c30\u0c3f\u0c32\u0c4d", + "\u0c2e\u0c47", + "\u0c1c\u0c42\u0c28\u0c4d", + "\u0c1c\u0c41\u0c32\u0c48", + "\u0c06\u0c17\u0c38\u0c4d\u0c1f\u0c41", + "\u0c38\u0c46\u0c2a\u0c4d\u0c1f\u0c46\u0c02\u0c2c\u0c30\u0c4d", + "\u0c05\u0c15\u0c4d\u0c1f\u0c4b\u0c2c\u0c30\u0c4d", + "\u0c28\u0c35\u0c02\u0c2c\u0c30\u0c4d", + "\u0c21\u0c3f\u0c38\u0c46\u0c02\u0c2c\u0c30\u0c4d" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "d, MMMM y, EEEE", + "longDate": "d MMMM, y", + "medium": "d MMM, y h:mm:ss a", + "mediumDate": "d MMM, y", + "mediumTime": "h:mm:ss a", + "short": "dd-MM-yy h:mm a", + "shortDate": "dd-MM-yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "te", + "localeID": "te", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_teo-ke.js b/1.6.6/i18n/angular-locale_teo-ke.js new file mode 100644 index 000000000..70feee6e8 --- /dev/null +++ b/1.6.6/i18n/angular-locale_teo-ke.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Taparachu", + "Ebongi" + ], + "DAY": [ + "Nakaejuma", + "Nakaebarasa", + "Nakaare", + "Nakauni", + "Nakaung\u2019on", + "Nakakany", + "Nakasabiti" + ], + "ERANAMES": [ + "Kabla ya Christo", + "Baada ya Christo" + ], + "ERAS": [ + "KK", + "BK" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Orara", + "Omuk", + "Okwamg\u2019", + "Odung\u2019el", + "Omaruk", + "Omodok\u2019king\u2019ol", + "Ojola", + "Opedel", + "Osokosokoma", + "Otibar", + "Olabor", + "Opoo" + ], + "SHORTDAY": [ + "Jum", + "Bar", + "Aar", + "Uni", + "Ung", + "Kan", + "Sab" + ], + "SHORTMONTH": [ + "Rar", + "Muk", + "Kwa", + "Dun", + "Mar", + "Mod", + "Jol", + "Ped", + "Sok", + "Tib", + "Lab", + "Poo" + ], + "STANDALONEMONTH": [ + "Orara", + "Omuk", + "Okwamg\u2019", + "Odung\u2019el", + "Omaruk", + "Omodok\u2019king\u2019ol", + "Ojola", + "Opedel", + "Osokosokoma", + "Otibar", + "Olabor", + "Opoo" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Ksh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "teo-ke", + "localeID": "teo_KE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_teo-ug.js b/1.6.6/i18n/angular-locale_teo-ug.js new file mode 100644 index 000000000..326f3f537 --- /dev/null +++ b/1.6.6/i18n/angular-locale_teo-ug.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Taparachu", + "Ebongi" + ], + "DAY": [ + "Nakaejuma", + "Nakaebarasa", + "Nakaare", + "Nakauni", + "Nakaung\u2019on", + "Nakakany", + "Nakasabiti" + ], + "ERANAMES": [ + "Kabla ya Christo", + "Baada ya Christo" + ], + "ERAS": [ + "KK", + "BK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Orara", + "Omuk", + "Okwamg\u2019", + "Odung\u2019el", + "Omaruk", + "Omodok\u2019king\u2019ol", + "Ojola", + "Opedel", + "Osokosokoma", + "Otibar", + "Olabor", + "Opoo" + ], + "SHORTDAY": [ + "Jum", + "Bar", + "Aar", + "Uni", + "Ung", + "Kan", + "Sab" + ], + "SHORTMONTH": [ + "Rar", + "Muk", + "Kwa", + "Dun", + "Mar", + "Mod", + "Jol", + "Ped", + "Sok", + "Tib", + "Lab", + "Poo" + ], + "STANDALONEMONTH": [ + "Orara", + "Omuk", + "Okwamg\u2019", + "Odung\u2019el", + "Omaruk", + "Omodok\u2019king\u2019ol", + "Ojola", + "Opedel", + "Osokosokoma", + "Otibar", + "Olabor", + "Opoo" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "UGX", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "teo-ug", + "localeID": "teo_UG", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_teo.js b/1.6.6/i18n/angular-locale_teo.js new file mode 100644 index 000000000..477460f7b --- /dev/null +++ b/1.6.6/i18n/angular-locale_teo.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Taparachu", + "Ebongi" + ], + "DAY": [ + "Nakaejuma", + "Nakaebarasa", + "Nakaare", + "Nakauni", + "Nakaung\u2019on", + "Nakakany", + "Nakasabiti" + ], + "ERANAMES": [ + "Kabla ya Christo", + "Baada ya Christo" + ], + "ERAS": [ + "KK", + "BK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Orara", + "Omuk", + "Okwamg\u2019", + "Odung\u2019el", + "Omaruk", + "Omodok\u2019king\u2019ol", + "Ojola", + "Opedel", + "Osokosokoma", + "Otibar", + "Olabor", + "Opoo" + ], + "SHORTDAY": [ + "Jum", + "Bar", + "Aar", + "Uni", + "Ung", + "Kan", + "Sab" + ], + "SHORTMONTH": [ + "Rar", + "Muk", + "Kwa", + "Dun", + "Mar", + "Mod", + "Jol", + "Ped", + "Sok", + "Tib", + "Lab", + "Poo" + ], + "STANDALONEMONTH": [ + "Orara", + "Omuk", + "Okwamg\u2019", + "Odung\u2019el", + "Omaruk", + "Omodok\u2019king\u2019ol", + "Ojola", + "Opedel", + "Osokosokoma", + "Otibar", + "Olabor", + "Opoo" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "UGX", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "teo", + "localeID": "teo", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_th-th.js b/1.6.6/i18n/angular-locale_th-th.js new file mode 100644 index 000000000..6918c564c --- /dev/null +++ b/1.6.6/i18n/angular-locale_th-th.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07", + "\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07" + ], + "DAY": [ + "\u0e27\u0e31\u0e19\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c", + "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c", + "\u0e27\u0e31\u0e19\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23", + "\u0e27\u0e31\u0e19\u0e1e\u0e38\u0e18", + "\u0e27\u0e31\u0e19\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35", + "\u0e27\u0e31\u0e19\u0e28\u0e38\u0e01\u0e23\u0e4c", + "\u0e27\u0e31\u0e19\u0e40\u0e2a\u0e32\u0e23\u0e4c" + ], + "ERANAMES": [ + "\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19\u0e04\u0e23\u0e34\u0e2a\u0e15\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a", + "\u0e04\u0e23\u0e34\u0e2a\u0e15\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a" + ], + "ERAS": [ + "\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19 \u0e04.\u0e28.", + "\u0e04.\u0e28." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21", + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c", + "\u0e21\u0e35\u0e19\u0e32\u0e04\u0e21", + "\u0e40\u0e21\u0e29\u0e32\u0e22\u0e19", + "\u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21", + "\u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19", + "\u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21", + "\u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21", + "\u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19", + "\u0e15\u0e38\u0e25\u0e32\u0e04\u0e21", + "\u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19", + "\u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21" + ], + "SHORTDAY": [ + "\u0e2d\u0e32.", + "\u0e08.", + "\u0e2d.", + "\u0e1e.", + "\u0e1e\u0e24.", + "\u0e28.", + "\u0e2a." + ], + "SHORTMONTH": [ + "\u0e21.\u0e04.", + "\u0e01.\u0e1e.", + "\u0e21\u0e35.\u0e04.", + "\u0e40\u0e21.\u0e22.", + "\u0e1e.\u0e04.", + "\u0e21\u0e34.\u0e22.", + "\u0e01.\u0e04.", + "\u0e2a.\u0e04.", + "\u0e01.\u0e22.", + "\u0e15.\u0e04.", + "\u0e1e.\u0e22.", + "\u0e18.\u0e04." + ], + "STANDALONEMONTH": [ + "\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21", + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c", + "\u0e21\u0e35\u0e19\u0e32\u0e04\u0e21", + "\u0e40\u0e21\u0e29\u0e32\u0e22\u0e19", + "\u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21", + "\u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19", + "\u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21", + "\u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21", + "\u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19", + "\u0e15\u0e38\u0e25\u0e32\u0e04\u0e21", + "\u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19", + "\u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE\u0e17\u0e35\u0e48 d MMMM G y", + "longDate": "d MMMM G y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u0e3f", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "th-th", + "localeID": "th_TH", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_th.js b/1.6.6/i18n/angular-locale_th.js new file mode 100644 index 000000000..4a8ebc3a9 --- /dev/null +++ b/1.6.6/i18n/angular-locale_th.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07", + "\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07" + ], + "DAY": [ + "\u0e27\u0e31\u0e19\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c", + "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c", + "\u0e27\u0e31\u0e19\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23", + "\u0e27\u0e31\u0e19\u0e1e\u0e38\u0e18", + "\u0e27\u0e31\u0e19\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35", + "\u0e27\u0e31\u0e19\u0e28\u0e38\u0e01\u0e23\u0e4c", + "\u0e27\u0e31\u0e19\u0e40\u0e2a\u0e32\u0e23\u0e4c" + ], + "ERANAMES": [ + "\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19\u0e04\u0e23\u0e34\u0e2a\u0e15\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a", + "\u0e04\u0e23\u0e34\u0e2a\u0e15\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a" + ], + "ERAS": [ + "\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19 \u0e04.\u0e28.", + "\u0e04.\u0e28." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21", + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c", + "\u0e21\u0e35\u0e19\u0e32\u0e04\u0e21", + "\u0e40\u0e21\u0e29\u0e32\u0e22\u0e19", + "\u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21", + "\u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19", + "\u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21", + "\u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21", + "\u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19", + "\u0e15\u0e38\u0e25\u0e32\u0e04\u0e21", + "\u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19", + "\u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21" + ], + "SHORTDAY": [ + "\u0e2d\u0e32.", + "\u0e08.", + "\u0e2d.", + "\u0e1e.", + "\u0e1e\u0e24.", + "\u0e28.", + "\u0e2a." + ], + "SHORTMONTH": [ + "\u0e21.\u0e04.", + "\u0e01.\u0e1e.", + "\u0e21\u0e35.\u0e04.", + "\u0e40\u0e21.\u0e22.", + "\u0e1e.\u0e04.", + "\u0e21\u0e34.\u0e22.", + "\u0e01.\u0e04.", + "\u0e2a.\u0e04.", + "\u0e01.\u0e22.", + "\u0e15.\u0e04.", + "\u0e1e.\u0e22.", + "\u0e18.\u0e04." + ], + "STANDALONEMONTH": [ + "\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21", + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c", + "\u0e21\u0e35\u0e19\u0e32\u0e04\u0e21", + "\u0e40\u0e21\u0e29\u0e32\u0e22\u0e19", + "\u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21", + "\u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19", + "\u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21", + "\u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21", + "\u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19", + "\u0e15\u0e38\u0e25\u0e32\u0e04\u0e21", + "\u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19", + "\u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE\u0e17\u0e35\u0e48 d MMMM G y", + "longDate": "d MMMM G y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u0e3f", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "th", + "localeID": "th", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ti-er.js b/1.6.6/i18n/angular-locale_ti-er.js new file mode 100644 index 000000000..8431c8b22 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ti-er.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u1295\u1309\u1206 \u1230\u12d3\u1270", + "\u12f5\u1215\u122d \u1230\u12d3\u1275" + ], + "DAY": [ + "\u1230\u1295\u1260\u1275", + "\u1230\u1291\u12ed", + "\u1220\u1209\u1235", + "\u1228\u1261\u12d5", + "\u1283\u1219\u1235", + "\u12d3\u122d\u1262", + "\u1240\u12f3\u121d" + ], + "ERANAMES": [ + "\u12d3\u1218\u1270 \u12d3\u1208\u121d", + "\u12d3\u1218\u1270 \u121d\u1205\u1228\u1275" + ], + "ERAS": [ + "\u12d3/\u12d3", + "\u12d3/\u121d" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u1325\u122a", + "\u1208\u12ab\u1272\u1275", + "\u1218\u130b\u1262\u1275", + "\u121a\u12eb\u12dd\u12eb", + "\u130d\u1295\u1266\u1275", + "\u1230\u1290", + "\u1213\u121d\u1208", + "\u1290\u1213\u1230", + "\u1218\u1235\u12a8\u1228\u121d", + "\u1325\u1245\u121d\u1272", + "\u1215\u12f3\u122d", + "\u1273\u1215\u1233\u1235" + ], + "SHORTDAY": [ + "\u1230\u1295", + "\u1230\u1291", + "\u1230\u1209", + "\u1228\u1261", + "\u1213\u1219", + "\u12d3\u122d", + "\u1240\u12f3" + ], + "SHORTMONTH": [ + "\u1325\u122a", + "\u1208\u12ab", + "\u1218\u130b", + "\u121a\u12eb", + "\u130d\u1295", + "\u1230\u1290", + "\u1213\u121d", + "\u1290\u1213", + "\u1218\u1235", + "\u1325\u1245", + "\u1215\u12f3", + "\u1273\u1215" + ], + "STANDALONEMONTH": [ + "\u1325\u122a", + "\u1208\u12ab\u1272\u1275", + "\u1218\u130b\u1262\u1275", + "\u121a\u12eb\u12dd\u12eb", + "\u130d\u1295\u1266\u1275", + "\u1230\u1290", + "\u1213\u121d\u1208", + "\u1290\u1213\u1230", + "\u1218\u1235\u12a8\u1228\u121d", + "\u1325\u1245\u121d\u1272", + "\u1215\u12f3\u122d", + "\u1273\u1215\u1233\u1235" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE\u1363 dd MMMM \u1218\u12d3\u120d\u1272 y G", + "longDate": "dd MMMM y", + "medium": "dd-MMM-y h:mm:ss a", + "mediumDate": "dd-MMM-y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/yy h:mm a", + "shortDate": "dd/MM/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Nfk", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ti-er", + "localeID": "ti_ER", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ti-et.js b/1.6.6/i18n/angular-locale_ti-et.js new file mode 100644 index 000000000..26b77204d --- /dev/null +++ b/1.6.6/i18n/angular-locale_ti-et.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u1295\u1309\u1206 \u1230\u12d3\u1270", + "\u12f5\u1215\u122d \u1230\u12d3\u1275" + ], + "DAY": [ + "\u1230\u1295\u1260\u1275", + "\u1230\u1291\u12ed", + "\u1220\u1209\u1235", + "\u1228\u1261\u12d5", + "\u1283\u1219\u1235", + "\u12d3\u122d\u1262", + "\u1240\u12f3\u121d" + ], + "ERANAMES": [ + "\u12d3/\u12d3", + "\u12d3\u1218\u1270 \u121d\u1205\u1228\u1275" + ], + "ERAS": [ + "\u12d3/\u12d3", + "\u12d3/\u121d" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u1325\u122a", + "\u1208\u12ab\u1272\u1275", + "\u1218\u130b\u1262\u1275", + "\u121a\u12eb\u12dd\u12eb", + "\u130d\u1295\u1266\u1275", + "\u1230\u1290", + "\u1213\u121d\u1208", + "\u1290\u1213\u1230", + "\u1218\u1235\u12a8\u1228\u121d", + "\u1325\u1245\u121d\u1272", + "\u1215\u12f3\u122d", + "\u1273\u1215\u1233\u1235" + ], + "SHORTDAY": [ + "\u1230\u1295", + "\u1230\u1291", + "\u1230\u1209", + "\u1228\u1261", + "\u1213\u1219", + "\u12d3\u122d", + "\u1240\u12f3" + ], + "SHORTMONTH": [ + "\u1325\u122a", + "\u1208\u12ab", + "\u1218\u130b", + "\u121a\u12eb", + "\u130d\u1295", + "\u1230\u1290", + "\u1213\u121d", + "\u1290\u1213", + "\u1218\u1235", + "\u1325\u1245", + "\u1215\u12f3", + "\u1273\u1215" + ], + "STANDALONEMONTH": [ + "\u1325\u122a", + "\u1208\u12ab\u1272\u1275", + "\u1218\u130b\u1262\u1275", + "\u121a\u12eb\u12dd\u12eb", + "\u130d\u1295\u1266\u1275", + "\u1230\u1290", + "\u1213\u121d\u1208", + "\u1290\u1213\u1230", + "\u1218\u1235\u12a8\u1228\u121d", + "\u1325\u1245\u121d\u1272", + "\u1215\u12f3\u122d", + "\u1273\u1215\u1233\u1235" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE\u1363 dd MMMM \u1218\u12d3\u120d\u1272 y G", + "longDate": "dd MMMM y", + "medium": "dd-MMM-y h:mm:ss a", + "mediumDate": "dd-MMM-y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/yy h:mm a", + "shortDate": "dd/MM/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Birr", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ti-et", + "localeID": "ti_ET", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ti.js b/1.6.6/i18n/angular-locale_ti.js new file mode 100644 index 000000000..393245235 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ti.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u1295\u1309\u1206 \u1230\u12d3\u1270", + "\u12f5\u1215\u122d \u1230\u12d3\u1275" + ], + "DAY": [ + "\u1230\u1295\u1260\u1275", + "\u1230\u1291\u12ed", + "\u1220\u1209\u1235", + "\u1228\u1261\u12d5", + "\u1283\u1219\u1235", + "\u12d3\u122d\u1262", + "\u1240\u12f3\u121d" + ], + "ERANAMES": [ + "\u12d3/\u12d3", + "\u12d3\u1218\u1270 \u121d\u1205\u1228\u1275" + ], + "ERAS": [ + "\u12d3/\u12d3", + "\u12d3/\u121d" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u1325\u122a", + "\u1208\u12ab\u1272\u1275", + "\u1218\u130b\u1262\u1275", + "\u121a\u12eb\u12dd\u12eb", + "\u130d\u1295\u1266\u1275", + "\u1230\u1290", + "\u1213\u121d\u1208", + "\u1290\u1213\u1230", + "\u1218\u1235\u12a8\u1228\u121d", + "\u1325\u1245\u121d\u1272", + "\u1215\u12f3\u122d", + "\u1273\u1215\u1233\u1235" + ], + "SHORTDAY": [ + "\u1230\u1295", + "\u1230\u1291", + "\u1230\u1209", + "\u1228\u1261", + "\u1213\u1219", + "\u12d3\u122d", + "\u1240\u12f3" + ], + "SHORTMONTH": [ + "\u1325\u122a", + "\u1208\u12ab", + "\u1218\u130b", + "\u121a\u12eb", + "\u130d\u1295", + "\u1230\u1290", + "\u1213\u121d", + "\u1290\u1213", + "\u1218\u1235", + "\u1325\u1245", + "\u1215\u12f3", + "\u1273\u1215" + ], + "STANDALONEMONTH": [ + "\u1325\u122a", + "\u1208\u12ab\u1272\u1275", + "\u1218\u130b\u1262\u1275", + "\u121a\u12eb\u12dd\u12eb", + "\u130d\u1295\u1266\u1275", + "\u1230\u1290", + "\u1213\u121d\u1208", + "\u1290\u1213\u1230", + "\u1218\u1235\u12a8\u1228\u121d", + "\u1325\u1245\u121d\u1272", + "\u1215\u12f3\u122d", + "\u1273\u1215\u1233\u1235" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE\u1363 dd MMMM \u1218\u12d3\u120d\u1272 y G", + "longDate": "dd MMMM y", + "medium": "dd-MMM-y h:mm:ss a", + "mediumDate": "dd-MMM-y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/yy h:mm a", + "shortDate": "dd/MM/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Birr", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ti", + "localeID": "ti", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_tk-tm.js b/1.6.6/i18n/angular-locale_tk-tm.js new file mode 100644 index 000000000..e9b4d9eef --- /dev/null +++ b/1.6.6/i18n/angular-locale_tk-tm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u00fdek\u015fenbe", + "du\u015fenbe", + "si\u015fenbe", + "\u00e7ar\u015fenbe", + "pen\u015fenbe", + "anna", + "\u015fenbe" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u00fdanwar", + "fewral", + "mart", + "aprel", + "ma\u00fd", + "i\u00fdun", + "i\u00fdul", + "awgust", + "sent\u00fdabr", + "okt\u00fdabr", + "no\u00fdabr", + "dekabr" + ], + "SHORTDAY": [ + "\u00fdb", + "db", + "sb", + "\u00e7b", + "pb", + "an", + "\u015fb" + ], + "SHORTMONTH": [ + "\u00fdan", + "few", + "mart", + "apr", + "ma\u00fd", + "i\u00fdun", + "i\u00fdul", + "awg", + "sen", + "okt", + "no\u00fd", + "dek" + ], + "STANDALONEMONTH": [ + "\u00fdanwar", + "fewral", + "mart", + "aprel", + "ma\u00fd", + "i\u00fdun", + "i\u00fdul", + "awgust", + "sent\u00fdabr", + "okt\u00fdabr", + "no\u00fdabr", + "dekabr" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "d MMMM y EEEE", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.y HH:mm", + "shortDate": "dd.MM.y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TMT", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "tk-tm", + "localeID": "tk_TM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_tk.js b/1.6.6/i18n/angular-locale_tk.js new file mode 100644 index 000000000..11ab126df --- /dev/null +++ b/1.6.6/i18n/angular-locale_tk.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u00fdek\u015fenbe", + "du\u015fenbe", + "si\u015fenbe", + "\u00e7ar\u015fenbe", + "pen\u015fenbe", + "anna", + "\u015fenbe" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u00fdanwar", + "fewral", + "mart", + "aprel", + "ma\u00fd", + "i\u00fdun", + "i\u00fdul", + "awgust", + "sent\u00fdabr", + "okt\u00fdabr", + "no\u00fdabr", + "dekabr" + ], + "SHORTDAY": [ + "\u00fdb", + "db", + "sb", + "\u00e7b", + "pb", + "an", + "\u015fb" + ], + "SHORTMONTH": [ + "\u00fdan", + "few", + "mart", + "apr", + "ma\u00fd", + "i\u00fdun", + "i\u00fdul", + "awg", + "sen", + "okt", + "no\u00fd", + "dek" + ], + "STANDALONEMONTH": [ + "\u00fdanwar", + "fewral", + "mart", + "aprel", + "ma\u00fd", + "i\u00fdun", + "i\u00fdul", + "awgust", + "sent\u00fdabr", + "okt\u00fdabr", + "no\u00fdabr", + "dekabr" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "d MMMM y EEEE", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.y HH:mm", + "shortDate": "dd.MM.y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TMT", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "tk", + "localeID": "tk", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_tl.js b/1.6.6/i18n/angular-locale_tl.js new file mode 100644 index 000000000..ba7e457b8 --- /dev/null +++ b/1.6.6/i18n/angular-locale_tl.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Linggo", + "Lunes", + "Martes", + "Miyerkules", + "Huwebes", + "Biyernes", + "Sabado" + ], + "ERANAMES": [ + "BC", + "AD" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "Enero", + "Pebrero", + "Marso", + "Abril", + "Mayo", + "Hunyo", + "Hulyo", + "Agosto", + "Setyembre", + "Oktubre", + "Nobyembre", + "Disyembre" + ], + "SHORTDAY": [ + "Lin", + "Lun", + "Mar", + "Miy", + "Huw", + "Biy", + "Sab" + ], + "SHORTMONTH": [ + "Ene", + "Peb", + "Mar", + "Abr", + "May", + "Hun", + "Hul", + "Ago", + "Set", + "Okt", + "Nob", + "Dis" + ], + "STANDALONEMONTH": [ + "Enero", + "Pebrero", + "Marso", + "Abril", + "Mayo", + "Hunyo", + "Hulyo", + "Agosto", + "Setyembre", + "Oktubre", + "Nobyembre", + "Disyembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b1", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "tl", + "localeID": "tl", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && (i == 1 || i == 2 || i == 3) || vf.v == 0 && i % 10 != 4 && i % 10 != 6 && i % 10 != 9 || vf.v != 0 && vf.f % 10 != 4 && vf.f % 10 != 6 && vf.f % 10 != 9) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_to-to.js b/1.6.6/i18n/angular-locale_to-to.js new file mode 100644 index 000000000..aab9a8e2c --- /dev/null +++ b/1.6.6/i18n/angular-locale_to-to.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "hengihengi", + "efiafi" + ], + "DAY": [ + "S\u0101pate", + "M\u014dnite", + "T\u016bsite", + "Pulelulu", + "Tu\u02bbapulelulu", + "Falaite", + "Tokonaki" + ], + "ERANAMES": [ + "ki mu\u02bba", + "ta\u02bbu \u02bbo S\u012bs\u016b" + ], + "ERAS": [ + "KM", + "TS" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "S\u0101nuali", + "F\u0113pueli", + "Ma\u02bbasi", + "\u02bbEpeleli", + "M\u0113", + "Sune", + "Siulai", + "\u02bbAokosi", + "Sepitema", + "\u02bbOkatopa", + "N\u014dvema", + "T\u012bsema" + ], + "SHORTDAY": [ + "S\u0101p", + "M\u014dn", + "T\u016bs", + "Pul", + "Tu\u02bba", + "Fal", + "Tok" + ], + "SHORTMONTH": [ + "S\u0101n", + "F\u0113p", + "Ma\u02bba", + "\u02bbEpe", + "M\u0113", + "Sun", + "Siu", + "\u02bbAok", + "Sep", + "\u02bbOka", + "N\u014dv", + "T\u012bs" + ], + "STANDALONEMONTH": [ + "S\u0101nuali", + "F\u0113pueli", + "Ma\u02bbasi", + "\u02bbEpeleli", + "M\u0113", + "Sune", + "Siulai", + "\u02bbAokosi", + "Sepitema", + "\u02bbOkatopa", + "N\u014dvema", + "T\u012bsema" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "T$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "to-to", + "localeID": "to_TO", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_to.js b/1.6.6/i18n/angular-locale_to.js new file mode 100644 index 000000000..97c89d5f6 --- /dev/null +++ b/1.6.6/i18n/angular-locale_to.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "hengihengi", + "efiafi" + ], + "DAY": [ + "S\u0101pate", + "M\u014dnite", + "T\u016bsite", + "Pulelulu", + "Tu\u02bbapulelulu", + "Falaite", + "Tokonaki" + ], + "ERANAMES": [ + "ki mu\u02bba", + "ta\u02bbu \u02bbo S\u012bs\u016b" + ], + "ERAS": [ + "KM", + "TS" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "S\u0101nuali", + "F\u0113pueli", + "Ma\u02bbasi", + "\u02bbEpeleli", + "M\u0113", + "Sune", + "Siulai", + "\u02bbAokosi", + "Sepitema", + "\u02bbOkatopa", + "N\u014dvema", + "T\u012bsema" + ], + "SHORTDAY": [ + "S\u0101p", + "M\u014dn", + "T\u016bs", + "Pul", + "Tu\u02bba", + "Fal", + "Tok" + ], + "SHORTMONTH": [ + "S\u0101n", + "F\u0113p", + "Ma\u02bba", + "\u02bbEpe", + "M\u0113", + "Sun", + "Siu", + "\u02bbAok", + "Sep", + "\u02bbOka", + "N\u014dv", + "T\u012bs" + ], + "STANDALONEMONTH": [ + "S\u0101nuali", + "F\u0113pueli", + "Ma\u02bbasi", + "\u02bbEpeleli", + "M\u0113", + "Sune", + "Siulai", + "\u02bbAokosi", + "Sepitema", + "\u02bbOkatopa", + "N\u014dvema", + "T\u012bsema" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "T$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "to", + "localeID": "to", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_tr-cy.js b/1.6.6/i18n/angular-locale_tr-cy.js new file mode 100644 index 000000000..017cdea41 --- /dev/null +++ b/1.6.6/i18n/angular-locale_tr-cy.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u00d6\u00d6", + "\u00d6S" + ], + "DAY": [ + "Pazar", + "Pazartesi", + "Sal\u0131", + "\u00c7ar\u015famba", + "Per\u015fembe", + "Cuma", + "Cumartesi" + ], + "ERANAMES": [ + "Milattan \u00d6nce", + "Milattan Sonra" + ], + "ERAS": [ + "M\u00d6", + "MS" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Ocak", + "\u015eubat", + "Mart", + "Nisan", + "May\u0131s", + "Haziran", + "Temmuz", + "A\u011fustos", + "Eyl\u00fcl", + "Ekim", + "Kas\u0131m", + "Aral\u0131k" + ], + "SHORTDAY": [ + "Paz", + "Pzt", + "Sal", + "\u00c7ar", + "Per", + "Cum", + "Cmt" + ], + "SHORTMONTH": [ + "Oca", + "\u015eub", + "Mar", + "Nis", + "May", + "Haz", + "Tem", + "A\u011fu", + "Eyl", + "Eki", + "Kas", + "Ara" + ], + "STANDALONEMONTH": [ + "Ocak", + "\u015eubat", + "Mart", + "Nisan", + "May\u0131s", + "Haziran", + "Temmuz", + "A\u011fustos", + "Eyl\u00fcl", + "Ekim", + "Kas\u0131m", + "Aral\u0131k" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "d MMMM y EEEE", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "d.MM.y h:mm a", + "shortDate": "d.MM.y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "tr-cy", + "localeID": "tr_CY", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_tr-tr.js b/1.6.6/i18n/angular-locale_tr-tr.js new file mode 100644 index 000000000..4aa5f87c1 --- /dev/null +++ b/1.6.6/i18n/angular-locale_tr-tr.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u00d6\u00d6", + "\u00d6S" + ], + "DAY": [ + "Pazar", + "Pazartesi", + "Sal\u0131", + "\u00c7ar\u015famba", + "Per\u015fembe", + "Cuma", + "Cumartesi" + ], + "ERANAMES": [ + "Milattan \u00d6nce", + "Milattan Sonra" + ], + "ERAS": [ + "M\u00d6", + "MS" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Ocak", + "\u015eubat", + "Mart", + "Nisan", + "May\u0131s", + "Haziran", + "Temmuz", + "A\u011fustos", + "Eyl\u00fcl", + "Ekim", + "Kas\u0131m", + "Aral\u0131k" + ], + "SHORTDAY": [ + "Paz", + "Pzt", + "Sal", + "\u00c7ar", + "Per", + "Cum", + "Cmt" + ], + "SHORTMONTH": [ + "Oca", + "\u015eub", + "Mar", + "Nis", + "May", + "Haz", + "Tem", + "A\u011fu", + "Eyl", + "Eki", + "Kas", + "Ara" + ], + "STANDALONEMONTH": [ + "Ocak", + "\u015eubat", + "Mart", + "Nisan", + "May\u0131s", + "Haziran", + "Temmuz", + "A\u011fustos", + "Eyl\u00fcl", + "Ekim", + "Kas\u0131m", + "Aral\u0131k" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "d MMMM y EEEE", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d.MM.y HH:mm", + "shortDate": "d.MM.y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TL", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "tr-tr", + "localeID": "tr_TR", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_tr.js b/1.6.6/i18n/angular-locale_tr.js new file mode 100644 index 000000000..743a70ae5 --- /dev/null +++ b/1.6.6/i18n/angular-locale_tr.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u00d6\u00d6", + "\u00d6S" + ], + "DAY": [ + "Pazar", + "Pazartesi", + "Sal\u0131", + "\u00c7ar\u015famba", + "Per\u015fembe", + "Cuma", + "Cumartesi" + ], + "ERANAMES": [ + "Milattan \u00d6nce", + "Milattan Sonra" + ], + "ERAS": [ + "M\u00d6", + "MS" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Ocak", + "\u015eubat", + "Mart", + "Nisan", + "May\u0131s", + "Haziran", + "Temmuz", + "A\u011fustos", + "Eyl\u00fcl", + "Ekim", + "Kas\u0131m", + "Aral\u0131k" + ], + "SHORTDAY": [ + "Paz", + "Pzt", + "Sal", + "\u00c7ar", + "Per", + "Cum", + "Cmt" + ], + "SHORTMONTH": [ + "Oca", + "\u015eub", + "Mar", + "Nis", + "May", + "Haz", + "Tem", + "A\u011fu", + "Eyl", + "Eki", + "Kas", + "Ara" + ], + "STANDALONEMONTH": [ + "Ocak", + "\u015eubat", + "Mart", + "Nisan", + "May\u0131s", + "Haziran", + "Temmuz", + "A\u011fustos", + "Eyl\u00fcl", + "Ekim", + "Kas\u0131m", + "Aral\u0131k" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "d MMMM y EEEE", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d.MM.y HH:mm", + "shortDate": "d.MM.y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TL", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "tr", + "localeID": "tr", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_twq-ne.js b/1.6.6/i18n/angular-locale_twq-ne.js new file mode 100644 index 000000000..71d17fce5 --- /dev/null +++ b/1.6.6/i18n/angular-locale_twq-ne.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Subbaahi", + "Zaarikay b" + ], + "DAY": [ + "Alhadi", + "Atinni", + "Atalaata", + "Alarba", + "Alhamiisa", + "Alzuma", + "Asibti" + ], + "ERANAMES": [ + "Isaa jine", + "Isaa zamanoo" + ], + "ERAS": [ + "IJ", + "IZ" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u017danwiye", + "Feewiriye", + "Marsi", + "Awiril", + "Me", + "\u017duwe\u014b", + "\u017duyye", + "Ut", + "Sektanbur", + "Oktoobur", + "Noowanbur", + "Deesanbur" + ], + "SHORTDAY": [ + "Alh", + "Ati", + "Ata", + "Ala", + "Alm", + "Alz", + "Asi" + ], + "SHORTMONTH": [ + "\u017dan", + "Fee", + "Mar", + "Awi", + "Me", + "\u017duw", + "\u017duy", + "Ut", + "Sek", + "Okt", + "Noo", + "Dee" + ], + "STANDALONEMONTH": [ + "\u017danwiye", + "Feewiriye", + "Marsi", + "Awiril", + "Me", + "\u017duwe\u014b", + "\u017duyye", + "Ut", + "Sektanbur", + "Oktoobur", + "Noowanbur", + "Deesanbur" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ".", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "twq-ne", + "localeID": "twq_NE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_twq.js b/1.6.6/i18n/angular-locale_twq.js new file mode 100644 index 000000000..8fb664e6a --- /dev/null +++ b/1.6.6/i18n/angular-locale_twq.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Subbaahi", + "Zaarikay b" + ], + "DAY": [ + "Alhadi", + "Atinni", + "Atalaata", + "Alarba", + "Alhamiisa", + "Alzuma", + "Asibti" + ], + "ERANAMES": [ + "Isaa jine", + "Isaa zamanoo" + ], + "ERAS": [ + "IJ", + "IZ" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u017danwiye", + "Feewiriye", + "Marsi", + "Awiril", + "Me", + "\u017duwe\u014b", + "\u017duyye", + "Ut", + "Sektanbur", + "Oktoobur", + "Noowanbur", + "Deesanbur" + ], + "SHORTDAY": [ + "Alh", + "Ati", + "Ata", + "Ala", + "Alm", + "Alz", + "Asi" + ], + "SHORTMONTH": [ + "\u017dan", + "Fee", + "Mar", + "Awi", + "Me", + "\u017duw", + "\u017duy", + "Ut", + "Sek", + "Okt", + "Noo", + "Dee" + ], + "STANDALONEMONTH": [ + "\u017danwiye", + "Feewiriye", + "Marsi", + "Awiril", + "Me", + "\u017duwe\u014b", + "\u017duyye", + "Ut", + "Sektanbur", + "Oktoobur", + "Noowanbur", + "Deesanbur" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ".", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "twq", + "localeID": "twq", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_tzm-ma.js b/1.6.6/i18n/angular-locale_tzm-ma.js new file mode 100644 index 000000000..c4b648f84 --- /dev/null +++ b/1.6.6/i18n/angular-locale_tzm-ma.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Zdat azal", + "\u1e0ceffir aza" + ], + "DAY": [ + "Asamas", + "Aynas", + "Asinas", + "Akras", + "Akwas", + "Asimwas", + "Asi\u1e0dyas" + ], + "ERANAMES": [ + "Zdat \u0190isa (TA\u0194)", + "\u1e0ceffir \u0190isa (TA\u0194)" + ], + "ERAS": [ + "Z\u0190", + "\u1e0c\u0190" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "Yennayer", + "Yebrayer", + "Mars", + "Ibrir", + "Mayyu", + "Yunyu", + "Yulyuz", + "\u0194uct", + "Cutanbir", + "K\u1e6duber", + "Nwanbir", + "Dujanbir" + ], + "SHORTDAY": [ + "Asa", + "Ayn", + "Asn", + "Akr", + "Akw", + "Asm", + "As\u1e0d" + ], + "SHORTMONTH": [ + "Yen", + "Yeb", + "Mar", + "Ibr", + "May", + "Yun", + "Yul", + "\u0194uc", + "Cut", + "K\u1e6du", + "Nwa", + "Duj" + ], + "STANDALONEMONTH": [ + "Yennayer", + "Yebrayer", + "Mars", + "Ibrir", + "Mayyu", + "Yunyu", + "Yulyuz", + "\u0194uct", + "Cutanbir", + "K\u1e6duber", + "Nwanbir", + "Dujanbir" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "dh", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "tzm-ma", + "localeID": "tzm_MA", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_tzm.js b/1.6.6/i18n/angular-locale_tzm.js new file mode 100644 index 000000000..4786c033c --- /dev/null +++ b/1.6.6/i18n/angular-locale_tzm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Zdat azal", + "\u1e0ceffir aza" + ], + "DAY": [ + "Asamas", + "Aynas", + "Asinas", + "Akras", + "Akwas", + "Asimwas", + "Asi\u1e0dyas" + ], + "ERANAMES": [ + "Zdat \u0190isa (TA\u0194)", + "\u1e0ceffir \u0190isa (TA\u0194)" + ], + "ERAS": [ + "Z\u0190", + "\u1e0c\u0190" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "Yennayer", + "Yebrayer", + "Mars", + "Ibrir", + "Mayyu", + "Yunyu", + "Yulyuz", + "\u0194uct", + "Cutanbir", + "K\u1e6duber", + "Nwanbir", + "Dujanbir" + ], + "SHORTDAY": [ + "Asa", + "Ayn", + "Asn", + "Akr", + "Akw", + "Asm", + "As\u1e0d" + ], + "SHORTMONTH": [ + "Yen", + "Yeb", + "Mar", + "Ibr", + "May", + "Yun", + "Yul", + "\u0194uc", + "Cut", + "K\u1e6du", + "Nwa", + "Duj" + ], + "STANDALONEMONTH": [ + "Yennayer", + "Yebrayer", + "Mars", + "Ibrir", + "Mayyu", + "Yunyu", + "Yulyuz", + "\u0194uct", + "Cutanbir", + "K\u1e6duber", + "Nwanbir", + "Dujanbir" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "dh", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "tzm", + "localeID": "tzm", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ug-cn.js b/1.6.6/i18n/angular-locale_ug-cn.js new file mode 100644 index 000000000..ed3eb01c3 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ug-cn.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646", + "\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646" + ], + "DAY": [ + "\u064a\u06d5\u0643\u0634\u06d5\u0646\u0628\u06d5", + "\u062f\u06c8\u0634\u06d5\u0646\u0628\u06d5", + "\u0633\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5", + "\u0686\u0627\u0631\u0634\u06d5\u0646\u0628\u06d5", + "\u067e\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5", + "\u062c\u06c8\u0645\u06d5", + "\u0634\u06d5\u0646\u0628\u06d5" + ], + "ERANAMES": [ + "\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5\u062f\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646", + "\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5" + ], + "ERAS": [ + "BCE", + "\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u064a\u0627\u0646\u06cb\u0627\u0631", + "\u0641\u06d0\u06cb\u0631\u0627\u0644", + "\u0645\u0627\u0631\u062a", + "\u0626\u0627\u067e\u0631\u06d0\u0644", + "\u0645\u0627\u064a", + "\u0626\u0649\u064a\u06c7\u0646", + "\u0626\u0649\u064a\u06c7\u0644", + "\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a", + "\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631", + "\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631", + "\u0646\u0648\u064a\u0627\u0628\u0649\u0631", + "\u062f\u06d0\u0643\u0627\u0628\u0649\u0631" + ], + "SHORTDAY": [ + "\u064a\u06d5", + "\u062f\u06c8", + "\u0633\u06d5", + "\u0686\u0627", + "\u067e\u06d5", + "\u062c\u06c8", + "\u0634\u06d5" + ], + "SHORTMONTH": [ + "\u064a\u0627\u0646\u06cb\u0627\u0631", + "\u0641\u06d0\u06cb\u0631\u0627\u0644", + "\u0645\u0627\u0631\u062a", + "\u0626\u0627\u067e\u0631\u06d0\u0644", + "\u0645\u0627\u064a", + "\u0626\u0649\u064a\u06c7\u0646", + "\u0626\u0649\u064a\u06c7\u0644", + "\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a", + "\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631", + "\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631", + "\u0646\u0648\u064a\u0627\u0628\u0649\u0631", + "\u062f\u06d0\u0643\u0627\u0628\u0649\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0627\u0646\u06cb\u0627\u0631", + "\u0641\u06d0\u06cb\u0631\u0627\u0644", + "\u0645\u0627\u0631\u062a", + "\u0626\u0627\u067e\u0631\u06d0\u0644", + "\u0645\u0627\u064a", + "\u0626\u0649\u064a\u06c7\u0646", + "\u0626\u0649\u064a\u06c7\u0644", + "\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a", + "\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631", + "\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631", + "\u0646\u0648\u064a\u0627\u0628\u0649\u0631", + "\u062f\u06d0\u0643\u0627\u0628\u0649\u0631" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y d-MMMM\u060c EEEE", + "longDate": "d-MMMM\u060c y", + "medium": "d-MMM\u060c y h:mm:ss a", + "mediumDate": "d-MMM\u060c y", + "mediumTime": "h:mm:ss a", + "short": "y-MM-dd h:mm a", + "shortDate": "y-MM-dd", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a5", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ug-cn", + "localeID": "ug_CN", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ug.js b/1.6.6/i18n/angular-locale_ug.js new file mode 100644 index 000000000..735933f7f --- /dev/null +++ b/1.6.6/i18n/angular-locale_ug.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646", + "\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646" + ], + "DAY": [ + "\u064a\u06d5\u0643\u0634\u06d5\u0646\u0628\u06d5", + "\u062f\u06c8\u0634\u06d5\u0646\u0628\u06d5", + "\u0633\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5", + "\u0686\u0627\u0631\u0634\u06d5\u0646\u0628\u06d5", + "\u067e\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5", + "\u062c\u06c8\u0645\u06d5", + "\u0634\u06d5\u0646\u0628\u06d5" + ], + "ERANAMES": [ + "\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5\u062f\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646", + "\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5" + ], + "ERAS": [ + "BCE", + "\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u064a\u0627\u0646\u06cb\u0627\u0631", + "\u0641\u06d0\u06cb\u0631\u0627\u0644", + "\u0645\u0627\u0631\u062a", + "\u0626\u0627\u067e\u0631\u06d0\u0644", + "\u0645\u0627\u064a", + "\u0626\u0649\u064a\u06c7\u0646", + "\u0626\u0649\u064a\u06c7\u0644", + "\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a", + "\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631", + "\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631", + "\u0646\u0648\u064a\u0627\u0628\u0649\u0631", + "\u062f\u06d0\u0643\u0627\u0628\u0649\u0631" + ], + "SHORTDAY": [ + "\u064a\u06d5", + "\u062f\u06c8", + "\u0633\u06d5", + "\u0686\u0627", + "\u067e\u06d5", + "\u062c\u06c8", + "\u0634\u06d5" + ], + "SHORTMONTH": [ + "\u064a\u0627\u0646\u06cb\u0627\u0631", + "\u0641\u06d0\u06cb\u0631\u0627\u0644", + "\u0645\u0627\u0631\u062a", + "\u0626\u0627\u067e\u0631\u06d0\u0644", + "\u0645\u0627\u064a", + "\u0626\u0649\u064a\u06c7\u0646", + "\u0626\u0649\u064a\u06c7\u0644", + "\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a", + "\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631", + "\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631", + "\u0646\u0648\u064a\u0627\u0628\u0649\u0631", + "\u062f\u06d0\u0643\u0627\u0628\u0649\u0631" + ], + "STANDALONEMONTH": [ + "\u064a\u0627\u0646\u06cb\u0627\u0631", + "\u0641\u06d0\u06cb\u0631\u0627\u0644", + "\u0645\u0627\u0631\u062a", + "\u0626\u0627\u067e\u0631\u06d0\u0644", + "\u0645\u0627\u064a", + "\u0626\u0649\u064a\u06c7\u0646", + "\u0626\u0649\u064a\u06c7\u0644", + "\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a", + "\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631", + "\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631", + "\u0646\u0648\u064a\u0627\u0628\u0649\u0631", + "\u062f\u06d0\u0643\u0627\u0628\u0649\u0631" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y d-MMMM\u060c EEEE", + "longDate": "d-MMMM\u060c y", + "medium": "d-MMM\u060c y h:mm:ss a", + "mediumDate": "d-MMM\u060c y", + "mediumTime": "h:mm:ss a", + "short": "y-MM-dd h:mm a", + "shortDate": "y-MM-dd", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a5", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "ug", + "localeID": "ug", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_uk-ua.js b/1.6.6/i18n/angular-locale_uk-ua.js new file mode 100644 index 000000000..2491667aa --- /dev/null +++ b/1.6.6/i18n/angular-locale_uk-ua.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0434\u043f", + "\u043f\u043f" + ], + "DAY": [ + "\u043d\u0435\u0434\u0456\u043b\u044f", + "\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a", + "\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a", + "\u0441\u0435\u0440\u0435\u0434\u0430", + "\u0447\u0435\u0442\u0432\u0435\u0440", + "\u043f\u02bc\u044f\u0442\u043d\u0438\u0446\u044f", + "\u0441\u0443\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u0434\u043e \u043d\u0430\u0448\u043e\u0457 \u0435\u0440\u0438", + "\u043d\u0430\u0448\u043e\u0457 \u0435\u0440\u0438" + ], + "ERAS": [ + "\u0434\u043e \u043d. \u0435.", + "\u043d. \u0435." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0441\u0456\u0447\u043d\u044f", + "\u043b\u044e\u0442\u043e\u0433\u043e", + "\u0431\u0435\u0440\u0435\u0437\u043d\u044f", + "\u043a\u0432\u0456\u0442\u043d\u044f", + "\u0442\u0440\u0430\u0432\u043d\u044f", + "\u0447\u0435\u0440\u0432\u043d\u044f", + "\u043b\u0438\u043f\u043d\u044f", + "\u0441\u0435\u0440\u043f\u043d\u044f", + "\u0432\u0435\u0440\u0435\u0441\u043d\u044f", + "\u0436\u043e\u0432\u0442\u043d\u044f", + "\u043b\u0438\u0441\u0442\u043e\u043f\u0430\u0434\u0430", + "\u0433\u0440\u0443\u0434\u043d\u044f" + ], + "SHORTDAY": [ + "\u043d\u0434", + "\u043f\u043d", + "\u0432\u0442", + "\u0441\u0440", + "\u0447\u0442", + "\u043f\u0442", + "\u0441\u0431" + ], + "SHORTMONTH": [ + "\u0441\u0456\u0447.", + "\u043b\u044e\u0442.", + "\u0431\u0435\u0440.", + "\u043a\u0432\u0456\u0442.", + "\u0442\u0440\u0430\u0432.", + "\u0447\u0435\u0440\u0432.", + "\u043b\u0438\u043f.", + "\u0441\u0435\u0440\u043f.", + "\u0432\u0435\u0440.", + "\u0436\u043e\u0432\u0442.", + "\u043b\u0438\u0441\u0442.", + "\u0433\u0440\u0443\u0434." + ], + "STANDALONEMONTH": [ + "\u0441\u0456\u0447\u0435\u043d\u044c", + "\u043b\u044e\u0442\u0438\u0439", + "\u0431\u0435\u0440\u0435\u0437\u0435\u043d\u044c", + "\u043a\u0432\u0456\u0442\u0435\u043d\u044c", + "\u0442\u0440\u0430\u0432\u0435\u043d\u044c", + "\u0447\u0435\u0440\u0432\u0435\u043d\u044c", + "\u043b\u0438\u043f\u0435\u043d\u044c", + "\u0441\u0435\u0440\u043f\u0435\u043d\u044c", + "\u0432\u0435\u0440\u0435\u0441\u0435\u043d\u044c", + "\u0436\u043e\u0432\u0442\u0435\u043d\u044c", + "\u043b\u0438\u0441\u0442\u043e\u043f\u0430\u0434", + "\u0433\u0440\u0443\u0434\u0435\u043d\u044c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y '\u0440'.", + "longDate": "d MMMM y '\u0440'.", + "medium": "d MMM y '\u0440'. HH:mm:ss", + "mediumDate": "d MMM y '\u0440'.", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u0433\u0440\u043d.", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "uk-ua", + "localeID": "uk_UA", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_uk.js b/1.6.6/i18n/angular-locale_uk.js new file mode 100644 index 000000000..5b460d6ce --- /dev/null +++ b/1.6.6/i18n/angular-locale_uk.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0434\u043f", + "\u043f\u043f" + ], + "DAY": [ + "\u043d\u0435\u0434\u0456\u043b\u044f", + "\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a", + "\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a", + "\u0441\u0435\u0440\u0435\u0434\u0430", + "\u0447\u0435\u0442\u0432\u0435\u0440", + "\u043f\u02bc\u044f\u0442\u043d\u0438\u0446\u044f", + "\u0441\u0443\u0431\u043e\u0442\u0430" + ], + "ERANAMES": [ + "\u0434\u043e \u043d\u0430\u0448\u043e\u0457 \u0435\u0440\u0438", + "\u043d\u0430\u0448\u043e\u0457 \u0435\u0440\u0438" + ], + "ERAS": [ + "\u0434\u043e \u043d. \u0435.", + "\u043d. \u0435." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u0441\u0456\u0447\u043d\u044f", + "\u043b\u044e\u0442\u043e\u0433\u043e", + "\u0431\u0435\u0440\u0435\u0437\u043d\u044f", + "\u043a\u0432\u0456\u0442\u043d\u044f", + "\u0442\u0440\u0430\u0432\u043d\u044f", + "\u0447\u0435\u0440\u0432\u043d\u044f", + "\u043b\u0438\u043f\u043d\u044f", + "\u0441\u0435\u0440\u043f\u043d\u044f", + "\u0432\u0435\u0440\u0435\u0441\u043d\u044f", + "\u0436\u043e\u0432\u0442\u043d\u044f", + "\u043b\u0438\u0441\u0442\u043e\u043f\u0430\u0434\u0430", + "\u0433\u0440\u0443\u0434\u043d\u044f" + ], + "SHORTDAY": [ + "\u043d\u0434", + "\u043f\u043d", + "\u0432\u0442", + "\u0441\u0440", + "\u0447\u0442", + "\u043f\u0442", + "\u0441\u0431" + ], + "SHORTMONTH": [ + "\u0441\u0456\u0447.", + "\u043b\u044e\u0442.", + "\u0431\u0435\u0440.", + "\u043a\u0432\u0456\u0442.", + "\u0442\u0440\u0430\u0432.", + "\u0447\u0435\u0440\u0432.", + "\u043b\u0438\u043f.", + "\u0441\u0435\u0440\u043f.", + "\u0432\u0435\u0440.", + "\u0436\u043e\u0432\u0442.", + "\u043b\u0438\u0441\u0442.", + "\u0433\u0440\u0443\u0434." + ], + "STANDALONEMONTH": [ + "\u0441\u0456\u0447\u0435\u043d\u044c", + "\u043b\u044e\u0442\u0438\u0439", + "\u0431\u0435\u0440\u0435\u0437\u0435\u043d\u044c", + "\u043a\u0432\u0456\u0442\u0435\u043d\u044c", + "\u0442\u0440\u0430\u0432\u0435\u043d\u044c", + "\u0447\u0435\u0440\u0432\u0435\u043d\u044c", + "\u043b\u0438\u043f\u0435\u043d\u044c", + "\u0441\u0435\u0440\u043f\u0435\u043d\u044c", + "\u0432\u0435\u0440\u0435\u0441\u0435\u043d\u044c", + "\u0436\u043e\u0432\u0442\u0435\u043d\u044c", + "\u043b\u0438\u0441\u0442\u043e\u043f\u0430\u0434", + "\u0433\u0440\u0443\u0434\u0435\u043d\u044c" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y '\u0440'.", + "longDate": "d MMMM y '\u0440'.", + "medium": "d MMM y '\u0440'. HH:mm:ss", + "mediumDate": "d MMM y '\u0440'.", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u0433\u0440\u043d.", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "uk", + "localeID": "uk", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ur-in.js b/1.6.6/i18n/angular-locale_ur-in.js new file mode 100644 index 000000000..4e7b31eec --- /dev/null +++ b/1.6.6/i18n/angular-locale_ur-in.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u0627\u062a\u0648\u0627\u0631", + "\u067e\u06cc\u0631", + "\u0645\u0646\u06af\u0644", + "\u0628\u062f\u06be", + "\u062c\u0645\u0639\u0631\u0627\u062a", + "\u062c\u0645\u0639\u06c1", + "\u06c1\u0641\u062a\u06c1" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0645\u0633\u06cc\u062d", + "\u0639\u06cc\u0633\u0648\u06cc" + ], + "ERAS": [ + "\u0642\u0628\u0644 \u0645\u0633\u06cc\u062d", + "\u0639\u06cc\u0633\u0648\u06cc" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u062c\u0646\u0648\u0631\u06cc", + "\u0641\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u0626\u06cc", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u0626\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u062a\u0648\u0627\u0631", + "\u067e\u06cc\u0631", + "\u0645\u0646\u06af\u0644", + "\u0628\u062f\u06be", + "\u062c\u0645\u0639\u0631\u0627\u062a", + "\u062c\u0645\u0639\u06c1", + "\u06c1\u0641\u062a\u06c1" + ], + "SHORTMONTH": [ + "\u062c\u0646\u0648\u0631\u06cc", + "\u0641\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u0626\u06cc", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u0626\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u062c\u0646\u0648\u0631\u06cc", + "\u0641\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u0626\u06cc", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u0626\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 6, + 6 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "y MMM d h:mm:ss a", + "mediumDate": "y MMM d", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ur-in", + "localeID": "ur_IN", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ur-pk.js b/1.6.6/i18n/angular-locale_ur-pk.js new file mode 100644 index 000000000..6e07ddb00 --- /dev/null +++ b/1.6.6/i18n/angular-locale_ur-pk.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u0627\u062a\u0648\u0627\u0631", + "\u0633\u0648\u0645\u0648\u0627\u0631", + "\u0645\u0646\u06af\u0644", + "\u0628\u062f\u06be", + "\u062c\u0645\u0639\u0631\u0627\u062a", + "\u062c\u0645\u0639\u06c1", + "\u06c1\u0641\u062a\u06c1" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0645\u0633\u06cc\u062d", + "\u0639\u06cc\u0633\u0648\u06cc" + ], + "ERAS": [ + "\u0642\u0628\u0644 \u0645\u0633\u06cc\u062d", + "\u0639\u06cc\u0633\u0648\u06cc" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u062c\u0646\u0648\u0631\u06cc", + "\u0641\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u0626\u06cc", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u0626\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u062a\u0648\u0627\u0631", + "\u0633\u0648\u0645\u0648\u0627\u0631", + "\u0645\u0646\u06af\u0644", + "\u0628\u062f\u06be", + "\u062c\u0645\u0639\u0631\u0627\u062a", + "\u062c\u0645\u0639\u06c1", + "\u06c1\u0641\u062a\u06c1" + ], + "SHORTMONTH": [ + "\u062c\u0646\u0648\u0631\u06cc", + "\u0641\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u0626\u06cc", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u0626\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u062c\u0646\u0648\u0631\u06cc", + "\u0641\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u0626\u06cc", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u0626\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "y MMM d h:mm:ss a", + "mediumDate": "y MMM d", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rs", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ur-pk", + "localeID": "ur_PK", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_ur.js b/1.6.6/i18n/angular-locale_ur.js new file mode 100644 index 000000000..2f866e8ed --- /dev/null +++ b/1.6.6/i18n/angular-locale_ur.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u0627\u062a\u0648\u0627\u0631", + "\u0633\u0648\u0645\u0648\u0627\u0631", + "\u0645\u0646\u06af\u0644", + "\u0628\u062f\u06be", + "\u062c\u0645\u0639\u0631\u0627\u062a", + "\u062c\u0645\u0639\u06c1", + "\u06c1\u0641\u062a\u06c1" + ], + "ERANAMES": [ + "\u0642\u0628\u0644 \u0645\u0633\u06cc\u062d", + "\u0639\u06cc\u0633\u0648\u06cc" + ], + "ERAS": [ + "\u0642\u0628\u0644 \u0645\u0633\u06cc\u062d", + "\u0639\u06cc\u0633\u0648\u06cc" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u062c\u0646\u0648\u0631\u06cc", + "\u0641\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u0626\u06cc", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u0626\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u0627\u062a\u0648\u0627\u0631", + "\u0633\u0648\u0645\u0648\u0627\u0631", + "\u0645\u0646\u06af\u0644", + "\u0628\u062f\u06be", + "\u062c\u0645\u0639\u0631\u0627\u062a", + "\u062c\u0645\u0639\u06c1", + "\u06c1\u0641\u062a\u06c1" + ], + "SHORTMONTH": [ + "\u062c\u0646\u0648\u0631\u06cc", + "\u0641\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u0626\u06cc", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u0626\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "STANDALONEMONTH": [ + "\u062c\u0646\u0648\u0631\u06cc", + "\u0641\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u0626\u06cc", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u0626\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE\u060c d MMMM\u060c y", + "longDate": "d MMMM\u060c y", + "medium": "y MMM d h:mm:ss a", + "mediumDate": "y MMM d", + "mediumTime": "h:mm:ss a", + "short": "d/M/yy h:mm a", + "shortDate": "d/M/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Rs", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "ur", + "localeID": "ur", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_uz-arab-af.js b/1.6.6/i18n/angular-locale_uz-arab-af.js new file mode 100644 index 000000000..3b7ea7abc --- /dev/null +++ b/1.6.6/i18n/angular-locale_uz-arab-af.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u06cc\u06a9\u0634\u0646\u0628\u0647", + "\u062f\u0648\u0634\u0646\u0628\u0647", + "\u0633\u0647\u200c\u0634\u0646\u0628\u0647", + "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647", + "\u067e\u0646\u062c\u0634\u0646\u0628\u0647", + "\u062c\u0645\u0639\u0647", + "\u0634\u0646\u0628\u0647" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u062c\u0646\u0648\u0631\u06cc", + "\u0641\u0628\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u06cc", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u067e\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u06cc.", + "\u062f.", + "\u0633.", + "\u0686.", + "\u067e.", + "\u062c.", + "\u0634." + ], + "SHORTMONTH": [ + "\u062c\u0646\u0648", + "\u0641\u0628\u0631", + "\u0645\u0627\u0631", + "\u0627\u067e\u0631", + "\u0645\u06cc", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644", + "\u0627\u06af\u0633", + "\u0633\u067e\u062a", + "\u0627\u06a9\u062a", + "\u0646\u0648\u0645", + "\u062f\u0633\u0645" + ], + "STANDALONEMONTH": [ + "\u062c\u0646\u0648\u0631\u06cc", + "\u0641\u0628\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u06cc", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u067e\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 3, + 4 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Af.", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "uz-arab-af", + "localeID": "uz_Arab_AF", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_uz-arab.js b/1.6.6/i18n/angular-locale_uz-arab.js new file mode 100644 index 000000000..0246c2096 --- /dev/null +++ b/1.6.6/i18n/angular-locale_uz-arab.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\u06cc\u06a9\u0634\u0646\u0628\u0647", + "\u062f\u0648\u0634\u0646\u0628\u0647", + "\u0633\u0647\u200c\u0634\u0646\u0628\u0647", + "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647", + "\u067e\u0646\u062c\u0634\u0646\u0628\u0647", + "\u062c\u0645\u0639\u0647", + "\u0634\u0646\u0628\u0647" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u062c\u0646\u0648\u0631\u06cc", + "\u0641\u0628\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u06cc", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u067e\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "SHORTDAY": [ + "\u06cc.", + "\u062f.", + "\u0633.", + "\u0686.", + "\u067e.", + "\u062c.", + "\u0634." + ], + "SHORTMONTH": [ + "\u062c\u0646\u0648", + "\u0641\u0628\u0631", + "\u0645\u0627\u0631", + "\u0627\u067e\u0631", + "\u0645\u06cc", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644", + "\u0627\u06af\u0633", + "\u0633\u067e\u062a", + "\u0627\u06a9\u062a", + "\u0646\u0648\u0645", + "\u062f\u0633\u0645" + ], + "STANDALONEMONTH": [ + "\u062c\u0646\u0648\u0631\u06cc", + "\u0641\u0628\u0631\u0648\u0631\u06cc", + "\u0645\u0627\u0631\u0686", + "\u0627\u067e\u0631\u06cc\u0644", + "\u0645\u06cc", + "\u062c\u0648\u0646", + "\u062c\u0648\u0644\u0627\u06cc", + "\u0627\u06af\u0633\u062a", + "\u0633\u067e\u062a\u0645\u0628\u0631", + "\u0627\u06a9\u062a\u0648\u0628\u0631", + "\u0646\u0648\u0645\u0628\u0631", + "\u062f\u0633\u0645\u0628\u0631" + ], + "WEEKENDRANGE": [ + 3, + 4 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "Af.", + "DECIMAL_SEP": "\u066b", + "GROUP_SEP": "\u066c", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "uz-arab", + "localeID": "uz_Arab", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_uz-cyrl-uz.js b/1.6.6/i18n/angular-locale_uz-cyrl-uz.js new file mode 100644 index 000000000..d1723c814 --- /dev/null +++ b/1.6.6/i18n/angular-locale_uz-cyrl-uz.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0422\u041e", + "\u0422\u041a" + ], + "DAY": [ + "\u044f\u043a\u0448\u0430\u043d\u0431\u0430", + "\u0434\u0443\u0448\u0430\u043d\u0431\u0430", + "\u0441\u0435\u0448\u0430\u043d\u0431\u0430", + "\u0447\u043e\u0440\u0448\u0430\u043d\u0431\u0430", + "\u043f\u0430\u0439\u0448\u0430\u043d\u0431\u0430", + "\u0436\u0443\u043c\u0430", + "\u0448\u0430\u043d\u0431\u0430" + ], + "ERANAMES": [ + "\u043c\u0438\u043b\u043e\u0434\u0434\u0430\u043d \u0430\u0432\u0432\u0430\u043b\u0433\u0438", + "\u043c\u0438\u043b\u043e\u0434\u0438\u0439" + ], + "ERAS": [ + "\u043c.\u0430.", + "\u043c\u0438\u043b\u043e\u0434\u0438\u0439" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u044f\u043d\u0432\u0430\u0440", + "\u0444\u0435\u0432\u0440\u0430\u043b", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0435\u043b", + "\u043c\u0430\u0439", + "\u0438\u044e\u043d", + "\u0438\u044e\u043b", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440", + "\u043e\u043a\u0442\u044f\u0431\u0440", + "\u043d\u043e\u044f\u0431\u0440", + "\u0434\u0435\u043a\u0430\u0431\u0440" + ], + "SHORTDAY": [ + "\u044f\u043a\u0448", + "\u0434\u0443\u0448", + "\u0441\u0435\u0448", + "\u0447\u043e\u0440", + "\u043f\u0430\u0439", + "\u0436\u0443\u043c", + "\u0448\u0430\u043d" + ], + "SHORTMONTH": [ + "\u044f\u043d\u0432", + "\u0444\u0435\u0432", + "\u043c\u0430\u0440", + "\u0430\u043f\u0440", + "\u043c\u0430\u0439", + "\u0438\u044e\u043d", + "\u0438\u044e\u043b", + "\u0430\u0432\u0433", + "\u0441\u0435\u043d", + "\u043e\u043a\u0442", + "\u043d\u043e\u044f", + "\u0434\u0435\u043a" + ], + "STANDALONEMONTH": [ + "\u042f\u043d\u0432\u0430\u0440", + "\u0424\u0435\u0432\u0440\u0430\u043b", + "\u041c\u0430\u0440\u0442", + "\u0410\u043f\u0440\u0435\u043b", + "\u041c\u0430\u0439", + "\u0418\u044e\u043d", + "\u0418\u044e\u043b", + "\u0410\u0432\u0433\u0443\u0441\u0442", + "\u0421\u0435\u043d\u0442\u044f\u0431\u0440", + "\u041e\u043a\u0442\u044f\u0431\u0440", + "\u041d\u043e\u044f\u0431\u0440", + "\u0414\u0435\u043a\u0430\u0431\u0440" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "so\u02bcm", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "uz-cyrl-uz", + "localeID": "uz_Cyrl_UZ", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_uz-cyrl.js b/1.6.6/i18n/angular-locale_uz-cyrl.js new file mode 100644 index 000000000..e3cf1744a --- /dev/null +++ b/1.6.6/i18n/angular-locale_uz-cyrl.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u0422\u041e", + "\u0422\u041a" + ], + "DAY": [ + "\u044f\u043a\u0448\u0430\u043d\u0431\u0430", + "\u0434\u0443\u0448\u0430\u043d\u0431\u0430", + "\u0441\u0435\u0448\u0430\u043d\u0431\u0430", + "\u0447\u043e\u0440\u0448\u0430\u043d\u0431\u0430", + "\u043f\u0430\u0439\u0448\u0430\u043d\u0431\u0430", + "\u0436\u0443\u043c\u0430", + "\u0448\u0430\u043d\u0431\u0430" + ], + "ERANAMES": [ + "\u043c\u0438\u043b\u043e\u0434\u0434\u0430\u043d \u0430\u0432\u0432\u0430\u043b\u0433\u0438", + "\u043c\u0438\u043b\u043e\u0434\u0438\u0439" + ], + "ERAS": [ + "\u043c.\u0430.", + "\u043c\u0438\u043b\u043e\u0434\u0438\u0439" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u044f\u043d\u0432\u0430\u0440", + "\u0444\u0435\u0432\u0440\u0430\u043b", + "\u043c\u0430\u0440\u0442", + "\u0430\u043f\u0440\u0435\u043b", + "\u043c\u0430\u0439", + "\u0438\u044e\u043d", + "\u0438\u044e\u043b", + "\u0430\u0432\u0433\u0443\u0441\u0442", + "\u0441\u0435\u043d\u0442\u044f\u0431\u0440", + "\u043e\u043a\u0442\u044f\u0431\u0440", + "\u043d\u043e\u044f\u0431\u0440", + "\u0434\u0435\u043a\u0430\u0431\u0440" + ], + "SHORTDAY": [ + "\u044f\u043a\u0448", + "\u0434\u0443\u0448", + "\u0441\u0435\u0448", + "\u0447\u043e\u0440", + "\u043f\u0430\u0439", + "\u0436\u0443\u043c", + "\u0448\u0430\u043d" + ], + "SHORTMONTH": [ + "\u044f\u043d\u0432", + "\u0444\u0435\u0432", + "\u043c\u0430\u0440", + "\u0430\u043f\u0440", + "\u043c\u0430\u0439", + "\u0438\u044e\u043d", + "\u0438\u044e\u043b", + "\u0430\u0432\u0433", + "\u0441\u0435\u043d", + "\u043e\u043a\u0442", + "\u043d\u043e\u044f", + "\u0434\u0435\u043a" + ], + "STANDALONEMONTH": [ + "\u042f\u043d\u0432\u0430\u0440", + "\u0424\u0435\u0432\u0440\u0430\u043b", + "\u041c\u0430\u0440\u0442", + "\u0410\u043f\u0440\u0435\u043b", + "\u041c\u0430\u0439", + "\u0418\u044e\u043d", + "\u0418\u044e\u043b", + "\u0410\u0432\u0433\u0443\u0441\u0442", + "\u0421\u0435\u043d\u0442\u044f\u0431\u0440", + "\u041e\u043a\u0442\u044f\u0431\u0440", + "\u041d\u043e\u044f\u0431\u0440", + "\u0414\u0435\u043a\u0430\u0431\u0440" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "so\u02bcm", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "uz-cyrl", + "localeID": "uz_Cyrl", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_uz-latn-uz.js b/1.6.6/i18n/angular-locale_uz-latn-uz.js new file mode 100644 index 000000000..b8afec112 --- /dev/null +++ b/1.6.6/i18n/angular-locale_uz-latn-uz.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "TO", + "TK" + ], + "DAY": [ + "yakshanba", + "dushanba", + "seshanba", + "chorshanba", + "payshanba", + "juma", + "shanba" + ], + "ERANAMES": [ + "miloddan avvalgi", + "milodiy" + ], + "ERAS": [ + "m.a.", + "milodiy" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "yanvar", + "fevral", + "mart", + "aprel", + "may", + "iyun", + "iyul", + "avgust", + "sentabr", + "oktabr", + "noyabr", + "dekabr" + ], + "SHORTDAY": [ + "Yak", + "Dush", + "Sesh", + "Chor", + "Pay", + "Jum", + "Shan" + ], + "SHORTMONTH": [ + "yan", + "fev", + "mar", + "apr", + "may", + "iyn", + "iyl", + "avg", + "sen", + "okt", + "noy", + "dek" + ], + "STANDALONEMONTH": [ + "Yanvar", + "Fevral", + "Mart", + "Aprel", + "May", + "Iyun", + "Iyul", + "Avgust", + "Sentabr", + "Oktabr", + "Noyabr", + "Dekabr" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d-MMMM, y", + "longDate": "d-MMMM, y", + "medium": "d-MMM, y HH:mm:ss", + "mediumDate": "d-MMM, y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "so\u02bcm", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "uz-latn-uz", + "localeID": "uz_Latn_UZ", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_uz-latn.js b/1.6.6/i18n/angular-locale_uz-latn.js new file mode 100644 index 000000000..56724d156 --- /dev/null +++ b/1.6.6/i18n/angular-locale_uz-latn.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "TO", + "TK" + ], + "DAY": [ + "yakshanba", + "dushanba", + "seshanba", + "chorshanba", + "payshanba", + "juma", + "shanba" + ], + "ERANAMES": [ + "miloddan avvalgi", + "milodiy" + ], + "ERAS": [ + "m.a.", + "milodiy" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "yanvar", + "fevral", + "mart", + "aprel", + "may", + "iyun", + "iyul", + "avgust", + "sentabr", + "oktabr", + "noyabr", + "dekabr" + ], + "SHORTDAY": [ + "Yak", + "Dush", + "Sesh", + "Chor", + "Pay", + "Jum", + "Shan" + ], + "SHORTMONTH": [ + "yan", + "fev", + "mar", + "apr", + "may", + "iyn", + "iyl", + "avg", + "sen", + "okt", + "noy", + "dek" + ], + "STANDALONEMONTH": [ + "Yanvar", + "Fevral", + "Mart", + "Aprel", + "May", + "Iyun", + "Iyul", + "Avgust", + "Sentabr", + "Oktabr", + "Noyabr", + "Dekabr" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d-MMMM, y", + "longDate": "d-MMMM, y", + "medium": "d-MMM, y HH:mm:ss", + "mediumDate": "d-MMM, y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "so\u02bcm", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "uz-latn", + "localeID": "uz_Latn", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_uz.js b/1.6.6/i18n/angular-locale_uz.js new file mode 100644 index 000000000..0af75a831 --- /dev/null +++ b/1.6.6/i18n/angular-locale_uz.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "TO", + "TK" + ], + "DAY": [ + "yakshanba", + "dushanba", + "seshanba", + "chorshanba", + "payshanba", + "juma", + "shanba" + ], + "ERANAMES": [ + "miloddan avvalgi", + "milodiy" + ], + "ERAS": [ + "m.a.", + "milodiy" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "yanvar", + "fevral", + "mart", + "aprel", + "may", + "iyun", + "iyul", + "avgust", + "sentabr", + "oktabr", + "noyabr", + "dekabr" + ], + "SHORTDAY": [ + "Yak", + "Dush", + "Sesh", + "Chor", + "Pay", + "Jum", + "Shan" + ], + "SHORTMONTH": [ + "yan", + "fev", + "mar", + "apr", + "may", + "iyn", + "iyl", + "avg", + "sen", + "okt", + "noy", + "dek" + ], + "STANDALONEMONTH": [ + "Yanvar", + "Fevral", + "Mart", + "Aprel", + "May", + "Iyun", + "Iyul", + "Avgust", + "Sentabr", + "Oktabr", + "Noyabr", + "Dekabr" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d-MMMM, y", + "longDate": "d-MMMM, y", + "medium": "d-MMM, y HH:mm:ss", + "mediumDate": "d-MMM, y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "so\u02bcm", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "uz", + "localeID": "uz", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_vai-latn-lr.js b/1.6.6/i18n/angular-locale_vai-latn-lr.js new file mode 100644 index 000000000..0800e469b --- /dev/null +++ b/1.6.6/i18n/angular-locale_vai-latn-lr.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "lahadi", + "t\u025b\u025bn\u025b\u025b", + "talata", + "alaba", + "aimisa", + "aijima", + "si\u0253iti" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "luukao kem\u00e3", + "\u0253anda\u0253u", + "v\u0254\u0254", + "fulu", + "goo", + "6", + "7", + "k\u0254nde", + "saah", + "galo", + "kenpkato \u0253olol\u0254", + "luukao l\u0254ma" + ], + "SHORTDAY": [ + "lahadi", + "t\u025b\u025bn\u025b\u025b", + "talata", + "alaba", + "aimisa", + "aijima", + "si\u0253iti" + ], + "SHORTMONTH": [ + "luukao kem\u00e3", + "\u0253anda\u0253u", + "v\u0254\u0254", + "fulu", + "goo", + "6", + "7", + "k\u0254nde", + "saah", + "galo", + "kenpkato \u0253olol\u0254", + "luukao l\u0254ma" + ], + "STANDALONEMONTH": [ + "luukao kem\u00e3", + "\u0253anda\u0253u", + "v\u0254\u0254", + "fulu", + "goo", + "6", + "7", + "k\u0254nde", + "saah", + "galo", + "kenpkato \u0253olol\u0254", + "luukao l\u0254ma" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "vai-latn-lr", + "localeID": "vai_Latn_LR", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_vai-latn.js b/1.6.6/i18n/angular-locale_vai-latn.js new file mode 100644 index 000000000..8bb7e498e --- /dev/null +++ b/1.6.6/i18n/angular-locale_vai-latn.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "lahadi", + "t\u025b\u025bn\u025b\u025b", + "talata", + "alaba", + "aimisa", + "aijima", + "si\u0253iti" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "luukao kem\u00e3", + "\u0253anda\u0253u", + "v\u0254\u0254", + "fulu", + "goo", + "6", + "7", + "k\u0254nde", + "saah", + "galo", + "kenpkato \u0253olol\u0254", + "luukao l\u0254ma" + ], + "SHORTDAY": [ + "lahadi", + "t\u025b\u025bn\u025b\u025b", + "talata", + "alaba", + "aimisa", + "aijima", + "si\u0253iti" + ], + "SHORTMONTH": [ + "luukao kem\u00e3", + "\u0253anda\u0253u", + "v\u0254\u0254", + "fulu", + "goo", + "6", + "7", + "k\u0254nde", + "saah", + "galo", + "kenpkato \u0253olol\u0254", + "luukao l\u0254ma" + ], + "STANDALONEMONTH": [ + "luukao kem\u00e3", + "\u0253anda\u0253u", + "v\u0254\u0254", + "fulu", + "goo", + "6", + "7", + "k\u0254nde", + "saah", + "galo", + "kenpkato \u0253olol\u0254", + "luukao l\u0254ma" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "vai-latn", + "localeID": "vai_Latn", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_vai-vaii-lr.js b/1.6.6/i18n/angular-locale_vai-vaii-lr.js new file mode 100644 index 000000000..022470e71 --- /dev/null +++ b/1.6.6/i18n/angular-locale_vai-vaii-lr.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\ua55e\ua54c\ua535", + "\ua5f3\ua5e1\ua609", + "\ua55a\ua55e\ua55a", + "\ua549\ua55e\ua552", + "\ua549\ua524\ua546\ua562", + "\ua549\ua524\ua540\ua56e", + "\ua53b\ua52c\ua533" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\ua5a8\ua56a\ua583 \ua51e\ua56e", + "\ua552\ua561\ua59d\ua595", + "\ua57e\ua5ba", + "\ua5a2\ua595", + "\ua591\ua571", + "6", + "7", + "\ua5db\ua515", + "\ua562\ua54c", + "\ua56d\ua583", + "\ua51e\ua60b\ua554\ua57f \ua578\ua583\ua5cf", + "\ua5a8\ua56a\ua571 \ua5cf\ua56e" + ], + "SHORTDAY": [ + "\ua55e\ua54c\ua535", + "\ua5f3\ua5e1\ua609", + "\ua55a\ua55e\ua55a", + "\ua549\ua55e\ua552", + "\ua549\ua524\ua546\ua562", + "\ua549\ua524\ua540\ua56e", + "\ua53b\ua52c\ua533" + ], + "SHORTMONTH": [ + "\ua5a8\ua56a\ua583 \ua51e\ua56e", + "\ua552\ua561\ua59d\ua595", + "\ua57e\ua5ba", + "\ua5a2\ua595", + "\ua591\ua571", + "6", + "7", + "\ua5db\ua515", + "\ua562\ua54c", + "\ua56d\ua583", + "\ua51e\ua60b\ua554\ua57f \ua578\ua583\ua5cf", + "\ua5a8\ua56a\ua571 \ua5cf\ua56e" + ], + "STANDALONEMONTH": [ + "\ua5a8\ua56a\ua583 \ua51e\ua56e", + "\ua552\ua561\ua59d\ua595", + "\ua57e\ua5ba", + "\ua5a2\ua595", + "\ua591\ua571", + "6", + "7", + "\ua5db\ua515", + "\ua562\ua54c", + "\ua56d\ua583", + "\ua51e\ua60b\ua554\ua57f \ua578\ua583\ua5cf", + "\ua5a8\ua56a\ua571 \ua5cf\ua56e" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "vai-vaii-lr", + "localeID": "vai_Vaii_LR", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_vai-vaii.js b/1.6.6/i18n/angular-locale_vai-vaii.js new file mode 100644 index 000000000..807b6aebd --- /dev/null +++ b/1.6.6/i18n/angular-locale_vai-vaii.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\ua55e\ua54c\ua535", + "\ua5f3\ua5e1\ua609", + "\ua55a\ua55e\ua55a", + "\ua549\ua55e\ua552", + "\ua549\ua524\ua546\ua562", + "\ua549\ua524\ua540\ua56e", + "\ua53b\ua52c\ua533" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\ua5a8\ua56a\ua583 \ua51e\ua56e", + "\ua552\ua561\ua59d\ua595", + "\ua57e\ua5ba", + "\ua5a2\ua595", + "\ua591\ua571", + "6", + "7", + "\ua5db\ua515", + "\ua562\ua54c", + "\ua56d\ua583", + "\ua51e\ua60b\ua554\ua57f \ua578\ua583\ua5cf", + "\ua5a8\ua56a\ua571 \ua5cf\ua56e" + ], + "SHORTDAY": [ + "\ua55e\ua54c\ua535", + "\ua5f3\ua5e1\ua609", + "\ua55a\ua55e\ua55a", + "\ua549\ua55e\ua552", + "\ua549\ua524\ua546\ua562", + "\ua549\ua524\ua540\ua56e", + "\ua53b\ua52c\ua533" + ], + "SHORTMONTH": [ + "\ua5a8\ua56a\ua583 \ua51e\ua56e", + "\ua552\ua561\ua59d\ua595", + "\ua57e\ua5ba", + "\ua5a2\ua595", + "\ua591\ua571", + "6", + "7", + "\ua5db\ua515", + "\ua562\ua54c", + "\ua56d\ua583", + "\ua51e\ua60b\ua554\ua57f \ua578\ua583\ua5cf", + "\ua5a8\ua56a\ua571 \ua5cf\ua56e" + ], + "STANDALONEMONTH": [ + "\ua5a8\ua56a\ua583 \ua51e\ua56e", + "\ua552\ua561\ua59d\ua595", + "\ua57e\ua5ba", + "\ua5a2\ua595", + "\ua591\ua571", + "6", + "7", + "\ua5db\ua515", + "\ua562\ua54c", + "\ua56d\ua583", + "\ua51e\ua60b\ua554\ua57f \ua578\ua583\ua5cf", + "\ua5a8\ua56a\ua571 \ua5cf\ua56e" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "vai-vaii", + "localeID": "vai_Vaii", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_vai.js b/1.6.6/i18n/angular-locale_vai.js new file mode 100644 index 000000000..36c32ae86 --- /dev/null +++ b/1.6.6/i18n/angular-locale_vai.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "\ua55e\ua54c\ua535", + "\ua5f3\ua5e1\ua609", + "\ua55a\ua55e\ua55a", + "\ua549\ua55e\ua552", + "\ua549\ua524\ua546\ua562", + "\ua549\ua524\ua540\ua56e", + "\ua53b\ua52c\ua533" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\ua5a8\ua56a\ua583 \ua51e\ua56e", + "\ua552\ua561\ua59d\ua595", + "\ua57e\ua5ba", + "\ua5a2\ua595", + "\ua591\ua571", + "6", + "7", + "\ua5db\ua515", + "\ua562\ua54c", + "\ua56d\ua583", + "\ua51e\ua60b\ua554\ua57f \ua578\ua583\ua5cf", + "\ua5a8\ua56a\ua571 \ua5cf\ua56e" + ], + "SHORTDAY": [ + "\ua55e\ua54c\ua535", + "\ua5f3\ua5e1\ua609", + "\ua55a\ua55e\ua55a", + "\ua549\ua55e\ua552", + "\ua549\ua524\ua546\ua562", + "\ua549\ua524\ua540\ua56e", + "\ua53b\ua52c\ua533" + ], + "SHORTMONTH": [ + "\ua5a8\ua56a\ua583 \ua51e\ua56e", + "\ua552\ua561\ua59d\ua595", + "\ua57e\ua5ba", + "\ua5a2\ua595", + "\ua591\ua571", + "6", + "7", + "\ua5db\ua515", + "\ua562\ua54c", + "\ua56d\ua583", + "\ua51e\ua60b\ua554\ua57f \ua578\ua583\ua5cf", + "\ua5a8\ua56a\ua571 \ua5cf\ua56e" + ], + "STANDALONEMONTH": [ + "\ua5a8\ua56a\ua583 \ua51e\ua56e", + "\ua552\ua561\ua59d\ua595", + "\ua57e\ua5ba", + "\ua5a2\ua595", + "\ua591\ua571", + "6", + "7", + "\ua5db\ua515", + "\ua562\ua54c", + "\ua56d\ua583", + "\ua51e\ua60b\ua554\ua57f \ua578\ua583\ua5cf", + "\ua5a8\ua56a\ua571 \ua5cf\ua56e" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y h:mm:ss a", + "mediumDate": "d MMM y", + "mediumTime": "h:mm:ss a", + "short": "dd/MM/y h:mm a", + "shortDate": "dd/MM/y", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "vai", + "localeID": "vai", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_vi-vn.js b/1.6.6/i18n/angular-locale_vi-vn.js new file mode 100644 index 000000000..40dd78cfb --- /dev/null +++ b/1.6.6/i18n/angular-locale_vi-vn.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "SA", + "CH" + ], + "DAY": [ + "Ch\u1ee7 Nh\u1eadt", + "Th\u1ee9 Hai", + "Th\u1ee9 Ba", + "Th\u1ee9 T\u01b0", + "Th\u1ee9 N\u0103m", + "Th\u1ee9 S\u00e1u", + "Th\u1ee9 B\u1ea3y" + ], + "ERANAMES": [ + "Tr\u01b0\u1edbc CN", + "sau CN" + ], + "ERAS": [ + "Tr\u01b0\u1edbc CN", + "sau CN" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "th\u00e1ng 1", + "th\u00e1ng 2", + "th\u00e1ng 3", + "th\u00e1ng 4", + "th\u00e1ng 5", + "th\u00e1ng 6", + "th\u00e1ng 7", + "th\u00e1ng 8", + "th\u00e1ng 9", + "th\u00e1ng 10", + "th\u00e1ng 11", + "th\u00e1ng 12" + ], + "SHORTDAY": [ + "CN", + "Th 2", + "Th 3", + "Th 4", + "Th 5", + "Th 6", + "Th 7" + ], + "SHORTMONTH": [ + "thg 1", + "thg 2", + "thg 3", + "thg 4", + "thg 5", + "thg 6", + "thg 7", + "thg 8", + "thg 9", + "thg 10", + "thg 11", + "thg 12" + ], + "STANDALONEMONTH": [ + "Th\u00e1ng 1", + "Th\u00e1ng 2", + "Th\u00e1ng 3", + "Th\u00e1ng 4", + "Th\u00e1ng 5", + "Th\u00e1ng 6", + "Th\u00e1ng 7", + "Th\u00e1ng 8", + "Th\u00e1ng 9", + "Th\u00e1ng 10", + "Th\u00e1ng 11", + "Th\u00e1ng 12" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ab", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "vi-vn", + "localeID": "vi_VN", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_vi.js b/1.6.6/i18n/angular-locale_vi.js new file mode 100644 index 000000000..74cdcadc8 --- /dev/null +++ b/1.6.6/i18n/angular-locale_vi.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "SA", + "CH" + ], + "DAY": [ + "Ch\u1ee7 Nh\u1eadt", + "Th\u1ee9 Hai", + "Th\u1ee9 Ba", + "Th\u1ee9 T\u01b0", + "Th\u1ee9 N\u0103m", + "Th\u1ee9 S\u00e1u", + "Th\u1ee9 B\u1ea3y" + ], + "ERANAMES": [ + "Tr\u01b0\u1edbc CN", + "sau CN" + ], + "ERAS": [ + "Tr\u01b0\u1edbc CN", + "sau CN" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "th\u00e1ng 1", + "th\u00e1ng 2", + "th\u00e1ng 3", + "th\u00e1ng 4", + "th\u00e1ng 5", + "th\u00e1ng 6", + "th\u00e1ng 7", + "th\u00e1ng 8", + "th\u00e1ng 9", + "th\u00e1ng 10", + "th\u00e1ng 11", + "th\u00e1ng 12" + ], + "SHORTDAY": [ + "CN", + "Th 2", + "Th 3", + "Th 4", + "Th 5", + "Th 6", + "Th 7" + ], + "SHORTMONTH": [ + "thg 1", + "thg 2", + "thg 3", + "thg 4", + "thg 5", + "thg 6", + "thg 7", + "thg 8", + "thg 9", + "thg 10", + "thg 11", + "thg 12" + ], + "STANDALONEMONTH": [ + "Th\u00e1ng 1", + "Th\u00e1ng 2", + "Th\u00e1ng 3", + "Th\u00e1ng 4", + "Th\u00e1ng 5", + "Th\u00e1ng 6", + "Th\u00e1ng 7", + "Th\u00e1ng 8", + "Th\u00e1ng 9", + "Th\u00e1ng 10", + "Th\u00e1ng 11", + "Th\u00e1ng 12" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ab", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "vi", + "localeID": "vi", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_vo-001.js b/1.6.6/i18n/angular-locale_vo-001.js new file mode 100644 index 000000000..fe64c0c5b --- /dev/null +++ b/1.6.6/i18n/angular-locale_vo-001.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "sudel", + "mudel", + "tudel", + "vedel", + "d\u00f6del", + "fridel", + "z\u00e4del" + ], + "ERANAMES": [ + "b. t. kr.", + "p. t. kr." + ], + "ERAS": [ + "b. t. kr.", + "p. t. kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "yanul", + "febul", + "m\u00e4zul", + "prilul", + "mayul", + "yunul", + "yulul", + "gustul", + "setul", + "tobul", + "novul", + "dekul" + ], + "SHORTDAY": [ + "su.", + "mu.", + "tu.", + "ve.", + "d\u00f6.", + "fr.", + "z\u00e4." + ], + "SHORTMONTH": [ + "yan", + "feb", + "m\u00e4z", + "prl", + "may", + "yun", + "yul", + "gst", + "set", + "ton", + "nov", + "dek" + ], + "STANDALONEMONTH": [ + "yanul", + "febul", + "m\u00e4zul", + "prilul", + "mayul", + "yunul", + "yulul", + "gustul", + "setul", + "tobul", + "novul", + "dekul" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM'a' 'd'. d'id'", + "longDate": "y MMMM d", + "medium": "y MMM. d HH:mm:ss", + "mediumDate": "y MMM. d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "vo-001", + "localeID": "vo_001", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_vo.js b/1.6.6/i18n/angular-locale_vo.js new file mode 100644 index 000000000..d76a390d4 --- /dev/null +++ b/1.6.6/i18n/angular-locale_vo.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "sudel", + "mudel", + "tudel", + "vedel", + "d\u00f6del", + "fridel", + "z\u00e4del" + ], + "ERANAMES": [ + "b. t. kr.", + "p. t. kr." + ], + "ERAS": [ + "b. t. kr.", + "p. t. kr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "yanul", + "febul", + "m\u00e4zul", + "prilul", + "mayul", + "yunul", + "yulul", + "gustul", + "setul", + "tobul", + "novul", + "dekul" + ], + "SHORTDAY": [ + "su.", + "mu.", + "tu.", + "ve.", + "d\u00f6.", + "fr.", + "z\u00e4." + ], + "SHORTMONTH": [ + "yan", + "feb", + "m\u00e4z", + "prl", + "may", + "yun", + "yul", + "gst", + "set", + "ton", + "nov", + "dek" + ], + "STANDALONEMONTH": [ + "yanul", + "febul", + "m\u00e4zul", + "prilul", + "mayul", + "yunul", + "yulul", + "gustul", + "setul", + "tobul", + "novul", + "dekul" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM'a' 'd'. d'id'", + "longDate": "y MMMM d", + "medium": "y MMM. d HH:mm:ss", + "mediumDate": "y MMM. d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "vo", + "localeID": "vo", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_vun-tz.js b/1.6.6/i18n/angular-locale_vun-tz.js new file mode 100644 index 000000000..7f1900e63 --- /dev/null +++ b/1.6.6/i18n/angular-locale_vun-tz.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "utuko", + "kyiukonyi" + ], + "DAY": [ + "Jumapilyi", + "Jumatatuu", + "Jumanne", + "Jumatanu", + "Alhamisi", + "Ijumaa", + "Jumamosi" + ], + "ERANAMES": [ + "Kabla ya Kristu", + "Baada ya Kristu" + ], + "ERAS": [ + "KK", + "BK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januari", + "Februari", + "Machi", + "Aprilyi", + "Mei", + "Junyi", + "Julyai", + "Agusti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "SHORTDAY": [ + "Jpi", + "Jtt", + "Jnn", + "Jtn", + "Alh", + "Iju", + "Jmo" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Jul", + "Ago", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Machi", + "Aprilyi", + "Mei", + "Junyi", + "Julyai", + "Agusti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "vun-tz", + "localeID": "vun_TZ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_vun.js b/1.6.6/i18n/angular-locale_vun.js new file mode 100644 index 000000000..33adf4116 --- /dev/null +++ b/1.6.6/i18n/angular-locale_vun.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "utuko", + "kyiukonyi" + ], + "DAY": [ + "Jumapilyi", + "Jumatatuu", + "Jumanne", + "Jumatanu", + "Alhamisi", + "Ijumaa", + "Jumamosi" + ], + "ERANAMES": [ + "Kabla ya Kristu", + "Baada ya Kristu" + ], + "ERAS": [ + "KK", + "BK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Januari", + "Februari", + "Machi", + "Aprilyi", + "Mei", + "Junyi", + "Julyai", + "Agusti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "SHORTDAY": [ + "Jpi", + "Jtt", + "Jnn", + "Jtn", + "Alh", + "Iju", + "Jmo" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mac", + "Apr", + "Mei", + "Jun", + "Jul", + "Ago", + "Sep", + "Okt", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Januari", + "Februari", + "Machi", + "Aprilyi", + "Mei", + "Junyi", + "Julyai", + "Agusti", + "Septemba", + "Oktoba", + "Novemba", + "Desemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "TSh", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "vun", + "localeID": "vun", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_wae-ch.js b/1.6.6/i18n/angular-locale_wae-ch.js new file mode 100644 index 000000000..92aa7e8e5 --- /dev/null +++ b/1.6.6/i18n/angular-locale_wae-ch.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunntag", + "M\u00e4ntag", + "Zi\u0161tag", + "Mittwu\u010d", + "Fr\u00f3ntag", + "Fritag", + "Sam\u0161tag" + ], + "ERANAMES": [ + "v. Chr.", + "n. Chr" + ], + "ERAS": [ + "v. Chr.", + "n. Chr" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Jenner", + "Hornig", + "M\u00e4rze", + "Abrille", + "Meije", + "Br\u00e1\u010det", + "Heiwet", + "\u00d6ig\u0161te", + "Herb\u0161tm\u00e1net", + "W\u00edm\u00e1net", + "Winterm\u00e1net", + "Chri\u0161tm\u00e1net" + ], + "SHORTDAY": [ + "Sun", + "M\u00e4n", + "Zi\u0161", + "Mit", + "Fr\u00f3", + "Fri", + "Sam" + ], + "SHORTMONTH": [ + "Jen", + "Hor", + "M\u00e4r", + "Abr", + "Mei", + "Br\u00e1", + "Hei", + "\u00d6ig", + "Her", + "W\u00edm", + "Win", + "Chr" + ], + "STANDALONEMONTH": [ + "Jenner", + "Hornig", + "M\u00e4rze", + "Abrille", + "Meije", + "Br\u00e1\u010det", + "Heiwet", + "\u00d6ig\u0161te", + "Herb\u0161tm\u00e1net", + "W\u00edm\u00e1net", + "Winterm\u00e1net", + "Chri\u0161tm\u00e1net" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. MMM y HH:mm:ss", + "mediumDate": "d. MMM y", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CHF", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u2019", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "wae-ch", + "localeID": "wae_CH", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_wae.js b/1.6.6/i18n/angular-locale_wae.js new file mode 100644 index 000000000..12a13a12a --- /dev/null +++ b/1.6.6/i18n/angular-locale_wae.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunntag", + "M\u00e4ntag", + "Zi\u0161tag", + "Mittwu\u010d", + "Fr\u00f3ntag", + "Fritag", + "Sam\u0161tag" + ], + "ERANAMES": [ + "v. Chr.", + "n. Chr" + ], + "ERAS": [ + "v. Chr.", + "n. Chr" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Jenner", + "Hornig", + "M\u00e4rze", + "Abrille", + "Meije", + "Br\u00e1\u010det", + "Heiwet", + "\u00d6ig\u0161te", + "Herb\u0161tm\u00e1net", + "W\u00edm\u00e1net", + "Winterm\u00e1net", + "Chri\u0161tm\u00e1net" + ], + "SHORTDAY": [ + "Sun", + "M\u00e4n", + "Zi\u0161", + "Mit", + "Fr\u00f3", + "Fri", + "Sam" + ], + "SHORTMONTH": [ + "Jen", + "Hor", + "M\u00e4r", + "Abr", + "Mei", + "Br\u00e1", + "Hei", + "\u00d6ig", + "Her", + "W\u00edm", + "Win", + "Chr" + ], + "STANDALONEMONTH": [ + "Jenner", + "Hornig", + "M\u00e4rze", + "Abrille", + "Meije", + "Br\u00e1\u010det", + "Heiwet", + "\u00d6ig\u0161te", + "Herb\u0161tm\u00e1net", + "W\u00edm\u00e1net", + "Winterm\u00e1net", + "Chri\u0161tm\u00e1net" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "d. MMM y HH:mm:ss", + "mediumDate": "d. MMM y", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CHF", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u2019", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "wae", + "localeID": "wae", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_xog-ug.js b/1.6.6/i18n/angular-locale_xog-ug.js new file mode 100644 index 000000000..c17dd023e --- /dev/null +++ b/1.6.6/i18n/angular-locale_xog-ug.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Munkyo", + "Eigulo" + ], + "DAY": [ + "Sabiiti", + "Balaza", + "Owokubili", + "Owokusatu", + "Olokuna", + "Olokutaanu", + "Olomukaaga" + ], + "ERANAMES": [ + "Kulisto nga azilawo", + "Kulisto nga affile" + ], + "ERAS": [ + "AZ", + "AF" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Janwaliyo", + "Febwaliyo", + "Marisi", + "Apuli", + "Maayi", + "Juuni", + "Julaayi", + "Agusito", + "Sebuttemba", + "Okitobba", + "Novemba", + "Desemba" + ], + "SHORTDAY": [ + "Sabi", + "Bala", + "Kubi", + "Kusa", + "Kuna", + "Kuta", + "Muka" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apu", + "Maa", + "Juu", + "Jul", + "Agu", + "Seb", + "Oki", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Janwaliyo", + "Febwaliyo", + "Marisi", + "Apuli", + "Maayi", + "Juuni", + "Julaayi", + "Agusito", + "Sebuttemba", + "Okitobba", + "Novemba", + "Desemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "UGX", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "xog-ug", + "localeID": "xog_UG", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_xog.js b/1.6.6/i18n/angular-locale_xog.js new file mode 100644 index 000000000..88b7d160c --- /dev/null +++ b/1.6.6/i18n/angular-locale_xog.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "Munkyo", + "Eigulo" + ], + "DAY": [ + "Sabiiti", + "Balaza", + "Owokubili", + "Owokusatu", + "Olokuna", + "Olokutaanu", + "Olomukaaga" + ], + "ERANAMES": [ + "Kulisto nga azilawo", + "Kulisto nga affile" + ], + "ERAS": [ + "AZ", + "AF" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Janwaliyo", + "Febwaliyo", + "Marisi", + "Apuli", + "Maayi", + "Juuni", + "Julaayi", + "Agusito", + "Sebuttemba", + "Okitobba", + "Novemba", + "Desemba" + ], + "SHORTDAY": [ + "Sabi", + "Bala", + "Kubi", + "Kusa", + "Kuna", + "Kuta", + "Muka" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apu", + "Maa", + "Juu", + "Jul", + "Agu", + "Seb", + "Oki", + "Nov", + "Des" + ], + "STANDALONEMONTH": [ + "Janwaliyo", + "Febwaliyo", + "Marisi", + "Apuli", + "Maayi", + "Juuni", + "Julaayi", + "Agusito", + "Sebuttemba", + "Okitobba", + "Novemba", + "Desemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "UGX", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "xog", + "localeID": "xog", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_yav-cm.js b/1.6.6/i18n/angular-locale_yav-cm.js new file mode 100644 index 000000000..9c93a7ee9 --- /dev/null +++ b/1.6.6/i18n/angular-locale_yav-cm.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "ki\u025bm\u025b\u0301\u025bm", + "kis\u025b\u0301nd\u025b" + ], + "DAY": [ + "s\u0254\u0301ndi\u025b", + "m\u00f3ndie", + "mu\u00e1ny\u00e1\u014bm\u00f3ndie", + "met\u00fakp\u00ed\u00e1p\u025b", + "k\u00fap\u00e9limet\u00fakpiap\u025b", + "fel\u00e9te", + "s\u00e9sel\u00e9" + ], + "ERANAMES": [ + "katikup\u00eden Y\u00e9suse", + "\u00e9k\u00e9l\u00e9mk\u00fanup\u00ed\u00e9n n" + ], + "ERAS": [ + "k.Y.", + "+J.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "pik\u00edt\u00edk\u00edtie, o\u00f3l\u00ed \u00fa kut\u00faan", + "si\u025by\u025b\u0301, o\u00f3li \u00fa k\u00e1nd\u00ed\u025b", + "\u0254ns\u00famb\u0254l, o\u00f3li \u00fa k\u00e1t\u00e1t\u00fa\u025b", + "mesi\u014b, o\u00f3li \u00fa k\u00e9nie", + "ensil, o\u00f3li \u00fa k\u00e1t\u00e1nu\u025b", + "\u0254s\u0254n", + "efute", + "pisuy\u00fa", + "im\u025b\u014b i pu\u0254s", + "im\u025b\u014b i put\u00fak,o\u00f3li \u00fa k\u00e1t\u00ed\u025b", + "makandik\u025b", + "pil\u0254nd\u0254\u0301" + ], + "SHORTDAY": [ + "sd", + "md", + "mw", + "et", + "kl", + "fl", + "ss" + ], + "SHORTMONTH": [ + "o.1", + "o.2", + "o.3", + "o.4", + "o.5", + "o.6", + "o.7", + "o.8", + "o.9", + "o.10", + "o.11", + "o.12" + ], + "STANDALONEMONTH": [ + "pik\u00edt\u00edk\u00edtie, o\u00f3l\u00ed \u00fa kut\u00faan", + "si\u025by\u025b\u0301, o\u00f3li \u00fa k\u00e1nd\u00ed\u025b", + "\u0254ns\u00famb\u0254l, o\u00f3li \u00fa k\u00e1t\u00e1t\u00fa\u025b", + "mesi\u014b, o\u00f3li \u00fa k\u00e9nie", + "ensil, o\u00f3li \u00fa k\u00e1t\u00e1nu\u025b", + "\u0254s\u0254n", + "efute", + "pisuy\u00fa", + "im\u025b\u014b i pu\u0254s", + "im\u025b\u014b i put\u00fak,o\u00f3li \u00fa k\u00e1t\u00ed\u025b", + "makandik\u025b", + "pil\u0254nd\u0254\u0301" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "yav-cm", + "localeID": "yav_CM", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_yav.js b/1.6.6/i18n/angular-locale_yav.js new file mode 100644 index 000000000..77ba2f0d6 --- /dev/null +++ b/1.6.6/i18n/angular-locale_yav.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "ki\u025bm\u025b\u0301\u025bm", + "kis\u025b\u0301nd\u025b" + ], + "DAY": [ + "s\u0254\u0301ndi\u025b", + "m\u00f3ndie", + "mu\u00e1ny\u00e1\u014bm\u00f3ndie", + "met\u00fakp\u00ed\u00e1p\u025b", + "k\u00fap\u00e9limet\u00fakpiap\u025b", + "fel\u00e9te", + "s\u00e9sel\u00e9" + ], + "ERANAMES": [ + "katikup\u00eden Y\u00e9suse", + "\u00e9k\u00e9l\u00e9mk\u00fanup\u00ed\u00e9n n" + ], + "ERAS": [ + "k.Y.", + "+J.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "pik\u00edt\u00edk\u00edtie, o\u00f3l\u00ed \u00fa kut\u00faan", + "si\u025by\u025b\u0301, o\u00f3li \u00fa k\u00e1nd\u00ed\u025b", + "\u0254ns\u00famb\u0254l, o\u00f3li \u00fa k\u00e1t\u00e1t\u00fa\u025b", + "mesi\u014b, o\u00f3li \u00fa k\u00e9nie", + "ensil, o\u00f3li \u00fa k\u00e1t\u00e1nu\u025b", + "\u0254s\u0254n", + "efute", + "pisuy\u00fa", + "im\u025b\u014b i pu\u0254s", + "im\u025b\u014b i put\u00fak,o\u00f3li \u00fa k\u00e1t\u00ed\u025b", + "makandik\u025b", + "pil\u0254nd\u0254\u0301" + ], + "SHORTDAY": [ + "sd", + "md", + "mw", + "et", + "kl", + "fl", + "ss" + ], + "SHORTMONTH": [ + "o.1", + "o.2", + "o.3", + "o.4", + "o.5", + "o.6", + "o.7", + "o.8", + "o.9", + "o.10", + "o.11", + "o.12" + ], + "STANDALONEMONTH": [ + "pik\u00edt\u00edk\u00edtie, o\u00f3l\u00ed \u00fa kut\u00faan", + "si\u025by\u025b\u0301, o\u00f3li \u00fa k\u00e1nd\u00ed\u025b", + "\u0254ns\u00famb\u0254l, o\u00f3li \u00fa k\u00e1t\u00e1t\u00fa\u025b", + "mesi\u014b, o\u00f3li \u00fa k\u00e9nie", + "ensil, o\u00f3li \u00fa k\u00e1t\u00e1nu\u025b", + "\u0254s\u0254n", + "efute", + "pisuy\u00fa", + "im\u025b\u014b i pu\u0254s", + "im\u025b\u014b i put\u00fak,o\u00f3li \u00fa k\u00e1t\u00ed\u025b", + "makandik\u025b", + "pil\u0254nd\u0254\u0301" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "FCFA", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "yav", + "localeID": "yav", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_yi-001.js b/1.6.6/i18n/angular-locale_yi-001.js new file mode 100644 index 000000000..0e0499600 --- /dev/null +++ b/1.6.6/i18n/angular-locale_yi-001.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u05e4\u05bf\u05d0\u05b7\u05e8\u05de\u05d9\u05d8\u05d0\u05b8\u05d2", + "\u05e0\u05d0\u05b8\u05db\u05de\u05d9\u05d8\u05d0\u05b8\u05d2" + ], + "DAY": [ + "\u05d6\u05d5\u05e0\u05d8\u05d9\u05e7", + "\u05de\u05d0\u05b8\u05e0\u05d8\u05d9\u05e7", + "\u05d3\u05d9\u05e0\u05e1\u05d8\u05d9\u05e7", + "\u05de\u05d9\u05d8\u05d5\u05d5\u05d0\u05da", + "\u05d3\u05d0\u05e0\u05e2\u05e8\u05e9\u05d8\u05d9\u05e7", + "\u05e4\u05bf\u05e8\u05f2\u05b7\u05d8\u05d9\u05e7", + "\u05e9\u05d1\u05ea" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u05d9\u05d0\u05b7\u05e0\u05d5\u05d0\u05b7\u05e8", + "\u05e4\u05bf\u05e2\u05d1\u05e8\u05d5\u05d0\u05b7\u05e8", + "\u05de\u05e2\u05e8\u05e5", + "\u05d0\u05b7\u05e4\u05bc\u05e8\u05d9\u05dc", + "\u05de\u05d9\u05d9", + "\u05d9\u05d5\u05e0\u05d9", + "\u05d9\u05d5\u05dc\u05d9", + "\u05d0\u05d5\u05d9\u05d2\u05d5\u05e1\u05d8", + "\u05e1\u05e2\u05e4\u05bc\u05d8\u05e2\u05de\u05d1\u05e2\u05e8", + "\u05d0\u05e7\u05d8\u05d0\u05d1\u05e2\u05e8", + "\u05e0\u05d0\u05d5\u05d5\u05e2\u05de\u05d1\u05e2\u05e8", + "\u05d3\u05e2\u05e6\u05e2\u05de\u05d1\u05e2\u05e8" + ], + "SHORTDAY": [ + "\u05d6\u05d5\u05e0\u05d8\u05d9\u05e7", + "\u05de\u05d0\u05b8\u05e0\u05d8\u05d9\u05e7", + "\u05d3\u05d9\u05e0\u05e1\u05d8\u05d9\u05e7", + "\u05de\u05d9\u05d8\u05d5\u05d5\u05d0\u05da", + "\u05d3\u05d0\u05e0\u05e2\u05e8\u05e9\u05d8\u05d9\u05e7", + "\u05e4\u05bf\u05e8\u05f2\u05b7\u05d8\u05d9\u05e7", + "\u05e9\u05d1\u05ea" + ], + "SHORTMONTH": [ + "\u05d9\u05d0\u05b7\u05e0\u05d5\u05d0\u05b7\u05e8", + "\u05e4\u05bf\u05e2\u05d1\u05e8\u05d5\u05d0\u05b7\u05e8", + "\u05de\u05e2\u05e8\u05e5", + "\u05d0\u05b7\u05e4\u05bc\u05e8\u05d9\u05dc", + "\u05de\u05d9\u05d9", + "\u05d9\u05d5\u05e0\u05d9", + "\u05d9\u05d5\u05dc\u05d9", + "\u05d0\u05d5\u05d9\u05d2\u05d5\u05e1\u05d8", + "\u05e1\u05e2\u05e4\u05bc\u05d8\u05e2\u05de\u05d1\u05e2\u05e8", + "\u05d0\u05e7\u05d8\u05d0\u05d1\u05e2\u05e8", + "\u05e0\u05d0\u05d5\u05d5\u05e2\u05de\u05d1\u05e2\u05e8", + "\u05d3\u05e2\u05e6\u05e2\u05de\u05d1\u05e2\u05e8" + ], + "STANDALONEMONTH": [ + "\u05d9\u05d0\u05b7\u05e0\u05d5\u05d0\u05b7\u05e8", + "\u05e4\u05bf\u05e2\u05d1\u05e8\u05d5\u05d0\u05b7\u05e8", + "\u05de\u05e2\u05e8\u05e5", + "\u05d0\u05b7\u05e4\u05bc\u05e8\u05d9\u05dc", + "\u05de\u05d9\u05d9", + "\u05d9\u05d5\u05e0\u05d9", + "\u05d9\u05d5\u05dc\u05d9", + "\u05d0\u05d5\u05d9\u05d2\u05d5\u05e1\u05d8", + "\u05e1\u05e2\u05e4\u05bc\u05d8\u05e2\u05de\u05d1\u05e2\u05e8", + "\u05d0\u05e7\u05d8\u05d0\u05d1\u05e2\u05e8", + "\u05e0\u05d0\u05d5\u05d5\u05e2\u05de\u05d1\u05e2\u05e8", + "\u05d3\u05e2\u05e6\u05e2\u05de\u05d1\u05e2\u05e8" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d\u05d8\u05df MMMM y", + "longDate": "d\u05d8\u05df MMMM y", + "medium": "d\u05d8\u05df MMM y HH:mm:ss", + "mediumDate": "d\u05d8\u05df MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "yi-001", + "localeID": "yi_001", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_yi.js b/1.6.6/i18n/angular-locale_yi.js new file mode 100644 index 000000000..c74f10a85 --- /dev/null +++ b/1.6.6/i18n/angular-locale_yi.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u05e4\u05bf\u05d0\u05b7\u05e8\u05de\u05d9\u05d8\u05d0\u05b8\u05d2", + "\u05e0\u05d0\u05b8\u05db\u05de\u05d9\u05d8\u05d0\u05b8\u05d2" + ], + "DAY": [ + "\u05d6\u05d5\u05e0\u05d8\u05d9\u05e7", + "\u05de\u05d0\u05b8\u05e0\u05d8\u05d9\u05e7", + "\u05d3\u05d9\u05e0\u05e1\u05d8\u05d9\u05e7", + "\u05de\u05d9\u05d8\u05d5\u05d5\u05d0\u05da", + "\u05d3\u05d0\u05e0\u05e2\u05e8\u05e9\u05d8\u05d9\u05e7", + "\u05e4\u05bf\u05e8\u05f2\u05b7\u05d8\u05d9\u05e7", + "\u05e9\u05d1\u05ea" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "\u05d9\u05d0\u05b7\u05e0\u05d5\u05d0\u05b7\u05e8", + "\u05e4\u05bf\u05e2\u05d1\u05e8\u05d5\u05d0\u05b7\u05e8", + "\u05de\u05e2\u05e8\u05e5", + "\u05d0\u05b7\u05e4\u05bc\u05e8\u05d9\u05dc", + "\u05de\u05d9\u05d9", + "\u05d9\u05d5\u05e0\u05d9", + "\u05d9\u05d5\u05dc\u05d9", + "\u05d0\u05d5\u05d9\u05d2\u05d5\u05e1\u05d8", + "\u05e1\u05e2\u05e4\u05bc\u05d8\u05e2\u05de\u05d1\u05e2\u05e8", + "\u05d0\u05e7\u05d8\u05d0\u05d1\u05e2\u05e8", + "\u05e0\u05d0\u05d5\u05d5\u05e2\u05de\u05d1\u05e2\u05e8", + "\u05d3\u05e2\u05e6\u05e2\u05de\u05d1\u05e2\u05e8" + ], + "SHORTDAY": [ + "\u05d6\u05d5\u05e0\u05d8\u05d9\u05e7", + "\u05de\u05d0\u05b8\u05e0\u05d8\u05d9\u05e7", + "\u05d3\u05d9\u05e0\u05e1\u05d8\u05d9\u05e7", + "\u05de\u05d9\u05d8\u05d5\u05d5\u05d0\u05da", + "\u05d3\u05d0\u05e0\u05e2\u05e8\u05e9\u05d8\u05d9\u05e7", + "\u05e4\u05bf\u05e8\u05f2\u05b7\u05d8\u05d9\u05e7", + "\u05e9\u05d1\u05ea" + ], + "SHORTMONTH": [ + "\u05d9\u05d0\u05b7\u05e0\u05d5\u05d0\u05b7\u05e8", + "\u05e4\u05bf\u05e2\u05d1\u05e8\u05d5\u05d0\u05b7\u05e8", + "\u05de\u05e2\u05e8\u05e5", + "\u05d0\u05b7\u05e4\u05bc\u05e8\u05d9\u05dc", + "\u05de\u05d9\u05d9", + "\u05d9\u05d5\u05e0\u05d9", + "\u05d9\u05d5\u05dc\u05d9", + "\u05d0\u05d5\u05d9\u05d2\u05d5\u05e1\u05d8", + "\u05e1\u05e2\u05e4\u05bc\u05d8\u05e2\u05de\u05d1\u05e2\u05e8", + "\u05d0\u05e7\u05d8\u05d0\u05d1\u05e2\u05e8", + "\u05e0\u05d0\u05d5\u05d5\u05e2\u05de\u05d1\u05e2\u05e8", + "\u05d3\u05e2\u05e6\u05e2\u05de\u05d1\u05e2\u05e8" + ], + "STANDALONEMONTH": [ + "\u05d9\u05d0\u05b7\u05e0\u05d5\u05d0\u05b7\u05e8", + "\u05e4\u05bf\u05e2\u05d1\u05e8\u05d5\u05d0\u05b7\u05e8", + "\u05de\u05e2\u05e8\u05e5", + "\u05d0\u05b7\u05e4\u05bc\u05e8\u05d9\u05dc", + "\u05de\u05d9\u05d9", + "\u05d9\u05d5\u05e0\u05d9", + "\u05d9\u05d5\u05dc\u05d9", + "\u05d0\u05d5\u05d9\u05d2\u05d5\u05e1\u05d8", + "\u05e1\u05e2\u05e4\u05bc\u05d8\u05e2\u05de\u05d1\u05e2\u05e8", + "\u05d0\u05e7\u05d8\u05d0\u05d1\u05e2\u05e8", + "\u05e0\u05d0\u05d5\u05d5\u05e2\u05de\u05d1\u05e2\u05e8", + "\u05d3\u05e2\u05e6\u05e2\u05de\u05d1\u05e2\u05e8" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d\u05d8\u05df MMMM y", + "longDate": "d\u05d8\u05df MMMM y", + "medium": "d\u05d8\u05df MMM y HH:mm:ss", + "mediumDate": "d\u05d8\u05df MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "yi", + "localeID": "yi", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_yo-bj.js b/1.6.6/i18n/angular-locale_yo-bj.js new file mode 100644 index 000000000..6044e7161 --- /dev/null +++ b/1.6.6/i18n/angular-locale_yo-bj.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u00c0\u00e1r\u0254\u0300", + "\u0186\u0300s\u00e1n" + ], + "DAY": [ + "\u0186j\u0254\u0301 \u00c0\u00eck\u00fa", + "\u0186j\u0254\u0301 Aj\u00e9", + "\u0186j\u0254\u0301 \u00ccs\u025b\u0301gun", + "\u0186j\u0254\u0301r\u00fa", + "\u0186j\u0254\u0301b\u0254", + "\u0186j\u0254\u0301 \u0190t\u00ec", + "\u0186j\u0254\u0301 \u00c0b\u00e1m\u025b\u0301ta" + ], + "ERANAMES": [ + "Saju Kristi", + "Lehin Kristi" + ], + "ERAS": [ + "BCE", + "LK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "Osh\u00f9 Sh\u025b\u0301r\u025b\u0301", + "Osh\u00f9 \u00c8r\u00e8l\u00e8", + "Osh\u00f9 \u0190r\u025b\u0300n\u00e0", + "Osh\u00f9 \u00ccgb\u00e9", + "Osh\u00f9 \u0190\u0300bibi", + "Osh\u00f9 \u00d2k\u00fadu", + "Osh\u00f9 Ag\u025bm\u0254", + "Osh\u00f9 \u00d2g\u00fan", + "Osh\u00f9 Owewe", + "Osh\u00f9 \u0186\u0300w\u00e0r\u00e0", + "Osh\u00f9 B\u00e9l\u00fa", + "Osh\u00f9 \u0186\u0300p\u025b\u0300" + ], + "SHORTDAY": [ + "\u00c0\u00eck\u00fa", + "Aj\u00e9", + "\u00ccs\u025b\u0301gun", + "\u0186j\u0254\u0301r\u00fa", + "\u0186j\u0254\u0301b\u0254", + "\u0190t\u00ec", + "\u00c0b\u00e1m\u025b\u0301ta" + ], + "SHORTMONTH": [ + "Sh\u025b\u0301r\u025b\u0301", + "\u00c8r\u00e8l\u00e8", + "\u0190r\u025b\u0300n\u00e0", + "\u00ccgb\u00e9", + "\u0190\u0300bibi", + "\u00d2k\u00fadu", + "Ag\u025bm\u0254", + "\u00d2g\u00fan", + "Owewe", + "\u0186\u0300w\u00e0r\u00e0", + "B\u00e9l\u00fa", + "\u0186\u0300p\u025b\u0300" + ], + "STANDALONEMONTH": [ + "Osh\u00f9 Sh\u025b\u0301r\u025b\u0301", + "Osh\u00f9 \u00c8r\u00e8l\u00e8", + "Osh\u00f9 \u0190r\u025b\u0300n\u00e0", + "Osh\u00f9 \u00ccgb\u00e9", + "Osh\u00f9 \u0190\u0300bibi", + "Osh\u00f9 \u00d2k\u00fadu", + "Osh\u00f9 Ag\u025bm\u0254", + "Osh\u00f9 \u00d2g\u00fan", + "Osh\u00f9 Owewe", + "Osh\u00f9 \u0186\u0300w\u00e0r\u00e0", + "Osh\u00f9 B\u00e9l\u00fa", + "Osh\u00f9 \u0186\u0300p\u025b\u0300" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "CFA", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 0, + "minFrac": 0, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "yo-bj", + "localeID": "yo_BJ", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_yo-ng.js b/1.6.6/i18n/angular-locale_yo-ng.js new file mode 100644 index 000000000..5c959c4c7 --- /dev/null +++ b/1.6.6/i18n/angular-locale_yo-ng.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u00c0\u00e1r\u1ecd\u0300", + "\u1ecc\u0300s\u00e1n" + ], + "DAY": [ + "\u1eccj\u1ecd\u0301 \u00c0\u00eck\u00fa", + "\u1eccj\u1ecd\u0301 Aj\u00e9", + "\u1eccj\u1ecd\u0301 \u00ccs\u1eb9\u0301gun", + "\u1eccj\u1ecd\u0301r\u00fa", + "\u1eccj\u1ecd\u0301b\u1ecd", + "\u1eccj\u1ecd\u0301 \u1eb8t\u00ec", + "\u1eccj\u1ecd\u0301 \u00c0b\u00e1m\u1eb9\u0301ta" + ], + "ERANAMES": [ + "Saju Kristi", + "Lehin Kristi" + ], + "ERAS": [ + "BCE", + "LK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "O\u1e63\u00f9 \u1e62\u1eb9\u0301r\u1eb9\u0301", + "O\u1e63\u00f9 \u00c8r\u00e8l\u00e8", + "O\u1e63\u00f9 \u1eb8r\u1eb9\u0300n\u00e0", + "O\u1e63\u00f9 \u00ccgb\u00e9", + "O\u1e63\u00f9 \u1eb8\u0300bibi", + "O\u1e63\u00f9 \u00d2k\u00fadu", + "O\u1e63\u00f9 Ag\u1eb9m\u1ecd", + "O\u1e63\u00f9 \u00d2g\u00fan", + "O\u1e63\u00f9 Owewe", + "O\u1e63\u00f9 \u1ecc\u0300w\u00e0r\u00e0", + "O\u1e63\u00f9 B\u00e9l\u00fa", + "O\u1e63\u00f9 \u1ecc\u0300p\u1eb9\u0300" + ], + "SHORTDAY": [ + "\u00c0\u00eck\u00fa", + "Aj\u00e9", + "\u00ccs\u1eb9\u0301gun", + "\u1eccj\u1ecd\u0301r\u00fa", + "\u1eccj\u1ecd\u0301b\u1ecd", + "\u1eb8t\u00ec", + "\u00c0b\u00e1m\u1eb9\u0301ta" + ], + "SHORTMONTH": [ + "\u1e62\u1eb9\u0301r\u1eb9\u0301", + "\u00c8r\u00e8l\u00e8", + "\u1eb8r\u1eb9\u0300n\u00e0", + "\u00ccgb\u00e9", + "\u1eb8\u0300bibi", + "\u00d2k\u00fadu", + "Ag\u1eb9m\u1ecd", + "\u00d2g\u00fan", + "Owewe", + "\u1ecc\u0300w\u00e0r\u00e0", + "B\u00e9l\u00fa", + "\u1ecc\u0300p\u1eb9\u0300" + ], + "STANDALONEMONTH": [ + "O\u1e63\u00f9 \u1e62\u1eb9\u0301r\u1eb9\u0301", + "O\u1e63\u00f9 \u00c8r\u00e8l\u00e8", + "O\u1e63\u00f9 \u1eb8r\u1eb9\u0300n\u00e0", + "O\u1e63\u00f9 \u00ccgb\u00e9", + "O\u1e63\u00f9 \u1eb8\u0300bibi", + "O\u1e63\u00f9 \u00d2k\u00fadu", + "O\u1e63\u00f9 Ag\u1eb9m\u1ecd", + "O\u1e63\u00f9 \u00d2g\u00fan", + "O\u1e63\u00f9 Owewe", + "O\u1e63\u00f9 \u1ecc\u0300w\u00e0r\u00e0", + "O\u1e63\u00f9 B\u00e9l\u00fa", + "O\u1e63\u00f9 \u1ecc\u0300p\u1eb9\u0300" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20a6", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "yo-ng", + "localeID": "yo_NG", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_yo.js b/1.6.6/i18n/angular-locale_yo.js new file mode 100644 index 000000000..23c7be168 --- /dev/null +++ b/1.6.6/i18n/angular-locale_yo.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u00c0\u00e1r\u1ecd\u0300", + "\u1ecc\u0300s\u00e1n" + ], + "DAY": [ + "\u1eccj\u1ecd\u0301 \u00c0\u00eck\u00fa", + "\u1eccj\u1ecd\u0301 Aj\u00e9", + "\u1eccj\u1ecd\u0301 \u00ccs\u1eb9\u0301gun", + "\u1eccj\u1ecd\u0301r\u00fa", + "\u1eccj\u1ecd\u0301b\u1ecd", + "\u1eccj\u1ecd\u0301 \u1eb8t\u00ec", + "\u1eccj\u1ecd\u0301 \u00c0b\u00e1m\u1eb9\u0301ta" + ], + "ERANAMES": [ + "Saju Kristi", + "Lehin Kristi" + ], + "ERAS": [ + "BCE", + "LK" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "O\u1e63\u00f9 \u1e62\u1eb9\u0301r\u1eb9\u0301", + "O\u1e63\u00f9 \u00c8r\u00e8l\u00e8", + "O\u1e63\u00f9 \u1eb8r\u1eb9\u0300n\u00e0", + "O\u1e63\u00f9 \u00ccgb\u00e9", + "O\u1e63\u00f9 \u1eb8\u0300bibi", + "O\u1e63\u00f9 \u00d2k\u00fadu", + "O\u1e63\u00f9 Ag\u1eb9m\u1ecd", + "O\u1e63\u00f9 \u00d2g\u00fan", + "O\u1e63\u00f9 Owewe", + "O\u1e63\u00f9 \u1ecc\u0300w\u00e0r\u00e0", + "O\u1e63\u00f9 B\u00e9l\u00fa", + "O\u1e63\u00f9 \u1ecc\u0300p\u1eb9\u0300" + ], + "SHORTDAY": [ + "\u00c0\u00eck\u00fa", + "Aj\u00e9", + "\u00ccs\u1eb9\u0301gun", + "\u1eccj\u1ecd\u0301r\u00fa", + "\u1eccj\u1ecd\u0301b\u1ecd", + "\u1eb8t\u00ec", + "\u00c0b\u00e1m\u1eb9\u0301ta" + ], + "SHORTMONTH": [ + "\u1e62\u1eb9\u0301r\u1eb9\u0301", + "\u00c8r\u00e8l\u00e8", + "\u1eb8r\u1eb9\u0300n\u00e0", + "\u00ccgb\u00e9", + "\u1eb8\u0300bibi", + "\u00d2k\u00fadu", + "Ag\u1eb9m\u1ecd", + "\u00d2g\u00fan", + "Owewe", + "\u1ecc\u0300w\u00e0r\u00e0", + "B\u00e9l\u00fa", + "\u1ecc\u0300p\u1eb9\u0300" + ], + "STANDALONEMONTH": [ + "O\u1e63\u00f9 \u1e62\u1eb9\u0301r\u1eb9\u0301", + "O\u1e63\u00f9 \u00c8r\u00e8l\u00e8", + "O\u1e63\u00f9 \u1eb8r\u1eb9\u0300n\u00e0", + "O\u1e63\u00f9 \u00ccgb\u00e9", + "O\u1e63\u00f9 \u1eb8\u0300bibi", + "O\u1e63\u00f9 \u00d2k\u00fadu", + "O\u1e63\u00f9 Ag\u1eb9m\u1ecd", + "O\u1e63\u00f9 \u00d2g\u00fan", + "O\u1e63\u00f9 Owewe", + "O\u1e63\u00f9 \u1ecc\u0300w\u00e0r\u00e0", + "O\u1e63\u00f9 B\u00e9l\u00fa", + "O\u1e63\u00f9 \u1ecc\u0300p\u1eb9\u0300" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/y HH:mm", + "shortDate": "dd/MM/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20a6", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "yo", + "localeID": "yo", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_yue-hk.js b/1.6.6/i18n/angular-locale_yue-hk.js new file mode 100644 index 000000000..294e3bdb2 --- /dev/null +++ b/1.6.6/i18n/angular-locale_yue-hk.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u4e0a\u5348", + "\u4e0b\u5348" + ], + "DAY": [ + "\u661f\u671f\u65e5", + "\u661f\u671f\u4e00", + "\u661f\u671f\u4e8c", + "\u661f\u671f\u4e09", + "\u661f\u671f\u56db", + "\u661f\u671f\u4e94", + "\u661f\u671f\u516d" + ], + "ERANAMES": [ + "\u897f\u5143\u524d", + "\u897f\u5143" + ], + "ERAS": [ + "\u897f\u5143\u524d", + "\u897f\u5143" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "SHORTDAY": [ + "\u9031\u65e5", + "\u9031\u4e00", + "\u9031\u4e8c", + "\u9031\u4e09", + "\u9031\u56db", + "\u9031\u4e94", + "\u9031\u516d" + ], + "SHORTMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "STANDALONEMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y\u5e74M\u6708d\u65e5 EEEE", + "longDate": "y\u5e74M\u6708d\u65e5", + "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss", + "mediumDate": "y\u5e74M\u6708d\u65e5", + "mediumTime": "ah:mm:ss", + "short": "y/M/d ah:mm", + "shortDate": "y/M/d", + "shortTime": "ah:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "yue-hk", + "localeID": "yue_HK", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_yue.js b/1.6.6/i18n/angular-locale_yue.js new file mode 100644 index 000000000..cf1c4aaf1 --- /dev/null +++ b/1.6.6/i18n/angular-locale_yue.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u4e0a\u5348", + "\u4e0b\u5348" + ], + "DAY": [ + "\u661f\u671f\u65e5", + "\u661f\u671f\u4e00", + "\u661f\u671f\u4e8c", + "\u661f\u671f\u4e09", + "\u661f\u671f\u56db", + "\u661f\u671f\u4e94", + "\u661f\u671f\u516d" + ], + "ERANAMES": [ + "\u897f\u5143\u524d", + "\u897f\u5143" + ], + "ERAS": [ + "\u897f\u5143\u524d", + "\u897f\u5143" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "SHORTDAY": [ + "\u9031\u65e5", + "\u9031\u4e00", + "\u9031\u4e8c", + "\u9031\u4e09", + "\u9031\u56db", + "\u9031\u4e94", + "\u9031\u516d" + ], + "SHORTMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "STANDALONEMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y\u5e74M\u6708d\u65e5 EEEE", + "longDate": "y\u5e74M\u6708d\u65e5", + "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss", + "mediumDate": "y\u5e74M\u6708d\u65e5", + "mediumTime": "ah:mm:ss", + "short": "y/M/d ah:mm", + "shortDate": "y/M/d", + "shortTime": "ah:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "yue", + "localeID": "yue", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_zgh-ma.js b/1.6.6/i18n/angular-locale_zgh-ma.js new file mode 100644 index 000000000..3e6aea22b --- /dev/null +++ b/1.6.6/i18n/angular-locale_zgh-ma.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u2d5c\u2d49\u2d3c\u2d30\u2d61\u2d5c", + "\u2d5c\u2d30\u2d37\u2d33\u2d33\u2d6f\u2d30\u2d5c" + ], + "DAY": [ + "\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59", + "\u2d30\u2d62\u2d4f\u2d30\u2d59", + "\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59", + "\u2d30\u2d3d\u2d55\u2d30\u2d59", + "\u2d30\u2d3d\u2d61\u2d30\u2d59", + "\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59", + "\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59" + ], + "ERANAMES": [ + "\u2d37\u2d30\u2d5c \u2d4f \u2d44\u2d49\u2d59\u2d30", + "\u2d37\u2d3c\u2d3c\u2d49\u2d54 \u2d4f \u2d44\u2d49\u2d59\u2d30" + ], + "ERAS": [ + "\u2d37\u2d30\u2d44", + "\u2d37\u2d3c\u2d44" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54", + "\u2d31\u2d55\u2d30\u2d62\u2d55", + "\u2d4e\u2d30\u2d55\u2d5a", + "\u2d49\u2d31\u2d54\u2d49\u2d54", + "\u2d4e\u2d30\u2d62\u2d62\u2d53", + "\u2d62\u2d53\u2d4f\u2d62\u2d53", + "\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63", + "\u2d56\u2d53\u2d5b\u2d5c", + "\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54", + "\u2d3d\u2d5c\u2d53\u2d31\u2d54", + "\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54", + "\u2d37\u2d53\u2d4a\u2d30\u2d4f\u2d31\u2d49\u2d54" + ], + "SHORTDAY": [ + "\u2d30\u2d59\u2d30", + "\u2d30\u2d62\u2d4f", + "\u2d30\u2d59\u2d49", + "\u2d30\u2d3d\u2d55", + "\u2d30\u2d3d\u2d61", + "\u2d30\u2d59\u2d49\u2d4e", + "\u2d30\u2d59\u2d49\u2d39" + ], + "SHORTMONTH": [ + "\u2d49\u2d4f\u2d4f", + "\u2d31\u2d55\u2d30", + "\u2d4e\u2d30\u2d55", + "\u2d49\u2d31\u2d54", + "\u2d4e\u2d30\u2d62", + "\u2d62\u2d53\u2d4f", + "\u2d62\u2d53\u2d4d", + "\u2d56\u2d53\u2d5b", + "\u2d5b\u2d53\u2d5c", + "\u2d3d\u2d5c\u2d53", + "\u2d4f\u2d53\u2d61", + "\u2d37\u2d53\u2d4a" + ], + "STANDALONEMONTH": [ + "\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54", + "\u2d31\u2d55\u2d30\u2d62\u2d55", + "\u2d4e\u2d30\u2d55\u2d5a", + "\u2d49\u2d31\u2d54\u2d49\u2d54", + "\u2d4e\u2d30\u2d62\u2d62\u2d53", + "\u2d62\u2d53\u2d4f\u2d62\u2d53", + "\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63", + "\u2d56\u2d53\u2d5b\u2d5c", + "\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54", + "\u2d3d\u2d5c\u2d53\u2d31\u2d54", + "\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54", + "\u2d37\u2d53\u2d4a\u2d30\u2d4f\u2d31\u2d49\u2d54" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "dh", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "zgh-ma", + "localeID": "zgh_MA", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_zgh.js b/1.6.6/i18n/angular-locale_zgh.js new file mode 100644 index 000000000..9f51e216e --- /dev/null +++ b/1.6.6/i18n/angular-locale_zgh.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u2d5c\u2d49\u2d3c\u2d30\u2d61\u2d5c", + "\u2d5c\u2d30\u2d37\u2d33\u2d33\u2d6f\u2d30\u2d5c" + ], + "DAY": [ + "\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59", + "\u2d30\u2d62\u2d4f\u2d30\u2d59", + "\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59", + "\u2d30\u2d3d\u2d55\u2d30\u2d59", + "\u2d30\u2d3d\u2d61\u2d30\u2d59", + "\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59", + "\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59" + ], + "ERANAMES": [ + "\u2d37\u2d30\u2d5c \u2d4f \u2d44\u2d49\u2d59\u2d30", + "\u2d37\u2d3c\u2d3c\u2d49\u2d54 \u2d4f \u2d44\u2d49\u2d59\u2d30" + ], + "ERAS": [ + "\u2d37\u2d30\u2d44", + "\u2d37\u2d3c\u2d44" + ], + "FIRSTDAYOFWEEK": 5, + "MONTH": [ + "\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54", + "\u2d31\u2d55\u2d30\u2d62\u2d55", + "\u2d4e\u2d30\u2d55\u2d5a", + "\u2d49\u2d31\u2d54\u2d49\u2d54", + "\u2d4e\u2d30\u2d62\u2d62\u2d53", + "\u2d62\u2d53\u2d4f\u2d62\u2d53", + "\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63", + "\u2d56\u2d53\u2d5b\u2d5c", + "\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54", + "\u2d3d\u2d5c\u2d53\u2d31\u2d54", + "\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54", + "\u2d37\u2d53\u2d4a\u2d30\u2d4f\u2d31\u2d49\u2d54" + ], + "SHORTDAY": [ + "\u2d30\u2d59\u2d30", + "\u2d30\u2d62\u2d4f", + "\u2d30\u2d59\u2d49", + "\u2d30\u2d3d\u2d55", + "\u2d30\u2d3d\u2d61", + "\u2d30\u2d59\u2d49\u2d4e", + "\u2d30\u2d59\u2d49\u2d39" + ], + "SHORTMONTH": [ + "\u2d49\u2d4f\u2d4f", + "\u2d31\u2d55\u2d30", + "\u2d4e\u2d30\u2d55", + "\u2d49\u2d31\u2d54", + "\u2d4e\u2d30\u2d62", + "\u2d62\u2d53\u2d4f", + "\u2d62\u2d53\u2d4d", + "\u2d56\u2d53\u2d5b", + "\u2d5b\u2d53\u2d5c", + "\u2d3d\u2d5c\u2d53", + "\u2d4f\u2d53\u2d61", + "\u2d37\u2d53\u2d4a" + ], + "STANDALONEMONTH": [ + "\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54", + "\u2d31\u2d55\u2d30\u2d62\u2d55", + "\u2d4e\u2d30\u2d55\u2d5a", + "\u2d49\u2d31\u2d54\u2d49\u2d54", + "\u2d4e\u2d30\u2d62\u2d62\u2d53", + "\u2d62\u2d53\u2d4f\u2d62\u2d53", + "\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63", + "\u2d56\u2d53\u2d5b\u2d5c", + "\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54", + "\u2d3d\u2d5c\u2d53\u2d31\u2d54", + "\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54", + "\u2d37\u2d53\u2d4a\u2d30\u2d4f\u2d31\u2d49\u2d54" + ], + "WEEKENDRANGE": [ + 4, + 5 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "d/M/y HH:mm", + "shortDate": "d/M/y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "dh", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a4", + "posPre": "", + "posSuf": "\u00a4" + } + ] + }, + "id": "zgh", + "localeID": "zgh", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_zh-cn.js b/1.6.6/i18n/angular-locale_zh-cn.js new file mode 100644 index 000000000..0471b82b6 --- /dev/null +++ b/1.6.6/i18n/angular-locale_zh-cn.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u4e0a\u5348", + "\u4e0b\u5348" + ], + "DAY": [ + "\u661f\u671f\u65e5", + "\u661f\u671f\u4e00", + "\u661f\u671f\u4e8c", + "\u661f\u671f\u4e09", + "\u661f\u671f\u56db", + "\u661f\u671f\u4e94", + "\u661f\u671f\u516d" + ], + "ERANAMES": [ + "\u516c\u5143\u524d", + "\u516c\u5143" + ], + "ERAS": [ + "\u516c\u5143\u524d", + "\u516c\u5143" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u4e00\u6708", + "\u4e8c\u6708", + "\u4e09\u6708", + "\u56db\u6708", + "\u4e94\u6708", + "\u516d\u6708", + "\u4e03\u6708", + "\u516b\u6708", + "\u4e5d\u6708", + "\u5341\u6708", + "\u5341\u4e00\u6708", + "\u5341\u4e8c\u6708" + ], + "SHORTDAY": [ + "\u5468\u65e5", + "\u5468\u4e00", + "\u5468\u4e8c", + "\u5468\u4e09", + "\u5468\u56db", + "\u5468\u4e94", + "\u5468\u516d" + ], + "SHORTMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "STANDALONEMONTH": [ + "\u4e00\u6708", + "\u4e8c\u6708", + "\u4e09\u6708", + "\u56db\u6708", + "\u4e94\u6708", + "\u516d\u6708", + "\u4e03\u6708", + "\u516b\u6708", + "\u4e5d\u6708", + "\u5341\u6708", + "\u5341\u4e00\u6708", + "\u5341\u4e8c\u6708" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y\u5e74M\u6708d\u65e5EEEE", + "longDate": "y\u5e74M\u6708d\u65e5", + "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss", + "mediumDate": "y\u5e74M\u6708d\u65e5", + "mediumTime": "ah:mm:ss", + "short": "y/M/d ah:mm", + "shortDate": "y/M/d", + "shortTime": "ah:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a5", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "zh-cn", + "localeID": "zh_CN", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_zh-hans-cn.js b/1.6.6/i18n/angular-locale_zh-hans-cn.js new file mode 100644 index 000000000..ddec04514 --- /dev/null +++ b/1.6.6/i18n/angular-locale_zh-hans-cn.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u4e0a\u5348", + "\u4e0b\u5348" + ], + "DAY": [ + "\u661f\u671f\u65e5", + "\u661f\u671f\u4e00", + "\u661f\u671f\u4e8c", + "\u661f\u671f\u4e09", + "\u661f\u671f\u56db", + "\u661f\u671f\u4e94", + "\u661f\u671f\u516d" + ], + "ERANAMES": [ + "\u516c\u5143\u524d", + "\u516c\u5143" + ], + "ERAS": [ + "\u516c\u5143\u524d", + "\u516c\u5143" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u4e00\u6708", + "\u4e8c\u6708", + "\u4e09\u6708", + "\u56db\u6708", + "\u4e94\u6708", + "\u516d\u6708", + "\u4e03\u6708", + "\u516b\u6708", + "\u4e5d\u6708", + "\u5341\u6708", + "\u5341\u4e00\u6708", + "\u5341\u4e8c\u6708" + ], + "SHORTDAY": [ + "\u5468\u65e5", + "\u5468\u4e00", + "\u5468\u4e8c", + "\u5468\u4e09", + "\u5468\u56db", + "\u5468\u4e94", + "\u5468\u516d" + ], + "SHORTMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "STANDALONEMONTH": [ + "\u4e00\u6708", + "\u4e8c\u6708", + "\u4e09\u6708", + "\u56db\u6708", + "\u4e94\u6708", + "\u516d\u6708", + "\u4e03\u6708", + "\u516b\u6708", + "\u4e5d\u6708", + "\u5341\u6708", + "\u5341\u4e00\u6708", + "\u5341\u4e8c\u6708" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y\u5e74M\u6708d\u65e5EEEE", + "longDate": "y\u5e74M\u6708d\u65e5", + "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss", + "mediumDate": "y\u5e74M\u6708d\u65e5", + "mediumTime": "ah:mm:ss", + "short": "y/M/d ah:mm", + "shortDate": "y/M/d", + "shortTime": "ah:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a5", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "zh-hans-cn", + "localeID": "zh_Hans_CN", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_zh-hans-hk.js b/1.6.6/i18n/angular-locale_zh-hans-hk.js new file mode 100644 index 000000000..f19d3ffda --- /dev/null +++ b/1.6.6/i18n/angular-locale_zh-hans-hk.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u4e0a\u5348", + "\u4e0b\u5348" + ], + "DAY": [ + "\u661f\u671f\u65e5", + "\u661f\u671f\u4e00", + "\u661f\u671f\u4e8c", + "\u661f\u671f\u4e09", + "\u661f\u671f\u56db", + "\u661f\u671f\u4e94", + "\u661f\u671f\u516d" + ], + "ERANAMES": [ + "\u516c\u5143\u524d", + "\u516c\u5143" + ], + "ERAS": [ + "\u516c\u5143\u524d", + "\u516c\u5143" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u4e00\u6708", + "\u4e8c\u6708", + "\u4e09\u6708", + "\u56db\u6708", + "\u4e94\u6708", + "\u516d\u6708", + "\u4e03\u6708", + "\u516b\u6708", + "\u4e5d\u6708", + "\u5341\u6708", + "\u5341\u4e00\u6708", + "\u5341\u4e8c\u6708" + ], + "SHORTDAY": [ + "\u5468\u65e5", + "\u5468\u4e00", + "\u5468\u4e8c", + "\u5468\u4e09", + "\u5468\u56db", + "\u5468\u4e94", + "\u5468\u516d" + ], + "SHORTMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "STANDALONEMONTH": [ + "\u4e00\u6708", + "\u4e8c\u6708", + "\u4e09\u6708", + "\u56db\u6708", + "\u4e94\u6708", + "\u516d\u6708", + "\u4e03\u6708", + "\u516b\u6708", + "\u4e5d\u6708", + "\u5341\u6708", + "\u5341\u4e00\u6708", + "\u5341\u4e8c\u6708" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y\u5e74M\u6708d\u65e5EEEE", + "longDate": "y\u5e74M\u6708d\u65e5", + "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss", + "mediumDate": "y\u5e74M\u6708d\u65e5", + "mediumTime": "ah:mm:ss", + "short": "d/M/yy ah:mm", + "shortDate": "d/M/yy", + "shortTime": "ah:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "zh-hans-hk", + "localeID": "zh_Hans_HK", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_zh-hans-mo.js b/1.6.6/i18n/angular-locale_zh-hans-mo.js new file mode 100644 index 000000000..a5f5f6b89 --- /dev/null +++ b/1.6.6/i18n/angular-locale_zh-hans-mo.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u4e0a\u5348", + "\u4e0b\u5348" + ], + "DAY": [ + "\u661f\u671f\u65e5", + "\u661f\u671f\u4e00", + "\u661f\u671f\u4e8c", + "\u661f\u671f\u4e09", + "\u661f\u671f\u56db", + "\u661f\u671f\u4e94", + "\u661f\u671f\u516d" + ], + "ERANAMES": [ + "\u516c\u5143\u524d", + "\u516c\u5143" + ], + "ERAS": [ + "\u516c\u5143\u524d", + "\u516c\u5143" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u4e00\u6708", + "\u4e8c\u6708", + "\u4e09\u6708", + "\u56db\u6708", + "\u4e94\u6708", + "\u516d\u6708", + "\u4e03\u6708", + "\u516b\u6708", + "\u4e5d\u6708", + "\u5341\u6708", + "\u5341\u4e00\u6708", + "\u5341\u4e8c\u6708" + ], + "SHORTDAY": [ + "\u5468\u65e5", + "\u5468\u4e00", + "\u5468\u4e8c", + "\u5468\u4e09", + "\u5468\u56db", + "\u5468\u4e94", + "\u5468\u516d" + ], + "SHORTMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "STANDALONEMONTH": [ + "\u4e00\u6708", + "\u4e8c\u6708", + "\u4e09\u6708", + "\u56db\u6708", + "\u4e94\u6708", + "\u516d\u6708", + "\u4e03\u6708", + "\u516b\u6708", + "\u4e5d\u6708", + "\u5341\u6708", + "\u5341\u4e00\u6708", + "\u5341\u4e8c\u6708" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y\u5e74M\u6708d\u65e5EEEE", + "longDate": "y\u5e74M\u6708d\u65e5", + "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss", + "mediumDate": "y\u5e74M\u6708d\u65e5", + "mediumTime": "ah:mm:ss", + "short": "d/M/yy ah:mm", + "shortDate": "d/M/yy", + "shortTime": "ah:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "MOP", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "zh-hans-mo", + "localeID": "zh_Hans_MO", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_zh-hans-sg.js b/1.6.6/i18n/angular-locale_zh-hans-sg.js new file mode 100644 index 000000000..9e9f6a428 --- /dev/null +++ b/1.6.6/i18n/angular-locale_zh-hans-sg.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u4e0a\u5348", + "\u4e0b\u5348" + ], + "DAY": [ + "\u661f\u671f\u65e5", + "\u661f\u671f\u4e00", + "\u661f\u671f\u4e8c", + "\u661f\u671f\u4e09", + "\u661f\u671f\u56db", + "\u661f\u671f\u4e94", + "\u661f\u671f\u516d" + ], + "ERANAMES": [ + "\u516c\u5143\u524d", + "\u516c\u5143" + ], + "ERAS": [ + "\u516c\u5143\u524d", + "\u516c\u5143" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u4e00\u6708", + "\u4e8c\u6708", + "\u4e09\u6708", + "\u56db\u6708", + "\u4e94\u6708", + "\u516d\u6708", + "\u4e03\u6708", + "\u516b\u6708", + "\u4e5d\u6708", + "\u5341\u6708", + "\u5341\u4e00\u6708", + "\u5341\u4e8c\u6708" + ], + "SHORTDAY": [ + "\u5468\u65e5", + "\u5468\u4e00", + "\u5468\u4e8c", + "\u5468\u4e09", + "\u5468\u56db", + "\u5468\u4e94", + "\u5468\u516d" + ], + "SHORTMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "STANDALONEMONTH": [ + "\u4e00\u6708", + "\u4e8c\u6708", + "\u4e09\u6708", + "\u56db\u6708", + "\u4e94\u6708", + "\u516d\u6708", + "\u4e03\u6708", + "\u516b\u6708", + "\u4e5d\u6708", + "\u5341\u6708", + "\u5341\u4e00\u6708", + "\u5341\u4e8c\u6708" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y\u5e74M\u6708d\u65e5EEEE", + "longDate": "y\u5e74M\u6708d\u65e5", + "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss", + "mediumDate": "y\u5e74M\u6708d\u65e5", + "mediumTime": "ah:mm:ss", + "short": "dd/MM/yy ah:mm", + "shortDate": "dd/MM/yy", + "shortTime": "ah:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "zh-hans-sg", + "localeID": "zh_Hans_SG", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_zh-hans.js b/1.6.6/i18n/angular-locale_zh-hans.js new file mode 100644 index 000000000..5948e7cd0 --- /dev/null +++ b/1.6.6/i18n/angular-locale_zh-hans.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u4e0a\u5348", + "\u4e0b\u5348" + ], + "DAY": [ + "\u661f\u671f\u65e5", + "\u661f\u671f\u4e00", + "\u661f\u671f\u4e8c", + "\u661f\u671f\u4e09", + "\u661f\u671f\u56db", + "\u661f\u671f\u4e94", + "\u661f\u671f\u516d" + ], + "ERANAMES": [ + "\u516c\u5143\u524d", + "\u516c\u5143" + ], + "ERAS": [ + "\u516c\u5143\u524d", + "\u516c\u5143" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u4e00\u6708", + "\u4e8c\u6708", + "\u4e09\u6708", + "\u56db\u6708", + "\u4e94\u6708", + "\u516d\u6708", + "\u4e03\u6708", + "\u516b\u6708", + "\u4e5d\u6708", + "\u5341\u6708", + "\u5341\u4e00\u6708", + "\u5341\u4e8c\u6708" + ], + "SHORTDAY": [ + "\u5468\u65e5", + "\u5468\u4e00", + "\u5468\u4e8c", + "\u5468\u4e09", + "\u5468\u56db", + "\u5468\u4e94", + "\u5468\u516d" + ], + "SHORTMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "STANDALONEMONTH": [ + "\u4e00\u6708", + "\u4e8c\u6708", + "\u4e09\u6708", + "\u56db\u6708", + "\u4e94\u6708", + "\u516d\u6708", + "\u4e03\u6708", + "\u516b\u6708", + "\u4e5d\u6708", + "\u5341\u6708", + "\u5341\u4e00\u6708", + "\u5341\u4e8c\u6708" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y\u5e74M\u6708d\u65e5EEEE", + "longDate": "y\u5e74M\u6708d\u65e5", + "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss", + "mediumDate": "y\u5e74M\u6708d\u65e5", + "mediumTime": "ah:mm:ss", + "short": "y/M/d ah:mm", + "shortDate": "y/M/d", + "shortTime": "ah:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a5", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "zh-hans", + "localeID": "zh_Hans", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_zh-hant-hk.js b/1.6.6/i18n/angular-locale_zh-hant-hk.js new file mode 100644 index 000000000..cc19c70f8 --- /dev/null +++ b/1.6.6/i18n/angular-locale_zh-hant-hk.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u4e0a\u5348", + "\u4e0b\u5348" + ], + "DAY": [ + "\u661f\u671f\u65e5", + "\u661f\u671f\u4e00", + "\u661f\u671f\u4e8c", + "\u661f\u671f\u4e09", + "\u661f\u671f\u56db", + "\u661f\u671f\u4e94", + "\u661f\u671f\u516d" + ], + "ERANAMES": [ + "\u516c\u5143\u524d", + "\u516c\u5143" + ], + "ERAS": [ + "\u516c\u5143\u524d", + "\u516c\u5143" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "SHORTDAY": [ + "\u9031\u65e5", + "\u9031\u4e00", + "\u9031\u4e8c", + "\u9031\u4e09", + "\u9031\u56db", + "\u9031\u4e94", + "\u9031\u516d" + ], + "SHORTMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "STANDALONEMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y\u5e74M\u6708d\u65e5EEEE", + "longDate": "y\u5e74M\u6708d\u65e5", + "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss", + "mediumDate": "y\u5e74M\u6708d\u65e5", + "mediumTime": "ah:mm:ss", + "short": "d/M/y ah:mm", + "shortDate": "d/M/y", + "shortTime": "ah:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "zh-hant-hk", + "localeID": "zh_Hant_HK", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_zh-hant-mo.js b/1.6.6/i18n/angular-locale_zh-hant-mo.js new file mode 100644 index 000000000..8664ba0fe --- /dev/null +++ b/1.6.6/i18n/angular-locale_zh-hant-mo.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u4e0a\u5348", + "\u4e0b\u5348" + ], + "DAY": [ + "\u661f\u671f\u65e5", + "\u661f\u671f\u4e00", + "\u661f\u671f\u4e8c", + "\u661f\u671f\u4e09", + "\u661f\u671f\u56db", + "\u661f\u671f\u4e94", + "\u661f\u671f\u516d" + ], + "ERANAMES": [ + "\u516c\u5143\u524d", + "\u516c\u5143" + ], + "ERAS": [ + "\u516c\u5143\u524d", + "\u516c\u5143" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "SHORTDAY": [ + "\u9031\u65e5", + "\u9031\u4e00", + "\u9031\u4e8c", + "\u9031\u4e09", + "\u9031\u56db", + "\u9031\u4e94", + "\u9031\u516d" + ], + "SHORTMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "STANDALONEMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y\u5e74M\u6708d\u65e5EEEE", + "longDate": "y\u5e74M\u6708d\u65e5", + "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss", + "mediumDate": "y\u5e74M\u6708d\u65e5", + "mediumTime": "ah:mm:ss", + "short": "d/M/y ah:mm", + "shortDate": "d/M/y", + "shortTime": "ah:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "MOP", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "zh-hant-mo", + "localeID": "zh_Hant_MO", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_zh-hant-tw.js b/1.6.6/i18n/angular-locale_zh-hant-tw.js new file mode 100644 index 000000000..870b74a5c --- /dev/null +++ b/1.6.6/i18n/angular-locale_zh-hant-tw.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u4e0a\u5348", + "\u4e0b\u5348" + ], + "DAY": [ + "\u661f\u671f\u65e5", + "\u661f\u671f\u4e00", + "\u661f\u671f\u4e8c", + "\u661f\u671f\u4e09", + "\u661f\u671f\u56db", + "\u661f\u671f\u4e94", + "\u661f\u671f\u516d" + ], + "ERANAMES": [ + "\u897f\u5143\u524d", + "\u897f\u5143" + ], + "ERAS": [ + "\u897f\u5143\u524d", + "\u897f\u5143" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "SHORTDAY": [ + "\u9031\u65e5", + "\u9031\u4e00", + "\u9031\u4e8c", + "\u9031\u4e09", + "\u9031\u56db", + "\u9031\u4e94", + "\u9031\u516d" + ], + "SHORTMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "STANDALONEMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y\u5e74M\u6708d\u65e5 EEEE", + "longDate": "y\u5e74M\u6708d\u65e5", + "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss", + "mediumDate": "y\u5e74M\u6708d\u65e5", + "mediumTime": "ah:mm:ss", + "short": "y/M/d ah:mm", + "shortDate": "y/M/d", + "shortTime": "ah:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "NT$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "zh-hant-tw", + "localeID": "zh_Hant_TW", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_zh-hant.js b/1.6.6/i18n/angular-locale_zh-hant.js new file mode 100644 index 000000000..38dbf142a --- /dev/null +++ b/1.6.6/i18n/angular-locale_zh-hant.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u4e0a\u5348", + "\u4e0b\u5348" + ], + "DAY": [ + "\u661f\u671f\u65e5", + "\u661f\u671f\u4e00", + "\u661f\u671f\u4e8c", + "\u661f\u671f\u4e09", + "\u661f\u671f\u56db", + "\u661f\u671f\u4e94", + "\u661f\u671f\u516d" + ], + "ERANAMES": [ + "\u897f\u5143\u524d", + "\u897f\u5143" + ], + "ERAS": [ + "\u897f\u5143\u524d", + "\u897f\u5143" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "SHORTDAY": [ + "\u9031\u65e5", + "\u9031\u4e00", + "\u9031\u4e8c", + "\u9031\u4e09", + "\u9031\u56db", + "\u9031\u4e94", + "\u9031\u516d" + ], + "SHORTMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "STANDALONEMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y\u5e74M\u6708d\u65e5 EEEE", + "longDate": "y\u5e74M\u6708d\u65e5", + "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss", + "mediumDate": "y\u5e74M\u6708d\u65e5", + "mediumTime": "ah:mm:ss", + "short": "y/M/d ah:mm", + "shortDate": "y/M/d", + "shortTime": "ah:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "NT$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "zh-hant", + "localeID": "zh_Hant", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_zh-hk.js b/1.6.6/i18n/angular-locale_zh-hk.js new file mode 100644 index 000000000..fc7724368 --- /dev/null +++ b/1.6.6/i18n/angular-locale_zh-hk.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u4e0a\u5348", + "\u4e0b\u5348" + ], + "DAY": [ + "\u661f\u671f\u65e5", + "\u661f\u671f\u4e00", + "\u661f\u671f\u4e8c", + "\u661f\u671f\u4e09", + "\u661f\u671f\u56db", + "\u661f\u671f\u4e94", + "\u661f\u671f\u516d" + ], + "ERANAMES": [ + "\u516c\u5143\u524d", + "\u516c\u5143" + ], + "ERAS": [ + "\u516c\u5143\u524d", + "\u516c\u5143" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "SHORTDAY": [ + "\u9031\u65e5", + "\u9031\u4e00", + "\u9031\u4e8c", + "\u9031\u4e09", + "\u9031\u56db", + "\u9031\u4e94", + "\u9031\u516d" + ], + "SHORTMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "STANDALONEMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y\u5e74M\u6708d\u65e5EEEE", + "longDate": "y\u5e74M\u6708d\u65e5", + "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss", + "mediumDate": "y\u5e74M\u6708d\u65e5", + "mediumTime": "ah:mm:ss", + "short": "d/M/y ah:mm", + "shortDate": "d/M/y", + "shortTime": "ah:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "zh-hk", + "localeID": "zh_HK", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_zh-tw.js b/1.6.6/i18n/angular-locale_zh-tw.js new file mode 100644 index 000000000..53b1b3db8 --- /dev/null +++ b/1.6.6/i18n/angular-locale_zh-tw.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u4e0a\u5348", + "\u4e0b\u5348" + ], + "DAY": [ + "\u661f\u671f\u65e5", + "\u661f\u671f\u4e00", + "\u661f\u671f\u4e8c", + "\u661f\u671f\u4e09", + "\u661f\u671f\u56db", + "\u661f\u671f\u4e94", + "\u661f\u671f\u516d" + ], + "ERANAMES": [ + "\u897f\u5143\u524d", + "\u897f\u5143" + ], + "ERAS": [ + "\u897f\u5143\u524d", + "\u897f\u5143" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "SHORTDAY": [ + "\u9031\u65e5", + "\u9031\u4e00", + "\u9031\u4e8c", + "\u9031\u4e09", + "\u9031\u56db", + "\u9031\u4e94", + "\u9031\u516d" + ], + "SHORTMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "STANDALONEMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y\u5e74M\u6708d\u65e5 EEEE", + "longDate": "y\u5e74M\u6708d\u65e5", + "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss", + "mediumDate": "y\u5e74M\u6708d\u65e5", + "mediumTime": "ah:mm:ss", + "short": "y/M/d ah:mm", + "shortDate": "y/M/d", + "shortTime": "ah:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "NT$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "zh-tw", + "localeID": "zh_TW", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_zh.js b/1.6.6/i18n/angular-locale_zh.js new file mode 100644 index 000000000..733488040 --- /dev/null +++ b/1.6.6/i18n/angular-locale_zh.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u4e0a\u5348", + "\u4e0b\u5348" + ], + "DAY": [ + "\u661f\u671f\u65e5", + "\u661f\u671f\u4e00", + "\u661f\u671f\u4e8c", + "\u661f\u671f\u4e09", + "\u661f\u671f\u56db", + "\u661f\u671f\u4e94", + "\u661f\u671f\u516d" + ], + "ERANAMES": [ + "\u516c\u5143\u524d", + "\u516c\u5143" + ], + "ERAS": [ + "\u516c\u5143\u524d", + "\u516c\u5143" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "\u4e00\u6708", + "\u4e8c\u6708", + "\u4e09\u6708", + "\u56db\u6708", + "\u4e94\u6708", + "\u516d\u6708", + "\u4e03\u6708", + "\u516b\u6708", + "\u4e5d\u6708", + "\u5341\u6708", + "\u5341\u4e00\u6708", + "\u5341\u4e8c\u6708" + ], + "SHORTDAY": [ + "\u5468\u65e5", + "\u5468\u4e00", + "\u5468\u4e8c", + "\u5468\u4e09", + "\u5468\u56db", + "\u5468\u4e94", + "\u5468\u516d" + ], + "SHORTMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "STANDALONEMONTH": [ + "\u4e00\u6708", + "\u4e8c\u6708", + "\u4e09\u6708", + "\u56db\u6708", + "\u4e94\u6708", + "\u516d\u6708", + "\u4e03\u6708", + "\u516b\u6708", + "\u4e5d\u6708", + "\u5341\u6708", + "\u5341\u4e00\u6708", + "\u5341\u4e8c\u6708" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y\u5e74M\u6708d\u65e5EEEE", + "longDate": "y\u5e74M\u6708d\u65e5", + "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss", + "mediumDate": "y\u5e74M\u6708d\u65e5", + "mediumTime": "ah:mm:ss", + "short": "y/M/d ah:mm", + "shortDate": "y/M/d", + "shortTime": "ah:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a5", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "zh", + "localeID": "zh", + "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_zu-za.js b/1.6.6/i18n/angular-locale_zu-za.js new file mode 100644 index 000000000..293982325 --- /dev/null +++ b/1.6.6/i18n/angular-locale_zu-za.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "ISonto", + "UMsombuluko", + "ULwesibili", + "ULwesithathu", + "ULwesine", + "ULwesihlanu", + "UMgqibelo" + ], + "ERANAMES": [ + "BC", + "AD" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "UMasingana", + "Februwari", + "Mashi", + "Ephreli", + "Meyi", + "Juni", + "Julayi", + "Agasti", + "Septhemba", + "Okthoba", + "Novemba", + "Disemba" + ], + "SHORTDAY": [ + "Son", + "Mso", + "Bil", + "Tha", + "Sin", + "Hla", + "Mgq" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mas", + "Eph", + "Mey", + "Jun", + "Jul", + "Aga", + "Sep", + "Okt", + "Nov", + "Dis" + ], + "STANDALONEMONTH": [ + "Januwari", + "Februwari", + "Mashi", + "Ephreli", + "Meyi", + "Juni", + "Julayi", + "Agasti", + "Septhemba", + "Okthoba", + "Novemba", + "Disemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y HH:mm:ss", + "mediumDate": "MMM d, y", + "mediumTime": "HH:mm:ss", + "short": "M/d/yy HH:mm", + "shortDate": "M/d/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "R", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "zu-za", + "localeID": "zu_ZA", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/i18n/angular-locale_zu.js b/1.6.6/i18n/angular-locale_zu.js new file mode 100644 index 000000000..3d8029069 --- /dev/null +++ b/1.6.6/i18n/angular-locale_zu.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "ISonto", + "UMsombuluko", + "ULwesibili", + "ULwesithathu", + "ULwesine", + "ULwesihlanu", + "UMgqibelo" + ], + "ERANAMES": [ + "BC", + "AD" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "UMasingana", + "Februwari", + "Mashi", + "Ephreli", + "Meyi", + "Juni", + "Julayi", + "Agasti", + "Septhemba", + "Okthoba", + "Novemba", + "Disemba" + ], + "SHORTDAY": [ + "Son", + "Mso", + "Bil", + "Tha", + "Sin", + "Hla", + "Mgq" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mas", + "Eph", + "Mey", + "Jun", + "Jul", + "Aga", + "Sep", + "Okt", + "Nov", + "Dis" + ], + "STANDALONEMONTH": [ + "Januwari", + "Februwari", + "Mashi", + "Ephreli", + "Meyi", + "Juni", + "Julayi", + "Agasti", + "Septhemba", + "Okthoba", + "Novemba", + "Disemba" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y HH:mm:ss", + "mediumDate": "MMM d, y", + "mediumTime": "HH:mm:ss", + "short": "M/d/yy HH:mm", + "shortDate": "M/d/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "R", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "zu", + "localeID": "zu", + "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/1.6.6/version.json b/1.6.6/version.json new file mode 100644 index 000000000..9eb4aa905 --- /dev/null +++ b/1.6.6/version.json @@ -0,0 +1 @@ +{"raw":"v1.6.6","major":1,"minor":6,"patch":6,"prerelease":[],"build":[],"version":"1.6.6","codeName":"interdimensional-cable","full":"1.6.6","branch":"v1.6.x","cdn":{"raw":"v1.6.5","major":1,"minor":6,"patch":5,"prerelease":[],"build":[],"version":"1.6.5","docsUrl":"http://code.angularjs.org/1.6.5/docs"}} \ No newline at end of file diff --git a/1.6.6/version.txt b/1.6.6/version.txt new file mode 100644 index 000000000..83d1a5ebd --- /dev/null +++ b/1.6.6/version.txt @@ -0,0 +1 @@ +1.6.6 \ No newline at end of file