/*!
* Bootstrap v3.2.0 (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.2.0",d.prototype.close=function(b){function c(){f.detach().trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",c).emulateTransitionEnd(150):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.2.0",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),d[e](null==f[b]?this.options[b]:f[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b).on("keydown.bs.carousel",a.proxy(this.keydown,this)),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.2.0",c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},c.prototype.keydown=function(a){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.to=function(b){var c=this,d=this.getItemIndex(this.$active=this.$element.find(".item.active"));return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=e[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:g});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,f&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(e)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:g});return a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one("bsTransitionEnd",function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger(m)),f&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(b=!b),e||d.data("bs.collapse",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};c.VERSION="3.2.0",c.DEFAULTS={toggle:!0},c.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},c.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var c=a.Event("show.bs.collapse");if(this.$element.trigger(c),!c.isDefaultPrevented()){var d=this.$parent&&this.$parent.find("> .panel > .in");if(d&&d.length){var e=d.data("bs.collapse");if(e&&e.transitioning)return;b.call(d,"hide"),e||d.data("bs.collapse",null)}var f=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[f](0),this.transitioning=1;var g=function(){this.$element.removeClass("collapsing").addClass("collapse in")[f](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return g.call(this);var h=a.camelCase(["scroll",f].join("-"));this.$element.one("bsTransitionEnd",a.proxy(g,this)).emulateTransitionEnd(350)[f](this.$element[0][h])}}},c.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},c.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var d=a.fn.collapse;a.fn.collapse=b,a.fn.collapse.Constructor=c,a.fn.collapse.noConflict=function(){return a.fn.collapse=d,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(c){var d,e=a(this),f=e.attr("data-target")||c.preventDefault()||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),g=a(f),h=g.data("bs.collapse"),i=h?"toggle":e.data(),j=e.attr("data-parent"),k=j&&a(j);h&&h.transitioning||(k&&k.find('[data-toggle="collapse"][data-parent="'+j+'"]').not(e).addClass("collapsed"),e[g.hasClass("in")?"addClass":"removeClass"]("collapsed")),b.call(g,i)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.2.0",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('
').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.divider):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;e?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(150):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var f=function(){c.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",f).emulateTransitionEnd(150):f()}else b&&b()},c.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||"destroy"!=b)&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};c.VERSION="3.2.0",c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var c=a.contains(document.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!c)return;var d=this,e=this.tip(),f=this.getUID(this.type);this.setContent(),e.attr("id",f),this.$element.attr("aria-describedby",f),this.options.animation&&e.addClass("fade");var g="function"==typeof this.options.placement?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,h=/\s?auto?\s?/i,i=h.test(g);i&&(g=g.replace(h,"")||"top"),e.detach().css({top:0,left:0,display:"block"}).addClass(g).data("bs."+this.type,this),this.options.container?e.appendTo(this.options.container):e.insertAfter(this.$element);var j=this.getPosition(),k=e[0].offsetWidth,l=e[0].offsetHeight;if(i){var m=g,n=this.$element.parent(),o=this.getPosition(n);g="bottom"==g&&j.top+j.height+l-o.scroll>o.height?"top":"top"==g&&j.top-o.scroll-l<0?"bottom":"right"==g&&j.right+k>o.width?"left":"left"==g&&j.left-kg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||"destroy"!=b)&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.2.0",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").empty()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},c.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){var e=a.proxy(this.process,this);this.$body=a("body"),this.$scrollElement=a(a(c).is("body")?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.2.0",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b="offset",c=0;a.isWindow(this.$scrollElement[0])||(b="position",c=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var d=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+c,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){d.offsets.push(this[0]),d.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.2.0",c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.closest("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},c.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one("bsTransitionEnd",e).emulateTransitionEnd(150):e(),f.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(c){c.preventDefault(),b.call(a(this),"show")})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.2.0",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=a(document).height(),d=this.$target.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=b-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){null!=this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:b-this.$element.height()-h}))}}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},d.offsetBottom&&(d.offset.bottom=d.offsetBottom),d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
//! api-check version 7.5.5 built with ♥ by Kent C. Dodds (http://kent.doddsfamily.us) (ó ì_í)=óò=(ì_í ò)
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define(factory);
else if(typeof exports === 'object')
exports["apiCheck"] = factory();
else
root["apiCheck"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _apiCheck = __webpack_require__(1);
var _apiCheck2 = _interopRequireDefault(_apiCheck);
exports['default'] = _apiCheck2['default'];
module.exports = exports['default'];
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var stringify = __webpack_require__(2);
var apiCheckUtil = __webpack_require__(3);
var each = apiCheckUtil.each;
var isError = apiCheckUtil.isError;
var t = apiCheckUtil.t;
var arrayify = apiCheckUtil.arrayify;
var getCheckerDisplay = apiCheckUtil.getCheckerDisplay;
var typeOf = apiCheckUtil.typeOf;
var getError = apiCheckUtil.getError;
var checkers = __webpack_require__(4);
var apiCheckApis = getApiCheckApis();
module.exports = getApiCheckInstance;
module.exports.VERSION = ("7.5.5");
module.exports.utils = apiCheckUtil;
module.exports.globalConfig = {
verbose: false,
disabled: false
};
var apiCheckApiCheck = getApiCheckInstance({
output: { prefix: 'apiCheck' }
});
module.exports.internalChecker = apiCheckApiCheck;
each(checkers, function (checker, name) {
return module.exports[name] = checker;
});
function getApiCheckInstance() {
var config = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var extraCheckers = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
/* eslint complexity:[2, 6] */
if (apiCheckApiCheck && arguments.length) {
apiCheckApiCheck['throw'](apiCheckApis.getApiCheckInstanceCheckers, arguments, {
prefix: 'creating an apiCheck instance'
});
}
var additionalProperties = {
'throw': getApiCheck(true),
warn: getApiCheck(false),
getErrorMessage: getErrorMessage,
handleErrorMessage: handleErrorMessage,
config: {
output: config.output || {
prefix: '',
suffix: '',
docsBaseUrl: ''
},
verbose: config.verbose || false,
disabled: config.disabled || false
},
utils: apiCheckUtil
};
each(additionalProperties, function (wrapper, name) {
return apiCheck[name] = wrapper;
});
var disabled = apiCheck.disabled || module.exports.globalConfig.disabled;
each(checkers.getCheckers(disabled), function (checker, name) {
return apiCheck[name] = checker;
});
each(extraCheckers, function (checker, name) {
return apiCheck[name] = checker;
});
return apiCheck;
/**
* This is the instance function. Other things are attached to this see additional properties above.
* @param {Array} api - the checkers to check with
* @param {Array} args - the args to check
* @param {Object} output - output options
* @returns {Object} - if this has a failed = true property, then it failed
*/
function apiCheck(api, args, output) {
/* eslint complexity:[2, 8] */
if (apiCheck.config.disabled || module.exports.globalConfig.disabled) {
return {
apiTypes: {}, argTypes: {},
passed: true, message: '',
failed: false
}; // empty version of what is normally returned
}
checkApiCheckApi(arguments);
if (!Array.isArray(api)) {
api = [api];
args = [args];
} else {
// turn arguments into an array
args = Array.prototype.slice.call(args);
}
var messages = checkEnoughArgs(api, args);
if (!messages.length) {
// this is where we actually go perform the checks.
messages = checkApiWithArgs(api, args);
}
var returnObject = getTypes(api, args);
returnObject.args = args;
if (messages.length) {
returnObject.message = apiCheck.getErrorMessage(api, args, messages, output);
returnObject.failed = true;
returnObject.passed = false;
} else {
returnObject.message = '';
returnObject.failed = false;
returnObject.passed = true;
}
return returnObject;
}
/**
* checkApiCheckApi, should be read like: check apiCheck api. As in, check the api for apiCheck :-)
* @param {Array} checkApiArgs - args provided to apiCheck function
*/
function checkApiCheckApi(checkApiArgs) {
var api = checkApiArgs[0];
var args = checkApiArgs[1];
var isArrayOrArgs = Array.isArray(args) || args && typeof args === 'object' && typeof args.length === 'number';
if (Array.isArray(api) && !isArrayOrArgs) {
throw new Error(getErrorMessage(api, [args], ['If an array is provided for the api, an array must be provided for the args as well.'], { prefix: 'apiCheck' }));
}
// dog fooding here
var errors = checkApiWithArgs(apiCheckApis.checkApiCheckApi, checkApiArgs);
if (errors.length) {
var message = apiCheck.getErrorMessage(apiCheckApis.checkApiCheckApi, checkApiArgs, errors, {
prefix: 'apiCheck'
});
apiCheck.handleErrorMessage(message, true);
}
}
function getApiCheck(shouldThrow) {
return function apiCheckWrapper(api, args, output) {
var result = apiCheck(api, args, output);
apiCheck.handleErrorMessage(result.message, shouldThrow);
return result; // wont get here if an error is thrown
};
}
function handleErrorMessage(message, shouldThrow) {
if (shouldThrow && message) {
throw new Error(message);
} else if (message) {
/* eslint no-console:0 */
console.warn(message);
}
}
function getErrorMessage(api, args) {
var messages = arguments.length <= 2 || arguments[2] === undefined ? [] : arguments[2];
var output = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3];
var gOut = apiCheck.config.output || {};
var prefix = getPrefix();
var suffix = getSuffix();
var url = getUrl();
var message = 'apiCheck failed! ' + messages.join(', ');
var passedAndShouldHavePassed = '\n\n' + buildMessageFromApiAndArgs(api, args);
return (prefix + ' ' + message + ' ' + suffix + ' ' + (url || '') + passedAndShouldHavePassed).trim();
function getPrefix() {
var p = output.onlyPrefix;
if (!p) {
p = ((gOut.prefix || '') + ' ' + (output.prefix || '')).trim();
}
return p;
}
function getSuffix() {
var s = output.onlySuffix;
if (!s) {
s = ((output.suffix || '') + ' ' + (gOut.suffix || '')).trim();
}
return s;
}
function getUrl() {
var u = output.url;
if (!u) {
u = gOut.docsBaseUrl && output.urlSuffix && ('' + gOut.docsBaseUrl + output.urlSuffix).trim();
}
return u;
}
}
function buildMessageFromApiAndArgs(api, args) {
var _getTypes = getTypes(api, args);
var apiTypes = _getTypes.apiTypes;
var argTypes = _getTypes.argTypes;
var copy = Array.prototype.slice.call(args || []);
var replacedItems = [];
replaceFunctionWithName(copy);
var passedArgs = getObjectString(copy);
argTypes = getObjectString(argTypes);
apiTypes = getObjectString(apiTypes);
return generateMessage();
// functions
function replaceFunctionWithName(obj) {
each(obj, function (val, name) {
/* eslint complexity:[2, 6] */
if (replacedItems.indexOf(val) === -1) {
// avoid recursive problems
replacedItems.push(val);
if (typeof val === 'object') {
replaceFunctionWithName(obj);
} else if (typeof val === 'function') {
obj[name] = val.displayName || val.name || 'anonymous function';
}
}
});
}
function getObjectString(types) {
if (!types || !types.length) {
return 'nothing';
} else if (types && types.length === 1) {
types = types[0];
}
return stringify(types, null, 2);
}
function generateMessage() {
var n = '\n';
var useS = true;
if (args && args.length === 1) {
if (typeof args[0] === 'object' && args[0] !== null) {
useS = !!Object.keys(args[0]).length;
} else {
useS = false;
}
}
var types = 'type' + (useS ? 's' : '');
var newLine = n + n;
return 'You passed:' + n + passedArgs + newLine + ('With the ' + types + ':' + n + argTypes + newLine) + ('The API calls for:' + n + apiTypes);
}
}
function getTypes(api, args) {
api = arrayify(api);
args = arrayify(args);
var apiTypes = api.map(function (checker, index) {
var specified = module.exports.globalConfig.hasOwnProperty('verbose');
return getCheckerDisplay(checker, {
terse: specified ? !module.exports.globalConfig.verbose : !apiCheck.config.verbose,
obj: args[index],
addHelpers: true
});
});
var argTypes = args.map(function (arg) {
return getArgDisplay(arg, []);
});
return { argTypes: argTypes, apiTypes: apiTypes };
}
}
// STATELESS FUNCTIONS
/**
* This is where the magic happens for actually checking the arguments with the api.
* @param {Array} api - checkers
* @param {Array} args - and arguments object
* @returns {Array} - the error messages
*/
function checkApiWithArgs(api, args) {
/* eslint complexity:[2, 7] */
var messages = [];
var failed = false;
var checkerIndex = 0;
var argIndex = 0;
var arg = undefined,
checker = undefined,
res = undefined,
lastChecker = undefined,
argName = undefined,
argFailed = undefined,
skipPreviousChecker = undefined;
/* jshint -W084 */
while ((checker = api[checkerIndex++]) && argIndex < args.length) {
arg = args[argIndex++];
argName = 'Argument ' + argIndex + (checker.isOptional ? ' (optional)' : '');
res = checker(arg, 'value', argName);
argFailed = isError(res);
lastChecker = checkerIndex >= api.length;
skipPreviousChecker = checkerIndex > 1 && api[checkerIndex - 1].isOptional;
if (argFailed && lastChecker || argFailed && !lastChecker && !checker.isOptional && !skipPreviousChecker) {
failed = true;
messages.push(getCheckerErrorMessage(res, checker, arg));
} else if (argFailed && checker.isOptional) {
argIndex--;
} else {
messages.push(t(argName) + ' passed');
}
}
return failed ? messages : [];
}
checkerTypeType.type = 'function with __apiCheckData property and `${function.type}` property';
function checkerTypeType(checkerType, name, location) {
var apiCheckDataChecker = checkers.shape({
type: checkers.string,
optional: checkers.bool
});
var asFunc = checkers.func.withProperties({ __apiCheckData: apiCheckDataChecker });
var asShape = checkers.shape({ __apiCheckData: apiCheckDataChecker });
var wrongShape = checkers.oneOfType([asFunc, asShape])(checkerType, name, location);
if (isError(wrongShape)) {
return wrongShape;
}
if (typeof checkerType !== 'function' && !checkerType.hasOwnProperty(checkerType.__apiCheckData.type)) {
return getError(name, location, checkerTypeType.type);
}
}
function getCheckerErrorMessage(res, checker, val) {
var checkerHelp = getCheckerHelp(checker, val);
checkerHelp = checkerHelp ? ' - ' + checkerHelp : '';
return res.message + checkerHelp;
}
function getCheckerHelp(_ref, val) {
var help = _ref.help;
if (!help) {
return '';
}
if (typeof help === 'function') {
help = help(val);
}
return help;
}
function checkEnoughArgs(api, args) {
var requiredArgs = api.filter(function (a) {
return !a.isOptional;
});
if (args.length < requiredArgs.length) {
return ['Not enough arguments specified. Requires `' + requiredArgs.length + '`, you passed `' + args.length + '`'];
} else {
return [];
}
}
function getArgDisplay(arg, gottenArgs) {
/* eslint complexity:[2, 7] */
var cName = arg && arg.constructor && arg.constructor.name;
var type = typeOf(arg);
if (type === 'function') {
if (hasKeys()) {
var properties = stringify(getDisplayIfNotGotten());
return cName + ' (with properties: ' + properties + ')';
}
return cName;
}
if (arg === null) {
return 'null';
}
if (type !== 'array' && type !== 'object') {
return type;
}
if (hasKeys()) {
return getDisplayIfNotGotten();
}
return cName;
// utility functions
function hasKeys() {
return arg && Object.keys(arg).length;
}
function getDisplayIfNotGotten() {
if (gottenArgs.indexOf(arg) !== -1) {
return '[Circular]';
}
gottenArgs.push(arg);
return getDisplay(arg, gottenArgs);
}
}
function getDisplay(obj, gottenArgs) {
var argDisplay = {};
each(obj, function (v, k) {
return argDisplay[k] = getArgDisplay(v, gottenArgs);
});
return argDisplay;
}
function getApiCheckApis() {
var os = checkers.string.optional;
var checkerFnChecker = checkers.func.withProperties({
type: checkers.oneOfType([checkers.string, checkerTypeType]).optional,
displayName: checkers.string.optional,
shortType: checkers.string.optional,
notOptional: checkers.bool.optional,
notRequired: checkers.bool.optional
});
var getApiCheckInstanceCheckers = [checkers.shape({
output: checkers.shape({
prefix: checkers.string.optional,
suffix: checkers.string.optional,
docsBaseUrl: checkers.string.optional
}).strict.optional,
verbose: checkers.bool.optional,
disabled: checkers.bool.optional
}).strict.optional, checkers.objectOf(checkerFnChecker).optional];
var checkApiCheckApi = [checkers.typeOrArrayOf(checkerFnChecker), checkers.any.optional, checkers.shape({
prefix: os, suffix: os, urlSuffix: os, // appended case
onlyPrefix: os, onlySuffix: os, url: os // override case
}).strict.optional];
return {
checkerFnChecker: checkerFnChecker,
getApiCheckInstanceCheckers: getApiCheckInstanceCheckers,
checkApiCheckApi: checkApiCheckApi
};
}
/***/ },
/* 2 */
/***/ function(module, exports) {
module.exports = stringify;
function getSerialize (fn, decycle) {
var seen = [], keys = [];
decycle = decycle || function(key, value) {
return '[Circular ' + getPath(value, seen, keys) + ']'
};
return function(key, value) {
var ret = value;
if (typeof value === 'object' && value) {
if (seen.indexOf(value) !== -1)
ret = decycle(key, value);
else {
seen.push(value);
keys.push(key);
}
}
if (fn) ret = fn(key, ret);
return ret;
}
}
function getPath (value, seen, keys) {
var index = seen.indexOf(value);
var path = [ keys[index] ];
for (index--; index >= 0; index--) {
if (seen[index][ path[0] ] === value) {
value = seen[index];
path.unshift(keys[index]);
}
}
return '~' + path.join('.');
}
function stringify(obj, fn, spaces, decycle) {
return JSON.stringify(obj, getSerialize(fn, decycle), spaces);
}
stringify.getSerialize = getSerialize;
/***/ },
/* 3 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var stringify = __webpack_require__(2);
var checkerHelpers = {
addOptional: addOptional, getRequiredVersion: getRequiredVersion, setupChecker: setupChecker, addNullable: addNullable
};
module.exports = {
each: each, copy: copy, typeOf: typeOf, arrayify: arrayify, getCheckerDisplay: getCheckerDisplay,
isError: isError, list: list, getError: getError, nAtL: nAtL, t: t, undef: undef, checkerHelpers: checkerHelpers,
noop: noop
};
function copy(obj) {
var type = typeOf(obj);
var daCopy = undefined;
if (type === 'array') {
daCopy = [];
} else if (type === 'object') {
daCopy = {};
} else {
return obj;
}
each(obj, function (val, key) {
daCopy[key] = val; // cannot single-line this because we don't want to abort the each
});
return daCopy;
}
function typeOf(obj) {
if (Array.isArray(obj)) {
return 'array';
} else if (obj instanceof RegExp) {
return 'object';
} else {
return typeof obj;
}
}
function getCheckerDisplay(checker, options) {
/* eslint complexity:[2, 7] */
var display = undefined;
var short = options && options.short;
if (short && checker.shortType) {
display = checker.shortType;
} else if (!short && typeof checker.type === 'object' || checker.type === 'function') {
display = getCheckerType(checker, options);
} else {
display = getCheckerType(checker, options) || checker.displayName || checker.name;
}
return display;
}
function getCheckerType(_ref, options) {
var type = _ref.type;
if (typeof type === 'function') {
var __apiCheckData = type.__apiCheckData;
var typeTypes = type(options);
type = _defineProperty({
__apiCheckData: __apiCheckData
}, __apiCheckData.type, typeTypes);
}
return type;
}
function arrayify(obj) {
if (!obj) {
return [];
} else if (Array.isArray(obj)) {
return obj;
} else {
return [obj];
}
}
function each(obj, iterator, context) {
if (Array.isArray(obj)) {
return eachArry(obj, iterator, context);
} else {
return eachObj(obj, iterator, context);
}
}
function eachObj(obj, iterator, context) {
var ret = undefined;
var hasOwn = Object.prototype.hasOwnProperty;
/* eslint prefer-const:0 */ // some weird eslint bug?
for (var key in obj) {
if (hasOwn.call(obj, key)) {
ret = iterator.call(context, obj[key], key, obj);
if (ret === false) {
return ret;
}
}
}
return true;
}
function eachArry(obj, iterator, context) {
var ret = undefined;
var length = obj.length;
for (var i = 0; i < length; i++) {
ret = iterator.call(context, obj[i], i, obj);
if (ret === false) {
return ret;
}
}
return true;
}
function isError(obj) {
return obj instanceof Error;
}
function list(arry, join, finalJoin) {
arry = arrayify(arry);
var copy = arry.slice();
var last = copy.pop();
if (copy.length === 1) {
join = ' ';
}
return copy.join(join) + ('' + (copy.length ? join + finalJoin : '') + last);
}
function getError(name, location, checkerType) {
if (typeof checkerType === 'function') {
checkerType = checkerType({ short: true });
}
var stringType = typeof checkerType !== 'object' ? checkerType : stringify(checkerType);
return new Error(nAtL(name, location) + ' must be ' + t(stringType));
}
function nAtL(name, location) {
var tName = t(name || 'value');
var tLocation = !location ? '' : ' at ' + t(location);
return '' + tName + tLocation;
}
function t(thing) {
return '`' + thing + '`';
}
function undef(thing) {
return typeof thing === 'undefined';
}
/**
* This will set up the checker with all of the defaults that most checkers want like required by default and an
* optional version
*
* @param {Function} checker - the checker to setup with properties
* @param {Object} properties - properties to add to the checker
* @param {boolean} disabled - when set to true, this will set the checker to a no-op function
* @returns {Function} checker - the setup checker
*/
function setupChecker(checker, properties, disabled) {
/* eslint complexity:[2, 9] */
if (disabled) {
// swap out the checker for its own copy of noop
checker = getNoop();
checker.isNoop = true;
}
if (typeof checker.type === 'string') {
checker.shortType = checker.type;
}
// assign all properties given
each(properties, function (prop, name) {
return checker[name] = prop;
});
if (!checker.displayName) {
checker.displayName = 'apiCheck ' + t(checker.shortType || checker.type || checker.name) + ' type checker';
}
if (!checker.notRequired) {
checker = getRequiredVersion(checker, disabled);
}
if (!checker.notNullable) {
addNullable(checker, disabled);
}
if (!checker.notOptional) {
addOptional(checker, disabled);
}
return checker;
}
function getRequiredVersion(checker, disabled) {
var requiredChecker = disabled ? getNoop() : function requiredChecker(val, name, location, obj) {
if (undef(val) && !checker.isOptional) {
var tLocation = location ? ' in ' + t(location) : '';
var type = getCheckerDisplay(checker, { short: true });
var stringType = typeof type !== 'object' ? type : stringify(type);
return new Error('Required ' + t(name) + ' not specified' + tLocation + '. Must be ' + t(stringType));
} else {
return checker(val, name, location, obj);
}
};
copyProps(checker, requiredChecker);
requiredChecker.originalChecker = checker;
return requiredChecker;
}
function addOptional(checker, disabled) {
var optionalCheck = disabled ? getNoop() : function optionalCheck(val, name, location, obj) {
if (!undef(val)) {
return checker(val, name, location, obj);
}
};
// inherit all properties on the original checker
copyProps(checker, optionalCheck);
optionalCheck.isOptional = true;
optionalCheck.displayName = checker.displayName + ' (optional)';
optionalCheck.originalChecker = checker;
// the magic line that allows you to add .optional to the end of the checkers
checker.optional = optionalCheck;
fixType(checker, checker.optional);
}
function addNullable(checker, disabled) {
var nullableCheck = disabled ? getNoop() : function nullableCheck(val, name, location, obj) {
if (val !== null) {
return checker(val, name, location, obj);
}
};
// inherit all properties on the original checker
copyProps(checker, nullableCheck);
nullableCheck.isNullable = true;
nullableCheck.displayName = checker.displayName + ' (nullable)';
nullableCheck.originalChecker = checker;
// the magic line that allows you to add .nullable to the end of the checkers
checker.nullable = nullableCheck;
fixType(checker, checker.nullable);
if (!checker.notOptional) {
addOptional(checker.nullable, disabled);
}
}
function fixType(checker, checkerCopy) {
// fix type, because it's not a straight copy...
// the reason is we need to specify type.__apiCheckData.optional as true for the terse/verbose option.
// we also want to add "(optional)" to the types with a string
if (typeof checkerCopy.type === 'object') {
checkerCopy.type = copy(checkerCopy.type); // make our own copy of this
} else if (typeof checkerCopy.type === 'function') {
checkerCopy.type = function () {
return checker.type.apply(checker, arguments);
};
} else {
checkerCopy.type += ' (optional)';
return;
}
checkerCopy.type.__apiCheckData = copy(checker.type.__apiCheckData) || {}; // and this
checkerCopy.type.__apiCheckData.optional = true;
}
// UTILS
function copyProps(src, dest) {
each(Object.keys(src), function (key) {
return dest[key] = src[key];
});
}
function noop() {}
function getNoop() {
/* eslint no-shadow:0 */
/* istanbul ignore next */
return function noop() {};
}
/***/ },
/* 4 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var stringify = __webpack_require__(2);
var _require = __webpack_require__(3);
var typeOf = _require.typeOf;
var each = _require.each;
var copy = _require.copy;
var getCheckerDisplay = _require.getCheckerDisplay;
var isError = _require.isError;
var arrayify = _require.arrayify;
var list = _require.list;
var getError = _require.getError;
var nAtL = _require.nAtL;
var t = _require.t;
var checkerHelpers = _require.checkerHelpers;
var undef = _require.undef;
var setupChecker = checkerHelpers.setupChecker;
var checkers = module.exports = getCheckers();
module.exports.getCheckers = getCheckers;
function getCheckers(disabled) {
return {
array: typeOfCheckGetter('Array'),
bool: typeOfCheckGetter('Boolean'),
number: typeOfCheckGetter('Number'),
string: typeOfCheckGetter('String'),
func: funcCheckGetter(),
object: objectCheckGetter(),
emptyObject: emptyObjectCheckGetter(),
instanceOf: instanceCheckGetter,
oneOf: oneOfCheckGetter,
oneOfType: oneOfTypeCheckGetter,
arrayOf: arrayOfCheckGetter,
objectOf: objectOfCheckGetter,
typeOrArrayOf: typeOrArrayOfCheckGetter,
range: rangeCheckGetter,
lessThan: lessThanCheckGetter,
greaterThan: greaterThanCheckGetter,
shape: getShapeCheckGetter(),
args: argumentsCheckerGetter(),
any: anyCheckGetter(),
'null': nullCheckGetter()
};
function typeOfCheckGetter(type) {
var lType = type.toLowerCase();
return setupChecker(function typeOfCheckerDefinition(val, name, location) {
if (typeOf(val) !== lType) {
return getError(name, location, type);
}
}, { type: type }, disabled);
}
function funcCheckGetter() {
var type = 'Function';
var functionChecker = setupChecker(function functionCheckerDefinition(val, name, location) {
if (typeOf(val) !== 'function') {
return getError(name, location, type);
}
}, { type: type }, disabled);
functionChecker.withProperties = function getWithPropertiesChecker(properties) {
var apiError = checkers.objectOf(checkers.func)(properties, 'properties', 'apiCheck.func.withProperties');
if (isError(apiError)) {
throw apiError;
}
var shapeChecker = checkers.shape(properties, true);
shapeChecker.type.__apiCheckData.type = 'func.withProperties';
return setupChecker(function functionWithPropertiesChecker(val, name, location) {
var notFunction = checkers.func(val, name, location);
if (isError(notFunction)) {
return notFunction;
}
return shapeChecker(val, name, location);
}, { type: shapeChecker.type, shortType: 'func.withProperties' }, disabled);
};
return functionChecker;
}
function objectCheckGetter() {
var type = 'Object';
var nullType = 'Object (null ok)';
var objectNullOkChecker = setupChecker(function objectNullOkCheckerDefinition(val, name, location) {
if (typeOf(val) !== 'object') {
return getError(name, location, nullType);
}
}, { type: nullType }, disabled);
var objectChecker = setupChecker(function objectCheckerDefinition(val, name, location) {
if (val === null || isError(objectNullOkChecker(val, name, location))) {
return getError(name, location, objectChecker.type);
}
}, { type: type, nullOk: objectNullOkChecker }, disabled);
return objectChecker;
}
function instanceCheckGetter(classToCheck) {
return setupChecker(function instanceCheckerDefinition(val, name, location) {
if (!(val instanceof classToCheck)) {
return getError(name, location, classToCheck.name);
}
}, { type: classToCheck.name }, disabled);
}
function oneOfCheckGetter(enums) {
var type = {
__apiCheckData: { optional: false, type: 'enum' },
'enum': enums
};
var shortType = 'oneOf[' + enums.map(function (enm) {
return stringify(enm);
}).join(', ') + ']';
return setupChecker(function oneOfCheckerDefinition(val, name, location) {
if (!enums.some(function (enm) {
return enm === val;
})) {
return getError(name, location, shortType);
}
}, { type: type, shortType: shortType }, disabled);
}
function oneOfTypeCheckGetter(typeCheckers) {
var checkersDisplay = typeCheckers.map(function (checker) {
return getCheckerDisplay(checker, { short: true });
});
var shortType = 'oneOfType[' + checkersDisplay.join(', ') + ']';
function type(options) {
if (options && options.short) {
return shortType;
}
return typeCheckers.map(function (checker) {
return getCheckerDisplay(checker, options);
});
}
type.__apiCheckData = { optional: false, type: 'oneOfType' };
return setupChecker(function oneOfTypeCheckerDefinition(val, name, location) {
if (!typeCheckers.some(function (checker) {
return !isError(checker(val, name, location));
})) {
return getError(name, location, shortType);
}
}, { type: type, shortType: shortType }, disabled);
}
function arrayOfCheckGetter(checker) {
var shortCheckerDisplay = getCheckerDisplay(checker, { short: true });
var shortType = 'arrayOf[' + shortCheckerDisplay + ']';
function type(options) {
if (options && options.short) {
return shortType;
}
return getCheckerDisplay(checker, options);
}
type.__apiCheckData = { optional: false, type: 'arrayOf' };
return setupChecker(function arrayOfCheckerDefinition(val, name, location) {
if (isError(checkers.array(val)) || !val.every(function (item) {
return !isError(checker(item));
})) {
return getError(name, location, shortType);
}
}, { type: type, shortType: shortType }, disabled);
}
function objectOfCheckGetter(checker) {
var checkerDisplay = getCheckerDisplay(checker, { short: true });
var shortType = 'objectOf[' + checkerDisplay + ']';
function type(options) {
if (options && options.short) {
return shortType;
}
return getCheckerDisplay(checker, options);
}
type.__apiCheckData = { optional: false, type: 'objectOf' };
return setupChecker(function objectOfCheckerDefinition(val, name, location) {
var notObject = checkers.object(val, name, location);
if (isError(notObject)) {
return notObject;
}
var allTypesSuccess = each(val, function (item, key) {
if (isError(checker(item, key, name))) {
return false;
}
});
if (!allTypesSuccess) {
return getError(name, location, shortType);
}
}, { type: type, shortType: shortType }, disabled);
}
function typeOrArrayOfCheckGetter(checker) {
var checkerDisplay = getCheckerDisplay(checker, { short: true });
var shortType = 'typeOrArrayOf[' + checkerDisplay + ']';
function type(options) {
if (options && options.short) {
return shortType;
}
return getCheckerDisplay(checker, options);
}
type.__apiCheckData = { optional: false, type: 'typeOrArrayOf' };
return setupChecker(function typeOrArrayOfDefinition(val, name, location, obj) {
if (isError(checkers.oneOfType([checker, checkers.arrayOf(checker)])(val, name, location, obj))) {
return getError(name, location, shortType);
}
}, { type: type, shortType: shortType }, disabled);
}
function getShapeCheckGetter() {
function shapeCheckGetter(shape, nonObject) {
var shapeTypes = {};
each(shape, function (checker, prop) {
shapeTypes[prop] = getCheckerDisplay(checker);
});
function type() {
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var ret = {};
var terse = options.terse;
var obj = options.obj;
var addHelpers = options.addHelpers;
var parentRequired = options.required;
each(shape, function (checker, prop) {
/* eslint complexity:[2, 6] */
var specified = obj && obj.hasOwnProperty(prop);
var required = undef(parentRequired) ? !checker.isOptional : parentRequired;
if (!terse || (specified || !checker.isOptional)) {
ret[prop] = getCheckerDisplay(checker, { terse: terse, obj: obj && obj[prop], required: required, addHelpers: addHelpers });
}
if (addHelpers) {
modifyTypeDisplayToHelpOut(ret, prop, specified, checker, required);
}
});
return ret;
function modifyTypeDisplayToHelpOut(theRet, prop, specified, checker, required) {
if (!specified && required && !checker.isOptional) {
var item = 'ITEM';
if (checker.type && checker.type.__apiCheckData) {
item = checker.type.__apiCheckData.type.toUpperCase();
}
addHelper('missing', 'MISSING THIS ' + item, ' <-- YOU ARE MISSING THIS');
} else if (specified) {
var error = checker(obj[prop], prop, null, obj);
if (isError(error)) {
addHelper('error', 'THIS IS THE PROBLEM: ' + error.message, ' <-- THIS IS THE PROBLEM: ' + error.message);
}
}
function addHelper(property, objectMessage, stringMessage) {
if (typeof theRet[prop] === 'string') {
theRet[prop] += stringMessage;
} else {
theRet[prop].__apiCheckData[property] = objectMessage;
}
}
}
}
type.__apiCheckData = { strict: false, optional: false, type: 'shape' };
var shapeChecker = setupChecker(function shapeCheckerDefinition(val, name, location) {
/* eslint complexity:[2, 6] */
var isObject = !nonObject && checkers.object(val, name, location);
if (isError(isObject)) {
return isObject;
}
var shapePropError = undefined;
location = location ? location + (name ? '/' : '') : '';
name = name || '';
each(shape, function (checker, prop) {
if (val.hasOwnProperty(prop) || !checker.isOptional) {
shapePropError = checker(val[prop], prop, '' + location + name, val);
return !isError(shapePropError);
}
});
if (isError(shapePropError)) {
return shapePropError;
}
}, { type: type, shortType: 'shape' }, disabled);
function strictType() {
return type.apply(undefined, arguments);
}
strictType.__apiCheckData = copy(shapeChecker.type.__apiCheckData);
strictType.__apiCheckData.strict = true;
shapeChecker.strict = setupChecker(function strictShapeCheckerDefinition(val, name, location) {
var shapeError = shapeChecker(val, name, location);
if (isError(shapeError)) {
return shapeError;
}
var allowedProperties = Object.keys(shape);
var extraProps = Object.keys(val).filter(function (prop) {
return allowedProperties.indexOf(prop) === -1;
});
if (extraProps.length) {
return new Error(nAtL(name, location) + ' cannot have extra properties: ' + t(extraProps.join('`, `')) + '.' + ('It is limited to ' + t(allowedProperties.join('`, `'))));
}
}, { type: strictType, shortType: 'strict shape' }, disabled);
return shapeChecker;
}
shapeCheckGetter.ifNot = function ifNot(otherProps, propChecker) {
if (!Array.isArray(otherProps)) {
otherProps = [otherProps];
}
var description = undefined;
if (otherProps.length === 1) {
description = 'specified only if ' + otherProps[0] + ' is not specified';
} else {
description = 'specified only if none of the following are specified: [' + list(otherProps, ', ', 'and ') + ']';
}
var shortType = 'ifNot[' + otherProps.join(', ') + ']';
var type = getTypeForShapeChild(propChecker, description, shortType);
return setupChecker(function ifNotChecker(prop, propName, location, obj) {
var propExists = obj && obj.hasOwnProperty(propName);
var otherPropsExist = otherProps.some(function (otherProp) {
return obj && obj.hasOwnProperty(otherProp);
});
if (propExists === otherPropsExist) {
return getError(propName, location, type);
} else if (propExists) {
return propChecker(prop, propName, location, obj);
}
}, { notRequired: true, type: type, shortType: shortType }, disabled);
};
shapeCheckGetter.onlyIf = function onlyIf(otherProps, propChecker) {
otherProps = arrayify(otherProps);
var description = undefined;
if (otherProps.length === 1) {
description = 'specified only if ' + otherProps[0] + ' is also specified';
} else {
description = 'specified only if all of the following are specified: [' + list(otherProps, ', ', 'and ') + ']';
}
var shortType = 'onlyIf[' + otherProps.join(', ') + ']';
var type = getTypeForShapeChild(propChecker, description, shortType);
return setupChecker(function onlyIfCheckerDefinition(prop, propName, location, obj) {
var othersPresent = otherProps.every(function (property) {
return obj.hasOwnProperty(property);
});
if (!othersPresent) {
return getError(propName, location, type);
} else {
return propChecker(prop, propName, location, obj);
}
}, { type: type, shortType: shortType }, disabled);
};
shapeCheckGetter.requiredIfNot = function shapeRequiredIfNot(otherProps, propChecker) {
if (!Array.isArray(otherProps)) {
otherProps = [otherProps];
}
return getRequiredIfNotChecker(false, otherProps, propChecker);
};
shapeCheckGetter.requiredIfNot.all = function shapeRequiredIfNotAll(otherProps, propChecker) {
if (!Array.isArray(otherProps)) {
throw new Error('requiredIfNot.all must be passed an array');
}
return getRequiredIfNotChecker(true, otherProps, propChecker);
};
function getRequiredIfNotChecker(all, otherProps, propChecker) {
var props = t(otherProps.join(', '));
var ifProps = 'if ' + (all ? 'all of' : 'at least one of');
var description = 'specified ' + ifProps + ' these are not specified: ' + props + ' (otherwise it\'s optional)';
var shortType = 'requiredIfNot' + (all ? '.all' : '') + '[' + otherProps.join(', ') + '}]';
var type = getTypeForShapeChild(propChecker, description, shortType);
return setupChecker(function shapeRequiredIfNotDefinition(prop, propName, location, obj) {
var propExists = obj && obj.hasOwnProperty(propName);
var iteration = all ? 'every' : 'some';
var otherPropsExist = otherProps[iteration](function (otherProp) {
return obj && obj.hasOwnProperty(otherProp);
});
if (!otherPropsExist && !propExists) {
return getError(propName, location, type);
} else if (propExists) {
return propChecker(prop, propName, location, obj);
}
}, { type: type, notRequired: true }, disabled);
}
return shapeCheckGetter;
function getTypeForShapeChild(propChecker, description, shortType) {
function type(options) {
if (options && options.short) {
return shortType;
}
return getCheckerDisplay(propChecker);
}
type.__apiCheckData = { optional: false, type: 'ifNot', description: description };
return type;
}
}
function argumentsCheckerGetter() {
var type = 'function arguments';
return setupChecker(function argsCheckerDefinition(val, name, location) {
if (Array.isArray(val) || isError(checkers.object(val)) || isError(checkers.number(val.length))) {
return getError(name, location, type);
}
}, { type: type }, disabled);
}
function anyCheckGetter() {
return setupChecker(function anyCheckerDefinition() {
// don't do anything
}, { type: 'any' }, disabled);
}
function nullCheckGetter() {
var type = 'null';
return setupChecker(function nullChecker(val, name, location) {
if (val !== null) {
return getError(name, location, type);
}
}, { type: type }, disabled);
}
function rangeCheckGetter(min, max) {
var type = 'Range (' + min + ' - ' + max + ')';
return setupChecker(function rangeChecker(val, name, location) {
if (typeof val !== 'number' || val < min || val > max) {
return getError(name, location, type);
}
}, { type: type }, disabled);
}
function lessThanCheckGetter(min) {
var type = 'lessThan[' + min + ']';
return setupChecker(function lessThanChecker(val, name, location) {
if (typeof val !== 'number' || val > min) {
return getError(name, location, type);
}
}, { type: type }, disabled);
}
function greaterThanCheckGetter(max) {
var type = 'greaterThan[' + max + ']';
return setupChecker(function greaterThanChecker(val, name, location) {
if (typeof val !== 'number' || val < max) {
return getError(name, location, type);
}
}, { type: type }, disabled);
}
function emptyObjectCheckGetter() {
var type = 'empty object';
return setupChecker(function emptyObjectChecker(val, name, location) {
if (typeOf(val) !== 'object' || val === null || Object.keys(val).length) {
return getError(name, location, type);
}
}, { type: type }, disabled);
}
}
/***/ }
/******/ ])
});
;
/*
AngularJS v1.4.8
(c) 2010-2015 Google, Inc. http://angularjs.org
License: MIT
*/
(function(S,X,u){'use strict';function G(a){return function(){var b=arguments[0],d;d="["+(a?a+":":"")+b+"] http://errors.angularjs.org/1.4.8/"+(a?a+"/":"")+b;for(b=1;b").append(a).html();try{return a[0].nodeType===Na?F(d):d.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+F(b)})}catch(c){return F(d)}}function wc(a){try{return decodeURIComponent(a)}catch(b){}}
function xc(a){var b={};n((a||"").split("&"),function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=wc(e),y(e)&&(f=y(f)?wc(f):!0,qa.call(b,e)?I(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function Qb(a){var b=[];n(a,function(a,c){I(a)?n(a,function(a){b.push(ja(c,!0)+(!0===a?"":"="+ja(a,!0)))}):b.push(ja(c,!0)+(!0===a?"":"="+ja(a,!0)))});return b.length?b.join("&"):""}function ob(a){return ja(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,
"=").replace(/%2B/gi,"+")}function ja(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function Yd(a,b){var d,c,e=Oa.length;for(c=0;c/,">"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]);b.unshift("ng");c=eb(b,d.strictDi);c.invoke(["$rootScope",
"$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;S&&e.test(S.name)&&(d.debugInfoEnabled=!0,S.name=S.name.replace(e,""));if(S&&!f.test(S.name))return c();S.name=S.name.replace(f,"");fa.resumeBootstrap=function(a){n(a,function(a){b.push(a)});return c()};z(fa.resumeDeferredBootstrap)&&fa.resumeDeferredBootstrap()}function $d(){S.name="NG_ENABLE_DEBUG_INFO!"+S.name;S.location.reload()}
function ae(a){a=fa.element(a).injector();if(!a)throw Aa("test");return a.get("$$testability")}function zc(a,b){b=b||"_";return a.replace(be,function(a,c){return(c?b:"")+a.toLowerCase()})}function ce(){var a;if(!Ac){var b=pb();(oa=q(b)?S.jQuery:b?S[b]:u)&&oa.fn.on?(B=oa,M(oa.fn,{scope:Pa.scope,isolateScope:Pa.isolateScope,controller:Pa.controller,injector:Pa.injector,inheritedData:Pa.inheritedData}),a=oa.cleanData,oa.cleanData=function(b){var c;if(Rb)Rb=!1;else for(var e=0,f;null!=(f=b[e]);e++)(c=
oa._data(f,"events"))&&c.$destroy&&oa(f).triggerHandler("$destroy");a(b)}):B=N;fa.element=B;Ac=!0}}function qb(a,b,d){if(!a)throw Aa("areq",b||"?",d||"required");return a}function Qa(a,b,d){d&&I(a)&&(a=a[a.length-1]);qb(z(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Ra(a,b){if("hasOwnProperty"===a)throw Aa("badname",b);}function Bc(a,b,d){if(!b)return a;b=b.split(".");for(var c,e=a,f=b.length,g=0;g$2>")+c[2];for(c=c[0];c--;)d=d.lastChild;f=cb(f,d.childNodes);d=e.firstChild;d.textContent=""}else f.push(b.createTextNode(a));e.textContent="";e.innerHTML="";n(f,function(a){e.appendChild(a)});return e}function N(a){if(a instanceof N)return a;var b;E(a)&&(a=U(a),
b=!0);if(!(this instanceof N)){if(b&&"<"!=a.charAt(0))throw Ub("nosel");return new N(a)}if(b){b=X;var d;a=(d=Ef.exec(a))?[b.createElement(d[1])]:(d=Lc(a,b))?d.childNodes:[]}Mc(this,a)}function Vb(a){return a.cloneNode(!0)}function ub(a,b){b||vb(a);if(a.querySelectorAll)for(var d=a.querySelectorAll("*"),c=0,e=d.length;cl&&this.remove(t.key);return b}},get:function(a){if(l").parent()[0])});var f=O(a,b,a,c,d,e);K.$$addScopeClass(a);var g=null;return function(b,c,d){qb(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var h=d.parentBoundTranscludeFn,k=d.transcludeControllers;d=d.futureParentElement;h&&h.$$boundTransclude&&(h=h.$$boundTransclude);g||(g=(d=
d&&d[0])?"foreignobject"!==ta(d)&&d.toString().match(/SVG/)?"svg":"html":"html");d="html"!==g?B(Yb(g,B("").append(a).html())):c?Pa.clone.call(a):a;if(k)for(var l in k)d.data("$"+l+"Controller",k[l].instance);K.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,h);return d}}function O(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,m,t,w,D;if(p)for(D=Array(c.length),m=0;m
q.priority)break;if(P=q.scope)q.templateUrl||(H(P)?(Ua("new/isolated scope",O||R,q,Z),O=q):Ua("new/isolated scope",O,q,Z)),R=R||q;x=q.name;!q.templateUrl&&q.controller&&(P=q.controller,T=T||$(),Ua("'"+x+"' controller",T[x],q,Z),T[x]=q);if(P=q.transclude)ga=!0,q.$$tlb||(Ua("transclusion",n,q,Z),n=q),"element"==P?(aa=!0,A=q.priority,P=Z,Z=d.$$element=B(X.createComment(" "+x+": "+d[x]+" ")),b=Z[0],Y(f,ra.call(P,0),
b),Ia=K(P,e,A,g&&g.name,{nonTlbTranscludeDirective:n})):(P=B(Vb(b)).contents(),Z.empty(),Ia=K(P,e,u,u,{needsNewScope:q.$$isolateScope||q.$$newScope}));if(q.template)if(L=!0,Ua("template",J,q,Z),J=q,P=z(q.template)?q.template(Z,d):q.template,P=ja(P),q.replace){g=q;P=Tb.test(P)?Xc(Yb(q.templateNamespace,U(P))):[];b=P[0];if(1!=P.length||1!==b.nodeType)throw ha("tplrt",x,"");Y(f,Z,b);P={$attr:{}};var Wc=V(b,[],P),W=a.splice(F+1,a.length-(F+1));(O||R)&&y(Wc,O,R);a=a.concat(Wc).concat(W);S(d,P);M=a.length}else Z.html(P);
if(q.templateUrl)L=!0,Ua("template",J,q,Z),J=q,q.replace&&(g=q),D=Of(a.splice(F,a.length-F),Z,d,f,ga&&Ia,h,l,{controllerDirectives:T,newScopeDirective:R!==q&&R,newIsolateScopeDirective:O,templateDirective:J,nonTlbTranscludeDirective:n}),M=a.length;else if(q.compile)try{G=q.compile(Z,d,Ia),z(G)?t(null,G,N,Q):G&&t(G.pre,G.post,N,Q)}catch(da){c(da,ua(Z))}q.terminal&&(D.terminal=!0,A=Math.max(A,q.priority))}D.scope=R&&!0===R.scope;D.transcludeOnThisElement=ga;D.templateOnThisElement=L;D.transclude=Ia;
m.hasElementTranscludeDirective=aa;return D}function y(a,b,c){for(var d=0,e=a.length;dm.priority)&&-1!=m.restrict.indexOf(f)&&(k&&(m=Ob(m,{$$start:k,$$end:l})),b.push(m),h=m)}catch(D){c(D)}}return h}function G(b){if(e.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,f=c.length;d"+b+""+a+">";return c.childNodes[0].childNodes;default:return b}}function Q(a,b){if("srcdoc"==b)return L.HTML;var c=ta(a);if("xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b))return L.RESOURCE_URL}function W(a,c,d,e,f){var g=Q(a,e);f=h[e]||f;var k=b(d,!0,g,f);if(k){if("multiple"===e&&"select"===ta(a))throw ha("selmulti",ua(a));c.push({priority:100,compile:function(){return{pre:function(a,c,h){c=h.$$observers||(h.$$observers=$());if(l.test(e))throw ha("nodomevents");
var m=h[e];m!==d&&(k=m&&b(m,!0,g,f),d=m);k&&(h[e]=k(a),(c[e]||(c[e]=[])).$$inter=!0,(h.$$observers&&h.$$observers[e].$$scope||a).$watch(k,function(a,b){"class"===e&&a!=b?h.$updateClass(a,b):h.$set(e,a)}))}}}})}}function Y(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g=b)return a;for(;b--;)8===a[b].nodeType&&Pf.call(a,b,1);return a}function Xe(){var a={},b=!1;this.register=function(b,c){Ra(b,"controller");H(b)?M(a,b):a[b]=c};this.allowGlobals=function(){b=!0};this.$get=["$injector","$window",function(d,c){function e(a,b,c,d){if(!a||!H(a.$scope))throw G("$controller")("noscp",
d,b);a.$scope[b]=c}return function(f,g,h,k){var l,m,r;h=!0===h;k&&E(k)&&(r=k);if(E(f)){k=f.match(Uc);if(!k)throw Qf("ctrlfmt",f);m=k[1];r=r||k[3];f=a.hasOwnProperty(m)?a[m]:Bc(g.$scope,m,!0)||(b?Bc(c,m,!0):u);Qa(f,m,!0)}if(h)return h=(I(f)?f[f.length-1]:f).prototype,l=Object.create(h||null),r&&e(g,r,l,m||f.name),M(function(){var a=d.invoke(f,l,g,m);a!==l&&(H(a)||z(a))&&(l=a,r&&e(g,r,l,m||f.name));return l},{instance:l,identifier:r});l=d.instantiate(f,g,m);r&&e(g,r,l,m||f.name);return l}}]}function Ye(){this.$get=
["$window",function(a){return B(a.document)}]}function Ze(){this.$get=["$log",function(a){return function(b,d){a.error.apply(a,arguments)}}]}function Zb(a){return H(a)?da(a)?a.toISOString():db(a):a}function df(){this.$get=function(){return function(a){if(!a)return"";var b=[];oc(a,function(a,c){null===a||q(a)||(I(a)?n(a,function(a,d){b.push(ja(c)+"="+ja(Zb(a)))}):b.push(ja(c)+"="+ja(Zb(a))))});return b.join("&")}}}function ef(){this.$get=function(){return function(a){function b(a,e,f){null===a||q(a)||
(I(a)?n(a,function(a,c){b(a,e+"["+(H(a)?c:"")+"]")}):H(a)&&!da(a)?oc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):d.push(ja(e)+"="+ja(Zb(a))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function $b(a,b){if(E(a)){var d=a.replace(Rf,"").trim();if(d){var c=b("Content-Type");(c=c&&0===c.indexOf($c))||(c=(c=d.match(Sf))&&Tf[c[0]].test(d));c&&(a=uc(d))}}return a}function ad(a){var b=$(),d;E(a)?n(a.split("\n"),function(a){d=a.indexOf(":");var e=F(U(a.substr(0,d)));a=U(a.substr(d+1));e&&
(b[e]=b[e]?b[e]+", "+a:a)}):H(a)&&n(a,function(a,d){var f=F(d),g=U(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function bd(a){var b;return function(d){b||(b=ad(a));return d?(d=b[F(d)],void 0===d&&(d=null),d):b}}function cd(a,b,d,c){if(z(c))return c(a,b,d);n(c,function(c){a=c(a,b,d)});return a}function cf(){var a=this.defaults={transformResponse:[$b],transformRequest:[function(a){return H(a)&&"[object File]"!==sa.call(a)&&"[object Blob]"!==sa.call(a)&&"[object FormData]"!==sa.call(a)?db(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},
post:ia(ac),put:ia(ac),patch:ia(ac)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},b=!1;this.useApplyAsync=function(a){return y(a)?(b=!!a,this):b};var d=!0;this.useLegacyPromiseExtensions=function(a){return y(a)?(d=!!a,this):d};var c=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(e,f,g,h,k,l){function m(b){function c(a){var b=M({},a);b.data=cd(a.data,a.headers,a.status,f.transformResponse);
a=a.status;return 200<=a&&300>a?b:k.reject(b)}function e(a,b){var c,d={};n(a,function(a,e){z(a)?(c=a(b),null!=c&&(d[e]=c)):d[e]=a});return d}if(!fa.isObject(b))throw G("$http")("badreq",b);var f=M({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},b);f.headers=function(b){var c=a.headers,d=M({},b.headers),f,g,h,c=M({},c.common,c[F(b.method)]);a:for(f in c){g=F(f);for(h in d)if(F(h)===g)continue a;d[f]=c[f]}return e(d,ia(b))}(b);
f.method=sb(f.method);f.paramSerializer=E(f.paramSerializer)?l.get(f.paramSerializer):f.paramSerializer;var g=[function(b){var d=b.headers,e=cd(b.data,bd(d),u,b.transformRequest);q(e)&&n(d,function(a,b){"content-type"===F(b)&&delete d[b]});q(b.withCredentials)&&!q(a.withCredentials)&&(b.withCredentials=a.withCredentials);return r(b,e).then(c,c)},u],h=k.when(f);for(n(v,function(a){(a.request||a.requestError)&&g.unshift(a.request,a.requestError);(a.response||a.responseError)&&g.push(a.response,a.responseError)});g.length;){b=
g.shift();var m=g.shift(),h=h.then(b,m)}d?(h.success=function(a){Qa(a,"fn");h.then(function(b){a(b.data,b.status,b.headers,f)});return h},h.error=function(a){Qa(a,"fn");h.then(null,function(b){a(b.data,b.status,b.headers,f)});return h}):(h.success=dd("success"),h.error=dd("error"));return h}function r(c,d){function g(a,c,d,e){function f(){l(c,a,d,e)}J&&(200<=a&&300>a?J.put(R,[a,c,ad(d),e]):J.remove(R));b?h.$applyAsync(f):(f(),h.$$phase||h.$apply())}function l(a,b,d,e){b=-1<=b?b:0;(200<=b&&300>b?n.resolve:
n.reject)({data:a,status:b,headers:bd(d),config:c,statusText:e})}function r(a){l(a.data,a.status,ia(a.headers()),a.statusText)}function v(){var a=m.pendingRequests.indexOf(c);-1!==a&&m.pendingRequests.splice(a,1)}var n=k.defer(),D=n.promise,J,K,O=c.headers,R=t(c.url,c.paramSerializer(c.params));m.pendingRequests.push(c);D.then(v,v);!c.cache&&!a.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(J=H(c.cache)?c.cache:H(a.cache)?a.cache:A);J&&(K=J.get(R),y(K)?K&&z(K.then)?K.then(r,r):I(K)?l(K[1],
K[0],ia(K[2]),K[3]):l(K,200,{},"OK"):J.put(R,D));q(K)&&((K=ed(c.url)?f()[c.xsrfCookieName||a.xsrfCookieName]:u)&&(O[c.xsrfHeaderName||a.xsrfHeaderName]=K),e(c.method,R,d,g,O,c.timeout,c.withCredentials,c.responseType));return D}function t(a,b){0=k&&(p.resolve(v),A(C.$$intervalId),delete f[C.$$intervalId]);n||a.$apply()},h);f[C.$$intervalId]=p;return C}var f={};e.cancel=function(a){return a&&a.$$intervalId in f?(f[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete f[a.$$intervalId],!0):!1};return e}]}function bc(a){a=a.split("/");for(var b=a.length;b--;)a[b]=ob(a[b]);return a.join("/")}function fd(a,b){var d=wa(a);b.$$protocol=d.protocol;b.$$host=d.hostname;b.$$port=ea(d.port)||Vf[d.protocol]||
null}function gd(a,b){var d="/"!==a.charAt(0);d&&(a="/"+a);var c=wa(a);b.$$path=decodeURIComponent(d&&"/"===c.pathname.charAt(0)?c.pathname.substring(1):c.pathname);b.$$search=xc(c.search);b.$$hash=decodeURIComponent(c.hash);b.$$path&&"/"!=b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function pa(a,b){if(0===b.indexOf(a))return b.substr(a.length)}function Fa(a){var b=a.indexOf("#");return-1==b?a:a.substr(0,b)}function ib(a){return a.replace(/(#.+)|#$/,"$1")}function cc(a,b,d){this.$$html5=!0;d=d||"";
fd(a,this);this.$$parse=function(a){var d=pa(b,a);if(!E(d))throw Db("ipthprfx",a,b);gd(d,this);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Qb(this.$$search),d=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=bc(this.$$path)+(a?"?"+a:"")+d;this.$$absUrl=b+this.$$url.substr(1)};this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;y(f=pa(a,c))?(g=f,g=y(f=pa(d,f))?b+(pa("/",f)||f):a+g):y(f=pa(b,c))?g=b+f:b==c+"/"&&(g=b);g&&this.$$parse(g);
return!!g}}function dc(a,b,d){fd(a,this);this.$$parse=function(c){var e=pa(a,c)||pa(b,c),f;q(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",q(e)&&(a=c,this.replace())):(f=pa(d,e),q(f)&&(f=e));gd(f,this);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;0===f.indexOf(e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?f[1]:c);this.$$path=c;this.$$compose()};this.$$compose=function(){var b=Qb(this.$$search),e=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=bc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+(this.$$url?
d+this.$$url:"")};this.$$parseLinkUrl=function(b,d){return Fa(a)==Fa(b)?(this.$$parse(b),!0):!1}}function hd(a,b,d){this.$$html5=!0;dc.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a==Fa(c)?f=c:(g=pa(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$compose=function(){var b=Qb(this.$$search),e=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=bc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+d+this.$$url}}function Eb(a){return function(){return this[a]}}
function id(a,b){return function(d){if(q(d))return this[a];this[a]=b(d);this.$$compose();return this}}function hf(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return y(b)?(a=b,this):a};this.html5Mode=function(a){return $a(a)?(b.enabled=a,this):H(a)?($a(a.enabled)&&(b.enabled=a.enabled),$a(a.requireBase)&&(b.requireBase=a.requireBase),$a(a.rewriteLinks)&&(b.rewriteLinks=a.rewriteLinks),this):b};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",
function(d,c,e,f,g){function h(a,b,d){var e=l.url(),f=l.$$state;try{c.url(a,b,d),l.$$state=c.state()}catch(g){throw l.url(e),l.$$state=f,g;}}function k(a,b){d.$broadcast("$locationChangeSuccess",l.absUrl(),a,l.$$state,b)}var l,m;m=c.baseHref();var r=c.url(),t;if(b.enabled){if(!m&&b.requireBase)throw Db("nobase");t=r.substring(0,r.indexOf("/",r.indexOf("//")+2))+(m||"/");m=e.history?cc:hd}else t=Fa(r),m=dc;var A=t.substr(0,Fa(t).lastIndexOf("/")+1);l=new m(t,A,"#"+a);l.$$parseLinkUrl(r,r);l.$$state=
c.state();var v=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(b.rewriteLinks&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!=a.which&&2!=a.button){for(var e=B(a.target);"a"!==ta(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),k=e.attr("href")||e.attr("xlink:href");H(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=wa(h.animVal).href);v.test(h)||!h||e.attr("target")||a.isDefaultPrevented()||!l.$$parseLinkUrl(h,k)||(a.preventDefault(),l.absUrl()!=c.url()&&(d.$apply(),g.angular["ff-684208-preventDefault"]=
!0))}});ib(l.absUrl())!=ib(r)&&c.url(l.absUrl(),!0);var n=!0;c.onUrlChange(function(a,b){q(pa(A,a))?g.location.href=a:(d.$evalAsync(function(){var c=l.absUrl(),e=l.$$state,f;a=ib(a);l.$$parse(a);l.$$state=b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;l.absUrl()===a&&(f?(l.$$parse(c),l.$$state=e,h(c,!1,e)):(n=!1,k(c,e)))}),d.$$phase||d.$digest())});d.$watch(function(){var a=ib(c.url()),b=ib(l.absUrl()),f=c.state(),g=l.$$replace,m=a!==b||l.$$html5&&e.history&&f!==l.$$state;if(n||
m)n=!1,d.$evalAsync(function(){var b=l.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,l.$$state,f).defaultPrevented;l.absUrl()===b&&(c?(l.$$parse(a),l.$$state=f):(m&&h(b,g,f===l.$$state?null:l.$$state),k(a,f)))});l.$$replace=!1});return l}]}function jf(){var a=!0,b=this;this.debugEnabled=function(b){return y(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&
(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||x;a=!1;try{a=!!e.apply}catch(k){}return a?function(){var a=[];n(arguments,function(b){a.push(c(b))});return e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function Va(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"===
a||"__proto__"===a)throw ba("isecfld",b);return a}function jd(a,b){a+="";if(!E(a))throw ba("iseccst",b);return a}function xa(a,b){if(a){if(a.constructor===a)throw ba("isecfn",b);if(a.window===a)throw ba("isecwindow",b);if(a.children&&(a.nodeName||a.prop&&a.attr&&a.find))throw ba("isecdom",b);if(a===Object)throw ba("isecobj",b);}return a}function kd(a,b){if(a){if(a.constructor===a)throw ba("isecfn",b);if(a===Wf||a===Xf||a===Yf)throw ba("isecff",b);}}function ld(a,b){if(a&&(a===(0).constructor||a===
(!1).constructor||a==="".constructor||a==={}.constructor||a===[].constructor||a===Function.constructor))throw ba("isecaf",b);}function Zf(a,b){return"undefined"!==typeof a?a:b}function md(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function W(a,b){var d,c;switch(a.type){case s.Program:d=!0;n(a.body,function(a){W(a.expression,b);d=d&&a.expression.constant});a.constant=d;break;case s.Literal:a.constant=!0;a.toWatch=[];break;case s.UnaryExpression:W(a.argument,b);a.constant=a.argument.constant;
a.toWatch=a.argument.toWatch;break;case s.BinaryExpression:W(a.left,b);W(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case s.LogicalExpression:W(a.left,b);W(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case s.ConditionalExpression:W(a.test,b);W(a.alternate,b);W(a.consequent,b);a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case s.Identifier:a.constant=
!1;a.toWatch=[a];break;case s.MemberExpression:W(a.object,b);a.computed&&W(a.property,b);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=[a];break;case s.CallExpression:d=a.filter?!b(a.callee.name).$stateful:!1;c=[];n(a.arguments,function(a){W(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});a.constant=d;a.toWatch=a.filter&&!b(a.callee.name).$stateful?c:[a];break;case s.AssignmentExpression:W(a.left,b);W(a.right,b);a.constant=a.left.constant&&a.right.constant;
a.toWatch=[a];break;case s.ArrayExpression:d=!0;c=[];n(a.elements,function(a){W(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});a.constant=d;a.toWatch=c;break;case s.ObjectExpression:d=!0;c=[];n(a.properties,function(a){W(a.value,b);d=d&&a.value.constant;a.value.constant||c.push.apply(c,a.value.toWatch)});a.constant=d;a.toWatch=c;break;case s.ThisExpression:a.constant=!1,a.toWatch=[]}}function nd(a){if(1==a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:u}}
function od(a){return a.type===s.Identifier||a.type===s.MemberExpression}function pd(a){if(1===a.body.length&&od(a.body[0].expression))return{type:s.AssignmentExpression,left:a.body[0].expression,right:{type:s.NGValueParameter},operator:"="}}function qd(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===s.Literal||a.body[0].expression.type===s.ArrayExpression||a.body[0].expression.type===s.ObjectExpression)}function rd(a,b){this.astBuilder=a;this.$filter=b}function sd(a,
b){this.astBuilder=a;this.$filter=b}function Fb(a){return"constructor"==a}function ec(a){return z(a.valueOf)?a.valueOf():$f.call(a)}function kf(){var a=$(),b=$();this.$get=["$filter",function(d){function c(a,b){return null==a||null==b?a===b:"object"===typeof a&&(a=ec(a),"object"===typeof a)?!1:a===b||a!==a&&b!==b}function e(a,b,d,e,f){var g=e.inputs,h;if(1===g.length){var k=c,g=g[0];return a.$watch(function(a){var b=g(a);c(b,k)||(h=e(a,u,u,[b]),k=b&&ec(b));return h},b,d,f)}for(var l=[],m=[],r=0,n=
g.length;r=this.promise.$$state.status&&d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;fa)for(b in l++,f)qa.call(e,b)||(n--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$stateful=!0;var d=this,e,f,g,k=1n&&(v=4-n,q[v]||(q[v]=[]),q[v].push({msg:z(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:f,oldVal:h}));else if(a===c){r=!1;break a}}catch(y){g(y)}if(!(l=A.$$watchersCount&&A.$$childHead||A!==this&&A.$$nextSibling))for(;A!==this&&!(l=A.$$nextSibling);)A=A.$parent}while(A=l);if((r||u.length)&&!n--)throw w.$$phase=null,d("infdig",
b,q);}while(r||u.length);for(w.$$phase=null;L.length;)try{L.shift()()}catch(x){g(x)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===w&&k.$$applicationDestroyed();A(this,-this.$$watchersCount);for(var b in this.$$listenerCount)v(this,this.$$listenerCount[b],b);a&&a.$$childHead==this&&(a.$$childHead=this.$$nextSibling);a&&a.$$childTail==this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=
this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=x;this.$on=this.$watch=this.$watchGroup=function(){return x};this.$$listeners={};this.$$nextSibling=null;m(this)}},$eval:function(a,b){return h(a)(this,b)},$evalAsync:function(a,b){w.$$phase||u.length||k.defer(function(){u.length&&w.$digest()});u.push({scope:this,expression:a,locals:b})},$$postDigest:function(a){L.push(a)},$apply:function(a){try{t("$apply");
try{return this.$eval(a)}finally{w.$$phase=null}}catch(b){g(b)}finally{try{w.$digest()}catch(c){throw g(c),c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&aa.push(b);C()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(c[d]=null,v(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,f=!1,h=
{name:a,targetScope:e,stopPropagation:function(){f=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},k=cb([h],arguments,1),l,m;do{d=e.$$listeners[a]||c;h.currentScope=e;l=0;for(m=d.length;lHa)throw ya("iequirks");var c=ia(la);c.isEnabled=function(){return a};c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=Ya);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;n(la,function(a,
b){var d=F(b);c[fb("parse_as_"+d)]=function(b){return e(a,b)};c[fb("get_trusted_"+d)]=function(b){return f(a,b)};c[fb("trust_as_"+d)]=function(b){return g(a,b)}});return c}]}function qf(){this.$get=["$window","$document",function(a,b){var d={},c=ea((/android (\d+)/.exec(F((a.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((a.navigator||{}).userAgent),f=b[0]||{},g,h=/^(Moz|webkit|ms)(?=[A-Z])/,k=f.body&&f.body.style,l=!1,m=!1;if(k){for(var r in k)if(l=h.exec(r)){g=l[0];g=g.substr(0,1).toUpperCase()+
g.substr(1);break}g||(g="WebkitOpacity"in k&&"webkit");l=!!("transition"in k||g+"Transition"in k);m=!!("animation"in k||g+"Animation"in k);!c||l&&m||(l=E(k.webkitTransition),m=E(k.webkitAnimation))}return{history:!(!a.history||!a.history.pushState||4>c||e),hasEvent:function(a){if("input"===a&&11>=Ha)return!1;if(q(d[a])){var b=f.createElement("div");d[a]="on"+a in b}return d[a]},csp:Ba(),vendorPrefix:g,transitions:l,animations:m,android:c}}]}function sf(){this.$get=["$templateCache","$http","$q","$sce",
function(a,b,d,c){function e(f,g){e.totalPendingRequests++;E(f)&&a.get(f)||(f=c.getTrustedResourceUrl(f));var h=b.defaults&&b.defaults.transformResponse;I(h)?h=h.filter(function(a){return a!==$b}):h===$b&&(h=null);return b.get(f,{cache:a,transformResponse:h})["finally"](function(){e.totalPendingRequests--}).then(function(b){a.put(f,b.data);return b.data},function(a){if(!g)throw ha("tpload",f,a.status,a.statusText);return d.reject(a)})}e.totalPendingRequests=0;return e}]}function tf(){this.$get=["$rootScope",
"$browser","$location",function(a,b,d){return{findBindings:function(a,b,d){a=a.getElementsByClassName("ng-binding");var g=[];n(a,function(a){var c=fa.element(a).data("$binding");c&&n(c,function(c){d?(new RegExp("(^|\\s)"+ud(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!=c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-","data-ng-","ng\\:"],h=0;ha;a=Math.abs(a);var g=Infinity===a;if(!g&&!isFinite(a))return"";var h=a+"",k="",l=!1,m=[];g&&(k="\u221e");if(!g&&-1!==h.indexOf("e")){var r=h.match(/([\d\.]+)e(-?)(\d+)/);r&&"-"==r[2]&&r[3]>e+1?a=0:(k=h,l=!0)}if(g||l)0a&&(k=a.toFixed(e),a=parseFloat(k),k=k.replace(ic,c));else{g=(h.split(ic)[1]||"").length;
q(e)&&(e=Math.min(Math.max(b.minFrac,g),b.maxFrac));a=+(Math.round(+(a.toString()+"e"+e)).toString()+"e"+-e);var g=(""+a).split(ic),h=g[0],g=g[1]||"",r=0,t=b.lgSize,n=b.gSize;if(h.length>=t+n)for(r=h.length-t,l=0;la&&(c="-",a=-a);for(a=""+a;a.length-d)e+=d;0===e&&-12==d&&(e=12);return Gb(e,b,c)}}function Hb(a,b){return function(d,c){var e=d["get"+a](),f=sb(b?"SHORT"+a:a);return c[f][e]}}function Dd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Ed(a){return function(b){var d=Dd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-
+d;b=1+Math.round(b/6048E5);return Gb(b,a)}}function jc(a,b){return 0>=a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function zd(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,h=b[8]?a.setUTCFullYear:a.setFullYear,k=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=ea(b[9]+b[10]),g=ea(b[9]+b[11]));h.call(a,ea(b[1]),ea(b[2])-1,ea(b[3]));f=ea(b[4]||0)-f;g=ea(b[5]||0)-g;h=ea(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));k.call(a,f,g,h,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;
return function(c,d,f){var g="",h=[],k,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;E(c)&&(c=hg.test(c)?ea(c):b(c));Q(c)&&(c=new Date(c));if(!da(c)||!isFinite(c.getTime()))return c;for(;d;)(l=ig.exec(d))?(h=cb(h,l,1),d=h.pop()):(h.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=vc(f,c.getTimezoneOffset()),c=Pb(c,f,!0));n(h,function(b){k=jg[b];g+=k?k(c,a.DATETIME_FORMATS,m):b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function cg(){return function(a,b){q(b)&&(b=2);return db(a,b)}}function dg(){return function(a,
b,d){b=Infinity===Math.abs(Number(b))?Number(b):ea(b);if(isNaN(b))return a;Q(a)&&(a=a.toString());if(!I(a)&&!E(a))return a;d=!d||isNaN(d)?0:ea(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?a.slice(d,d+b):0===d?a.slice(b,a.length):a.slice(Math.max(0,d+b),d)}}function Bd(a){function b(b,d){d=d?-1:1;return b.map(function(b){var c=1,h=Ya;if(z(b))h=b;else if(E(b)){if("+"==b.charAt(0)||"-"==b.charAt(0))c="-"==b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(h=a(b),h.constant))var k=h(),h=function(a){return a[k]}}return{get:h,
descending:c*d}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}return function(a,e,f){if(!za(a))return a;I(e)||(e=[e]);0===e.length&&(e=["+"]);var g=b(e,f);g.push({get:function(){return{}},descending:f?-1:1});a=Array.prototype.map.call(a,function(a,b){return{value:a,predicateValues:g.map(function(c){var e=c.get(a);c=typeof e;if(null===e)c="string",e="null";else if("string"===c)e=e.toLowerCase();else if("object"===c)a:{if("function"===typeof e.valueOf&&
(e=e.valueOf(),d(e)))break a;if(qc(e)&&(e=e.toString(),d(e)))break a;e=b}return{value:e,type:c}})}});a.sort(function(a,b){for(var c=0,d=0,e=g.length;db||37<=b&&40>=b||m(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut",
m)}b.on("change",k);c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Kb(a,b){return function(d,c){var e,f;if(da(d))return d;if(E(d)){'"'==d.charAt(0)&&'"'==d.charAt(d.length-1)&&(d=d.substring(1,d.length-1));if(kg.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,
mm:0,ss:0,sss:0},n(e,function(a,c){c=s};g.$observe("min",function(a){s=n(a);h.$validate()})}if(y(g.max)||g.ngMax){var p;h.$validators.max=function(a){return!r(a)||q(p)||d(a)<=p};g.$observe("max",function(a){p=n(a);h.$validate()})}}}function Hd(a,b,d,c){(c.$$hasNativeValidators=H(b[0].validity))&&c.$parsers.push(function(a){var c=b.prop("validity")||{};
return c.badInput&&!c.typeMismatch?u:a})}function Id(a,b,d,c,e){if(y(c)){a=a(c);if(!a.constant)throw lb("constexpr",d,c);return a(b)}return e}function lc(a,b){a="ngClass"+a;return["$animate",function(d){function c(a,b){var c=[],d=0;a:for(;d(?:<\/\1>|)$/,Tb=/<|?\w+;/,
Cf=/<([\w:-]+)/,Df=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ka={option:[1,'"],thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};ka.optgroup=ka.option;ka.tbody=ka.tfoot=ka.colgroup=ka.caption=ka.thead;ka.th=ka.td;var Kf=Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&
16)},Pa=N.prototype={ready:function(a){function b(){d||(d=!0,a())}var d=!1;"complete"===X.readyState?setTimeout(b):(this.on("DOMContentLoaded",b),N(S).on("load",b))},toString:function(){var a=[];n(this,function(b){a.push(""+b)});return"["+a.join(", ")+"]"},eq:function(a){return 0<=a?B(this[a]):B(this[this.length+a])},length:0,push:mg,sort:[].sort,splice:[].splice},Cb={};n("multiple selected checked disabled readOnly required open".split(" "),function(a){Cb[F(a)]=a});var Rc={};n("input select option textarea button form details".split(" "),
function(a){Rc[a]=!0});var Zc={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};n({data:Wb,removeData:vb,hasData:function(a){for(var b in gb[a.ng339])return!0;return!1}},function(a,b){N[b]=a});n({data:Wb,inheritedData:Bb,scope:function(a){return B.data(a,"$scope")||Bb(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return B.data(a,"$isolateScope")||B.data(a,"$isolateScopeNoTemplate")},controller:Oc,injector:function(a){return Bb(a,
"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:yb,css:function(a,b,d){b=fb(b);if(y(d))a.style[b]=d;else return a.style[b]},attr:function(a,b,d){var c=a.nodeType;if(c!==Na&&2!==c&&8!==c)if(c=F(b),Cb[c])if(y(d))d?(a[b]=!0,a.setAttribute(b,c)):(a[b]=!1,a.removeAttribute(c));else return a[b]||(a.attributes.getNamedItem(b)||x).specified?c:u;else if(y(d))a.setAttribute(b,d);else if(a.getAttribute)return a=a.getAttribute(b,2),null===a?u:a},prop:function(a,b,d){if(y(d))a[b]=d;else return a[b]},
text:function(){function a(a,d){if(q(d)){var c=a.nodeType;return 1===c||c===Na?a.textContent:""}a.textContent=d}a.$dv="";return a}(),val:function(a,b){if(q(b)){if(a.multiple&&"select"===ta(a)){var d=[];n(a.options,function(a){a.selected&&d.push(a.value||a.text)});return 0===d.length?null:d}return a.value}a.value=b},html:function(a,b){if(q(b))return a.innerHTML;ub(a,!0);a.innerHTML=b},empty:Pc},function(a,b){N.prototype[b]=function(b,c){var e,f,g=this.length;if(a!==Pc&&q(2==a.length&&a!==yb&&a!==Oc?
b:c)){if(H(b)){for(e=0;e <= >= && || ! = |".split(" "),function(a){Lb[a]=!0});var sg={n:"\n",f:"\f",r:"\r",
t:"\t",v:"\v","'":"'",'"':'"'},fc=function(a){this.options=a};fc.prototype={constructor:fc,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index=a&&"string"===typeof a},isWhitespace:function(a){return" "===a||"\r"===a||
"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdent:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b=y(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw ba("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index","<=",">=");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:s.BinaryExpression,operator:b.text,
left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:s.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.constants.hasOwnProperty(this.peek().text)?a=bb(this.constants[this.consume().text]):this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():
this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:s.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:s.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:s.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:s.CallExpression,callee:this.identifier(),
arguments:a,filter:!0};this.expect(":");)a.push(this.expression());return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.expression());while(this.expect(","))}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:s.Identifier,name:a.text}},constant:function(){return{type:s.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;
a.push(this.expression())}while(this.expect(","))}this.consume("]");return{type:s.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;b={type:s.Property,kind:"init"};this.peek().constant?b.key=this.constant():this.peek().identifier?b.key=this.identifier():this.throwError("invalid key",this.peek());this.consume(":");b.value=this.expression();a.push(b)}while(this.expect(","))}this.consume("}");return{type:s.ObjectExpression,properties:a}},
throwError:function(a,b){throw ba("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw ba("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw ba("ueoe",this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,e){if(this.tokens.length>a){a=this.tokens[a];
var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},constants:{"true":{type:s.Literal,value:!0},"false":{type:s.Literal,value:!1},"null":{type:s.Literal,value:null},undefined:{type:s.Literal,value:u},"this":{type:s.ThisExpression}}};rd.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[],
body:[],own:{}},inputs:[]};W(c,d.$filter);var e="",f;this.stage="assign";if(f=pd(c))this.state.computing="assign",e=this.nextId(),this.recurse(f,e),this.return_(e),e="fn.assign="+this.generateFunction("assign","s,v,l");f=nd(c.body);d.stage="inputs";n(f,function(a,b){var c="fn"+b;d.state[c]={vars:[],body:[],own:{}};d.state.computing=c;var e=d.nextId();d.recurse(a,e);d.return_(e);d.state.inputs.push(c);a.watchId=b});this.state.computing="fn";this.stage="main";this.recurse(c);e='"'+this.USE+" "+this.STRICT+
'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+e+this.watchFns()+"return fn;";e=(new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",e))(this.$filter,Va,xa,kd,jd,ld,Zf,md,a);this.state=this.stage=u;e.literal=qd(c);e.constant=c.constant;return e},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;n(b,function(b){a.push("var "+b+"="+d.generateFunction(b,
"s"))});b.length&&a.push("fn.inputs=["+b.join(",")+"];");return a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;n(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,
d,c,e,f){var g,h,k=this,l,m;c=c||x;if(!f&&y(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case s.Program:n(a.body,function(b,c){k.recurse(b.expression,u,u,function(a){h=a});c!==a.body.length-1?k.current().body.push(h,";"):k.return_(h)});break;case s.Literal:m=this.escape(a.value);this.assign(b,m);c(m);break;case s.UnaryExpression:this.recurse(a.argument,u,u,function(a){h=a});m=a.operator+"("+this.ifDefined(h,
0)+")";this.assign(b,m);c(m);break;case s.BinaryExpression:this.recurse(a.left,u,u,function(a){g=a});this.recurse(a.right,u,u,function(a){h=a});m="+"===a.operator?this.plus(g,h):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(h,0):"("+g+")"+a.operator+"("+h+")";this.assign(b,m);c(m);break;case s.LogicalExpression:b=b||this.nextId();k.recurse(a.left,b);k.if_("&&"===a.operator?b:k.not(b),k.lazyRecurse(a.right,b));c(b);break;case s.ConditionalExpression:b=b||this.nextId();k.recurse(a.test,
b);k.if_(b,k.lazyRecurse(a.alternate,b),k.lazyRecurse(a.consequent,b));c(b);break;case s.Identifier:b=b||this.nextId();d&&(d.context="inputs"===k.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);Va(a.name);k.if_("inputs"===k.stage||k.not(k.getHasOwnProperty("l",a.name)),function(){k.if_("inputs"===k.stage||"s",function(){e&&1!==e&&k.if_(k.not(k.nonComputedMember("s",a.name)),k.lazyAssign(k.nonComputedMember("s",a.name),"{}"));k.assign(b,k.nonComputedMember("s",
a.name))})},b&&k.lazyAssign(b,k.nonComputedMember("l",a.name)));(k.state.expensiveChecks||Fb(a.name))&&k.addEnsureSafeObject(b);c(b);break;case s.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();k.recurse(a.object,g,u,function(){k.if_(k.notNull(g),function(){if(a.computed)h=k.nextId(),k.recurse(a.property,h),k.getStringValue(h),k.addEnsureSafeMemberName(h),e&&1!==e&&k.if_(k.not(k.computedMember(g,h)),k.lazyAssign(k.computedMember(g,h),"{}")),m=k.ensureSafeObject(k.computedMember(g,
h)),k.assign(b,m),d&&(d.computed=!0,d.name=h);else{Va(a.property.name);e&&1!==e&&k.if_(k.not(k.nonComputedMember(g,a.property.name)),k.lazyAssign(k.nonComputedMember(g,a.property.name),"{}"));m=k.nonComputedMember(g,a.property.name);if(k.state.expensiveChecks||Fb(a.property.name))m=k.ensureSafeObject(m);k.assign(b,m);d&&(d.computed=!1,d.name=a.property.name)}},function(){k.assign(b,"undefined")});c(b)},!!e);break;case s.CallExpression:b=b||this.nextId();a.filter?(h=k.filter(a.callee.name),l=[],n(a.arguments,
function(a){var b=k.nextId();k.recurse(a,b);l.push(b)}),m=h+"("+l.join(",")+")",k.assign(b,m),c(b)):(h=k.nextId(),g={},l=[],k.recurse(a.callee,h,g,function(){k.if_(k.notNull(h),function(){k.addEnsureSafeFunction(h);n(a.arguments,function(a){k.recurse(a,k.nextId(),u,function(a){l.push(k.ensureSafeObject(a))})});g.name?(k.state.expensiveChecks||k.addEnsureSafeObject(g.context),m=k.member(g.context,g.name,g.computed)+"("+l.join(",")+")"):m=h+"("+l.join(",")+")";m=k.ensureSafeObject(m);k.assign(b,m)},
function(){k.assign(b,"undefined")});c(b)}));break;case s.AssignmentExpression:h=this.nextId();g={};if(!od(a.left))throw ba("lval");this.recurse(a.left,u,g,function(){k.if_(k.notNull(g.context),function(){k.recurse(a.right,h);k.addEnsureSafeObject(k.member(g.context,g.name,g.computed));k.addEnsureSafeAssignContext(g.context);m=k.member(g.context,g.name,g.computed)+a.operator+h;k.assign(b,m);c(b||m)})},1);break;case s.ArrayExpression:l=[];n(a.elements,function(a){k.recurse(a,k.nextId(),u,function(a){l.push(a)})});
m="["+l.join(",")+"]";this.assign(b,m);c(m);break;case s.ObjectExpression:l=[];n(a.properties,function(a){k.recurse(a.value,k.nextId(),u,function(b){l.push(k.escape(a.key.type===s.Identifier?a.key.name:""+a.key.value)+":"+b)})});m="{"+l.join(",")+"}";this.assign(b,m);c(m);break;case s.ThisExpression:this.assign(b,"s");c("s");break;case s.NGValueParameter:this.assign(b,"v"),c("v")}},getHasOwnProperty:function(a,b){var d=a+"."+b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+
this.escape(b)+" in "+a+")"));return c[d]},assign:function(a,b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,
"){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){return a+"."+b},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")},
addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a),";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+",text)")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+
a+",text)"},lazyRecurse:function(a,b,d,c,e,f){var g=this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(E(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(Q(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if("undefined"===
typeof a)return"undefined";throw ba("esc");},nextId:function(a,b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};sd.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.expression=a;this.expensiveChecks=b;W(c,d.$filter);var e,f;if(e=pd(c))f=this.recurse(e);e=nd(c.body);var g;e&&(g=[],n(e,function(a,b){var c=d.recurse(a);a.input=c;g.push(c);a.watchId=b}));var h=[];n(c.body,function(a){h.push(d.recurse(a.expression))});
e=0===c.body.length?function(){}:1===c.body.length?h[0]:function(a,b){var c;n(h,function(d){c=d(a,b)});return c};f&&(e.assign=function(a,b,c){return f(a,c,b)});g&&(e.inputs=g);e.literal=qd(c);e.constant=c.constant;return e},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case s.Literal:return this.value(a.value,b);case s.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case s.BinaryExpression:return c=this.recurse(a.left),
e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case s.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case s.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case s.Identifier:return Va(a.name,f.expression),f.identifier(a.name,f.expensiveChecks||Fb(a.name),b,d,f.expression);case s.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(Va(a.property.name,
f.expression),e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c,e,b,d,f.expression):this.nonComputedMember(c,e,f.expensiveChecks,b,d,f.expression);case s.CallExpression:return g=[],n(a.arguments,function(a){g.push(f.recurse(a))}),a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var r=[],n=0;n":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,
e,f,g){c=a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,h){e=a(e,f,g,h)?b(e,f,g,h):d(e,f,g,h);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:u,name:u,value:a}:a}},identifier:function(a,b,d,c,e){return function(f,g,h,k){f=
g&&a in g?g:f;c&&1!==c&&f&&!f[a]&&(f[a]={});g=f?f[a]:u;b&&xa(g,e);return d?{context:f,name:a,value:g}:g}},computedMember:function(a,b,d,c,e){return function(f,g,h,k){var l=a(f,g,h,k),m,n;null!=l&&(m=b(f,g,h,k),m=jd(m),Va(m,e),c&&1!==c&&l&&!l[m]&&(l[m]={}),n=l[m],xa(n,e));return d?{context:l,name:m,value:n}:n}},nonComputedMember:function(a,b,d,c,e,f){return function(g,h,k,l){g=a(g,h,k,l);e&&1!==e&&g&&!g[b]&&(g[b]={});h=null!=g?g[b]:u;(d||Fb(b))&&xa(h,f);return c?{context:g,name:b,value:h}:h}},inputs:function(a,
b){return function(d,c,e,f){return f?f[b]:a(d,c,e)}}};var gc=function(a,b,d){this.lexer=a;this.$filter=b;this.options=d;this.ast=new s(this.lexer);this.astCompiler=d.csp?new sd(this.ast,b):new rd(this.ast,b)};gc.prototype={constructor:gc,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};$();$();var $f=Object.prototype.valueOf,ya=G("$sce"),la={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},ha=G("$compile"),Y=X.createElement("a"),wd=wa(S.location.href);
xd.$inject=["$document"];Jc.$inject=["$provide"];yd.$inject=["$locale"];Ad.$inject=["$locale"];var ic=".",jg={yyyy:ca("FullYear",4),yy:ca("FullYear",2,0,!0),y:ca("FullYear",1),MMMM:Hb("Month"),MMM:Hb("Month",!0),MM:ca("Month",2,1),M:ca("Month",1,1),dd:ca("Date",2),d:ca("Date",1),HH:ca("Hours",2),H:ca("Hours",1),hh:ca("Hours",2,-12),h:ca("Hours",1,-12),mm:ca("Minutes",2),m:ca("Minutes",1),ss:ca("Seconds",2),s:ca("Seconds",1),sss:ca("Milliseconds",3),EEEE:Hb("Day"),EEE:Hb("Day",!0),a:function(a,b){return 12>
a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Gb(Math[0=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},ig=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,hg=/^\-?\d+$/;zd.$inject=["$locale"];var eg=na(F),fg=na(sb);Bd.$inject=["$parse"];var he=na({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,
b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===sa.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),tb={};n(Cb,function(a,b){function d(a,d,e){a.$watch(e[c],function(a){e.$set(b,!!a)})}if("multiple"!=a){var c=va("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});tb[c]=function(){return{restrict:"A",priority:100,link:e}}}});n(Zc,function(a,b){tb[b]=function(){return{priority:100,link:function(a,
c,e){if("ngPattern"===b&&"/"==e.ngPattern.charAt(0)&&(c=e.ngPattern.match(lg))){e.$set("ngPattern",new RegExp(c[1],c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});n(["src","srcset","href"],function(a){var b=va("ng-"+a);tb[b]=function(){return{priority:99,link:function(d,c,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===sa.call(c.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null);e.$observe(b,function(b){b?(e.$set(g,b),Ha&&f&&c.prop(f,e[g])):"href"===a&&e.$set(g,null)})}}}});
var Ib={$addControl:x,$$renameControl:function(a,b){a.$name=b},$removeControl:x,$setValidity:x,$setDirty:x,$setPristine:x,$setSubmitted:x};Fd.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Nd=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||x}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Fd,compile:function(d,f){d.addClass(Wa).addClass(mb);var g=f.name?"name":a&&f.ngForm?"ngForm":
!1;return{pre:function(a,d,e,f){var n=f[0];if(!("action"in e)){var q=function(b){a.$apply(function(){n.$commitViewValue();n.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",q,!1);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",q,!1)},0,!1)})}(f[1]||n.$$parentForm).$addControl(n);var s=g?c(n.$name):x;g&&(s(a,n),e.$observe(g,function(b){n.$name!==b&&(s(a,u),n.$$parentForm.$$renameControl(n,b),s=c(n.$name),s(a,n))}));d.on("$destroy",function(){n.$$parentForm.$removeControl(n);
s(a,u);M(n,Ib)})}}}}}]},ie=Nd(),ve=Nd(!0),kg=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,tg=/^[A-Za-z][A-Za-z\d.+-]*:\/*(?:\w+(?::\w+)?@)?[^\s/]+(?::\d+)?(?:\/[\w#!:.?+=&%@\-/]*)?$/,ug=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,vg=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Od=/^(\d{4})-(\d{2})-(\d{2})$/,Pd=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,mc=/^(\d{4})-W(\d\d)$/,Qd=/^(\d{4})-(\d\d)$/,
Rd=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Sd={text:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);kc(c)},date:kb("date",Od,Kb(Od,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":kb("datetimelocal",Pd,Kb(Pd,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:kb("time",Rd,Kb(Rd,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:kb("week",mc,function(a,b){if(da(a))return a;if(E(a)){mc.lastIndex=0;var d=mc.exec(a);if(d){var c=+d[1],e=+d[2],f=d=0,g=0,h=0,k=Dd(c),e=7*(e-1);b&&(d=b.getHours(),f=
b.getMinutes(),g=b.getSeconds(),h=b.getMilliseconds());return new Date(c,0,k.getDate()+e,d,f,g,h)}}return NaN},"yyyy-Www"),month:kb("month",Qd,Kb(Qd,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f){Hd(a,b,d,c);jb(a,b,d,c,e,f);c.$$parserName="number";c.$parsers.push(function(a){return c.$isEmpty(a)?null:vg.test(a)?parseFloat(a):u});c.$formatters.push(function(a){if(!c.$isEmpty(a)){if(!Q(a))throw lb("numfmt",a);a=a.toString()}return a});if(y(d.min)||d.ngMin){var g;c.$validators.min=function(a){return c.$isEmpty(a)||
q(g)||a>=g};d.$observe("min",function(a){y(a)&&!Q(a)&&(a=parseFloat(a,10));g=Q(a)&&!isNaN(a)?a:u;c.$validate()})}if(y(d.max)||d.ngMax){var h;c.$validators.max=function(a){return c.$isEmpty(a)||q(h)||a<=h};d.$observe("max",function(a){y(a)&&!Q(a)&&(a=parseFloat(a,10));h=Q(a)&&!isNaN(a)?a:u;c.$validate()})}},url:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);kc(c);c.$$parserName="url";c.$validators.url=function(a,b){var d=a||b;return c.$isEmpty(d)||tg.test(d)}},email:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);kc(c);
c.$$parserName="email";c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||ug.test(d)}},radio:function(a,b,d,c){q(d.name)&&b.attr("name",++nb);b.on("click",function(a){b[0].checked&&c.$setViewValue(d.value,a&&a.type)});c.$render=function(){b[0].checked=d.value==c.$viewValue};d.$observe("value",c.$render)},checkbox:function(a,b,d,c,e,f,g,h){var k=Id(h,a,"ngTrueValue",d.ngTrueValue,!0),l=Id(h,a,"ngFalseValue",d.ngFalseValue,!1);b.on("click",function(a){c.$setViewValue(b[0].checked,a&&
a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty=function(a){return!1===a};c.$formatters.push(function(a){return ma(a,k)});c.$parsers.push(function(a){return a?k:l})},hidden:x,button:x,submit:x,reset:x,file:x},Dc=["$browser","$sniffer","$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){h[0]&&(Sd[F(g.type)]||Sd.text)(e,f,g,h[0],b,a,d,c)}}}}],wg=/^(true|false|\d+)$/,Ne=function(){return{restrict:"A",priority:100,compile:function(a,
b){return wg.test(b.ngValue)?function(a,b,e){e.$set("value",a.$eval(e.ngValue))}:function(a,b,e){a.$watch(e.ngValue,function(a){e.$set("value",a)})}}}},ne=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0];b.$watch(e.ngBind,function(a){c.textContent=q(a)?"":a})}}}}],pe=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));
b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=q(a)?"":a})}}}}],oe=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(a){return(a||"").toString()});d.$$addBindingClass(c);return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){c.html(a.getTrustedHtml(f(b))||"")})}}}}],Me=na({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),
qe=lc("",!0),se=lc("Odd",0),re=lc("Even",1),te=La({compile:function(a,b){b.$set("ngCloak",u);a.removeClass("ng-cloak")}}),ue=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Ic={},xg={blur:!0,focus:!0};n("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=va("ng-"+a);Ic[b]=["$parse","$rootScope",function(d,c){return{restrict:"A",compile:function(e,f){var g=
d(f[b],null,!0);return function(b,d){d.on(a,function(d){var e=function(){g(b,{$event:d})};xg[a]&&c.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var xe=["$animate",function(a){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(b,d,c,e,f){var g,h,k;b.$watch(c.ngIf,function(b){b?h||f(function(b,e){h=e;b[b.length++]=X.createComment(" end ngIf: "+c.ngIf+" ");g={clone:b};a.enter(b,d.parent(),d)}):(k&&(k.remove(),k=null),h&&(h.$destroy(),h=null),g&&(k=
rb(g.clone),a.leave(k).then(function(){k=null}),g=null))})}}}],ye=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:fa.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(c,e,m,n,q){var s=0,v,u,p,C=function(){u&&(u.remove(),u=null);v&&(v.$destroy(),v=null);p&&(d.leave(p).then(function(){u=null}),u=p,p=null)};c.$watch(f,function(f){var m=function(){!y(h)||h&&!c.$eval(h)||
b()},u=++s;f?(a(f,!0).then(function(a){if(u===s){var b=c.$new();n.template=a;a=q(b,function(a){C();d.enter(a,null,e).then(m)});v=b;p=a;v.$emit("$includeContentLoaded",f);c.$eval(g)}},function(){u===s&&(C(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(C(),n.template=null)})}}}}],Pe=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){/SVG/.test(d[0].toString())?(d.empty(),a(Lc(e.template,X).childNodes)(b,function(a){d.append(a)},
{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],ze=La({priority:450,compile:function(){return{pre:function(a,b,d){a.$eval(d.ngInit)}}}}),Le=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=b.attr(d.$attr.ngList)||", ",f="false"!==d.ngTrim,g=f?U(e):e;c.$parsers.push(function(a){if(!q(a)){var b=[];a&&n(a.split(g),function(a){a&&b.push(f?U(a):a)});return b}});c.$formatters.push(function(a){return I(a)?a.join(e):u});c.$isEmpty=function(a){return!a||
!a.length}}}},mb="ng-valid",Jd="ng-invalid",Wa="ng-pristine",Jb="ng-dirty",Ld="ng-pending",lb=G("ngModel"),yg=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,d,c,e,f,g,h,k,l){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=u;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1;
this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=u;this.$name=l(d.name||"",!1)(a);this.$$parentForm=Ib;var m=e(d.ngModel),r=m.assign,t=m,s=r,v=null,B,p=this;this.$$setOptions=function(a){if((p.$options=a)&&a.getterSetter){var b=e(d.ngModel+"()"),f=e(d.ngModel+"($$$p)");t=function(a){var c=m(a);z(c)&&(c=b(a));return c};s=function(a,b){z(m(a))?f(a,{$$$p:p.$modelValue}):r(a,p.$modelValue)}}else if(!m.assign)throw lb("nonassign",d.ngModel,ua(c));};this.$render=x;this.$isEmpty=
function(a){return q(a)||""===a||null===a||a!==a};var C=0;Gd({ctrl:this,$element:c,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:f});this.$setPristine=function(){p.$dirty=!1;p.$pristine=!0;f.removeClass(c,Jb);f.addClass(c,Wa)};this.$setDirty=function(){p.$dirty=!0;p.$pristine=!1;f.removeClass(c,Wa);f.addClass(c,Jb);p.$$parentForm.$setDirty()};this.$setUntouched=function(){p.$touched=!1;p.$untouched=!0;f.setClass(c,"ng-untouched","ng-touched")};this.$setTouched=function(){p.$touched=
!0;p.$untouched=!1;f.setClass(c,"ng-touched","ng-untouched")};this.$rollbackViewValue=function(){g.cancel(v);p.$viewValue=p.$$lastCommittedViewValue;p.$render()};this.$validate=function(){if(!Q(p.$modelValue)||!isNaN(p.$modelValue)){var a=p.$$rawModelValue,b=p.$valid,c=p.$modelValue,d=p.$options&&p.$options.allowInvalid;p.$$runValidators(a,p.$$lastCommittedViewValue,function(e){d||b===e||(p.$modelValue=e?a:u,p.$modelValue!==c&&p.$$writeModelToScope())})}};this.$$runValidators=function(a,b,c){function d(){var c=
!0;n(p.$validators,function(d,e){var g=d(a,b);c=c&&g;f(e,g)});return c?!0:(n(p.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;n(p.$asyncValidators,function(e,g){var h=e(a,b);if(!h||!z(h.then))throw lb("$asyncValidators",h);f(g,u);c.push(h.then(function(){f(g,!0)},function(a){d=!1;f(g,!1)}))});c.length?k.all(c).then(function(){g(d)},x):g(!0)}function f(a,b){h===C&&p.$setValidity(a,b)}function g(a){h===C&&c(a)}C++;var h=C;(function(){var a=p.$$parserName||"parse";if(q(B))f(a,
null);else return B||(n(p.$validators,function(a,b){f(b,null)}),n(p.$asyncValidators,function(a,b){f(b,null)})),f(a,B),B;return!0})()?d()?e():g(!1):g(!1)};this.$commitViewValue=function(){var a=p.$viewValue;g.cancel(v);if(p.$$lastCommittedViewValue!==a||""===a&&p.$$hasNativeValidators)p.$$lastCommittedViewValue=a,p.$pristine&&this.$setDirty(),this.$$parseAndValidate()};this.$$parseAndValidate=function(){var b=p.$$lastCommittedViewValue;if(B=q(b)?u:!0)for(var c=0;ce||c.$isEmpty(b)||b.length<=e}}}}},Gc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e=0;d.$observe("minlength",function(a){e=ea(a)||0;c.$validate()});c.$validators.minlength=function(a,b){return c.$isEmpty(b)||b.length>=e}}}}};S.angular.bootstrap?
console.log("WARNING: Tried to load angular more than once."):(ce(),ee(fa),fa.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),
SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),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",pluralCat:function(a,c){var e=a|0,f=c;u===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),B(X).ready(function(){Zd(X,yc)}))})(window,document);!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend('');
//# sourceMappingURL=angular.min.js.map
/*!
* angular-formly JavaScript Library v8.4.1
*
* @license MIT (http://license.angular-formly.com)
*
* built with ♥ by Astrism , Kent C. Dodds
* (ó ì_í)=óò=(ì_í ò)
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("angular"), require("api-check"));
else if(typeof define === 'function' && define.amd)
define(["angular", "api-check"], factory);
else if(typeof exports === 'object')
exports["ngFormly"] = factory(require("angular"), require("api-check"));
else
root["ngFormly"] = factory(root["angular"], root["apiCheck"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_5__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _indexCommon = __webpack_require__(1);
var _indexCommon2 = _interopRequireDefault(_indexCommon);
exports['default'] = _indexCommon2['default'];
module.exports = exports['default'];
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _angularFix = __webpack_require__(2);
var _angularFix2 = _interopRequireDefault(_angularFix);
var _providersFormlyApiCheck = __webpack_require__(4);
var _providersFormlyApiCheck2 = _interopRequireDefault(_providersFormlyApiCheck);
var _otherDocsBaseUrl = __webpack_require__(6);
var _otherDocsBaseUrl2 = _interopRequireDefault(_otherDocsBaseUrl);
var _providersFormlyUsability = __webpack_require__(7);
var _providersFormlyUsability2 = _interopRequireDefault(_providersFormlyUsability);
var _providersFormlyConfig = __webpack_require__(8);
var _providersFormlyConfig2 = _interopRequireDefault(_providersFormlyConfig);
var _providersFormlyValidationMessages = __webpack_require__(10);
var _providersFormlyValidationMessages2 = _interopRequireDefault(_providersFormlyValidationMessages);
var _servicesFormlyUtil = __webpack_require__(11);
var _servicesFormlyUtil2 = _interopRequireDefault(_servicesFormlyUtil);
var _servicesFormlyWarn = __webpack_require__(12);
var _servicesFormlyWarn2 = _interopRequireDefault(_servicesFormlyWarn);
var _directivesFormlyCustomValidation = __webpack_require__(13);
var _directivesFormlyCustomValidation2 = _interopRequireDefault(_directivesFormlyCustomValidation);
var _directivesFormlyField = __webpack_require__(14);
var _directivesFormlyField2 = _interopRequireDefault(_directivesFormlyField);
var _directivesFormlyFocus = __webpack_require__(15);
var _directivesFormlyFocus2 = _interopRequireDefault(_directivesFormlyFocus);
var _directivesFormlyForm = __webpack_require__(16);
var _directivesFormlyForm2 = _interopRequireDefault(_directivesFormlyForm);
var _directivesFormlyFormController = __webpack_require__(17);
var _directivesFormlyFormController2 = _interopRequireDefault(_directivesFormlyFormController);
var _runFormlyNgModelAttrsManipulator = __webpack_require__(18);
var _runFormlyNgModelAttrsManipulator2 = _interopRequireDefault(_runFormlyNgModelAttrsManipulator);
var _runFormlyCustomTags = __webpack_require__(19);
var _runFormlyCustomTags2 = _interopRequireDefault(_runFormlyCustomTags);
var ngModuleName = 'formly';
exports['default'] = ngModuleName;
var ngModule = _angularFix2['default'].module(ngModuleName, []);
ngModule.constant('formlyApiCheck', _providersFormlyApiCheck2['default']);
ngModule.constant('formlyErrorAndWarningsUrlPrefix', _otherDocsBaseUrl2['default']);
ngModule.constant('formlyVersion', ("8.4.1")); // <-- webpack variable
ngModule.provider('formlyUsability', _providersFormlyUsability2['default']);
ngModule.provider('formlyConfig', _providersFormlyConfig2['default']);
ngModule.factory('formlyValidationMessages', _providersFormlyValidationMessages2['default']);
ngModule.factory('formlyUtil', _servicesFormlyUtil2['default']);
ngModule.factory('formlyWarn', _servicesFormlyWarn2['default']);
ngModule.directive('formlyCustomValidation', _directivesFormlyCustomValidation2['default']);
ngModule.directive('formlyField', _directivesFormlyField2['default']);
ngModule.directive('formlyFocus', _directivesFormlyFocus2['default']);
ngModule.directive('formlyForm', _directivesFormlyForm2['default']);
ngModule.controller('FormlyFormController', _directivesFormlyFormController2['default']);
ngModule.run(_runFormlyNgModelAttrsManipulator2['default']);
ngModule.run(_runFormlyCustomTags2['default']);
module.exports = exports['default'];
/***/ },
/* 2 */
/***/ function(module, exports, __webpack_require__) {
// some versions of angular don't export the angular module properly,
// so we get it from window in this case.
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var angular = __webpack_require__(3);
/* istanbul ignore next */
if (!angular.version) {
angular = window.angular;
}
exports['default'] = angular;
module.exports = exports['default'];
/***/ },
/* 3 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_3__;
/***/ },
/* 4 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _angularFix = __webpack_require__(2);
var _angularFix2 = _interopRequireDefault(_angularFix);
var _apiCheck = __webpack_require__(5);
var _apiCheck2 = _interopRequireDefault(_apiCheck);
var apiCheck = (0, _apiCheck2['default'])({
output: {
prefix: 'angular-formly:',
docsBaseUrl: __webpack_require__(6)
}
});
function shapeRequiredIfNot(otherProps, propChecker) {
if (!_angularFix2['default'].isArray(otherProps)) {
otherProps = [otherProps];
}
var type = 'specified if these are not specified: `' + otherProps.join(', ') + '` (otherwise it\'s optional)';
function shapeRequiredIfNotDefinition(prop, propName, location, obj) {
var propExists = obj && obj.hasOwnProperty(propName);
var otherPropsExist = otherProps.some(function (otherProp) {
return obj && obj.hasOwnProperty(otherProp);
});
if (!otherPropsExist && !propExists) {
return apiCheck.utils.getError(propName, location, type);
} else if (propExists) {
return propChecker(prop, propName, location, obj);
}
}
shapeRequiredIfNotDefinition.type = type;
return apiCheck.utils.checkerHelpers.setupChecker(shapeRequiredIfNotDefinition);
}
var formlyExpression = apiCheck.oneOfType([apiCheck.string, apiCheck.func]);
var specifyWrapperType = apiCheck.typeOrArrayOf(apiCheck.string).nullable;
var apiCheckProperty = apiCheck.func;
var apiCheckInstanceProperty = apiCheck.shape.onlyIf('apiCheck', apiCheck.func.withProperties({
warn: apiCheck.func,
'throw': apiCheck.func,
shape: apiCheck.func
}));
var apiCheckFunctionProperty = apiCheck.shape.onlyIf('apiCheck', apiCheck.oneOf(['throw', 'warn']));
var formlyWrapperType = apiCheck.shape({
name: shapeRequiredIfNot('types', apiCheck.string).optional,
template: apiCheck.shape.ifNot('templateUrl', apiCheck.string).optional,
templateUrl: apiCheck.shape.ifNot('template', apiCheck.string).optional,
types: apiCheck.typeOrArrayOf(apiCheck.string).optional,
overwriteOk: apiCheck.bool.optional,
apiCheck: apiCheckProperty.optional,
apiCheckInstance: apiCheckInstanceProperty.optional,
apiCheckFunction: apiCheckFunctionProperty.optional,
apiCheckOptions: apiCheck.object.optional
}).strict;
var expressionProperties = apiCheck.objectOf(apiCheck.oneOfType([formlyExpression, apiCheck.shape({
expression: formlyExpression,
message: formlyExpression.optional
}).strict]));
var modelChecker = apiCheck.oneOfType([apiCheck.string, apiCheck.object]);
var templateManipulators = apiCheck.shape({
preWrapper: apiCheck.arrayOf(apiCheck.func).nullable.optional,
postWrapper: apiCheck.arrayOf(apiCheck.func).nullable.optional
}).strict.nullable;
var validatorChecker = apiCheck.objectOf(apiCheck.oneOfType([formlyExpression, apiCheck.shape({
expression: formlyExpression,
message: formlyExpression.optional
}).strict]));
var watcherChecker = apiCheck.typeOrArrayOf(apiCheck.shape({
expression: formlyExpression.optional,
listener: formlyExpression.optional,
runFieldExpressions: apiCheck.bool.optional
}));
var fieldOptionsApiShape = {
$$hashKey: apiCheck.any.optional,
type: apiCheck.shape.ifNot(['template', 'templateUrl'], apiCheck.string).optional,
template: apiCheck.shape.ifNot(['type', 'templateUrl'], apiCheck.oneOfType([apiCheck.string, apiCheck.func])).optional,
templateUrl: apiCheck.shape.ifNot(['type', 'template'], apiCheck.oneOfType([apiCheck.string, apiCheck.func])).optional,
key: apiCheck.oneOfType([apiCheck.string, apiCheck.number]).optional,
model: modelChecker.optional,
originalModel: modelChecker.optional,
className: apiCheck.string.optional,
id: apiCheck.string.optional,
name: apiCheck.string.optional,
expressionProperties: expressionProperties.optional,
extras: apiCheck.shape({
validateOnModelChange: apiCheck.bool.optional,
skipNgModelAttrsManipulator: apiCheck.oneOfType([apiCheck.string, apiCheck.bool]).optional
}).strict.optional,
data: apiCheck.object.optional,
templateOptions: apiCheck.object.optional,
wrapper: specifyWrapperType.optional,
modelOptions: apiCheck.shape({
updateOn: apiCheck.string.optional,
debounce: apiCheck.oneOfType([apiCheck.objectOf(apiCheck.number), apiCheck.number]).optional,
allowInvalid: apiCheck.bool.optional,
getterSetter: apiCheck.bool.optional,
timezone: apiCheck.string.optional
}).optional,
watcher: watcherChecker.optional,
validators: validatorChecker.optional,
asyncValidators: validatorChecker.optional,
parsers: apiCheck.arrayOf(formlyExpression).optional,
formatters: apiCheck.arrayOf(formlyExpression).optional,
noFormControl: apiCheck.bool.optional,
hide: apiCheck.bool.optional,
hideExpression: formlyExpression.optional,
ngModelElAttrs: apiCheck.objectOf(apiCheck.string).optional,
ngModelAttrs: apiCheck.objectOf(apiCheck.shape({
statement: apiCheck.shape.ifNot(['value', 'attribute', 'bound', 'boolean'], apiCheck.any).optional,
value: apiCheck.shape.ifNot('statement', apiCheck.any).optional,
attribute: apiCheck.shape.ifNot('statement', apiCheck.any).optional,
bound: apiCheck.shape.ifNot('statement', apiCheck.any).optional,
boolean: apiCheck.shape.ifNot('statement', apiCheck.any).optional
}).strict).optional,
elementAttributes: apiCheck.objectOf(apiCheck.string).optional,
optionsTypes: apiCheck.typeOrArrayOf(apiCheck.string).optional,
link: apiCheck.func.optional,
controller: apiCheck.oneOfType([apiCheck.string, apiCheck.func, apiCheck.array]).optional,
validation: apiCheck.shape({
show: apiCheck.bool.nullable.optional,
messages: apiCheck.objectOf(formlyExpression).optional,
errorExistsAndShouldBeVisible: apiCheck.bool.optional
}).optional,
formControl: apiCheck.typeOrArrayOf(apiCheck.object).optional,
value: apiCheck.func.optional,
runExpressions: apiCheck.func.optional,
templateManipulators: templateManipulators.optional,
resetModel: apiCheck.func.optional,
updateInitialValue: apiCheck.func.optional,
initialValue: apiCheck.any.optional,
defaultValue: apiCheck.any.optional
};
var formlyFieldOptions = apiCheck.shape(fieldOptionsApiShape).strict;
var formOptionsApi = apiCheck.shape({
formState: apiCheck.object.optional,
resetModel: apiCheck.func.optional,
updateInitialValue: apiCheck.func.optional,
removeChromeAutoComplete: apiCheck.bool.optional,
parseKeyArrays: apiCheck.bool.optional,
templateManipulators: templateManipulators.optional,
manualModelWatcher: apiCheck.oneOfType([apiCheck.bool, apiCheck.func]).optional,
watchAllExpressions: apiCheck.bool.optional,
wrapper: specifyWrapperType.optional,
fieldTransform: apiCheck.oneOfType([apiCheck.func, apiCheck.array]).optional,
data: apiCheck.object.optional
}).strict;
var fieldGroup = apiCheck.shape({
$$hashKey: apiCheck.any.optional,
key: apiCheck.oneOfType([apiCheck.string, apiCheck.number]).optional,
// danger. Nested field groups wont get api-checked...
fieldGroup: apiCheck.arrayOf(apiCheck.oneOfType([formlyFieldOptions, apiCheck.object])),
className: apiCheck.string.optional,
options: formOptionsApi.optional,
templateOptions: apiCheck.object.optional,
wrapper: specifyWrapperType.optional,
watcher: watcherChecker.optional,
hide: apiCheck.bool.optional,
hideExpression: formlyExpression.optional,
data: apiCheck.object.optional,
model: modelChecker.optional,
form: apiCheck.object.optional,
elementAttributes: apiCheck.objectOf(apiCheck.string).optional
}).strict;
var typeOptionsDefaultOptions = _angularFix2['default'].copy(fieldOptionsApiShape);
typeOptionsDefaultOptions.key = apiCheck.string.optional;
var formlyTypeOptions = apiCheck.shape({
name: apiCheck.string,
template: apiCheck.shape.ifNot('templateUrl', apiCheck.oneOfType([apiCheck.string, apiCheck.func])).optional,
templateUrl: apiCheck.shape.ifNot('template', apiCheck.oneOfType([apiCheck.string, apiCheck.func])).optional,
controller: apiCheck.oneOfType([apiCheck.func, apiCheck.string, apiCheck.array]).optional,
link: apiCheck.func.optional,
defaultOptions: apiCheck.oneOfType([apiCheck.func, apiCheck.shape(typeOptionsDefaultOptions)]).optional,
'extends': apiCheck.string.optional,
wrapper: specifyWrapperType.optional,
data: apiCheck.object.optional,
apiCheck: apiCheckProperty.optional,
apiCheckInstance: apiCheckInstanceProperty.optional,
apiCheckFunction: apiCheckFunctionProperty.optional,
apiCheckOptions: apiCheck.object.optional,
overwriteOk: apiCheck.bool.optional
}).strict;
_angularFix2['default'].extend(apiCheck, {
formlyTypeOptions: formlyTypeOptions, formlyFieldOptions: formlyFieldOptions, formlyExpression: formlyExpression, formlyWrapperType: formlyWrapperType, fieldGroup: fieldGroup, formOptionsApi: formOptionsApi
});
exports['default'] = apiCheck;
module.exports = exports['default'];
/***/ },
/* 5 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_5__;
/***/ },
/* 6 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = "https://github.com/formly-js/angular-formly/blob/" + ("8.4.1") + "/other/ERRORS_AND_WARNINGS.md#";
module.exports = exports["default"];
/***/ },
/* 7 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
formlyUsability.$inject = ["formlyApiCheck", "formlyErrorAndWarningsUrlPrefix"];
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _angularFix = __webpack_require__(2);
var _angularFix2 = _interopRequireDefault(_angularFix);
exports['default'] = formlyUsability;
// @ngInject
function formlyUsability(formlyApiCheck, formlyErrorAndWarningsUrlPrefix) {
var _this = this;
_angularFix2['default'].extend(this, {
getFormlyError: getFormlyError,
getFieldError: getFieldError,
checkWrapper: checkWrapper,
checkWrapperTemplate: checkWrapperTemplate,
getErrorMessage: getErrorMessage,
$get: function $get() {
return _this;
}
});
function getFieldError(errorInfoSlug, message, field) {
if (arguments.length < 3) {
field = message;
message = errorInfoSlug;
errorInfoSlug = null;
}
return new Error(getErrorMessage(errorInfoSlug, message) + (' Field definition: ' + _angularFix2['default'].toJson(field)));
}
function getFormlyError(errorInfoSlug, message) {
if (!message) {
message = errorInfoSlug;
errorInfoSlug = null;
}
return new Error(getErrorMessage(errorInfoSlug, message));
}
function getErrorMessage(errorInfoSlug, message) {
var url = '';
if (errorInfoSlug !== null) {
url = '' + formlyErrorAndWarningsUrlPrefix + errorInfoSlug;
}
return 'Formly Error: ' + message + '. ' + url;
}
function checkWrapper(wrapper) {
formlyApiCheck['throw'](formlyApiCheck.formlyWrapperType, wrapper, {
prefix: 'formlyConfig.setWrapper',
urlSuffix: 'setwrapper-validation-failed'
});
}
function checkWrapperTemplate(template, additionalInfo) {
var formlyTransclude = '';
if (template.indexOf(formlyTransclude) === -1) {
throw getFormlyError('Template wrapper templates must use "' + formlyTransclude + '" somewhere in them. ' + ('This one does not have "" in it: ' + template) + '\n' + ('Additional information: ' + JSON.stringify(additionalInfo)));
}
}
}
module.exports = exports['default'];
/***/ },
/* 8 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
formlyConfig.$inject = ["formlyUsabilityProvider", "formlyErrorAndWarningsUrlPrefix", "formlyApiCheck"];
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } }
var _angularFix = __webpack_require__(2);
var _angularFix2 = _interopRequireDefault(_angularFix);
var _otherUtils = __webpack_require__(9);
var _otherUtils2 = _interopRequireDefault(_otherUtils);
exports['default'] = formlyConfig;
// @ngInject
function formlyConfig(formlyUsabilityProvider, formlyErrorAndWarningsUrlPrefix, formlyApiCheck) {
var _this2 = this;
var typeMap = {};
var templateWrappersMap = {};
var defaultWrapperName = 'default';
var _this = this;
var getError = formlyUsabilityProvider.getFormlyError;
_angularFix2['default'].extend(this, {
setType: setType,
getType: getType,
getTypes: getTypes,
getTypeHeritage: getTypeHeritage,
setWrapper: setWrapper,
getWrapper: getWrapper,
getWrapperByType: getWrapperByType,
removeWrapperByName: removeWrapperByName,
removeWrappersForType: removeWrappersForType,
disableWarnings: false,
extras: {
disableNgModelAttrsManipulator: false,
fieldTransform: [],
ngModelAttrsManipulatorPreferUnbound: false,
removeChromeAutoComplete: false,
parseKeyArrays: false,
defaultHideDirective: 'ng-if',
getFieldId: null
},
templateManipulators: {
preWrapper: [],
postWrapper: []
},
$get: function $get() {
return _this2;
}
});
function setType(options) {
if (_angularFix2['default'].isArray(options)) {
var _ret = (function () {
var allTypes = [];
_angularFix2['default'].forEach(options, function (item) {
allTypes.push(setType(item));
});
return {
v: allTypes
};
})();
if (typeof _ret === 'object') return _ret.v;
} else if (_angularFix2['default'].isObject(options)) {
checkType(options);
if (options['extends']) {
extendTypeOptions(options);
}
typeMap[options.name] = options;
return typeMap[options.name];
} else {
throw getError('You must provide an object or array for setType. You provided: ' + JSON.stringify(arguments));
}
}
function checkType(options) {
formlyApiCheck['throw'](formlyApiCheck.formlyTypeOptions, options, {
prefix: 'formlyConfig.setType',
url: 'settype-validation-failed'
});
if (!options.overwriteOk) {
checkOverwrite(options.name, typeMap, options, 'types');
} else {
options.overwriteOk = undefined;
}
}
function extendTypeOptions(options) {
var extendsType = getType(options['extends'], true, options);
extendTypeControllerFunction(options, extendsType);
extendTypeLinkFunction(options, extendsType);
extendTypeDefaultOptions(options, extendsType);
_otherUtils2['default'].reverseDeepMerge(options, extendsType);
extendTemplate(options, extendsType);
}
function extendTemplate(options, extendsType) {
if (options.template && extendsType.templateUrl) {
delete options.templateUrl;
} else if (options.templateUrl && extendsType.template) {
delete options.template;
}
}
function extendTypeControllerFunction(options, extendsType) {
var extendsCtrl = extendsType.controller;
if (!_angularFix2['default'].isDefined(extendsCtrl)) {
return;
}
var optionsCtrl = options.controller;
if (_angularFix2['default'].isDefined(optionsCtrl)) {
options.controller = function ($scope, $controller) {
$controller(extendsCtrl, { $scope: $scope });
$controller(optionsCtrl, { $scope: $scope });
};
options.controller.$inject = ['$scope', '$controller'];
} else {
options.controller = extendsCtrl;
}
}
function extendTypeLinkFunction(options, extendsType) {
var extendsFn = extendsType.link;
if (!_angularFix2['default'].isDefined(extendsFn)) {
return;
}
var optionsFn = options.link;
if (_angularFix2['default'].isDefined(optionsFn)) {
options.link = function () {
extendsFn.apply(undefined, arguments);
optionsFn.apply(undefined, arguments);
};
} else {
options.link = extendsFn;
}
}
function extendTypeDefaultOptions(options, extendsType) {
var extendsDO = extendsType.defaultOptions;
if (!_angularFix2['default'].isDefined(extendsDO)) {
return;
}
var optionsDO = options.defaultOptions || {};
var optionsDOIsFn = _angularFix2['default'].isFunction(optionsDO);
var extendsDOIsFn = _angularFix2['default'].isFunction(extendsDO);
if (extendsDOIsFn) {
options.defaultOptions = function defaultOptions(opts, scope) {
var extendsDefaultOptions = extendsDO(opts, scope);
var mergedDefaultOptions = {};
_otherUtils2['default'].reverseDeepMerge(mergedDefaultOptions, opts, extendsDefaultOptions);
var extenderOptionsDefaultOptions = optionsDO;
if (optionsDOIsFn) {
extenderOptionsDefaultOptions = extenderOptionsDefaultOptions(mergedDefaultOptions, scope);
}
_otherUtils2['default'].reverseDeepMerge(extenderOptionsDefaultOptions, extendsDefaultOptions);
return extenderOptionsDefaultOptions;
};
} else if (optionsDOIsFn) {
options.defaultOptions = function defaultOptions(opts, scope) {
var newDefaultOptions = {};
_otherUtils2['default'].reverseDeepMerge(newDefaultOptions, opts, extendsDO);
return optionsDO(newDefaultOptions, scope);
};
}
}
function getType(name, throwError, errorContext) {
if (!name) {
return undefined;
}
var type = typeMap[name];
if (!type && throwError === true) {
throw getError('There is no type by the name of "' + name + '": ' + JSON.stringify(errorContext));
} else {
return type;
}
}
function getTypes() {
return typeMap;
}
function getTypeHeritage(parent) {
var heritage = [];
var type = parent;
if (_angularFix2['default'].isString(type)) {
type = getType(parent);
}
parent = type['extends'];
while (parent) {
type = getType(parent);
heritage.push(type);
parent = type['extends'];
}
return heritage;
}
function setWrapper(_x, _x2) {
var _again = true;
_function: while (_again) {
var options = _x,
name = _x2;
_again = false;
if (_angularFix2['default'].isArray(options)) {
return options.map(function (wrapperOptions) {
return setWrapper(wrapperOptions);
});
} else if (_angularFix2['default'].isObject(options)) {
options.types = getOptionsTypes(options);
options.name = getOptionsName(options, name);
checkWrapperAPI(options);
templateWrappersMap[options.name] = options;
return options;
} else if (_angularFix2['default'].isString(options)) {
_x = {
template: options,
name: name
};
_x2 = undefined;
_again = true;
continue _function;
}
}
}
function getOptionsTypes(options) {
if (_angularFix2['default'].isString(options.types)) {
return [options.types];
}
if (!_angularFix2['default'].isDefined(options.types)) {
return [];
} else {
return options.types;
}
}
function getOptionsName(options, name) {
return options.name || name || options.types.join(' ') || defaultWrapperName;
}
function checkWrapperAPI(options) {
formlyUsabilityProvider.checkWrapper(options);
if (options.template) {
formlyUsabilityProvider.checkWrapperTemplate(options.template, options);
}
if (!options.overwriteOk) {
checkOverwrite(options.name, templateWrappersMap, options, 'templateWrappers');
} else {
delete options.overwriteOk;
}
checkWrapperTypes(options);
}
function checkWrapperTypes(options) {
var shouldThrow = !_angularFix2['default'].isArray(options.types) || !options.types.every(_angularFix2['default'].isString);
if (shouldThrow) {
throw getError('Attempted to create a template wrapper with types that is not a string or an array of strings');
}
}
function checkOverwrite(property, object, newValue, objectName) {
if (object.hasOwnProperty(property)) {
warn('overwriting-types-or-wrappers', ['Attempting to overwrite ' + property + ' on ' + objectName + ' which is currently', JSON.stringify(object[property]) + ' with ' + JSON.stringify(newValue), 'To supress this warning, specify the property "overwriteOk: true"'].join(' '));
}
}
function getWrapper(name) {
return templateWrappersMap[name || defaultWrapperName];
}
function getWrapperByType(type) {
/* eslint prefer-const:0 */
var wrappers = [];
for (var _name in templateWrappersMap) {
if (templateWrappersMap.hasOwnProperty(_name)) {
if (templateWrappersMap[_name].types && templateWrappersMap[_name].types.indexOf(type) !== -1) {
wrappers.push(templateWrappersMap[_name]);
}
}
}
return wrappers;
}
function removeWrapperByName(name) {
var wrapper = templateWrappersMap[name];
delete templateWrappersMap[name];
return wrapper;
}
function removeWrappersForType(type) {
var wrappers = getWrapperByType(type);
if (!wrappers) {
return undefined;
}
if (!_angularFix2['default'].isArray(wrappers)) {
return removeWrapperByName(wrappers.name);
} else {
wrappers.forEach(function (wrapper) {
return removeWrapperByName(wrapper.name);
});
return wrappers;
}
}
function warn() {
if (!_this.disableWarnings && console.warn) {
/* eslint no-console:0 */
var args = Array.prototype.slice.call(arguments);
var warnInfoSlug = args.shift();
args.unshift('Formly Warning:');
args.push('' + formlyErrorAndWarningsUrlPrefix + warnInfoSlug);
console.warn.apply(console, _toConsumableArray(args));
}
}
}
module.exports = exports['default'];
/***/ },
/* 9 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _angularFix = __webpack_require__(2);
var _angularFix2 = _interopRequireDefault(_angularFix);
exports['default'] = {
containsSelector: containsSelector, containsSpecialChar: containsSpecialChar, formlyEval: formlyEval, getFieldId: getFieldId, reverseDeepMerge: reverseDeepMerge, findByNodeName: findByNodeName,
arrayify: arrayify, extendFunction: extendFunction, extendArray: extendArray, startsWith: startsWith, contains: contains
};
function containsSelector(string) {
return containsSpecialChar(string, '.') || containsSpecialChar(string, '[') && containsSpecialChar(string, ']');
}
function containsSpecialChar(a, b) {
if (!a || !a.indexOf) {
return false;
}
return a.indexOf(b) !== -1;
}
function formlyEval(scope, expression, $modelValue, $viewValue, extraLocals) {
if (_angularFix2['default'].isFunction(expression)) {
return expression($viewValue, $modelValue, scope, extraLocals);
} else {
return scope.$eval(expression, _angularFix2['default'].extend({ $viewValue: $viewValue, $modelValue: $modelValue }, extraLocals));
}
}
function getFieldId(formId, options, index) {
if (options.id) {
return options.id;
}
var type = options.type;
if (!type && options.template) {
type = 'template';
} else if (!type && options.templateUrl) {
type = 'templateUrl';
}
return [formId, type, options.key, index].join('_');
}
function reverseDeepMerge(dest) {
_angularFix2['default'].forEach(arguments, function (src, index) {
if (!index) {
return;
}
_angularFix2['default'].forEach(src, function (val, prop) {
if (!_angularFix2['default'].isDefined(dest[prop])) {
dest[prop] = _angularFix2['default'].copy(val);
} else if (objAndSameType(dest[prop], val)) {
reverseDeepMerge(dest[prop], val);
}
});
});
return dest;
}
function objAndSameType(obj1, obj2) {
return _angularFix2['default'].isObject(obj1) && _angularFix2['default'].isObject(obj2) && Object.getPrototypeOf(obj1) === Object.getPrototypeOf(obj2);
}
// recurse down a node tree to find a node with matching nodeName, for custom tags jQuery.find doesn't work in IE8
function findByNodeName(el, nodeName) {
if (!el.prop) {
// not a jQuery or jqLite object -> wrap it
el = _angularFix2['default'].element(el);
}
if (el.prop('nodeName') === nodeName.toUpperCase()) {
return el;
}
var c = el.children();
for (var i = 0; c && i < c.length; i++) {
var node = findByNodeName(c[i], nodeName);
if (node) {
return node;
}
}
}
function arrayify(obj) {
if (obj && !_angularFix2['default'].isArray(obj)) {
obj = [obj];
} else if (!obj) {
obj = [];
}
return obj;
}
function extendFunction() {
for (var _len = arguments.length, fns = Array(_len), _key = 0; _key < _len; _key++) {
fns[_key] = arguments[_key];
}
return function extendedFunction() {
var args = arguments;
fns.forEach(function (fn) {
return fn.apply(null, args);
});
};
}
function extendArray(primary, secondary, property) {
if (property) {
primary = primary[property];
secondary = secondary[property];
}
if (secondary && primary) {
_angularFix2['default'].forEach(secondary, function (item) {
if (primary.indexOf(item) === -1) {
primary.push(item);
}
});
return primary;
} else if (secondary) {
return secondary;
} else {
return primary;
}
}
function startsWith(str, search) {
if (_angularFix2['default'].isString(str) && _angularFix2['default'].isString(search)) {
return str.length >= search.length && str.substring(0, search.length) === search;
} else {
return false;
}
}
function contains(str, search) {
if (_angularFix2['default'].isString(str) && _angularFix2['default'].isString(search)) {
return str.length >= search.length && str.indexOf(search) !== -1;
} else {
return false;
}
}
module.exports = exports['default'];
/***/ },
/* 10 */
/***/ function(module, exports) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports['default'] = formlyValidationMessages;
// @ngInject
function formlyValidationMessages() {
var validationMessages = {
addTemplateOptionValueMessage: addTemplateOptionValueMessage,
addStringMessage: addStringMessage,
messages: {}
};
return validationMessages;
function addTemplateOptionValueMessage(name, prop, prefix, suffix, alternate) {
validationMessages.messages[name] = templateOptionValue(prop, prefix, suffix, alternate);
}
function addStringMessage(name, string) {
validationMessages.messages[name] = function () {
return string;
};
}
function templateOptionValue(prop, prefix, suffix, alternate) {
return function getValidationMessage(viewValue, modelValue, scope) {
if (typeof scope.options.templateOptions[prop] !== 'undefined') {
return prefix + ' ' + scope.options.templateOptions[prop] + ' ' + suffix;
} else {
return alternate;
}
};
}
}
module.exports = exports['default'];
/***/ },
/* 11 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _otherUtils = __webpack_require__(9);
var _otherUtils2 = _interopRequireDefault(_otherUtils);
exports['default'] = formlyUtil;
// @ngInject
function formlyUtil() {
return _otherUtils2['default'];
}
module.exports = exports['default'];
/***/ },
/* 12 */
/***/ function(module, exports) {
'use strict';
formlyWarn.$inject = ["formlyConfig", "formlyErrorAndWarningsUrlPrefix", "$log"];
Object.defineProperty(exports, '__esModule', {
value: true
});
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } }
exports['default'] = formlyWarn;
// @ngInject
function formlyWarn(formlyConfig, formlyErrorAndWarningsUrlPrefix, $log) {
return function warn() {
if (!formlyConfig.disableWarnings) {
var args = Array.prototype.slice.call(arguments);
var warnInfoSlug = args.shift();
args.unshift('Formly Warning:');
args.push('' + formlyErrorAndWarningsUrlPrefix + warnInfoSlug);
$log.warn.apply($log, _toConsumableArray(args));
}
};
}
module.exports = exports['default'];
/***/ },
/* 13 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
formlyCustomValidation.$inject = ["formlyUtil"];
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _angularFix = __webpack_require__(2);
var _angularFix2 = _interopRequireDefault(_angularFix);
exports['default'] = formlyCustomValidation;
// @ngInject
function formlyCustomValidation(formlyUtil) {
return {
restrict: 'A',
require: 'ngModel',
link: function formlyCustomValidationLink(scope, el, attrs, ctrl) {
var opts = scope.options;
opts.validation.messages = opts.validation.messages || {};
_angularFix2['default'].forEach(opts.validation.messages, function (message, key) {
opts.validation.messages[key] = function () {
return formlyUtil.formlyEval(scope, message, ctrl.$modelValue, ctrl.$viewValue);
};
});
var useNewValidatorsApi = ctrl.hasOwnProperty('$validators') && !attrs.hasOwnProperty('useParsers');
_angularFix2['default'].forEach(opts.validators, _angularFix2['default'].bind(null, addValidatorToPipeline, false));
_angularFix2['default'].forEach(opts.asyncValidators, _angularFix2['default'].bind(null, addValidatorToPipeline, true));
function addValidatorToPipeline(isAsync, validator, name) {
setupMessage(validator, name);
validator = _angularFix2['default'].isObject(validator) ? validator.expression : validator;
if (useNewValidatorsApi) {
setupWithValidators(validator, name, isAsync);
} else {
setupWithParsers(validator, name, isAsync);
}
}
function setupMessage(validator, name) {
var message = validator.message;
if (message) {
opts.validation.messages[name] = function () {
return formlyUtil.formlyEval(scope, message, ctrl.$modelValue, ctrl.$viewValue);
};
}
}
function setupWithValidators(validator, name, isAsync) {
var validatorCollection = isAsync ? '$asyncValidators' : '$validators';
ctrl[validatorCollection][name] = function evalValidity(modelValue, viewValue) {
return formlyUtil.formlyEval(scope, validator, modelValue, viewValue);
};
}
function setupWithParsers(validator, name, isAsync) {
var inFlightValidator = undefined;
ctrl.$parsers.unshift(function evalValidityOfParser(viewValue) {
var isValid = formlyUtil.formlyEval(scope, validator, ctrl.$modelValue, viewValue);
if (isAsync) {
ctrl.$pending = ctrl.$pending || {};
ctrl.$pending[name] = true;
inFlightValidator = isValid;
isValid.then(function () {
if (inFlightValidator === isValid) {
ctrl.$setValidity(name, true);
}
})['catch'](function () {
if (inFlightValidator === isValid) {
ctrl.$setValidity(name, false);
}
})['finally'](function () {
var $pending = ctrl.$pending || {};
if (Object.keys($pending).length === 1) {
delete ctrl.$pending;
} else {
delete ctrl.$pending[name];
}
});
} else {
ctrl.$setValidity(name, isValid);
}
return viewValue;
});
}
}
};
}
module.exports = exports['default'];
/***/ },
/* 14 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
formlyField.$inject = ["$http", "$q", "$compile", "$templateCache", "$interpolate", "formlyConfig", "formlyApiCheck", "formlyUtil", "formlyUsability", "formlyWarn"];
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } }
var _angularFix = __webpack_require__(2);
var _angularFix2 = _interopRequireDefault(_angularFix);
var _apiCheck = __webpack_require__(5);
var _apiCheck2 = _interopRequireDefault(_apiCheck);
exports['default'] = formlyField;
/**
* @ngdoc directive
* @name formlyField
* @restrict AE
*/
// @ngInject
function formlyField($http, $q, $compile, $templateCache, $interpolate, formlyConfig, formlyApiCheck, formlyUtil, formlyUsability, formlyWarn) {
FormlyFieldController.$inject = ["$scope", "$timeout", "$parse", "$controller", "formlyValidationMessages"];
var arrayify = formlyUtil.arrayify;
return {
restrict: 'AE',
transclude: true,
require: '?^formlyForm',
scope: {
options: '=',
model: '=',
originalModel: '=?',
formId: '@', // TODO remove formId in a breaking release
index: '=?',
fields: '=?',
formState: '=?',
formOptions: '=?',
form: '=?' },
// TODO require form in a breaking release
controller: FormlyFieldController,
link: fieldLink
};
// @ngInject
function FormlyFieldController($scope, $timeout, $parse, $controller, formlyValidationMessages) {
/* eslint max-statements:[2, 37] */
if ($scope.options.fieldGroup) {
setupFieldGroup();
return;
}
var fieldType = getFieldType($scope.options);
simplifyLife($scope.options);
mergeFieldOptionsWithTypeDefaults($scope.options, fieldType);
extendOptionsWithDefaults($scope.options, $scope.index);
checkApi($scope.options);
// set field id to link labels and fields
// initalization
setFieldIdAndName();
setDefaultValue();
setInitialValue();
runExpressions();
watchExpressions();
addValidationMessages($scope.options);
invokeControllers($scope, $scope.options, fieldType);
// function definitions
function runExpressions() {
var deferred = $q.defer();
// must run on next tick to make sure that the current value is correct.
$timeout(function runExpressionsOnNextTick() {
var promises = [];
var field = $scope.options;
var currentValue = valueGetterSetter();
_angularFix2['default'].forEach(field.expressionProperties, function runExpression(expression, prop) {
var setter = $parse(prop).assign;
var promise = $q.when(formlyUtil.formlyEval($scope, expression, currentValue, currentValue)).then(function setFieldValue(value) {
setter(field, value);
});
promises.push(promise);
});
$q.all(promises).then(function () {
deferred.resolve();
});
}, 0, false);
return deferred.promise;
}
function watchExpressions() {
if ($scope.formOptions.watchAllExpressions) {
(function () {
var field = $scope.options;
var currentValue = valueGetterSetter();
_angularFix2['default'].forEach(field.expressionProperties, function watchExpression(expression, prop) {
var setter = $parse(prop).assign;
$scope.$watch(function expressionPropertyWatcher() {
return formlyUtil.formlyEval($scope, expression, currentValue, currentValue);
}, function expressionPropertyListener(value) {
setter(field, value);
}, true);
});
})();
}
}
function valueGetterSetter(newVal) {
if (!$scope.model || !$scope.options.key) {
return undefined;
}
if (_angularFix2['default'].isDefined(newVal)) {
parseSet($scope.options.key, $scope.model, newVal);
}
return parseGet($scope.options.key, $scope.model);
}
function shouldNotUseParseKey(key) {
return _angularFix2['default'].isNumber(key) || !formlyUtil.containsSelector(key);
}
function keyContainsArrays(key) {
return (/\[\d{1,}\]/.test(key)
);
}
function deepAssign(obj, prop, value) {
if (_angularFix2['default'].isString(prop)) {
prop = prop.replace(/\[(\w+)\]/g, '.$1').split('.');
}
if (prop.length > 1) {
var e = prop.shift();
obj[e] = obj[e] || isNaN(prop[0]) ? {} : [];
deepAssign(obj[e], prop, value);
} else {
obj[prop[0]] = value;
}
}
function parseSet(key, model, newVal) {
// If either of these are null/undefined then just return undefined
if (!key && key !== 0 || !model) {
return;
}
// If we are working with a number then $parse wont work, default back to the old way for now
if (shouldNotUseParseKey(key)) {
// TODO: Fix this so we can get several levels instead of just one with properties that are numeric
model[key] = newVal;
} else if (formlyConfig.extras.parseKeyArrays && keyContainsArrays(key)) {
deepAssign($scope.model, key, newVal);
} else {
var setter = $parse($scope.options.key).assign;
if (setter) {
setter($scope.model, newVal);
}
}
}
function parseGet(key, model) {
// If either of these are null/undefined then just return undefined
if (!key && key !== 0 || !model) {
return undefined;
}
// If we are working with a number then $parse wont work, default back to the old way for now
if (shouldNotUseParseKey(key)) {
// TODO: Fix this so we can get several levels instead of just one with properties that are numeric
return model[key];
} else {
return $parse(key)(model);
}
}
function simplifyLife(options) {
// add a few empty objects (if they don't already exist) so you don't have to undefined check everywhere
formlyUtil.reverseDeepMerge(options, {
originalModel: options.model,
extras: {},
data: {},
templateOptions: {},
validation: {}
});
// create $scope.to so template authors can reference to instead of $scope.options.templateOptions
$scope.to = $scope.options.templateOptions;
$scope.formOptions = $scope.formOptions || {};
}
function setFieldIdAndName() {
if (_angularFix2['default'].isFunction(formlyConfig.extras.getFieldId)) {
$scope.id = formlyConfig.extras.getFieldId($scope.options, $scope.model, $scope);
} else {
var formName = $scope.form && $scope.form.$name || $scope.formId;
$scope.id = formlyUtil.getFieldId(formName, $scope.options, $scope.index);
}
$scope.options.id = $scope.id;
$scope.name = $scope.options.name || $scope.options.id;
$scope.options.name = $scope.name;
}
function setDefaultValue() {
if (_angularFix2['default'].isDefined($scope.options.defaultValue) && !_angularFix2['default'].isDefined(parseGet($scope.options.key, $scope.model))) {
parseSet($scope.options.key, $scope.model, $scope.options.defaultValue);
}
}
function setInitialValue() {
$scope.options.initialValue = $scope.model && parseGet($scope.options.key, $scope.model);
}
function mergeFieldOptionsWithTypeDefaults(options, type) {
if (type) {
mergeOptions(options, type.defaultOptions);
}
var properOrder = arrayify(options.optionsTypes).reverse(); // so the right things are overridden
_angularFix2['default'].forEach(properOrder, function (typeName) {
mergeOptions(options, formlyConfig.getType(typeName, true, options).defaultOptions);
});
}
function mergeOptions(options, extraOptions) {
if (extraOptions) {
if (_angularFix2['default'].isFunction(extraOptions)) {
extraOptions = extraOptions(options, $scope);
}
formlyUtil.reverseDeepMerge(options, extraOptions);
}
}
function extendOptionsWithDefaults(options, index) {
var key = options.key || index || 0;
_angularFix2['default'].extend(options, {
// attach the key in case the formly-field directive is used directly
key: key,
value: options.value || valueGetterSetter,
runExpressions: runExpressions,
resetModel: resetModel,
updateInitialValue: updateInitialValue
});
}
function resetModel() {
parseSet($scope.options.key, $scope.model, $scope.options.initialValue);
if ($scope.options.formControl) {
if (_angularFix2['default'].isArray($scope.options.formControl)) {
_angularFix2['default'].forEach($scope.options.formControl, function (formControl) {
resetFormControl(formControl, true);
});
} else {
resetFormControl($scope.options.formControl);
}
}
if ($scope.form) {
$scope.form.$setUntouched && $scope.form.$setUntouched();
$scope.form.$setPristine();
}
}
function resetFormControl(formControl, isMultiNgModel) {
if (!isMultiNgModel) {
formControl.$setViewValue(parseGet($scope.options.key, $scope.model));
}
formControl.$render();
formControl.$setUntouched && formControl.$setUntouched();
formControl.$setPristine();
// To prevent breaking change requiring a digest to reset $viewModel
if (!$scope.$root.$$phase) {
$scope.$digest();
}
}
function updateInitialValue() {
$scope.options.initialValue = parseGet($scope.options.key, $scope.model);
}
function addValidationMessages(options) {
options.validation.messages = options.validation.messages || {};
_angularFix2['default'].forEach(formlyValidationMessages.messages, function createFunctionForMessage(expression, name) {
if (!options.validation.messages[name]) {
options.validation.messages[name] = function evaluateMessage(viewValue, modelValue, scope) {
return formlyUtil.formlyEval(scope, expression, modelValue, viewValue);
};
}
});
}
function invokeControllers(scope) {
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
var type = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
_angularFix2['default'].forEach([type.controller, options.controller], function (controller) {
if (controller) {
$controller(controller, { $scope: scope });
}
});
}
function setupFieldGroup() {
$scope.options.options = $scope.options.options || {};
$scope.options.options.formState = $scope.formState;
$scope.to = $scope.options.templateOptions;
}
}
// link function
function fieldLink(scope, el, attrs, formlyFormCtrl) {
if (scope.options.fieldGroup) {
setFieldGroupTemplate();
return;
}
// watch the field model (if exists) if there is no parent formly-form directive (that would watch it instead)
if (!formlyFormCtrl && scope.options.model) {
scope.$watch('options.model', function () {
return scope.options.runExpressions();
}, true);
}
addAttributes();
addClasses();
var type = getFieldType(scope.options);
var args = arguments;
var thusly = this;
var fieldCount = 0;
var fieldManipulators = getManipulators(scope.options, scope.formOptions);
getFieldTemplate(scope.options).then(runManipulators(fieldManipulators.preWrapper)).then(transcludeInWrappers(scope.options, scope.formOptions)).then(runManipulators(fieldManipulators.postWrapper)).then(setElementTemplate).then(watchFormControl).then(callLinkFunctions)['catch'](function (error) {
formlyWarn('there-was-a-problem-setting-the-template-for-this-field', 'There was a problem setting the template for this field ', scope.options, error);
});
function setFieldGroupTemplate() {
checkFieldGroupApi(scope.options);
el.addClass('formly-field-group');
var extraAttributes = '';
if (scope.options.elementAttributes) {
extraAttributes = Object.keys(scope.options.elementAttributes).map(function (key) {
return key + '="' + scope.options.elementAttributes[key] + '"';
}).join(' ');
}
var modelValue = 'model';
scope.options.form = scope.form;
if (scope.options.key) {
modelValue = 'model[\'' + scope.options.key + '\']';
}
getTemplate('\n \n \n ').then(transcludeInWrappers(scope.options, scope.formOptions)).then(setElementTemplate);
}
function addAttributes() {
if (scope.options.elementAttributes) {
el.attr(scope.options.elementAttributes);
}
}
function addClasses() {
if (scope.options.className) {
el.addClass(scope.options.className);
}
if (scope.options.type) {
el.addClass('formly-field-' + scope.options.type);
}
}
function setElementTemplate(templateString) {
el.html(asHtml(templateString));
$compile(el.contents())(scope);
return templateString;
}
function watchFormControl(templateString) {
var stopWatchingShowError = _angularFix2['default'].noop;
if (scope.options.noFormControl) {
return;
}
var templateEl = _angularFix2['default'].element('' + templateString + '
');
var ngModelNodes = templateEl[0].querySelectorAll('[ng-model],[data-ng-model]');
if (ngModelNodes.length) {
_angularFix2['default'].forEach(ngModelNodes, function (ngModelNode) {
fieldCount++;
watchFieldNameOrExistence(ngModelNode.getAttribute('name'));
});
}
function watchFieldNameOrExistence(name) {
var nameExpressionRegex = /\{\{(.*?)}}/;
var nameExpression = nameExpressionRegex.exec(name);
if (nameExpression) {
name = $interpolate(name)(scope);
}
watchFieldExistence(name);
}
function watchFieldExistence(name) {
scope.$watch('form["' + name + '"]', function formControlChange(formControl) {
if (formControl) {
if (fieldCount > 1) {
if (!scope.options.formControl) {
scope.options.formControl = [];
}
scope.options.formControl.push(formControl);
} else {
scope.options.formControl = formControl;
}
scope.fc = scope.options.formControl; // shortcut for template authors
stopWatchingShowError();
addShowMessagesWatcher();
addParsers();
addFormatters();
}
});
}
function addShowMessagesWatcher() {
stopWatchingShowError = scope.$watch(function watchShowValidationChange() {
var customExpression = formlyConfig.extras.errorExistsAndShouldBeVisibleExpression;
var options = scope.options;
var formControls = arrayify(scope.fc);
if (!formControls.some(function (fc) {
return fc.$invalid;
})) {
return false;
} else if (typeof options.validation.show === 'boolean') {
return options.validation.show;
} else if (customExpression) {
return formControls.some(function (fc) {
return formlyUtil.formlyEval(scope, customExpression, fc.$modelValue, fc.$viewValue);
});
} else {
return formControls.some(function (fc) {
var noTouchedButDirty = _angularFix2['default'].isUndefined(fc.$touched) && fc.$dirty;
return fc.$touched || noTouchedButDirty;
});
}
}, function onShowValidationChange(show) {
scope.options.validation.errorExistsAndShouldBeVisible = show;
scope.showError = show; // shortcut for template authors
});
}
function addParsers() {
setParsersOrFormatters('parsers');
}
function addFormatters() {
setParsersOrFormatters('formatters');
var ctrl = scope.fc;
var formWasPristine = scope.form.$pristine;
if (scope.options.formatters) {
(function () {
var value = ctrl.$modelValue;
ctrl.$formatters.forEach(function (formatter) {
value = formatter(value);
});
ctrl.$setViewValue(value);
ctrl.$render();
ctrl.$setPristine();
if (formWasPristine) {
scope.form.$setPristine();
}
})();
}
}
function setParsersOrFormatters(which) {
var originalThingProp = 'originalParser';
if (which === 'formatters') {
originalThingProp = 'originalFormatter';
}
// init with type's parsers
var things = getThingsFromType(type);
// get optionsTypes things
things = formlyUtil.extendArray(things, getThingsFromOptionsTypes(scope.options.optionsTypes));
// get field's things
things = formlyUtil.extendArray(things, scope.options[which]);
// convert things into formlyExpression things
_angularFix2['default'].forEach(things, function (thing, index) {
things[index] = getFormlyExpressionThing(thing);
});
var ngModelCtrls = scope.fc;
if (!_angularFix2['default'].isArray(ngModelCtrls)) {
ngModelCtrls = [ngModelCtrls];
}
_angularFix2['default'].forEach(ngModelCtrls, function (ngModelCtrl) {
var _ngModelCtrl;
ngModelCtrl['$' + which] = (_ngModelCtrl = ngModelCtrl['$' + which]).concat.apply(_ngModelCtrl, _toConsumableArray(things));
});
function getThingsFromType(theType) {
if (!theType) {
return [];
}
if (_angularFix2['default'].isString(theType)) {
theType = formlyConfig.getType(theType, true, scope.options);
}
var typeThings = [];
// get things from parent
if (theType['extends']) {
typeThings = formlyUtil.extendArray(typeThings, getThingsFromType(theType['extends']));
}
// get own type's things
typeThings = formlyUtil.extendArray(typeThings, getDefaultOptionsProperty(theType, which, []));
// get things from optionsTypes
typeThings = formlyUtil.extendArray(typeThings, getThingsFromOptionsTypes(getDefaultOptionsOptionsTypes(theType)));
return typeThings;
}
function getThingsFromOptionsTypes() {
var optionsTypes = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];
var optionsTypesThings = [];
_angularFix2['default'].forEach(_angularFix2['default'].copy(arrayify(optionsTypes)).reverse(), function (optionsTypeName) {
optionsTypesThings = formlyUtil.extendArray(optionsTypesThings, getThingsFromType(optionsTypeName));
});
return optionsTypesThings;
}
function getFormlyExpressionThing(thing) {
formlyExpressionParserOrFormatterFunction[originalThingProp] = thing;
return formlyExpressionParserOrFormatterFunction;
function formlyExpressionParserOrFormatterFunction($viewValue) {
var $modelValue = scope.options.value();
return formlyUtil.formlyEval(scope, thing, $modelValue, $viewValue);
}
}
}
}
function callLinkFunctions() {
if (type && type.link) {
type.link.apply(thusly, args);
}
if (scope.options.link) {
scope.options.link.apply(thusly, args);
}
}
function runManipulators(manipulators) {
return function runManipulatorsOnTemplate(templateToManipulate) {
var chain = $q.when(templateToManipulate);
_angularFix2['default'].forEach(manipulators, function (manipulator) {
chain = chain.then(function (template) {
return $q.when(manipulator(template, scope.options, scope)).then(function (newTemplate) {
return _angularFix2['default'].isString(newTemplate) ? newTemplate : asHtml(newTemplate);
});
});
});
return chain;
};
}
}
// sort-of stateless util functions
function asHtml(el) {
var wrapper = _angularFix2['default'].element('');
return wrapper.append(el).html();
}
function getFieldType(options) {
return options.type && formlyConfig.getType(options.type);
}
function getManipulators(options, formOptions) {
var preWrapper = [];
var postWrapper = [];
addManipulators(options.templateManipulators);
addManipulators(formOptions.templateManipulators);
addManipulators(formlyConfig.templateManipulators);
return { preWrapper: preWrapper, postWrapper: postWrapper };
function addManipulators(manipulators) {
/* eslint-disable */ // it doesn't understand this :-(
var _ref = manipulators || {};
var _ref$preWrapper = _ref.preWrapper;
var pre = _ref$preWrapper === undefined ? [] : _ref$preWrapper;
var _ref$postWrapper = _ref.postWrapper;
var post = _ref$postWrapper === undefined ? [] : _ref$postWrapper;
preWrapper = preWrapper.concat(pre);
postWrapper = postWrapper.concat(post);
/* eslint-enable */
}
}
function getFieldTemplate(options) {
function fromOptionsOrType(key, fieldType) {
if (_angularFix2['default'].isDefined(options[key])) {
return options[key];
} else if (fieldType && _angularFix2['default'].isDefined(fieldType[key])) {
return fieldType[key];
}
}
var type = formlyConfig.getType(options.type, true, options);
var template = fromOptionsOrType('template', type);
var templateUrl = fromOptionsOrType('templateUrl', type);
if (_angularFix2['default'].isUndefined(template) && !templateUrl) {
throw formlyUsability.getFieldError('type-type-has-no-template', 'Type \'' + options.type + '\' has no template. On element:', options);
}
return getTemplate(templateUrl || template, _angularFix2['default'].isUndefined(template), options);
}
function getTemplate(template, isUrl, options) {
var templatePromise = undefined;
if (_angularFix2['default'].isFunction(template)) {
templatePromise = $q.when(template(options));
} else {
templatePromise = $q.when(template);
}
if (!isUrl) {
return templatePromise;
} else {
var _ret3 = (function () {
var httpOptions = { cache: $templateCache };
return {
v: templatePromise.then(function (url) {
return $http.get(url, httpOptions);
}).then(function (response) {
return response.data;
})['catch'](function handleErrorGettingATemplate(error) {
formlyWarn('problem-loading-template-for-templateurl', 'Problem loading template for ' + template, error);
})
};
})();
if (typeof _ret3 === 'object') return _ret3.v;
}
}
function transcludeInWrappers(options, formOptions) {
var wrapper = getWrapperOption(options, formOptions);
return function transcludeTemplate(template) {
if (!wrapper.length) {
return $q.when(template);
}
wrapper.forEach(function (aWrapper) {
formlyUsability.checkWrapper(aWrapper, options);
runApiCheck(aWrapper, options);
});
var promises = wrapper.map(function (w) {
return getTemplate(w.template || w.templateUrl, !w.template);
});
return $q.all(promises).then(function (wrappersTemplates) {
wrappersTemplates.forEach(function (wrapperTemplate, index) {
formlyUsability.checkWrapperTemplate(wrapperTemplate, wrapper[index]);
});
wrappersTemplates.reverse(); // wrapper 0 is wrapped in wrapper 1 and so on...
var totalWrapper = wrappersTemplates.shift();
wrappersTemplates.forEach(function (wrapperTemplate) {
totalWrapper = doTransclusion(totalWrapper, wrapperTemplate);
});
return doTransclusion(totalWrapper, template);
});
};
}
function doTransclusion(wrapper, template) {
var superWrapper = _angularFix2['default'].element(''); // this allows people not have to have a single root in wrappers
superWrapper.append(wrapper);
var transcludeEl = superWrapper.find('formly-transclude');
if (!transcludeEl.length) {
// try it using our custom find function
transcludeEl = formlyUtil.findByNodeName(superWrapper, 'formly-transclude');
}
transcludeEl.replaceWith(template);
return superWrapper.html();
}
function getWrapperOption(options, formOptions) {
/* eslint complexity:[2, 6] */
var wrapper = options.wrapper;
// explicit null means no wrapper
if (wrapper === null) {
return [];
}
// nothing specified means use the default wrapper for the type
if (!wrapper) {
// get all wrappers that specify they apply to this type
wrapper = arrayify(formlyConfig.getWrapperByType(options.type));
} else {
wrapper = arrayify(wrapper).map(formlyConfig.getWrapper);
}
// get all wrappers for that the type specified that it uses.
var type = formlyConfig.getType(options.type, true, options);
if (type && type.wrapper) {
var typeWrappers = arrayify(type.wrapper).map(formlyConfig.getWrapper);
wrapper = wrapper.concat(typeWrappers);
}
// add form wrappers
if (formOptions.wrapper) {
var formWrappers = arrayify(formOptions.wrapper).map(formlyConfig.getWrapper);
wrapper = wrapper.concat(formWrappers);
}
// add the default wrapper last
var defaultWrapper = formlyConfig.getWrapper();
if (defaultWrapper) {
wrapper.push(defaultWrapper);
}
return wrapper;
}
function checkApi(options) {
formlyApiCheck['throw'](formlyApiCheck.formlyFieldOptions, options, {
prefix: 'formly-field directive',
url: 'formly-field-directive-validation-failed'
});
// validate with the type
var type = options.type && formlyConfig.getType(options.type);
if (type) {
runApiCheck(type, options, true);
}
if (options.expressionProperties && options.expressionProperties.hide) {
formlyWarn('dont-use-expressionproperties.hide-use-hideexpression-instead', 'You have specified `hide` in `expressionProperties`. Use `hideExpression` instead', options);
}
}
function checkFieldGroupApi(options) {
formlyApiCheck['throw'](formlyApiCheck.fieldGroup, options, {
prefix: 'formly-field directive',
url: 'formly-field-directive-validation-failed'
});
}
function runApiCheck(_ref2, options, forType) {
var apiCheck = _ref2.apiCheck;
var apiCheckInstance = _ref2.apiCheckInstance;
var apiCheckFunction = _ref2.apiCheckFunction;
var apiCheckOptions = _ref2.apiCheckOptions;
runApiCheckForType(apiCheck, apiCheckInstance, apiCheckFunction, apiCheckOptions, options);
if (forType && options.type) {
_angularFix2['default'].forEach(formlyConfig.getTypeHeritage(options.type), function (type) {
runApiCheckForType(type.apiCheck, type.apiCheckInstance, type.apiCheckFunction, type.apiCheckOptions, options);
});
}
}
function runApiCheckForType(apiCheck, apiCheckInstance, apiCheckFunction, apiCheckOptions, options) {
/* eslint complexity:[2, 9] */
if (!apiCheck) {
return;
}
var instance = apiCheckInstance || formlyConfig.extras.apiCheckInstance || formlyApiCheck;
if (instance.config.disabled || _apiCheck2['default'].globalConfig.disabled) {
return;
}
var fn = apiCheckFunction || 'warn';
// this is the new API
var checkerObjects = apiCheck(instance);
_angularFix2['default'].forEach(checkerObjects, function (shape, name) {
var checker = instance.shape(shape);
var checkOptions = _angularFix2['default'].extend({
prefix: 'formly-field type ' + options.type + ' for property ' + name,
url: formlyApiCheck.config.output.docsBaseUrl + 'formly-field-type-apicheck-failed'
}, apiCheckOptions);
instance[fn](checker, options[name], checkOptions);
});
}
}
// Stateless util functions
function getDefaultOptionsOptionsTypes(type) {
return getDefaultOptionsProperty(type, 'optionsTypes', []);
}
function getDefaultOptionsProperty(type, prop, defaultValue) {
return type.defaultOptions && type.defaultOptions[prop] || defaultValue;
}
module.exports = exports['default'];
/***/ },
/* 15 */
/***/ function(module, exports) {
'use strict';
formlyFocus.$inject = ["$timeout", "$document"];
Object.defineProperty(exports, '__esModule', {
value: true
});
exports['default'] = formlyFocus;
// @ngInject
function formlyFocus($timeout, $document) {
return {
restrict: 'A',
link: function formlyFocusLink(scope, element, attrs) {
var previousEl = null;
var el = element[0];
var doc = $document[0];
attrs.$observe('formlyFocus', function respondToFocusExpressionChange(value) {
/* eslint no-bitwise:0 */ // I know what I'm doing. I promise...
if (value === 'true') {
$timeout(function setElementFocus() {
previousEl = doc.activeElement;
el.focus();
}, ~ ~attrs.focusWait);
} else if (value === 'false') {
if (doc.activeElement === el) {
el.blur();
if (attrs.hasOwnProperty('refocus') && previousEl) {
previousEl.focus();
}
}
}
});
}
};
}
module.exports = exports['default'];
/***/ },
/* 16 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
formlyForm.$inject = ["formlyUsability", "formlyWarn", "$parse", "formlyConfig", "$interpolate"];
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _angularFix = __webpack_require__(2);
var _angularFix2 = _interopRequireDefault(_angularFix);
exports['default'] = formlyForm;
/**
* @ngdoc directive
* @name formlyForm
* @restrict AE
*/
// @ngInject
function formlyForm(formlyUsability, formlyWarn, $parse, formlyConfig, $interpolate) {
var currentFormId = 1;
return {
restrict: 'AE',
template: formlyFormGetTemplate,
replace: true,
transclude: true,
scope: {
fields: '=',
model: '=',
form: '=?',
options: '=?'
},
controller: 'FormlyFormController',
link: formlyFormLink
};
function formlyFormGetTemplate(el, attrs) {
var rootEl = getRootEl();
var fieldRootEl = getFieldRootEl();
var formId = 'formly_' + currentFormId++;
var parentFormAttributes = '';
if (attrs.hasOwnProperty('isFieldGroup') && el.parent().parent().hasClass('formly')) {
parentFormAttributes = copyAttributes(el.parent().parent()[0].attributes);
}
return '\n <' + rootEl + ' class="formly"\n name="' + getFormName() + '"\n role="form" ' + parentFormAttributes + '>\n <' + fieldRootEl + ' formly-field\n ng-repeat="field in fields ' + getTrackBy() + '"\n ' + getHideDirective() + '="!field.hide"\n class="formly-field"\n options="field"\n model="field.model || model"\n original-model="model"\n fields="fields"\n form="theFormlyForm"\n form-id="' + getFormName() + '"\n form-state="options.formState"\n form-options="options"\n index="$index">\n ' + fieldRootEl + '>\n \n ' + rootEl + '>\n ';
function getRootEl() {
return attrs.rootEl || 'ng-form';
}
function getFieldRootEl() {
return attrs.fieldRootEl || 'div';
}
function getHideDirective() {
return attrs.hideDirective || formlyConfig.extras.defaultHideDirective || 'ng-if';
}
function getTrackBy() {
if (!attrs.trackBy) {
return '';
} else {
return 'track by ' + attrs.trackBy;
}
}
function getFormName() {
var formName = formId;
var bindName = attrs.bindName;
if (bindName) {
if (_angularFix2['default'].version.minor < 3) {
throw formlyUsability.getFormlyError('bind-name attribute on formly-form not allowed in < angular 1.3');
}
// we can do a one-time binding here because we know we're in 1.3.x territory
formName = $interpolate.startSymbol() + '::\'formly_\' + ' + bindName + $interpolate.endSymbol();
}
return formName;
}
function getTranscludeClass() {
return attrs.transcludeClass || '';
}
function copyAttributes(attributes) {
var excluded = ['model', 'form', 'fields', 'options', 'name', 'role', 'class', 'data-model', 'data-form', 'data-fields', 'data-options', 'data-name'];
var arrayAttrs = [];
_angularFix2['default'].forEach(attributes, function (_ref) {
var nodeName = _ref.nodeName;
var value = _ref.value;
if (nodeName !== 'undefined' && excluded.indexOf(nodeName) === -1) {
arrayAttrs.push(toKebabCase(nodeName) + '="' + value + '"');
}
});
return arrayAttrs.join(' ');
}
}
function formlyFormLink(scope, el, attrs) {
setFormController();
fixChromeAutocomplete();
function setFormController() {
var formId = attrs.name;
scope.formId = formId;
scope.theFormlyForm = scope[formId];
if (attrs.form) {
var getter = $parse(attrs.form);
var setter = getter.assign;
var parentForm = getter(scope.$parent);
if (parentForm) {
scope.theFormlyForm = parentForm;
if (scope[formId]) {
scope.theFormlyForm.$removeControl(scope[formId]);
}
// this next line is probably one of the more dangerous things that angular-formly does to improve the
// API for angular-formly forms. It ensures that the NgModelControllers inside of formly-form will be
// attached to the form that is passed to formly-form rather than the one that formly-form creates
// this is necessary because it's confusing to have a step between the form you pass in
// and the fields in that form. It also is because angular doesn't propagate properties like $submitted down
// to children forms :-( This line was added to solve this issue:
// https://github.com/formly-js/angular-formly/issues/287
// luckily, this is how the formController has been accessed by the NgModelController since angular 1.0.0
// so I expect it will remain this way for the life of angular 1.x
el.removeData('$formController');
} else {
setter(scope.$parent, scope[formId]);
}
}
if (!scope.theFormlyForm && !formlyConfig.disableWarnings) {
/* eslint no-console:0 */
formlyWarn('formly-form-has-no-formcontroller', 'Your formly-form does not have a `form` property. Many functions of the form (like validation) may not work', el, scope);
}
}
/*
* chrome autocomplete lameness
* see https://code.google.com/p/chromium/issues/detail?id=468153#c14
* ლ(ಠ益ಠლ) (╯°□°)╯︵ ┻━┻ (◞‸◟;)
*/
function fixChromeAutocomplete() {
var global = formlyConfig.extras.removeChromeAutoComplete === true;
var offInstance = scope.options && scope.options.removeChromeAutoComplete === false;
var onInstance = scope.options && scope.options.removeChromeAutoComplete === true;
if (global && !offInstance || onInstance) {
var input = document.createElement('input');
input.setAttribute('autocomplete', 'address-level4');
input.setAttribute('hidden', 'true');
el[0].appendChild(input);
}
}
}
// stateless util functions
function toKebabCase(string) {
if (string) {
return string.replace(/([A-Z])/g, function ($1) {
return '-' + $1.toLowerCase();
});
} else {
return '';
}
}
}
module.exports = exports['default'];
/***/ },
/* 17 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
FormlyFormController.$inject = ["formlyUsability", "formlyWarn", "formlyConfig", "$parse", "$scope", "formlyApiCheck", "formlyUtil"];
Object.defineProperty(exports, '__esModule', {
value: true
});
var _slice = Array.prototype.slice;
exports['default'] = FormlyFormController;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } }
var _angularFix = __webpack_require__(2);
var _angularFix2 = _interopRequireDefault(_angularFix);
function isFieldGroup(field) {
return field && !!field.fieldGroup;
}
// @ngInject
function FormlyFormController(formlyUsability, formlyWarn, formlyConfig, $parse, $scope, formlyApiCheck, formlyUtil) {
setupOptions();
$scope.model = $scope.model || {};
setupFields();
// watch the model and evaluate watch expressions that depend on it.
if (!$scope.options.manualModelWatcher) {
$scope.$watch('model', onModelOrFormStateChange, true);
} else if (_angularFix2['default'].isFunction($scope.options.manualModelWatcher)) {
$scope.$watch($scope.options.manualModelWatcher, onModelOrFormStateChange, true);
}
if ($scope.options.formState) {
$scope.$watch('options.formState', onModelOrFormStateChange, true);
}
function onModelOrFormStateChange() {
_angularFix2['default'].forEach($scope.fields, runFieldExpressionProperties);
}
function validateFormControl(formControl, promise) {
var validate = formControl.$validate;
if (promise) {
promise.then(function () {
return validate.apply(formControl);
});
} else {
validate();
}
}
function runFieldExpressionProperties(field, index) {
var model = field.model || $scope.model;
var promise = field.runExpressions && field.runExpressions();
if (field.hideExpression) {
// can't use hide with expressionProperties reliably
var val = model[field.key];
field.hide = evalCloseToFormlyExpression(field.hideExpression, val, field, index, { model: model });
}
if (field.extras && field.extras.validateOnModelChange && field.formControl) {
if (_angularFix2['default'].isArray(field.formControl)) {
_angularFix2['default'].forEach(field.formControl, function (formControl) {
validateFormControl(formControl, promise);
});
} else {
validateFormControl(field.formControl, promise);
}
}
}
function setupFields() {
$scope.fields = $scope.fields || [];
checkDeprecatedOptions($scope.options);
var fieldTransforms = $scope.options.fieldTransform || formlyConfig.extras.fieldTransform;
if (!_angularFix2['default'].isArray(fieldTransforms)) {
fieldTransforms = [fieldTransforms];
}
_angularFix2['default'].forEach(fieldTransforms, function transformFields(fieldTransform) {
if (fieldTransform) {
$scope.fields = fieldTransform($scope.fields, $scope.model, $scope.options, $scope.form);
if (!$scope.fields) {
throw formlyUsability.getFormlyError('fieldTransform must return an array of fields');
}
}
});
setupModels();
if ($scope.options.watchAllExpressions) {
_angularFix2['default'].forEach($scope.fields, setupHideExpressionWatcher);
}
_angularFix2['default'].forEach($scope.fields, attachKey); // attaches a key based on the index if a key isn't specified
_angularFix2['default'].forEach($scope.fields, setupWatchers); // setup watchers for all fields
}
function checkDeprecatedOptions(options) {
if (formlyConfig.extras.fieldTransform && _angularFix2['default'].isFunction(formlyConfig.extras.fieldTransform)) {
formlyWarn('fieldtransform-as-a-function-deprecated', 'fieldTransform as a function has been deprecated.', 'Attempted for formlyConfig.extras: ' + formlyConfig.extras.fieldTransform.name, formlyConfig.extras);
} else if (options.fieldTransform && _angularFix2['default'].isFunction(options.fieldTransform)) {
formlyWarn('fieldtransform-as-a-function-deprecated', 'fieldTransform as a function has been deprecated.', 'Attempted for form', options);
}
}
function setupOptions() {
formlyApiCheck['throw']([formlyApiCheck.formOptionsApi.optional], [$scope.options], { prefix: 'formly-form options check' });
$scope.options = $scope.options || {};
$scope.options.formState = $scope.options.formState || {};
_angularFix2['default'].extend($scope.options, {
updateInitialValue: updateInitialValue,
resetModel: resetModel
});
}
function updateInitialValue() {
_angularFix2['default'].forEach($scope.fields, function (field) {
if (isFieldGroup(field) && field.options) {
field.options.updateInitialValue();
} else {
field.updateInitialValue();
}
});
}
function resetModel() {
_angularFix2['default'].forEach($scope.fields, function (field) {
if (isFieldGroup(field) && field.options) {
field.options.resetModel();
} else if (field.resetModel) {
field.resetModel();
}
});
}
function setupModels() {
// a set of field models that are already watched (the $scope.model will have its own watcher)
var watchedModels = [$scope.model];
// we will not set up automatic model watchers if manual mode is set
var manualModelWatcher = $scope.options.manualModelWatcher;
if ($scope.options.formState) {
// $scope.options.formState will have its own watcher
watchedModels.push($scope.options.formState);
}
_angularFix2['default'].forEach($scope.fields, function (field) {
var isNewModel = initModel(field);
if (field.model && isNewModel && watchedModels.indexOf(field.model) === -1 && !manualModelWatcher) {
$scope.$watch(function () {
return field.model;
}, onModelOrFormStateChange, true);
watchedModels.push(field.model);
}
});
}
function setupHideExpressionWatcher(field, index) {
if (field.hideExpression) {
(function () {
// can't use hide with expressionProperties reliably
var model = field.model || $scope.model;
$scope.$watch(function hideExpressionWatcher() {
var val = model[field.key];
return evalCloseToFormlyExpression(field.hideExpression, val, field, index, { model: model });
}, function (hide) {
return field.hide = hide;
}, true);
})();
}
}
function initModel(field) {
var isNewModel = true;
if (_angularFix2['default'].isString(field.model)) {
(function () {
var expression = field.model;
isNewModel = !referencesCurrentlyWatchedModel(expression);
field.model = resolveStringModel(expression);
$scope.$watch(function () {
return resolveStringModel(expression);
}, function (model) {
return field.model = model;
});
})();
}
return isNewModel;
function resolveStringModel(expression) {
var index = $scope.fields.indexOf(field);
var model = evalCloseToFormlyExpression(expression, undefined, field, index, { model: $scope.model });
if (!model) {
throw formlyUsability.getFieldError('field-model-must-be-initialized', 'Field model must be initialized. When specifying a model as a string for a field, the result of the' + ' expression must have been initialized ahead of time.', field);
}
return model;
}
}
function referencesCurrentlyWatchedModel(expression) {
return ['model', 'formState'].some(function (item) {
return formlyUtil.startsWith(expression, item + '.') || formlyUtil.startsWith(expression, item + '[');
});
}
function attachKey(field, index) {
if (!isFieldGroup(field)) {
field.key = field.key || index || 0;
}
}
function setupWatchers(field, index) {
if (!_angularFix2['default'].isDefined(field.watcher)) {
return;
}
var watchers = field.watcher;
if (!_angularFix2['default'].isArray(watchers)) {
watchers = [watchers];
}
_angularFix2['default'].forEach(watchers, function setupWatcher(watcher) {
if (!_angularFix2['default'].isDefined(watcher.listener) && !watcher.runFieldExpressions) {
throw formlyUsability.getFieldError('all-field-watchers-must-have-a-listener', 'All field watchers must have a listener', field);
}
var watchExpression = getWatchExpression(watcher, field, index);
var watchListener = getWatchListener(watcher, field, index);
var type = watcher.type || '$watch';
watcher.stopWatching = $scope[type](watchExpression, watchListener, watcher.watchDeep);
});
}
function getWatchExpression(watcher, field, index) {
var watchExpression = undefined;
if (!_angularFix2['default'].isUndefined(watcher.expression)) {
watchExpression = watcher.expression;
} else if (field.key) {
watchExpression = 'model[\'' + field.key.toString().split('.').join('\'][\'') + '\']';
}
if (_angularFix2['default'].isFunction(watchExpression)) {
(function () {
// wrap the field's watch expression so we can call it with the field as the first arg
// and the stop function as the last arg as a helper
var originalExpression = watchExpression;
watchExpression = function formlyWatchExpression() {
var args = modifyArgs.apply(undefined, [watcher, index].concat(_slice.call(arguments)));
return originalExpression.apply(undefined, _toConsumableArray(args));
};
watchExpression.displayName = 'Formly Watch Expression for field for ' + field.key;
})();
} else if (field.model) {
watchExpression = $parse(watchExpression).bind(null, $scope, { model: field.model });
}
return watchExpression;
}
function getWatchListener(watcher, field, index) {
var watchListener = watcher.listener;
if (_angularFix2['default'].isFunction(watchListener) || watcher.runFieldExpressions) {
(function () {
// wrap the field's watch listener so we can call it with the field as the first arg
// and the stop function as the last arg as a helper
var originalListener = watchListener;
watchListener = function formlyWatchListener() {
var value = undefined;
if (originalListener) {
var args = modifyArgs.apply(undefined, [watcher, index].concat(_slice.call(arguments)));
value = originalListener.apply(undefined, _toConsumableArray(args));
}
if (watcher.runFieldExpressions) {
runFieldExpressionProperties(field, index);
}
return value;
};
watchListener.displayName = 'Formly Watch Listener for field for ' + field.key;
})();
}
return watchListener;
}
function modifyArgs(watcher, index) {
for (var _len = arguments.length, originalArgs = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
originalArgs[_key - 2] = arguments[_key];
}
return [$scope.fields[index]].concat(originalArgs, [watcher.stopWatching]);
}
function evalCloseToFormlyExpression(expression, val, field, index) {
var extraLocals = arguments.length <= 4 || arguments[4] === undefined ? {} : arguments[4];
extraLocals = _angularFix2['default'].extend(getFormlyFieldLikeLocals(field, index), extraLocals);
return formlyUtil.formlyEval($scope, expression, val, val, extraLocals);
}
function getFormlyFieldLikeLocals(field, index) {
// this makes it closer to what a regular formlyExpression would be
return {
model: field.model,
options: field,
index: index,
formState: $scope.options.formState,
originalModel: $scope.model,
formOptions: $scope.options,
formId: $scope.formId
};
}
}
module.exports = exports['default'];
/***/ },
/* 18 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
addFormlyNgModelAttrsManipulator.$inject = ["formlyConfig", "$interpolate"];
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _angularFix = __webpack_require__(2);
var _angularFix2 = _interopRequireDefault(_angularFix);
var _otherUtils = __webpack_require__(9);
exports['default'] = addFormlyNgModelAttrsManipulator;
// @ngInject
function addFormlyNgModelAttrsManipulator(formlyConfig, $interpolate) {
if (formlyConfig.extras.disableNgModelAttrsManipulator) {
return;
}
formlyConfig.templateManipulators.preWrapper.push(ngModelAttrsManipulator);
function ngModelAttrsManipulator(template, options, scope) {
var node = document.createElement('div');
var skip = options.extras && options.extras.skipNgModelAttrsManipulator;
if (skip === true) {
return template;
}
node.innerHTML = template;
var modelNodes = getNgModelNodes(node, skip);
if (!modelNodes || !modelNodes.length) {
return template;
}
addIfNotPresent(modelNodes, 'id', scope.id);
addIfNotPresent(modelNodes, 'name', scope.name || scope.id);
addValidation();
alterNgModelAttr();
addModelOptions();
addTemplateOptionsAttrs();
addNgModelElAttrs();
return node.innerHTML;
function addValidation() {
if (_angularFix2['default'].isDefined(options.validators) || _angularFix2['default'].isDefined(options.validation.messages)) {
addIfNotPresent(modelNodes, 'formly-custom-validation', '');
}
}
function alterNgModelAttr() {
if (isPropertyAccessor(options.key)) {
addRegardlessOfPresence(modelNodes, 'ng-model', 'model.' + options.key);
}
}
function addModelOptions() {
if (_angularFix2['default'].isDefined(options.modelOptions)) {
addIfNotPresent(modelNodes, 'ng-model-options', 'options.modelOptions');
if (options.modelOptions.getterSetter) {
addRegardlessOfPresence(modelNodes, 'ng-model', 'options.value');
}
}
}
function addTemplateOptionsAttrs() {
if (!options.templateOptions && !options.expressionProperties) {
// no need to run these if there are no templateOptions or expressionProperties
return;
}
var to = options.templateOptions || {};
var ep = options.expressionProperties || {};
var ngModelAttributes = getBuiltInAttributes();
// extend with the user's specifications winning
_angularFix2['default'].extend(ngModelAttributes, options.ngModelAttrs);
// Feel free to make this more simple :-)
_angularFix2['default'].forEach(ngModelAttributes, function (val, name) {
/* eslint complexity:[2, 14] */
var attrVal = undefined,
attrName = undefined;
var ref = 'options.templateOptions[\'' + name + '\']';
var toVal = to[name];
var epVal = getEpValue(ep, name);
var inTo = _angularFix2['default'].isDefined(toVal);
var inEp = _angularFix2['default'].isDefined(epVal);
if (val.value) {
// I realize this looks backwards, but it's right, trust me...
attrName = val.value;
attrVal = name;
} else if (val.statement && inTo) {
attrName = val.statement;
if (_angularFix2['default'].isString(to[name])) {
attrVal = '$eval(' + ref + ')';
} else if (_angularFix2['default'].isFunction(to[name])) {
attrVal = ref + '(model[options.key], options, this, $event)';
} else {
throw new Error('options.templateOptions.' + name + ' must be a string or function: ' + JSON.stringify(options));
}
} else if (val.bound && inEp) {
attrName = val.bound;
attrVal = ref;
} else if ((val.attribute || val.boolean) && inEp) {
attrName = val.attribute || val.boolean;
attrVal = '' + $interpolate.startSymbol() + ref + $interpolate.endSymbol();
} else if (val.attribute && inTo) {
attrName = val.attribute;
attrVal = toVal;
} else if (val.boolean) {
if (inTo && !inEp && toVal) {
attrName = val.boolean;
attrVal = true;
} else {
/* eslint no-empty:0 */
// empty to illustrate that a boolean will not be added via val.bound
// if you want it added via val.bound, then put it in expressionProperties
}
} else if (val.bound && inTo) {
attrName = val.bound;
attrVal = ref;
}
if (_angularFix2['default'].isDefined(attrName) && _angularFix2['default'].isDefined(attrVal)) {
addIfNotPresent(modelNodes, attrName, attrVal);
}
});
}
function addNgModelElAttrs() {
_angularFix2['default'].forEach(options.ngModelElAttrs, function (val, name) {
addRegardlessOfPresence(modelNodes, name, val);
});
}
}
// Utility functions
function getNgModelNodes(node, skip) {
var selectorNot = _angularFix2['default'].isString(skip) ? ':not(' + skip + ')' : '';
var skipNot = ':not([formly-skip-ng-model-attrs-manipulator])';
var query = '[ng-model]' + selectorNot + skipNot + ', [data-ng-model]' + selectorNot + skipNot;
try {
return node.querySelectorAll(query);
} catch (e) {
//this code is needed for IE8, as it does not support the CSS3 ':not' selector
//it should be removed when IE8 support is dropped
return getNgModelNodesFallback(node, skip);
}
}
function getNgModelNodesFallback(node, skip) {
var allNgModelNodes = node.querySelectorAll('[ng-model], [data-ng-model]');
var matchingNgModelNodes = [];
//make sure this array is compatible with NodeList type by adding an 'item' function
matchingNgModelNodes.item = function (i) {
return this[i];
};
for (var i = 0; i < allNgModelNodes.length; i++) {
var ngModelNode = allNgModelNodes[i];
if (!ngModelNode.hasAttribute('formly-skip-ng-model-attrs-manipulator') && !(_angularFix2['default'].isString(skip) && nodeMatches(ngModelNode, skip))) {
matchingNgModelNodes.push(ngModelNode);
}
}
return matchingNgModelNodes;
}
function nodeMatches(node, selector) {
var div = document.createElement('div');
div.innerHTML = node.outerHTML;
return div.querySelector(selector);
}
function getBuiltInAttributes() {
var ngModelAttributes = {
focus: {
attribute: 'formly-focus'
}
};
var boundOnly = [];
var bothBooleanAndBound = ['required', 'disabled'];
var bothAttributeAndBound = ['pattern', 'minlength'];
var statementOnly = ['change', 'keydown', 'keyup', 'keypress', 'click', 'focus', 'blur'];
var attributeOnly = ['placeholder', 'min', 'max', 'step', 'tabindex', 'type'];
if (formlyConfig.extras.ngModelAttrsManipulatorPreferUnbound) {
bothAttributeAndBound.push('maxlength');
} else {
boundOnly.push('maxlength');
}
_angularFix2['default'].forEach(boundOnly, function (item) {
ngModelAttributes[item] = { bound: 'ng-' + item };
});
_angularFix2['default'].forEach(bothBooleanAndBound, function (item) {
ngModelAttributes[item] = { boolean: item, bound: 'ng-' + item };
});
_angularFix2['default'].forEach(bothAttributeAndBound, function (item) {
ngModelAttributes[item] = { attribute: item, bound: 'ng-' + item };
});
_angularFix2['default'].forEach(statementOnly, function (item) {
var propName = 'on' + item.substr(0, 1).toUpperCase() + item.substr(1);
ngModelAttributes[propName] = { statement: 'ng-' + item };
});
_angularFix2['default'].forEach(attributeOnly, function (item) {
ngModelAttributes[item] = { attribute: item };
});
return ngModelAttributes;
}
function getEpValue(ep, name) {
return ep['templateOptions.' + name] || ep['templateOptions[\'' + name + '\']'] || ep['templateOptions["' + name + '"]'];
}
function addIfNotPresent(nodes, attr, val) {
_angularFix2['default'].forEach(nodes, function (node) {
if (!node.getAttribute(attr)) {
node.setAttribute(attr, val);
}
});
}
function addRegardlessOfPresence(nodes, attr, val) {
_angularFix2['default'].forEach(nodes, function (node) {
node.setAttribute(attr, val);
});
}
function isPropertyAccessor(key) {
return (0, _otherUtils.contains)(key, '.') || (0, _otherUtils.contains)(key, '[') && (0, _otherUtils.contains)(key, ']');
}
}
module.exports = exports['default'];
/***/ },
/* 19 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
addCustomTags.$inject = ["$document"];
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _angularFix = __webpack_require__(2);
var _angularFix2 = _interopRequireDefault(_angularFix);
exports['default'] = addCustomTags;
// @ngInject
function addCustomTags($document) {
// IE8 check ->
// https://msdn.microsoft.com/en-us/library/cc196988(v=vs.85).aspx
if ($document && $document.documentMode < 9) {
(function () {
var document = $document.get(0);
// add the custom elements that we need for formly
var customElements = ['formly-field', 'formly-form'];
_angularFix2['default'].forEach(customElements, function (el) {
document.createElement(el);
});
})();
}
}
module.exports = exports['default'];
/***/ }
/******/ ])
});
;
//! angular-formly-templates-bootstrap version 6.4.0 built with ♥ by Astrism , Kent C. Dodds (ó ì_í)=óò=(ì_í ò)
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("angular"), require("angular-formly"), require("api-check"));
else if(typeof define === 'function' && define.amd)
define(["angular", "angular-formly", "api-check"], factory);
else if(typeof exports === 'object')
exports["ngFormlyTemplatesBootstrap"] = factory(require("angular"), require("angular-formly"), require("api-check"));
else
root["ngFormlyTemplatesBootstrap"] = factory(root["angular"], root["ngFormly"], root["apiCheck"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_4__, __WEBPACK_EXTERNAL_MODULE_5__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
module.exports = __webpack_require__(1);
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var ngModuleName = 'formlyBootstrap';
var angular = __webpack_require__(2);
var ngModule = angular.module(ngModuleName, [__webpack_require__(4)]);
ngModule.constant('formlyBootstrapApiCheck', __webpack_require__(5)({
output: {
prefix: 'angular-formly-bootstrap'
}
}));
ngModule.constant('formlyBootstrapVersion', ("6.4.0"));
__webpack_require__(6)(ngModule);
__webpack_require__(9)(ngModule);
__webpack_require__(19)(ngModule);
exports['default'] = ngModuleName;
module.exports = exports['default'];
/***/ },
/* 2 */
/***/ function(module, exports, __webpack_require__) {
// some versions of angular don't export the angular module properly,
// so we get it from window in this case.
'use strict';
var angular = __webpack_require__(3);
if (!angular.version) {
angular = window.angular;
}
module.exports = angular;
/***/ },
/* 3 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_3__;
/***/ },
/* 4 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_4__;
/***/ },
/* 5 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_5__;
/***/ },
/* 6 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports['default'] = function (ngModule) {
ngModule.config(addWrappers);
function addWrappers(formlyConfigProvider) {
formlyConfigProvider.setWrapper([{
name: 'bootstrapLabel',
template: __webpack_require__(7),
apiCheck: function apiCheck(check) {
return {
templateOptions: {
label: check.string.optional,
required: check.bool.optional,
labelSrOnly: check.bool.optional
}
};
}
}, { name: 'bootstrapHasError', template: __webpack_require__(8) }]);
}
addWrappers.$inject = ["formlyConfigProvider"];
};
module.exports = exports['default'];
/***/ },
/* 7 */
/***/ function(module, exports) {
module.exports = "\n \n \n
\n"
/***/ },
/* 8 */
/***/ function(module, exports) {
module.exports = "\n \n
\n"
/***/ },
/* 9 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports['default'] = function (ngModule) {
__webpack_require__(10)(ngModule);
__webpack_require__(12)(ngModule);
__webpack_require__(14)(ngModule);
__webpack_require__(15)(ngModule);
__webpack_require__(17)(ngModule);
__webpack_require__(18)(ngModule);
};
module.exports = exports['default'];
/***/ },
/* 10 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports['default'] = function (ngModule) {
ngModule.config(addCheckboxType);
function addCheckboxType(formlyConfigProvider) {
formlyConfigProvider.setType({
name: 'checkbox',
template: __webpack_require__(11),
wrapper: ['bootstrapHasError'],
apiCheck: function apiCheck(check) {
return {
templateOptions: {
label: check.string
}
};
}
});
}
addCheckboxType.$inject = ["formlyConfigProvider"];
};
module.exports = exports['default'];
/***/ },
/* 11 */
/***/ function(module, exports) {
module.exports = "\n\t\n
\n"
/***/ },
/* 12 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports['default'] = function (ngModule) {
ngModule.config(addCheckboxType);
function addCheckboxType(formlyConfigProvider) {
formlyConfigProvider.setType({
name: 'multiCheckbox',
template: __webpack_require__(13),
wrapper: ['bootstrapLabel', 'bootstrapHasError'],
apiCheck: function apiCheck(check) {
return {
templateOptions: {
options: check.arrayOf(check.object),
labelProp: check.string.optional,
valueProp: check.string.optional
}
};
},
defaultOptions: {
noFormControl: false,
ngModelAttrs: {
required: {
attribute: '',
bound: ''
}
}
},
controller: /* @ngInject */["$scope", function controller($scope) {
var to = $scope.to;
var opts = $scope.options;
$scope.multiCheckbox = {
checked: [],
change: setModel
};
// initialize the checkboxes check property
$scope.$watch('model', function modelWatcher(newModelValue) {
var modelValue, valueProp;
if (Object.keys(newModelValue).length) {
modelValue = newModelValue[opts.key];
$scope.$watch('to.options', function optionsWatcher(newOptionsValues) {
if (newOptionsValues && Array.isArray(newOptionsValues) && Array.isArray(modelValue)) {
valueProp = to.valueProp || 'value';
for (var index = 0; index < newOptionsValues.length; index++) {
$scope.multiCheckbox.checked[index] = modelValue.indexOf(newOptionsValues[index][valueProp]) !== -1;
}
}
});
}
}, true);
function checkValidity(expressionValue) {
var valid;
if ($scope.to.required) {
valid = angular.isArray($scope.model[opts.key]) && $scope.model[opts.key].length > 0 && expressionValue;
$scope.fc.$setValidity('required', valid);
}
}
function setModel() {
$scope.model[opts.key] = [];
angular.forEach($scope.multiCheckbox.checked, function (checkbox, index) {
if (checkbox) {
$scope.model[opts.key].push(to.options[index][to.valueProp || 'value']);
}
});
// Must make sure we mark as touched because only the last checkbox due to a bug in angular.
$scope.fc.$setTouched();
checkValidity(true);
if ($scope.to.onChange) {
$scope.to.onChange();
}
}
if (opts.expressionProperties && opts.expressionProperties['templateOptions.required']) {
$scope.$watch(function () {
return $scope.to.required;
}, function (newValue) {
checkValidity(newValue);
});
}
if ($scope.to.required) {
var unwatchFormControl = $scope.$watch('fc', function (newValue) {
if (!newValue) {
return;
}
checkValidity(true);
unwatchFormControl();
});
}
}]
});
}
addCheckboxType.$inject = ["formlyConfigProvider"];
};
module.exports = exports['default'];
/***/ },
/* 13 */
/***/ function(module, exports) {
module.exports = "\n
\n \n
\n
\n"
/***/ },
/* 14 */
/***/ function(module, exports) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports['default'] = function (ngModule) {
ngModule.config(addInputType);
function addInputType(formlyConfigProvider) {
formlyConfigProvider.setType({
name: 'input',
template: '',
wrapper: ['bootstrapLabel', 'bootstrapHasError']
});
}
addInputType.$inject = ["formlyConfigProvider"];
};
module.exports = exports['default'];
/***/ },
/* 15 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports['default'] = function (ngModule) {
ngModule.config(addRadioType);
function addRadioType(formlyConfigProvider) {
formlyConfigProvider.setType({
name: 'radio',
template: __webpack_require__(16),
wrapper: ['bootstrapLabel', 'bootstrapHasError'],
defaultOptions: {
noFormControl: false
},
apiCheck: function apiCheck(check) {
return {
templateOptions: {
options: check.arrayOf(check.object),
labelProp: check.string.optional,
valueProp: check.string.optional,
inline: check.bool.optional
}
};
}
});
}
addRadioType.$inject = ["formlyConfigProvider"];
};
module.exports = exports['default'];
/***/ },
/* 16 */
/***/ function(module, exports) {
module.exports = "\n
\n \n
\n
\n"
/***/ },
/* 17 */
/***/ function(module, exports) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
exports['default'] = function (ngModule) {
ngModule.config(addSelectType);
var template = '';
function addSelectType(formlyConfigProvider) {
formlyConfigProvider.setType({
name: 'select',
template: template,
wrapper: ['bootstrapLabel', 'bootstrapHasError'],
defaultOptions: function defaultOptions(options) {
/* jshint maxlen:195 */
var ngOptions = options.templateOptions.ngOptions || 'option[to.valueProp || \'value\'] as option[to.labelProp || \'name\'] group by option[to.groupProp || \'group\'] for option in to.options';
return {
ngModelAttrs: _defineProperty({}, ngOptions, {
value: options.templateOptions.optionsAttr || 'ng-options'
})
};
},
apiCheck: function apiCheck(check) {
return {
templateOptions: {
options: check.arrayOf(check.object),
optionsAttr: check.string.optional,
labelProp: check.string.optional,
valueProp: check.string.optional,
groupProp: check.string.optional
}
};
}
});
}
addSelectType.$inject = ["formlyConfigProvider"];
};
module.exports = exports['default'];
/***/ },
/* 18 */
/***/ function(module, exports) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports['default'] = function (ngModule) {
ngModule.config(addTextareaType);
function addTextareaType(formlyConfigProvider) {
formlyConfigProvider.setType({
name: 'textarea',
template: '',
wrapper: ['bootstrapLabel', 'bootstrapHasError'],
defaultOptions: {
ngModelAttrs: {
rows: { attribute: 'rows' },
cols: { attribute: 'cols' }
}
},
apiCheck: function apiCheck(check) {
return {
templateOptions: {
rows: check.number.optional,
cols: check.number.optional
}
};
}
});
}
addTextareaType.$inject = ["formlyConfigProvider"];
};
module.exports = exports['default'];
/***/ },
/* 19 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _addons = __webpack_require__(20);
var _addons2 = _interopRequireDefault(_addons);
var _description = __webpack_require__(22);
var _description2 = _interopRequireDefault(_description);
exports['default'] = function (ngModule) {
(0, _addons2['default'])(ngModule);
(0, _description2['default'])(ngModule);
};
module.exports = exports['default'];
/***/ },
/* 20 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports['default'] = function (ngModule) {
ngModule.run(addAddonsManipulator);
function addAddonsManipulator(formlyConfig, formlyBootstrapApiCheck) {
var addonTemplate = __webpack_require__(21);
var addonChecker = formlyBootstrapApiCheck.shape({
'class': formlyBootstrapApiCheck.string.optional,
text: formlyBootstrapApiCheck.string.optional,
onClick: formlyBootstrapApiCheck.func.optional
}).strict.optional;
var api = formlyBootstrapApiCheck.shape({
templateOptions: formlyBootstrapApiCheck.shape({
addonLeft: addonChecker,
addonRight: addonChecker
})
});
formlyConfig.templateManipulators.preWrapper.push(function (template, options) {
if (!options.templateOptions.addonLeft && !options.templateOptions.addonRight) {
return template;
}
formlyBootstrapApiCheck.warn([api], [options]);
return addonTemplate.replace('', template);
});
}
addAddonsManipulator.$inject = ["formlyConfig", "formlyBootstrapApiCheck"];
};
module.exports = exports['default'];
/***/ },
/* 21 */
/***/ function(module, exports) {
module.exports = "\n
\n \n {{to.addonLeft.text}}\n
\n
\n
\n \n {{to.addonRight.text}}\n
\n
\n"
/***/ },
/* 22 */
/***/ function(module, exports) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports['default'] = function (ngModule) {
ngModule.run(addDescriptionManipulator);
function addDescriptionManipulator(formlyConfig) {
formlyConfig.templateManipulators.preWrapper.push(function ariaDescribedBy(template, options, scope) {
if (angular.isDefined(options.templateOptions.description)) {
var el = document.createElement('div');
el.appendChild(angular.element(template)[0]);
el.appendChild(angular.element('' + '{{to.description}}' + '
')[0]);
var modelEls = angular.element(el.querySelectorAll('[ng-model]'));
if (modelEls) {
modelEls.attr('aria-describedby', scope.id + '_description');
}
return el.innerHTML;
} else {
return template;
}
});
}
addDescriptionManipulator.$inject = ["formlyConfig"];
};
module.exports = exports['default'];
/***/ }
/******/ ])
});
;