").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),s=i.uniqueId().attr("id");return e("
").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[s]={element:t,tooltip:i}},_find:function(e){var t=e.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(i,s){var n=e.Event("blur"),a=s.element;n.target=n.currentTarget=a[0],t.close(n,!0),e("#"+i).remove(),a.data("ui-tooltip-title")&&(a.attr("title")||a.attr("title",a.data("ui-tooltip-title")),a.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}});var y="ui-effects-",b=e;e.effects={effect:{}},function(e,t){function i(e,t,i){var s=d[t.type]||{};return null==e?i||!t.def?null:t.def:(e=s.floor?~~e:parseFloat(e),isNaN(e)?t.def:s.mod?(e+s.mod)%s.mod:0>e?0:e>s.max?s.max:e)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(e,a){var o,r=a.re.exec(i),h=r&&a.parse(r),l=a.space||"rgba";return h?(o=s[l](h),s[u[l].cache]=o[u[l].cache],n=s._rgba=o._rgba,!1):t}),n.length?("0,0,0,0"===n.join()&&e.extend(n,a.transparent),s):a[i]}function n(e,t,i){return i=(i+1)%1,1>6*i?e+6*(t-e)*i:1>2*i?t:2>3*i?e+6*(t-e)*(2/3-i):e}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],l=e.Color=function(t,i,s,n){return new e.Color.fn.parse(t,i,s,n)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},d={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},c=l.support={},p=e("
")[0],f=e.each;p.style.cssText="background-color:rgba(1,1,1,.5)",c.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(u,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),l.fn=e.extend(l.prototype,{parse:function(n,o,r,h){if(n===t)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=e(n).css(o),o=t);var d=this,c=e.type(n),p=this._rgba=[];return o!==t&&(n=[n,o,r,h],c="array"),"string"===c?this.parse(s(n)||a._default):"array"===c?(f(u.rgba.props,function(e,t){p[t.idx]=i(n[t.idx],t)}),this):"object"===c?(n instanceof l?f(u,function(e,t){n[t.cache]&&(d[t.cache]=n[t.cache].slice())}):f(u,function(t,s){var a=s.cache;f(s.props,function(e,t){if(!d[a]&&s.to){if("alpha"===e||null==n[e])return;d[a]=s.to(d._rgba)}d[a][t.idx]=i(n[e],t,!0)}),d[a]&&0>e.inArray(null,d[a].slice(0,3))&&(d[a][3]=1,s.from&&(d._rgba=s.from(d[a])))}),this):t},is:function(e){var i=l(e),s=!0,n=this;return f(u,function(e,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(e,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:t})),s}),s},_space:function(){var e=[],t=this;return f(u,function(i,s){t[s.cache]&&e.push(i)}),e.pop()},transition:function(e,t){var s=l(e),n=s._space(),a=u[n],o=0===this.alpha()?l("transparent"):this,r=o[a.cache]||a.to(o._rgba),h=r.slice();return s=s[a.cache],f(a.props,function(e,n){var a=n.idx,o=r[a],l=s[a],u=d[n.type]||{};null!==l&&(null===o?h[a]=l:(u.mod&&(l-o>u.mod/2?o+=u.mod:o-l>u.mod/2&&(o-=u.mod)),h[a]=i((l-o)*t+o,n)))}),this[n](h)},blend:function(t){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(t)._rgba;return l(e.map(i,function(e,t){return(1-s)*n[t]+s*e}))},toRgbaString:function(){var t="rgba(",i=e.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===i[3]&&(i.pop(),t="rgb("),t+i.join()+")"},toHslaString:function(){var t="hsla(",i=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&3>t&&(e=Math.round(100*e)+"%"),e});return 1===i[3]&&(i.pop(),t="hsl("),t+i.join()+")"},toHexString:function(t){var i=this._rgba.slice(),s=i.pop();return t&&i.push(~~(255*s)),"#"+e.map(i,function(e){return e=(e||0).toString(16),1===e.length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,u.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,i,s=e[0]/255,n=e[1]/255,a=e[2]/255,o=e[3],r=Math.max(s,n,a),h=Math.min(s,n,a),l=r-h,u=r+h,d=.5*u;return t=h===r?0:s===r?60*(n-a)/l+360:n===r?60*(a-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=d?l/u:l/(2-u),[Math.round(t)%360,i,d,null==o?1:o]},u.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,i=e[1],s=e[2],a=e[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,t+1/3)),Math.round(255*n(r,o,t)),Math.round(255*n(r,o,t-1/3)),a]},f(u,function(s,n){var a=n.props,o=n.cache,h=n.to,u=n.from;l.fn[s]=function(s){if(h&&!this[o]&&(this[o]=h(this._rgba)),s===t)return this[o].slice();var n,r=e.type(s),d="array"===r||"object"===r?s:arguments,c=this[o].slice();return f(a,function(e,t){var s=d["object"===r?e:t.idx];null==s&&(s=c[t.idx]),c[t.idx]=i(s,t)}),u?(n=l(u(c)),n[o]=c,n):l(c)},f(a,function(t,i){l.fn[t]||(l.fn[t]=function(n){var a,o=e.type(n),h="alpha"===t?this._hsla?"hsla":"rgba":s,l=this[h](),u=l[i.idx];return"undefined"===o?u:("function"===o&&(n=n.call(this,u),o=e.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=u+parseFloat(a[2])*("+"===a[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(t){var i=t.split(" ");f(i,function(t,i){e.cssHooks[i]={set:function(t,n){var a,o,r="";if("transparent"!==n&&("string"!==e.type(n)||(a=s(n)))){if(n=l(a||n),!c.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?t.parentNode:t;(""===r||"transparent"===r)&&o&&o.style;)try{r=e.css(o,"backgroundColor"),o=o.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{t.style[i]=n}catch(h){}}},e.fx.step[i]=function(t){t.colorInit||(t.start=l(t.elem,i),t.end=l(t.end),t.colorInit=!0),e.cssHooks[i].set(t.elem,t.start.transition(t.end,t.pos))}})},l.hook(o),e.cssHooks.borderColor={expand:function(e){var t={};return f(["Top","Right","Bottom","Left"],function(i,s){t["border"+s+"Color"]=e}),t}},a=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(b),function(){function t(t){var i,s,n=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[e.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function i(t,i){var s,a,o={};for(s in i)a=i[s],t[s]!==a&&(n[s]||(e.fx.step[s]||!isNaN(parseFloat(a)))&&(o[s]=a));return o}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,i){e.fx.step[i]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(b.style(e.elem,i,e.end),e.setAttr=!0)}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(n,a,o,r){var h=e.speed(a,o,r);return this.queue(function(){var a,o=e(this),r=o.attr("class")||"",l=h.children?o.find("*").addBack():o;l=l.map(function(){var i=e(this);return{el:i,start:t(this)}}),a=function(){e.each(s,function(e,t){n[t]&&o[t+"Class"](n[t])})},a(),l=l.map(function(){return this.end=t(this.el[0]),this.diff=i(this.start,this.end),this}),o.attr("class",r),l=l.map(function(){var t=this,i=e.Deferred(),s=e.extend({},h,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,s),i.promise()}),e.when.apply(e,l.get()).done(function(){a(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),h.complete.call(o[0])})})},e.fn.extend({addClass:function(t){return function(i,s,n,a){return s?e.effects.animateClass.call(this,{add:i},s,n,a):t.apply(this,arguments)}}(e.fn.addClass),removeClass:function(t){return function(i,s,n,a){return arguments.length>1?e.effects.animateClass.call(this,{remove:i},s,n,a):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(i,s,n,a,o){return"boolean"==typeof s||void 0===s?n?e.effects.animateClass.call(this,s?{add:i}:{remove:i},n,a,o):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:i},s,n,a)}}(e.fn.toggleClass),switchClass:function(t,i,s,n,a){return e.effects.animateClass.call(this,{add:i,remove:t},s,n,a)}})}(),function(){function t(t,i,s,n){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),e.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(n=s,s=i,i={}),e.isFunction(s)&&(n=s,s=null),i&&e.extend(t,i),s=s||i.duration,t.duration=e.fx.off?0:"number"==typeof s?s:s in e.fx.speeds?e.fx.speeds[s]:e.fx.speeds._default,t.complete=n||i.complete,t}function i(t){return!t||"number"==typeof t||e.fx.speeds[t]?!0:"string"!=typeof t||e.effects.effect[t]?e.isFunction(t)?!0:"object"!=typeof t||t.effect?!1:!0:!0}e.extend(e.effects,{version:"1.11.4",save:function(e,t){for(var i=0;t.length>i;i++)null!==t[i]&&e.data(y+t[i],e[0].style[t[i]])},restore:function(e,t){var i,s;for(s=0;t.length>s;s++)null!==t[s]&&(i=e.data(y+t[s]),void 0===i&&(i=""),e.css(t[s],i))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var i,s;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=e[1]/t.width}return{x:s,y:i}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},s=e("
").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:t.width(),height:t.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return t.wrap(s),(t[0]===a||e.contains(t[0],a))&&e(a).focus(),s=t.parent(),"static"===t.css("position")?(s.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,s){i[s]=t.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(n),s.css(i).show()},removeWrapper:function(t){var i=document.activeElement;
+return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).focus()),t},setTransition:function(t,i,s,n){return n=n||{},e.each(i,function(e,i){var a=t.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),e.fn.extend({effect:function(){function i(t){function i(){e.isFunction(a)&&a.call(n[0]),e.isFunction(t)&&t()}var n=e(this),a=s.complete,r=s.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),i()):o.call(n[0],s,i)}var s=t.apply(this,arguments),n=s.mode,a=s.queue,o=e.effects.effect[s.effect];return e.fx.off||!o?n?this[n](s.duration,s.complete):this.each(function(){s.complete&&s.complete.call(this)}):a===!1?this.each(i):this.queue(a||"fx",i)},show:function(e){return function(s){if(i(s))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="show",this.effect.call(this,n)}}(e.fn.show),hide:function(e){return function(s){if(i(s))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(e.fn.hide),toggle:function(e){return function(s){if(i(s)||"boolean"==typeof s)return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(e.fn.toggle),cssUnit:function(t){var i=this.css(t),s=[];return e.each(["em","px","%","pt"],function(e,t){i.indexOf(t)>0&&(s=[parseFloat(i),t])}),s}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,i){t[i]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;((t=Math.pow(2,--i))-1)/11>e;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,i){e.easing["easeIn"+t]=i,e.easing["easeOut"+t]=function(e){return 1-i(1-e)},e.easing["easeInOut"+t]=function(e){return.5>e?i(2*e)/2:1-i(-2*e+2)/2}})}(),e.effects,e.effects.effect.blind=function(t,i){var s,n,a,o=e(this),r=/up|down|vertical/,h=/up|left|vertical|horizontal/,l=["position","top","bottom","left","right","height","width"],u=e.effects.setMode(o,t.mode||"hide"),d=t.direction||"up",c=r.test(d),p=c?"height":"width",f=c?"top":"left",m=h.test(d),g={},v="show"===u;o.parent().is(".ui-effects-wrapper")?e.effects.save(o.parent(),l):e.effects.save(o,l),o.show(),s=e.effects.createWrapper(o).css({overflow:"hidden"}),n=s[p](),a=parseFloat(s.css(f))||0,g[p]=v?n:0,m||(o.css(c?"bottom":"right",0).css(c?"top":"left","auto").css({position:"absolute"}),g[f]=v?a:n+a),v&&(s.css(p,0),m||s.css(f,a+n)),s.animate(g,{duration:t.duration,easing:t.easing,queue:!1,complete:function(){"hide"===u&&o.hide(),e.effects.restore(o,l),e.effects.removeWrapper(o),i()}})},e.effects.effect.bounce=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","height","width"],h=e.effects.setMode(o,t.mode||"effect"),l="hide"===h,u="show"===h,d=t.direction||"up",c=t.distance,p=t.times||5,f=2*p+(u||l?1:0),m=t.duration/f,g=t.easing,v="up"===d||"down"===d?"top":"left",y="up"===d||"left"===d,b=o.queue(),_=b.length;for((u||l)&&r.push("opacity"),e.effects.save(o,r),o.show(),e.effects.createWrapper(o),c||(c=o["top"===v?"outerHeight":"outerWidth"]()/3),u&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,y?2*-c:2*c).animate(a,m,g)),l&&(c/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(y?"-=":"+=")+c,o.animate(n,m,g).animate(a,m,g),c=l?2*c:c/2;l&&(n={opacity:0},n[v]=(y?"-=":"+=")+c,o.animate(n,m,g)),o.queue(function(){l&&o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()}),_>1&&b.splice.apply(b,[1,0].concat(b.splice(_,f+1))),o.dequeue()},e.effects.effect.clip=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","height","width"],h=e.effects.setMode(o,t.mode||"hide"),l="show"===h,u=t.direction||"vertical",d="vertical"===u,c=d?"height":"width",p=d?"top":"left",f={};e.effects.save(o,r),o.show(),s=e.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[c](),l&&(n.css(c,0),n.css(p,a/2)),f[c]=l?a:0,f[p]=l?0:a/2,n.animate(f,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){l||o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()}})},e.effects.effect.drop=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","opacity","height","width"],o=e.effects.setMode(n,t.mode||"hide"),r="show"===o,h=t.direction||"left",l="up"===h||"down"===h?"top":"left",u="up"===h||"left"===h?"pos":"neg",d={opacity:r?1:0};e.effects.save(n,a),n.show(),e.effects.createWrapper(n),s=t.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===u?-s:s),d[l]=(r?"pos"===u?"+=":"-=":"pos"===u?"-=":"+=")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})},e.effects.effect.explode=function(t,i){function s(){b.push(this),b.length===d*c&&n()}function n(){p.css({visibility:"visible"}),e(b).remove(),m||p.hide(),i()}var a,o,r,h,l,u,d=t.pieces?Math.round(Math.sqrt(t.pieces)):3,c=d,p=e(this),f=e.effects.setMode(p,t.mode||"hide"),m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/c),y=Math.ceil(p.outerHeight()/d),b=[];for(a=0;d>a;a++)for(h=g.top+a*y,u=a-(d-1)/2,o=0;c>o;o++)r=g.left+o*v,l=o-(c-1)/2,p.clone().appendTo("body").wrap("
").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*y}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:y,left:r+(m?l*v:0),top:h+(m?u*y:0),opacity:m?0:1}).animate({left:r+(m?0:l*v),top:h+(m?0:u*y),opacity:m?1:0},t.duration||500,t.easing,s)},e.effects.effect.fade=function(t,i){var s=e(this),n=e.effects.setMode(s,t.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:t.duration,easing:t.easing,complete:i})},e.effects.effect.fold=function(t,i){var s,n,a=e(this),o=["position","top","bottom","left","right","height","width"],r=e.effects.setMode(a,t.mode||"hide"),h="show"===r,l="hide"===r,u=t.size||15,d=/([0-9]+)%/.exec(u),c=!!t.horizFirst,p=h!==c,f=p?["width","height"]:["height","width"],m=t.duration/2,g={},v={};e.effects.save(a,o),a.show(),s=e.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],d&&(u=parseInt(d[1],10)/100*n[l?0:1]),h&&s.css(c?{height:0,width:u}:{height:u,width:0}),g[f[0]]=h?n[0]:u,v[f[1]]=h?n[1]:0,s.animate(g,m,t.easing).animate(v,m,t.easing,function(){l&&a.hide(),e.effects.restore(a,o),e.effects.removeWrapper(a),i()})},e.effects.effect.highlight=function(t,i){var s=e(this),n=["backgroundImage","backgroundColor","opacity"],a=e.effects.setMode(s,t.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),e.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===a&&s.hide(),e.effects.restore(s,n),i()}})},e.effects.effect.size=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],u=["fontSize"],d=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],c=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=e.effects.setMode(o,t.mode||"effect"),f=t.restore||"effect"!==p,m=t.scale||"both",g=t.origin||["middle","center"],v=o.css("position"),y=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===t.mode&&"show"===p?(o.from=t.to||b,o.to=t.from||s):(o.from=t.from||("show"===p?b:s),o.to=t.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===m||"both"===m)&&(a.from.y!==a.to.y&&(y=y.concat(d),o.from=e.effects.setTransition(o,d,a.from.y,o.from),o.to=e.effects.setTransition(o,d,a.to.y,o.to)),a.from.x!==a.to.x&&(y=y.concat(c),o.from=e.effects.setTransition(o,c,a.from.x,o.from),o.to=e.effects.setTransition(o,c,a.to.x,o.to))),("content"===m||"both"===m)&&a.from.y!==a.to.y&&(y=y.concat(u).concat(l),o.from=e.effects.setTransition(o,u,a.from.y,o.from),o.to=e.effects.setTransition(o,u,a.to.y,o.to)),e.effects.save(o,y),o.show(),e.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),g&&(n=e.effects.getBaseline(g,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===m||"both"===m)&&(d=d.concat(["marginTop","marginBottom"]).concat(u),c=c.concat(["marginLeft","marginRight"]),l=r.concat(d).concat(c),o.find("*[width]").each(function(){var i=e(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&e.effects.save(i,l),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=e.effects.setTransition(i,d,a.from.y,i.from),i.to=e.effects.setTransition(i,d,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=e.effects.setTransition(i,c,a.from.x,i.from),i.to=e.effects.setTransition(i,c,a.to.x,i.to)),i.css(i.from),i.animate(i.to,t.duration,t.easing,function(){f&&e.effects.restore(i,l)})})),o.animate(o.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),e.effects.restore(o,y),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):e.each(["top","left"],function(e,t){o.css(t,function(t,i){var s=parseInt(i,10),n=e?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),e.effects.removeWrapper(o),i()}})},e.effects.effect.scale=function(t,i){var s=e(this),n=e.extend(!0,{},t),a=e.effects.setMode(s,t.mode||"effect"),o=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"hide"===a?0:100),r=t.direction||"both",h=t.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},u={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=h||["middle","center"],n.restore=!0),n.from=t.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*u.y,width:l.width*u.x,outerHeight:l.outerHeight*u.y,outerWidth:l.outerWidth*u.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},e.effects.effect.puff=function(t,i){var s=e(this),n=e.effects.setMode(s,t.mode||"hide"),a="hide"===n,o=parseInt(t.percent,10)||150,r=o/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};e.extend(t,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(t)},e.effects.effect.pulsate=function(t,i){var s,n=e(this),a=e.effects.setMode(n,t.mode||"show"),o="show"===a,r="hide"===a,h=o||"hide"===a,l=2*(t.times||5)+(h?1:0),u=t.duration/l,d=0,c=n.queue(),p=c.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),d=1),s=1;l>s;s++)n.animate({opacity:d},u,t.easing),d=1-d;n.animate({opacity:d},u,t.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&c.splice.apply(c,[1,0].concat(c.splice(p,l+1))),n.dequeue()},e.effects.effect.shake=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","height","width"],o=e.effects.setMode(n,t.mode||"effect"),r=t.direction||"left",h=t.distance||20,l=t.times||3,u=2*l+1,d=Math.round(t.duration/u),c="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},m={},g={},v=n.queue(),y=v.length;for(e.effects.save(n,a),n.show(),e.effects.createWrapper(n),f[c]=(p?"-=":"+=")+h,m[c]=(p?"+=":"-=")+2*h,g[c]=(p?"-=":"+=")+2*h,n.animate(f,d,t.easing),s=1;l>s;s++)n.animate(m,d,t.easing).animate(g,d,t.easing);n.animate(m,d,t.easing).animate(f,d/2,t.easing).queue(function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}),y>1&&v.splice.apply(v,[1,0].concat(v.splice(y,u+1))),n.dequeue()},e.effects.effect.slide=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","width","height"],o=e.effects.setMode(n,t.mode||"show"),r="show"===o,h=t.direction||"left",l="up"===h||"down"===h?"top":"left",u="up"===h||"left"===h,d={};e.effects.save(n,a),n.show(),s=t.distance||n["top"===l?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,u?isNaN(s)?"-"+s:-s:s),d[l]=(r?u?"+=":"-=":u?"-=":"+=")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})},e.effects.effect.transfer=function(t,i){var s=e(this),n=e(t.to),a="fixed"===n.css("position"),o=e("body"),r=a?o.scrollTop():0,h=a?o.scrollLeft():0,l=n.offset(),u={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},d=s.offset(),c=e("
").appendTo(document.body).addClass(t.className).css({top:d.top-r,left:d.left-h,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(u,t.duration,t.easing,function(){c.remove(),i()})}});
\ No newline at end of file
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/menus/jquery.tooltipster.js b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/menus/jquery.tooltipster.js
new file mode 100644
index 0000000..503e199
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/menus/jquery.tooltipster.js
@@ -0,0 +1,1327 @@
+/*
+
+Tooltipster 3.3.0 | 2014-11-08
+A rockin' custom tooltip jQuery plugin
+
+Developed by Caleb Jacob under the MIT license http://opensource.org/licenses/MIT
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+;(function ($, window, document) {
+
+ var pluginName = "tooltipster",
+ defaults = {
+ animation: 'fade',
+ arrow: true,
+ arrowColor: '',
+ autoClose: true,
+ content: null,
+ contentAsHTML: false,
+ contentCloning: true,
+ debug: true,
+ delay: 200,
+ minWidth: 0,
+ maxWidth: null,
+ functionInit: function(origin, content) {},
+ functionBefore: function(origin, continueTooltip) {
+ continueTooltip();
+ },
+ functionReady: function(origin, tooltip) {},
+ functionAfter: function(origin) {},
+ hideOnClick: false,
+ icon: '(?)',
+ iconCloning: true,
+ iconDesktop: false,
+ iconTouch: false,
+ iconTheme: 'tooltipster-icon',
+ interactive: false,
+ interactiveTolerance: 350,
+ multiple: false,
+ offsetX: 0,
+ offsetY: 0,
+ onlyOne: false,
+ position: 'top',
+ positionTracker: false,
+ positionTrackerCallback: function(origin){
+ // the default tracker callback will close the tooltip when the trigger is
+ // 'hover' (see https://github.com/iamceege/tooltipster/pull/253)
+ if(this.option('trigger') == 'hover' && this.option('autoClose')) {
+ this.hide();
+ }
+ },
+ restoration: 'current',
+ speed: 350,
+ timer: 0,
+ theme: 'tooltipster-default',
+ touchDevices: true,
+ trigger: 'hover',
+ updateAnimation: true
+ };
+
+ function Plugin(element, options) {
+
+ // list of instance variables
+
+ this.bodyOverflowX;
+ // stack of custom callbacks provided as parameters to API methods
+ this.callbacks = {
+ hide: [],
+ show: []
+ };
+ this.checkInterval = null;
+ // this will be the user content shown in the tooltip. A capital "C" is used because there is also a method called content()
+ this.Content;
+ // this is the original element which is being applied the tooltipster plugin
+ this.$el = $(element);
+ // this will be the element which triggers the appearance of the tooltip on hover/click/custom events.
+ // it will be the same as this.$el if icons are not used (see in the options), otherwise it will correspond to the created icon
+ this.$elProxy;
+ this.elProxyPosition;
+ this.enabled = true;
+ this.options = $.extend({}, defaults, options);
+ this.mouseIsOverProxy = false;
+ // a unique namespace per instance, for easy selective unbinding
+ this.namespace = 'tooltipster-'+ Math.round(Math.random()*100000);
+ // Status (capital S) can be either : appearing, shown, disappearing, hidden
+ this.Status = 'hidden';
+ this.timerHide = null;
+ this.timerShow = null;
+ // this will be the tooltip element (jQuery wrapped HTML element)
+ this.$tooltip;
+
+ // for backward compatibility
+ this.options.iconTheme = this.options.iconTheme.replace('.', '');
+ this.options.theme = this.options.theme.replace('.', '');
+
+ // launch
+
+ this._init();
+ }
+
+ Plugin.prototype = {
+
+ _init: function() {
+
+ var self = this;
+
+ // disable the plugin on old browsers (including IE7 and lower)
+ if (document.querySelector) {
+
+ // note : the content is null (empty) by default and can stay that way if the plugin remains initialized but not fed any content. The tooltip will just not appear.
+
+ // let's save the initial value of the title attribute for later restoration if need be.
+ var initialTitle = null;
+ // it will already have been saved in case of multiple tooltips
+ if (self.$el.data('tooltipster-initialTitle') === undefined) {
+
+ initialTitle = self.$el.attr('title');
+
+ // we do not want initialTitle to have the value "undefined" because of how jQuery's .data() method works
+ if (initialTitle === undefined) initialTitle = null;
+
+ self.$el.data('tooltipster-initialTitle', initialTitle);
+ }
+
+ // if content is provided in the options, its has precedence over the title attribute.
+ // Note : an empty string is considered content, only 'null' represents the absence of content.
+ // Also, an existing title="" attribute will result in an empty string content
+ if (self.options.content !== null){
+ self._content_set(self.options.content);
+ }
+ else {
+ self._content_set(initialTitle);
+ }
+
+ var c = self.options.functionInit.call(self.$el, self.$el, self.Content);
+ if(typeof c !== 'undefined') self._content_set(c);
+
+ self.$el
+ // strip the title off of the element to prevent the default tooltips from popping up
+ .removeAttr('title')
+ // to be able to find all instances on the page later (upon window events in particular)
+ .addClass('tooltipstered');
+
+ // detect if we're changing the tooltip origin to an icon
+ // note about this condition : if the device has touch capability and self.options.iconTouch is false, you'll have no icons event though you may consider your device as a desktop if it also has a mouse. Not sure why someone would have this use case though.
+ if ((!deviceHasTouchCapability && self.options.iconDesktop) || (deviceHasTouchCapability && self.options.iconTouch)) {
+
+ // TODO : the tooltip should be automatically be given an absolute position to be near the origin. Otherwise, when the origin is floating or what, it's going to be nowhere near it and disturb the position flow of the page elements. It will imply that the icon also detects when its origin moves, to follow it : not trivial.
+ // Until it's done, the icon feature does not really make sense since the user still has most of the work to do by himself
+
+ // if the icon provided is in the form of a string
+ if(typeof self.options.icon === 'string'){
+ // wrap it in a span with the icon class
+ self.$elProxy = $('
');
+ self.$elProxy.text(self.options.icon);
+ }
+ // if it is an object (sensible choice)
+ else {
+ // (deep) clone the object if iconCloning == true, to make sure every instance has its own proxy. We use the icon without wrapping, no need to. We do not give it a class either, as the user will undoubtedly style the object on his own and since our css properties may conflict with his own
+ if (self.options.iconCloning) self.$elProxy = self.options.icon.clone(true);
+ else self.$elProxy = self.options.icon;
+ }
+
+ self.$elProxy.insertAfter(self.$el);
+ }
+ else {
+ self.$elProxy = self.$el;
+ }
+
+ // for 'click' and 'hover' triggers : bind on events to open the tooltip. Closing is now handled in _showNow() because of its bindings.
+ // Notes about touch events :
+ // - mouseenter, mouseleave and clicks happen even on pure touch devices because they are emulated. deviceIsPureTouch() is a simple attempt to detect them.
+ // - on hybrid devices, we do not prevent touch gesture from opening tooltips. It would be too complex to differentiate real mouse events from emulated ones.
+ // - we check deviceIsPureTouch() at each event rather than prior to binding because the situation may change during browsing
+ if (self.options.trigger == 'hover') {
+
+ // these binding are for mouse interaction only
+ self.$elProxy
+ .on('mouseenter.'+ self.namespace, function() {
+ if (!deviceIsPureTouch() || self.options.touchDevices) {
+ self.mouseIsOverProxy = true;
+ self._show();
+ }
+ })
+ .on('mouseleave.'+ self.namespace, function() {
+ if (!deviceIsPureTouch() || self.options.touchDevices) {
+ self.mouseIsOverProxy = false;
+ }
+ });
+
+ // for touch interaction only
+ if (deviceHasTouchCapability && self.options.touchDevices) {
+
+ // for touch devices, we immediately display the tooltip because we cannot rely on mouseleave to handle the delay
+ self.$elProxy.on('touchstart.'+ self.namespace, function() {
+ self._showNow();
+ });
+ }
+ }
+ else if (self.options.trigger == 'click') {
+
+ // note : for touch devices, we do not bind on touchstart, we only rely on the emulated clicks (triggered by taps)
+ self.$elProxy.on('click.'+ self.namespace, function() {
+ if (!deviceIsPureTouch() || self.options.touchDevices) {
+ self._show();
+ }
+ });
+ }
+ }
+ },
+
+ // this function will schedule the opening of the tooltip after the delay, if there is one
+ _show: function() {
+
+ var self = this;
+
+ if (self.Status != 'shown' && self.Status != 'appearing') {
+
+ if (self.options.delay) {
+ self.timerShow = setTimeout(function(){
+
+ // for hover trigger, we check if the mouse is still over the proxy, otherwise we do not show anything
+ if (self.options.trigger == 'click' || (self.options.trigger == 'hover' && self.mouseIsOverProxy)) {
+ self._showNow();
+ }
+ }, self.options.delay);
+ }
+ else self._showNow();
+ }
+ },
+
+ // this function will open the tooltip right away
+ _showNow: function(callback) {
+
+ var self = this;
+
+ // call our constructor custom function before continuing
+ self.options.functionBefore.call(self.$el, self.$el, function() {
+
+ // continue only if the tooltip is enabled and has any content
+ if (self.enabled && self.Content !== null) {
+
+ // save the method callback and cancel hide method callbacks
+ if (callback) self.callbacks.show.push(callback);
+ self.callbacks.hide = [];
+
+ //get rid of any appearance timer
+ clearTimeout(self.timerShow);
+ self.timerShow = null;
+ clearTimeout(self.timerHide);
+ self.timerHide = null;
+
+ // if we only want one tooltip open at a time, close all auto-closing tooltips currently open and not already disappearing
+ if (self.options.onlyOne) {
+ $('.tooltipstered').not(self.$el).each(function(i,el) {
+
+ var $el = $(el),
+ nss = $el.data('tooltipster-ns');
+
+ // iterate on all tooltips of the element
+ $.each(nss, function(i, ns){
+ var instance = $el.data(ns),
+ // we have to use the public methods here
+ s = instance.status(),
+ ac = instance.option('autoClose');
+
+ if (s !== 'hidden' && s !== 'disappearing' && ac) {
+ instance.hide();
+ }
+ });
+ });
+ }
+
+ var finish = function() {
+ self.Status = 'shown';
+
+ // trigger any show method custom callbacks and reset them
+ $.each(self.callbacks.show, function(i,c) { c.call(self.$el); });
+ self.callbacks.show = [];
+ };
+
+ // if this origin already has its tooltip open
+ if (self.Status !== 'hidden') {
+
+ // the timer (if any) will start (or restart) right now
+ var extraTime = 0;
+
+ // if it was disappearing, cancel that
+ if (self.Status === 'disappearing') {
+
+ self.Status = 'appearing';
+
+ if (supportsTransitions()) {
+
+ self.$tooltip
+ .clearQueue()
+ .removeClass('tooltipster-dying')
+ .addClass('tooltipster-'+ self.options.animation +'-show');
+
+ if (self.options.speed > 0) self.$tooltip.delay(self.options.speed);
+
+ self.$tooltip.queue(finish);
+ }
+ else {
+ // in case the tooltip was currently fading out, bring it back to life
+ self.$tooltip
+ .stop()
+ .fadeIn(finish);
+ }
+ }
+ // if the tooltip is already open, we still need to trigger the method custom callback
+ else if(self.Status === 'shown') {
+ finish();
+ }
+ }
+ // if the tooltip isn't already open, open that sucker up!
+ else {
+
+ self.Status = 'appearing';
+
+ // the timer (if any) will start when the tooltip has fully appeared after its transition
+ var extraTime = self.options.speed;
+
+ // disable horizontal scrollbar to keep overflowing tooltips from jacking with it and then restore it to its previous value
+ self.bodyOverflowX = $('body').css('overflow-x');
+ //$('body').css('overflow-x', 'hidden');
+
+ // get some other settings related to building the tooltip
+ var animation = 'tooltipster-' + self.options.animation,
+ animationSpeed = '-webkit-transition-duration: '+ self.options.speed +'ms; -webkit-animation-duration: '+ self.options.speed +'ms; -moz-transition-duration: '+ self.options.speed +'ms; -moz-animation-duration: '+ self.options.speed +'ms; -o-transition-duration: '+ self.options.speed +'ms; -o-animation-duration: '+ self.options.speed +'ms; -ms-transition-duration: '+ self.options.speed +'ms; -ms-animation-duration: '+ self.options.speed +'ms; transition-duration: '+ self.options.speed +'ms; animation-duration: '+ self.options.speed +'ms;',
+ minWidth = self.options.minWidth ? 'min-width:'+ Math.round(self.options.minWidth) +'px;' : '',
+ maxWidth = self.options.maxWidth ? 'max-width:'+ Math.round(self.options.maxWidth) +'px;' : '',
+ pointerEvents = self.options.interactive ? 'pointer-events: auto;' : '';
+
+ // build the base of our tooltip
+ self.$tooltip = $('
');
+
+ // only add the animation class if the user has a browser that supports animations
+ if (supportsTransitions()) self.$tooltip.addClass(animation);
+
+ // insert the content
+ self._content_insert();
+
+ // attach
+ self.$tooltip.appendTo('body');
+
+ // do all the crazy calculations and positioning
+ self.reposition();
+
+ // call our custom callback since the content of the tooltip is now part of the DOM
+ self.options.functionReady.call(self.$el, self.$el, self.$tooltip);
+
+ // animate in the tooltip
+ if (supportsTransitions()) {
+
+ self.$tooltip.addClass(animation + '-show');
+
+ if(self.options.speed > 0) self.$tooltip.delay(self.options.speed);
+
+ self.$tooltip.queue(finish);
+ }
+ else {
+ self.$tooltip.css('display', 'none').fadeIn(self.options.speed, finish);
+ }
+
+ // will check if our tooltip origin is removed while the tooltip is shown
+ self._interval_set();
+
+ // reposition on scroll (otherwise position:fixed element's tooltips will move away form their origin) and on resize (in case position can/has to be changed)
+ $(window).on('scroll.'+ self.namespace +' resize.'+ self.namespace, function() {
+ self.reposition();
+ });
+
+ // auto-close bindings
+ if (self.options.autoClose) {
+
+ // in case a listener is already bound for autoclosing (mouse or touch, hover or click), unbind it first
+ $('body').off('.'+ self.namespace);
+
+ // here we'll have to set different sets of bindings for both touch and mouse
+ if (self.options.trigger == 'hover') {
+
+ // if the user touches the body, hide
+ if (deviceHasTouchCapability) {
+ // timeout 0 : explanation below in click section
+ setTimeout(function() {
+ // we don't want to bind on click here because the initial touchstart event has not yet triggered its click event, which is thus about to happen
+ $('body').on('touchstart.'+ self.namespace, function() {
+ self.hide();
+ });
+ }, 0);
+ }
+
+ // if we have to allow interaction
+ if (self.options.interactive) {
+
+ // touch events inside the tooltip must not close it
+ if (deviceHasTouchCapability) {
+ self.$tooltip.on('touchstart.'+ self.namespace, function(event) {
+ event.stopPropagation();
+ });
+ }
+
+ // as for mouse interaction, we get rid of the tooltip only after the mouse has spent some time out of it
+ var tolerance = null;
+
+ self.$elProxy.add(self.$tooltip)
+ // hide after some time out of the proxy and the tooltip
+ .on('mouseleave.'+ self.namespace + '-autoClose', function() {
+ clearTimeout(tolerance);
+ tolerance = setTimeout(function(){
+ self.hide();
+ }, self.options.interactiveTolerance);
+ })
+ // suspend timeout when the mouse is over the proxy or the tooltip
+ .on('mouseenter.'+ self.namespace + '-autoClose', function() {
+ clearTimeout(tolerance);
+ });
+ }
+ // if this is a non-interactive tooltip, get rid of it if the mouse leaves
+ else {
+ self.$elProxy.on('mouseleave.'+ self.namespace + '-autoClose', function() {
+ self.hide();
+ });
+ }
+
+ // close the tooltip when the proxy gets a click (common behavior of native tooltips)
+ if (self.options.hideOnClick) {
+
+ self.$elProxy.on('click.'+ self.namespace + '-autoClose', function() {
+ self.hide();
+ });
+ }
+ }
+ // here we'll set the same bindings for both clicks and touch on the body to hide the tooltip
+ else if(self.options.trigger == 'click'){
+
+ // use a timeout to prevent immediate closing if the method was called on a click event and if options.delay == 0 (because of bubbling)
+ setTimeout(function() {
+ $('body').on('click.'+ self.namespace +' touchstart.'+ self.namespace, function() {
+ self.hide();
+ });
+ }, 0);
+
+ // if interactive, we'll stop the events that were emitted from inside the tooltip to stop autoClosing
+ if (self.options.interactive) {
+
+ // note : the touch events will just not be used if the plugin is not enabled on touch devices
+ self.$tooltip.on('click.'+ self.namespace +' touchstart.'+ self.namespace, function(event) {
+ event.stopPropagation();
+ });
+ }
+ }
+ }
+ }
+
+ // if we have a timer set, let the countdown begin
+ if (self.options.timer > 0) {
+
+ self.timerHide = setTimeout(function() {
+ self.timerHide = null;
+ self.hide();
+ }, self.options.timer + extraTime);
+ }
+ }
+ });
+ },
+
+ _interval_set: function() {
+
+ var self = this;
+
+ self.checkInterval = setInterval(function() {
+
+ // if the tooltip and/or its interval should be stopped
+ if (
+ // if the origin has been removed
+ $('body').find(self.$el).length === 0
+ // if the elProxy has been removed
+ || $('body').find(self.$elProxy).length === 0
+ // if the tooltip has been closed
+ || self.Status == 'hidden'
+ // if the tooltip has somehow been removed
+ || $('body').find(self.$tooltip).length === 0
+ ) {
+ // remove the tooltip if it's still here
+ if (self.Status == 'shown' || self.Status == 'appearing') self.hide();
+
+ // clear this interval as it is no longer necessary
+ self._interval_cancel();
+ }
+ // if everything is alright
+ else {
+ // compare the former and current positions of the elProxy to reposition the tooltip if need be
+ if(self.options.positionTracker){
+
+ var p = self._repositionInfo(self.$elProxy),
+ identical = false;
+
+ // compare size first (a change requires repositioning too)
+ if(areEqual(p.dimension, self.elProxyPosition.dimension)){
+
+ // for elements with a fixed position, we track the top and left properties (relative to window)
+ if(self.$elProxy.css('position') === 'fixed'){
+ if(areEqual(p.position, self.elProxyPosition.position)) identical = true;
+ }
+ // otherwise, track total offset (relative to document)
+ else {
+ if(areEqual(p.offset, self.elProxyPosition.offset)) identical = true;
+ }
+ }
+
+ if(!identical){
+ self.reposition();
+ self.options.positionTrackerCallback.call(self, self.$el);
+ }
+ }
+ }
+ }, 200);
+ },
+
+ _interval_cancel: function() {
+ clearInterval(this.checkInterval);
+ // clean delete
+ this.checkInterval = null;
+ },
+
+ _content_set: function(content) {
+ // clone if asked. Cloning the object makes sure that each instance has its own version of the content (in case a same object were provided for several instances)
+ // reminder : typeof null === object
+ if (typeof content === 'object' && content !== null && this.options.contentCloning) {
+ content = content.clone(true);
+ }
+ this.Content = content;
+ },
+
+ _content_insert: function() {
+
+ var self = this,
+ $d = this.$tooltip.find('.tooltipster-content');
+
+ if (typeof self.Content === 'string' && !self.options.contentAsHTML) {
+ $d.text(self.Content);
+ }
+ else {
+ $d
+ .empty()
+ .append(self.Content);
+ }
+ },
+
+ _update: function(content) {
+
+ var self = this;
+
+ // change the content
+ self._content_set(content);
+
+ if (self.Content !== null) {
+
+ // update the tooltip if it is open
+ if (self.Status !== 'hidden') {
+
+ // reset the content in the tooltip
+ self._content_insert();
+
+ // reposition and resize the tooltip
+ self.reposition();
+
+ // if we want to play a little animation showing the content changed
+ if (self.options.updateAnimation) {
+
+ if (supportsTransitions()) {
+
+ self.$tooltip.css({
+ 'width': '',
+ '-webkit-transition': 'all ' + self.options.speed + 'ms, width 0ms, height 0ms, left 0ms, top 0ms',
+ '-moz-transition': 'all ' + self.options.speed + 'ms, width 0ms, height 0ms, left 0ms, top 0ms',
+ '-o-transition': 'all ' + self.options.speed + 'ms, width 0ms, height 0ms, left 0ms, top 0ms',
+ '-ms-transition': 'all ' + self.options.speed + 'ms, width 0ms, height 0ms, left 0ms, top 0ms',
+ 'transition': 'all ' + self.options.speed + 'ms, width 0ms, height 0ms, left 0ms, top 0ms'
+ }).addClass('tooltipster-content-changing');
+
+ // reset the CSS transitions and finish the change animation
+ setTimeout(function() {
+
+ if(self.Status != 'hidden'){
+
+ self.$tooltip.removeClass('tooltipster-content-changing');
+
+ // after the changing animation has completed, reset the CSS transitions
+ setTimeout(function() {
+
+ if(self.Status !== 'hidden'){
+ self.$tooltip.css({
+ '-webkit-transition': self.options.speed + 'ms',
+ '-moz-transition': self.options.speed + 'ms',
+ '-o-transition': self.options.speed + 'ms',
+ '-ms-transition': self.options.speed + 'ms',
+ 'transition': self.options.speed + 'ms'
+ });
+ }
+ }, self.options.speed);
+ }
+ }, self.options.speed);
+ }
+ else {
+ self.$tooltip.fadeTo(self.options.speed, 0.5, function() {
+ if(self.Status != 'hidden'){
+ self.$tooltip.fadeTo(self.options.speed, 1);
+ }
+ });
+ }
+ }
+ }
+ }
+ else {
+ self.hide();
+ }
+ },
+
+ _repositionInfo: function($el) {
+ return {
+ dimension: {
+ height: $el.outerHeight(false),
+ width: $el.outerWidth(false)
+ },
+ offset: $el.offset(),
+ position: {
+ left: parseInt($el.css('left')),
+ top: parseInt($el.css('top'))
+ }
+ };
+ },
+
+ hide: function(callback) {
+
+ var self = this;
+
+ // save the method custom callback and cancel any show method custom callbacks
+ if (callback) self.callbacks.hide.push(callback);
+ self.callbacks.show = [];
+
+ // get rid of any appearance timeout
+ clearTimeout(self.timerShow);
+ self.timerShow = null;
+ clearTimeout(self.timerHide);
+ self.timerHide = null;
+
+ var finishCallbacks = function() {
+ // trigger any hide method custom callbacks and reset them
+ $.each(self.callbacks.hide, function(i,c) { c.call(self.$el); });
+ self.callbacks.hide = [];
+ };
+
+ // hide
+ if (self.Status == 'shown' || self.Status == 'appearing') {
+
+ self.Status = 'disappearing';
+
+ var finish = function() {
+
+ self.Status = 'hidden';
+
+ // detach our content object first, so the next jQuery's remove() call does not unbind its event handlers
+ if (typeof self.Content == 'object' && self.Content !== null) {
+ self.Content.detach();
+ }
+
+ self.$tooltip.remove();
+ self.$tooltip = null;
+
+ // unbind orientationchange, scroll and resize listeners
+ $(window).off('.'+ self.namespace);
+
+ $('body')
+ // unbind any auto-closing click/touch listeners
+ .off('.'+ self.namespace)
+ .css('overflow-x', self.bodyOverflowX);
+
+ // unbind any auto-closing click/touch listeners
+ $('body').off('.'+ self.namespace);
+
+ // unbind any auto-closing hover listeners
+ self.$elProxy.off('.'+ self.namespace + '-autoClose');
+
+ // call our constructor custom callback function
+ self.options.functionAfter.call(self.$el, self.$el);
+
+ // call our method custom callbacks functions
+ finishCallbacks();
+ };
+
+ if (supportsTransitions()) {
+
+ self.$tooltip
+ .clearQueue()
+ .removeClass('tooltipster-' + self.options.animation + '-show')
+ // for transitions only
+ .addClass('tooltipster-dying');
+
+ if(self.options.speed > 0) self.$tooltip.delay(self.options.speed);
+
+ self.$tooltip.queue(finish);
+ }
+ else {
+ self.$tooltip
+ .stop()
+ .fadeOut(self.options.speed, finish);
+ }
+ }
+ // if the tooltip is already hidden, we still need to trigger the method custom callback
+ else if(self.Status == 'hidden') {
+ finishCallbacks();
+ }
+
+ return self;
+ },
+
+ // the public show() method is actually an alias for the private showNow() method
+ show: function(callback) {
+ this._showNow(callback);
+ return this;
+ },
+
+ // 'update' is deprecated in favor of 'content' but is kept for backward compatibility
+ update: function(c) {
+ return this.content(c);
+ },
+ content: function(c) {
+ // getter method
+ if(typeof c === 'undefined'){
+ return this.Content;
+ }
+ // setter method
+ else {
+ this._update(c);
+ return this;
+ }
+ },
+
+ reposition: function() {
+
+ var self = this;
+
+ // in case the tooltip has been removed from DOM manually
+ if ($('body').find(self.$tooltip).length !== 0) {
+
+ // reset width
+ self.$tooltip.css('width', '');
+
+ // find variables to determine placement
+ self.elProxyPosition = self._repositionInfo(self.$elProxy);
+ var arrowReposition = null,
+ windowWidth = $(window).width(),
+ // shorthand
+ proxy = self.elProxyPosition,
+ tooltipWidth = self.$tooltip.outerWidth(false),
+ tooltipInnerWidth = self.$tooltip.innerWidth() + 1, // this +1 stops FireFox from sometimes forcing an additional text line
+ tooltipHeight = self.$tooltip.outerHeight(false);
+
+ // if this is an
tag inside a
, all hell breaks loose. Recalculate all the measurements based on coordinates
+ if (self.$elProxy.is('area')) {
+ var areaShape = self.$elProxy.attr('shape'),
+ mapName = self.$elProxy.parent().attr('name'),
+ map = $('img[usemap="#'+ mapName +'"]'),
+ mapOffsetLeft = map.offset().left,
+ mapOffsetTop = map.offset().top,
+ areaMeasurements = self.$elProxy.attr('coords') !== undefined ? self.$elProxy.attr('coords').split(',') : undefined;
+
+ if (areaShape == 'circle') {
+ var areaLeft = parseInt(areaMeasurements[0]),
+ areaTop = parseInt(areaMeasurements[1]),
+ areaWidth = parseInt(areaMeasurements[2]);
+ proxy.dimension.height = areaWidth * 2;
+ proxy.dimension.width = areaWidth * 2;
+ proxy.offset.top = mapOffsetTop + areaTop - areaWidth;
+ proxy.offset.left = mapOffsetLeft + areaLeft - areaWidth;
+ }
+ else if (areaShape == 'rect') {
+ var areaLeft = parseInt(areaMeasurements[0]),
+ areaTop = parseInt(areaMeasurements[1]),
+ areaRight = parseInt(areaMeasurements[2]),
+ areaBottom = parseInt(areaMeasurements[3]);
+ proxy.dimension.height = areaBottom - areaTop;
+ proxy.dimension.width = areaRight - areaLeft;
+ proxy.offset.top = mapOffsetTop + areaTop;
+ proxy.offset.left = mapOffsetLeft + areaLeft;
+ }
+ else if (areaShape == 'poly') {
+ var areaXs = [],
+ areaYs = [],
+ areaSmallestX = 0,
+ areaSmallestY = 0,
+ areaGreatestX = 0,
+ areaGreatestY = 0,
+ arrayAlternate = 'even';
+
+ for (var i = 0; i < areaMeasurements.length; i++) {
+ var areaNumber = parseInt(areaMeasurements[i]);
+
+ if (arrayAlternate == 'even') {
+ if (areaNumber > areaGreatestX) {
+ areaGreatestX = areaNumber;
+ if (i === 0) {
+ areaSmallestX = areaGreatestX;
+ }
+ }
+
+ if (areaNumber < areaSmallestX) {
+ areaSmallestX = areaNumber;
+ }
+
+ arrayAlternate = 'odd';
+ }
+ else {
+ if (areaNumber > areaGreatestY) {
+ areaGreatestY = areaNumber;
+ if (i == 1) {
+ areaSmallestY = areaGreatestY;
+ }
+ }
+
+ if (areaNumber < areaSmallestY) {
+ areaSmallestY = areaNumber;
+ }
+
+ arrayAlternate = 'even';
+ }
+ }
+
+ proxy.dimension.height = areaGreatestY - areaSmallestY;
+ proxy.dimension.width = areaGreatestX - areaSmallestX;
+ proxy.offset.top = mapOffsetTop + areaSmallestY;
+ proxy.offset.left = mapOffsetLeft + areaSmallestX;
+ }
+ else {
+ proxy.dimension.height = map.outerHeight(false);
+ proxy.dimension.width = map.outerWidth(false);
+ proxy.offset.top = mapOffsetTop;
+ proxy.offset.left = mapOffsetLeft;
+ }
+ }
+
+ // our function and global vars for positioning our tooltip
+ var myLeft = 0,
+ myLeftMirror = 0,
+ myTop = 0,
+ offsetY = parseInt(self.options.offsetY),
+ offsetX = parseInt(self.options.offsetX),
+ // this is the arrow position that will eventually be used. It may differ from the position option if the tooltip cannot be displayed in this position
+ practicalPosition = self.options.position;
+
+ // a function to detect if the tooltip is going off the screen horizontally. If so, reposition the crap out of it!
+ function dontGoOffScreenX() {
+
+ var windowLeft = $(window).scrollLeft();
+
+ // if the tooltip goes off the left side of the screen, line it up with the left side of the window
+ if((myLeft - windowLeft) < 0) {
+ arrowReposition = myLeft - windowLeft;
+ myLeft = windowLeft;
+ }
+
+ // if the tooltip goes off the right of the screen, line it up with the right side of the window
+ if (((myLeft + tooltipWidth) - windowLeft) > windowWidth) {
+ arrowReposition = myLeft - ((windowWidth + windowLeft) - tooltipWidth);
+ myLeft = (windowWidth + windowLeft) - tooltipWidth;
+ }
+ }
+
+ // a function to detect if the tooltip is going off the screen vertically. If so, switch to the opposite!
+ function dontGoOffScreenY(switchTo, switchFrom) {
+ // if it goes off the top off the page
+ if(((proxy.offset.top - $(window).scrollTop() - tooltipHeight - offsetY - 12) < 0) && (switchFrom.indexOf('top') > -1)) {
+ practicalPosition = switchTo;
+ }
+
+ // if it goes off the bottom of the page
+ if (((proxy.offset.top + proxy.dimension.height + tooltipHeight + 12 + offsetY) > ($(window).scrollTop() + $(window).height())) && (switchFrom.indexOf('bottom') > -1)) {
+ practicalPosition = switchTo;
+ myTop = (proxy.offset.top - tooltipHeight) - offsetY - 12;
+ }
+ }
+
+ if(practicalPosition == 'top') {
+ var leftDifference = (proxy.offset.left + tooltipWidth) - (proxy.offset.left + proxy.dimension.width);
+ myLeft = (proxy.offset.left + offsetX) - (leftDifference / 2);
+ myTop = (proxy.offset.top - tooltipHeight) - offsetY - 12;
+ dontGoOffScreenX();
+ dontGoOffScreenY('bottom', 'top');
+ }
+
+ if(practicalPosition == 'top-left') {
+ myLeft = proxy.offset.left + offsetX;
+ myTop = (proxy.offset.top - tooltipHeight) - offsetY - 12;
+ dontGoOffScreenX();
+ dontGoOffScreenY('bottom-left', 'top-left');
+ }
+
+ if(practicalPosition == 'top-right') {
+ myLeft = (proxy.offset.left + proxy.dimension.width + offsetX) - tooltipWidth;
+ myTop = (proxy.offset.top - tooltipHeight) - offsetY - 12;
+ dontGoOffScreenX();
+ dontGoOffScreenY('bottom-right', 'top-right');
+ }
+
+ if(practicalPosition == 'bottom') {
+ var leftDifference = (proxy.offset.left + tooltipWidth) - (proxy.offset.left + proxy.dimension.width);
+ myLeft = proxy.offset.left - (leftDifference / 2) + offsetX;
+ myTop = (proxy.offset.top + proxy.dimension.height) + offsetY + 12;
+ dontGoOffScreenX();
+ dontGoOffScreenY('top', 'bottom');
+ }
+
+ if(practicalPosition == 'bottom-left') {
+ myLeft = proxy.offset.left + offsetX;
+ myTop = (proxy.offset.top + proxy.dimension.height) + offsetY + 12;
+ dontGoOffScreenX();
+ dontGoOffScreenY('top-left', 'bottom-left');
+ }
+
+ if(practicalPosition == 'bottom-right') {
+ myLeft = (proxy.offset.left + proxy.dimension.width + offsetX) - tooltipWidth;
+ myTop = (proxy.offset.top + proxy.dimension.height) + offsetY + 12;
+ dontGoOffScreenX();
+ dontGoOffScreenY('top-right', 'bottom-right');
+ }
+
+ if(practicalPosition == 'left') {
+ myLeft = proxy.offset.left - offsetX - tooltipWidth - 12;
+ myLeftMirror = proxy.offset.left + offsetX + proxy.dimension.width + 12;
+ var topDifference = (proxy.offset.top + tooltipHeight) - (proxy.offset.top + proxy.dimension.height);
+ myTop = proxy.offset.top - (topDifference / 2) - offsetY;
+
+ // if the tooltip goes off boths sides of the page
+ if((myLeft < 0) && ((myLeftMirror + tooltipWidth) > windowWidth)) {
+ var borderWidth = parseFloat(self.$tooltip.css('border-width')) * 2,
+ newWidth = (tooltipWidth + myLeft) - borderWidth;
+ self.$tooltip.css('width', newWidth + 'px');
+
+ tooltipHeight = self.$tooltip.outerHeight(false);
+ myLeft = proxy.offset.left - offsetX - newWidth - 12 - borderWidth;
+ topDifference = (proxy.offset.top + tooltipHeight) - (proxy.offset.top + proxy.dimension.height);
+ myTop = proxy.offset.top - (topDifference / 2) - offsetY;
+ }
+
+ // if it only goes off one side, flip it to the other side
+ else if(myLeft < 0) {
+ myLeft = proxy.offset.left + offsetX + proxy.dimension.width + 12;
+ arrowReposition = 'left';
+ }
+ }
+
+ if(practicalPosition == 'right') {
+ myLeft = proxy.offset.left + offsetX + proxy.dimension.width + 12;
+ myLeftMirror = proxy.offset.left - offsetX - tooltipWidth - 12;
+ var topDifference = (proxy.offset.top + tooltipHeight) - (proxy.offset.top + proxy.dimension.height);
+ myTop = proxy.offset.top - (topDifference / 2) - offsetY;
+
+ // if the tooltip goes off boths sides of the page
+ if(((myLeft + tooltipWidth) > windowWidth) && (myLeftMirror < 0)) {
+ var borderWidth = parseFloat(self.$tooltip.css('border-width')) * 2,
+ newWidth = (windowWidth - myLeft) - borderWidth;
+ self.$tooltip.css('width', newWidth + 'px');
+
+ tooltipHeight = self.$tooltip.outerHeight(false);
+ topDifference = (proxy.offset.top + tooltipHeight) - (proxy.offset.top + proxy.dimension.height);
+ myTop = proxy.offset.top - (topDifference / 2) - offsetY;
+ }
+
+ // if it only goes off one side, flip it to the other side
+ else if((myLeft + tooltipWidth) > windowWidth) {
+ myLeft = proxy.offset.left - offsetX - tooltipWidth - 12;
+ arrowReposition = 'right';
+ }
+ }
+
+ // if arrow is set true, style it and append it
+ if (self.options.arrow) {
+
+ var arrowClass = 'tooltipster-arrow-' + practicalPosition;
+
+ // set color of the arrow
+ if(self.options.arrowColor.length < 1) {
+ var arrowColor = self.$tooltip.css('background-color');
+ }
+ else {
+ var arrowColor = self.options.arrowColor;
+ }
+
+ // if the tooltip was going off the page and had to re-adjust, we need to update the arrow's position
+ if (!arrowReposition) {
+ arrowReposition = '';
+ }
+ else if (arrowReposition == 'left') {
+ arrowClass = 'tooltipster-arrow-right';
+ arrowReposition = '';
+ }
+ else if (arrowReposition == 'right') {
+ arrowClass = 'tooltipster-arrow-left';
+ arrowReposition = '';
+ }
+ else {
+ arrowReposition = 'left:'+ Math.round(arrowReposition) +'px;';
+ }
+
+ // building the logic to create the border around the arrow of the tooltip
+ if ((practicalPosition == 'top') || (practicalPosition == 'top-left') || (practicalPosition == 'top-right')) {
+ var tooltipBorderWidth = parseFloat(self.$tooltip.css('border-bottom-width')),
+ tooltipBorderColor = self.$tooltip.css('border-bottom-color');
+ }
+ else if ((practicalPosition == 'bottom') || (practicalPosition == 'bottom-left') || (practicalPosition == 'bottom-right')) {
+ var tooltipBorderWidth = parseFloat(self.$tooltip.css('border-top-width')),
+ tooltipBorderColor = self.$tooltip.css('border-top-color');
+ }
+ else if (practicalPosition == 'left') {
+ var tooltipBorderWidth = parseFloat(self.$tooltip.css('border-right-width')),
+ tooltipBorderColor = self.$tooltip.css('border-right-color');
+ }
+ else if (practicalPosition == 'right') {
+ var tooltipBorderWidth = parseFloat(self.$tooltip.css('border-left-width')),
+ tooltipBorderColor = self.$tooltip.css('border-left-color');
+ }
+ else {
+ var tooltipBorderWidth = parseFloat(self.$tooltip.css('border-bottom-width')),
+ tooltipBorderColor = self.$tooltip.css('border-bottom-color');
+ }
+
+ if (tooltipBorderWidth > 1) {
+ tooltipBorderWidth++;
+ }
+
+ var arrowBorder = '';
+ if (tooltipBorderWidth !== 0) {
+ var arrowBorderSize = '',
+ arrowBorderColor = 'border-color: '+ tooltipBorderColor +';';
+ if (arrowClass.indexOf('bottom') !== -1) {
+ arrowBorderSize = 'margin-top: -'+ Math.round(tooltipBorderWidth) +'px;';
+ }
+ else if (arrowClass.indexOf('top') !== -1) {
+ arrowBorderSize = 'margin-bottom: -'+ Math.round(tooltipBorderWidth) +'px;';
+ }
+ else if (arrowClass.indexOf('left') !== -1) {
+ arrowBorderSize = 'margin-right: -'+ Math.round(tooltipBorderWidth) +'px;';
+ }
+ else if (arrowClass.indexOf('right') !== -1) {
+ arrowBorderSize = 'margin-left: -'+ Math.round(tooltipBorderWidth) +'px;';
+ }
+ arrowBorder = ' ';
+ }
+
+ // if the arrow already exists, remove and replace it
+ self.$tooltip.find('.tooltipster-arrow').remove();
+
+ // build out the arrow and append it
+ var arrowConstruct = ''+ arrowBorder +'
';
+ self.$tooltip.append(arrowConstruct);
+ }
+
+ // position the tooltip
+ self.$tooltip.css({'top': Math.round(myTop) + 'px', 'left': Math.round(myLeft) + 'px'});
+ }
+
+ return self;
+ },
+
+ enable: function() {
+ this.enabled = true;
+ return this;
+ },
+
+ disable: function() {
+ // hide first, in case the tooltip would not disappear on its own (autoClose false)
+ this.hide();
+ this.enabled = false;
+ return this;
+ },
+
+ destroy: function() {
+
+ var self = this;
+
+ self.hide();
+
+ // remove the icon, if any
+ if (self.$el[0] !== self.$elProxy[0]) {
+ self.$elProxy.remove();
+ }
+
+ self.$el
+ .removeData(self.namespace)
+ .off('.'+ self.namespace);
+
+ var ns = self.$el.data('tooltipster-ns');
+
+ // if there are no more tooltips on this element
+ if(ns.length === 1){
+
+ // optional restoration of a title attribute
+ var title = null;
+ if (self.options.restoration === 'previous'){
+ title = self.$el.data('tooltipster-initialTitle');
+ }
+ else if(self.options.restoration === 'current'){
+
+ // old school technique to stringify when outerHTML is not supported
+ title =
+ (typeof self.Content === 'string') ?
+ self.Content :
+ $('
').append(self.Content).html();
+ }
+
+ if (title) {
+ self.$el.attr('title', title);
+ }
+
+ // final cleaning
+ self.$el
+ .removeClass('tooltipstered')
+ .removeData('tooltipster-ns')
+ .removeData('tooltipster-initialTitle');
+ }
+ else {
+ // remove the instance namespace from the list of namespaces of tooltips present on the element
+ ns = $.grep(ns, function(el, i){
+ return el !== self.namespace;
+ });
+ self.$el.data('tooltipster-ns', ns);
+ }
+
+ return self;
+ },
+
+ elementIcon: function() {
+ return (this.$el[0] !== this.$elProxy[0]) ? this.$elProxy[0] : undefined;
+ },
+
+ elementTooltip: function() {
+ return this.$tooltip ? this.$tooltip[0] : undefined;
+ },
+
+ // public methods but for internal use only
+ // getter if val is ommitted, setter otherwise
+ option: function(o, val) {
+ if (typeof val == 'undefined') return this.options[o];
+ else {
+ this.options[o] = val;
+ return this;
+ }
+ },
+ status: function() {
+ return this.Status;
+ }
+ };
+
+ $.fn[pluginName] = function () {
+
+ // for using in closures
+ var args = arguments;
+
+ // if we are not in the context of jQuery wrapped HTML element(s) :
+ // this happens when calling static methods in the form $.fn.tooltipster('methodName'), or when calling $(sel).tooltipster('methodName or options') where $(sel) does not match anything
+ if (this.length === 0) {
+
+ // if the first argument is a method name
+ if (typeof args[0] === 'string') {
+
+ var methodIsStatic = true;
+
+ // list static methods here (usable by calling $.fn.tooltipster('methodName');)
+ switch (args[0]) {
+
+ case 'setDefaults':
+ // change default options for all future instances
+ $.extend(defaults, args[1]);
+ break;
+
+ default:
+ methodIsStatic = false;
+ break;
+ }
+
+ // $.fn.tooltipster('methodName') calls will return true
+ if (methodIsStatic) return true;
+ // $(sel).tooltipster('methodName') calls will return the list of objects event though it's empty because chaining should work on empty lists
+ else return this;
+ }
+ // the first argument is undefined or an object of options : we are initalizing but there is no element matched by selector
+ else {
+ // still chainable : same as above
+ return this;
+ }
+ }
+ // this happens when calling $(sel).tooltipster('methodName or options') where $(sel) matches one or more elements
+ else {
+
+ // method calls
+ if (typeof args[0] === 'string') {
+
+ var v = '#*$~&';
+
+ this.each(function() {
+
+ // retrieve the namepaces of the tooltip(s) that exist on that element. We will interact with the first tooltip only.
+ var ns = $(this).data('tooltipster-ns'),
+ // self represents the instance of the first tooltipster plugin associated to the current HTML object of the loop
+ self = ns ? $(this).data(ns[0]) : null;
+
+ // if the current element holds a tooltipster instance
+ if (self) {
+
+ if (typeof self[args[0]] === 'function') {
+ // note : args[1] and args[2] may not be defined
+ var resp = self[args[0]](args[1], args[2]);
+ }
+ else {
+ throw new Error('Unknown method .tooltipster("' + args[0] + '")');
+ }
+
+ // if the function returned anything other than the instance itself (which implies chaining)
+ if (resp !== self){
+ v = resp;
+ // return false to stop .each iteration on the first element matched by the selector
+ return false;
+ }
+ }
+ else {
+ throw new Error('You called Tooltipster\'s "' + args[0] + '" method on an uninitialized element');
+ }
+ });
+
+ return (v !== '#*$~&') ? v : this;
+ }
+ // first argument is undefined or an object : the tooltip is initializing
+ else {
+
+ var instances = [],
+ // is there a defined value for the multiple option in the options object ?
+ multipleIsSet = args[0] && typeof args[0].multiple !== 'undefined',
+ // if the multiple option is set to true, or if it's not defined but set to true in the defaults
+ multiple = (multipleIsSet && args[0].multiple) || (!multipleIsSet && defaults.multiple),
+ // same for debug
+ debugIsSet = args[0] && typeof args[0].debug !== 'undefined',
+ debug = (debugIsSet && args[0].debug) || (!debugIsSet && defaults.debug);
+
+ // initialize a tooltipster instance for each element if it doesn't already have one or if the multiple option is set, and attach the object to it
+ this.each(function () {
+
+ var go = false,
+ ns = $(this).data('tooltipster-ns'),
+ instance = null;
+
+ if (!ns) {
+ go = true;
+ }
+ else if (multiple) {
+ go = true;
+ }
+ else if (debug) {
+ console.log('Tooltipster: one or more tooltips are already attached to this element: ignoring. Use the "multiple" option to attach more tooltips.');
+ }
+
+ if (go) {
+ instance = new Plugin(this, args[0]);
+
+ // save the reference of the new instance
+ if (!ns) ns = [];
+ ns.push(instance.namespace);
+ $(this).data('tooltipster-ns', ns)
+
+ // save the instance itself
+ $(this).data(instance.namespace, instance);
+ }
+
+ instances.push(instance);
+ });
+
+ if (multiple) return instances;
+ else return this;
+ }
+ }
+ };
+
+ // quick & dirty compare function (not bijective nor multidimensional)
+ function areEqual(a,b) {
+ var same = true;
+ $.each(a, function(i, el){
+ if(typeof b[i] === 'undefined' || a[i] !== b[i]){
+ same = false;
+ return false;
+ }
+ });
+ return same;
+ }
+
+ // detect if this device can trigger touch events
+ var deviceHasTouchCapability = !!('ontouchstart' in window);
+
+ // we'll assume the device has no mouse until we detect any mouse movement
+ var deviceHasMouse = false;
+ $('body').one('mousemove', function() {
+ deviceHasMouse = true;
+ });
+
+ function deviceIsPureTouch() {
+ return (!deviceHasMouse && deviceHasTouchCapability);
+ }
+
+ // detecting support for CSS transitions
+ function supportsTransitions() {
+ var b = document.body || document.documentElement,
+ s = b.style,
+ p = 'transition';
+
+ if(typeof s[p] == 'string') {return true; }
+
+ v = ['Moz', 'Webkit', 'Khtml', 'O', 'ms'],
+ p = p.charAt(0).toUpperCase() + p.substr(1);
+ for(var i=0; i
+ parseInt(target.getAttribute('data_x'))) {
+ for (var i = 0; i < nodeArr.length; i++) {
+ if (nodeArr[i][1] == lastSelected || nodeArr[i][1] == target.id) {
+ continue;
+ }
+ if (nodeArr[i][3] < parseInt(document.getElementById(lastSelected).getAttribute(
+ 'data_x')) && nodeArr[i][3] > parseInt(target.getAttribute('data_x'))) {
+ selection.push(nodeArr[i][1]);
+ $("#" + nodeArr[i][1]).addClass('selected');
+ }
+ }
+ } else if (parseInt(document.getElementById(lastSelected).getAttribute(
+ 'data_x')) < parseInt(target.getAttribute('data_x'))) {
+ for (var i = 0; i < nodeArr.length; i++) {
+ if (nodeArr[i][1] == lastSelected || nodeArr[i][1] == target.id) {
+ continue;
+ }
+ if (nodeArr[i][3] > parseInt(document.getElementById(lastSelected).getAttribute(
+ 'data_x')) && nodeArr[i][3] < parseInt(target.getAttribute('data_x'))) {
+ selection.push(nodeArr[i][1]);
+ $("#" + nodeArr[i][1]).addClass('selected');
+ }
+ }
+ }
+ }
+ lastSelected = target.id;
+ } else if (event.button == 2) {
+ if (selection.indexOf(target.id) == -1) {
+ clearSelection();
+ selection.push(target.id);
+ $("#" + target.id).addClass('selected');
+ lastSelected = target.id;
+ }
+
+ }
+ //Else clear
+ else {
+ if (event.button == 0) {
+ clearSelection();
+ }
+ }
+ })
+ //CLONING
+ .on('move', function(event) {
+ var interaction = event.interaction;
+ $("nodeDropzone").addClass("drop-target");
+ // if the pointer was moved while being held down
+ // and an interaction hasn't started yet
+ if (interaction.pointerIsDown && !interaction.interacting() && !$(event.currentTarget)
+ .hasClass("child")) {
+ //console.log(event);
+ var original = event.currentTarget,
+ // create a clone of the currentTarget element
+ clone = event.currentTarget.cloneNode(true);
+ uuid = guid();
+ clone.id = uuid;
+ clone.classList.remove('drag');
+ clone.classList.add('drag-1');
+ // insert the clone to the page
+ var dropOffLocation = document.getElementById("nodeChildrenDroppedOffHere");
+
+ var clone = dropOffLocation.insertBefore(clone, dropOffLocation.parentNodes);
+ var d = document.getElementById(uuid);
+ d.className = d.className + " child"; //Adds child class to prevent child cloning
+
+
+ // translate the element
+ clone.style.webkitTransform = clone.style.transform = 'translate(' + 0 + $(
+ document).scrollLeft() + 'px, ' + 0 + $(document).scrollTop() + 'px)';
+
+ // update the position attributes
+ clone.setAttribute('data_x', 0 + $(document).scrollLeft());
+ clone.setAttribute('data_y', 0 + $(document).scrollTop());
+
+
+ nodeArr.push([clone, uuid]);
+
+ // start a drag interaction targeting the clone
+ interaction.start({
+ name: 'drag'
+ },
+ event.interactable,
+ clone);
+ }
+ })
+
+//DRAGGING
+.draggable({
+ snap: {
+ targets: [ // give this function the x and y page coords
+ // and snap to the object returned
+
+ interact.createHorizontalSnapGrid({
+ x: 160,
+ y: 100,
+ offset: {
+ x: -51,
+ y: 0
+ }
+ })
+
+ ],
+ range: 150,
+ relativePoints: [{
+ x: 0,
+ y: 0.5
+ }]
+ },
+ // enable inertial throwing
+ inertia: true,
+
+ restrict: {
+ endOnly: true,
+ elementRect: {
+ top: 0,
+ left: 0,
+ bottom: 0,
+ right: 0
+ }
+ },
+
+
+ // call this function on every dragmove event
+ onstart: function(event) {
+ if (event.button == 0 && !$("#" + event.target.id).hasClass('selected')) { //Makes anything you drag dashed
+ clearSelection();
+ selection.push(event.target.id);
+ $("#" + event.target.id).addClass('selected');
+ lastSelected = event.target.id;
+ }
+ calcChildren(event.target.id);
+ for (var i = 0; i < childrenIDs.length; i++) {
+ if (selection.indexOf(childrenIDs[i]) == -1) {
+ selection.push(childrenIDs[i]);
+ }
+ }
+
+
+ //Bring drag elements to the front
+ for (var i = 0; i < selection.length; i++) {
+ document.getElementById(selection[i]).style.zIndex = 9997;
+ if ($("#" + selection[i]).hasClass('hasNodes')) {
+ document.getElementById(selection[i]).style.zIndex = document.getElementById(
+ selection[i]).style.zIndex - 1;
+ }
+ }
+
+
+ //This may cause lag if there are an extremely large number of arrows
+ for (var i = 0; i < arrowArr.length; i++) {
+ determineLRNode(arrowArr[i][1], "arrow");
+ }
+ },
+ // call this function on every dragmove event
+ onmove: window.dragMoveListener,
+ // call this function on every dragend event
+ onend: function(event) {
+ for (var i = 0; i < selection.length; i++) {
+ try {
+ document.getElementById(selection[i]).style.zIndex = 9996;
+ if ($("#" + selection[i]).hasClass('hasNodes')) {
+ document.getElementById(selection[i]).style.zIndex = document.getElementById(
+ selection[i]).style.zIndex - 10;
+ }
+ calcParent(event.target.id);
+ } catch (err) {
+ continue;
+ }
+ }
+
+ //Shifts nodes to the right by running shiftRight on every node (first sorts the selections by x)
+ for (var k = selection.length - 1; k >= 0; k--) {
+ for (var m = 1; m <= k; m++) {
+ if (document.getElementById(selection[m - 1]).getAttribute("data_x") >
+ document.getElementById(selection[m]).getAttribute("data_x")) {
+ var swap = selection[m];
+ selection[m] = selection[m - 1];
+ selection[m - 1] = swap;
+ }
+ }
+ }
+ for (var i = 0; i < selection.length; i++) {
+ if (isOverlapped(selection[i]) == true) {
+ shiftRight(document.getElementById(selection[i]), 160);
+ }
+ }
+
+ }
+ })
+ .on('dragstart', function(event) {
+
+ })
+ .on('dragend', function(event) {
+
+ })
+ .on('dragmove', function(event) {
+
+ })
+
+//RESIZING
+.resizable({
+ edges: {
+ left: false,
+ right: false,
+ bottom: false,
+ top: false
+ }
+ })
+ .on('resizemove', function(event) {
+ var target = event.target,
+ x = (parseFloat(target.getAttribute('data_x')) || 0),
+ y = (parseFloat(target.getAttribute('data_y')) || 0);
+
+ // update the element's style
+ target.style.width = event.rect.width + 'px';
+ target.style.height = event.rect.height + 'px';
+
+ // translate when resizing from top or left edges
+ x += event.deltaRect.left;
+ y += event.deltaRect.top;
+
+ target.style.webkitTransform = target.style.transform =
+ 'translate(' + x + 'px,' + y + 'px)';
+
+ target.setAttribute('data-x', x);
+ target.setAttribute('data-y', y);
+
+
+ });
+
+function clearSelection() {
+ for (var i = 0; i < selection.length; i++) {
+ $("#" + selection[i]).removeClass('selected')
+ }
+ selection.length = 0;
+}
+
+function getStartArrowDependants(nodeID) {
+ startArrowDependants.length = 0;
+ startArrowDependants = [];
+ for (var i = 0; i < arrowArr.length; i++) {
+ if (arrowArr[i][8] == nodeID) {
+ startArrowDependants.push(arrowArr[i][1]);
+ }
+ }
+}
+
+function getEndArrowDependants(nodeID) {
+ endArrowDependants.length = 0;
+ endArrowDependants = [];
+ for (var i = 0; i < arrowArr.length; i++) {
+ if (arrowArr[i][9] == nodeID) {
+ endArrowDependants.push(arrowArr[i][1]);
+ }
+ }
+}
+
+function moveSelection(dx, dy, draggedNodeID) {
+ for (var i = 0; i < selection.length; i++) {
+ if (selection[i] == draggedNodeID) {
+ continue;
+ }
+ selectionTarget = document.getElementById(selection[i]);
+ var x = (parseFloat(selectionTarget.getAttribute('data_x')) || 0);
+ var y = (parseFloat(selectionTarget.getAttribute('data_y')) || 0);
+
+ x += dx;
+ y += dy;
+ if ($('#' + selection[i]).css('display') != 'none') {
+ selectionTarget.style.webkitTransform =
+ selectionTarget.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+ } else {
+ draggedIndex = recallArray(nodeArr, draggedNodeID);
+ selectionTarget.style.webkitTransform =
+ selectionTarget.style.transform =
+ 'translate(' + document.getElementById(nodeArr[draggedIndex][1]).getAttribute(
+ 'data_x') + 'px, ' + document.getElementById(nodeArr[draggedIndex][1]).getAttribute(
+ 'data_y') + 'px)';
+
+ }
+ selectionTarget.setAttribute('data_x', x);
+ selectionTarget.setAttribute('data_y', y);
+
+ storeXY(nodeArr, selection[i]);
+
+ moveDependants(dx, dy, selection[i]);
+ if (isOverlapped(selection[i]) == true) {
+ document.getElementById(selection[i]).style.transition =
+ "background .5s ease";
+ document.getElementById(selection[i]).style.background =
+ "rgba(255,255,0,.40)"; //yellow
+ } else {
+ document.getElementById(selection[i]).style.background = "#29e"; //remove yellow
+ }
+ while (x > $("#grid").width() - $("#sideBar").width()) {
+ addWidth();
+ }
+ }
+}
+
+function moveDependants(dx, dy, nodeID) {
+ getStartArrowDependants(nodeID);
+ getEndArrowDependants(nodeID);
+ for (var i = 0; i < startArrowDependants.length; i++) {
+ var target = document.getElementById(startArrowDependants[i]);
+ for (var j = 0; j < arrowArr.length; j++) {
+ if (startArrowDependants[i] == arrowArr[j][1]) {
+ var arrowI = j;
+ }
+ }
+ if (arrowArr[arrowI][9] == null) {
+
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(target.getAttribute('data_x')) || 0) + dx,
+ y = (parseFloat(target.getAttribute('data_y')) || 0) + dy;
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+
+ var index = storeXY(arrowArr, target.id);
+ arrowArr[index][8] = nodeID;
+ continue;
+ }
+ if (target.getAttribute("direction") == "right") {
+ if ($("#" + target.id).width() + 12 - dx > 0) {
+ target.style.width = parseFloat(target.style.width) - dx + 'px';
+
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(target.getAttribute('data_x')) || 0) + dx,
+ y = (parseFloat(target.getAttribute('data_y')) || 0) + dy;
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+
+ var index = storeXY(arrowArr, target.id);
+ arrowArr[index][8] = nodeID;
+ } else if ($("#" + target.id).width() + 12 - dx < 0) {
+ var newWide = Math.abs(parseFloat(target.style.width) + dx) - 12;
+ target.setAttribute("direction", "left");
+ makeArrow(target);
+ target.style.width = newWide + 'px';
+
+ var index = storeXY(arrowArr, target.id);
+ arrowArr[index][8] = nodeID;
+ } else if ($("#" + target.id).width() + 12 - dx == 0) {
+ target.style.width = '0px';
+ target.setAttribute("direction", "self");
+ makeArrow(target);
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(target.getAttribute('data_x')) || 0) + dx,
+ y = (parseFloat(target.getAttribute('data_y')) || 0) + dy;
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+ var index = storeXY(arrowArr, target.id);
+ arrowArr[index][8] = nodeID;
+ }
+ } else if (target.getAttribute("direction") == "left") {
+ if (-1 * ($("#" + target.id).width() + 12) - dx < 0) {
+ target.style.width = parseFloat(target.style.width) + dx + 'px';
+
+ var index = storeXY(arrowArr, target.id);
+ arrowArr[index][8] = nodeID;
+ } else if (-1 * ($("#" + target.id).width() + 12) - dx > 0) {
+ var newWide = Math.abs(parseFloat(target.style.width) + dx);
+ target.setAttribute("direction", "right");
+ makeArrow(target);
+ target.style.width = newWide + 'px';
+
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(target.getAttribute('data_x')) || 0) + dx,
+ y = (parseFloat(target.getAttribute('data_y')) || 0) + dy;
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+
+
+ var index = storeXY(arrowArr, target.id);
+ arrowArr[index][8] = nodeID;
+ } else if (-1 * ($("#" + target.id).width() + 12) - dx == 0) {
+ target.style.width = '0px';
+ target.setAttribute("direction", "self");
+ makeArrow(target);
+
+
+ var index = storeXY(arrowArr, target.id);
+ arrowArr[index][8] = nodeID;
+ }
+ } else if (target.getAttribute("direction") == "self") {
+ if (dx > 0) {
+ target.setAttribute("direction", "left");
+ makeArrow(target);
+ target.style.width = dx - 12 + 'px';
+
+ var index = storeXY(arrowArr, target.id);
+ arrowArr[index][8] = nodeID;
+ } else if (dx < 0) {
+ target.setAttribute("direction", "right");
+ makeArrow(target);
+ target.style.width = Math.abs(dx) - 12 + 'px';
+
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(target.getAttribute('data_x')) || 0) + dx,
+ y = (parseFloat(target.getAttribute('data_y')) || 0) + dy;
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+
+
+ var index = storeXY(arrowArr, target.id);
+ arrowArr[index][8] = nodeID;
+ }
+ }
+ }
+
+
+ /////////
+
+ for (var i = 0; i < endArrowDependants.length; i++) {
+ var target = document.getElementById(endArrowDependants[i]);
+ if (target.getAttribute("direction") == "right") {
+ if ($("#" + target.id).width() + 12 + dx > 0) {
+ target.style.width = parseFloat(target.style.width) + dx + 'px';
+ var index = storeXY(arrowArr, target.id);
+ arrowArr[index][9] = nodeID;
+ } else if ($("#" + target.id).width() + 12 + dx < 0) {
+ var newWide = Math.abs(parseFloat(target.style.width) + dx) - 12;
+ target.setAttribute("direction", "left");
+ makeArrow(target);
+ target.style.width = newWide + 'px';
+
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(target.getAttribute('data_x')) || 0) + dx,
+ y = (parseFloat(target.getAttribute('data_y')) || 0) + dy;
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+
+
+ var index = storeXY(arrowArr, target.id);
+ arrowArr[index][9] = nodeID;
+ } else if ($("#" + target.id).width() + 12 + dx == 0) {
+ target.style.width = '0px';
+ target.setAttribute("direction", "self");
+ makeArrow(target);
+ var index = storeXY(arrowArr, target.id);
+ arrowArr[index][9] = nodeID;
+ }
+ } else if (target.getAttribute("direction") == "left") {
+ if (-1 * ($("#" + target.id).width() + 12) + dx < 0) {
+ target.style.width = parseFloat(target.style.width) - dx + 'px';
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(target.getAttribute('data_x')) || 0) + dx,
+ y = (parseFloat(target.getAttribute('data_y')) || 0) + dy;
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+ var index = storeXY(arrowArr, target.id);
+ arrowArr[index][9] = nodeID;
+ } else if (-1 * ($("#" + target.id).width() + 12) + dx > 0) {
+ var newWide = Math.abs(parseFloat(target.style.width) + dx);
+ target.setAttribute("direction", "right");
+ makeArrow(target);
+ target.style.width = newWide + 'px';
+
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(target.getAttribute('data_x')) || 0) + dx,
+ y = (parseFloat(target.getAttribute('data_y')) || 0) + dy;
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+
+
+ var index = storeXY(arrowArr, target.id);
+ arrowArr[index][9] = nodeID;
+ } else if (-1 * ($("#" + target.id).width() + 12) + dx == 0) {
+ target.style.width = '0px';
+ target.setAttribute("direction", "self");
+ makeArrow(target);
+
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(target.getAttribute('data_x')) || 0) + dx,
+ y = (parseFloat(target.getAttribute('data_y')) || 0) + dy;
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+
+ var index = storeXY(arrowArr, target.id);
+ arrowArr[index][9] = nodeID;
+ }
+ } else if (target.getAttribute("direction") == "self") {
+ if (dx > 0) {
+ target.setAttribute("direction", "right");
+ makeArrow(target);
+ target.style.width = dx - 12 + 'px';
+
+ var index = storeXY(arrowArr, target.id);
+ arrowArr[index][9] = nodeID;
+ } else if (dx < 0) {
+ target.setAttribute("direction", "left");
+ makeArrow(target);
+ target.style.width = Math.abs(dx) - 12 + 'px';
+
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(target.getAttribute('data_x')) || 0) + dx,
+ y = (parseFloat(target.getAttribute('data_y')) || 0) + dy;
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+
+
+ var index = storeXY(arrowArr, target.id);
+ arrowArr[index][9] = nodeID;
+ }
+ }
+ }
+}
+
+
+interact('.hasNodesHeader')
+ .on('tap', function(event) {
+ if (event.button == 0) {
+ clearSelection();
+ var mainNode = event.target;
+ if (mainNode.id == "") {
+ mainNode = event.target.parentNode;
+ }
+ var index = recallArray(nodeArr, mainNode.id);
+
+ if ($("#" + mainNode.id).hasClass("expanded")) {
+ calcChildren(mainNode.id);
+ var children = nodeArr[index][9];
+ for (var k = children.length - 1; k >= 0; k--) {
+ for (var m = 1; m <= k; m++) {
+ if (parseInt(document.getElementById(children[m - 1]).getAttribute(
+ "data_x")) > parseInt(document.getElementById(children[m]).getAttribute(
+ "data_x"))) {
+ var swap = children[m];
+ children[m] = children[m - 1];
+ children[m - 1] = swap;
+ }
+ }
+ }
+ for (var i = 0; i < children.length; i++) {
+ for (var z = 0; z < arrowArr.length; z++) {
+ determineLRNode(arrowArr[z][1], "arrow");
+ }
+ getStartArrowDependants(children[i]);
+ getEndArrowDependants(children[i]);
+ document.getElementById(children[i]).setAttribute('tempStartDep',
+ startArrowDependants);
+ document.getElementById(children[i]).setAttribute('tempEndDep',
+ endArrowDependants);
+ }
+ for (var i = 0; i < children.length; i++) {
+ document.getElementById(children[i]).setAttribute('xOffset', i);
+ //document.getElementById(children[i]).setAttribute('xOffset',parseInt(document.getElementById(children[i]).getAttribute('data_x')-x))
+ $("#" + children[i]).css('display', 'none');
+ getStartArrowDependants(children[i]);
+ getEndArrowDependants(children[i]);
+ //Collapse
+ var x = nodeArr[index][3];
+ var y = document.getElementById(children[i]).getAttribute('data_y');
+ document.getElementById(children[i]).style.webkitTransform = document.getElementById(
+ children[i]).style.transform =
+ 'translate(' + x + 'px,' + y + 'px)';
+ document.getElementById(children[i]).setAttribute('data_x', x);
+ document.getElementById(children[i]).setAttribute('data_y', y);
+ storeXY(nodeArr, children[i]);
+ for (var j = 0; j < startArrowDependants.length; j++) {
+ target = document.getElementById(startArrowDependants[j]);
+ for (var k = 0; k < arrowArr.length; k++) {
+ if (arrowArr[k][1] == target.id) {
+ var arrowIndex = k;
+ }
+ }
+ if (arrowArr[arrowIndex][3] >= nodeArr[index][3] && arrowArr[arrowIndex]
+ [6] <= nodeArr[index][6]) {
+ endArrowDependants.splice(endArrowDependants.indexOf(target.id), 1);
+ target.setAttribute('direction', 'self');
+
+ target.style.width = 0 + 'px';
+ // keep the dragged position in the data-x/data-y attributes
+ x = nodeArr[index][3] + 50;
+ y = (parseFloat(target.getAttribute('data_y')) || 0);
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+
+ storeXY(arrowArr, target.id);
+ makeArrow(arrowArr[arrowIndex][1]);
+ continue;
+ }
+ if (target.getAttribute('direction') == 'right') {
+ dx = i * 160;
+ target.style.width = parseFloat(target.style.width) + dx + 'px';
+
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(target.getAttribute('data_x')) || 0) - dx,
+ y = (parseFloat(target.getAttribute('data_y')) || 0);
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+
+ storeXY(arrowArr, target.id);
+ }
+ if (target.getAttribute('direction') == 'left') {
+ dx = i * 160;
+ target.style.width = parseFloat(target.style.width) - dx + 'px';
+
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(target.getAttribute('data_x')) || 0),
+ y = (parseFloat(target.getAttribute('data_y')) || 0);
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+
+ storeXY(arrowArr, target.id);
+ }
+ }
+ for (var j = 0; j < endArrowDependants.length; j++) {
+ target = document.getElementById(endArrowDependants[j]);
+ if (target.getAttribute('direction') == 'right') {
+ dx = i * 160;
+ target.style.width = parseFloat(target.style.width) - dx + 'px';
+
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(target.getAttribute('data_x')) || 0),
+ y = (parseFloat(target.getAttribute('data_y')) || 0);
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+
+ storeXY(arrowArr, target.id);
+ } else if (target.getAttribute('direction') == 'left') {
+ dx = i * 160;
+ target.style.width = parseFloat(target.style.width) + dx + 'px';
+
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(target.getAttribute('data_x')) || 0) - dx,
+ y = (parseFloat(target.getAttribute('data_y')) || 0);
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+
+ storeXY(arrowArr, target.id);
+ }
+ }
+ }
+ $("#" + mainNode.id).removeClass("expanded");
+ $("#" + mainNode.id).addClass("collapsed");
+
+ //REFORM NODE///////////////////////////////////////////////
+ var height = $("#" + mainNode.id).height();
+ var dy = 12;
+ var dx = 0;
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(mainNode.getAttribute('data_x'))) + 0,
+ y = (parseFloat(mainNode.getAttribute('data_y'))) + dy / 2;
+
+ // translate the element
+ mainNode.style.webkitTransform =
+ mainNode.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ mainNode.setAttribute('data_x', x);
+ mainNode.setAttribute('data_y', y);
+
+ $("#" + mainNode.id).width(100);
+ $("#" + mainNode.id).height(height - dy);
+ var nodeHeight = $("#" + mainNode.id).height();
+ nodeHeightCorrected = nodeHeight + 16;
+ var gridHeight = document.getElementById('grid').clientHeight;
+ gridHeightCorrected = gridHeight - 90;
+ recallArray(nodeArr, mainNode.id);
+ document.getElementById(mainNode.id).innerHTML =
+ '' + text +
+ '
+
';
+ ////////////////////////////////////////////////////////////
+
+ shiftByDx(-160 * (children.length - 1), mainNode.id);
+ storeXY(nodeArr, mainNode.id);
+ }
+ }
+ });
+interact('.collapsedPlus')
+ .on('tap', function(event) {
+ if (event.button == 0) {
+ clearSelection();
+ var mainNode = event.target;
+ if (mainNode.id == "") {
+ mainNode = event.target.parentNode;
+ }
+ var index = recallArray(nodeArr, mainNode.id);
+ if ($("#" + mainNode.id).hasClass("collapsed")) {
+ clearSelection();
+ var children = nodeArr[index][9];
+ var selfStart = [];
+ var selfEnd = [];
+ shiftByDx(160 * (children.length - 1), mainNode.id);
+ for (var i = 0; i < children.length; i++) {
+ $("#" + children[i]).css('display', 'inline-block');
+ startArrowDependants = document.getElementById(children[i]).getAttribute(
+ 'tempStartDep');
+ endArrowDependants = document.getElementById(children[i]).getAttribute(
+ 'tempEndDep');
+ if (startArrowDependants.length != 0) startArrowDependants =
+ startArrowDependants.split(",");
+ if (endArrowDependants.length != 0) endArrowDependants =
+ endArrowDependants.split(",");
+ var nonConnectedArrows = []
+ for (var j = 0; j < arrowArr.length; j++) {
+ if (startArrowDependants.indexOf(arrowArr[j][1]) == -1 &&
+ endArrowDependants.indexOf(arrowArr[j][1]) == -1 && (children[i] ==
+ arrowArr[j][8] || children[i] == arrowArr[j][9] || arrowArr[j][8] ==
+ mainNode.id || arrowArr[j][9] == mainNode.id)) {
+ nonConnectedArrows.push(arrowArr[j][1])
+ }
+ }
+
+
+ //Restore
+ //var x = parseInt(document.getElementById(children[i]).getAttribute('data_x')) + parseInt(document.getElementById(children[i]).getAttribute('xOffset'));
+ var x = parseInt(document.getElementById(children[i]).getAttribute(
+ 'data_x')) + parseInt(document.getElementById(children[i]).getAttribute(
+ 'xOffset') * 160);
+ var y = document.getElementById(children[i]).getAttribute('data_y');
+ document.getElementById(children[i]).style.webkitTransform = document.getElementById(
+ children[i]).style.transform =
+ 'translate(' + x + 'px,' + y + 'px)';
+ document.getElementById(children[i]).setAttribute('data_x', x);
+ document.getElementById(children[i]).setAttribute('data_y', y);
+ storeXY(nodeArr, children[i]);
+ for (var j = 0; j < startArrowDependants.length; j++) {
+ target = document.getElementById(startArrowDependants[j]);
+ if (target.getAttribute('direction') == 'right') {
+ dx = document.getElementById(children[i]).getAttribute('xOffset') * 160;
+ target.style.width = parseFloat(target.style.width) - dx + 'px';
+
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(target.getAttribute('data_x')) || 0) + dx,
+ y = (parseFloat(target.getAttribute('data_y')) || 0);
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+
+ storeXY(arrowArr, target.id);
+ } else if (target.getAttribute('direction') == 'left') {
+ dx = document.getElementById(children[i]).getAttribute('xOffset') * 160;
+ target.style.width = parseFloat(target.style.width) + dx + 'px';
+
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(target.getAttribute('data_x')) || 0),
+ y = (parseFloat(target.getAttribute('data_y')) || 0);
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+
+ storeXY(arrowArr, target.id);
+ } else if (target.getAttribute('direction') == 'self') {
+ selfStart.push(target.id);
+ }
+ }
+ for (var j = 0; j < endArrowDependants.length; j++) {
+ target = document.getElementById(endArrowDependants[j]);
+ if (target.getAttribute('direction') == 'right') {
+ dx = document.getElementById(children[i]).getAttribute('xOffset') * 160;
+ target.style.width = parseFloat(target.style.width) + dx + 'px';
+
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(target.getAttribute('data_x')) || 0),
+ y = (parseFloat(target.getAttribute('data_y')) || 0);
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+
+ storeXY(arrowArr, target.id);
+ } else if (target.getAttribute('direction') == 'left') {
+ dx = document.getElementById(children[i]).getAttribute('xOffset') * 160;
+ target.style.width = parseFloat(target.style.width) - dx + 'px';
+
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(target.getAttribute('data_x')) || 0) + dx,
+ y = (parseFloat(target.getAttribute('data_y')) || 0);
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+
+ storeXY(arrowArr, target.id);
+ } else if (target.getAttribute('direction') == 'self') {
+ selfEnd.push(target.id);
+ }
+ }
+ for (var j = 0; j < nonConnectedArrows.length; j++) {
+ target = document.getElementById(nonConnectedArrows[j]);
+ if (target.getAttribute('direction') == 'right') {
+ dx = -52;
+ target.style.width = parseFloat(target.style.width) + dx + 'px';
+
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(target.getAttribute('data_x')) || 0),
+ y = (parseFloat(target.getAttribute('data_y')) || 0);
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+
+ storeXY(arrowArr, target.id);
+ } else if (target.getAttribute('direction') == 'left') {
+ dx = -52
+ target.style.width = parseFloat(target.style.width) - dx + 'px';
+
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(target.getAttribute('data_x')) || 0) + dx,
+ y = (parseFloat(target.getAttribute('data_y')) || 0);
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+
+ storeXY(arrowArr, target.id);
+ }
+ }
+ }
+ $("#" + mainNode.id).addClass("expanded");
+ $("#" + mainNode.id).removeClass("collapsed");
+ //REFORM NODE///////////////////////////////////////////////
+ var dy = 12;
+ var dx = 0;
+ var height = $("#" + mainNode.id).height();
+ var wide = $("#" + mainNode.id).width();
+
+ height += dy;
+ wide += dx;
+
+ // keep the dragged position in the data-x/data-y attributes
+ x = (parseFloat(mainNode.getAttribute('data_x'))) + 0,
+ y = (parseFloat(mainNode.getAttribute('data_y'))) - dy / 2;
+
+ // translate the element
+ mainNode.style.webkitTransform =
+ mainNode.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ mainNode.setAttribute('data_x', x);
+ mainNode.setAttribute('data_y', y);
+
+
+ $("#" + mainNode.id).height(height);
+ $("#" + mainNode.id).width(wide);
+
+ text = nodeArr[index][2];
+
+ nodeHeightCorrected = height + 16;
+ var gridHeight = document.getElementById('grid').clientHeight;
+ gridHeightCorrected = gridHeight - 90;
+ mainNode.innerHTML = '' +
+ '
' +
+ '
';
+ ////////////////////////////////////////////////////////////
+
+ $("#" + mainNode.id).width(100 + 160 * (children.length - 1));
+ storeXY(nodeArr, mainNode.id);
+ for (var j = 0; j < selfStart.length; j++) {
+ target = document.getElementById(selfStart[j]);
+ for (var k = 0; k < nodeArr.length; k++) {
+ try {
+ if (document.getElementById(nodeArr[k][1]).getAttribute('tempstartdep')
+ .indexOf(selfStart[j]) != -1) {
+ var startX = nodeArr[k][3];
+ }
+ } catch (err) {};
+ try {
+ if (document.getElementById(nodeArr[k][1]).getAttribute('tempenddep').indexOf(
+ selfStart[j]) != -1) {
+ var endX = nodeArr[k][3];
+ }
+ } catch (err) {};
+ }
+ if (startX < endX) {
+ target.setAttribute('direction', 'right');
+ target.style.width = endX - startX - 12 + 'px';
+
+ // keep the dragged position in the data-x/data-y attributes
+ x = startX + 50;
+ y = (parseFloat(target.getAttribute('data_y')) || 0);
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+
+ makeArrow(target);
+ storeXY(arrowArr, target.id);
+ }
+ if (startX > endX) {
+ target.setAttribute('direction', 'left');
+ target.style.width = startX - endX - 12 + 'px';
+
+ // keep the dragged position in the data-x/data-y attributes
+ x = endX + 50;
+ y = (parseFloat(target.getAttribute('data_y')) || 0);
+
+ // translate the element
+ target.style.webkitTransform =
+ target.style.transform =
+ 'translate(' + x + 'px, ' + y + 'px)';
+
+ // update the position attributes
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+ makeArrow(target);
+ storeXY(arrowArr, target.id);
+ }
+ }
+ }
+ }
+ });
+
+
+//BPMN on double click of node
+interact('.placed')
+ .on('doubletap', function(event) {
+ if (event.button == 0) {
+ target = event.target.id;
+ while (target == "") {
+ target = event.target.parentNode.id;
+ }
+ renameNode(target);
+ }
+ });
+
+function bpmnAction(target) {
+ if (target.id == "") target = target.parentNode;
+ var index = recallArray(nodeArr, target.id);
+ if (nodeArr[index][10] == null || nodeArr[index][10] == "") { //No diagram detected
+ bootbox.confirm({
+ size: 'small',
+ animate: false,
+ title: 'No BPMN Detected',
+ message: 'Please follow the following steps : ' +
+ 'Go to bpmn.io and create a flow diagram ' +
+ 'Click the export button ' +
+ 'Find the file here: ' +
+ 'Click "OK" below ' +
+ ' ',
+ callback: function(result) {
+ if (result == true) {
+ uploadBPMN(index)
+ }
+ }
+ });
+ } else { //Diagram is present
+ //$('#'+event.target.parentNode.id).tooltipster('destroy');
+ //var displayCanvas = setInterval(function () {
+ bootbox.dialog({
+ size: 'large',
+ message: '
Upload Edits: Change Export Remove
',
+ animate: false,
+ callback: function(result) {
+ if (result == true) {
+
+ }
+ }
+ });
+ showBPMN(nodeArr[index][10])
+ // clearInterval(displayCanvas);
+ // },500);
+ }
+}
+
+function uploadBPMN(index) {
+ $('#' + nodeArr[index][1]).addClass('bpmn');
+ var file = document.getElementById("xmlToLoad").files[0];
+ //console.log(file);
+ var reader = new FileReader();
+ reader.onload = recievedText;
+ reader.readAsText(file);
+ bootbox.hideAll();
+
+ function recievedText() {
+ var textFromFileLoaded = reader.result;
+ console.log(textFromFileLoaded);
+ nodeArr[index][10] = textFromFileLoaded
+ bootbox.dialog({
+ size: 'large',
+ message: '' +
+ nodeArr[index][2] +
+ '
Upload Edits: Change Export Remove
',
+ animate: false,
+ callback: function(result) {
+ if (result == true) {
+
+ }
+ }
+ });
+ showBPMN(nodeArr[index][10]);
+ }
+}
+
+function removeBPMN(index) {
+ nodeArr[index][10] = null;
+ bootbox.hideAll();
+}
+
+function exportBPMN(index) {
+ var textToWrite = nodeArr[index][10];
+ var blob = new Blob([textToWrite], {
+ type: "text/plain;charset=utf-8"
+ });
+
+ var downloadLink = document.createElement("a");
+
+ downloadLink.download = nodeArr[index][2] + '.bpmn';
+ downloadLink.innerHTML = "Download File";
+ downloadLink.href = window.webkitURL.createObjectURL(blob);
+ downloadLink.click();
+}
+
+/* TOOLTIPS
+$(document).on("mouseenter", '.bpmn',function(event){
+ index = recallArray(nodeArr,event.target.id);
+ $('#'+event.target.id).tooltipster({
+ minWidth:200,
+ position:'top',
+ theme: 'tooltipster-shadow',
+ interactive:false,
+ delay:500,
+ multiple:false,
+ trigger:'hover',
+ contentAsHTML:true,
+ functionReady: function (o,t){
+ showBPMN(nodeArr[index][10]);
+ },
+ content: '
'
+ });
+
+
+})
+$(document).on("mouseleave", '.bpmn',function(event){
+ $('#'+event.target.id).tooltipster('hide');
+})
+*/
+
+function renameNode(uuid) {
+ var index = recallArray(nodeArr, uuid);
+ var toscaId = document.getElementById(nodeArr[index][1]).getAttribute("taska_id");
+ var serviceName = document.getElementById(nodeArr[index][1]).getAttribute("sname");
+ var role_id = document.getElementById(nodeArr[index][1]).getAttribute("role_id");
+
+ bootbox.confirm({
+ closeButton: false,
+ backdrop: true,
+ animate: false,
+ size: 'small',
+ title: "Modify Element " + serviceName,
+ onEscape: function() {},
+ message: ' Role :
',
+ callback: function(result) {
+ if (result == true) {
+ //EXECUTE THIS ON OKAY///
+ var innerText = serviceName;
+ document.getElementById(nodeArr[index][1]).setAttribute("role_id",$("#rolefield").val());
+ //document.getElementById(nodeArr[index][1]).setAttribute("toscaid", toscaID);
+ pushToDict(innerText, "node");
+ storeText(nodeArr, uuid, innerText);
+ var nodeHeight = $("#" + uuid).height();
+ nodeHeightCorrected = nodeHeight + 16;
+ var gridHeight = document.getElementById('grid').clientHeight;
+ gridHeightCorrected = gridHeight - 90;
+ // Not sure whate below is for? Need to investigate
+ if ($("#" + uuid).hasClass("expanded") == true) {
+ document.getElementById(uuid).innerHTML =
+ '' +
+ '
' +
+ '
';
+ } else if ($("#" + uuid).hasClass("collapsed") == true) {
+ document.getElementById(uuid).innerHTML =
+ '' + innerText +
+ '
+
';
+ } else {
+ document.getElementById(uuid).innerHTML =
+ '' + innerText +
+ '
';
+ }
+ clearSelection();
+ }
+ }
+ });
+
+ /* Removed #nodeInnerText Code as it is no longer needed */
+}
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/notes.js b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/notes.js
new file mode 100644
index 0000000..23d3704
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/notes.js
@@ -0,0 +1,152 @@
+/*
+=============================================================================================
+The MIT License (MIT)
+
+Copyright 2015 AT&T Intellectual Property. All other rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+// Contains methods to drag, copy, resize notes
+
+var noteArr = []; //Node array stored as [tag, uuid]
+
+interact('.postit')
+ //CLONING
+ .on('move',function (event){
+ var interaction = event.interaction;
+
+ $ ("arrowDropzone").addClass("drop-target");
+ // if the pointer was moved while being held down
+ // and an interaction hasn't started yet
+ if (interaction.pointerIsDown && !interaction.interacting() && !$(event.currentTarget).hasClass("child")) {
+ var original = event.currentTarget;
+ // create a clone of the currentTarget element
+
+ var dropOffLocation = document.getElementById("noteChildrenDroppedOffHere");
+ uuid = guid();
+ dropOffLocation.innerHTML+='
'
+ clone = document.getElementById(uuid);
+
+ // translate the element
+ clone.style.webkitTransform = clone.style.transform = 'translate(' + 0 + $(document).scrollLeft() + 'px, ' + 215 + $(document).scrollTop() + 'px)';
+
+ // update the position attributes
+ clone.setAttribute('data_x', 0 + $(document).scrollLeft());
+ clone.setAttribute('data_y', 218 + $(document).scrollTop());
+
+
+ noteArr.push([clone,uuid]);
+
+ // start a drag interaction targeting the clone
+ interaction.start({ name: 'drag' },
+ event.interactable,
+ clone);
+ }
+ })
+
+ //DRAGGING
+ .draggable({
+ snap: {
+ targets: [ // give this function the x and y page coords
+ // and snap to the object returned
+ interact.createSnapGrid({
+ x:100,
+ y:42
+ })
+ ],
+ offset:{x:0,y:-5},
+ range:Infinity,
+ relativePoints: [ { x: 0, y: 0 } ],
+ endOnly: true
+ },
+ // enable inertial throwing
+ inertia: true,
+
+ restrict: {
+ endOnly: true,
+ elementRect: { top: 0, left: 0, bottom: 0, right: 0 }
+ },
+
+ // call this function on every dragmove event
+ onmove: window.dragMoveListenerArrow,
+ // call this function on every dragend event
+ onend: function (event) {
+
+ }
+ })
+ .on('dragmove', function (event) {
+
+ })
+
+ //RESIZING
+ .resizable({
+ edges: { left: true, right: true, bottom: true, top: true },
+ snap: {
+ targets: [
+ interact.createSnapGrid({
+ x:100,
+ y:42
+ })
+ ],
+ offset:{x:0,y:0},
+ range:Infinity,
+ relativePoints: [ { x: -5, y: 23 } ],
+ endOnly: true
+ }
+ })
+ .on('resizemove', function (event) {
+ var target = event.target,
+ x = (parseFloat(target.getAttribute('data_x')) || 0),
+ y = (parseFloat(target.getAttribute('data_y')) || 0);
+
+ // update the element's style
+ target.style.width = event.rect.width + 'px';
+ target.style.height = event.rect.height + 'px';
+
+ // translate when resizing from top or left edges
+ x += event.deltaRect.left;
+ y += event.deltaRect.top;
+
+ target.style.webkitTransform = target.style.transform =
+ 'translate(' + x + 'px,' + y + 'px)';
+
+ target.setAttribute('data-x', x);
+ target.setAttribute('data-y', y);
+
+ storeXY(noteArr,event.target.id);
+})
+;
+
+interact('.notePlaced')
+.on('doubletap',function (event){
+ var uuid = event.target.id;
+ recallArray(noteArr, uuid);
+ event.preventDefault();
+ bootbox.prompt({
+ closeButton:false,backdrop:true,animate:false,
+ size:'small',
+ title: "Change Note Text",
+ value:text,
+ placeholder: "add text here",
+ callback: function(result) {
+ if (result != null) {
+ //EXECUTE THIS ON OKAY///
+ innerText = result;
+ pushToDict(innerText, "note");
+ storeText(noteArr,uuid,innerText);
+ event.target.innerHTML = innerText;
+ /////////////////////////
+ }
+ }
+ });
+ $("#box").autocomplete({
+ source: noteTags,
+ autoFocus: true,
+ delay: 0
+ });
+});
\ No newline at end of file
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/printpdf.js b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/printpdf.js
new file mode 100644
index 0000000..a60e850
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/printpdf.js
@@ -0,0 +1,519 @@
+/*
+=============================================================================================
+The MIT License (MIT)
+
+Copyright 2015 AT&T Intellectual Property. All other rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+//Contains functions to export editor data to a pdf
+
+function printDiagram(){
+
+ var now = new Date;
+ var utc_timestamp = Date.UTC(now.getUTCFullYear(),now.getUTCMonth(), now.getUTCDate() ,
+ now.getUTCHours(), now.getUTCMinutes(), now.getUTCSeconds(), now.getUTCMilliseconds());
+
+ ///these figures come from the current drawing
+ //var grid_pitch = 42;
+ var grid_start_y = 60;
+
+ doubleLineNumbers.length=0;
+ doubleLineText.length=0;
+ var doubleElements = document.getElementsByClassName("doubleLine");
+ $.each(doubleElements,function(index, value){
+ doubleLineNumbers.push(($(value).attr('id')).substring(3));
+ doubleLineText.push(value.children[0].innerHTML);
+ });
+
+ //alert('Saving To File -- click OK');
+ m = "";
+ m += '{ "diagram": \n';
+ m += '{ "created": "' + utc_timestamp + '",\n';
+ m += '"rows": "' + rows + '",\n';
+ m += '"cols": "' + cols + '",\n';
+ m += '"description": "' + description + '",\n';
+ m += '"gridPitchy": "' + gridPitchy + '",\n';
+ m += '"canvasHeight": "' + $("#grid").height() + '",\n';
+ m += '"canvasWidth": "' + $("#grid").width() + '",\n';
+ m += '"encoding": "base64",\n';
+ m += '"elements": {"nodes": [\n';
+ nodeArr.forEach(saveNodeArrayElements);
+ m += '],\n "arrows": [\n';
+ arrowArr.forEach(saveArrowArrayElements);
+ m += '],\n "notes": [\n';
+ noteArr.forEach(saveNoteArrayElements);
+ m += '],\n "separators": [\n';
+ doubleLineNumbers.forEach(saveSeparatorArrayElements);
+ m += ']}}}';
+
+
+ var n = JSON.parse(m);
+ //console.log(n);
+ //console.log(n.diagram.created);
+ m = decodeJSON(m);
+ //alert(m);
+
+ outputPDF(m);
+
+
+}
+
+function outputPDF(c) {
+
+ var c;
+ //alert(c);
+ var n = JSON.parse(c);
+ var doc = new jsPDF("landscape");
+ var borderwidth=10;
+
+ //for landscape
+ var pdf_paper_xmax = 297;
+ var pdf_paper_ymax = 210;
+
+ var mystring = n.diagram.created;
+ var creationTime = n.diagram.created;
+ var description = n.diagram.description;
+ var canvasHeight = n.diagram.canvasHeight;
+ var canvasWidth = n.diagram.canvasWidth;
+ var rows = n.diagram.rows;
+ var cols = n.diagram.cols;
+ var elementList = n.diagram.elements;
+ //I dont think these are needed. I omitted them for testing and printPDF did not fail
+ //var oneNode = n.diagram.elements.nodes[0].id;
+ //var oneArrow = n.diagram.elements.arrows[0].id;
+
+ var lineSpacing = 5;
+ var linePosition = lineSpacing;
+
+ var pdf_x_scale = pdf_paper_xmax / canvasWidth ; //this converts from canvasWidth to paper coords.
+ var pdf_y_scale = (pdf_paper_ymax) / (canvasHeight );
+
+
+ var title = 'Creation time: '+ n.diagram.created ;
+ var title = 'Description: '+ n.diagram.description;
+ //title += ' rows=' + rows;
+ //title += ' cols=' + cols;
+ //title += ' canvasHeight=' + canvasHeight;
+ //title += ' canvasWidth=' + canvasWidth;
+ //title += ' pdf_x_scale=' + pdf_x_scale;
+ //title += ' pdf_y_scale=' + pdf_y_scale;
+
+ doc.setFontSize(10);
+ doc.text((pdf_paper_xmax/2)-(title.length/2), 10, title);
+
+ drawgrid(doc,n.diagram.elements.separators)
+
+ var allNodes = n.diagram.elements.nodes;
+ DrawNodes(allNodes);
+
+
+ var allArrows = n.diagram.elements.arrows;
+ DrawArrows(allArrows);
+
+
+ // Output as Data URI
+ doc.output('dataurlnewwindow');
+
+
+function drawborder(doc,max_x,max_y){
+ var doc;
+ var max_x;
+ var max_y;
+ doc.setDrawColor(255,0,0);
+ doc.setFillColor(0,0,0);
+ var borderwidth = 10;
+ doc.rect(borderwidth, borderwidth, max_x - (2*borderwidth), max_y - (2*borderwidth), 'F'); // filled red square
+
+ //doc.setDrawColor(255,0,0); // draw red lines
+ doc.setLineWidth(1);
+ doc.line(borderwidth, borderwidth, max_x-borderwidth,borderwidth ); // horz topline
+ doc.line(max_x-borderwidth, borderwidth, max_x-borderwidth,max_y-borderwidth ); // right hand border
+ doc.line(max_x-borderwidth, max_y-borderwidth, borderwidth,max_y-borderwidth ); // bottom border
+ doc.line(borderwidth,max_y-borderwidth,borderwidth,borderwidth ); // lefthand border
+
+
+}
+
+function drawgrid(doc,separators){
+ console.log(separators);
+ var rowsToMakeDouble=[]
+ $.each(separators,function(index, value){
+ rowsToMakeDouble.push(value.lineNumber);
+ });
+
+ var doc;
+ //var grid_pitch = 42;
+ var grid_start_y = 60;
+
+
+ doc.setFontSize(10);
+
+ //var max_x;
+ //var max_y;
+ doc.setDrawColor(255,0,0);
+ doc.setFillColor(0,0,0);
+ var borderwidth = 10;
+
+ doc.setDrawColor(255,0,0); // draw red lines
+ doc.setLineWidth(1);
+
+ var xleftpos = 10;
+ var yleftpos = 15;
+ //var linepitch = 10;
+ var lifeline_linepitch = (pdf_paper_xmax - (2*borderwidth))/ cols;
+
+ //for the horizontal lines, we give two borderwidth at top and one at bottom for the drawing area
+ var horz_gridpitch = Math.round(pdf_y_scale*gridPitchy);
+
+ for (i = 1; i <= rows; i++) { //for each row, draw a dotted line horizontally across
+ xleftpos = borderwidth;
+ yleftpos = (2*borderwidth) + (i*horz_gridpitch ) ;
+ doc.setFontSize(10);
+ doc.setLineWidth(0.01);
+ doc.text(xleftpos, yleftpos, i.toString());
+ //If there are no separators || the current row is not a separator : print dotted line. Else double line
+ if (rowsToMakeDouble==null || rowsToMakeDouble.indexOf(i.toString())==-1){
+ dottedline(doc, xleftpos, yleftpos-1, cols*lifeline_linepitch, yleftpos-1); // horz topline
+ }
+ else {
+ doubleline(doc, xleftpos, yleftpos-1, cols*lifeline_linepitch, yleftpos-1,separators[rowsToMakeDouble.indexOf(i.toString())].text); // horz topline
+ }
+ }
+ //doc.line(borderwidth, borderwidth, max_x-borderwidth,borderwidth ); // horz topline
+ //doc.line(max_x-borderwidth, borderwidth, max_x-borderwidth,max_y-borderwidth ); // right hand border
+ //doc.line(max_x-borderwidth, max_y-borderwidth, borderwidth,max_y-borderwidth ); // bottom border
+ //doc.line(borderwidth,max_y-borderwidth,borderwidth,borderwidth ); // lefthand border
+
+ //for debugging
+ //var title="hello";
+ //title += " =" + numlines;
+ //doc.text((pdf_paper_xmax/2)-(title.length/2), 20, title);
+
+}
+
+function dottedline(doc,x1,y1,x2,y2){
+ doc.setDrawColor(0,0,0); // draw blacklines
+
+ var doc;
+ var x1;
+ var x2;
+ var y1;
+ var y2;
+ var delta_y;
+ var delta_x;
+ var pitch;
+ var ticklength;
+ var j;
+ var k;
+ var fromx;
+ var fromy;
+ var tox;
+ var toy;
+ delta_x = (x2 - x1)/200;
+ delta_y = (y2 - y1)/200;
+
+ fromx = x1 ;
+ fromy = y1 ;
+ tox = fromx + (delta_x);
+ toy = fromy + (delta_y);
+
+ for(j = 1; j<= 200; j++){
+ tox = tox + delta_x;
+ toy = toy + delta_y;
+
+ if(j%2==0 ){
+ doc.line(fromx,fromy,tox,toy ); // draw tick line
+ }
+
+ fromx = tox;
+ fromy = toy;
+
+ }
+}
+
+function doubleline(doc,x1,y1,x2,y2,text){
+ doc.setLineWidth(.3); //bolder lines
+ //x values are transposed as to not interfere with the numbers on the left
+ doc.line(x1+3,y1,x2+2,y2);
+ doc.line(x1+3,y1+1,x2+2,y2+1); //shifts second line one unit down
+ //console.log(text);
+ doc.setFontStyle("italic");
+ doc.text(text,x1+x2/2,y1-1);
+ doc.setFontStyle("normal");
+}
+
+
+function DrawNodes(allNodes){
+ console.log(n.diagram.elements);
+ //console.log(document);
+ //for landscape
+
+ var lifeline_linepitch = (pdf_paper_xmax - (2*borderwidth))/ cols;
+ var horz_gridpitch = (pdf_paper_ymax - 3*(borderwidth)) / rows;
+
+ for (var i in allNodes ){
+ xpos = (allNodes[i].data_x * pdf_x_scale) ;
+ doc.text(xpos - ( (allNodes[i].innerText.length)/1.5), 20, allNodes[i].innerText);
+ //xpos = allNodes[i].data_x*pdf_x_scale + (allNodes[i].innerText.length/2) ;
+ doc.line(xpos, 20, xpos, pdf_paper_ymax-borderwidth); // vert line
+ }
+ //console.log(allNodes);
+}
+
+
+function DrawArrows(allArrows){
+ var xpos;
+ var ypos;
+ //var grid_pitch = 42;
+ var grid_start_y = 60;
+ var horz_gridpitch = Math.round(pdf_y_scale*gridPitchy);
+
+ var delta = Math.round(horz_gridpitch/3);
+ //var title="hello! ";
+ //title += " pdf_x_scale=" + pdf_x_scale;
+ //title += " pdf_y_scale=" + pdf_y_scale;
+ //title += "arrow count =" + allArrows.length;
+ //doc.text((pdf_paper_xmax/2)-(title.length/2), 15, title);
+
+ for (var j in allArrows){
+ var fromNode = document.getElementById(allArrows[j].fromNodeID);
+ var fromArrow = findObjectWithId(allNodes,fromNode.id);
+ var fromArrowx = Math.round(fromArrow.data_x * pdf_x_scale) ;
+ var fromArrowy = (allArrows[j].data_y * pdf_y_scale) ;
+
+ var toNode = document.getElementById(allArrows[j].toNodeID);
+ var toArrow = findObjectWithId(allNodes,toNode.id);
+ var toArrowx = Math.round(toArrow.data_x*pdf_x_scale) ;
+ //var toArrowy = (allArrows[j].data_y*pdf_y_scale) ;
+ //var toArrowy = ((Math.round(allArrows[j].data_y-60)/42)) * Math.round((pdf_paper_ymax-30)/rows)) +20;
+ var rowindex = Math.round( allArrows[j].data_y-grid_start_y) /gridPitchy;
+ var toArrowy = 20 + (rowindex * horz_gridpitch) - 2;
+
+ fromArrowy = toArrowy;
+ var mytext;
+
+ mytext = allArrows[j].innerText;
+ //mytext += " From Node ID " + fromArrow.id;
+ //mytext += " From Node data_x=" + fromArrowx;
+ //mytext += " rows= " + rows;
+ //mytext += " cols= " + cols;
+ //mytext += " pdf_paper_ymax= " + pdf_paper_ymax;
+ //mytext += " canvasHeight= " + canvasHeight;
+ //mytext += " Raw data_y= " + allArrows[j].data_y;
+ //mytext += " From Node data_y= " + fromArrowy;
+ //mytext += " pdf_y_scale= " + pdf_y_scale;
+
+ //mytext += " From Node ID " + fromArrow.id;
+ //mytext += " To Node ID " + toArrow.id;
+ //mytext += " To Node data_x=" + toArrowx;
+ //mytext += " To Node data_y=" + toArrowy;
+
+
+ if(fromArrow.id != toArrow.id) {
+ //fromArrowy = 20*j + 40;
+ var textx = fromArrowx + (toArrowx - fromArrowx)/2 - (mytext.length/2);
+ doc.text(textx , fromArrowy-1, mytext);
+ doc.setLineWidth(0.7);
+ doc.line(fromArrowx, fromArrowy+1, toArrowx, fromArrowy+1); // draw arrow
+ if(fromArrowx < toArrowx){
+ drawRightArrow(toArrowx,fromArrowy+1); // draw arrow
+ }else{
+ drawLeftArrow(toArrowx,fromArrowy+1); // draw arrow
+ }
+ }else{ //special case of self loop back
+ var textx = fromArrowx + (3*delta);
+ doc.text(textx , fromArrowy, mytext );
+ doc.setLineWidth(0.7);
+ doc.line(fromArrowx, fromArrowy-delta, fromArrowx+(2*delta), fromArrowy-delta ); // loop back brackets the same coords top line
+ doc.line(fromArrowx+(2*delta), fromArrowy-delta, fromArrowx+(2*delta), fromArrowy+delta ); // loop back brackets the same coords right hand loop
+ doc.line(fromArrowx+(2*delta), fromArrowy+delta, fromArrowx, fromArrowy+delta ); // loop back brackets the same coords bottom line
+ drawLeftArrow(fromArrowx,fromArrowy+delta); // draw arrow
+ }
+ }
+ //for debugging
+
+}
+
+function findObjectWithId(thing,id){
+ var thing;
+ var id;
+ for(var k in thing){
+ if(thing[k].id==id){
+ return(thing[k]);
+ }
+ }
+
+}
+
+function drawRightArrow(x,y){
+ doc.setLineWidth(.7);
+ var px0 = x;
+ var py0 = y;
+ var px1 = px0 -3;
+ var py1 = py0 -2;
+ var px2 = px0 -3;
+ var py2 = py0 +2;
+ var centerx = (px0 + px1)/2.0;
+ var centery = (py1 + py2)/2.0;
+
+ //basic big triangle
+ doc.line(px0, py0, px1, py1);
+ doc.line(px1, py1, px2, py2);
+ doc.line(px2, py2, px0, py0);
+
+ //smaller triangle within big triangle
+ var scale = 0.8;
+ px0 = px0 * scale;
+ px1 = px1 * scale;
+ px2 = px2 * scale;
+ py0 = py0 * scale;
+ py1 = py1 * scale;
+ py2 = py2 * scale;
+ var deltax = centerx - ((px1 + px0)/2.0) ;
+ var deltay = centery - ((py1 + py2)/2.0);
+ px0 = px0 + deltax;
+ px1 = px1 + deltax;
+ px2 = px2 + deltax;
+ py0 = py0 + deltay;
+ py1 = py1 + deltay;
+ py2 = py2 + deltay;
+ doc.line(px0, py0, px1, py1);
+ doc.line(px1, py1, px2, py2);
+ doc.line(px2, py2, px0, py0);
+
+ //smaller triangle within big triangle
+ var scale = 0.5;
+ px0 = px0 * scale;
+ px1 = px1 * scale;
+ px2 = px2 * scale;
+ py0 = py0 * scale;
+ py1 = py1 * scale;
+ py2 = py2 * scale;
+ var deltax = centerx - ((px1 + px0)/2.0) ;
+ var deltay = centery - ((py1 + py2)/2.0);
+ px0 = px0 + deltax;
+ px1 = px1 + deltax;
+ px2 = px2 + deltax;
+ py0 = py0 + deltay;
+ py1 = py1 + deltay;
+ py2 = py2 + deltay;
+ doc.line(px0, py0, px1, py1);
+ doc.line(px1, py1, px2, py2);
+ doc.line(px2, py2, px0, py0);
+
+ //smaller triangle within big triangle
+ var scale = 0.3;
+ px0 = px0 * scale;
+ px1 = px1 * scale;
+ px2 = px2 * scale;
+ py0 = py0 * scale;
+ py1 = py1 * scale;
+ py2 = py2 * scale;
+ var deltax = centerx - ((px1 + px0)/2.0) ;
+ var deltay = centery - ((py1 + py2)/2.0);
+ px0 = px0 + deltax;
+ px1 = px1 + deltax;
+ px2 = px2 + deltax;
+ py0 = py0 + deltay;
+ py1 = py1 + deltay;
+ py2 = py2 + deltay;
+ doc.line(px0, py0, px1, py1);
+ doc.line(px1, py1, px2, py2);
+ doc.line(px2, py2, px0, py0);
+
+}
+function drawLeftArrow(x,y){
+
+
+ doc.setLineWidth(.7);
+ var px0 = x;
+ var py0 = y;
+ var px1 = px0 +3;
+ var py1 = py0 -2;
+ var px2 = px0 +3;
+ var py2 = py0 +2;
+ var centerx = (px0 + px1)/2.0;
+ var centery = (py1 + py2)/2.0;
+
+ //basic big triangle
+ doc.line(px0, py0, px1, py1);
+ doc.line(px1, py1, px2, py2);
+ doc.line(px2, py2, px0, py0);
+
+ //smaller triangle within big triangle
+ var scale = 0.8;
+ px0 = px0 * scale;
+ px1 = px1 * scale;
+ px2 = px2 * scale;
+ py0 = py0 * scale;
+ py1 = py1 * scale;
+ py2 = py2 * scale;
+ var deltax = centerx - ((px1 + px0)/2.0) ;
+ var deltay = centery - ((py1 + py2)/2.0);
+ px0 = px0 + deltax;
+ px1 = px1 + deltax;
+ px2 = px2 + deltax;
+ py0 = py0 + deltay;
+ py1 = py1 + deltay;
+ py2 = py2 + deltay;
+ doc.line(px0, py0, px1, py1);
+ doc.line(px1, py1, px2, py2);
+ doc.line(px2, py2, px0, py0);
+
+ //smaller triangle within big triangle
+ var scale = 0.5;
+ px0 = px0 * scale;
+ px1 = px1 * scale;
+ px2 = px2 * scale;
+ py0 = py0 * scale;
+ py1 = py1 * scale;
+ py2 = py2 * scale;
+ var deltax = centerx - ((px1 + px0)/2.0) ;
+ var deltay = centery - ((py1 + py2)/2.0);
+ px0 = px0 + deltax;
+ px1 = px1 + deltax;
+ px2 = px2 + deltax;
+ py0 = py0 + deltay;
+ py1 = py1 + deltay;
+ py2 = py2 + deltay;
+ doc.line(px0, py0, px1, py1);
+ doc.line(px1, py1, px2, py2);
+ doc.line(px2, py2, px0, py0);
+
+ //smaller triangle within big triangle
+ var scale = 0.3;
+ px0 = px0 * scale;
+ px1 = px1 * scale;
+ px2 = px2 * scale;
+ py0 = py0 * scale;
+ py1 = py1 * scale;
+ py2 = py2 * scale;
+ var deltax = centerx - ((px1 + px0)/2.0) ;
+ var deltay = centery - ((py1 + py2)/2.0);
+ px0 = px0 + deltax;
+ px1 = px1 + deltax;
+ px2 = px2 + deltax;
+ py0 = py0 + deltay;
+ py1 = py1 + deltay;
+ py2 = py2 + deltay;
+ doc.line(px0, py0, px1, py1);
+ doc.line(px1, py1, px2, py2);
+ doc.line(px2, py2, px0, py0);
+
+ //doc.setLineWidth(.75);
+ //doc.line(x+3, y-2, x+3, y+2); // draw arrow //left bar
+ //doc.line(x+2.8, y-1.3, x+2.8, y+1.3); // draw arrow //left bar
+ //doc.line(x+2.5, y-1, x+2.5, y+1); // draw arrow //left bar
+ //doc.line(x+2, y-1, x+2, y+1); // draw arrow //left bar
+ //doc.line(x, y, x+3, y+2); // draw arrow //lower triangle
+ //doc.line(x, y, x+3, y-2); // draw arrow //upper triangle
+
+}
+
+}
\ No newline at end of file
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/resizable.js b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/resizable.js
new file mode 100644
index 0000000..443c63c
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/resizable.js
@@ -0,0 +1,159 @@
+/*
+=============================================================================================
+The MIT License (MIT)
+
+Copyright 2015 AT&T Intellectual Property. All other rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+//Contains functions for making and resizing arrows
+
+interact('.resizable')
+.resizable({
+
+ snap: {
+ targets: [ interact.createLifelineSnapGrid( ) ],
+ relativePoints: [ { x: 0, y: 0 } ],
+ range: Infinity,
+ endOnly: true //CREATES SMOOTH SNAP
+ },
+ edges: { left: true, right: true, bottom: false, top: false },
+ invert: 'reposition'
+
+})
+.on('resizemove', function (event) {
+ var target = event.target;
+ if (target.id=="") target = event.target.parentNode;
+ var x = (parseFloat(target.getAttribute('data_x')) || 0),
+ y = (parseFloat(target.getAttribute('data_y')) || 0);
+
+ // update the element's style
+ if (window.resized == false){
+ target.style.width = event.rect.width + 'px';
+
+
+ target.style.height = event.rect.height + 'px';
+
+ // translate when resizing from top or left edges
+ x += event.deltaRect.left;
+ y += event.deltaRect.top;
+
+ target.style.webkitTransform = target.style.transform =
+ 'translate(' + x + 'px,' + y + 'px)';
+
+ target.setAttribute('data_x', x);
+ target.setAttribute('data_y', y);
+ }
+ uuid = target.id;
+ if (uuid==""){
+ uuid = target.parentElement.id;
+ }
+
+
+ var index = storeXY(arrowArr,uuid);
+ window.currentArrow = arrowArr[index][1];
+ window.leftX = arrowArr[index][3];
+ window.rightX = arrowArr[index][6];
+ window.currentY = y;
+
+ window.resized = false;
+ var endingLeftX = event.target.getAttribute("data_x");
+ var endingRightX = parseInt(event.target.getAttribute("data_x")) + parseInt($("#"+target.id).width());
+
+ if ($("#"+event.target.id).width() == 0){
+ target.setAttribute("direction","self");
+ makeArrow(target);
+ }
+ if (target.getAttribute("direction") == "self"){
+ if (endingRightX>startingLeftX){ //Not negative case
+ target.setAttribute("direction","right");
+ makeArrow(target);
+ }
+ else if (endingLeftXstartingRightX && $('#'+target.id).width()<25){
+ startingLeftX = startingRightX;
+ target.setAttribute("direction","right");
+ makeArrow(target);
+ }
+ else if (endingLeftX==endingRightX){
+ target.setAttribute("direction","self");
+ makeArrow(target);
+ }
+ }
+ storeXY(arrowArr,uuid);
+ determineLRNode(uuid,"arrow"); //move to resizeend api if lagging
+
+
+})
+.on('resizestart', function(event){
+ startingLeftX = event.target.getAttribute("data_x");
+ startingRightX = parseInt(event.target.getAttribute("data_x")) + parseInt($("#"+event.target.id).width());
+ startWidth = parseInt($("#"+event.target.id).width());
+})
+.on('resizeend', function(event){
+ if ($("#"+event.target.id).width() == 0){
+ event.target.setAttribute("direction","self");
+ makeArrow(event.target);
+ }
+ var target = event.target
+ if (target.id=="") target = event.target.parentNode;
+ determineLRNode(target.id,"arrow");
+});
+
+function makeArrow(target){
+ try{
+ recallArray(arrowArr, target.id);
+ if (target.getAttribute("direction") == "right"){
+ target.innerHTML = '
'
+ }
+ else if (target.getAttribute("direction") == "left"){
+ target.innerHTML = '
'
+ }
+ else if (target.getAttribute("direction") == "self"){
+ target.innerHTML = ''+text+'
'
+ }
+ }
+ catch(err){
+ var uuid = target
+ var target = document.getElementById(target);
+ recallArray(arrowArr, uuid);
+ if (target.getAttribute("direction") == "right"){
+ target.innerHTML = '
'
+ }
+ else if (target.getAttribute("direction") == "left"){
+ target.innerHTML = '
'
+ }
+ else if (target.getAttribute("direction") == "self"){
+ target.innerHTML = ''+text+'
'
+ }
+ }
+}
\ No newline at end of file
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/scroll.js b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/scroll.js
new file mode 100644
index 0000000..5653ccf
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/scroll.js
@@ -0,0 +1,77 @@
+/*
+=============================================================================================
+The MIT License (MIT)
+
+Copyright 2015 AT&T Intellectual Property. All other rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+//Called when the user scrolls. Adjusts transparencies and keeps the nodes on the page at all times
+
+function scroll () {
+
+ var scrollY = $(document).scrollTop();
+ var scrollX = $(document).scrollLeft();
+
+ $("#numbers").css("margin-top", 0-scrollY);
+
+ if(scrollX != 0 ) {
+ if (scrollX<=80){
+ $( "#numbers" ).css('opacity', 1- 0.01 * (scrollX));
+ }
+ else {
+ $( "#numbers" ).css('opacity', '.2');
+ }
+ }
+ else {
+ $( "#numbers" ).css('opacity', '1');
+ }
+
+ var busy = false;
+ if (scrollY > 50 ){
+ if(busy)
+ return;
+ busy = true;
+
+ //Scrolls Nodes down the page
+ $(".verticallyScrollable").css("margin-top", -50+scrollY);
+
+ //Fades nodes as T->B
+ if (scrollY<=120){
+ $( ".verticallyScrollable" ).css('opacity', 1- 0.01 * (scrollY-50));
+ }
+ else {
+ $( ".verticallyScrollable" ).css('opacity', '.3');
+ }
+ //console.log(scrollY);
+ $(".verticalLine").css("top", 102-scrollY);
+
+ busy = false;
+ }
+ else{
+ $( ".verticallyScrollable" ).css('opacity', 1);
+ }
+
+ //Fades numbers as L->R
+ if(scrollX != 0 ) {
+
+ if (scrollX<=80){
+ $( "#numbers" ).css('opacity', 1- 0.01 * (scrollX));
+ }
+ else {
+ $( "#numbers" ).css('opacity', '.2');
+ }
+ }
+ else {
+ $( "#numbers" ).css('opacity', '1');
+ }
+ if (scrollY == 0) {
+ $(".verticallyScrollable").css("margin-top", 0);
+ $(".verticalLine").css("top", 52);
+ }
+}
\ No newline at end of file
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/services.js b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/services.js
new file mode 100644
index 0000000..6abcc98
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/services.js
@@ -0,0 +1,86 @@
+/* ---------------------------------------------------------------------------------------------- */
+/*
+* This file is a work in progress, update this section when complete to give a better description.
+* Currently the functions here work with the services and will work with getting the information
+* from the AJAX Call which will provide JSON/YMAL object of the information required to build the service
+* selection.
+*
+*
+*/
+
+/*
+* This Function currently builds the table for the accordian.
+* when complete this will create the complete section of how
+* a Domain, Serrvice and UE are selected from the ASE tool.
+*
+*/
+var domains = [];
+var elements = [];
+var networkMap =[];
+var isFirstRun = true;
+var defaultDomain = "RAN";
+var defaultElement = "com.ecomp.trinity.ran.enodeb";
+
+
+function buildNetworkMap() {
+
+
+ $.get(ase.elementsFile, {
+ //$.post('http://demeter.homer.ecomp.com:50180/d2sim/ase.htm?action=element', {
+ //$.post('ase.htm?action=element', {
+ }, function(data) {
+ var yamlObject = jsyaml.load(data);
+ networkMap = yamlObject.elementsList;
+ buildDomain(networkMap);
+ });
+
+
+}
+
+
+function buildDomain(networkMap){
+ if ( domains.length == 0 ) {
+ for ( var i = 0; i < networkMap.length; i++ ) {
+ if ( domains.indexOf(networkMap[i].enclosingDomain) < 0 ) {
+ domains.push(networkMap[i].enclosingDomain);
+ }
+ }
+ }
+ for ( var d = 0; d < domains.length; d++ ) {
+ $('#domains').append('' + domains[d] + ' ');
+ }
+ $("#elements").prop('disabled', true);
+ $('#domains').change(function(){
+ if ( $('#domains').val() == 'na' ) { return false; }
+ buildElements($('#domains').val());
+ });
+ $('#domains option[value|="'+ defaultDomain +'"]').prop("selected",true).change();
+
+}
+
+function buildElements(domain){
+ elements = [];
+ $('#elements').html('-- Select Element -- ');
+ for ( var i = 0; i < networkMap.length; i++ ) {
+ if ( networkMap[i].enclosingDomain == domain ) {
+ $('#elements').append('' + networkMap[i].displayShortname + ' ');
+ elements.push(networkMap[i].displayShortname);
+ }
+ }
+ $("#elements").prop('disabled', false);
+ $('#elements').change(function(){
+ if ( $('#elements').val() == 'na' ) { return false; }
+ buildNode($('#elements').val(),$('#elements option:selected').text());
+ });
+ if ( isFirstRun ) {
+ $('#elements option[value|="'+ defaultElement +'"]').prop("selected",true);
+ isFirstRun = false;
+ }
+
+}
+
+function buildNode(tosca_id,name){
+ $('#element').attr('taska_id',tosca_id);
+ $('#shortName').html(name);
+}
+
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/styles/menus/bs.css b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/styles/menus/bs.css
new file mode 100644
index 0000000..6e4c37b
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/styles/menus/bs.css
@@ -0,0 +1,677 @@
+.fade {
+ opacity: 0;
+ -webkit-transition: opacity .15s linear;
+ -o-transition: opacity .15s linear;
+ transition: opacity .15s linear;
+}
+.fade.in {
+ opacity: 1;
+}
+.modal-open {
+ overflow: hidden;
+}
+.modal {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 99999;
+ display: none;
+ overflow: hidden;
+ -webkit-overflow-scrolling: touch;
+ outline: 0;
+}
+.modal.fade .modal-dialog {
+ -webkit-transition: -webkit-transform .3s ease-out;
+ -o-transition: -o-transform .3s ease-out;
+ transition: transform .3s ease-out;
+ -webkit-transform: translate(0, -25%);
+ -ms-transform: translate(0, -25%);
+ -o-transform: translate(0, -25%);
+ transform: translate(0, -25%);
+}
+.modal.in .modal-dialog {
+ -webkit-transform: translate(0, 0);
+ -ms-transform: translate(0, 0);
+ -o-transform: translate(0, 0);
+ transform: translate(0, 0);
+}
+.modal-open .modal {
+ overflow-x: hidden;
+ overflow-y: auto;
+}
+.modal-dialog {
+ position: relative;
+ width: auto;
+ margin: 10px;
+}
+.modal-content {
+ position: relative;
+ background-color: #fff;
+ -webkit-background-clip: padding-box;
+ background-clip: padding-box;
+ border: 1px solid #999;
+ border: 1px solid rgba(0, 0, 0, .2);
+ border-radius: 6px;
+ outline: 0;
+ -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
+ box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
+}
+.modal-backdrop {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 9997;
+ background-color: #000;
+}
+.modal-backdrop.fade {
+ filter: alpha(opacity=0);
+ opacity: 0;
+}
+.modal-backdrop.in {
+ filter: alpha(opacity=50);
+ opacity: .5;
+}
+.modal-header {
+ min-height: 16.42857143px;
+ padding: 15px;
+ border-bottom: 1px solid #e5e5e5;
+}
+.modal-header .close {
+ margin-top: -2px;
+}
+.modal-title {
+ margin: 0;
+ line-height: 1.42857143;
+}
+.modal-body {
+ position: relative;
+ padding: 15px;
+}
+.modal-footer {
+ padding: 15px;
+ text-align: right;
+ border-top: 1px solid #e5e5e5;
+}
+.modal-footer .btn + .btn {
+ margin-bottom: 0;
+ margin-left: 5px;
+}
+.modal-footer .btn-group .btn + .btn {
+ margin-left: -1px;
+}
+.modal-footer .btn-block + .btn-block {
+ margin-left: 0;
+}
+.modal-scrollbar-measure {
+ position: absolute;
+ top: -9999px;
+ width: 50px;
+ height: 50px;
+ overflow: scroll;
+}
+@media (min-width: 768px) {
+ .modal-dialog {
+ width: 600px;
+ margin: 30px auto;
+ }
+ .modal-content {
+ -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
+ box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
+ }
+ .modal-sm {
+ width: 300px;
+ }
+}
+@media (min-width: 992px) {
+ .modal-lg {
+ width: 900px;
+ }
+}
+.btn {
+ display: inline-block;
+ padding: 6px 12px;
+ margin-bottom: 0;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: 1.42857143;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: middle;
+ -ms-touch-action: manipulation;
+ touch-action: manipulation;
+ cursor: pointer;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ background-image: none;
+ border: 1px solid transparent;
+ border-radius: 4px;
+}
+.btn:focus,
+.btn:active:focus,
+.btn.active:focus,
+.btn.focus,
+.btn:active.focus,
+.btn.active.focus {
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+.btn:hover,
+.btn:focus,
+.btn.focus {
+ color: #333;
+ text-decoration: none;
+}
+.btn:active,
+.btn.active {
+ background-image: none;
+ outline: 0;
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+}
+.btn.disabled,
+.btn[disabled],
+fieldset[disabled] .btn {
+ cursor: not-allowed;
+ filter: alpha(opacity=65);
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ opacity: .65;
+}
+a.btn.disabled,
+fieldset[disabled] a.btn {
+ pointer-events: none;
+}
+.btn-default {
+ color: #333;
+ background-color: #fff;
+ border-color: #ccc;
+}
+.btn-default:focus,
+.btn-default.focus {
+ color: #333;
+ background-color: #e6e6e6;
+ border-color: #8c8c8c;
+}
+.btn-default:hover {
+ color: #333;
+ background-color: #e6e6e6;
+ border-color: #adadad;
+}
+.btn-default:active,
+.btn-default.active,
+.open > .dropdown-toggle.btn-default {
+ color: #333;
+ background-color: #e6e6e6;
+ border-color: #adadad;
+}
+.btn-default:active:hover,
+.btn-default.active:hover,
+.open > .dropdown-toggle.btn-default:hover,
+.btn-default:active:focus,
+.btn-default.active:focus,
+.open > .dropdown-toggle.btn-default:focus,
+.btn-default:active.focus,
+.btn-default.active.focus,
+.open > .dropdown-toggle.btn-default.focus {
+ color: #333;
+ background-color: #d4d4d4;
+ border-color: #8c8c8c;
+}
+.btn-default:active,
+.btn-default.active,
+.open > .dropdown-toggle.btn-default {
+ background-image: none;
+}
+.btn-default.disabled,
+.btn-default[disabled],
+fieldset[disabled] .btn-default,
+.btn-default.disabled:hover,
+.btn-default[disabled]:hover,
+fieldset[disabled] .btn-default:hover,
+.btn-default.disabled:focus,
+.btn-default[disabled]:focus,
+fieldset[disabled] .btn-default:focus,
+.btn-default.disabled.focus,
+.btn-default[disabled].focus,
+fieldset[disabled] .btn-default.focus,
+.btn-default.disabled:active,
+.btn-default[disabled]:active,
+fieldset[disabled] .btn-default:active,
+.btn-default.disabled.active,
+.btn-default[disabled].active,
+fieldset[disabled] .btn-default.active {
+ background-color: #fff;
+ border-color: #ccc;
+}
+.btn-default .badge {
+ color: #fff;
+ background-color: #333;
+}
+.btn-primary {
+ color: #fff;
+ background-color: #337ab7;
+ border-color: #2e6da4;
+}
+.btn-primary:focus,
+.btn-primary.focus {
+ color: #fff;
+ background-color: #286090;
+ border-color: #122b40;
+}
+.btn-primary:hover {
+ color: #fff;
+ background-color: #286090;
+ border-color: #204d74;
+}
+.btn-primary:active,
+.btn-primary.active,
+.open > .dropdown-toggle.btn-primary {
+ color: #fff;
+ background-color: #286090;
+ border-color: #204d74;
+}
+.btn-primary:active:hover,
+.btn-primary.active:hover,
+.open > .dropdown-toggle.btn-primary:hover,
+.btn-primary:active:focus,
+.btn-primary.active:focus,
+.open > .dropdown-toggle.btn-primary:focus,
+.btn-primary:active.focus,
+.btn-primary.active.focus,
+.open > .dropdown-toggle.btn-primary.focus {
+ color: #fff;
+ background-color: #204d74;
+ border-color: #122b40;
+}
+.btn-primary:active,
+.btn-primary.active,
+.open > .dropdown-toggle.btn-primary {
+ background-image: none;
+}
+.btn-primary.disabled,
+.btn-primary[disabled],
+fieldset[disabled] .btn-primary,
+.btn-primary.disabled:hover,
+.btn-primary[disabled]:hover,
+fieldset[disabled] .btn-primary:hover,
+.btn-primary.disabled:focus,
+.btn-primary[disabled]:focus,
+fieldset[disabled] .btn-primary:focus,
+.btn-primary.disabled.focus,
+.btn-primary[disabled].focus,
+fieldset[disabled] .btn-primary.focus,
+.btn-primary.disabled:active,
+.btn-primary[disabled]:active,
+fieldset[disabled] .btn-primary:active,
+.btn-primary.disabled.active,
+.btn-primary[disabled].active,
+fieldset[disabled] .btn-primary.active {
+ background-color: #337ab7;
+ border-color: #2e6da4;
+}
+.btn-primary .badge {
+ color: #337ab7;
+ background-color: #fff;
+}
+.btn-success {
+ color: #fff;
+ background-color: #5cb85c;
+ border-color: #4cae4c;
+}
+.btn-success:focus,
+.btn-success.focus {
+ color: #fff;
+ background-color: #449d44;
+ border-color: #255625;
+}
+.btn-success:hover {
+ color: #fff;
+ background-color: #449d44;
+ border-color: #398439;
+}
+.btn-success:active,
+.btn-success.active,
+.open > .dropdown-toggle.btn-success {
+ color: #fff;
+ background-color: #449d44;
+ border-color: #398439;
+}
+.btn-success:active:hover,
+.btn-success.active:hover,
+.open > .dropdown-toggle.btn-success:hover,
+.btn-success:active:focus,
+.btn-success.active:focus,
+.open > .dropdown-toggle.btn-success:focus,
+.btn-success:active.focus,
+.btn-success.active.focus,
+.open > .dropdown-toggle.btn-success.focus {
+ color: #fff;
+ background-color: #398439;
+ border-color: #255625;
+}
+.btn-success:active,
+.btn-success.active,
+.open > .dropdown-toggle.btn-success {
+ background-image: none;
+}
+.btn-success.disabled,
+.btn-success[disabled],
+fieldset[disabled] .btn-success,
+.btn-success.disabled:hover,
+.btn-success[disabled]:hover,
+fieldset[disabled] .btn-success:hover,
+.btn-success.disabled:focus,
+.btn-success[disabled]:focus,
+fieldset[disabled] .btn-success:focus,
+.btn-success.disabled.focus,
+.btn-success[disabled].focus,
+fieldset[disabled] .btn-success.focus,
+.btn-success.disabled:active,
+.btn-success[disabled]:active,
+fieldset[disabled] .btn-success:active,
+.btn-success.disabled.active,
+.btn-success[disabled].active,
+fieldset[disabled] .btn-success.active {
+ background-color: #5cb85c;
+ border-color: #4cae4c;
+}
+.btn-success .badge {
+ color: #5cb85c;
+ background-color: #fff;
+}
+.btn-info {
+ color: #fff;
+ background-color: #5bc0de;
+ border-color: #46b8da;
+}
+.btn-info:focus,
+.btn-info.focus {
+ color: #fff;
+ background-color: #31b0d5;
+ border-color: #1b6d85;
+}
+.btn-info:hover {
+ color: #fff;
+ background-color: #31b0d5;
+ border-color: #269abc;
+}
+.btn-info:active,
+.btn-info.active,
+.open > .dropdown-toggle.btn-info {
+ color: #fff;
+ background-color: #31b0d5;
+ border-color: #269abc;
+}
+.btn-info:active:hover,
+.btn-info.active:hover,
+.open > .dropdown-toggle.btn-info:hover,
+.btn-info:active:focus,
+.btn-info.active:focus,
+.open > .dropdown-toggle.btn-info:focus,
+.btn-info:active.focus,
+.btn-info.active.focus,
+.open > .dropdown-toggle.btn-info.focus {
+ color: #fff;
+ background-color: #269abc;
+ border-color: #1b6d85;
+}
+.btn-info:active,
+.btn-info.active,
+.open > .dropdown-toggle.btn-info {
+ background-image: none;
+}
+.btn-info.disabled,
+.btn-info[disabled],
+fieldset[disabled] .btn-info,
+.btn-info.disabled:hover,
+.btn-info[disabled]:hover,
+fieldset[disabled] .btn-info:hover,
+.btn-info.disabled:focus,
+.btn-info[disabled]:focus,
+fieldset[disabled] .btn-info:focus,
+.btn-info.disabled.focus,
+.btn-info[disabled].focus,
+fieldset[disabled] .btn-info.focus,
+.btn-info.disabled:active,
+.btn-info[disabled]:active,
+fieldset[disabled] .btn-info:active,
+.btn-info.disabled.active,
+.btn-info[disabled].active,
+fieldset[disabled] .btn-info.active {
+ background-color: #5bc0de;
+ border-color: #46b8da;
+}
+.btn-info .badge {
+ color: #5bc0de;
+ background-color: #fff;
+}
+.btn-warning {
+ color: #fff;
+ background-color: #f0ad4e;
+ border-color: #eea236;
+}
+.btn-warning:focus,
+.btn-warning.focus {
+ color: #fff;
+ background-color: #ec971f;
+ border-color: #985f0d;
+}
+.btn-warning:hover {
+ color: #fff;
+ background-color: #ec971f;
+ border-color: #d58512;
+}
+.btn-warning:active,
+.btn-warning.active,
+.open > .dropdown-toggle.btn-warning {
+ color: #fff;
+ background-color: #ec971f;
+ border-color: #d58512;
+}
+.btn-warning:active:hover,
+.btn-warning.active:hover,
+.open > .dropdown-toggle.btn-warning:hover,
+.btn-warning:active:focus,
+.btn-warning.active:focus,
+.open > .dropdown-toggle.btn-warning:focus,
+.btn-warning:active.focus,
+.btn-warning.active.focus,
+.open > .dropdown-toggle.btn-warning.focus {
+ color: #fff;
+ background-color: #d58512;
+ border-color: #985f0d;
+}
+.btn-warning:active,
+.btn-warning.active,
+.open > .dropdown-toggle.btn-warning {
+ background-image: none;
+}
+.btn-warning.disabled,
+.btn-warning[disabled],
+fieldset[disabled] .btn-warning,
+.btn-warning.disabled:hover,
+.btn-warning[disabled]:hover,
+fieldset[disabled] .btn-warning:hover,
+.btn-warning.disabled:focus,
+.btn-warning[disabled]:focus,
+fieldset[disabled] .btn-warning:focus,
+.btn-warning.disabled.focus,
+.btn-warning[disabled].focus,
+fieldset[disabled] .btn-warning.focus,
+.btn-warning.disabled:active,
+.btn-warning[disabled]:active,
+fieldset[disabled] .btn-warning:active,
+.btn-warning.disabled.active,
+.btn-warning[disabled].active,
+fieldset[disabled] .btn-warning.active {
+ background-color: #f0ad4e;
+ border-color: #eea236;
+}
+.btn-warning .badge {
+ color: #f0ad4e;
+ background-color: #fff;
+}
+.btn-danger {
+ color: #fff;
+ background-color: #d9534f;
+ border-color: #d43f3a;
+}
+.btn-danger:focus,
+.btn-danger.focus {
+ color: #fff;
+ background-color: #c9302c;
+ border-color: #761c19;
+}
+.btn-danger:hover {
+ color: #fff;
+ background-color: #c9302c;
+ border-color: #ac2925;
+}
+.btn-danger:active,
+.btn-danger.active,
+.open > .dropdown-toggle.btn-danger {
+ color: #fff;
+ background-color: #c9302c;
+ border-color: #ac2925;
+}
+.btn-danger:active:hover,
+.btn-danger.active:hover,
+.open > .dropdown-toggle.btn-danger:hover,
+.btn-danger:active:focus,
+.btn-danger.active:focus,
+.open > .dropdown-toggle.btn-danger:focus,
+.btn-danger:active.focus,
+.btn-danger.active.focus,
+.open > .dropdown-toggle.btn-danger.focus {
+ color: #fff;
+ background-color: #ac2925;
+ border-color: #761c19;
+}
+.btn-danger:active,
+.btn-danger.active,
+.open > .dropdown-toggle.btn-danger {
+ background-image: none;
+}
+.btn-danger.disabled,
+.btn-danger[disabled],
+fieldset[disabled] .btn-danger,
+.btn-danger.disabled:hover,
+.btn-danger[disabled]:hover,
+fieldset[disabled] .btn-danger:hover,
+.btn-danger.disabled:focus,
+.btn-danger[disabled]:focus,
+fieldset[disabled] .btn-danger:focus,
+.btn-danger.disabled.focus,
+.btn-danger[disabled].focus,
+fieldset[disabled] .btn-danger.focus,
+.btn-danger.disabled:active,
+.btn-danger[disabled]:active,
+fieldset[disabled] .btn-danger:active,
+.btn-danger.disabled.active,
+.btn-danger[disabled].active,
+fieldset[disabled] .btn-danger.active {
+ background-color: #d9534f;
+ border-color: #d43f3a;
+}
+.btn-danger .badge {
+ color: #d9534f;
+ background-color: #fff;
+}
+.btn-link {
+ font-weight: normal;
+ color: #337ab7;
+ border-radius: 0;
+}
+.btn-link,
+.btn-link:active,
+.btn-link.active,
+.btn-link[disabled],
+fieldset[disabled] .btn-link {
+ background-color: transparent;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.btn-link,
+.btn-link:hover,
+.btn-link:focus,
+.btn-link:active {
+ border-color: transparent;
+}
+.btn-link:hover,
+.btn-link:focus {
+ color: #23527c;
+ text-decoration: underline;
+ background-color: transparent;
+}
+.btn-link[disabled]:hover,
+fieldset[disabled] .btn-link:hover,
+.btn-link[disabled]:focus,
+fieldset[disabled] .btn-link:focus {
+ color: #777;
+ text-decoration: none;
+}
+.btn-lg,
+.btn-group-lg > .btn {
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.3333333;
+ border-radius: 6px;
+}
+.btn-sm,
+.btn-group-sm > .btn {
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+.btn-xs,
+.btn-group-xs > .btn {
+ padding: 1px 5px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+.btn-block {
+ display: block;
+ width: 100%;
+}
+.btn-block + .btn-block {
+ margin-top: 5px;
+}
+input[type="submit"].btn-block,
+input[type="reset"].btn-block,
+input[type="button"].btn-block {
+ width: 100%;
+}
+.close {
+ float: right;
+ font-size: 21px;
+ font-weight: bold;
+ line-height: 1;
+ color: #000;
+ text-shadow: 0 1px 0 #fff;
+ filter: alpha(opacity=20);
+ opacity: .2;
+}
+.close:hover,
+.close:focus {
+ color: #000;
+ text-decoration: none;
+ cursor: pointer;
+ filter: alpha(opacity=50);
+ opacity: .5;
+}
+button.close {
+ -webkit-appearance: none;
+ padding: 0;
+ cursor: pointer;
+ background: transparent;
+ border: 0;
+}
\ No newline at end of file
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/styles/menus/jquery-ui.css b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/styles/menus/jquery-ui.css
new file mode 100644
index 0000000..46920ae
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/styles/menus/jquery-ui.css
@@ -0,0 +1,1227 @@
+/*! jQuery UI - v1.11.4 - 2015-06-30
+* http://jqueryui.com
+* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css
+* To view and modify this theme, visit http://jqueryui.com/themeroller/
+* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden {
+ display: none;
+}
+.ui-helper-hidden-accessible {
+ border: 0;
+ clip: rect(0 0 0 0);
+ height: 1px;
+ margin: -1px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ width: 1px;
+}
+.ui-helper-reset {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ outline: 0;
+ line-height: 1.3;
+ text-decoration: none;
+ font-size: 100%;
+ list-style: none;
+}
+.ui-helper-clearfix:before,
+.ui-helper-clearfix:after {
+ content: "";
+ display: table;
+ border-collapse: collapse;
+}
+.ui-helper-clearfix:after {
+ clear: both;
+}
+.ui-helper-clearfix {
+ min-height: 0; /* support: IE7 */
+}
+.ui-helper-zfix {
+ width: 100%;
+ height: 100%;
+ top: 0;
+ left: 0;
+ position: absolute;
+ opacity: 0;
+ filter:Alpha(Opacity=0); /* support: IE8 */
+}
+
+.ui-front {
+ z-index: 100;
+}
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled {
+ cursor: default !important;
+}
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon {
+ display: block;
+ text-indent: -99999px;
+ overflow: hidden;
+ background-repeat: no-repeat;
+}
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+}
+.ui-draggable-handle {
+ -ms-touch-action: none;
+ touch-action: none;
+}
+.ui-resizable {
+ position: relative;
+}
+.ui-resizable-handle {
+ position: absolute;
+ font-size: 0.1px;
+ display: block;
+ -ms-touch-action: none;
+ touch-action: none;
+}
+.ui-resizable-disabled .ui-resizable-handle,
+.ui-resizable-autohide .ui-resizable-handle {
+ display: none;
+}
+.ui-resizable-n {
+ cursor: n-resize;
+ height: 7px;
+ width: 100%;
+ top: -5px;
+ left: 0;
+}
+.ui-resizable-s {
+ cursor: s-resize;
+ height: 7px;
+ width: 100%;
+ bottom: -5px;
+ left: 0;
+}
+.ui-resizable-e {
+ cursor: e-resize;
+ width: 7px;
+ right: -5px;
+ top: 0;
+ height: 100%;
+}
+.ui-resizable-w {
+ cursor: w-resize;
+ width: 7px;
+ left: -5px;
+ top: 0;
+ height: 100%;
+}
+.ui-resizable-se {
+ cursor: se-resize;
+ width: 12px;
+ height: 12px;
+ right: 1px;
+ bottom: 1px;
+}
+.ui-resizable-sw {
+ cursor: sw-resize;
+ width: 9px;
+ height: 9px;
+ left: -5px;
+ bottom: -5px;
+}
+.ui-resizable-nw {
+ cursor: nw-resize;
+ width: 9px;
+ height: 9px;
+ left: -5px;
+ top: -5px;
+}
+.ui-resizable-ne {
+ cursor: ne-resize;
+ width: 9px;
+ height: 9px;
+ right: -5px;
+ top: -5px;
+}
+.ui-selectable {
+ -ms-touch-action: none;
+ touch-action: none;
+}
+.ui-selectable-helper {
+ position: absolute;
+ z-index: 100;
+ border: 1px dotted black;
+}
+.ui-sortable-handle {
+ -ms-touch-action: none;
+ touch-action: none;
+}
+.ui-accordion .ui-accordion-header {
+ display: block;
+ cursor: pointer;
+ position: relative;
+ margin: 2px 0 0 0;
+ padding: .5em .5em .5em .7em;
+ min-height: 0; /* support: IE7 */
+ font-size: 100%;
+}
+.ui-accordion .ui-accordion-icons {
+ padding-left: 2.2em;
+}
+.ui-accordion .ui-accordion-icons .ui-accordion-icons {
+ padding-left: 2.2em;
+}
+.ui-accordion .ui-accordion-header .ui-accordion-header-icon {
+ position: absolute;
+ left: .5em;
+ top: 50%;
+ margin-top: -8px;
+}
+.ui-accordion .ui-accordion-content {
+ padding: 1em 2.2em;
+ border-top: 0;
+ overflow: auto;
+}
+.ui-autocomplete {
+ position: absolute;
+ top: 0;
+ left: 0;
+ cursor: default;
+}
+.ui-button {
+ display: inline-block;
+ position: relative;
+ padding: 0;
+ line-height: normal;
+ margin-right: .1em;
+ cursor: pointer;
+ vertical-align: middle;
+ text-align: center;
+ overflow: visible; /* removes extra width in IE */
+}
+.ui-button,
+.ui-button:link,
+.ui-button:visited,
+.ui-button:hover,
+.ui-button:active {
+ text-decoration: none;
+}
+/* to make room for the icon, a width needs to be set here */
+.ui-button-icon-only {
+ width: 2.2em;
+}
+/* button elements seem to need a little more width */
+button.ui-button-icon-only {
+ width: 2.4em;
+}
+.ui-button-icons-only {
+ width: 3.4em;
+}
+button.ui-button-icons-only {
+ width: 3.7em;
+}
+
+/* button text element */
+.ui-button .ui-button-text {
+ display: block;
+ line-height: normal;
+}
+.ui-button-text-only .ui-button-text {
+ padding: .4em 1em;
+}
+.ui-button-icon-only .ui-button-text,
+.ui-button-icons-only .ui-button-text {
+ padding: .4em;
+ text-indent: -9999999px;
+}
+.ui-button-text-icon-primary .ui-button-text,
+.ui-button-text-icons .ui-button-text {
+ padding: .4em 1em .4em 2.1em;
+}
+.ui-button-text-icon-secondary .ui-button-text,
+.ui-button-text-icons .ui-button-text {
+ padding: .4em 2.1em .4em 1em;
+}
+.ui-button-text-icons .ui-button-text {
+ padding-left: 2.1em;
+ padding-right: 2.1em;
+}
+/* no icon support for input elements, provide padding by default */
+input.ui-button {
+ padding: .4em 1em;
+}
+
+/* button icon element(s) */
+.ui-button-icon-only .ui-icon,
+.ui-button-text-icon-primary .ui-icon,
+.ui-button-text-icon-secondary .ui-icon,
+.ui-button-text-icons .ui-icon,
+.ui-button-icons-only .ui-icon {
+ position: absolute;
+ top: 50%;
+ margin-top: -8px;
+}
+.ui-button-icon-only .ui-icon {
+ left: 50%;
+ margin-left: -8px;
+}
+.ui-button-text-icon-primary .ui-button-icon-primary,
+.ui-button-text-icons .ui-button-icon-primary,
+.ui-button-icons-only .ui-button-icon-primary {
+ left: .5em;
+}
+.ui-button-text-icon-secondary .ui-button-icon-secondary,
+.ui-button-text-icons .ui-button-icon-secondary,
+.ui-button-icons-only .ui-button-icon-secondary {
+ right: .5em;
+}
+
+/* button sets */
+.ui-buttonset {
+ margin-right: 7px;
+}
+.ui-buttonset .ui-button {
+ margin-left: 0;
+ margin-right: -.3em;
+}
+
+/* workarounds */
+/* reset extra padding in Firefox, see h5bp.com/l */
+input.ui-button::-moz-focus-inner,
+button.ui-button::-moz-focus-inner {
+ border: 0;
+ padding: 0;
+}
+.ui-datepicker {
+ width: 17em;
+ padding: .2em .2em 0;
+ display: none;
+}
+.ui-datepicker .ui-datepicker-header {
+ position: relative;
+ padding: .2em 0;
+}
+.ui-datepicker .ui-datepicker-prev,
+.ui-datepicker .ui-datepicker-next {
+ position: absolute;
+ top: 2px;
+ width: 1.8em;
+ height: 1.8em;
+}
+.ui-datepicker .ui-datepicker-prev-hover,
+.ui-datepicker .ui-datepicker-next-hover {
+ top: 1px;
+}
+.ui-datepicker .ui-datepicker-prev {
+ left: 2px;
+}
+.ui-datepicker .ui-datepicker-next {
+ right: 2px;
+}
+.ui-datepicker .ui-datepicker-prev-hover {
+ left: 1px;
+}
+.ui-datepicker .ui-datepicker-next-hover {
+ right: 1px;
+}
+.ui-datepicker .ui-datepicker-prev span,
+.ui-datepicker .ui-datepicker-next span {
+ display: block;
+ position: absolute;
+ left: 50%;
+ margin-left: -8px;
+ top: 50%;
+ margin-top: -8px;
+}
+.ui-datepicker .ui-datepicker-title {
+ margin: 0 2.3em;
+ line-height: 1.8em;
+ text-align: center;
+}
+.ui-datepicker .ui-datepicker-title select {
+ font-size: 1em;
+ margin: 1px 0;
+}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year {
+ width: 45%;
+}
+.ui-datepicker table {
+ width: 100%;
+ font-size: .9em;
+ border-collapse: collapse;
+ margin: 0 0 .4em;
+}
+.ui-datepicker th {
+ padding: .7em .3em;
+ text-align: center;
+ font-weight: bold;
+ border: 0;
+}
+.ui-datepicker td {
+ border: 0;
+ padding: 1px;
+}
+.ui-datepicker td span,
+.ui-datepicker td a {
+ display: block;
+ padding: .2em;
+ text-align: right;
+ text-decoration: none;
+}
+.ui-datepicker .ui-datepicker-buttonpane {
+ background-image: none;
+ margin: .7em 0 0 0;
+ padding: 0 .2em;
+ border-left: 0;
+ border-right: 0;
+ border-bottom: 0;
+}
+.ui-datepicker .ui-datepicker-buttonpane button {
+ float: right;
+ margin: .5em .2em .4em;
+ cursor: pointer;
+ padding: .2em .6em .3em .6em;
+ width: auto;
+ overflow: visible;
+}
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
+ float: left;
+}
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi {
+ width: auto;
+}
+.ui-datepicker-multi .ui-datepicker-group {
+ float: left;
+}
+.ui-datepicker-multi .ui-datepicker-group table {
+ width: 95%;
+ margin: 0 auto .4em;
+}
+.ui-datepicker-multi-2 .ui-datepicker-group {
+ width: 50%;
+}
+.ui-datepicker-multi-3 .ui-datepicker-group {
+ width: 33.3%;
+}
+.ui-datepicker-multi-4 .ui-datepicker-group {
+ width: 25%;
+}
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
+ border-left-width: 0;
+}
+.ui-datepicker-multi .ui-datepicker-buttonpane {
+ clear: left;
+}
+.ui-datepicker-row-break {
+ clear: both;
+ width: 100%;
+ font-size: 0;
+}
+
+/* RTL support */
+.ui-datepicker-rtl {
+ direction: rtl;
+}
+.ui-datepicker-rtl .ui-datepicker-prev {
+ right: 2px;
+ left: auto;
+}
+.ui-datepicker-rtl .ui-datepicker-next {
+ left: 2px;
+ right: auto;
+}
+.ui-datepicker-rtl .ui-datepicker-prev:hover {
+ right: 1px;
+ left: auto;
+}
+.ui-datepicker-rtl .ui-datepicker-next:hover {
+ left: 1px;
+ right: auto;
+}
+.ui-datepicker-rtl .ui-datepicker-buttonpane {
+ clear: right;
+}
+.ui-datepicker-rtl .ui-datepicker-buttonpane button {
+ float: left;
+}
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
+.ui-datepicker-rtl .ui-datepicker-group {
+ float: right;
+}
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
+ border-right-width: 0;
+ border-left-width: 1px;
+}
+.ui-dialog {
+ overflow: hidden;
+ position: absolute;
+ top: 0;
+ left: 0;
+ padding: .2em;
+ outline: 0;
+}
+.ui-dialog .ui-dialog-titlebar {
+ padding: .4em 1em;
+ position: relative;
+}
+.ui-dialog .ui-dialog-title {
+ float: left;
+ margin: .1em 0;
+ white-space: nowrap;
+ width: 90%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+.ui-dialog .ui-dialog-titlebar-close {
+ position: absolute;
+ right: .3em;
+ top: 50%;
+ width: 20px;
+ margin: -10px 0 0 0;
+ padding: 1px;
+ height: 20px;
+}
+.ui-dialog .ui-dialog-content {
+ position: relative;
+ border: 0;
+ padding: .5em 1em;
+ background: none;
+ overflow: auto;
+}
+.ui-dialog .ui-dialog-buttonpane {
+ text-align: left;
+ border-width: 1px 0 0 0;
+ background-image: none;
+ margin-top: .5em;
+ padding: .3em 1em .5em .4em;
+}
+.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
+ float: right;
+}
+.ui-dialog .ui-dialog-buttonpane button {
+ margin: .5em .4em .5em 0;
+ cursor: pointer;
+}
+.ui-dialog .ui-resizable-se {
+ width: 12px;
+ height: 12px;
+ right: -5px;
+ bottom: -5px;
+ background-position: 16px 16px;
+}
+.ui-draggable .ui-dialog-titlebar {
+ cursor: move;
+}
+.ui-menu {
+ list-style: none;
+ padding: 0;
+ margin: 0;
+ display: block;
+ outline: none;
+}
+.ui-menu .ui-menu {
+ position: absolute;
+}
+.ui-menu .ui-menu-item {
+ position: relative;
+ margin: 0;
+ padding: 3px 1em 3px .4em;
+ cursor: pointer;
+ min-height: 0; /* support: IE7 */
+ /* support: IE10, see #8844 */
+ list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
+}
+.ui-menu .ui-menu-divider {
+ margin: 5px 0;
+ height: 0;
+ font-size: 0;
+ line-height: 0;
+ border-width: 1px 0 0 0;
+}
+.ui-menu .ui-state-focus,
+.ui-menu .ui-state-active {
+ margin: -1px;
+}
+
+/* icon support */
+.ui-menu-icons {
+ position: relative;
+}
+.ui-menu-icons .ui-menu-item {
+ padding-left: 2em;
+}
+
+/* left-aligned */
+.ui-menu .ui-icon {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: .2em;
+ margin: auto 0;
+}
+
+/* right-aligned */
+.ui-menu .ui-menu-icon {
+ left: auto;
+ right: 0;
+}
+.ui-progressbar {
+ height: 2em;
+ text-align: left;
+ overflow: hidden;
+}
+.ui-progressbar .ui-progressbar-value {
+ margin: -1px;
+ height: 100%;
+}
+.ui-progressbar .ui-progressbar-overlay {
+ background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");
+ height: 100%;
+ filter: alpha(opacity=25); /* support: IE8 */
+ opacity: 0.25;
+}
+.ui-progressbar-indeterminate .ui-progressbar-value {
+ background-image: none;
+}
+.ui-selectmenu-menu {
+ padding: 0;
+ margin: 0;
+ position: absolute;
+ top: 0;
+ left: 0;
+ display: none;
+ z-index:100000
+}
+.ui-selectmenu-menu .ui-menu {
+ overflow: auto;
+ /* Support: IE7 */
+ overflow-x: hidden;
+ padding-bottom: 1px;
+}
+.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup {
+ font-size: 1em;
+ font-weight: bold;
+ line-height: 1.5;
+ padding: 2px 0.4em;
+ margin: 0.5em 0 0 0;
+ height: auto;
+ border: 0;
+}
+.ui-selectmenu-open {
+ display: block;
+}
+.ui-selectmenu-button {
+ display: inline-block;
+ overflow: hidden;
+ position: relative;
+ text-decoration: none;
+ cursor: pointer;
+}
+.ui-selectmenu-button span.ui-icon {
+ right: 0.5em;
+ left: auto;
+ margin-top: -8px;
+ position: absolute;
+ top: 50%;
+}
+.ui-selectmenu-button span.ui-selectmenu-text {
+ text-align: left;
+ padding: 0.4em 2.1em 0.4em 1em;
+ display: block;
+ line-height: 1.4;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+.ui-slider {
+ position: relative;
+ text-align: left;
+}
+.ui-slider .ui-slider-handle {
+ position: absolute;
+ z-index: 2;
+ width: 1.2em;
+ height: 1.2em;
+ cursor: default;
+ -ms-touch-action: none;
+ touch-action: none;
+}
+.ui-slider .ui-slider-range {
+ position: absolute;
+ z-index: 1;
+ font-size: .7em;
+ display: block;
+ border: 0;
+ background-position: 0 0;
+}
+
+/* support: IE8 - See #6727 */
+.ui-slider.ui-state-disabled .ui-slider-handle,
+.ui-slider.ui-state-disabled .ui-slider-range {
+ filter: inherit;
+}
+
+.ui-slider-horizontal {
+ height: .8em;
+}
+.ui-slider-horizontal .ui-slider-handle {
+ top: -.3em;
+ margin-left: -.6em;
+}
+.ui-slider-horizontal .ui-slider-range {
+ top: 0;
+ height: 100%;
+}
+.ui-slider-horizontal .ui-slider-range-min {
+ left: 0;
+}
+.ui-slider-horizontal .ui-slider-range-max {
+ right: 0;
+}
+
+.ui-slider-vertical {
+ width: .8em;
+ height: 100px;
+}
+.ui-slider-vertical .ui-slider-handle {
+ left: -.3em;
+ margin-left: 0;
+ margin-bottom: -.6em;
+}
+.ui-slider-vertical .ui-slider-range {
+ left: 0;
+ width: 100%;
+}
+.ui-slider-vertical .ui-slider-range-min {
+ bottom: 0;
+}
+.ui-slider-vertical .ui-slider-range-max {
+ top: 0;
+}
+.ui-spinner {
+ position: relative;
+ display: inline-block;
+ overflow: hidden;
+ padding: 0;
+ vertical-align: middle;
+}
+.ui-spinner-input {
+ border: none;
+ background: none;
+ color: inherit;
+ padding: 0;
+ margin: .2em 0;
+ vertical-align: middle;
+ margin-left: .4em;
+ margin-right: 22px;
+}
+.ui-spinner-button {
+ width: 16px;
+ height: 50%;
+ font-size: .5em;
+ padding: 0;
+ margin: 0;
+ text-align: center;
+ position: absolute;
+ cursor: default;
+ display: block;
+ overflow: hidden;
+ right: 0;
+}
+/* more specificity required here to override default borders */
+.ui-spinner a.ui-spinner-button {
+ border-top: none;
+ border-bottom: none;
+ border-right: none;
+}
+/* vertically center icon */
+.ui-spinner .ui-icon {
+ position: absolute;
+ margin-top: -8px;
+ top: 50%;
+ left: 0;
+}
+.ui-spinner-up {
+ top: 0;
+}
+.ui-spinner-down {
+ bottom: 0;
+}
+
+/* TR overrides */
+.ui-spinner .ui-icon-triangle-1-s {
+ /* need to fix icons sprite */
+ background-position: -65px -16px;
+}
+.ui-tabs {
+ position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
+ padding: .2em;
+}
+.ui-tabs .ui-tabs-nav {
+ margin: 0;
+ padding: .2em .2em 0;
+}
+.ui-tabs .ui-tabs-nav li {
+ list-style: none;
+ float: left;
+ position: relative;
+ top: 0;
+ margin: 1px .2em 0 0;
+ border-bottom-width: 0;
+ padding: 0;
+ white-space: nowrap;
+}
+.ui-tabs .ui-tabs-nav .ui-tabs-anchor {
+ float: left;
+ padding: .5em 1em;
+ text-decoration: none;
+}
+.ui-tabs .ui-tabs-nav li.ui-tabs-active {
+ margin-bottom: -1px;
+ padding-bottom: 1px;
+}
+.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
+.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
+.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
+ cursor: text;
+}
+.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
+ cursor: pointer;
+}
+.ui-tabs .ui-tabs-panel {
+ display: block;
+ border-width: 0;
+ padding: 1em 1.4em;
+ background: none;
+}
+.ui-tooltip {
+ padding: 8px;
+ position: absolute;
+ z-index: 9999;
+ max-width: 300px;
+ -webkit-box-shadow: 0 0 5px #aaa;
+ box-shadow: 0 0 5px #aaa;
+}
+body .ui-tooltip {
+ border-width: 2px;
+}
+
+/* Component containers
+----------------------------------*/
+.ui-widget {
+ font-family: Verdana,Arial,sans-serif;
+ font-size: 1.1em;
+}
+.ui-widget .ui-widget {
+ font-size: 1em;
+}
+.ui-widget input,
+.ui-widget select,
+.ui-widget textarea,
+.ui-widget button {
+ font-family: Verdana,Arial,sans-serif;
+ font-size: 1em;
+}
+.ui-widget-content {
+ border: 1px solid #aaaaaa;
+ background: #ffffff url("../../images/menus/ui-bg_flat_75_ffffff_40x100.png") 50% 50% repeat-x;
+ color: #222222;
+ z-index:99999;
+}
+.ui-widget-content a {
+ color: #222222;
+}
+.ui-widget-header {
+ border: 1px solid #aaaaaa;
+ background: #cccccc url("../../images/menus/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;
+ color: #222222;
+ font-weight: bold;
+}
+.ui-widget-header a {
+ color: #222222;
+}
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default,
+.ui-widget-content .ui-state-default,
+.ui-widget-header .ui-state-default {
+ border: 1px solid #d3d3d3;
+ background: #e6e6e6 url("../../images/menus/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;
+ font-weight: normal;
+ color: #555555;
+}
+.ui-state-default a,
+.ui-state-default a:link,
+.ui-state-default a:visited {
+ color: #555555;
+ text-decoration: none;
+}
+.ui-state-hover,
+.ui-widget-content .ui-state-hover,
+.ui-widget-header .ui-state-hover,
+.ui-state-focus,
+.ui-widget-content .ui-state-focus,
+.ui-widget-header .ui-state-focus {
+ border: 1px solid #999999;
+ background: #dadada url("../../images/menus/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;
+ font-weight: normal;
+ color: #212121;
+}
+.ui-state-hover a,
+.ui-state-hover a:hover,
+.ui-state-hover a:link,
+.ui-state-hover a:visited,
+.ui-state-focus a,
+.ui-state-focus a:hover,
+.ui-state-focus a:link,
+.ui-state-focus a:visited {
+ color: #212121;
+ text-decoration: none;
+}
+.ui-state-active,
+.ui-widget-content .ui-state-active,
+.ui-widget-header .ui-state-active {
+ border: 1px solid #aaaaaa;
+ background: #ffffff url("../../images/menus/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;
+ font-weight: normal;
+ color: #212121;
+}
+.ui-state-active a,
+.ui-state-active a:link,
+.ui-state-active a:visited {
+ color: #212121;
+ text-decoration: none;
+}
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight,
+.ui-widget-content .ui-state-highlight,
+.ui-widget-header .ui-state-highlight {
+ border: 1px solid #fcefa1;
+ background: #fbf9ee url("../../images/menus/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;
+ color: #363636;
+}
+.ui-state-highlight a,
+.ui-widget-content .ui-state-highlight a,
+.ui-widget-header .ui-state-highlight a {
+ color: #363636;
+}
+.ui-state-error,
+.ui-widget-content .ui-state-error,
+.ui-widget-header .ui-state-error {
+ border: 1px solid #cd0a0a;
+ background: #fef1ec url("../../images/menus/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;
+ color: #cd0a0a;
+}
+.ui-state-error a,
+.ui-widget-content .ui-state-error a,
+.ui-widget-header .ui-state-error a {
+ color: #cd0a0a;
+}
+.ui-state-error-text,
+.ui-widget-content .ui-state-error-text,
+.ui-widget-header .ui-state-error-text {
+ color: #cd0a0a;
+}
+.ui-priority-primary,
+.ui-widget-content .ui-priority-primary,
+.ui-widget-header .ui-priority-primary {
+ font-weight: bold;
+}
+.ui-priority-secondary,
+.ui-widget-content .ui-priority-secondary,
+.ui-widget-header .ui-priority-secondary {
+ opacity: .7;
+ filter:Alpha(Opacity=70); /* support: IE8 */
+ font-weight: normal;
+}
+.ui-state-disabled,
+.ui-widget-content .ui-state-disabled,
+.ui-widget-header .ui-state-disabled {
+ opacity: .35;
+ filter:Alpha(Opacity=35); /* support: IE8 */
+ background-image: none;
+}
+.ui-state-disabled .ui-icon {
+ filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
+}
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon {
+ width: 16px;
+ height: 16px;
+}
+.ui-icon,
+.ui-widget-content .ui-icon {
+ background-image: url("../../images/menus/ui-icons_222222_256x240.png");
+}
+.ui-widget-header .ui-icon {
+ background-image: url("../../images/menus/ui-icons_222222_256x240.png");
+}
+.ui-state-default .ui-icon {
+ background-image: url("../../images/menus/ui-icons_888888_256x240.png");
+}
+.ui-state-hover .ui-icon,
+.ui-state-focus .ui-icon {
+ background-image: url("../../images/menus/ui-icons_454545_256x240.png");
+}
+.ui-state-active .ui-icon {
+ background-image: url("../../images/menus/ui-icons_454545_256x240.png");
+}
+.ui-state-highlight .ui-icon {
+ background-image: url("../../images/menus/ui-icons_2e83ff_256x240.png");
+}
+.ui-state-error .ui-icon,
+.ui-state-error-text .ui-icon {
+ background-image: url("../../images/menus/ui-icons_cd0a0a_256x240.png");
+}
+
+/* positioning */
+.ui-icon-blank { background-position: 16px 16px; }
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-on { background-position: -96px -144px; }
+.ui-icon-radio-off { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-all,
+.ui-corner-top,
+.ui-corner-left,
+.ui-corner-tl {
+ border-top-left-radius: 4px;
+}
+.ui-corner-all,
+.ui-corner-top,
+.ui-corner-right,
+.ui-corner-tr {
+ border-top-right-radius: 4px;
+}
+.ui-corner-all,
+.ui-corner-bottom,
+.ui-corner-left,
+.ui-corner-bl {
+ border-bottom-left-radius: 4px;
+}
+.ui-corner-all,
+.ui-corner-bottom,
+.ui-corner-right,
+.ui-corner-br {
+ border-bottom-right-radius: 4px;
+}
+
+/* Overlays */
+.ui-widget-overlay {
+ background: #aaaaaa url("../../images/menus/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;
+ opacity: .3;
+ filter: Alpha(Opacity=30); /* support: IE8 */
+}
+.ui-widget-shadow {
+ margin: -8px 0 0 -8px;
+ padding: 8px;
+ background: #aaaaaa url("../../images/menus/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;
+ opacity: .3;
+ filter: Alpha(Opacity=30); /* support: IE8 */
+ border-radius: 8px;
+}
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/styles/menus/tooltipster.css b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/styles/menus/tooltipster.css
new file mode 100644
index 0000000..c9fae2d
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/styles/menus/tooltipster.css
@@ -0,0 +1,294 @@
+/* This is the default Tooltipster theme (feel free to modify or duplicate and create multiple themes!): */
+.tooltipster-default {
+ border-radius: 5px;
+ border: 2px solid #000;
+ background: #4c4c4c;
+ color: #fff;
+}
+
+/* Use this next selector to style things like font-size and line-height: */
+.tooltipster-default .tooltipster-content {
+ font-family: Arial, sans-serif;
+ font-size: 14px;
+ line-height: 16px;
+ padding: 8px 10px;
+ /*overflow: hidden;*/
+}
+
+/* This next selector defines the color of the border on the outside of the arrow. This will automatically match the color and size of the border set on the main tooltip styles. Set display: none; if you would like a border around the tooltip but no border around the arrow */
+.tooltipster-default .tooltipster-arrow .tooltipster-arrow-border {
+ /* border-color: ... !important; */
+}
+
+
+/* If you're using the icon option, use this next selector to style them */
+.tooltipster-icon {
+ cursor: help;
+ margin-left: 4px;
+}
+
+
+
+
+
+
+
+
+
+/* This is the base styling required to make all Tooltipsters work */
+.tooltipster-base {
+ padding: 0;
+ font-size: 0;
+ line-height: 0;
+ position: absolute;
+ left: 0;
+ top: 0;
+ z-index: 9999999;
+ pointer-events: none;
+ width: auto;
+ overflow: visible;
+}
+.tooltipster-base .tooltipster-content {
+ /*overflow: hidden;*/
+}
+
+
+/* These next classes handle the styles for the little arrow attached to the tooltip. By default, the arrow will inherit the same colors and border as what is set on the main tooltip itself. */
+.tooltipster-arrow {
+ display: block;
+ text-align: center;
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: -1;
+}
+.tooltipster-arrow span, .tooltipster-arrow-border {
+ display: block;
+ width: 0;
+ height: 0;
+ position: absolute;
+}
+.tooltipster-arrow-top span, .tooltipster-arrow-top-right span, .tooltipster-arrow-top-left span {
+ border-left: 8px solid transparent !important;
+ border-right: 8px solid transparent !important;
+ border-top: 8px solid;
+ bottom: -7px;
+}
+.tooltipster-arrow-top .tooltipster-arrow-border, .tooltipster-arrow-top-right .tooltipster-arrow-border, .tooltipster-arrow-top-left .tooltipster-arrow-border {
+ border-left: 9px solid transparent !important;
+ border-right: 9px solid transparent !important;
+ border-top: 9px solid;
+ bottom: -7px;
+}
+
+.tooltipster-arrow-bottom span, .tooltipster-arrow-bottom-right span, .tooltipster-arrow-bottom-left span {
+ border-left: 8px solid transparent !important;
+ border-right: 8px solid transparent !important;
+ border-bottom: 8px solid;
+ top: -7px;
+}
+.tooltipster-arrow-bottom .tooltipster-arrow-border, .tooltipster-arrow-bottom-right .tooltipster-arrow-border, .tooltipster-arrow-bottom-left .tooltipster-arrow-border {
+ border-left: 9px solid transparent !important;
+ border-right: 9px solid transparent !important;
+ border-bottom: 9px solid;
+ top: -7px;
+}
+.tooltipster-arrow-top span, .tooltipster-arrow-top .tooltipster-arrow-border, .tooltipster-arrow-bottom span, .tooltipster-arrow-bottom .tooltipster-arrow-border {
+ left: 0;
+ right: 0;
+ margin: 0 auto;
+}
+.tooltipster-arrow-top-left span, .tooltipster-arrow-bottom-left span {
+ left: 6px;
+}
+.tooltipster-arrow-top-left .tooltipster-arrow-border, .tooltipster-arrow-bottom-left .tooltipster-arrow-border {
+ left: 5px;
+}
+.tooltipster-arrow-top-right span, .tooltipster-arrow-bottom-right span {
+ right: 6px;
+}
+.tooltipster-arrow-top-right .tooltipster-arrow-border, .tooltipster-arrow-bottom-right .tooltipster-arrow-border {
+ right: 5px;
+}
+.tooltipster-arrow-left span, .tooltipster-arrow-left .tooltipster-arrow-border {
+ border-top: 8px solid transparent !important;
+ border-bottom: 8px solid transparent !important;
+ border-left: 8px solid;
+ top: 50%;
+ margin-top: -7px;
+ right: -7px;
+}
+.tooltipster-arrow-left .tooltipster-arrow-border {
+ border-top: 9px solid transparent !important;
+ border-bottom: 9px solid transparent !important;
+ border-left: 9px solid;
+ margin-top: -8px;
+}
+.tooltipster-arrow-right span, .tooltipster-arrow-right .tooltipster-arrow-border {
+ border-top: 8px solid transparent !important;
+ border-bottom: 8px solid transparent !important;
+ border-right: 8px solid;
+ top: 50%;
+ margin-top: -7px;
+ left: -7px;
+}
+.tooltipster-arrow-right .tooltipster-arrow-border {
+ border-top: 9px solid transparent !important;
+ border-bottom: 9px solid transparent !important;
+ border-right: 9px solid;
+ margin-top: -8px;
+}
+
+
+/* Some CSS magic for the awesome animations - feel free to make your own custom animations and reference it in your Tooltipster settings! */
+
+.tooltipster-fade {
+ opacity: 0;
+ -webkit-transition-property: opacity;
+ -moz-transition-property: opacity;
+ -o-transition-property: opacity;
+ -ms-transition-property: opacity;
+ transition-property: opacity;
+}
+.tooltipster-fade-show {
+ opacity: 1;
+}
+
+.tooltipster-grow {
+ -webkit-transform: scale(0,0);
+ -moz-transform: scale(0,0);
+ -o-transform: scale(0,0);
+ -ms-transform: scale(0,0);
+ transform: scale(0,0);
+ -webkit-transition-property: -webkit-transform;
+ -moz-transition-property: -moz-transform;
+ -o-transition-property: -o-transform;
+ -ms-transition-property: -ms-transform;
+ transition-property: transform;
+ -webkit-backface-visibility: hidden;
+}
+.tooltipster-grow-show {
+ -webkit-transform: scale(1,1);
+ -moz-transform: scale(1,1);
+ -o-transform: scale(1,1);
+ -ms-transform: scale(1,1);
+ transform: scale(1,1);
+ -webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
+ -webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
+ -moz-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
+ -ms-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
+ -o-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
+ transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
+}
+
+.tooltipster-swing {
+ opacity: 0;
+ -webkit-transform: rotateZ(4deg);
+ -moz-transform: rotateZ(4deg);
+ -o-transform: rotateZ(4deg);
+ -ms-transform: rotateZ(4deg);
+ transform: rotateZ(4deg);
+ -webkit-transition-property: -webkit-transform, opacity;
+ -moz-transition-property: -moz-transform;
+ -o-transition-property: -o-transform;
+ -ms-transition-property: -ms-transform;
+ transition-property: transform;
+}
+.tooltipster-swing-show {
+ opacity: 1;
+ -webkit-transform: rotateZ(0deg);
+ -moz-transform: rotateZ(0deg);
+ -o-transform: rotateZ(0deg);
+ -ms-transform: rotateZ(0deg);
+ transform: rotateZ(0deg);
+ -webkit-transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 1);
+ -webkit-transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 2.4);
+ -moz-transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 2.4);
+ -ms-transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 2.4);
+ -o-transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 2.4);
+ transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 2.4);
+}
+
+.tooltipster-fall {
+ top: 0;
+ -webkit-transition-property: top;
+ -moz-transition-property: top;
+ -o-transition-property: top;
+ -ms-transition-property: top;
+ transition-property: top;
+ -webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
+ -webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
+ -moz-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
+ -ms-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
+ -o-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
+ transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
+}
+.tooltipster-fall-show {
+}
+.tooltipster-fall.tooltipster-dying {
+ -webkit-transition-property: all;
+ -moz-transition-property: all;
+ -o-transition-property: all;
+ -ms-transition-property: all;
+ transition-property: all;
+ top: 0px !important;
+ opacity: 0;
+}
+
+.tooltipster-slide {
+ left: -40px;
+ -webkit-transition-property: left;
+ -moz-transition-property: left;
+ -o-transition-property: left;
+ -ms-transition-property: left;
+ transition-property: left;
+ -webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
+ -webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
+ -moz-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
+ -ms-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
+ -o-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
+ transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
+}
+.tooltipster-slide.tooltipster-slide-show {
+}
+.tooltipster-slide.tooltipster-dying {
+ -webkit-transition-property: all;
+ -moz-transition-property: all;
+ -o-transition-property: all;
+ -ms-transition-property: all;
+ transition-property: all;
+ left: 0px !important;
+ opacity: 0;
+}
+
+
+/* CSS transition for when contenting is changing in a tooltip that is still open. The only properties that will NOT transition are: width, height, top, and left */
+.tooltipster-content-changing {
+ opacity: 0.5;
+ -webkit-transform: scale(1.1, 1.1);
+ -moz-transform: scale(1.1, 1.1);
+ -o-transform: scale(1.1, 1.1);
+ -ms-transform: scale(1.1, 1.1);
+ transform: scale(1.1, 1.1);
+}
+
+/*Other themes*/
+
+.tooltipster-shadow {
+ border-radius: 5px;
+ background: #fff;
+ box-shadow: 5px 5px 24px rgba(0,0,0,1);
+ color: #2c2c2c;
+}
+.tooltipster-shadow .tooltipster-content {
+ font-family: 'Arial', sans-serif;
+ font-size: 14px;
+ line-height: 16px;
+ padding: 8px 10px;
+}
+
+
+
+
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/styles/style.css b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/styles/style.css
new file mode 100644
index 0000000..e04e8e4
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/styles/style.css
@@ -0,0 +1,1028 @@
+/*
+=============================================================================================
+The MIT License (MIT)
+
+Copyright 2015 AT&T Intellectual Property. All other rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+/*TITLE BAR*/
+#titleBar {
+ width: 100%;
+ height: 40px;
+ position:fixed;
+ background-color: transparent;
+ z-index:9999;
+ /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#9b9b9b+0,595959+73,666666+100 */
+ /*background: #9b9b9b; /* Old browsers */
+ /* IE9 SVG, needs conditional override of 'filter' to 'none' */
+ /*
+ background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPHJhZGlhbEdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IjUwJSIgcj0iNzUlIj4KICAgIDxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiM5YjliOWIiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSI3MyUiIHN0b3AtY29sb3I9IiM1OTU5NTkiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjNjY2NjY2IiBzdG9wLW9wYWNpdHk9IjEiLz4KICA8L3JhZGlhbEdyYWRpZW50PgogIDxyZWN0IHg9Ii01MCIgeT0iLTUwIiB3aWR0aD0iMTAxIiBoZWlnaHQ9IjEwMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
+ */
+ /*background: -moz-radial-gradient(center, ellipse cover, #067ab4 0%, #0c2577 73%, #0c2577 100%); /* FF3.6+ */
+ /*background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#067ab4), color-stop(73%,#0c2577), color-stop(100%,#0c2577)); /* Chrome,Safari4+ */
+ /*background: -webkit-radial-gradient(center, ellipse cover, #067ab4 0%,#0c2577 73%,#0c2577 100%); /* Chrome10+,Safari5.1+ */
+ /*background: -o-radial-gradient(center, ellipse cover, #067ab4 0%,#0c2577 73%,#0c2577 100%); /* Opera 12+ */
+ /*background: -ms-radial-gradient(center, ellipse cover, #067ab4 0%,#0c2577 73%,#0c2577 100%); /* IE10+ */
+ /*background: radial-gradient(ellipse at center, #067ab4 0%,#0c2577 73%,#0c2577 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#067ab4', endColorstr='#0c2577',GradientType=1 ); /* IE6-8 fallback on horizontal gradient */
+}
+
+
+.notLoggedIn {
+ position:absolute;
+ top:3px;
+ right:17px;
+ cursor:pointer;
+ color:white;
+ font-style: italic;
+ font-size:12px;
+}
+.loggedIn {
+ margin-right:15px;
+ position:absolute;
+ top:3px;
+ right:20px;
+ cursor:pointer;
+ color:white;
+ font-style: italic;
+ font-size:14px;
+}
+br.smallBR {
+ display: block;
+ line-height:0px;
+ padding:0;
+}
+fieldset.selectMenu {
+ border: 0;
+ }
+label.selectMenu {
+ display: block;
+ margin: 30px 0 0 0;
+ }
+select.selectMenu {
+ width: 200px;
+ }
+.overflow.selectMenu {
+ height: 200px;
+ }
+
+
+input{
+ display:inline;
+}
+.center{
+ display:block;
+ margin-left:auto;
+ margin-right:auto;
+ width:25%;
+}
+
+
+/*SIDE BAR*/
+#sideBar {
+ /*top:2.25em;*/
+ top:30px;
+ float:left;
+ width: 200px; height: 94.6%;
+ position:fixed; z-index:9997;border-radius: 4px;
+ border-right-style:solid;
+ border-right-color:white;
+ background: #336699;
+ /* Old browsers */
+ /*background: -moz-linear-gradient(top, #faaa19 0%, #f17a21 100%, #f17a21 100%); /* FF3.6+ */
+ /*background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#faaa19), color-stop(100%,#f17a21), color-stop(100%,#f17a21)); /* Chrome,Safari4+ */
+ /*background: -webkit-linear-gradient(top, #faaa19 0%,#f17a21 100%,#f17a21 100%); /* Chrome10+,Safari5.1+ */
+ /*background: -o-linear-gradient(top, #faaa19 0%,#f17a21 100%,#f17a21 100%); /* Opera 11.10+ */
+ /*background: -ms-linear-gradient(top, #faaa19 0%,#f17a21 100%,#f17a21 100%); /* IE10+ */
+ /*background: linear-gradient(to bottom, #faaa19 0%,#f17a21 100%,#f17a21 100%); /* W3C */
+ /*filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#faaa19', endColorstr='#f17a21',GradientType=0 ); /* IE6-9 */
+ /*background:#c4d82d;*/
+}
+.help{
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ color: #000000;
+ text-align:justify;
+ text-justify: inter-word;
+}
+
+h2.help{
+ font-size:22px;
+}
+h3.help{
+ margin-bottom:3px;
+ margin-left:24px;
+ margin-right:12px;
+ font-size:16px;
+}
+h4.help{
+ margin-bottom:3px;
+ margin-left:48px;
+ margin-right:12px;
+ font-size:14px;
+}
+p.help.indent{
+ margin-left:48px;
+}
+p.help{
+ margin-left:24px;
+ margin-right:12px;
+ margin-top:0;
+ margin-bottom:0;
+ font-size:14px;
+}
+ul.help{
+ margin-left:48px;
+ margin-right:12px;
+ font-size:14px;
+}
+
+
+/*MAIN BODY*/
+body {
+ margin:0px; padding:0px;
+}
+#grid {position:static; top:2em;float:left; width: 98%; margin-top: 0em; z-index:-1;
+ text-align:left; margin-top:0em;
+ background-color: #efefef;
+ border: dashed 4px transparent;
+ border-radius: 4px;
+
+ padding: 10px;
+ padding-left: 0%;
+ transition: background-color 0.3s;
+ height: 699px;
+ text-align: center;
+ float:bottom;
+ margin-bottom:0em;
+}
+ol {
+ list-style-type:numbers;
+ font-size:12px;
+}
+#lines {
+ width:100%; margin-right:0;
+}
+hr.dottedLine {
+ border-top: dotted 1px #000;
+ display:inline-block;
+ border-bottom: none;
+ background: transparent;
+ cursor:pointer;
+ height:0px;
+}
+hr.doubleLine {
+ border-top: double 6px #000;
+ display:inline-block;
+ border-bottom: none;
+ background: transparent;
+ margin-bottom:3px;
+ cursor:pointer;
+ height:0px;
+}
+
+hr {
+ width:100%; height:1px; background: #fff;
+}
+
+table, th, td {
+ border: 1px dotted black;
+ background-color: transparent;
+}
+
+
+.arrow_box {
+ position: relative;
+ background: #88b7d5;
+ border: 4px solid #c2e1f5;
+}
+.arrow_box:after, .arrow_box:before {
+ top: 100%;
+ left: 50%;
+ border: solid transparent;
+ content: " ";
+ height: 0;
+ width: 0;
+ position: absolute;
+ pointer-events: none;
+}
+.arrow_box:after {
+ border-color: rgba(136, 183, 213, 0);
+ border-top-color: #88b7d5;
+ border-width: 10px;
+ margin-left: -10px;
+}
+.arrow_box:before {
+ border-color: rgba(194, 225, 245, 0);
+ border-top-color: #c2e1f5;
+ border-width: 16px;
+ margin-left: -16px;
+}
+
+
+
+
+
+
+
+
+
+
+
+#start
+{
+ display: block;
+ font-size: .75em;
+ font-weight: bold;
+ padding: 10px 15px;
+ margin: 1em;
+ margin-left:0em;
+ color: #ccc;
+ background-color: #555;
+ background: -webkit-linear-gradient(#44c8f5, #0c2577);
+ background: linear-gradient(#44c8f5, #0c2577);
+ border: 0 none;
+ border-radius: 3px;
+ text-shadow: 0 -1px 0 #000;
+ /*box-shadow: 0 1px 0 #666, 0 5px 0 #444, 0 6px 6px rgba(0,0,0,0.6);*/
+ cursor: pointer;
+ -webkit-transition: all 150ms ease;
+ transition: all 150ms ease;
+ font-size: 1.1em;
+ text-transform: uppercase;
+}
+
+#start:focus{
+ outline:none;
+}
+
+button.glow
+{
+ -webkit-animation: pulsate 1.2s linear infinite;
+ animation: pulsate 1.2s linear infinite;
+}
+
+@-webkit-keyframes pulsate
+{
+ 0% { color: #ddd; text-shadow: 0 -1px 0 #000; }
+ 50% { color: #29e; text-shadow: 0 0px 0 #444, 0 0 5px #ffd, 0 0 8px #fff; }
+ 100% { color: #ddd; text-shadow: 0 -1px 0 #000; }
+}
+
+@keyframes pulsate
+{
+ 0% { color: #fff; text-shadow: 0 -1px 0 #000; }
+ 50% { color: #29e; text-shadow: 0 -1px 0 #444, 0 0 5px #ffd, 0 0 8px #fff; }
+ 100% { color: #fff; text-shadow: 0 -1px 0 #000; }
+}
+
+button.little
+{
+ display: block;
+ font-size: .75em;
+ font-weight: bold;
+ padding: 2px 3px;
+ margin: 1em;
+ margin-left:0em;
+ color: #ccc;
+ background-color: #555;
+ background: -webkit-linear-gradient(#44c8f5, #0c2577);
+ background: linear-gradient(#44c8f5, #0c2577);
+ border: 0 none;
+ border-radius: 3px;
+ text-shadow: 0 -1px 0 #000;
+ /*box-shadow: 0 1px 0 #666, 0 5px 0 #444, 0 6px 6px rgba(0,0,0,0.6);*/
+ cursor: pointer;
+ -webkit-transition: all 150ms ease;
+ transition: all 150ms ease;
+}
+button.little:focus{
+ outline:none;
+}
+
+button.mediumOld
+{
+ display: block;
+ /*font-size: 1.25em;*/
+ font-size: 16px;
+ font-weight: bold;
+ padding: 2px 3px;
+ margin: 10px;
+ margin-left:10px;
+ color: #ccc;
+ background-color: #555;
+ background: -webkit-linear-gradient(#44c8f5, #0c2577);
+ background: linear-gradient(#44c8f5, #0c2577);
+ border: 0 none;
+ border-radius: 3px;
+ text-shadow: 0 -1px 0 #000;
+ /*box-shadow: 0 1px 0 #666, 0 5px 0 #444, 0 6px 6px rgba(0,0,0,0.6);*/
+ cursor: pointer;
+ -webkit-transition: all 150ms ease;
+ transition: all 150ms ease;
+}
+button.mediumOld:focus{
+ outline:none;
+}
+
+button.medium
+{
+ display: block;
+ /*font-size: 1.25em;*/
+ font-size: 16px;
+ font-weight: bold;
+ padding: 8px 8px;
+ margin: 5px;
+ margin-left:5px;
+ color: #ccc;
+ background-color: #0574AC!important;
+ border: 1px solid #666;
+ border-radius: 3px;
+ text-shadow: 0 -1px 0 #000;
+ /*box-shadow: 0 1px 0 #666, 0 5px 0 #444, 0 6px 6px rgba(0,0,0,0.6);*/
+ cursor: pointer;
+ -webkit-transition: all 150ms ease;
+ transition: all 150ms ease;
+}
+button.medium:focus{
+ outline:none;
+}
+button.medium:hover {
+ border: 1px solid #fff;
+ color: #fff;
+}
+
+
+
+h1.sideBar {
+ text-align: center;
+ display: block;
+ -webkit-margin-before: 0em;
+ -webkit-margin-after: 0em;
+ -webkit-margin-start: 0px;
+ -webkit-margin-end: 0px;
+ font-weight: bold;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 20px;
+ font-weight: normal;
+ color: #000000;
+}
+h3.titleBar {
+ text-align: center;
+ display: block;
+ font-size: 18px;
+ margin-top: 12px;
+ margin-right: 0px;
+ margin-left: 0px;
+ margin-bottom: 0px;
+ font-weight: bold;
+ font-family: Arial, Helvetica, sans-serif;
+ cursor:pointer;
+ color:#ffffff;
+}
+
+img.trash {
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+
+
+p.draggables {
+ display: block;
+ -webkit-margin-before: 0em;
+ -webkit-margin-after: 0em;
+ -webkit-margin-start: 0px;
+ -webkit-margin-end: 0px;
+ text-align: center;
+ padding-top: 5px;
+}
+
+
+
+.dropzone{
+ background-color: #ccc;
+ border: dashed 4px transparent;
+ border-radius: 4px;
+ margin: 10px auto 30px;
+ margin-left: 10.3%;
+ padding: 10px;
+ padding-left: 0%;
+ width: 80%;
+ transition: background-color 0.3s;
+ height: 500px;
+ text-align: center;
+}
+
+.nodeDropzone{
+ background-color: #efefef;
+ border: dashed 4px transparent;
+ border-radius: 4px;
+ margin: 0;
+ margin-left: 0%;
+ padding: 0px;
+ padding-left: 0%;
+ width: auto;
+ transition: background-color 0.3s;
+ height: auto;
+ text-align: center;
+}
+
+.arrowDropzone{
+ background-color: #efefef;
+ border: dashed 4px transparent;
+ border-radius: 4px;
+ margin: 0;
+ margin-left: 0%;
+ padding: 0px;
+ padding-left: 0%;
+ width: auto;
+ transition: background-color 0.3s;
+ height: auto;
+ text-align: center;
+}
+
+
+.drop-active {
+ border-color: #aaa;
+}
+
+.drop-target {
+ background-color: #29e;
+ border-color: #fff;
+ border-style: solid;
+}
+
+.drop-targetTrash {
+ background-color: #29e;
+ border-color: #fff;
+ border-style: solid;
+}
+
+.drag-drop {
+ display: inline-block;
+ min-width: 40px;
+ padding: 2em 0.5em;
+
+ color: #fff;
+ background-color: #29e;
+ border: solid 2px #fff;
+
+ -webkit-transform: translate(0px, 0px);
+ transform: translate(0px, 0px);
+
+ transition: background-color 0.3s;
+}
+
+/* .drag-drop.can-drop {
+ color: #000;
+ background-color: #000;
+} */
+
+.arrowDraggable{
+ z-index:9995;
+ display: inline-block;
+ position:absolute;
+ width:100px;
+ cursor:move;
+ white-space: nowrap;
+ transition: background 0.5s ease;
+ -webkit-transition: background 0.5s ease;
+ height:30px;
+}
+
+.arrow{
+ float: left;
+ width: 100%;
+ background: #000000;
+ padding: 0px;
+ border-radius: 0px;
+ color: #FFF;
+ position: relative;
+ font-size: 12px;
+ height: 3px;
+ border:none;
+ line-height:30px;
+ vertical-align: text-top;
+ color: #000000;
+ text-align:center;
+ margin-top:10px;
+ margin-bottom:11px;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 10px;
+ font-weight: normal;
+ color: #000000;
+}
+
+.triangle{
+ content: "";
+ display: block;
+ width: 0;
+ height: 0;
+ border-top: 12px solid transparent;
+ border-bottom: 12px solid transparent;
+ border-left: 12px solid #000000;
+ position: absolute;
+ margin-bottom:10px;
+ cursor:e-resize;
+}
+
+.leftArrow{
+ float: left;
+ width: 100%;
+ background: #000000;
+ padding: 0px;
+ border-radius: 0px;
+ color: #FFF;
+ position: relative;
+ font-size: 12px;
+ height: 3px;
+ border:none;
+ line-height:30px;
+ vertical-align: text-top;
+ color: #000000;
+ text-align:center;
+ margin-top:10px;
+ margin-bottom:11px;
+ margin-left:12px;
+ bottom:34px;
+}
+.leftTriangle{
+ content: "";
+ display: block;
+ width: 0;
+ height: 0;
+ border-top: 12px solid transparent;
+ border-bottom: 12px solid transparent;
+ border-right: 12px solid #000000;
+ position: relative;
+ float:left;
+ margin-bottom:10px;
+ cursor:e-resize;
+}
+
+.arrowText {
+ cursor:pointer;
+}
+
+.makeEllipsis{
+ width:100%;
+ overflow:hidden;
+ text-overflow:ellipsis
+}
+.makeEllipsisSelf{
+ width:500px;
+ overflow:hidden;
+ text-overflow:ellipsis
+}
+
+.drag {
+ width: 100px;
+ height: 36px;
+
+ margin: 0;
+ margin-top:5px;
+ margin-left:15px;
+ position: static;
+ background-color: #29e;
+ color: white;
+ z-index:9995;
+ border-radius: 0.5em;
+ padding: .5%;
+
+ -webkit-transform: translate(0px, 0px);
+ transform: translate(0px, 0px);
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 10px;
+ font-weight: normal;
+ color: #ffffff;
+}
+
+.drag-1 {
+ width: 100px;
+ height: 36px;
+
+ margin: 0;
+ margin-left:15px;
+ position:absolute;
+ background-color: #29e;
+ color: white;
+ z-index:9995;
+ border-radius: 8px;
+ padding: 8px;
+ -webkit-transform: translate(0px, 0px);
+ transform: translate(0px, 0px);
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 10px;
+ font-weight: normal;
+ color: #ffffff;
+}
+.nodeEllipsis{
+ display:block;
+ display:-webkit-box;
+ max-width:100%;
+ height:100%;
+ -webkit-line-clamp: 3;
+ -webkit-box-orient: vertical;
+ overflow:hidden;
+ text-overflow:ellipsis;
+}
+
+.instructions {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 8px;
+ font-weight: normal;
+ color: #000000;
+ margin-bottom: 3px;
+ font-style: italic;
+ font-size: 12px;
+ text-align: center;
+ cursor: pointer;
+}
+
+.componentSelection {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ font-weight: normal;
+ color: #ccc;
+ margin-bottom: 3px;
+ font-style: italic;
+ text-align: center;
+}
+.componentSelectionBox {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ font-weight: normal;
+ color: #000;
+ margin-bottom: 3px;
+ font-style: italic;
+ text-align: center;
+}
+.componentSelectionBox:hover {
+ background-color: #DDD;
+ border-color: #FFF;
+}
+
+
+
+.collapsedPlus{
+ position:absolute;
+ top:0;
+ right:4px;
+ cursor:pointer;
+}
+
+.hasNodesHeader {
+ width: inherit;
+ height: 18px;
+
+ margin: 0;
+ margin-left:0px;
+ position:absolute;
+ top:-21px;
+ background-color: #29e;
+ color: white;
+ z-index:9995;
+ border-radius: 0em;
+ border:solid 1px #fff;
+ border-bottom:none;
+ padding: 0em;
+ -webkit-transform: translate(0px, 0px);
+ transform: translate(0px, 0px);
+ overflow:hidden;
+ white-space:nowrap;
+ text-overflow: ellipsis;
+ cursor:pointer;
+}
+.hasNodesBackground{
+ height:100px;
+ width:inherit;
+ background-color:grey;
+ opacity:0.5;
+ position:absolute;
+ z-index:9000;
+ top:66px;
+}
+
+.selected {
+ opacity: 0.8;
+ border-style: dashed;
+}
+
+.note {
+ width: 100px;
+ height: 25px;
+
+ margin: 0;
+ margin-left:15px;
+ position:absolute;
+ background-color: #fff890;
+ color: white;
+ z-index:9995;
+ border-radius: 0em;
+ padding: .5em;
+ border-style:solid;
+ border-width:1px;
+ border-color:black;
+ -webkit-transform: translate(0px, 0px);
+ transform: translate(0px, 0px);
+ color: grey;
+}
+
+.verticalLine {
+ border-left: 3px solid #000000;
+ position: absolute;
+ margin-left:50px;
+ z-index:-1;
+ height: 613px;
+ width:0;
+}
+
+html,body {
+ height:100%;
+}
+
+/*
+#numbers:hover{
+ opacity: 1 !important;
+}*/
+
+.verticallyScrollable:hover{
+ opacity: .85 !important;
+}
+
+
+
+
+
+
+/*!
+ * jQuery contextMenu - Plugin for simple contextMenu handling
+ *
+ * Version: git-master
+ *
+ * Authors: Rodney Rehm, Addy Osmani (patches for FF)
+ * Web: http://medialize.github.com/jQuery-contextMenu/
+ *
+ * Licensed under
+ * MIT License http://www.opensource.org/licenses/mit-license
+ * GPL v3 http://opensource.org/licenses/GPL-3.0
+ *
+ */
+
+.context-menu-list {
+ margin:0;
+ padding:0;
+
+ min-width: 135px;
+ max-width: 250px;
+ display: inline-block;
+ position: absolute;
+ list-style-type: none;
+
+ border: 1px solid #DDD;
+ background: #EEE;
+
+ -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
+ -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
+ -ms-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
+ -o-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
+
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 11px;
+}
+
+.context-menu-item {
+ padding: 9px 2px 2px 24px;
+ background-color: #EEE;
+ position: relative;
+ -webkit-user-select: none;
+ -moz-user-select: -moz-none;
+ -ms-user-select: none;
+ user-select: none;
+ line-height:8px;
+}
+
+.context-menu-separator {
+ padding-bottom:0;
+ border-bottom: 1px solid #DDD;
+}
+
+.context-menu-item > label > input,
+.context-menu-item > label > textarea {
+ -webkit-user-select: text;
+ -moz-user-select: text;
+ -ms-user-select: text;
+ user-select: text;
+}
+
+.context-menu-item.hover {
+ cursor: pointer;
+ background-color: #39F;
+}
+
+.context-menu-item.disabled {
+ color: #666;
+}
+
+.context-menu-input.hover,
+.context-menu-item.disabled.hover {
+ cursor: default;
+ background-color: #EEE;
+}
+
+.context-menu-submenu:after {
+ content: ">";
+ color: #666;
+ position: absolute;
+ right: 3px;
+ z-index: 1;
+}
+
+/* icons
+ #protip:
+ In case you want to use sprites for icons (which I would suggest you do) have a look at
+ http://css-tricks.com/13224-pseudo-spriting/ to get an idea of how to implement
+ .context-menu-item.icon:before {}
+ */
+.context-menu-item.icon { min-height: 18px; background-repeat: no-repeat; background-position: 4px 2px; list-style-type: none;}
+.context-menu-item.icon-edit { background-image: url(../images/menus/page_white_edit.gif); }
+.context-menu-item.icon-cut { background-image: url(../images/menus/cut.gif); }
+.context-menu-item.icon-copy { background-image: url(../images/menus/page_white_copy.gif); }
+.context-menu-item.icon-paste { background-image: url(../images/menus/page_white_paste.gif); }
+.context-menu-item.icon-delete { background-image: url(../images/menus/page_white_delete.gif); }
+.context-menu-item.icon-add { background-image: url(../images/menus/page_white_add.gif); }
+.context-menu-item.icon-quit { background-image: url(../images/menus/door.gif); }
+.context-menu-item.icon-import { background-image: url(../images/menus/import.gif); }
+.context-menu-item.icon-export { background-image: url(../images/menus/export.gif); }
+.context-menu-item.icon-emptyTrash { background-image: url(../images/menus/trash.gif); }
+
+/* vertically align inside labels */
+.context-menu-input > label > * { vertical-align: top; }
+
+/* position checkboxes and radios as icons */
+.context-menu-input > label > input[type="checkbox"],
+.context-menu-input > label > input[type="radio"] {
+ margin-left: -17px;
+}
+.context-menu-input > label > span {
+ margin-left: 5px;
+}
+
+.context-menu-input > label,
+.context-menu-input > label > input[type="text"],
+.context-menu-input > label > textarea,
+.context-menu-input > label > select {
+ display: block;
+ width: 100%;
+
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+ -o-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+.context-menu-input > label > textarea {
+ height: 100px;
+}
+.context-menu-item > .context-menu-list {
+ display: none;
+ /* re-positioned by js */
+ right: -5px;
+ top: 5px;
+}
+
+.context-menu-item.hover > .context-menu-list {
+ display: block;
+}
+
+.context-menu-accesskey {
+ text-decoration: underline;
+}
+
+#contextMenuID{
+ z-index:10000 !important;
+}
+
+/* ----- Added for ASE modes to link with Simulator ----- */
+
+#top-bar {
+ width: 100%;
+ height: 48px;
+ position: fixed;
+ top: 0;
+ left: 0;
+ z-index: 9999;
+ background: transparent url(../../static/img/global/bg-top-bar.png) center left repeat-x;
+ background-color: #666;
+}
+#top-bar .home {
+ position: relative;
+ cursor: pointer;
+ float: left
+}
+#top-bar .home>div {
+ float: left
+}
+#top-bar .home .att {
+ width: 40px;
+ height: 40px;
+ background-image: url(../../images/att_logo.png);
+ background-size: 50px 50px;
+ background-repeat: no-repeat;
+ margin: 0px 0 0 20px
+}
+#top-bar .home .pipe {
+ width: 2px;
+ height: 33px;
+ background-image: url(../images/pipe.png);
+ background-size: 2px 33px;
+ background-repeat: no-repeat;
+ margin: 8px 0 0 13px;
+ opacity: .5
+}
+
+#top-bar .home h3 {
+ color: #fff;
+ font-size: 1.4375em;
+ margin-top: 12px;
+ text-rendering: optimizeLegibility;
+ white-space: nowrap
+}
+
+
+/*
+#right-panel {
+position: fixed;
+top: 0;
+right: 0;
+height: 20px;
+z-index: 5000
+}
+#right-panel .controls{
+cursor: pointer;
+margin: 0px 20px 0 0;
+float: right;
+width: 30px;
+height: 30px;
+background-image: url(../static/img/global/back.png);
+background-size: 20px 20px;
+background-repeat: no-repeat
+}
+*/
+
+
+#right-panel {
+ position: fixed;
+ top: 0;
+ right: 0;
+ height: 48px;
+ z-index: 10010
+}
+#right-panel .controls .back {
+ cursor: pointer;
+ margin: 9px 25px 0 0;
+ float: right;
+ width: 39px;
+ height: 32px;
+ /*background-image: url(..images/back_arrow.png);*/
+ /*background-image: url(../images/home-icon.png);*/
+ background-size: 49px 40px;
+ background-repeat: no-repeat
+}
+#elementTable {
+ margin-top: 10px;
+ border: 1px solid rgba(255, 126, 0, 0.96);
+ border: 1px solid rgba(200, 200,200, 1);
+ border-radius: 17px;
+ padding: 5px;
+ background-color: rgba(255, 91, 0, 0.22);
+ background-color: rgba(51, 102, 153, 0.22);
+
+
+}
+
+#elementTable tr td {
+ border: 0px;
+
+}
+
+
+
+#numbers br {
+ height: 24px;
+}
+
+@-moz-document url-prefix() {
+ #topBreak {
+ height:36px;}
+};
+
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/view-models/ase_view.html b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/view-models/ase_view.html
new file mode 100644
index 0000000..e69de29
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/view-models/grid_view.html b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/view-models/grid_view.html
new file mode 100644
index 0000000..e69de29
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/view-models/index.html b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/view-models/index.html
new file mode 100644
index 0000000..ceda826
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/view-models/index.html
@@ -0,0 +1,159 @@
+
+
+
+
+
+ AT&T Advanced Service Editor
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{title}}
+
+
+
+
+
+
+
+
+
+
+
Append here
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/view-models/sidebar_view.html b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/view-models/sidebar_view.html
new file mode 100644
index 0000000..e69de29
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/view-models/topbar_view.html b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/view-models/topbar_view.html
new file mode 100644
index 0000000..33099ba
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/view-models/topbar_view.html
@@ -0,0 +1,6 @@
+
+
+ {{title}}
+
+
+
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-animate.js b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-animate.js
new file mode 100644
index 0000000..2778fc5
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-animate.js
@@ -0,0 +1,4121 @@
+/**
+ * @license AngularJS v1.5.0
+ * (c) 2010-2016 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {'use strict';
+
+/* jshint ignore:start */
+var noop = angular.noop;
+var copy = angular.copy;
+var extend = angular.extend;
+var jqLite = angular.element;
+var forEach = angular.forEach;
+var isArray = angular.isArray;
+var isString = angular.isString;
+var isObject = angular.isObject;
+var isUndefined = angular.isUndefined;
+var isDefined = angular.isDefined;
+var isFunction = angular.isFunction;
+var isElement = angular.isElement;
+
+var ELEMENT_NODE = 1;
+var COMMENT_NODE = 8;
+
+var ADD_CLASS_SUFFIX = '-add';
+var REMOVE_CLASS_SUFFIX = '-remove';
+var EVENT_CLASS_PREFIX = 'ng-';
+var ACTIVE_CLASS_SUFFIX = '-active';
+var PREPARE_CLASS_SUFFIX = '-prepare';
+
+var NG_ANIMATE_CLASSNAME = 'ng-animate';
+var NG_ANIMATE_CHILDREN_DATA = '$$ngAnimateChildren';
+
+// Detect proper transitionend/animationend event names.
+var CSS_PREFIX = '', TRANSITION_PROP, TRANSITIONEND_EVENT, ANIMATION_PROP, ANIMATIONEND_EVENT;
+
+// If unprefixed events are not supported but webkit-prefixed are, use the latter.
+// Otherwise, just use W3C names, browsers not supporting them at all will just ignore them.
+// Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend`
+// but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`.
+// Register both events in case `window.onanimationend` is not supported because of that,
+// do the same for `transitionend` as Safari is likely to exhibit similar behavior.
+// Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit
+// therefore there is no reason to test anymore for other vendor prefixes:
+// http://caniuse.com/#search=transition
+if (isUndefined(window.ontransitionend) && isDefined(window.onwebkittransitionend)) {
+ CSS_PREFIX = '-webkit-';
+ TRANSITION_PROP = 'WebkitTransition';
+ TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend';
+} else {
+ TRANSITION_PROP = 'transition';
+ TRANSITIONEND_EVENT = 'transitionend';
+}
+
+if (isUndefined(window.onanimationend) && isDefined(window.onwebkitanimationend)) {
+ CSS_PREFIX = '-webkit-';
+ ANIMATION_PROP = 'WebkitAnimation';
+ ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend';
+} else {
+ ANIMATION_PROP = 'animation';
+ ANIMATIONEND_EVENT = 'animationend';
+}
+
+var DURATION_KEY = 'Duration';
+var PROPERTY_KEY = 'Property';
+var DELAY_KEY = 'Delay';
+var TIMING_KEY = 'TimingFunction';
+var ANIMATION_ITERATION_COUNT_KEY = 'IterationCount';
+var ANIMATION_PLAYSTATE_KEY = 'PlayState';
+var SAFE_FAST_FORWARD_DURATION_VALUE = 9999;
+
+var ANIMATION_DELAY_PROP = ANIMATION_PROP + DELAY_KEY;
+var ANIMATION_DURATION_PROP = ANIMATION_PROP + DURATION_KEY;
+var TRANSITION_DELAY_PROP = TRANSITION_PROP + DELAY_KEY;
+var TRANSITION_DURATION_PROP = TRANSITION_PROP + DURATION_KEY;
+
+var isPromiseLike = function(p) {
+ return p && p.then ? true : false;
+};
+
+var ngMinErr = angular.$$minErr('ng');
+function assertArg(arg, name, reason) {
+ if (!arg) {
+ throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required"));
+ }
+ return arg;
+}
+
+function mergeClasses(a,b) {
+ if (!a && !b) return '';
+ if (!a) return b;
+ if (!b) return a;
+ if (isArray(a)) a = a.join(' ');
+ if (isArray(b)) b = b.join(' ');
+ return a + ' ' + b;
+}
+
+function packageStyles(options) {
+ var styles = {};
+ if (options && (options.to || options.from)) {
+ styles.to = options.to;
+ styles.from = options.from;
+ }
+ return styles;
+}
+
+function pendClasses(classes, fix, isPrefix) {
+ var className = '';
+ classes = isArray(classes)
+ ? classes
+ : classes && isString(classes) && classes.length
+ ? classes.split(/\s+/)
+ : [];
+ forEach(classes, function(klass, i) {
+ if (klass && klass.length > 0) {
+ className += (i > 0) ? ' ' : '';
+ className += isPrefix ? fix + klass
+ : klass + fix;
+ }
+ });
+ return className;
+}
+
+function removeFromArray(arr, val) {
+ var index = arr.indexOf(val);
+ if (val >= 0) {
+ arr.splice(index, 1);
+ }
+}
+
+function stripCommentsFromElement(element) {
+ if (element instanceof jqLite) {
+ switch (element.length) {
+ case 0:
+ return [];
+ break;
+
+ case 1:
+ // there is no point of stripping anything if the element
+ // is the only element within the jqLite wrapper.
+ // (it's important that we retain the element instance.)
+ if (element[0].nodeType === ELEMENT_NODE) {
+ return element;
+ }
+ break;
+
+ default:
+ return jqLite(extractElementNode(element));
+ break;
+ }
+ }
+
+ if (element.nodeType === ELEMENT_NODE) {
+ return jqLite(element);
+ }
+}
+
+function extractElementNode(element) {
+ if (!element[0]) return element;
+ for (var i = 0; i < element.length; i++) {
+ var elm = element[i];
+ if (elm.nodeType == ELEMENT_NODE) {
+ return elm;
+ }
+ }
+}
+
+function $$addClass($$jqLite, element, className) {
+ forEach(element, function(elm) {
+ $$jqLite.addClass(elm, className);
+ });
+}
+
+function $$removeClass($$jqLite, element, className) {
+ forEach(element, function(elm) {
+ $$jqLite.removeClass(elm, className);
+ });
+}
+
+function applyAnimationClassesFactory($$jqLite) {
+ return function(element, options) {
+ if (options.addClass) {
+ $$addClass($$jqLite, element, options.addClass);
+ options.addClass = null;
+ }
+ if (options.removeClass) {
+ $$removeClass($$jqLite, element, options.removeClass);
+ options.removeClass = null;
+ }
+ }
+}
+
+function prepareAnimationOptions(options) {
+ options = options || {};
+ if (!options.$$prepared) {
+ var domOperation = options.domOperation || noop;
+ options.domOperation = function() {
+ options.$$domOperationFired = true;
+ domOperation();
+ domOperation = noop;
+ };
+ options.$$prepared = true;
+ }
+ return options;
+}
+
+function applyAnimationStyles(element, options) {
+ applyAnimationFromStyles(element, options);
+ applyAnimationToStyles(element, options);
+}
+
+function applyAnimationFromStyles(element, options) {
+ if (options.from) {
+ element.css(options.from);
+ options.from = null;
+ }
+}
+
+function applyAnimationToStyles(element, options) {
+ if (options.to) {
+ element.css(options.to);
+ options.to = null;
+ }
+}
+
+function mergeAnimationDetails(element, oldAnimation, newAnimation) {
+ var target = oldAnimation.options || {};
+ var newOptions = newAnimation.options || {};
+
+ var toAdd = (target.addClass || '') + ' ' + (newOptions.addClass || '');
+ var toRemove = (target.removeClass || '') + ' ' + (newOptions.removeClass || '');
+ var classes = resolveElementClasses(element.attr('class'), toAdd, toRemove);
+
+ if (newOptions.preparationClasses) {
+ target.preparationClasses = concatWithSpace(newOptions.preparationClasses, target.preparationClasses);
+ delete newOptions.preparationClasses;
+ }
+
+ // noop is basically when there is no callback; otherwise something has been set
+ var realDomOperation = target.domOperation !== noop ? target.domOperation : null;
+
+ extend(target, newOptions);
+
+ // TODO(matsko or sreeramu): proper fix is to maintain all animation callback in array and call at last,but now only leave has the callback so no issue with this.
+ if (realDomOperation) {
+ target.domOperation = realDomOperation;
+ }
+
+ if (classes.addClass) {
+ target.addClass = classes.addClass;
+ } else {
+ target.addClass = null;
+ }
+
+ if (classes.removeClass) {
+ target.removeClass = classes.removeClass;
+ } else {
+ target.removeClass = null;
+ }
+
+ oldAnimation.addClass = target.addClass;
+ oldAnimation.removeClass = target.removeClass;
+
+ return target;
+}
+
+function resolveElementClasses(existing, toAdd, toRemove) {
+ var ADD_CLASS = 1;
+ var REMOVE_CLASS = -1;
+
+ var flags = {};
+ existing = splitClassesToLookup(existing);
+
+ toAdd = splitClassesToLookup(toAdd);
+ forEach(toAdd, function(value, key) {
+ flags[key] = ADD_CLASS;
+ });
+
+ toRemove = splitClassesToLookup(toRemove);
+ forEach(toRemove, function(value, key) {
+ flags[key] = flags[key] === ADD_CLASS ? null : REMOVE_CLASS;
+ });
+
+ var classes = {
+ addClass: '',
+ removeClass: ''
+ };
+
+ forEach(flags, function(val, klass) {
+ var prop, allow;
+ if (val === ADD_CLASS) {
+ prop = 'addClass';
+ allow = !existing[klass];
+ } else if (val === REMOVE_CLASS) {
+ prop = 'removeClass';
+ allow = existing[klass];
+ }
+ if (allow) {
+ if (classes[prop].length) {
+ classes[prop] += ' ';
+ }
+ classes[prop] += klass;
+ }
+ });
+
+ function splitClassesToLookup(classes) {
+ if (isString(classes)) {
+ classes = classes.split(' ');
+ }
+
+ var obj = {};
+ forEach(classes, function(klass) {
+ // sometimes the split leaves empty string values
+ // incase extra spaces were applied to the options
+ if (klass.length) {
+ obj[klass] = true;
+ }
+ });
+ return obj;
+ }
+
+ return classes;
+}
+
+function getDomNode(element) {
+ return (element instanceof angular.element) ? element[0] : element;
+}
+
+function applyGeneratedPreparationClasses(element, event, options) {
+ var classes = '';
+ if (event) {
+ classes = pendClasses(event, EVENT_CLASS_PREFIX, true);
+ }
+ if (options.addClass) {
+ classes = concatWithSpace(classes, pendClasses(options.addClass, ADD_CLASS_SUFFIX));
+ }
+ if (options.removeClass) {
+ classes = concatWithSpace(classes, pendClasses(options.removeClass, REMOVE_CLASS_SUFFIX));
+ }
+ if (classes.length) {
+ options.preparationClasses = classes;
+ element.addClass(classes);
+ }
+}
+
+function clearGeneratedClasses(element, options) {
+ if (options.preparationClasses) {
+ element.removeClass(options.preparationClasses);
+ options.preparationClasses = null;
+ }
+ if (options.activeClasses) {
+ element.removeClass(options.activeClasses);
+ options.activeClasses = null;
+ }
+}
+
+function blockTransitions(node, duration) {
+ // we use a negative delay value since it performs blocking
+ // yet it doesn't kill any existing transitions running on the
+ // same element which makes this safe for class-based animations
+ var value = duration ? '-' + duration + 's' : '';
+ applyInlineStyle(node, [TRANSITION_DELAY_PROP, value]);
+ return [TRANSITION_DELAY_PROP, value];
+}
+
+function blockKeyframeAnimations(node, applyBlock) {
+ var value = applyBlock ? 'paused' : '';
+ var key = ANIMATION_PROP + ANIMATION_PLAYSTATE_KEY;
+ applyInlineStyle(node, [key, value]);
+ return [key, value];
+}
+
+function applyInlineStyle(node, styleTuple) {
+ var prop = styleTuple[0];
+ var value = styleTuple[1];
+ node.style[prop] = value;
+}
+
+function concatWithSpace(a,b) {
+ if (!a) return b;
+ if (!b) return a;
+ return a + ' ' + b;
+}
+
+var $$rAFSchedulerFactory = ['$$rAF', function($$rAF) {
+ var queue, cancelFn;
+
+ function scheduler(tasks) {
+ // we make a copy since RAFScheduler mutates the state
+ // of the passed in array variable and this would be difficult
+ // to track down on the outside code
+ queue = queue.concat(tasks);
+ nextTick();
+ }
+
+ queue = scheduler.queue = [];
+
+ /* waitUntilQuiet does two things:
+ * 1. It will run the FINAL `fn` value only when an uncanceled RAF has passed through
+ * 2. It will delay the next wave of tasks from running until the quiet `fn` has run.
+ *
+ * The motivation here is that animation code can request more time from the scheduler
+ * before the next wave runs. This allows for certain DOM properties such as classes to
+ * be resolved in time for the next animation to run.
+ */
+ scheduler.waitUntilQuiet = function(fn) {
+ if (cancelFn) cancelFn();
+
+ cancelFn = $$rAF(function() {
+ cancelFn = null;
+ fn();
+ nextTick();
+ });
+ };
+
+ return scheduler;
+
+ function nextTick() {
+ if (!queue.length) return;
+
+ var items = queue.shift();
+ for (var i = 0; i < items.length; i++) {
+ items[i]();
+ }
+
+ if (!cancelFn) {
+ $$rAF(function() {
+ if (!cancelFn) nextTick();
+ });
+ }
+ }
+}];
+
+/**
+ * @ngdoc directive
+ * @name ngAnimateChildren
+ * @restrict AE
+ * @element ANY
+ *
+ * @description
+ *
+ * ngAnimateChildren allows you to specify that children of this element should animate even if any
+ * of the children's parents are currently animating. By default, when an element has an active `enter`, `leave`, or `move`
+ * (structural) animation, child elements that also have an active structural animation are not animated.
+ *
+ * Note that even if `ngAnimteChildren` is set, no child animations will run when the parent element is removed from the DOM (`leave` animation).
+ *
+ *
+ * @param {string} ngAnimateChildren If the value is empty, `true` or `on`,
+ * then child animations are allowed. If the value is `false`, child animations are not allowed.
+ *
+ * @example
+ *
+
+
+
Show container?
+
Animate children?
+
+
+
+ List of items:
+
Item {{item}}
+
+
+
+
+
+
+ .container.ng-enter,
+ .container.ng-leave {
+ transition: all ease 1.5s;
+ }
+
+ .container.ng-enter,
+ .container.ng-leave-active {
+ opacity: 0;
+ }
+
+ .container.ng-leave,
+ .container.ng-enter-active {
+ opacity: 1;
+ }
+
+ .item {
+ background: firebrick;
+ color: #FFF;
+ margin-bottom: 10px;
+ }
+
+ .item.ng-enter,
+ .item.ng-leave {
+ transition: transform 1.5s ease;
+ }
+
+ .item.ng-enter {
+ transform: translateX(50px);
+ }
+
+ .item.ng-enter-active {
+ transform: translateX(0);
+ }
+
+
+ angular.module('ngAnimateChildren', ['ngAnimate'])
+ .controller('mainController', function() {
+ this.animateChildren = false;
+ this.enterElement = false;
+ });
+
+
+ */
+var $$AnimateChildrenDirective = ['$interpolate', function($interpolate) {
+ return {
+ link: function(scope, element, attrs) {
+ var val = attrs.ngAnimateChildren;
+ if (angular.isString(val) && val.length === 0) { //empty attribute
+ element.data(NG_ANIMATE_CHILDREN_DATA, true);
+ } else {
+ // Interpolate and set the value, so that it is available to
+ // animations that run right after compilation
+ setData($interpolate(val)(scope));
+ attrs.$observe('ngAnimateChildren', setData);
+ }
+
+ function setData(value) {
+ value = value === 'on' || value === 'true';
+ element.data(NG_ANIMATE_CHILDREN_DATA, value);
+ }
+ }
+ };
+}];
+
+var ANIMATE_TIMER_KEY = '$$animateCss';
+
+/**
+ * @ngdoc service
+ * @name $animateCss
+ * @kind object
+ *
+ * @description
+ * The `$animateCss` service is a useful utility to trigger customized CSS-based transitions/keyframes
+ * from a JavaScript-based animation or directly from a directive. The purpose of `$animateCss` is NOT
+ * to side-step how `$animate` and ngAnimate work, but the goal is to allow pre-existing animations or
+ * directives to create more complex animations that can be purely driven using CSS code.
+ *
+ * Note that only browsers that support CSS transitions and/or keyframe animations are capable of
+ * rendering animations triggered via `$animateCss` (bad news for IE9 and lower).
+ *
+ * ## Usage
+ * Once again, `$animateCss` is designed to be used inside of a registered JavaScript animation that
+ * is powered by ngAnimate. It is possible to use `$animateCss` directly inside of a directive, however,
+ * any automatic control over cancelling animations and/or preventing animations from being run on
+ * child elements will not be handled by Angular. For this to work as expected, please use `$animate` to
+ * trigger the animation and then setup a JavaScript animation that injects `$animateCss` to trigger
+ * the CSS animation.
+ *
+ * The example below shows how we can create a folding animation on an element using `ng-if`:
+ *
+ * ```html
+ *
+ *
+ * This element will go BOOM
+ *
+ * Fold In
+ * ```
+ *
+ * Now we create the **JavaScript animation** that will trigger the CSS transition:
+ *
+ * ```js
+ * ngModule.animation('.fold-animation', ['$animateCss', function($animateCss) {
+ * return {
+ * enter: function(element, doneFn) {
+ * var height = element[0].offsetHeight;
+ * return $animateCss(element, {
+ * from: { height:'0px' },
+ * to: { height:height + 'px' },
+ * duration: 1 // one second
+ * });
+ * }
+ * }
+ * }]);
+ * ```
+ *
+ * ## More Advanced Uses
+ *
+ * `$animateCss` is the underlying code that ngAnimate uses to power **CSS-based animations** behind the scenes. Therefore CSS hooks
+ * like `.ng-EVENT`, `.ng-EVENT-active`, `.ng-EVENT-stagger` are all features that can be triggered using `$animateCss` via JavaScript code.
+ *
+ * This also means that just about any combination of adding classes, removing classes, setting styles, dynamically setting a keyframe animation,
+ * applying a hardcoded duration or delay value, changing the animation easing or applying a stagger animation are all options that work with
+ * `$animateCss`. The service itself is smart enough to figure out the combination of options and examine the element styling properties in order
+ * to provide a working animation that will run in CSS.
+ *
+ * The example below showcases a more advanced version of the `.fold-animation` from the example above:
+ *
+ * ```js
+ * ngModule.animation('.fold-animation', ['$animateCss', function($animateCss) {
+ * return {
+ * enter: function(element, doneFn) {
+ * var height = element[0].offsetHeight;
+ * return $animateCss(element, {
+ * addClass: 'red large-text pulse-twice',
+ * easing: 'ease-out',
+ * from: { height:'0px' },
+ * to: { height:height + 'px' },
+ * duration: 1 // one second
+ * });
+ * }
+ * }
+ * }]);
+ * ```
+ *
+ * Since we're adding/removing CSS classes then the CSS transition will also pick those up:
+ *
+ * ```css
+ * /* since a hardcoded duration value of 1 was provided in the JavaScript animation code,
+ * the CSS classes below will be transitioned despite them being defined as regular CSS classes */
+ * .red { background:red; }
+ * .large-text { font-size:20px; }
+ *
+ * /* we can also use a keyframe animation and $animateCss will make it work alongside the transition */
+ * .pulse-twice {
+ * animation: 0.5s pulse linear 2;
+ * -webkit-animation: 0.5s pulse linear 2;
+ * }
+ *
+ * @keyframes pulse {
+ * from { transform: scale(0.5); }
+ * to { transform: scale(1.5); }
+ * }
+ *
+ * @-webkit-keyframes pulse {
+ * from { -webkit-transform: scale(0.5); }
+ * to { -webkit-transform: scale(1.5); }
+ * }
+ * ```
+ *
+ * Given this complex combination of CSS classes, styles and options, `$animateCss` will figure everything out and make the animation happen.
+ *
+ * ## How the Options are handled
+ *
+ * `$animateCss` is very versatile and intelligent when it comes to figuring out what configurations to apply to the element to ensure the animation
+ * works with the options provided. Say for example we were adding a class that contained a keyframe value and we wanted to also animate some inline
+ * styles using the `from` and `to` properties.
+ *
+ * ```js
+ * var animator = $animateCss(element, {
+ * from: { background:'red' },
+ * to: { background:'blue' }
+ * });
+ * animator.start();
+ * ```
+ *
+ * ```css
+ * .rotating-animation {
+ * animation:0.5s rotate linear;
+ * -webkit-animation:0.5s rotate linear;
+ * }
+ *
+ * @keyframes rotate {
+ * from { transform: rotate(0deg); }
+ * to { transform: rotate(360deg); }
+ * }
+ *
+ * @-webkit-keyframes rotate {
+ * from { -webkit-transform: rotate(0deg); }
+ * to { -webkit-transform: rotate(360deg); }
+ * }
+ * ```
+ *
+ * The missing pieces here are that we do not have a transition set (within the CSS code nor within the `$animateCss` options) and the duration of the animation is
+ * going to be detected from what the keyframe styles on the CSS class are. In this event, `$animateCss` will automatically create an inline transition
+ * style matching the duration detected from the keyframe style (which is present in the CSS class that is being added) and then prepare both the transition
+ * and keyframe animations to run in parallel on the element. Then when the animation is underway the provided `from` and `to` CSS styles will be applied
+ * and spread across the transition and keyframe animation.
+ *
+ * ## What is returned
+ *
+ * `$animateCss` works in two stages: a preparation phase and an animation phase. Therefore when `$animateCss` is first called it will NOT actually
+ * start the animation. All that is going on here is that the element is being prepared for the animation (which means that the generated CSS classes are
+ * added and removed on the element). Once `$animateCss` is called it will return an object with the following properties:
+ *
+ * ```js
+ * var animator = $animateCss(element, { ... });
+ * ```
+ *
+ * Now what do the contents of our `animator` variable look like:
+ *
+ * ```js
+ * {
+ * // starts the animation
+ * start: Function,
+ *
+ * // ends (aborts) the animation
+ * end: Function
+ * }
+ * ```
+ *
+ * To actually start the animation we need to run `animation.start()` which will then return a promise that we can hook into to detect when the animation ends.
+ * If we choose not to run the animation then we MUST run `animation.end()` to perform a cleanup on the element (since some CSS classes and styles may have been
+ * applied to the element during the preparation phase). Note that all other properties such as duration, delay, transitions and keyframes are just properties
+ * and that changing them will not reconfigure the parameters of the animation.
+ *
+ * ### runner.done() vs runner.then()
+ * It is documented that `animation.start()` will return a promise object and this is true, however, there is also an additional method available on the
+ * runner called `.done(callbackFn)`. The done method works the same as `.finally(callbackFn)`, however, it does **not trigger a digest to occur**.
+ * Therefore, for performance reasons, it's always best to use `runner.done(callback)` instead of `runner.then()`, `runner.catch()` or `runner.finally()`
+ * unless you really need a digest to kick off afterwards.
+ *
+ * Keep in mind that, to make this easier, ngAnimate has tweaked the JS animations API to recognize when a runner instance is returned from $animateCss
+ * (so there is no need to call `runner.done(doneFn)` inside of your JavaScript animation code).
+ * Check the {@link ngAnimate.$animateCss#usage animation code above} to see how this works.
+ *
+ * @param {DOMElement} element the element that will be animated
+ * @param {object} options the animation-related options that will be applied during the animation
+ *
+ * * `event` - The DOM event (e.g. enter, leave, move). When used, a generated CSS class of `ng-EVENT` and `ng-EVENT-active` will be applied
+ * to the element during the animation. Multiple events can be provided when spaces are used as a separator. (Note that this will not perform any DOM operation.)
+ * * `structural` - Indicates that the `ng-` prefix will be added to the event class. Setting to `false` or omitting will turn `ng-EVENT` and
+ * `ng-EVENT-active` in `EVENT` and `EVENT-active`. Unused if `event` is omitted.
+ * * `easing` - The CSS easing value that will be applied to the transition or keyframe animation (or both).
+ * * `transitionStyle` - The raw CSS transition style that will be used (e.g. `1s linear all`).
+ * * `keyframeStyle` - The raw CSS keyframe animation style that will be used (e.g. `1s my_animation linear`).
+ * * `from` - The starting CSS styles (a key/value object) that will be applied at the start of the animation.
+ * * `to` - The ending CSS styles (a key/value object) that will be applied across the animation via a CSS transition.
+ * * `addClass` - A space separated list of CSS classes that will be added to the element and spread across the animation.
+ * * `removeClass` - A space separated list of CSS classes that will be removed from the element and spread across the animation.
+ * * `duration` - A number value representing the total duration of the transition and/or keyframe (note that a value of 1 is 1000ms). If a value of `0`
+ * is provided then the animation will be skipped entirely.
+ * * `delay` - A number value representing the total delay of the transition and/or keyframe (note that a value of 1 is 1000ms). If a value of `true` is
+ * used then whatever delay value is detected from the CSS classes will be mirrored on the elements styles (e.g. by setting delay true then the style value
+ * of the element will be `transition-delay: DETECTED_VALUE`). Using `true` is useful when you want the CSS classes and inline styles to all share the same
+ * CSS delay value.
+ * * `stagger` - A numeric time value representing the delay between successively animated elements
+ * ({@link ngAnimate#css-staggering-animations Click here to learn how CSS-based staggering works in ngAnimate.})
+ * * `staggerIndex` - The numeric index representing the stagger item (e.g. a value of 5 is equal to the sixth item in the stagger; therefore when a
+ * `stagger` option value of `0.1` is used then there will be a stagger delay of `600ms`)
+ * * `applyClassesEarly` - Whether or not the classes being added or removed will be used when detecting the animation. This is set by `$animate` when enter/leave/move animations are fired to ensure that the CSS classes are resolved in time. (Note that this will prevent any transitions from occurring on the classes being added and removed.)
+ * * `cleanupStyles` - Whether or not the provided `from` and `to` styles will be removed once
+ * the animation is closed. This is useful for when the styles are used purely for the sake of
+ * the animation and do not have a lasting visual effect on the element (e.g. a collapse and open animation).
+ * By default this value is set to `false`.
+ *
+ * @return {object} an object with start and end methods and details about the animation.
+ *
+ * * `start` - The method to start the animation. This will return a `Promise` when called.
+ * * `end` - This method will cancel the animation and remove all applied CSS classes and styles.
+ */
+var ONE_SECOND = 1000;
+var BASE_TEN = 10;
+
+var ELAPSED_TIME_MAX_DECIMAL_PLACES = 3;
+var CLOSING_TIME_BUFFER = 1.5;
+
+var DETECT_CSS_PROPERTIES = {
+ transitionDuration: TRANSITION_DURATION_PROP,
+ transitionDelay: TRANSITION_DELAY_PROP,
+ transitionProperty: TRANSITION_PROP + PROPERTY_KEY,
+ animationDuration: ANIMATION_DURATION_PROP,
+ animationDelay: ANIMATION_DELAY_PROP,
+ animationIterationCount: ANIMATION_PROP + ANIMATION_ITERATION_COUNT_KEY
+};
+
+var DETECT_STAGGER_CSS_PROPERTIES = {
+ transitionDuration: TRANSITION_DURATION_PROP,
+ transitionDelay: TRANSITION_DELAY_PROP,
+ animationDuration: ANIMATION_DURATION_PROP,
+ animationDelay: ANIMATION_DELAY_PROP
+};
+
+function getCssKeyframeDurationStyle(duration) {
+ return [ANIMATION_DURATION_PROP, duration + 's'];
+}
+
+function getCssDelayStyle(delay, isKeyframeAnimation) {
+ var prop = isKeyframeAnimation ? ANIMATION_DELAY_PROP : TRANSITION_DELAY_PROP;
+ return [prop, delay + 's'];
+}
+
+function computeCssStyles($window, element, properties) {
+ var styles = Object.create(null);
+ var detectedStyles = $window.getComputedStyle(element) || {};
+ forEach(properties, function(formalStyleName, actualStyleName) {
+ var val = detectedStyles[formalStyleName];
+ if (val) {
+ var c = val.charAt(0);
+
+ // only numerical-based values have a negative sign or digit as the first value
+ if (c === '-' || c === '+' || c >= 0) {
+ val = parseMaxTime(val);
+ }
+
+ // by setting this to null in the event that the delay is not set or is set directly as 0
+ // then we can still allow for negative values to be used later on and not mistake this
+ // value for being greater than any other negative value.
+ if (val === 0) {
+ val = null;
+ }
+ styles[actualStyleName] = val;
+ }
+ });
+
+ return styles;
+}
+
+function parseMaxTime(str) {
+ var maxValue = 0;
+ var values = str.split(/\s*,\s*/);
+ forEach(values, function(value) {
+ // it's always safe to consider only second values and omit `ms` values since
+ // getComputedStyle will always handle the conversion for us
+ if (value.charAt(value.length - 1) == 's') {
+ value = value.substring(0, value.length - 1);
+ }
+ value = parseFloat(value) || 0;
+ maxValue = maxValue ? Math.max(value, maxValue) : value;
+ });
+ return maxValue;
+}
+
+function truthyTimingValue(val) {
+ return val === 0 || val != null;
+}
+
+function getCssTransitionDurationStyle(duration, applyOnlyDuration) {
+ var style = TRANSITION_PROP;
+ var value = duration + 's';
+ if (applyOnlyDuration) {
+ style += DURATION_KEY;
+ } else {
+ value += ' linear all';
+ }
+ return [style, value];
+}
+
+function createLocalCacheLookup() {
+ var cache = Object.create(null);
+ return {
+ flush: function() {
+ cache = Object.create(null);
+ },
+
+ count: function(key) {
+ var entry = cache[key];
+ return entry ? entry.total : 0;
+ },
+
+ get: function(key) {
+ var entry = cache[key];
+ return entry && entry.value;
+ },
+
+ put: function(key, value) {
+ if (!cache[key]) {
+ cache[key] = { total: 1, value: value };
+ } else {
+ cache[key].total++;
+ }
+ }
+ };
+}
+
+// we do not reassign an already present style value since
+// if we detect the style property value again we may be
+// detecting styles that were added via the `from` styles.
+// We make use of `isDefined` here since an empty string
+// or null value (which is what getPropertyValue will return
+// for a non-existing style) will still be marked as a valid
+// value for the style (a falsy value implies that the style
+// is to be removed at the end of the animation). If we had a simple
+// "OR" statement then it would not be enough to catch that.
+function registerRestorableStyles(backup, node, properties) {
+ forEach(properties, function(prop) {
+ backup[prop] = isDefined(backup[prop])
+ ? backup[prop]
+ : node.style.getPropertyValue(prop);
+ });
+}
+
+var $AnimateCssProvider = ['$animateProvider', function($animateProvider) {
+ var gcsLookup = createLocalCacheLookup();
+ var gcsStaggerLookup = createLocalCacheLookup();
+
+ this.$get = ['$window', '$$jqLite', '$$AnimateRunner', '$timeout',
+ '$$forceReflow', '$sniffer', '$$rAFScheduler', '$$animateQueue',
+ function($window, $$jqLite, $$AnimateRunner, $timeout,
+ $$forceReflow, $sniffer, $$rAFScheduler, $$animateQueue) {
+
+ var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
+
+ var parentCounter = 0;
+ function gcsHashFn(node, extraClasses) {
+ var KEY = "$$ngAnimateParentKey";
+ var parentNode = node.parentNode;
+ var parentID = parentNode[KEY] || (parentNode[KEY] = ++parentCounter);
+ return parentID + '-' + node.getAttribute('class') + '-' + extraClasses;
+ }
+
+ function computeCachedCssStyles(node, className, cacheKey, properties) {
+ var timings = gcsLookup.get(cacheKey);
+
+ if (!timings) {
+ timings = computeCssStyles($window, node, properties);
+ if (timings.animationIterationCount === 'infinite') {
+ timings.animationIterationCount = 1;
+ }
+ }
+
+ // we keep putting this in multiple times even though the value and the cacheKey are the same
+ // because we're keeping an internal tally of how many duplicate animations are detected.
+ gcsLookup.put(cacheKey, timings);
+ return timings;
+ }
+
+ function computeCachedCssStaggerStyles(node, className, cacheKey, properties) {
+ var stagger;
+
+ // if we have one or more existing matches of matching elements
+ // containing the same parent + CSS styles (which is how cacheKey works)
+ // then staggering is possible
+ if (gcsLookup.count(cacheKey) > 0) {
+ stagger = gcsStaggerLookup.get(cacheKey);
+
+ if (!stagger) {
+ var staggerClassName = pendClasses(className, '-stagger');
+
+ $$jqLite.addClass(node, staggerClassName);
+
+ stagger = computeCssStyles($window, node, properties);
+
+ // force the conversion of a null value to zero incase not set
+ stagger.animationDuration = Math.max(stagger.animationDuration, 0);
+ stagger.transitionDuration = Math.max(stagger.transitionDuration, 0);
+
+ $$jqLite.removeClass(node, staggerClassName);
+
+ gcsStaggerLookup.put(cacheKey, stagger);
+ }
+ }
+
+ return stagger || {};
+ }
+
+ var cancelLastRAFRequest;
+ var rafWaitQueue = [];
+ function waitUntilQuiet(callback) {
+ rafWaitQueue.push(callback);
+ $$rAFScheduler.waitUntilQuiet(function() {
+ gcsLookup.flush();
+ gcsStaggerLookup.flush();
+
+ // DO NOT REMOVE THIS LINE OR REFACTOR OUT THE `pageWidth` variable.
+ // PLEASE EXAMINE THE `$$forceReflow` service to understand why.
+ var pageWidth = $$forceReflow();
+
+ // we use a for loop to ensure that if the queue is changed
+ // during this looping then it will consider new requests
+ for (var i = 0; i < rafWaitQueue.length; i++) {
+ rafWaitQueue[i](pageWidth);
+ }
+ rafWaitQueue.length = 0;
+ });
+ }
+
+ function computeTimings(node, className, cacheKey) {
+ var timings = computeCachedCssStyles(node, className, cacheKey, DETECT_CSS_PROPERTIES);
+ var aD = timings.animationDelay;
+ var tD = timings.transitionDelay;
+ timings.maxDelay = aD && tD
+ ? Math.max(aD, tD)
+ : (aD || tD);
+ timings.maxDuration = Math.max(
+ timings.animationDuration * timings.animationIterationCount,
+ timings.transitionDuration);
+
+ return timings;
+ }
+
+ return function init(element, initialOptions) {
+ // all of the animation functions should create
+ // a copy of the options data, however, if a
+ // parent service has already created a copy then
+ // we should stick to using that
+ var options = initialOptions || {};
+ if (!options.$$prepared) {
+ options = prepareAnimationOptions(copy(options));
+ }
+
+ var restoreStyles = {};
+ var node = getDomNode(element);
+ if (!node
+ || !node.parentNode
+ || !$$animateQueue.enabled()) {
+ return closeAndReturnNoopAnimator();
+ }
+
+ var temporaryStyles = [];
+ var classes = element.attr('class');
+ var styles = packageStyles(options);
+ var animationClosed;
+ var animationPaused;
+ var animationCompleted;
+ var runner;
+ var runnerHost;
+ var maxDelay;
+ var maxDelayTime;
+ var maxDuration;
+ var maxDurationTime;
+ var startTime;
+ var events = [];
+
+ if (options.duration === 0 || (!$sniffer.animations && !$sniffer.transitions)) {
+ return closeAndReturnNoopAnimator();
+ }
+
+ var method = options.event && isArray(options.event)
+ ? options.event.join(' ')
+ : options.event;
+
+ var isStructural = method && options.structural;
+ var structuralClassName = '';
+ var addRemoveClassName = '';
+
+ if (isStructural) {
+ structuralClassName = pendClasses(method, EVENT_CLASS_PREFIX, true);
+ } else if (method) {
+ structuralClassName = method;
+ }
+
+ if (options.addClass) {
+ addRemoveClassName += pendClasses(options.addClass, ADD_CLASS_SUFFIX);
+ }
+
+ if (options.removeClass) {
+ if (addRemoveClassName.length) {
+ addRemoveClassName += ' ';
+ }
+ addRemoveClassName += pendClasses(options.removeClass, REMOVE_CLASS_SUFFIX);
+ }
+
+ // there may be a situation where a structural animation is combined together
+ // with CSS classes that need to resolve before the animation is computed.
+ // However this means that there is no explicit CSS code to block the animation
+ // from happening (by setting 0s none in the class name). If this is the case
+ // we need to apply the classes before the first rAF so we know to continue if
+ // there actually is a detected transition or keyframe animation
+ if (options.applyClassesEarly && addRemoveClassName.length) {
+ applyAnimationClasses(element, options);
+ }
+
+ var preparationClasses = [structuralClassName, addRemoveClassName].join(' ').trim();
+ var fullClassName = classes + ' ' + preparationClasses;
+ var activeClasses = pendClasses(preparationClasses, ACTIVE_CLASS_SUFFIX);
+ var hasToStyles = styles.to && Object.keys(styles.to).length > 0;
+ var containsKeyframeAnimation = (options.keyframeStyle || '').length > 0;
+
+ // there is no way we can trigger an animation if no styles and
+ // no classes are being applied which would then trigger a transition,
+ // unless there a is raw keyframe value that is applied to the element.
+ if (!containsKeyframeAnimation
+ && !hasToStyles
+ && !preparationClasses) {
+ return closeAndReturnNoopAnimator();
+ }
+
+ var cacheKey, stagger;
+ if (options.stagger > 0) {
+ var staggerVal = parseFloat(options.stagger);
+ stagger = {
+ transitionDelay: staggerVal,
+ animationDelay: staggerVal,
+ transitionDuration: 0,
+ animationDuration: 0
+ };
+ } else {
+ cacheKey = gcsHashFn(node, fullClassName);
+ stagger = computeCachedCssStaggerStyles(node, preparationClasses, cacheKey, DETECT_STAGGER_CSS_PROPERTIES);
+ }
+
+ if (!options.$$skipPreparationClasses) {
+ $$jqLite.addClass(element, preparationClasses);
+ }
+
+ var applyOnlyDuration;
+
+ if (options.transitionStyle) {
+ var transitionStyle = [TRANSITION_PROP, options.transitionStyle];
+ applyInlineStyle(node, transitionStyle);
+ temporaryStyles.push(transitionStyle);
+ }
+
+ if (options.duration >= 0) {
+ applyOnlyDuration = node.style[TRANSITION_PROP].length > 0;
+ var durationStyle = getCssTransitionDurationStyle(options.duration, applyOnlyDuration);
+
+ // we set the duration so that it will be picked up by getComputedStyle later
+ applyInlineStyle(node, durationStyle);
+ temporaryStyles.push(durationStyle);
+ }
+
+ if (options.keyframeStyle) {
+ var keyframeStyle = [ANIMATION_PROP, options.keyframeStyle];
+ applyInlineStyle(node, keyframeStyle);
+ temporaryStyles.push(keyframeStyle);
+ }
+
+ var itemIndex = stagger
+ ? options.staggerIndex >= 0
+ ? options.staggerIndex
+ : gcsLookup.count(cacheKey)
+ : 0;
+
+ var isFirst = itemIndex === 0;
+
+ // this is a pre-emptive way of forcing the setup classes to be added and applied INSTANTLY
+ // without causing any combination of transitions to kick in. By adding a negative delay value
+ // it forces the setup class' transition to end immediately. We later then remove the negative
+ // transition delay to allow for the transition to naturally do it's thing. The beauty here is
+ // that if there is no transition defined then nothing will happen and this will also allow
+ // other transitions to be stacked on top of each other without any chopping them out.
+ if (isFirst && !options.skipBlocking) {
+ blockTransitions(node, SAFE_FAST_FORWARD_DURATION_VALUE);
+ }
+
+ var timings = computeTimings(node, fullClassName, cacheKey);
+ var relativeDelay = timings.maxDelay;
+ maxDelay = Math.max(relativeDelay, 0);
+ maxDuration = timings.maxDuration;
+
+ var flags = {};
+ flags.hasTransitions = timings.transitionDuration > 0;
+ flags.hasAnimations = timings.animationDuration > 0;
+ flags.hasTransitionAll = flags.hasTransitions && timings.transitionProperty == 'all';
+ flags.applyTransitionDuration = hasToStyles && (
+ (flags.hasTransitions && !flags.hasTransitionAll)
+ || (flags.hasAnimations && !flags.hasTransitions));
+ flags.applyAnimationDuration = options.duration && flags.hasAnimations;
+ flags.applyTransitionDelay = truthyTimingValue(options.delay) && (flags.applyTransitionDuration || flags.hasTransitions);
+ flags.applyAnimationDelay = truthyTimingValue(options.delay) && flags.hasAnimations;
+ flags.recalculateTimingStyles = addRemoveClassName.length > 0;
+
+ if (flags.applyTransitionDuration || flags.applyAnimationDuration) {
+ maxDuration = options.duration ? parseFloat(options.duration) : maxDuration;
+
+ if (flags.applyTransitionDuration) {
+ flags.hasTransitions = true;
+ timings.transitionDuration = maxDuration;
+ applyOnlyDuration = node.style[TRANSITION_PROP + PROPERTY_KEY].length > 0;
+ temporaryStyles.push(getCssTransitionDurationStyle(maxDuration, applyOnlyDuration));
+ }
+
+ if (flags.applyAnimationDuration) {
+ flags.hasAnimations = true;
+ timings.animationDuration = maxDuration;
+ temporaryStyles.push(getCssKeyframeDurationStyle(maxDuration));
+ }
+ }
+
+ if (maxDuration === 0 && !flags.recalculateTimingStyles) {
+ return closeAndReturnNoopAnimator();
+ }
+
+ if (options.delay != null) {
+ var delayStyle;
+ if (typeof options.delay !== "boolean") {
+ delayStyle = parseFloat(options.delay);
+ // number in options.delay means we have to recalculate the delay for the closing timeout
+ maxDelay = Math.max(delayStyle, 0);
+ }
+
+ if (flags.applyTransitionDelay) {
+ temporaryStyles.push(getCssDelayStyle(delayStyle));
+ }
+
+ if (flags.applyAnimationDelay) {
+ temporaryStyles.push(getCssDelayStyle(delayStyle, true));
+ }
+ }
+
+ // we need to recalculate the delay value since we used a pre-emptive negative
+ // delay value and the delay value is required for the final event checking. This
+ // property will ensure that this will happen after the RAF phase has passed.
+ if (options.duration == null && timings.transitionDuration > 0) {
+ flags.recalculateTimingStyles = flags.recalculateTimingStyles || isFirst;
+ }
+
+ maxDelayTime = maxDelay * ONE_SECOND;
+ maxDurationTime = maxDuration * ONE_SECOND;
+ if (!options.skipBlocking) {
+ flags.blockTransition = timings.transitionDuration > 0;
+ flags.blockKeyframeAnimation = timings.animationDuration > 0 &&
+ stagger.animationDelay > 0 &&
+ stagger.animationDuration === 0;
+ }
+
+ if (options.from) {
+ if (options.cleanupStyles) {
+ registerRestorableStyles(restoreStyles, node, Object.keys(options.from));
+ }
+ applyAnimationFromStyles(element, options);
+ }
+
+ if (flags.blockTransition || flags.blockKeyframeAnimation) {
+ applyBlocking(maxDuration);
+ } else if (!options.skipBlocking) {
+ blockTransitions(node, false);
+ }
+
+ // TODO(matsko): for 1.5 change this code to have an animator object for better debugging
+ return {
+ $$willAnimate: true,
+ end: endFn,
+ start: function() {
+ if (animationClosed) return;
+
+ runnerHost = {
+ end: endFn,
+ cancel: cancelFn,
+ resume: null, //this will be set during the start() phase
+ pause: null
+ };
+
+ runner = new $$AnimateRunner(runnerHost);
+
+ waitUntilQuiet(start);
+
+ // we don't have access to pause/resume the animation
+ // since it hasn't run yet. AnimateRunner will therefore
+ // set noop functions for resume and pause and they will
+ // later be overridden once the animation is triggered
+ return runner;
+ }
+ };
+
+ function endFn() {
+ close();
+ }
+
+ function cancelFn() {
+ close(true);
+ }
+
+ function close(rejected) { // jshint ignore:line
+ // if the promise has been called already then we shouldn't close
+ // the animation again
+ if (animationClosed || (animationCompleted && animationPaused)) return;
+ animationClosed = true;
+ animationPaused = false;
+
+ if (!options.$$skipPreparationClasses) {
+ $$jqLite.removeClass(element, preparationClasses);
+ }
+ $$jqLite.removeClass(element, activeClasses);
+
+ blockKeyframeAnimations(node, false);
+ blockTransitions(node, false);
+
+ forEach(temporaryStyles, function(entry) {
+ // There is only one way to remove inline style properties entirely from elements.
+ // By using `removeProperty` this works, but we need to convert camel-cased CSS
+ // styles down to hyphenated values.
+ node.style[entry[0]] = '';
+ });
+
+ applyAnimationClasses(element, options);
+ applyAnimationStyles(element, options);
+
+ if (Object.keys(restoreStyles).length) {
+ forEach(restoreStyles, function(value, prop) {
+ value ? node.style.setProperty(prop, value)
+ : node.style.removeProperty(prop);
+ });
+ }
+
+ // the reason why we have this option is to allow a synchronous closing callback
+ // that is fired as SOON as the animation ends (when the CSS is removed) or if
+ // the animation never takes off at all. A good example is a leave animation since
+ // the element must be removed just after the animation is over or else the element
+ // will appear on screen for one animation frame causing an overbearing flicker.
+ if (options.onDone) {
+ options.onDone();
+ }
+
+ if (events && events.length) {
+ // Remove the transitionend / animationend listener(s)
+ element.off(events.join(' '), onAnimationProgress);
+ }
+
+ //Cancel the fallback closing timeout and remove the timer data
+ var animationTimerData = element.data(ANIMATE_TIMER_KEY);
+ if (animationTimerData) {
+ $timeout.cancel(animationTimerData[0].timer);
+ element.removeData(ANIMATE_TIMER_KEY);
+ }
+
+ // if the preparation function fails then the promise is not setup
+ if (runner) {
+ runner.complete(!rejected);
+ }
+ }
+
+ function applyBlocking(duration) {
+ if (flags.blockTransition) {
+ blockTransitions(node, duration);
+ }
+
+ if (flags.blockKeyframeAnimation) {
+ blockKeyframeAnimations(node, !!duration);
+ }
+ }
+
+ function closeAndReturnNoopAnimator() {
+ runner = new $$AnimateRunner({
+ end: endFn,
+ cancel: cancelFn
+ });
+
+ // should flush the cache animation
+ waitUntilQuiet(noop);
+ close();
+
+ return {
+ $$willAnimate: false,
+ start: function() {
+ return runner;
+ },
+ end: endFn
+ };
+ }
+
+ function onAnimationProgress(event) {
+ event.stopPropagation();
+ var ev = event.originalEvent || event;
+
+ // we now always use `Date.now()` due to the recent changes with
+ // event.timeStamp in Firefox, Webkit and Chrome (see #13494 for more info)
+ var timeStamp = ev.$manualTimeStamp || Date.now();
+
+ /* Firefox (or possibly just Gecko) likes to not round values up
+ * when a ms measurement is used for the animation */
+ var elapsedTime = parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES));
+
+ /* $manualTimeStamp is a mocked timeStamp value which is set
+ * within browserTrigger(). This is only here so that tests can
+ * mock animations properly. Real events fallback to event.timeStamp,
+ * or, if they don't, then a timeStamp is automatically created for them.
+ * We're checking to see if the timeStamp surpasses the expected delay,
+ * but we're using elapsedTime instead of the timeStamp on the 2nd
+ * pre-condition since animationPauseds sometimes close off early */
+ if (Math.max(timeStamp - startTime, 0) >= maxDelayTime && elapsedTime >= maxDuration) {
+ // we set this flag to ensure that if the transition is paused then, when resumed,
+ // the animation will automatically close itself since transitions cannot be paused.
+ animationCompleted = true;
+ close();
+ }
+ }
+
+ function start() {
+ if (animationClosed) return;
+ if (!node.parentNode) {
+ close();
+ return;
+ }
+
+ // even though we only pause keyframe animations here the pause flag
+ // will still happen when transitions are used. Only the transition will
+ // not be paused since that is not possible. If the animation ends when
+ // paused then it will not complete until unpaused or cancelled.
+ var playPause = function(playAnimation) {
+ if (!animationCompleted) {
+ animationPaused = !playAnimation;
+ if (timings.animationDuration) {
+ var value = blockKeyframeAnimations(node, animationPaused);
+ animationPaused
+ ? temporaryStyles.push(value)
+ : removeFromArray(temporaryStyles, value);
+ }
+ } else if (animationPaused && playAnimation) {
+ animationPaused = false;
+ close();
+ }
+ };
+
+ // checking the stagger duration prevents an accidentally cascade of the CSS delay style
+ // being inherited from the parent. If the transition duration is zero then we can safely
+ // rely that the delay value is an intentional stagger delay style.
+ var maxStagger = itemIndex > 0
+ && ((timings.transitionDuration && stagger.transitionDuration === 0) ||
+ (timings.animationDuration && stagger.animationDuration === 0))
+ && Math.max(stagger.animationDelay, stagger.transitionDelay);
+ if (maxStagger) {
+ $timeout(triggerAnimationStart,
+ Math.floor(maxStagger * itemIndex * ONE_SECOND),
+ false);
+ } else {
+ triggerAnimationStart();
+ }
+
+ // this will decorate the existing promise runner with pause/resume methods
+ runnerHost.resume = function() {
+ playPause(true);
+ };
+
+ runnerHost.pause = function() {
+ playPause(false);
+ };
+
+ function triggerAnimationStart() {
+ // just incase a stagger animation kicks in when the animation
+ // itself was cancelled entirely
+ if (animationClosed) return;
+
+ applyBlocking(false);
+
+ forEach(temporaryStyles, function(entry) {
+ var key = entry[0];
+ var value = entry[1];
+ node.style[key] = value;
+ });
+
+ applyAnimationClasses(element, options);
+ $$jqLite.addClass(element, activeClasses);
+
+ if (flags.recalculateTimingStyles) {
+ fullClassName = node.className + ' ' + preparationClasses;
+ cacheKey = gcsHashFn(node, fullClassName);
+
+ timings = computeTimings(node, fullClassName, cacheKey);
+ relativeDelay = timings.maxDelay;
+ maxDelay = Math.max(relativeDelay, 0);
+ maxDuration = timings.maxDuration;
+
+ if (maxDuration === 0) {
+ close();
+ return;
+ }
+
+ flags.hasTransitions = timings.transitionDuration > 0;
+ flags.hasAnimations = timings.animationDuration > 0;
+ }
+
+ if (flags.applyAnimationDelay) {
+ relativeDelay = typeof options.delay !== "boolean" && truthyTimingValue(options.delay)
+ ? parseFloat(options.delay)
+ : relativeDelay;
+
+ maxDelay = Math.max(relativeDelay, 0);
+ timings.animationDelay = relativeDelay;
+ delayStyle = getCssDelayStyle(relativeDelay, true);
+ temporaryStyles.push(delayStyle);
+ node.style[delayStyle[0]] = delayStyle[1];
+ }
+
+ maxDelayTime = maxDelay * ONE_SECOND;
+ maxDurationTime = maxDuration * ONE_SECOND;
+
+ if (options.easing) {
+ var easeProp, easeVal = options.easing;
+ if (flags.hasTransitions) {
+ easeProp = TRANSITION_PROP + TIMING_KEY;
+ temporaryStyles.push([easeProp, easeVal]);
+ node.style[easeProp] = easeVal;
+ }
+ if (flags.hasAnimations) {
+ easeProp = ANIMATION_PROP + TIMING_KEY;
+ temporaryStyles.push([easeProp, easeVal]);
+ node.style[easeProp] = easeVal;
+ }
+ }
+
+ if (timings.transitionDuration) {
+ events.push(TRANSITIONEND_EVENT);
+ }
+
+ if (timings.animationDuration) {
+ events.push(ANIMATIONEND_EVENT);
+ }
+
+ startTime = Date.now();
+ var timerTime = maxDelayTime + CLOSING_TIME_BUFFER * maxDurationTime;
+ var endTime = startTime + timerTime;
+
+ var animationsData = element.data(ANIMATE_TIMER_KEY) || [];
+ var setupFallbackTimer = true;
+ if (animationsData.length) {
+ var currentTimerData = animationsData[0];
+ setupFallbackTimer = endTime > currentTimerData.expectedEndTime;
+ if (setupFallbackTimer) {
+ $timeout.cancel(currentTimerData.timer);
+ } else {
+ animationsData.push(close);
+ }
+ }
+
+ if (setupFallbackTimer) {
+ var timer = $timeout(onAnimationExpired, timerTime, false);
+ animationsData[0] = {
+ timer: timer,
+ expectedEndTime: endTime
+ };
+ animationsData.push(close);
+ element.data(ANIMATE_TIMER_KEY, animationsData);
+ }
+
+ if (events.length) {
+ element.on(events.join(' '), onAnimationProgress);
+ }
+
+ if (options.to) {
+ if (options.cleanupStyles) {
+ registerRestorableStyles(restoreStyles, node, Object.keys(options.to));
+ }
+ applyAnimationToStyles(element, options);
+ }
+ }
+
+ function onAnimationExpired() {
+ var animationsData = element.data(ANIMATE_TIMER_KEY);
+
+ // this will be false in the event that the element was
+ // removed from the DOM (via a leave animation or something
+ // similar)
+ if (animationsData) {
+ for (var i = 1; i < animationsData.length; i++) {
+ animationsData[i]();
+ }
+ element.removeData(ANIMATE_TIMER_KEY);
+ }
+ }
+ }
+ };
+ }];
+}];
+
+var $$AnimateCssDriverProvider = ['$$animationProvider', function($$animationProvider) {
+ $$animationProvider.drivers.push('$$animateCssDriver');
+
+ var NG_ANIMATE_SHIM_CLASS_NAME = 'ng-animate-shim';
+ var NG_ANIMATE_ANCHOR_CLASS_NAME = 'ng-anchor';
+
+ var NG_OUT_ANCHOR_CLASS_NAME = 'ng-anchor-out';
+ var NG_IN_ANCHOR_CLASS_NAME = 'ng-anchor-in';
+
+ function isDocumentFragment(node) {
+ return node.parentNode && node.parentNode.nodeType === 11;
+ }
+
+ this.$get = ['$animateCss', '$rootScope', '$$AnimateRunner', '$rootElement', '$sniffer', '$$jqLite', '$document',
+ function($animateCss, $rootScope, $$AnimateRunner, $rootElement, $sniffer, $$jqLite, $document) {
+
+ // only browsers that support these properties can render animations
+ if (!$sniffer.animations && !$sniffer.transitions) return noop;
+
+ var bodyNode = $document[0].body;
+ var rootNode = getDomNode($rootElement);
+
+ var rootBodyElement = jqLite(
+ // this is to avoid using something that exists outside of the body
+ // we also special case the doc fragment case because our unit test code
+ // appends the $rootElement to the body after the app has been bootstrapped
+ isDocumentFragment(rootNode) || bodyNode.contains(rootNode) ? rootNode : bodyNode
+ );
+
+ var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
+
+ return function initDriverFn(animationDetails) {
+ return animationDetails.from && animationDetails.to
+ ? prepareFromToAnchorAnimation(animationDetails.from,
+ animationDetails.to,
+ animationDetails.classes,
+ animationDetails.anchors)
+ : prepareRegularAnimation(animationDetails);
+ };
+
+ function filterCssClasses(classes) {
+ //remove all the `ng-` stuff
+ return classes.replace(/\bng-\S+\b/g, '');
+ }
+
+ function getUniqueValues(a, b) {
+ if (isString(a)) a = a.split(' ');
+ if (isString(b)) b = b.split(' ');
+ return a.filter(function(val) {
+ return b.indexOf(val) === -1;
+ }).join(' ');
+ }
+
+ function prepareAnchoredAnimation(classes, outAnchor, inAnchor) {
+ var clone = jqLite(getDomNode(outAnchor).cloneNode(true));
+ var startingClasses = filterCssClasses(getClassVal(clone));
+
+ outAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME);
+ inAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME);
+
+ clone.addClass(NG_ANIMATE_ANCHOR_CLASS_NAME);
+
+ rootBodyElement.append(clone);
+
+ var animatorIn, animatorOut = prepareOutAnimation();
+
+ // the user may not end up using the `out` animation and
+ // only making use of the `in` animation or vice-versa.
+ // In either case we should allow this and not assume the
+ // animation is over unless both animations are not used.
+ if (!animatorOut) {
+ animatorIn = prepareInAnimation();
+ if (!animatorIn) {
+ return end();
+ }
+ }
+
+ var startingAnimator = animatorOut || animatorIn;
+
+ return {
+ start: function() {
+ var runner;
+
+ var currentAnimation = startingAnimator.start();
+ currentAnimation.done(function() {
+ currentAnimation = null;
+ if (!animatorIn) {
+ animatorIn = prepareInAnimation();
+ if (animatorIn) {
+ currentAnimation = animatorIn.start();
+ currentAnimation.done(function() {
+ currentAnimation = null;
+ end();
+ runner.complete();
+ });
+ return currentAnimation;
+ }
+ }
+ // in the event that there is no `in` animation
+ end();
+ runner.complete();
+ });
+
+ runner = new $$AnimateRunner({
+ end: endFn,
+ cancel: endFn
+ });
+
+ return runner;
+
+ function endFn() {
+ if (currentAnimation) {
+ currentAnimation.end();
+ }
+ }
+ }
+ };
+
+ function calculateAnchorStyles(anchor) {
+ var styles = {};
+
+ var coords = getDomNode(anchor).getBoundingClientRect();
+
+ // we iterate directly since safari messes up and doesn't return
+ // all the keys for the coords object when iterated
+ forEach(['width','height','top','left'], function(key) {
+ var value = coords[key];
+ switch (key) {
+ case 'top':
+ value += bodyNode.scrollTop;
+ break;
+ case 'left':
+ value += bodyNode.scrollLeft;
+ break;
+ }
+ styles[key] = Math.floor(value) + 'px';
+ });
+ return styles;
+ }
+
+ function prepareOutAnimation() {
+ var animator = $animateCss(clone, {
+ addClass: NG_OUT_ANCHOR_CLASS_NAME,
+ delay: true,
+ from: calculateAnchorStyles(outAnchor)
+ });
+
+ // read the comment within `prepareRegularAnimation` to understand
+ // why this check is necessary
+ return animator.$$willAnimate ? animator : null;
+ }
+
+ function getClassVal(element) {
+ return element.attr('class') || '';
+ }
+
+ function prepareInAnimation() {
+ var endingClasses = filterCssClasses(getClassVal(inAnchor));
+ var toAdd = getUniqueValues(endingClasses, startingClasses);
+ var toRemove = getUniqueValues(startingClasses, endingClasses);
+
+ var animator = $animateCss(clone, {
+ to: calculateAnchorStyles(inAnchor),
+ addClass: NG_IN_ANCHOR_CLASS_NAME + ' ' + toAdd,
+ removeClass: NG_OUT_ANCHOR_CLASS_NAME + ' ' + toRemove,
+ delay: true
+ });
+
+ // read the comment within `prepareRegularAnimation` to understand
+ // why this check is necessary
+ return animator.$$willAnimate ? animator : null;
+ }
+
+ function end() {
+ clone.remove();
+ outAnchor.removeClass(NG_ANIMATE_SHIM_CLASS_NAME);
+ inAnchor.removeClass(NG_ANIMATE_SHIM_CLASS_NAME);
+ }
+ }
+
+ function prepareFromToAnchorAnimation(from, to, classes, anchors) {
+ var fromAnimation = prepareRegularAnimation(from, noop);
+ var toAnimation = prepareRegularAnimation(to, noop);
+
+ var anchorAnimations = [];
+ forEach(anchors, function(anchor) {
+ var outElement = anchor['out'];
+ var inElement = anchor['in'];
+ var animator = prepareAnchoredAnimation(classes, outElement, inElement);
+ if (animator) {
+ anchorAnimations.push(animator);
+ }
+ });
+
+ // no point in doing anything when there are no elements to animate
+ if (!fromAnimation && !toAnimation && anchorAnimations.length === 0) return;
+
+ return {
+ start: function() {
+ var animationRunners = [];
+
+ if (fromAnimation) {
+ animationRunners.push(fromAnimation.start());
+ }
+
+ if (toAnimation) {
+ animationRunners.push(toAnimation.start());
+ }
+
+ forEach(anchorAnimations, function(animation) {
+ animationRunners.push(animation.start());
+ });
+
+ var runner = new $$AnimateRunner({
+ end: endFn,
+ cancel: endFn // CSS-driven animations cannot be cancelled, only ended
+ });
+
+ $$AnimateRunner.all(animationRunners, function(status) {
+ runner.complete(status);
+ });
+
+ return runner;
+
+ function endFn() {
+ forEach(animationRunners, function(runner) {
+ runner.end();
+ });
+ }
+ }
+ };
+ }
+
+ function prepareRegularAnimation(animationDetails) {
+ var element = animationDetails.element;
+ var options = animationDetails.options || {};
+
+ if (animationDetails.structural) {
+ options.event = animationDetails.event;
+ options.structural = true;
+ options.applyClassesEarly = true;
+
+ // we special case the leave animation since we want to ensure that
+ // the element is removed as soon as the animation is over. Otherwise
+ // a flicker might appear or the element may not be removed at all
+ if (animationDetails.event === 'leave') {
+ options.onDone = options.domOperation;
+ }
+ }
+
+ // We assign the preparationClasses as the actual animation event since
+ // the internals of $animateCss will just suffix the event token values
+ // with `-active` to trigger the animation.
+ if (options.preparationClasses) {
+ options.event = concatWithSpace(options.event, options.preparationClasses);
+ }
+
+ var animator = $animateCss(element, options);
+
+ // the driver lookup code inside of $$animation attempts to spawn a
+ // driver one by one until a driver returns a.$$willAnimate animator object.
+ // $animateCss will always return an object, however, it will pass in
+ // a flag as a hint as to whether an animation was detected or not
+ return animator.$$willAnimate ? animator : null;
+ }
+ }];
+}];
+
+// TODO(matsko): use caching here to speed things up for detection
+// TODO(matsko): add documentation
+// by the time...
+
+var $$AnimateJsProvider = ['$animateProvider', function($animateProvider) {
+ this.$get = ['$injector', '$$AnimateRunner', '$$jqLite',
+ function($injector, $$AnimateRunner, $$jqLite) {
+
+ var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
+ // $animateJs(element, 'enter');
+ return function(element, event, classes, options) {
+ var animationClosed = false;
+
+ // the `classes` argument is optional and if it is not used
+ // then the classes will be resolved from the element's className
+ // property as well as options.addClass/options.removeClass.
+ if (arguments.length === 3 && isObject(classes)) {
+ options = classes;
+ classes = null;
+ }
+
+ options = prepareAnimationOptions(options);
+ if (!classes) {
+ classes = element.attr('class') || '';
+ if (options.addClass) {
+ classes += ' ' + options.addClass;
+ }
+ if (options.removeClass) {
+ classes += ' ' + options.removeClass;
+ }
+ }
+
+ var classesToAdd = options.addClass;
+ var classesToRemove = options.removeClass;
+
+ // the lookupAnimations function returns a series of animation objects that are
+ // matched up with one or more of the CSS classes. These animation objects are
+ // defined via the module.animation factory function. If nothing is detected then
+ // we don't return anything which then makes $animation query the next driver.
+ var animations = lookupAnimations(classes);
+ var before, after;
+ if (animations.length) {
+ var afterFn, beforeFn;
+ if (event == 'leave') {
+ beforeFn = 'leave';
+ afterFn = 'afterLeave'; // TODO(matsko): get rid of this
+ } else {
+ beforeFn = 'before' + event.charAt(0).toUpperCase() + event.substr(1);
+ afterFn = event;
+ }
+
+ if (event !== 'enter' && event !== 'move') {
+ before = packageAnimations(element, event, options, animations, beforeFn);
+ }
+ after = packageAnimations(element, event, options, animations, afterFn);
+ }
+
+ // no matching animations
+ if (!before && !after) return;
+
+ function applyOptions() {
+ options.domOperation();
+ applyAnimationClasses(element, options);
+ }
+
+ function close() {
+ animationClosed = true;
+ applyOptions();
+ applyAnimationStyles(element, options);
+ }
+
+ var runner;
+
+ return {
+ $$willAnimate: true,
+ end: function() {
+ if (runner) {
+ runner.end();
+ } else {
+ close();
+ runner = new $$AnimateRunner();
+ runner.complete(true);
+ }
+ return runner;
+ },
+ start: function() {
+ if (runner) {
+ return runner;
+ }
+
+ runner = new $$AnimateRunner();
+ var closeActiveAnimations;
+ var chain = [];
+
+ if (before) {
+ chain.push(function(fn) {
+ closeActiveAnimations = before(fn);
+ });
+ }
+
+ if (chain.length) {
+ chain.push(function(fn) {
+ applyOptions();
+ fn(true);
+ });
+ } else {
+ applyOptions();
+ }
+
+ if (after) {
+ chain.push(function(fn) {
+ closeActiveAnimations = after(fn);
+ });
+ }
+
+ runner.setHost({
+ end: function() {
+ endAnimations();
+ },
+ cancel: function() {
+ endAnimations(true);
+ }
+ });
+
+ $$AnimateRunner.chain(chain, onComplete);
+ return runner;
+
+ function onComplete(success) {
+ close(success);
+ runner.complete(success);
+ }
+
+ function endAnimations(cancelled) {
+ if (!animationClosed) {
+ (closeActiveAnimations || noop)(cancelled);
+ onComplete(cancelled);
+ }
+ }
+ }
+ };
+
+ function executeAnimationFn(fn, element, event, options, onDone) {
+ var args;
+ switch (event) {
+ case 'animate':
+ args = [element, options.from, options.to, onDone];
+ break;
+
+ case 'setClass':
+ args = [element, classesToAdd, classesToRemove, onDone];
+ break;
+
+ case 'addClass':
+ args = [element, classesToAdd, onDone];
+ break;
+
+ case 'removeClass':
+ args = [element, classesToRemove, onDone];
+ break;
+
+ default:
+ args = [element, onDone];
+ break;
+ }
+
+ args.push(options);
+
+ var value = fn.apply(fn, args);
+ if (value) {
+ if (isFunction(value.start)) {
+ value = value.start();
+ }
+
+ if (value instanceof $$AnimateRunner) {
+ value.done(onDone);
+ } else if (isFunction(value)) {
+ // optional onEnd / onCancel callback
+ return value;
+ }
+ }
+
+ return noop;
+ }
+
+ function groupEventedAnimations(element, event, options, animations, fnName) {
+ var operations = [];
+ forEach(animations, function(ani) {
+ var animation = ani[fnName];
+ if (!animation) return;
+
+ // note that all of these animations will run in parallel
+ operations.push(function() {
+ var runner;
+ var endProgressCb;
+
+ var resolved = false;
+ var onAnimationComplete = function(rejected) {
+ if (!resolved) {
+ resolved = true;
+ (endProgressCb || noop)(rejected);
+ runner.complete(!rejected);
+ }
+ };
+
+ runner = new $$AnimateRunner({
+ end: function() {
+ onAnimationComplete();
+ },
+ cancel: function() {
+ onAnimationComplete(true);
+ }
+ });
+
+ endProgressCb = executeAnimationFn(animation, element, event, options, function(result) {
+ var cancelled = result === false;
+ onAnimationComplete(cancelled);
+ });
+
+ return runner;
+ });
+ });
+
+ return operations;
+ }
+
+ function packageAnimations(element, event, options, animations, fnName) {
+ var operations = groupEventedAnimations(element, event, options, animations, fnName);
+ if (operations.length === 0) {
+ var a,b;
+ if (fnName === 'beforeSetClass') {
+ a = groupEventedAnimations(element, 'removeClass', options, animations, 'beforeRemoveClass');
+ b = groupEventedAnimations(element, 'addClass', options, animations, 'beforeAddClass');
+ } else if (fnName === 'setClass') {
+ a = groupEventedAnimations(element, 'removeClass', options, animations, 'removeClass');
+ b = groupEventedAnimations(element, 'addClass', options, animations, 'addClass');
+ }
+
+ if (a) {
+ operations = operations.concat(a);
+ }
+ if (b) {
+ operations = operations.concat(b);
+ }
+ }
+
+ if (operations.length === 0) return;
+
+ // TODO(matsko): add documentation
+ return function startAnimation(callback) {
+ var runners = [];
+ if (operations.length) {
+ forEach(operations, function(animateFn) {
+ runners.push(animateFn());
+ });
+ }
+
+ runners.length ? $$AnimateRunner.all(runners, callback) : callback();
+
+ return function endFn(reject) {
+ forEach(runners, function(runner) {
+ reject ? runner.cancel() : runner.end();
+ });
+ };
+ };
+ }
+ };
+
+ function lookupAnimations(classes) {
+ classes = isArray(classes) ? classes : classes.split(' ');
+ var matches = [], flagMap = {};
+ for (var i=0; i < classes.length; i++) {
+ var klass = classes[i],
+ animationFactory = $animateProvider.$$registeredAnimations[klass];
+ if (animationFactory && !flagMap[klass]) {
+ matches.push($injector.get(animationFactory));
+ flagMap[klass] = true;
+ }
+ }
+ return matches;
+ }
+ }];
+}];
+
+var $$AnimateJsDriverProvider = ['$$animationProvider', function($$animationProvider) {
+ $$animationProvider.drivers.push('$$animateJsDriver');
+ this.$get = ['$$animateJs', '$$AnimateRunner', function($$animateJs, $$AnimateRunner) {
+ return function initDriverFn(animationDetails) {
+ if (animationDetails.from && animationDetails.to) {
+ var fromAnimation = prepareAnimation(animationDetails.from);
+ var toAnimation = prepareAnimation(animationDetails.to);
+ if (!fromAnimation && !toAnimation) return;
+
+ return {
+ start: function() {
+ var animationRunners = [];
+
+ if (fromAnimation) {
+ animationRunners.push(fromAnimation.start());
+ }
+
+ if (toAnimation) {
+ animationRunners.push(toAnimation.start());
+ }
+
+ $$AnimateRunner.all(animationRunners, done);
+
+ var runner = new $$AnimateRunner({
+ end: endFnFactory(),
+ cancel: endFnFactory()
+ });
+
+ return runner;
+
+ function endFnFactory() {
+ return function() {
+ forEach(animationRunners, function(runner) {
+ // at this point we cannot cancel animations for groups just yet. 1.5+
+ runner.end();
+ });
+ };
+ }
+
+ function done(status) {
+ runner.complete(status);
+ }
+ }
+ };
+ } else {
+ return prepareAnimation(animationDetails);
+ }
+ };
+
+ function prepareAnimation(animationDetails) {
+ // TODO(matsko): make sure to check for grouped animations and delegate down to normal animations
+ var element = animationDetails.element;
+ var event = animationDetails.event;
+ var options = animationDetails.options;
+ var classes = animationDetails.classes;
+ return $$animateJs(element, event, classes, options);
+ }
+ }];
+}];
+
+var NG_ANIMATE_ATTR_NAME = 'data-ng-animate';
+var NG_ANIMATE_PIN_DATA = '$ngAnimatePin';
+var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
+ var PRE_DIGEST_STATE = 1;
+ var RUNNING_STATE = 2;
+ var ONE_SPACE = ' ';
+
+ var rules = this.rules = {
+ skip: [],
+ cancel: [],
+ join: []
+ };
+
+ function makeTruthyCssClassMap(classString) {
+ if (!classString) {
+ return null;
+ }
+
+ var keys = classString.split(ONE_SPACE);
+ var map = Object.create(null);
+
+ forEach(keys, function(key) {
+ map[key] = true;
+ });
+ return map;
+ }
+
+ function hasMatchingClasses(newClassString, currentClassString) {
+ if (newClassString && currentClassString) {
+ var currentClassMap = makeTruthyCssClassMap(currentClassString);
+ return newClassString.split(ONE_SPACE).some(function(className) {
+ return currentClassMap[className];
+ });
+ }
+ }
+
+ function isAllowed(ruleType, element, currentAnimation, previousAnimation) {
+ return rules[ruleType].some(function(fn) {
+ return fn(element, currentAnimation, previousAnimation);
+ });
+ }
+
+ function hasAnimationClasses(animation, and) {
+ var a = (animation.addClass || '').length > 0;
+ var b = (animation.removeClass || '').length > 0;
+ return and ? a && b : a || b;
+ }
+
+ rules.join.push(function(element, newAnimation, currentAnimation) {
+ // if the new animation is class-based then we can just tack that on
+ return !newAnimation.structural && hasAnimationClasses(newAnimation);
+ });
+
+ rules.skip.push(function(element, newAnimation, currentAnimation) {
+ // there is no need to animate anything if no classes are being added and
+ // there is no structural animation that will be triggered
+ return !newAnimation.structural && !hasAnimationClasses(newAnimation);
+ });
+
+ rules.skip.push(function(element, newAnimation, currentAnimation) {
+ // why should we trigger a new structural animation if the element will
+ // be removed from the DOM anyway?
+ return currentAnimation.event == 'leave' && newAnimation.structural;
+ });
+
+ rules.skip.push(function(element, newAnimation, currentAnimation) {
+ // if there is an ongoing current animation then don't even bother running the class-based animation
+ return currentAnimation.structural && currentAnimation.state === RUNNING_STATE && !newAnimation.structural;
+ });
+
+ rules.cancel.push(function(element, newAnimation, currentAnimation) {
+ // there can never be two structural animations running at the same time
+ return currentAnimation.structural && newAnimation.structural;
+ });
+
+ rules.cancel.push(function(element, newAnimation, currentAnimation) {
+ // if the previous animation is already running, but the new animation will
+ // be triggered, but the new animation is structural
+ return currentAnimation.state === RUNNING_STATE && newAnimation.structural;
+ });
+
+ rules.cancel.push(function(element, newAnimation, currentAnimation) {
+ var nA = newAnimation.addClass;
+ var nR = newAnimation.removeClass;
+ var cA = currentAnimation.addClass;
+ var cR = currentAnimation.removeClass;
+
+ // early detection to save the global CPU shortage :)
+ if ((isUndefined(nA) && isUndefined(nR)) || (isUndefined(cA) && isUndefined(cR))) {
+ return false;
+ }
+
+ return hasMatchingClasses(nA, cR) || hasMatchingClasses(nR, cA);
+ });
+
+ this.$get = ['$$rAF', '$rootScope', '$rootElement', '$document', '$$HashMap',
+ '$$animation', '$$AnimateRunner', '$templateRequest', '$$jqLite', '$$forceReflow',
+ function($$rAF, $rootScope, $rootElement, $document, $$HashMap,
+ $$animation, $$AnimateRunner, $templateRequest, $$jqLite, $$forceReflow) {
+
+ var activeAnimationsLookup = new $$HashMap();
+ var disabledElementsLookup = new $$HashMap();
+ var animationsEnabled = null;
+
+ function postDigestTaskFactory() {
+ var postDigestCalled = false;
+ return function(fn) {
+ // we only issue a call to postDigest before
+ // it has first passed. This prevents any callbacks
+ // from not firing once the animation has completed
+ // since it will be out of the digest cycle.
+ if (postDigestCalled) {
+ fn();
+ } else {
+ $rootScope.$$postDigest(function() {
+ postDigestCalled = true;
+ fn();
+ });
+ }
+ };
+ }
+
+ // Wait until all directive and route-related templates are downloaded and
+ // compiled. The $templateRequest.totalPendingRequests variable keeps track of
+ // all of the remote templates being currently downloaded. If there are no
+ // templates currently downloading then the watcher will still fire anyway.
+ var deregisterWatch = $rootScope.$watch(
+ function() { return $templateRequest.totalPendingRequests === 0; },
+ function(isEmpty) {
+ if (!isEmpty) return;
+ deregisterWatch();
+
+ // Now that all templates have been downloaded, $animate will wait until
+ // the post digest queue is empty before enabling animations. By having two
+ // calls to $postDigest calls we can ensure that the flag is enabled at the
+ // very end of the post digest queue. Since all of the animations in $animate
+ // use $postDigest, it's important that the code below executes at the end.
+ // This basically means that the page is fully downloaded and compiled before
+ // any animations are triggered.
+ $rootScope.$$postDigest(function() {
+ $rootScope.$$postDigest(function() {
+ // we check for null directly in the event that the application already called
+ // .enabled() with whatever arguments that it provided it with
+ if (animationsEnabled === null) {
+ animationsEnabled = true;
+ }
+ });
+ });
+ }
+ );
+
+ var callbackRegistry = {};
+
+ // remember that the classNameFilter is set during the provider/config
+ // stage therefore we can optimize here and setup a helper function
+ var classNameFilter = $animateProvider.classNameFilter();
+ var isAnimatableClassName = !classNameFilter
+ ? function() { return true; }
+ : function(className) {
+ return classNameFilter.test(className);
+ };
+
+ var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
+
+ function normalizeAnimationDetails(element, animation) {
+ return mergeAnimationDetails(element, animation, {});
+ }
+
+ // IE9-11 has no method "contains" in SVG element and in Node.prototype. Bug #10259.
+ var contains = Node.prototype.contains || function(arg) {
+ // jshint bitwise: false
+ return this === arg || !!(this.compareDocumentPosition(arg) & 16);
+ // jshint bitwise: true
+ };
+
+ function findCallbacks(parent, element, event) {
+ var targetNode = getDomNode(element);
+ var targetParentNode = getDomNode(parent);
+
+ var matches = [];
+ var entries = callbackRegistry[event];
+ if (entries) {
+ forEach(entries, function(entry) {
+ if (contains.call(entry.node, targetNode)) {
+ matches.push(entry.callback);
+ } else if (event === 'leave' && contains.call(entry.node, targetParentNode)) {
+ matches.push(entry.callback);
+ }
+ });
+ }
+
+ return matches;
+ }
+
+ return {
+ on: function(event, container, callback) {
+ var node = extractElementNode(container);
+ callbackRegistry[event] = callbackRegistry[event] || [];
+ callbackRegistry[event].push({
+ node: node,
+ callback: callback
+ });
+ },
+
+ off: function(event, container, callback) {
+ var entries = callbackRegistry[event];
+ if (!entries) return;
+
+ callbackRegistry[event] = arguments.length === 1
+ ? null
+ : filterFromRegistry(entries, container, callback);
+
+ function filterFromRegistry(list, matchContainer, matchCallback) {
+ var containerNode = extractElementNode(matchContainer);
+ return list.filter(function(entry) {
+ var isMatch = entry.node === containerNode &&
+ (!matchCallback || entry.callback === matchCallback);
+ return !isMatch;
+ });
+ }
+ },
+
+ pin: function(element, parentElement) {
+ assertArg(isElement(element), 'element', 'not an element');
+ assertArg(isElement(parentElement), 'parentElement', 'not an element');
+ element.data(NG_ANIMATE_PIN_DATA, parentElement);
+ },
+
+ push: function(element, event, options, domOperation) {
+ options = options || {};
+ options.domOperation = domOperation;
+ return queueAnimation(element, event, options);
+ },
+
+ // this method has four signatures:
+ // () - global getter
+ // (bool) - global setter
+ // (element) - element getter
+ // (element, bool) - element setter
+ enabled: function(element, bool) {
+ var argCount = arguments.length;
+
+ if (argCount === 0) {
+ // () - Global getter
+ bool = !!animationsEnabled;
+ } else {
+ var hasElement = isElement(element);
+
+ if (!hasElement) {
+ // (bool) - Global setter
+ bool = animationsEnabled = !!element;
+ } else {
+ var node = getDomNode(element);
+ var recordExists = disabledElementsLookup.get(node);
+
+ if (argCount === 1) {
+ // (element) - Element getter
+ bool = !recordExists;
+ } else {
+ // (element, bool) - Element setter
+ disabledElementsLookup.put(node, !bool);
+ }
+ }
+ }
+
+ return bool;
+ }
+ };
+
+ function queueAnimation(element, event, initialOptions) {
+ // we always make a copy of the options since
+ // there should never be any side effects on
+ // the input data when running `$animateCss`.
+ var options = copy(initialOptions);
+
+ var node, parent;
+ element = stripCommentsFromElement(element);
+ if (element) {
+ node = getDomNode(element);
+ parent = element.parent();
+ }
+
+ options = prepareAnimationOptions(options);
+
+ // we create a fake runner with a working promise.
+ // These methods will become available after the digest has passed
+ var runner = new $$AnimateRunner();
+
+ // this is used to trigger callbacks in postDigest mode
+ var runInNextPostDigestOrNow = postDigestTaskFactory();
+
+ if (isArray(options.addClass)) {
+ options.addClass = options.addClass.join(' ');
+ }
+
+ if (options.addClass && !isString(options.addClass)) {
+ options.addClass = null;
+ }
+
+ if (isArray(options.removeClass)) {
+ options.removeClass = options.removeClass.join(' ');
+ }
+
+ if (options.removeClass && !isString(options.removeClass)) {
+ options.removeClass = null;
+ }
+
+ if (options.from && !isObject(options.from)) {
+ options.from = null;
+ }
+
+ if (options.to && !isObject(options.to)) {
+ options.to = null;
+ }
+
+ // there are situations where a directive issues an animation for
+ // a jqLite wrapper that contains only comment nodes... If this
+ // happens then there is no way we can perform an animation
+ if (!node) {
+ close();
+ return runner;
+ }
+
+ var className = [node.className, options.addClass, options.removeClass].join(' ');
+ if (!isAnimatableClassName(className)) {
+ close();
+ return runner;
+ }
+
+ var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0;
+
+ // this is a hard disable of all animations for the application or on
+ // the element itself, therefore there is no need to continue further
+ // past this point if not enabled
+ // Animations are also disabled if the document is currently hidden (page is not visible
+ // to the user), because browsers slow down or do not flush calls to requestAnimationFrame
+ var skipAnimations = !animationsEnabled || $document[0].hidden || disabledElementsLookup.get(node);
+ var existingAnimation = (!skipAnimations && activeAnimationsLookup.get(node)) || {};
+ var hasExistingAnimation = !!existingAnimation.state;
+
+ // there is no point in traversing the same collection of parent ancestors if a followup
+ // animation will be run on the same element that already did all that checking work
+ if (!skipAnimations && (!hasExistingAnimation || existingAnimation.state != PRE_DIGEST_STATE)) {
+ skipAnimations = !areAnimationsAllowed(element, parent, event);
+ }
+
+ if (skipAnimations) {
+ close();
+ return runner;
+ }
+
+ if (isStructural) {
+ closeChildAnimations(element);
+ }
+
+ var newAnimation = {
+ structural: isStructural,
+ element: element,
+ event: event,
+ addClass: options.addClass,
+ removeClass: options.removeClass,
+ close: close,
+ options: options,
+ runner: runner
+ };
+
+ if (hasExistingAnimation) {
+ var skipAnimationFlag = isAllowed('skip', element, newAnimation, existingAnimation);
+ if (skipAnimationFlag) {
+ if (existingAnimation.state === RUNNING_STATE) {
+ close();
+ return runner;
+ } else {
+ mergeAnimationDetails(element, existingAnimation, newAnimation);
+ return existingAnimation.runner;
+ }
+ }
+ var cancelAnimationFlag = isAllowed('cancel', element, newAnimation, existingAnimation);
+ if (cancelAnimationFlag) {
+ if (existingAnimation.state === RUNNING_STATE) {
+ // this will end the animation right away and it is safe
+ // to do so since the animation is already running and the
+ // runner callback code will run in async
+ existingAnimation.runner.end();
+ } else if (existingAnimation.structural) {
+ // this means that the animation is queued into a digest, but
+ // hasn't started yet. Therefore it is safe to run the close
+ // method which will call the runner methods in async.
+ existingAnimation.close();
+ } else {
+ // this will merge the new animation options into existing animation options
+ mergeAnimationDetails(element, existingAnimation, newAnimation);
+
+ return existingAnimation.runner;
+ }
+ } else {
+ // a joined animation means that this animation will take over the existing one
+ // so an example would involve a leave animation taking over an enter. Then when
+ // the postDigest kicks in the enter will be ignored.
+ var joinAnimationFlag = isAllowed('join', element, newAnimation, existingAnimation);
+ if (joinAnimationFlag) {
+ if (existingAnimation.state === RUNNING_STATE) {
+ normalizeAnimationDetails(element, newAnimation);
+ } else {
+ applyGeneratedPreparationClasses(element, isStructural ? event : null, options);
+
+ event = newAnimation.event = existingAnimation.event;
+ options = mergeAnimationDetails(element, existingAnimation, newAnimation);
+
+ //we return the same runner since only the option values of this animation will
+ //be fed into the `existingAnimation`.
+ return existingAnimation.runner;
+ }
+ }
+ }
+ } else {
+ // normalization in this case means that it removes redundant CSS classes that
+ // already exist (addClass) or do not exist (removeClass) on the element
+ normalizeAnimationDetails(element, newAnimation);
+ }
+
+ // when the options are merged and cleaned up we may end up not having to do
+ // an animation at all, therefore we should check this before issuing a post
+ // digest callback. Structural animations will always run no matter what.
+ var isValidAnimation = newAnimation.structural;
+ if (!isValidAnimation) {
+ // animate (from/to) can be quickly checked first, otherwise we check if any classes are present
+ isValidAnimation = (newAnimation.event === 'animate' && Object.keys(newAnimation.options.to || {}).length > 0)
+ || hasAnimationClasses(newAnimation);
+ }
+
+ if (!isValidAnimation) {
+ close();
+ clearElementAnimationState(element);
+ return runner;
+ }
+
+ // the counter keeps track of cancelled animations
+ var counter = (existingAnimation.counter || 0) + 1;
+ newAnimation.counter = counter;
+
+ markElementAnimationState(element, PRE_DIGEST_STATE, newAnimation);
+
+ $rootScope.$$postDigest(function() {
+ var animationDetails = activeAnimationsLookup.get(node);
+ var animationCancelled = !animationDetails;
+ animationDetails = animationDetails || {};
+
+ // if addClass/removeClass is called before something like enter then the
+ // registered parent element may not be present. The code below will ensure
+ // that a final value for parent element is obtained
+ var parentElement = element.parent() || [];
+
+ // animate/structural/class-based animations all have requirements. Otherwise there
+ // is no point in performing an animation. The parent node must also be set.
+ var isValidAnimation = parentElement.length > 0
+ && (animationDetails.event === 'animate'
+ || animationDetails.structural
+ || hasAnimationClasses(animationDetails));
+
+ // this means that the previous animation was cancelled
+ // even if the follow-up animation is the same event
+ if (animationCancelled || animationDetails.counter !== counter || !isValidAnimation) {
+ // if another animation did not take over then we need
+ // to make sure that the domOperation and options are
+ // handled accordingly
+ if (animationCancelled) {
+ applyAnimationClasses(element, options);
+ applyAnimationStyles(element, options);
+ }
+
+ // if the event changed from something like enter to leave then we do
+ // it, otherwise if it's the same then the end result will be the same too
+ if (animationCancelled || (isStructural && animationDetails.event !== event)) {
+ options.domOperation();
+ runner.end();
+ }
+
+ // in the event that the element animation was not cancelled or a follow-up animation
+ // isn't allowed to animate from here then we need to clear the state of the element
+ // so that any future animations won't read the expired animation data.
+ if (!isValidAnimation) {
+ clearElementAnimationState(element);
+ }
+
+ return;
+ }
+
+ // this combined multiple class to addClass / removeClass into a setClass event
+ // so long as a structural event did not take over the animation
+ event = !animationDetails.structural && hasAnimationClasses(animationDetails, true)
+ ? 'setClass'
+ : animationDetails.event;
+
+ markElementAnimationState(element, RUNNING_STATE);
+ var realRunner = $$animation(element, event, animationDetails.options);
+
+ realRunner.done(function(status) {
+ close(!status);
+ var animationDetails = activeAnimationsLookup.get(node);
+ if (animationDetails && animationDetails.counter === counter) {
+ clearElementAnimationState(getDomNode(element));
+ }
+ notifyProgress(runner, event, 'close', {});
+ });
+
+ // this will update the runner's flow-control events based on
+ // the `realRunner` object.
+ runner.setHost(realRunner);
+ notifyProgress(runner, event, 'start', {});
+ });
+
+ return runner;
+
+ function notifyProgress(runner, event, phase, data) {
+ runInNextPostDigestOrNow(function() {
+ var callbacks = findCallbacks(parent, element, event);
+ if (callbacks.length) {
+ // do not optimize this call here to RAF because
+ // we don't know how heavy the callback code here will
+ // be and if this code is buffered then this can
+ // lead to a performance regression.
+ $$rAF(function() {
+ forEach(callbacks, function(callback) {
+ callback(element, phase, data);
+ });
+ });
+ }
+ });
+ runner.progress(event, phase, data);
+ }
+
+ function close(reject) { // jshint ignore:line
+ clearGeneratedClasses(element, options);
+ applyAnimationClasses(element, options);
+ applyAnimationStyles(element, options);
+ options.domOperation();
+ runner.complete(!reject);
+ }
+ }
+
+ function closeChildAnimations(element) {
+ var node = getDomNode(element);
+ var children = node.querySelectorAll('[' + NG_ANIMATE_ATTR_NAME + ']');
+ forEach(children, function(child) {
+ var state = parseInt(child.getAttribute(NG_ANIMATE_ATTR_NAME));
+ var animationDetails = activeAnimationsLookup.get(child);
+ if (animationDetails) {
+ switch (state) {
+ case RUNNING_STATE:
+ animationDetails.runner.end();
+ /* falls through */
+ case PRE_DIGEST_STATE:
+ activeAnimationsLookup.remove(child);
+ break;
+ }
+ }
+ });
+ }
+
+ function clearElementAnimationState(element) {
+ var node = getDomNode(element);
+ node.removeAttribute(NG_ANIMATE_ATTR_NAME);
+ activeAnimationsLookup.remove(node);
+ }
+
+ function isMatchingElement(nodeOrElmA, nodeOrElmB) {
+ return getDomNode(nodeOrElmA) === getDomNode(nodeOrElmB);
+ }
+
+ /**
+ * This fn returns false if any of the following is true:
+ * a) animations on any parent element are disabled, and animations on the element aren't explicitly allowed
+ * b) a parent element has an ongoing structural animation, and animateChildren is false
+ * c) the element is not a child of the body
+ * d) the element is not a child of the $rootElement
+ */
+ function areAnimationsAllowed(element, parentElement, event) {
+ var bodyElement = jqLite($document[0].body);
+ var bodyElementDetected = isMatchingElement(element, bodyElement) || element[0].nodeName === 'HTML';
+ var rootElementDetected = isMatchingElement(element, $rootElement);
+ var parentAnimationDetected = false;
+ var animateChildren;
+ var elementDisabled = disabledElementsLookup.get(getDomNode(element));
+
+ var parentHost = element.data(NG_ANIMATE_PIN_DATA);
+ if (parentHost) {
+ parentElement = parentHost;
+ }
+
+ while (parentElement && parentElement.length) {
+ if (!rootElementDetected) {
+ // angular doesn't want to attempt to animate elements outside of the application
+ // therefore we need to ensure that the rootElement is an ancestor of the current element
+ rootElementDetected = isMatchingElement(parentElement, $rootElement);
+ }
+
+ var parentNode = parentElement[0];
+ if (parentNode.nodeType !== ELEMENT_NODE) {
+ // no point in inspecting the #document element
+ break;
+ }
+
+ var details = activeAnimationsLookup.get(parentNode) || {};
+ // either an enter, leave or move animation will commence
+ // therefore we can't allow any animations to take place
+ // but if a parent animation is class-based then that's ok
+ if (!parentAnimationDetected) {
+ var parentElementDisabled = disabledElementsLookup.get(parentNode);
+
+ if (parentElementDisabled === true && elementDisabled !== false) {
+ // disable animations if the user hasn't explicitly enabled animations on the
+ // current element
+ elementDisabled = true;
+ // element is disabled via parent element, no need to check anything else
+ break;
+ } else if (parentElementDisabled === false) {
+ elementDisabled = false;
+ }
+ parentAnimationDetected = details.structural;
+ }
+
+ if (isUndefined(animateChildren) || animateChildren === true) {
+ var value = parentElement.data(NG_ANIMATE_CHILDREN_DATA);
+ if (isDefined(value)) {
+ animateChildren = value;
+ }
+ }
+
+ // there is no need to continue traversing at this point
+ if (parentAnimationDetected && animateChildren === false) break;
+
+ if (!bodyElementDetected) {
+ // we also need to ensure that the element is or will be a part of the body element
+ // otherwise it is pointless to even issue an animation to be rendered
+ bodyElementDetected = isMatchingElement(parentElement, bodyElement);
+ }
+
+ if (bodyElementDetected && rootElementDetected) {
+ // If both body and root have been found, any other checks are pointless,
+ // as no animation data should live outside the application
+ break;
+ }
+
+ if (!rootElementDetected) {
+ // If no rootElement is detected, check if the parentElement is pinned to another element
+ parentHost = parentElement.data(NG_ANIMATE_PIN_DATA);
+ if (parentHost) {
+ // The pin target element becomes the next parent element
+ parentElement = parentHost;
+ continue;
+ }
+ }
+
+ parentElement = parentElement.parent();
+ }
+
+ var allowAnimation = (!parentAnimationDetected || animateChildren) && elementDisabled !== true;
+ return allowAnimation && rootElementDetected && bodyElementDetected;
+ }
+
+ function markElementAnimationState(element, state, details) {
+ details = details || {};
+ details.state = state;
+
+ var node = getDomNode(element);
+ node.setAttribute(NG_ANIMATE_ATTR_NAME, state);
+
+ var oldValue = activeAnimationsLookup.get(node);
+ var newValue = oldValue
+ ? extend(oldValue, details)
+ : details;
+ activeAnimationsLookup.put(node, newValue);
+ }
+ }];
+}];
+
+var $$AnimationProvider = ['$animateProvider', function($animateProvider) {
+ var NG_ANIMATE_REF_ATTR = 'ng-animate-ref';
+
+ var drivers = this.drivers = [];
+
+ var RUNNER_STORAGE_KEY = '$$animationRunner';
+
+ function setRunner(element, runner) {
+ element.data(RUNNER_STORAGE_KEY, runner);
+ }
+
+ function removeRunner(element) {
+ element.removeData(RUNNER_STORAGE_KEY);
+ }
+
+ function getRunner(element) {
+ return element.data(RUNNER_STORAGE_KEY);
+ }
+
+ this.$get = ['$$jqLite', '$rootScope', '$injector', '$$AnimateRunner', '$$HashMap', '$$rAFScheduler',
+ function($$jqLite, $rootScope, $injector, $$AnimateRunner, $$HashMap, $$rAFScheduler) {
+
+ var animationQueue = [];
+ var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
+
+ function sortAnimations(animations) {
+ var tree = { children: [] };
+ var i, lookup = new $$HashMap();
+
+ // this is done first beforehand so that the hashmap
+ // is filled with a list of the elements that will be animated
+ for (i = 0; i < animations.length; i++) {
+ var animation = animations[i];
+ lookup.put(animation.domNode, animations[i] = {
+ domNode: animation.domNode,
+ fn: animation.fn,
+ children: []
+ });
+ }
+
+ for (i = 0; i < animations.length; i++) {
+ processNode(animations[i]);
+ }
+
+ return flatten(tree);
+
+ function processNode(entry) {
+ if (entry.processed) return entry;
+ entry.processed = true;
+
+ var elementNode = entry.domNode;
+ var parentNode = elementNode.parentNode;
+ lookup.put(elementNode, entry);
+
+ var parentEntry;
+ while (parentNode) {
+ parentEntry = lookup.get(parentNode);
+ if (parentEntry) {
+ if (!parentEntry.processed) {
+ parentEntry = processNode(parentEntry);
+ }
+ break;
+ }
+ parentNode = parentNode.parentNode;
+ }
+
+ (parentEntry || tree).children.push(entry);
+ return entry;
+ }
+
+ function flatten(tree) {
+ var result = [];
+ var queue = [];
+ var i;
+
+ for (i = 0; i < tree.children.length; i++) {
+ queue.push(tree.children[i]);
+ }
+
+ var remainingLevelEntries = queue.length;
+ var nextLevelEntries = 0;
+ var row = [];
+
+ for (i = 0; i < queue.length; i++) {
+ var entry = queue[i];
+ if (remainingLevelEntries <= 0) {
+ remainingLevelEntries = nextLevelEntries;
+ nextLevelEntries = 0;
+ result.push(row);
+ row = [];
+ }
+ row.push(entry.fn);
+ entry.children.forEach(function(childEntry) {
+ nextLevelEntries++;
+ queue.push(childEntry);
+ });
+ remainingLevelEntries--;
+ }
+
+ if (row.length) {
+ result.push(row);
+ }
+
+ return result;
+ }
+ }
+
+ // TODO(matsko): document the signature in a better way
+ return function(element, event, options) {
+ options = prepareAnimationOptions(options);
+ var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0;
+
+ // there is no animation at the current moment, however
+ // these runner methods will get later updated with the
+ // methods leading into the driver's end/cancel methods
+ // for now they just stop the animation from starting
+ var runner = new $$AnimateRunner({
+ end: function() { close(); },
+ cancel: function() { close(true); }
+ });
+
+ if (!drivers.length) {
+ close();
+ return runner;
+ }
+
+ setRunner(element, runner);
+
+ var classes = mergeClasses(element.attr('class'), mergeClasses(options.addClass, options.removeClass));
+ var tempClasses = options.tempClasses;
+ if (tempClasses) {
+ classes += ' ' + tempClasses;
+ options.tempClasses = null;
+ }
+
+ var prepareClassName;
+ if (isStructural) {
+ prepareClassName = 'ng-' + event + PREPARE_CLASS_SUFFIX;
+ $$jqLite.addClass(element, prepareClassName);
+ }
+
+ animationQueue.push({
+ // this data is used by the postDigest code and passed into
+ // the driver step function
+ element: element,
+ classes: classes,
+ event: event,
+ structural: isStructural,
+ options: options,
+ beforeStart: beforeStart,
+ close: close
+ });
+
+ element.on('$destroy', handleDestroyedElement);
+
+ // we only want there to be one function called within the post digest
+ // block. This way we can group animations for all the animations that
+ // were apart of the same postDigest flush call.
+ if (animationQueue.length > 1) return runner;
+
+ $rootScope.$$postDigest(function() {
+ var animations = [];
+ forEach(animationQueue, function(entry) {
+ // the element was destroyed early on which removed the runner
+ // form its storage. This means we can't animate this element
+ // at all and it already has been closed due to destruction.
+ if (getRunner(entry.element)) {
+ animations.push(entry);
+ } else {
+ entry.close();
+ }
+ });
+
+ // now any future animations will be in another postDigest
+ animationQueue.length = 0;
+
+ var groupedAnimations = groupAnimations(animations);
+ var toBeSortedAnimations = [];
+
+ forEach(groupedAnimations, function(animationEntry) {
+ toBeSortedAnimations.push({
+ domNode: getDomNode(animationEntry.from ? animationEntry.from.element : animationEntry.element),
+ fn: function triggerAnimationStart() {
+ // it's important that we apply the `ng-animate` CSS class and the
+ // temporary classes before we do any driver invoking since these
+ // CSS classes may be required for proper CSS detection.
+ animationEntry.beforeStart();
+
+ var startAnimationFn, closeFn = animationEntry.close;
+
+ // in the event that the element was removed before the digest runs or
+ // during the RAF sequencing then we should not trigger the animation.
+ var targetElement = animationEntry.anchors
+ ? (animationEntry.from.element || animationEntry.to.element)
+ : animationEntry.element;
+
+ if (getRunner(targetElement)) {
+ var operation = invokeFirstDriver(animationEntry);
+ if (operation) {
+ startAnimationFn = operation.start;
+ }
+ }
+
+ if (!startAnimationFn) {
+ closeFn();
+ } else {
+ var animationRunner = startAnimationFn();
+ animationRunner.done(function(status) {
+ closeFn(!status);
+ });
+ updateAnimationRunners(animationEntry, animationRunner);
+ }
+ }
+ });
+ });
+
+ // we need to sort each of the animations in order of parent to child
+ // relationships. This ensures that the child classes are applied at the
+ // right time.
+ $$rAFScheduler(sortAnimations(toBeSortedAnimations));
+ });
+
+ return runner;
+
+ // TODO(matsko): change to reference nodes
+ function getAnchorNodes(node) {
+ var SELECTOR = '[' + NG_ANIMATE_REF_ATTR + ']';
+ var items = node.hasAttribute(NG_ANIMATE_REF_ATTR)
+ ? [node]
+ : node.querySelectorAll(SELECTOR);
+ var anchors = [];
+ forEach(items, function(node) {
+ var attr = node.getAttribute(NG_ANIMATE_REF_ATTR);
+ if (attr && attr.length) {
+ anchors.push(node);
+ }
+ });
+ return anchors;
+ }
+
+ function groupAnimations(animations) {
+ var preparedAnimations = [];
+ var refLookup = {};
+ forEach(animations, function(animation, index) {
+ var element = animation.element;
+ var node = getDomNode(element);
+ var event = animation.event;
+ var enterOrMove = ['enter', 'move'].indexOf(event) >= 0;
+ var anchorNodes = animation.structural ? getAnchorNodes(node) : [];
+
+ if (anchorNodes.length) {
+ var direction = enterOrMove ? 'to' : 'from';
+
+ forEach(anchorNodes, function(anchor) {
+ var key = anchor.getAttribute(NG_ANIMATE_REF_ATTR);
+ refLookup[key] = refLookup[key] || {};
+ refLookup[key][direction] = {
+ animationID: index,
+ element: jqLite(anchor)
+ };
+ });
+ } else {
+ preparedAnimations.push(animation);
+ }
+ });
+
+ var usedIndicesLookup = {};
+ var anchorGroups = {};
+ forEach(refLookup, function(operations, key) {
+ var from = operations.from;
+ var to = operations.to;
+
+ if (!from || !to) {
+ // only one of these is set therefore we can't have an
+ // anchor animation since all three pieces are required
+ var index = from ? from.animationID : to.animationID;
+ var indexKey = index.toString();
+ if (!usedIndicesLookup[indexKey]) {
+ usedIndicesLookup[indexKey] = true;
+ preparedAnimations.push(animations[index]);
+ }
+ return;
+ }
+
+ var fromAnimation = animations[from.animationID];
+ var toAnimation = animations[to.animationID];
+ var lookupKey = from.animationID.toString();
+ if (!anchorGroups[lookupKey]) {
+ var group = anchorGroups[lookupKey] = {
+ structural: true,
+ beforeStart: function() {
+ fromAnimation.beforeStart();
+ toAnimation.beforeStart();
+ },
+ close: function() {
+ fromAnimation.close();
+ toAnimation.close();
+ },
+ classes: cssClassesIntersection(fromAnimation.classes, toAnimation.classes),
+ from: fromAnimation,
+ to: toAnimation,
+ anchors: [] // TODO(matsko): change to reference nodes
+ };
+
+ // the anchor animations require that the from and to elements both have at least
+ // one shared CSS class which effectively marries the two elements together to use
+ // the same animation driver and to properly sequence the anchor animation.
+ if (group.classes.length) {
+ preparedAnimations.push(group);
+ } else {
+ preparedAnimations.push(fromAnimation);
+ preparedAnimations.push(toAnimation);
+ }
+ }
+
+ anchorGroups[lookupKey].anchors.push({
+ 'out': from.element, 'in': to.element
+ });
+ });
+
+ return preparedAnimations;
+ }
+
+ function cssClassesIntersection(a,b) {
+ a = a.split(' ');
+ b = b.split(' ');
+ var matches = [];
+
+ for (var i = 0; i < a.length; i++) {
+ var aa = a[i];
+ if (aa.substring(0,3) === 'ng-') continue;
+
+ for (var j = 0; j < b.length; j++) {
+ if (aa === b[j]) {
+ matches.push(aa);
+ break;
+ }
+ }
+ }
+
+ return matches.join(' ');
+ }
+
+ function invokeFirstDriver(animationDetails) {
+ // we loop in reverse order since the more general drivers (like CSS and JS)
+ // may attempt more elements, but custom drivers are more particular
+ for (var i = drivers.length - 1; i >= 0; i--) {
+ var driverName = drivers[i];
+ if (!$injector.has(driverName)) continue; // TODO(matsko): remove this check
+
+ var factory = $injector.get(driverName);
+ var driver = factory(animationDetails);
+ if (driver) {
+ return driver;
+ }
+ }
+ }
+
+ function beforeStart() {
+ element.addClass(NG_ANIMATE_CLASSNAME);
+ if (tempClasses) {
+ $$jqLite.addClass(element, tempClasses);
+ }
+ if (prepareClassName) {
+ $$jqLite.removeClass(element, prepareClassName);
+ prepareClassName = null;
+ }
+ }
+
+ function updateAnimationRunners(animation, newRunner) {
+ if (animation.from && animation.to) {
+ update(animation.from.element);
+ update(animation.to.element);
+ } else {
+ update(animation.element);
+ }
+
+ function update(element) {
+ getRunner(element).setHost(newRunner);
+ }
+ }
+
+ function handleDestroyedElement() {
+ var runner = getRunner(element);
+ if (runner && (event !== 'leave' || !options.$$domOperationFired)) {
+ runner.end();
+ }
+ }
+
+ function close(rejected) { // jshint ignore:line
+ element.off('$destroy', handleDestroyedElement);
+ removeRunner(element);
+
+ applyAnimationClasses(element, options);
+ applyAnimationStyles(element, options);
+ options.domOperation();
+
+ if (tempClasses) {
+ $$jqLite.removeClass(element, tempClasses);
+ }
+
+ element.removeClass(NG_ANIMATE_CLASSNAME);
+ runner.complete(!rejected);
+ }
+ };
+ }];
+}];
+
+/**
+ * @ngdoc directive
+ * @name ngAnimateSwap
+ * @restrict A
+ * @scope
+ *
+ * @description
+ *
+ * ngAnimateSwap is a animation-oriented directive that allows for the container to
+ * be removed and entered in whenever the associated expression changes. A
+ * common usecase for this directive is a rotating banner component which
+ * contains one image being present at a time. When the active image changes
+ * then the old image will perform a `leave` animation and the new element
+ * will be inserted via an `enter` animation.
+ *
+ * @example
+ *
+ *
+ *
+ *
+ * {{ number }}
+ *
+ *
+ *
+ *
+ * angular.module('ngAnimateSwapExample', ['ngAnimate'])
+ * .controller('AppCtrl', ['$scope', '$interval', function($scope, $interval) {
+ * $scope.number = 0;
+ * $interval(function() {
+ * $scope.number++;
+ * }, 1000);
+ *
+ * var colors = ['red','blue','green','yellow','orange'];
+ * $scope.colorClass = function(number) {
+ * return colors[number % colors.length];
+ * };
+ * }]);
+ *
+ *
+ * .container {
+ * height:250px;
+ * width:250px;
+ * position:relative;
+ * overflow:hidden;
+ * border:2px solid black;
+ * }
+ * .container .cell {
+ * font-size:150px;
+ * text-align:center;
+ * line-height:250px;
+ * position:absolute;
+ * top:0;
+ * left:0;
+ * right:0;
+ * border-bottom:2px solid black;
+ * }
+ * .swap-animation.ng-enter, .swap-animation.ng-leave {
+ * transition:0.5s linear all;
+ * }
+ * .swap-animation.ng-enter {
+ * top:-250px;
+ * }
+ * .swap-animation.ng-enter-active {
+ * top:0px;
+ * }
+ * .swap-animation.ng-leave {
+ * top:0px;
+ * }
+ * .swap-animation.ng-leave-active {
+ * top:250px;
+ * }
+ * .red { background:red; }
+ * .green { background:green; }
+ * .blue { background:blue; }
+ * .yellow { background:yellow; }
+ * .orange { background:orange; }
+ *
+ *
+ */
+var ngAnimateSwapDirective = ['$animate', '$rootScope', function($animate, $rootScope) {
+ return {
+ restrict: 'A',
+ transclude: 'element',
+ terminal: true,
+ priority: 600, // we use 600 here to ensure that the directive is caught before others
+ link: function(scope, $element, attrs, ctrl, $transclude) {
+ var previousElement, previousScope;
+ scope.$watchCollection(attrs.ngAnimateSwap || attrs['for'], function(value) {
+ if (previousElement) {
+ $animate.leave(previousElement);
+ }
+ if (previousScope) {
+ previousScope.$destroy();
+ previousScope = null;
+ }
+ if (value || value === 0) {
+ previousScope = scope.$new();
+ $transclude(previousScope, function(element) {
+ previousElement = element;
+ $animate.enter(element, null, $element);
+ });
+ }
+ });
+ }
+ };
+}];
+
+/* global angularAnimateModule: true,
+
+ ngAnimateSwapDirective,
+ $$AnimateAsyncRunFactory,
+ $$rAFSchedulerFactory,
+ $$AnimateChildrenDirective,
+ $$AnimateQueueProvider,
+ $$AnimationProvider,
+ $AnimateCssProvider,
+ $$AnimateCssDriverProvider,
+ $$AnimateJsProvider,
+ $$AnimateJsDriverProvider,
+*/
+
+/**
+ * @ngdoc module
+ * @name ngAnimate
+ * @description
+ *
+ * The `ngAnimate` module provides support for CSS-based animations (keyframes and transitions) as well as JavaScript-based animations via
+ * callback hooks. Animations are not enabled by default, however, by including `ngAnimate` the animation hooks are enabled for an Angular app.
+ *
+ *
+ *
+ * # Usage
+ * Simply put, there are two ways to make use of animations when ngAnimate is used: by using **CSS** and **JavaScript**. The former works purely based
+ * using CSS (by using matching CSS selectors/styles) and the latter triggers animations that are registered via `module.animation()`. For
+ * both CSS and JS animations the sole requirement is to have a matching `CSS class` that exists both in the registered animation and within
+ * the HTML element that the animation will be triggered on.
+ *
+ * ## Directive Support
+ * The following directives are "animation aware":
+ *
+ * | Directive | Supported Animations |
+ * |----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|
+ * | {@link ng.directive:ngRepeat#animations ngRepeat} | enter, leave and move |
+ * | {@link ngRoute.directive:ngView#animations ngView} | enter and leave |
+ * | {@link ng.directive:ngInclude#animations ngInclude} | enter and leave |
+ * | {@link ng.directive:ngSwitch#animations ngSwitch} | enter and leave |
+ * | {@link ng.directive:ngIf#animations ngIf} | enter and leave |
+ * | {@link ng.directive:ngClass#animations ngClass} | add and remove (the CSS class(es) present) |
+ * | {@link ng.directive:ngShow#animations ngShow} & {@link ng.directive:ngHide#animations ngHide} | add and remove (the ng-hide class value) |
+ * | {@link ng.directive:form#animation-hooks form} & {@link ng.directive:ngModel#animation-hooks ngModel} | add and remove (dirty, pristine, valid, invalid & all other validations) |
+ * | {@link module:ngMessages#animations ngMessages} | add and remove (ng-active & ng-inactive) |
+ * | {@link module:ngMessages#animations ngMessage} | enter and leave |
+ *
+ * (More information can be found by visiting each the documentation associated with each directive.)
+ *
+ * ## CSS-based Animations
+ *
+ * CSS-based animations with ngAnimate are unique since they require no JavaScript code at all. By using a CSS class that we reference between our HTML
+ * and CSS code we can create an animation that will be picked up by Angular when an the underlying directive performs an operation.
+ *
+ * The example below shows how an `enter` animation can be made possible on an element using `ng-if`:
+ *
+ * ```html
+ *
+ * Fade me in out
+ *
+ * Fade In!
+ * Fade Out!
+ * ```
+ *
+ * Notice the CSS class **fade**? We can now create the CSS transition code that references this class:
+ *
+ * ```css
+ * /* The starting CSS styles for the enter animation */
+ * .fade.ng-enter {
+ * transition:0.5s linear all;
+ * opacity:0;
+ * }
+ *
+ * /* The finishing CSS styles for the enter animation */
+ * .fade.ng-enter.ng-enter-active {
+ * opacity:1;
+ * }
+ * ```
+ *
+ * The key thing to remember here is that, depending on the animation event (which each of the directives above trigger depending on what's going on) two
+ * generated CSS classes will be applied to the element; in the example above we have `.ng-enter` and `.ng-enter-active`. For CSS transitions, the transition
+ * code **must** be defined within the starting CSS class (in this case `.ng-enter`). The destination class is what the transition will animate towards.
+ *
+ * If for example we wanted to create animations for `leave` and `move` (ngRepeat triggers move) then we can do so using the same CSS naming conventions:
+ *
+ * ```css
+ * /* now the element will fade out before it is removed from the DOM */
+ * .fade.ng-leave {
+ * transition:0.5s linear all;
+ * opacity:1;
+ * }
+ * .fade.ng-leave.ng-leave-active {
+ * opacity:0;
+ * }
+ * ```
+ *
+ * We can also make use of **CSS Keyframes** by referencing the keyframe animation within the starting CSS class:
+ *
+ * ```css
+ * /* there is no need to define anything inside of the destination
+ * CSS class since the keyframe will take charge of the animation */
+ * .fade.ng-leave {
+ * animation: my_fade_animation 0.5s linear;
+ * -webkit-animation: my_fade_animation 0.5s linear;
+ * }
+ *
+ * @keyframes my_fade_animation {
+ * from { opacity:1; }
+ * to { opacity:0; }
+ * }
+ *
+ * @-webkit-keyframes my_fade_animation {
+ * from { opacity:1; }
+ * to { opacity:0; }
+ * }
+ * ```
+ *
+ * Feel free also mix transitions and keyframes together as well as any other CSS classes on the same element.
+ *
+ * ### CSS Class-based Animations
+ *
+ * Class-based animations (animations that are triggered via `ngClass`, `ngShow`, `ngHide` and some other directives) have a slightly different
+ * naming convention. Class-based animations are basic enough that a standard transition or keyframe can be referenced on the class being added
+ * and removed.
+ *
+ * For example if we wanted to do a CSS animation for `ngHide` then we place an animation on the `.ng-hide` CSS class:
+ *
+ * ```html
+ *
+ * Show and hide me
+ *
+ * Toggle
+ *
+ *
+ * ```
+ *
+ * All that is going on here with ngShow/ngHide behind the scenes is the `.ng-hide` class is added/removed (when the hidden state is valid). Since
+ * ngShow and ngHide are animation aware then we can match up a transition and ngAnimate handles the rest.
+ *
+ * In addition the addition and removal of the CSS class, ngAnimate also provides two helper methods that we can use to further decorate the animation
+ * with CSS styles.
+ *
+ * ```html
+ *
+ * Highlight this box
+ *
+ * Toggle
+ *
+ *
+ * ```
+ *
+ * We can also make use of CSS keyframes by placing them within the CSS classes.
+ *
+ *
+ * ### CSS Staggering Animations
+ * A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a
+ * curtain-like effect. The ngAnimate module (versions >=1.2) supports staggering animations and the stagger effect can be
+ * performed by creating a **ng-EVENT-stagger** CSS class and attaching that class to the base CSS class used for
+ * the animation. The style property expected within the stagger class can either be a **transition-delay** or an
+ * **animation-delay** property (or both if your animation contains both transitions and keyframe animations).
+ *
+ * ```css
+ * .my-animation.ng-enter {
+ * /* standard transition code */
+ * transition: 1s linear all;
+ * opacity:0;
+ * }
+ * .my-animation.ng-enter-stagger {
+ * /* this will have a 100ms delay between each successive leave animation */
+ * transition-delay: 0.1s;
+ *
+ * /* As of 1.4.4, this must always be set: it signals ngAnimate
+ * to not accidentally inherit a delay property from another CSS class */
+ * transition-duration: 0s;
+ * }
+ * .my-animation.ng-enter.ng-enter-active {
+ * /* standard transition styles */
+ * opacity:1;
+ * }
+ * ```
+ *
+ * Staggering animations work by default in ngRepeat (so long as the CSS class is defined). Outside of ngRepeat, to use staggering animations
+ * on your own, they can be triggered by firing multiple calls to the same event on $animate. However, the restrictions surrounding this
+ * are that each of the elements must have the same CSS className value as well as the same parent element. A stagger operation
+ * will also be reset if one or more animation frames have passed since the multiple calls to `$animate` were fired.
+ *
+ * The following code will issue the **ng-leave-stagger** event on the element provided:
+ *
+ * ```js
+ * var kids = parent.children();
+ *
+ * $animate.leave(kids[0]); //stagger index=0
+ * $animate.leave(kids[1]); //stagger index=1
+ * $animate.leave(kids[2]); //stagger index=2
+ * $animate.leave(kids[3]); //stagger index=3
+ * $animate.leave(kids[4]); //stagger index=4
+ *
+ * window.requestAnimationFrame(function() {
+ * //stagger has reset itself
+ * $animate.leave(kids[5]); //stagger index=0
+ * $animate.leave(kids[6]); //stagger index=1
+ *
+ * $scope.$digest();
+ * });
+ * ```
+ *
+ * Stagger animations are currently only supported within CSS-defined animations.
+ *
+ * ### The `ng-animate` CSS class
+ *
+ * When ngAnimate is animating an element it will apply the `ng-animate` CSS class to the element for the duration of the animation.
+ * This is a temporary CSS class and it will be removed once the animation is over (for both JavaScript and CSS-based animations).
+ *
+ * Therefore, animations can be applied to an element using this temporary class directly via CSS.
+ *
+ * ```css
+ * .zipper.ng-animate {
+ * transition:0.5s linear all;
+ * }
+ * .zipper.ng-enter {
+ * opacity:0;
+ * }
+ * .zipper.ng-enter.ng-enter-active {
+ * opacity:1;
+ * }
+ * .zipper.ng-leave {
+ * opacity:1;
+ * }
+ * .zipper.ng-leave.ng-leave-active {
+ * opacity:0;
+ * }
+ * ```
+ *
+ * (Note that the `ng-animate` CSS class is reserved and it cannot be applied on an element directly since ngAnimate will always remove
+ * the CSS class once an animation has completed.)
+ *
+ *
+ * ### The `ng-[event]-prepare` class
+ *
+ * This is a special class that can be used to prevent unwanted flickering / flash of content before
+ * the actual animation starts. The class is added as soon as an animation is initialized, but removed
+ * before the actual animation starts (after waiting for a $digest).
+ * It is also only added for *structural* animations (`enter`, `move`, and `leave`).
+ *
+ * In practice, flickering can appear when nesting elements with structural animations such as `ngIf`
+ * into elements that have class-based animations such as `ngClass`.
+ *
+ * ```html
+ *
+ * ```
+ *
+ * It is possible that during the `enter` animation, the `.message` div will be briefly visible before it starts animating.
+ * In that case, you can add styles to the CSS that make sure the element stays hidden before the animation starts:
+ *
+ * ```css
+ * .message.ng-enter-prepare {
+ * opacity: 0;
+ * }
+ *
+ * ```
+ *
+ * ## JavaScript-based Animations
+ *
+ * ngAnimate also allows for animations to be consumed by JavaScript code. The approach is similar to CSS-based animations (where there is a shared
+ * CSS class that is referenced in our HTML code) but in addition we need to register the JavaScript animation on the module. By making use of the
+ * `module.animation()` module function we can register the animation.
+ *
+ * Let's see an example of a enter/leave animation using `ngRepeat`:
+ *
+ * ```html
+ *
+ * {{ item }}
+ *
+ * ```
+ *
+ * See the **slide** CSS class? Let's use that class to define an animation that we'll structure in our module code by using `module.animation`:
+ *
+ * ```js
+ * myModule.animation('.slide', [function() {
+ * return {
+ * // make note that other events (like addClass/removeClass)
+ * // have different function input parameters
+ * enter: function(element, doneFn) {
+ * jQuery(element).fadeIn(1000, doneFn);
+ *
+ * // remember to call doneFn so that angular
+ * // knows that the animation has concluded
+ * },
+ *
+ * move: function(element, doneFn) {
+ * jQuery(element).fadeIn(1000, doneFn);
+ * },
+ *
+ * leave: function(element, doneFn) {
+ * jQuery(element).fadeOut(1000, doneFn);
+ * }
+ * }
+ * }]);
+ * ```
+ *
+ * The nice thing about JS-based animations is that we can inject other services and make use of advanced animation libraries such as
+ * greensock.js and velocity.js.
+ *
+ * If our animation code class-based (meaning that something like `ngClass`, `ngHide` and `ngShow` triggers it) then we can still define
+ * our animations inside of the same registered animation, however, the function input arguments are a bit different:
+ *
+ * ```html
+ *
+ * this box is moody
+ *
+ * Change to red
+ * Change to blue
+ * Change to green
+ * ```
+ *
+ * ```js
+ * myModule.animation('.colorful', [function() {
+ * return {
+ * addClass: function(element, className, doneFn) {
+ * // do some cool animation and call the doneFn
+ * },
+ * removeClass: function(element, className, doneFn) {
+ * // do some cool animation and call the doneFn
+ * },
+ * setClass: function(element, addedClass, removedClass, doneFn) {
+ * // do some cool animation and call the doneFn
+ * }
+ * }
+ * }]);
+ * ```
+ *
+ * ## CSS + JS Animations Together
+ *
+ * AngularJS 1.4 and higher has taken steps to make the amalgamation of CSS and JS animations more flexible. However, unlike earlier versions of Angular,
+ * defining CSS and JS animations to work off of the same CSS class will not work anymore. Therefore the example below will only result in **JS animations taking
+ * charge of the animation**:
+ *
+ * ```html
+ *
+ * Slide in and out
+ *
+ * ```
+ *
+ * ```js
+ * myModule.animation('.slide', [function() {
+ * return {
+ * enter: function(element, doneFn) {
+ * jQuery(element).slideIn(1000, doneFn);
+ * }
+ * }
+ * }]);
+ * ```
+ *
+ * ```css
+ * .slide.ng-enter {
+ * transition:0.5s linear all;
+ * transform:translateY(-100px);
+ * }
+ * .slide.ng-enter.ng-enter-active {
+ * transform:translateY(0);
+ * }
+ * ```
+ *
+ * Does this mean that CSS and JS animations cannot be used together? Do JS-based animations always have higher priority? We can make up for the
+ * lack of CSS animations by using the `$animateCss` service to trigger our own tweaked-out, CSS-based animations directly from
+ * our own JS-based animation code:
+ *
+ * ```js
+ * myModule.animation('.slide', ['$animateCss', function($animateCss) {
+ * return {
+ * enter: function(element) {
+* // this will trigger `.slide.ng-enter` and `.slide.ng-enter-active`.
+ * return $animateCss(element, {
+ * event: 'enter',
+ * structural: true
+ * });
+ * }
+ * }
+ * }]);
+ * ```
+ *
+ * The nice thing here is that we can save bandwidth by sticking to our CSS-based animation code and we don't need to rely on a 3rd-party animation framework.
+ *
+ * The `$animateCss` service is very powerful since we can feed in all kinds of extra properties that will be evaluated and fed into a CSS transition or
+ * keyframe animation. For example if we wanted to animate the height of an element while adding and removing classes then we can do so by providing that
+ * data into `$animateCss` directly:
+ *
+ * ```js
+ * myModule.animation('.slide', ['$animateCss', function($animateCss) {
+ * return {
+ * enter: function(element) {
+ * return $animateCss(element, {
+ * event: 'enter',
+ * structural: true,
+ * addClass: 'maroon-setting',
+ * from: { height:0 },
+ * to: { height: 200 }
+ * });
+ * }
+ * }
+ * }]);
+ * ```
+ *
+ * Now we can fill in the rest via our transition CSS code:
+ *
+ * ```css
+ * /* the transition tells ngAnimate to make the animation happen */
+ * .slide.ng-enter { transition:0.5s linear all; }
+ *
+ * /* this extra CSS class will be absorbed into the transition
+ * since the $animateCss code is adding the class */
+ * .maroon-setting { background:red; }
+ * ```
+ *
+ * And `$animateCss` will figure out the rest. Just make sure to have the `done()` callback fire the `doneFn` function to signal when the animation is over.
+ *
+ * To learn more about what's possible be sure to visit the {@link ngAnimate.$animateCss $animateCss service}.
+ *
+ * ## Animation Anchoring (via `ng-animate-ref`)
+ *
+ * ngAnimate in AngularJS 1.4 comes packed with the ability to cross-animate elements between
+ * structural areas of an application (like views) by pairing up elements using an attribute
+ * called `ng-animate-ref`.
+ *
+ * Let's say for example we have two views that are managed by `ng-view` and we want to show
+ * that there is a relationship between two components situated in within these views. By using the
+ * `ng-animate-ref` attribute we can identify that the two components are paired together and we
+ * can then attach an animation, which is triggered when the view changes.
+ *
+ * Say for example we have the following template code:
+ *
+ * ```html
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * ```
+ *
+ * Now, when the view changes (once the link is clicked), ngAnimate will examine the
+ * HTML contents to see if there is a match reference between any components in the view
+ * that is leaving and the view that is entering. It will scan both the view which is being
+ * removed (leave) and inserted (enter) to see if there are any paired DOM elements that
+ * contain a matching ref value.
+ *
+ * The two images match since they share the same ref value. ngAnimate will now create a
+ * transport element (which is a clone of the first image element) and it will then attempt
+ * to animate to the position of the second image element in the next view. For the animation to
+ * work a special CSS class called `ng-anchor` will be added to the transported element.
+ *
+ * We can now attach a transition onto the `.banner.ng-anchor` CSS class and then
+ * ngAnimate will handle the entire transition for us as well as the addition and removal of
+ * any changes of CSS classes between the elements:
+ *
+ * ```css
+ * .banner.ng-anchor {
+ * /* this animation will last for 1 second since there are
+ * two phases to the animation (an `in` and an `out` phase) */
+ * transition:0.5s linear all;
+ * }
+ * ```
+ *
+ * We also **must** include animations for the views that are being entered and removed
+ * (otherwise anchoring wouldn't be possible since the new view would be inserted right away).
+ *
+ * ```css
+ * .view-animation.ng-enter, .view-animation.ng-leave {
+ * transition:0.5s linear all;
+ * position:fixed;
+ * left:0;
+ * top:0;
+ * width:100%;
+ * }
+ * .view-animation.ng-enter {
+ * transform:translateX(100%);
+ * }
+ * .view-animation.ng-leave,
+ * .view-animation.ng-enter.ng-enter-active {
+ * transform:translateX(0%);
+ * }
+ * .view-animation.ng-leave.ng-leave-active {
+ * transform:translateX(-100%);
+ * }
+ * ```
+ *
+ * Now we can jump back to the anchor animation. When the animation happens, there are two stages that occur:
+ * an `out` and an `in` stage. The `out` stage happens first and that is when the element is animated away
+ * from its origin. Once that animation is over then the `in` stage occurs which animates the
+ * element to its destination. The reason why there are two animations is to give enough time
+ * for the enter animation on the new element to be ready.
+ *
+ * The example above sets up a transition for both the in and out phases, but we can also target the out or
+ * in phases directly via `ng-anchor-out` and `ng-anchor-in`.
+ *
+ * ```css
+ * .banner.ng-anchor-out {
+ * transition: 0.5s linear all;
+ *
+ * /* the scale will be applied during the out animation,
+ * but will be animated away when the in animation runs */
+ * transform: scale(1.2);
+ * }
+ *
+ * .banner.ng-anchor-in {
+ * transition: 1s linear all;
+ * }
+ * ```
+ *
+ *
+ *
+ *
+ * ### Anchoring Demo
+ *
+
+
+ Home
+
+
+
+
+ angular.module('anchoringExample', ['ngAnimate', 'ngRoute'])
+ .config(['$routeProvider', function($routeProvider) {
+ $routeProvider.when('/', {
+ templateUrl: 'home.html',
+ controller: 'HomeController as home'
+ });
+ $routeProvider.when('/profile/:id', {
+ templateUrl: 'profile.html',
+ controller: 'ProfileController as profile'
+ });
+ }])
+ .run(['$rootScope', function($rootScope) {
+ $rootScope.records = [
+ { id:1, title: "Miss Beulah Roob" },
+ { id:2, title: "Trent Morissette" },
+ { id:3, title: "Miss Ava Pouros" },
+ { id:4, title: "Rod Pouros" },
+ { id:5, title: "Abdul Rice" },
+ { id:6, title: "Laurie Rutherford Sr." },
+ { id:7, title: "Nakia McLaughlin" },
+ { id:8, title: "Jordon Blanda DVM" },
+ { id:9, title: "Rhoda Hand" },
+ { id:10, title: "Alexandrea Sauer" }
+ ];
+ }])
+ .controller('HomeController', [function() {
+ //empty
+ }])
+ .controller('ProfileController', ['$rootScope', '$routeParams', function($rootScope, $routeParams) {
+ var index = parseInt($routeParams.id, 10);
+ var record = $rootScope.records[index - 1];
+
+ this.title = record.title;
+ this.id = record.id;
+ }]);
+
+
+ Welcome to the home page
+ Please click on an element
+
+ {{ record.title }}
+
+
+
+
+ {{ profile.title }}
+
+
+
+ .record {
+ display:block;
+ font-size:20px;
+ }
+ .profile {
+ background:black;
+ color:white;
+ font-size:100px;
+ }
+ .view-container {
+ position:relative;
+ }
+ .view-container > .view.ng-animate {
+ position:absolute;
+ top:0;
+ left:0;
+ width:100%;
+ min-height:500px;
+ }
+ .view.ng-enter, .view.ng-leave,
+ .record.ng-anchor {
+ transition:0.5s linear all;
+ }
+ .view.ng-enter {
+ transform:translateX(100%);
+ }
+ .view.ng-enter.ng-enter-active, .view.ng-leave {
+ transform:translateX(0%);
+ }
+ .view.ng-leave.ng-leave-active {
+ transform:translateX(-100%);
+ }
+ .record.ng-anchor-out {
+ background:red;
+ }
+
+
+ *
+ * ### How is the element transported?
+ *
+ * When an anchor animation occurs, ngAnimate will clone the starting element and position it exactly where the starting
+ * element is located on screen via absolute positioning. The cloned element will be placed inside of the root element
+ * of the application (where ng-app was defined) and all of the CSS classes of the starting element will be applied. The
+ * element will then animate into the `out` and `in` animations and will eventually reach the coordinates and match
+ * the dimensions of the destination element. During the entire animation a CSS class of `.ng-animate-shim` will be applied
+ * to both the starting and destination elements in order to hide them from being visible (the CSS styling for the class
+ * is: `visibility:hidden`). Once the anchor reaches its destination then it will be removed and the destination element
+ * will become visible since the shim class will be removed.
+ *
+ * ### How is the morphing handled?
+ *
+ * CSS Anchoring relies on transitions and keyframes and the internal code is intelligent enough to figure out
+ * what CSS classes differ between the starting element and the destination element. These different CSS classes
+ * will be added/removed on the anchor element and a transition will be applied (the transition that is provided
+ * in the anchor class). Long story short, ngAnimate will figure out what classes to add and remove which will
+ * make the transition of the element as smooth and automatic as possible. Be sure to use simple CSS classes that
+ * do not rely on DOM nesting structure so that the anchor element appears the same as the starting element (since
+ * the cloned element is placed inside of root element which is likely close to the body element).
+ *
+ * Note that if the root element is on the `` element then the cloned node will be placed inside of body.
+ *
+ *
+ * ## Using $animate in your directive code
+ *
+ * So far we've explored how to feed in animations into an Angular application, but how do we trigger animations within our own directives in our application?
+ * By injecting the `$animate` service into our directive code, we can trigger structural and class-based hooks which can then be consumed by animations. Let's
+ * imagine we have a greeting box that shows and hides itself when the data changes
+ *
+ * ```html
+ * Hi there
+ * ```
+ *
+ * ```js
+ * ngModule.directive('greetingBox', ['$animate', function($animate) {
+ * return function(scope, element, attrs) {
+ * attrs.$observe('active', function(value) {
+ * value ? $animate.addClass(element, 'on') : $animate.removeClass(element, 'on');
+ * });
+ * });
+ * }]);
+ * ```
+ *
+ * Now the `on` CSS class is added and removed on the greeting box component. Now if we add a CSS class on top of the greeting box element
+ * in our HTML code then we can trigger a CSS or JS animation to happen.
+ *
+ * ```css
+ * /* normally we would create a CSS class to reference on the element */
+ * greeting-box.on { transition:0.5s linear all; background:green; color:white; }
+ * ```
+ *
+ * The `$animate` service contains a variety of other methods like `enter`, `leave`, `animate` and `setClass`. To learn more about what's
+ * possible be sure to visit the {@link ng.$animate $animate service API page}.
+ *
+ *
+ * ### Preventing Collisions With Third Party Libraries
+ *
+ * Some third-party frameworks place animation duration defaults across many element or className
+ * selectors in order to make their code small and reuseable. This can lead to issues with ngAnimate, which
+ * is expecting actual animations on these elements and has to wait for their completion.
+ *
+ * You can prevent this unwanted behavior by using a prefix on all your animation classes:
+ *
+ * ```css
+ * /* prefixed with animate- */
+ * .animate-fade-add.animate-fade-add-active {
+ * transition:1s linear all;
+ * opacity:0;
+ * }
+ * ```
+ *
+ * You then configure `$animate` to enforce this prefix:
+ *
+ * ```js
+ * $animateProvider.classNameFilter(/animate-/);
+ * ```
+ *
+ * This also may provide your application with a speed boost since only specific elements containing CSS class prefix
+ * will be evaluated for animation when any DOM changes occur in the application.
+ *
+ * ## Callbacks and Promises
+ *
+ * When `$animate` is called it returns a promise that can be used to capture when the animation has ended. Therefore if we were to trigger
+ * an animation (within our directive code) then we can continue performing directive and scope related activities after the animation has
+ * ended by chaining onto the returned promise that animation method returns.
+ *
+ * ```js
+ * // somewhere within the depths of the directive
+ * $animate.enter(element, parent).then(function() {
+ * //the animation has completed
+ * });
+ * ```
+ *
+ * (Note that earlier versions of Angular prior to v1.4 required the promise code to be wrapped using `$scope.$apply(...)`. This is not the case
+ * anymore.)
+ *
+ * In addition to the animation promise, we can also make use of animation-related callbacks within our directives and controller code by registering
+ * an event listener using the `$animate` service. Let's say for example that an animation was triggered on our view
+ * routing controller to hook into that:
+ *
+ * ```js
+ * ngModule.controller('HomePageController', ['$animate', function($animate) {
+ * $animate.on('enter', ngViewElement, function(element) {
+ * // the animation for this route has completed
+ * }]);
+ * }])
+ * ```
+ *
+ * (Note that you will need to trigger a digest within the callback to get angular to notice any scope-related changes.)
+ */
+
+/**
+ * @ngdoc service
+ * @name $animate
+ * @kind object
+ *
+ * @description
+ * The ngAnimate `$animate` service documentation is the same for the core `$animate` service.
+ *
+ * Click here {@link ng.$animate to learn more about animations with `$animate`}.
+ */
+angular.module('ngAnimate', [])
+ .directive('ngAnimateSwap', ngAnimateSwapDirective)
+
+ .directive('ngAnimateChildren', $$AnimateChildrenDirective)
+ .factory('$$rAFScheduler', $$rAFSchedulerFactory)
+
+ .provider('$$animateQueue', $$AnimateQueueProvider)
+ .provider('$$animation', $$AnimationProvider)
+
+ .provider('$animateCss', $AnimateCssProvider)
+ .provider('$$animateCssDriver', $$AnimateCssDriverProvider)
+
+ .provider('$$animateJs', $$AnimateJsProvider)
+ .provider('$$animateJsDriver', $$AnimateJsDriverProvider);
+
+
+})(window, window.angular);
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-animate.min.js b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-animate.min.js
new file mode 100644
index 0000000..8e8e41d
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-animate.min.js
@@ -0,0 +1,56 @@
+/*
+ AngularJS v1.5.0
+ (c) 2010-2016 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(D,r,Va){'use strict';function ya(a,b,c){if(!a)throw Ka("areq",b||"?",c||"required");return a}function za(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;ba(a)&&(a=a.join(" "));ba(b)&&(b=b.join(" "));return a+" "+b}function La(a){var b={};a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from);return b}function X(a,b,c){var d="";a=ba(a)?a:a&&R(a)&&a.length?a.split(/\s+/):[];s(a,function(a,g){a&&0=a&&(a=e,e=0,b.push(t),t=[]);t.push(g.fn);g.children.forEach(function(a){e++;
+c.push(a)});a--}t.length&&b.push(t);return b}(c)}var M=[],r=U(a);return function(u,A,v){function z(a){a=a.hasAttribute("ng-animate-ref")?[a]:a.querySelectorAll("[ng-animate-ref]");var b=[];s(a,function(a){var c=a.getAttribute("ng-animate-ref");c&&c.length&&b.push(a)});return b}function K(a){var b=[],c={};s(a,function(a,f){var d=G(a.element),h=0<=["enter","move"].indexOf(a.event),d=a.structural?z(d):[];if(d.length){var e=h?"to":"from";s(d,function(a){var b=a.getAttribute("ng-animate-ref");c[b]=c[b]||
+{};c[b][e]={animationID:f,element:I(a)}})}else b.push(a)});var d={},h={};s(c,function(c,e){var l=c.from,t=c.to;if(l&&t){var g=a[l.animationID],E=a[t.animationID],k=l.animationID.toString();if(!h[k]){var z=h[k]={structural:!0,beforeStart:function(){g.beforeStart();E.beforeStart()},close:function(){g.close();E.close()},classes:J(g.classes,E.classes),from:g,to:E,anchors:[]};z.classes.length?b.push(z):(b.push(g),b.push(E))}h[k].anchors.push({out:l.element,"in":t.element})}else l=l?l.animationID:t.animationID,
+t=l.toString(),d[t]||(d[t]=!0,b.push(a[l]))});return b}function J(a,b){a=a.split(" ");b=b.split(" ");for(var c=[],d=0;d=P&&b>=O&&(wa=!0,q())}function L(){function b(){if(!A){t(!1);s(m,
+function(a){l.style[a[0]]=a[1]});z(a,f);e.addClass(a,ca);if(p.recalculateTimingStyles){ja=l.className+" "+da;ga=r(l,ja);F=v(l,ja,ga);$=F.maxDelay;n=Math.max($,0);O=F.maxDuration;if(0===O){q();return}p.hasTransitions=0B.expectedEndTime)?H.cancel(B.timer):g.push(q)}L&&(k=H(c,k,!1),g[0]={timer:k,expectedEndTime:d},g.push(q),a.data("$$animateCss",g));if(ea.length)a.on(ea.join(" "),E);f.to&&(f.cleanupStyles&&Ga(x,l,Object.keys(f.to)),Ba(a,
+f))}}function c(){var b=a.data("$$animateCss");if(b){for(var d=1;dARIA](http://www.w3.org/TR/wai-aria/)
+ * attributes that convey state or semantic information about the application for users
+ * of assistive technologies, such as screen readers.
+ *
+ *
+ *
+ * ## Usage
+ *
+ * For ngAria to do its magic, simply include the module `ngAria` as a dependency. The following
+ * directives are supported:
+ * `ngModel`, `ngChecked`, `ngRequired`, `ngValue`, `ngDisabled`, `ngShow`, `ngHide`, `ngClick`,
+ * `ngDblClick`, and `ngMessages`.
+ *
+ * Below is a more detailed breakdown of the attributes handled by ngAria:
+ *
+ * | Directive | Supported Attributes |
+ * |---------------------------------------------|----------------------------------------------------------------------------------------|
+ * | {@link ng.directive:ngModel ngModel} | aria-checked, aria-valuemin, aria-valuemax, aria-valuenow, aria-invalid, aria-required, input roles |
+ * | {@link ng.directive:ngDisabled ngDisabled} | aria-disabled |
+ * | {@link ng.directive:ngRequired ngRequired} | aria-required |
+ * | {@link ng.directive:ngChecked ngChecked} | aria-checked |
+ * | {@link ng.directive:ngValue ngValue} | aria-checked |
+ * | {@link ng.directive:ngShow ngShow} | aria-hidden |
+ * | {@link ng.directive:ngHide ngHide} | aria-hidden |
+ * | {@link ng.directive:ngDblclick ngDblclick} | tabindex |
+ * | {@link module:ngMessages ngMessages} | aria-live |
+ * | {@link ng.directive:ngClick ngClick} | tabindex, keypress event, button role |
+ *
+ * Find out more information about each directive by reading the
+ * {@link guide/accessibility ngAria Developer Guide}.
+ *
+ * ##Example
+ * Using ngDisabled with ngAria:
+ * ```html
+ *
+ * ```
+ * Becomes:
+ * ```html
+ *
+ * ```
+ *
+ * ##Disabling Attributes
+ * It's possible to disable individual attributes added by ngAria with the
+ * {@link ngAria.$ariaProvider#config config} method. For more details, see the
+ * {@link guide/accessibility Developer Guide}.
+ */
+ /* global -ngAriaModule */
+var ngAriaModule = angular.module('ngAria', ['ng']).
+ provider('$aria', $AriaProvider);
+
+/**
+* Internal Utilities
+*/
+var nodeBlackList = ['BUTTON', 'A', 'INPUT', 'TEXTAREA', 'SELECT', 'DETAILS', 'SUMMARY'];
+
+var isNodeOneOf = function(elem, nodeTypeArray) {
+ if (nodeTypeArray.indexOf(elem[0].nodeName) !== -1) {
+ return true;
+ }
+};
+/**
+ * @ngdoc provider
+ * @name $ariaProvider
+ *
+ * @description
+ *
+ * Used for configuring the ARIA attributes injected and managed by ngAria.
+ *
+ * ```js
+ * angular.module('myApp', ['ngAria'], function config($ariaProvider) {
+ * $ariaProvider.config({
+ * ariaValue: true,
+ * tabindex: false
+ * });
+ * });
+ *```
+ *
+ * ## Dependencies
+ * Requires the {@link ngAria} module to be installed.
+ *
+ */
+function $AriaProvider() {
+ var config = {
+ ariaHidden: true,
+ ariaChecked: true,
+ ariaDisabled: true,
+ ariaRequired: true,
+ ariaInvalid: true,
+ ariaValue: true,
+ tabindex: true,
+ bindKeypress: true,
+ bindRoleForClick: true
+ };
+
+ /**
+ * @ngdoc method
+ * @name $ariaProvider#config
+ *
+ * @param {object} config object to enable/disable specific ARIA attributes
+ *
+ * - **ariaHidden** – `{boolean}` – Enables/disables aria-hidden tags
+ * - **ariaChecked** – `{boolean}` – Enables/disables aria-checked tags
+ * - **ariaDisabled** – `{boolean}` – Enables/disables aria-disabled tags
+ * - **ariaRequired** – `{boolean}` – Enables/disables aria-required tags
+ * - **ariaInvalid** – `{boolean}` – Enables/disables aria-invalid tags
+ * - **ariaValue** – `{boolean}` – Enables/disables aria-valuemin, aria-valuemax and aria-valuenow tags
+ * - **tabindex** – `{boolean}` – Enables/disables tabindex tags
+ * - **bindKeypress** – `{boolean}` – Enables/disables keypress event binding on `div` and
+ * `li` elements with ng-click
+ * - **bindRoleForClick** – `{boolean}` – Adds role=button to non-interactive elements like `div`
+ * using ng-click, making them more accessible to users of assistive technologies
+ *
+ * @description
+ * Enables/disables various ARIA attributes
+ */
+ this.config = function(newConfig) {
+ config = angular.extend(config, newConfig);
+ };
+
+ function watchExpr(attrName, ariaAttr, nodeBlackList, negate) {
+ return function(scope, elem, attr) {
+ var ariaCamelName = attr.$normalize(ariaAttr);
+ if (config[ariaCamelName] && !isNodeOneOf(elem, nodeBlackList) && !attr[ariaCamelName]) {
+ scope.$watch(attr[attrName], function(boolVal) {
+ // ensure boolean value
+ boolVal = negate ? !boolVal : !!boolVal;
+ elem.attr(ariaAttr, boolVal);
+ });
+ }
+ };
+ }
+ /**
+ * @ngdoc service
+ * @name $aria
+ *
+ * @description
+ * @priority 200
+ *
+ * The $aria service contains helper methods for applying common
+ * [ARIA](http://www.w3.org/TR/wai-aria/) attributes to HTML directives.
+ *
+ * ngAria injects common accessibility attributes that tell assistive technologies when HTML
+ * elements are enabled, selected, hidden, and more. To see how this is performed with ngAria,
+ * let's review a code snippet from ngAria itself:
+ *
+ *```js
+ * ngAriaModule.directive('ngDisabled', ['$aria', function($aria) {
+ * return $aria.$$watchExpr('ngDisabled', 'aria-disabled', nodeBlackList, false);
+ * }])
+ *```
+ * Shown above, the ngAria module creates a directive with the same signature as the
+ * traditional `ng-disabled` directive. But this ngAria version is dedicated to
+ * solely managing accessibility attributes on custom elements. The internal `$aria` service is
+ * used to watch the boolean attribute `ngDisabled`. If it has not been explicitly set by the
+ * developer, `aria-disabled` is injected as an attribute with its value synchronized to the
+ * value in `ngDisabled`.
+ *
+ * Because ngAria hooks into the `ng-disabled` directive, developers do not have to do
+ * anything to enable this feature. The `aria-disabled` attribute is automatically managed
+ * simply as a silent side-effect of using `ng-disabled` with the ngAria module.
+ *
+ * The full list of directives that interface with ngAria:
+ * * **ngModel**
+ * * **ngChecked**
+ * * **ngRequired**
+ * * **ngDisabled**
+ * * **ngValue**
+ * * **ngShow**
+ * * **ngHide**
+ * * **ngClick**
+ * * **ngDblclick**
+ * * **ngMessages**
+ *
+ * Read the {@link guide/accessibility ngAria Developer Guide} for a thorough explanation of each
+ * directive.
+ *
+ *
+ * ## Dependencies
+ * Requires the {@link ngAria} module to be installed.
+ */
+ this.$get = function() {
+ return {
+ config: function(key) {
+ return config[key];
+ },
+ $$watchExpr: watchExpr
+ };
+ };
+}
+
+
+ngAriaModule.directive('ngShow', ['$aria', function($aria) {
+ return $aria.$$watchExpr('ngShow', 'aria-hidden', [], true);
+}])
+.directive('ngHide', ['$aria', function($aria) {
+ return $aria.$$watchExpr('ngHide', 'aria-hidden', [], false);
+}])
+.directive('ngValue', ['$aria', function($aria) {
+ return $aria.$$watchExpr('ngValue', 'aria-checked', nodeBlackList, false);
+}])
+.directive('ngChecked', ['$aria', function($aria) {
+ return $aria.$$watchExpr('ngChecked', 'aria-checked', nodeBlackList, false);
+}])
+.directive('ngRequired', ['$aria', function($aria) {
+ return $aria.$$watchExpr('ngRequired', 'aria-required', nodeBlackList, false);
+}])
+.directive('ngModel', ['$aria', function($aria) {
+
+ function shouldAttachAttr(attr, normalizedAttr, elem, allowBlacklistEls) {
+ return $aria.config(normalizedAttr) && !elem.attr(attr) && (allowBlacklistEls || !isNodeOneOf(elem, nodeBlackList));
+ }
+
+ function shouldAttachRole(role, elem) {
+ // if element does not have role attribute
+ // AND element type is equal to role (if custom element has a type equaling shape) <-- remove?
+ // AND element is not INPUT
+ return !elem.attr('role') && (elem.attr('type') === role) && (elem[0].nodeName !== 'INPUT');
+ }
+
+ function getShape(attr, elem) {
+ var type = attr.type,
+ role = attr.role;
+
+ return ((type || role) === 'checkbox' || role === 'menuitemcheckbox') ? 'checkbox' :
+ ((type || role) === 'radio' || role === 'menuitemradio') ? 'radio' :
+ (type === 'range' || role === 'progressbar' || role === 'slider') ? 'range' : '';
+ }
+
+ return {
+ restrict: 'A',
+ require: 'ngModel',
+ priority: 200, //Make sure watches are fired after any other directives that affect the ngModel value
+ compile: function(elem, attr) {
+ var shape = getShape(attr, elem);
+
+ return {
+ pre: function(scope, elem, attr, ngModel) {
+ if (shape === 'checkbox') {
+ //Use the input[checkbox] $isEmpty implementation for elements with checkbox roles
+ ngModel.$isEmpty = function(value) {
+ return value === false;
+ };
+ }
+ },
+ post: function(scope, elem, attr, ngModel) {
+ var needsTabIndex = shouldAttachAttr('tabindex', 'tabindex', elem, false);
+
+ function ngAriaWatchModelValue() {
+ return ngModel.$modelValue;
+ }
+
+ function getRadioReaction(newVal) {
+ var boolVal = (attr.value == ngModel.$viewValue);
+ elem.attr('aria-checked', boolVal);
+ }
+
+ function getCheckboxReaction() {
+ elem.attr('aria-checked', !ngModel.$isEmpty(ngModel.$viewValue));
+ }
+
+ switch (shape) {
+ case 'radio':
+ case 'checkbox':
+ if (shouldAttachRole(shape, elem)) {
+ elem.attr('role', shape);
+ }
+ if (shouldAttachAttr('aria-checked', 'ariaChecked', elem, false)) {
+ scope.$watch(ngAriaWatchModelValue, shape === 'radio' ?
+ getRadioReaction : getCheckboxReaction);
+ }
+ if (needsTabIndex) {
+ elem.attr('tabindex', 0);
+ }
+ break;
+ case 'range':
+ if (shouldAttachRole(shape, elem)) {
+ elem.attr('role', 'slider');
+ }
+ if ($aria.config('ariaValue')) {
+ var needsAriaValuemin = !elem.attr('aria-valuemin') &&
+ (attr.hasOwnProperty('min') || attr.hasOwnProperty('ngMin'));
+ var needsAriaValuemax = !elem.attr('aria-valuemax') &&
+ (attr.hasOwnProperty('max') || attr.hasOwnProperty('ngMax'));
+ var needsAriaValuenow = !elem.attr('aria-valuenow');
+
+ if (needsAriaValuemin) {
+ attr.$observe('min', function ngAriaValueMinReaction(newVal) {
+ elem.attr('aria-valuemin', newVal);
+ });
+ }
+ if (needsAriaValuemax) {
+ attr.$observe('max', function ngAriaValueMinReaction(newVal) {
+ elem.attr('aria-valuemax', newVal);
+ });
+ }
+ if (needsAriaValuenow) {
+ scope.$watch(ngAriaWatchModelValue, function ngAriaValueNowReaction(newVal) {
+ elem.attr('aria-valuenow', newVal);
+ });
+ }
+ }
+ if (needsTabIndex) {
+ elem.attr('tabindex', 0);
+ }
+ break;
+ }
+
+ if (!attr.hasOwnProperty('ngRequired') && ngModel.$validators.required
+ && shouldAttachAttr('aria-required', 'ariaRequired', elem, false)) {
+ // ngModel.$error.required is undefined on custom controls
+ attr.$observe('required', function() {
+ elem.attr('aria-required', !!attr['required']);
+ });
+ }
+
+ if (shouldAttachAttr('aria-invalid', 'ariaInvalid', elem, true)) {
+ scope.$watch(function ngAriaInvalidWatch() {
+ return ngModel.$invalid;
+ }, function ngAriaInvalidReaction(newVal) {
+ elem.attr('aria-invalid', !!newVal);
+ });
+ }
+ }
+ };
+ }
+ };
+}])
+.directive('ngDisabled', ['$aria', function($aria) {
+ return $aria.$$watchExpr('ngDisabled', 'aria-disabled', nodeBlackList, false);
+}])
+.directive('ngMessages', function() {
+ return {
+ restrict: 'A',
+ require: '?ngMessages',
+ link: function(scope, elem, attr, ngMessages) {
+ if (!elem.attr('aria-live')) {
+ elem.attr('aria-live', 'assertive');
+ }
+ }
+ };
+})
+.directive('ngClick',['$aria', '$parse', function($aria, $parse) {
+ return {
+ restrict: 'A',
+ compile: function(elem, attr) {
+ var fn = $parse(attr.ngClick, /* interceptorFn */ null, /* expensiveChecks */ true);
+ return function(scope, elem, attr) {
+
+ if (!isNodeOneOf(elem, nodeBlackList)) {
+
+ if ($aria.config('bindRoleForClick') && !elem.attr('role')) {
+ elem.attr('role', 'button');
+ }
+
+ if ($aria.config('tabindex') && !elem.attr('tabindex')) {
+ elem.attr('tabindex', 0);
+ }
+
+ if ($aria.config('bindKeypress') && !attr.ngKeypress) {
+ elem.on('keypress', function(event) {
+ var keyCode = event.which || event.keyCode;
+ if (keyCode === 32 || keyCode === 13) {
+ scope.$apply(callback);
+ }
+
+ function callback() {
+ fn(scope, { $event: event });
+ }
+ });
+ }
+ }
+ };
+ }
+ };
+}])
+.directive('ngDblclick', ['$aria', function($aria) {
+ return function(scope, elem, attr) {
+ if ($aria.config('tabindex') && !elem.attr('tabindex') && !isNodeOneOf(elem, nodeBlackList)) {
+ elem.attr('tabindex', 0);
+ }
+ };
+}]);
+
+
+})(window, window.angular);
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-aria.min.js b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-aria.min.js
new file mode 100644
index 0000000..cf0fd74
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-aria.min.js
@@ -0,0 +1,14 @@
+/*
+ AngularJS v1.5.0
+ (c) 2010-2016 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(s,q,t){'use strict';var f="BUTTON A INPUT TEXTAREA SELECT DETAILS SUMMARY".split(" "),l=function(a,c){if(-1!==c.indexOf(a[0].nodeName))return!0};q.module("ngAria",["ng"]).provider("$aria",function(){function a(a,h,p,n){return function(d,e,b){var g=b.$normalize(h);!c[g]||l(e,p)||b[g]||d.$watch(b[a],function(b){b=n?!b:!!b;e.attr(h,b)})}}var c={ariaHidden:!0,ariaChecked:!0,ariaDisabled:!0,ariaRequired:!0,ariaInvalid:!0,ariaValue:!0,tabindex:!0,bindKeypress:!0,bindRoleForClick:!0};this.config=
+function(a){c=q.extend(c,a)};this.$get=function(){return{config:function(a){return c[a]},$$watchExpr:a}}}).directive("ngShow",["$aria",function(a){return a.$$watchExpr("ngShow","aria-hidden",[],!0)}]).directive("ngHide",["$aria",function(a){return a.$$watchExpr("ngHide","aria-hidden",[],!1)}]).directive("ngValue",["$aria",function(a){return a.$$watchExpr("ngValue","aria-checked",f,!1)}]).directive("ngChecked",["$aria",function(a){return a.$$watchExpr("ngChecked","aria-checked",f,!1)}]).directive("ngRequired",
+["$aria",function(a){return a.$$watchExpr("ngRequired","aria-required",f,!1)}]).directive("ngModel",["$aria",function(a){function c(c,n,d,e){return a.config(n)&&!d.attr(c)&&(e||!l(d,f))}function m(a,c){return!c.attr("role")&&c.attr("type")===a&&"INPUT"!==c[0].nodeName}function h(a,c){var d=a.type,e=a.role;return"checkbox"===(d||e)||"menuitemcheckbox"===e?"checkbox":"radio"===(d||e)||"menuitemradio"===e?"radio":"range"===d||"progressbar"===e||"slider"===e?"range":""}return{restrict:"A",require:"ngModel",
+priority:200,compile:function(f,n){var d=h(n,f);return{pre:function(a,b,c,k){"checkbox"===d&&(k.$isEmpty=function(a){return!1===a})},post:function(e,b,g,k){function f(){return k.$modelValue}function h(a){b.attr("aria-checked",g.value==k.$viewValue)}function n(){b.attr("aria-checked",!k.$isEmpty(k.$viewValue))}var l=c("tabindex","tabindex",b,!1);switch(d){case "radio":case "checkbox":m(d,b)&&b.attr("role",d);c("aria-checked","ariaChecked",b,!1)&&e.$watch(f,"radio"===d?h:n);l&&b.attr("tabindex",0);
+break;case "range":m(d,b)&&b.attr("role","slider");if(a.config("ariaValue")){var p=!b.attr("aria-valuemin")&&(g.hasOwnProperty("min")||g.hasOwnProperty("ngMin")),q=!b.attr("aria-valuemax")&&(g.hasOwnProperty("max")||g.hasOwnProperty("ngMax")),r=!b.attr("aria-valuenow");p&&g.$observe("min",function(a){b.attr("aria-valuemin",a)});q&&g.$observe("max",function(a){b.attr("aria-valuemax",a)});r&&e.$watch(f,function(a){b.attr("aria-valuenow",a)})}l&&b.attr("tabindex",0)}!g.hasOwnProperty("ngRequired")&&
+k.$validators.required&&c("aria-required","ariaRequired",b,!1)&&g.$observe("required",function(){b.attr("aria-required",!!g.required)});c("aria-invalid","ariaInvalid",b,!0)&&e.$watch(function(){return k.$invalid},function(a){b.attr("aria-invalid",!!a)})}}}}}]).directive("ngDisabled",["$aria",function(a){return a.$$watchExpr("ngDisabled","aria-disabled",f,!1)}]).directive("ngMessages",function(){return{restrict:"A",require:"?ngMessages",link:function(a,c,f,h){c.attr("aria-live")||c.attr("aria-live",
+"assertive")}}}).directive("ngClick",["$aria","$parse",function(a,c){return{restrict:"A",compile:function(m,h){var p=c(h.ngClick,null,!0);return function(c,d,e){if(!l(d,f)&&(a.config("bindRoleForClick")&&!d.attr("role")&&d.attr("role","button"),a.config("tabindex")&&!d.attr("tabindex")&&d.attr("tabindex",0),a.config("bindKeypress")&&!e.ngKeypress))d.on("keypress",function(a){function d(){p(c,{$event:a})}var e=a.which||a.keyCode;32!==e&&13!==e||c.$apply(d)})}}}}]).directive("ngDblclick",["$aria",function(a){return function(c,
+m,h){!a.config("tabindex")||m.attr("tabindex")||l(m,f)||m.attr("tabindex",0)}}])})(window,window.angular);
+//# sourceMappingURL=angular-aria.min.js.map
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-aria.min.js.map b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-aria.min.js.map
new file mode 100644
index 0000000..b1db15b
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-aria.min.js.map
@@ -0,0 +1,8 @@
+{
+"version":3,
+"file":"angular-aria.min.js",
+"lineCount":13,
+"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CA6DtC,IAAIC,EAAgB,gDAAA,MAAA,CAAA,GAAA,CAApB,CAEIC,EAAcA,QAAQ,CAACC,CAAD,CAAOC,CAAP,CAAsB,CAC9C,GAAiD,EAAjD,GAAIA,CAAAC,QAAA,CAAsBF,CAAA,CAAK,CAAL,CAAAG,SAAtB,CAAJ,CACE,MAAO,CAAA,CAFqC,CAR7BP,EAAAQ,OAAA,CAAe,QAAf,CAAyB,CAAC,IAAD,CAAzB,CAAAC,SAAAC,CACc,OADdA,CAkCnBC,QAAsB,EAAG,CAsCvBC,QAASA,EAAS,CAACC,CAAD,CAAWC,CAAX,CAAqBZ,CAArB,CAAoCa,CAApC,CAA4C,CAC5D,MAAO,SAAQ,CAACC,CAAD,CAAQZ,CAAR,CAAca,CAAd,CAAoB,CACjC,IAAIC,EAAgBD,CAAAE,WAAA,CAAgBL,CAAhB,CAChB,EAAAM,CAAA,CAAOF,CAAP,CAAJ,EAA8Bf,CAAA,CAAYC,CAAZ,CAAkBF,CAAlB,CAA9B,EAAmEe,CAAA,CAAKC,CAAL,CAAnE,EACEF,CAAAK,OAAA,CAAaJ,CAAA,CAAKJ,CAAL,CAAb,CAA6B,QAAQ,CAACS,CAAD,CAAU,CAE7CA,CAAA,CAAUP,CAAA,CAAS,CAACO,CAAV,CAAoB,CAAEA,CAAAA,CAChClB,EAAAa,KAAA,CAAUH,CAAV,CAAoBQ,CAApB,CAH6C,CAA/C,CAH+B,CADyB,CArC9D,IAAIF,EAAS,CACXG,WAAY,CAAA,CADD,CAEXC,YAAa,CAAA,CAFF,CAGXC,aAAc,CAAA,CAHH,CAIXC,aAAc,CAAA,CAJH,CAKXC,YAAa,CAAA,CALF,CAMXC,UAAW,CAAA,CANA,CAOXC,SAAU,CAAA,CAPC,CAQXC,aAAc,CAAA,CARH,CASXC,iBAAkB,CAAA,CATP,CAiCb,KAAAX,OAAA;AAAcY,QAAQ,CAACC,CAAD,CAAY,CAChCb,CAAA,CAASpB,CAAAkC,OAAA,CAAed,CAAf,CAAuBa,CAAvB,CADuB,CAiElC,KAAAE,KAAA,CAAYC,QAAQ,EAAG,CACrB,MAAO,CACLhB,OAAQA,QAAQ,CAACiB,CAAD,CAAM,CACpB,MAAOjB,EAAA,CAAOiB,CAAP,CADa,CADjB,CAILC,YAAa1B,CAJR,CADc,CAnGA,CAlCNF,CAgJnB6B,UAAA,CAAuB,QAAvB,CAAiC,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CACzD,MAAOA,EAAAF,YAAA,CAAkB,QAAlB,CAA4B,aAA5B,CAA2C,EAA3C,CAA+C,CAAA,CAA/C,CADkD,CAA1B,CAAjC,CAAAC,UAAA,CAGW,QAHX,CAGqB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CAC7C,MAAOA,EAAAF,YAAA,CAAkB,QAAlB,CAA4B,aAA5B,CAA2C,EAA3C,CAA+C,CAAA,CAA/C,CADsC,CAA1B,CAHrB,CAAAC,UAAA,CAMW,SANX,CAMsB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CAC9C,MAAOA,EAAAF,YAAA,CAAkB,SAAlB,CAA6B,cAA7B,CAA6CpC,CAA7C,CAA4D,CAAA,CAA5D,CADuC,CAA1B,CANtB,CAAAqC,UAAA,CASW,WATX,CASwB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CAChD,MAAOA,EAAAF,YAAA,CAAkB,WAAlB,CAA+B,cAA/B,CAA+CpC,CAA/C,CAA8D,CAAA,CAA9D,CADyC,CAA1B,CATxB,CAAAqC,UAAA,CAYW,YAZX;AAYyB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CACjD,MAAOA,EAAAF,YAAA,CAAkB,YAAlB,CAAgC,eAAhC,CAAiDpC,CAAjD,CAAgE,CAAA,CAAhE,CAD0C,CAA1B,CAZzB,CAAAqC,UAAA,CAeW,SAfX,CAesB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CAE9CC,QAASA,EAAgB,CAACxB,CAAD,CAAOyB,CAAP,CAAuBtC,CAAvB,CAA6BuC,CAA7B,CAAgD,CACvE,MAAOH,EAAApB,OAAA,CAAasB,CAAb,CAAP,EAAuC,CAACtC,CAAAa,KAAA,CAAUA,CAAV,CAAxC,GAA4D0B,CAA5D,EAAiF,CAACxC,CAAA,CAAYC,CAAZ,CAAkBF,CAAlB,CAAlF,CADuE,CAIzE0C,QAASA,EAAgB,CAACC,CAAD,CAAOzC,CAAP,CAAa,CAIpC,MAAO,CAACA,CAAAa,KAAA,CAAU,MAAV,CAAR,EAA8Bb,CAAAa,KAAA,CAAU,MAAV,CAA9B,GAAoD4B,CAApD,EAAmF,OAAnF,GAA8DzC,CAAA,CAAK,CAAL,CAAAG,SAJ1B,CAOtCuC,QAASA,EAAQ,CAAC7B,CAAD,CAAOb,CAAP,CAAa,CAAA,IACxB2C,EAAO9B,CAAA8B,KADiB,CAExBF,EAAO5B,CAAA4B,KAEX,OAA2B,UAApB,IAAEE,CAAF,EAAUF,CAAV,GAA2C,kBAA3C,GAAkCA,CAAlC,CAAiE,UAAjE,CACoB,OAApB,IAAEE,CAAF,EAAUF,CAAV,GAA2C,eAA3C,GAAkCA,CAAlC,CAA8D,OAA9D,CACU,OAAV,GAACE,CAAD,EAA2C,aAA3C,GAAkCF,CAAlC,EAAqE,QAArE,GAA4DA,CAA5D,CAAiF,OAAjF,CAA2F,EANtE,CAS9B,MAAO,CACLG,SAAU,GADL,CAELC,QAAS,SAFJ;AAGLC,SAAU,GAHL,CAILC,QAASA,QAAQ,CAAC/C,CAAD,CAAOa,CAAP,CAAa,CAC5B,IAAImC,EAAQN,CAAA,CAAS7B,CAAT,CAAeb,CAAf,CAEZ,OAAO,CACLiD,IAAKA,QAAQ,CAACrC,CAAD,CAAQZ,CAAR,CAAca,CAAd,CAAoBqC,CAApB,CAA6B,CAC1B,UAAd,GAAIF,CAAJ,GAEEE,CAAAC,SAFF,CAEqBC,QAAQ,CAACC,CAAD,CAAQ,CACjC,MAAiB,CAAA,CAAjB,GAAOA,CAD0B,CAFrC,CADwC,CADrC,CASLC,KAAMA,QAAQ,CAAC1C,CAAD,CAAQZ,CAAR,CAAca,CAAd,CAAoBqC,CAApB,CAA6B,CAGzCK,QAASA,EAAqB,EAAG,CAC/B,MAAOL,EAAAM,YADwB,CAIjCC,QAASA,EAAgB,CAACC,CAAD,CAAS,CAEhC1D,CAAAa,KAAA,CAAU,cAAV,CADeA,CAAAwC,MACf,EAD6BH,CAAAS,WAC7B,CAFgC,CAKlCC,QAASA,EAAmB,EAAG,CAC7B5D,CAAAa,KAAA,CAAU,cAAV,CAA0B,CAACqC,CAAAC,SAAA,CAAiBD,CAAAS,WAAjB,CAA3B,CAD6B,CAX/B,IAAIE,EAAgBxB,CAAA,CAAiB,UAAjB,CAA6B,UAA7B,CAAyCrC,CAAzC,CAA+C,CAAA,CAA/C,CAepB,QAAQgD,CAAR,EACE,KAAK,OAAL,CACA,KAAK,UAAL,CACMR,CAAA,CAAiBQ,CAAjB,CAAwBhD,CAAxB,CAAJ,EACEA,CAAAa,KAAA,CAAU,MAAV,CAAkBmC,CAAlB,CAEEX,EAAA,CAAiB,cAAjB,CAAiC,aAAjC,CAAgDrC,CAAhD,CAAsD,CAAA,CAAtD,CAAJ,EACEY,CAAAK,OAAA,CAAasC,CAAb,CAA8C,OAAV,GAAAP,CAAA,CAChCS,CADgC,CACbG,CADvB,CAGEC,EAAJ,EACE7D,CAAAa,KAAA,CAAU,UAAV,CAAsB,CAAtB,CAEF;KACF,MAAK,OAAL,CACM2B,CAAA,CAAiBQ,CAAjB,CAAwBhD,CAAxB,CAAJ,EACEA,CAAAa,KAAA,CAAU,MAAV,CAAkB,QAAlB,CAEF,IAAIuB,CAAApB,OAAA,CAAa,WAAb,CAAJ,CAA+B,CAC7B,IAAI8C,EAAoB,CAAC9D,CAAAa,KAAA,CAAU,eAAV,CAArBiD,GACCjD,CAAAkD,eAAA,CAAoB,KAApB,CADDD,EAC+BjD,CAAAkD,eAAA,CAAoB,OAApB,CAD/BD,CAAJ,CAEIE,EAAoB,CAAChE,CAAAa,KAAA,CAAU,eAAV,CAArBmD,GACCnD,CAAAkD,eAAA,CAAoB,KAApB,CADDC,EAC+BnD,CAAAkD,eAAA,CAAoB,OAApB,CAD/BC,CAFJ,CAIIC,EAAoB,CAACjE,CAAAa,KAAA,CAAU,eAAV,CAErBiD,EAAJ,EACEjD,CAAAqD,SAAA,CAAc,KAAd,CAAqBC,QAA+B,CAACT,CAAD,CAAS,CAC3D1D,CAAAa,KAAA,CAAU,eAAV,CAA2B6C,CAA3B,CAD2D,CAA7D,CAIEM,EAAJ,EACEnD,CAAAqD,SAAA,CAAc,KAAd,CAAqBC,QAA+B,CAACT,CAAD,CAAS,CAC3D1D,CAAAa,KAAA,CAAU,eAAV,CAA2B6C,CAA3B,CAD2D,CAA7D,CAIEO,EAAJ,EACErD,CAAAK,OAAA,CAAasC,CAAb,CAAoCa,QAA+B,CAACV,CAAD,CAAS,CAC1E1D,CAAAa,KAAA,CAAU,eAAV,CAA2B6C,CAA3B,CAD0E,CAA5E,CAlB2B,CAuB3BG,CAAJ,EACE7D,CAAAa,KAAA,CAAU,UAAV,CAAsB,CAAtB,CA1CN,CA+CK,CAAAA,CAAAkD,eAAA,CAAoB,YAApB,CAAL;AAA0Cb,CAAAmB,YAAAC,SAA1C,EACKjC,CAAA,CAAiB,eAAjB,CAAkC,cAAlC,CAAkDrC,CAAlD,CAAwD,CAAA,CAAxD,CADL,EAGEa,CAAAqD,SAAA,CAAc,UAAd,CAA0B,QAAQ,EAAG,CACnClE,CAAAa,KAAA,CAAU,eAAV,CAA2B,CAAE,CAAAA,CAAA,SAA7B,CADmC,CAArC,CAKEwB,EAAA,CAAiB,cAAjB,CAAiC,aAAjC,CAAgDrC,CAAhD,CAAsD,CAAA,CAAtD,CAAJ,EACEY,CAAAK,OAAA,CAAasD,QAA2B,EAAG,CACzC,MAAOrB,EAAAsB,SADkC,CAA3C,CAEGC,QAA8B,CAACf,CAAD,CAAS,CACxC1D,CAAAa,KAAA,CAAU,cAAV,CAA0B,CAAE6C,CAAAA,CAA5B,CADwC,CAF1C,CAxEuC,CATtC,CAHqB,CAJzB,CAtBuC,CAA1B,CAftB,CAAAvB,UAAA,CAwIW,YAxIX,CAwIyB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CACjD,MAAOA,EAAAF,YAAA,CAAkB,YAAlB,CAAgC,eAAhC,CAAiDpC,CAAjD,CAAgE,CAAA,CAAhE,CAD0C,CAA1B,CAxIzB,CAAAqC,UAAA,CA2IW,YA3IX,CA2IyB,QAAQ,EAAG,CAClC,MAAO,CACLS,SAAU,GADL,CAELC,QAAS,aAFJ,CAGL6B,KAAMA,QAAQ,CAAC9D,CAAD,CAAQZ,CAAR,CAAca,CAAd,CAAoB8D,CAApB,CAAgC,CACvC3E,CAAAa,KAAA,CAAU,WAAV,CAAL,EACEb,CAAAa,KAAA,CAAU,WAAV;AAAuB,WAAvB,CAF0C,CAHzC,CAD2B,CA3IpC,CAAAsB,UAAA,CAsJW,SAtJX,CAsJqB,CAAC,OAAD,CAAU,QAAV,CAAoB,QAAQ,CAACC,CAAD,CAAQwC,CAAR,CAAgB,CAC/D,MAAO,CACLhC,SAAU,GADL,CAELG,QAASA,QAAQ,CAAC/C,CAAD,CAAOa,CAAP,CAAa,CAC5B,IAAIgE,EAAKD,CAAA,CAAO/D,CAAAiE,QAAP,CAAyC,IAAzC,CAAqE,CAAA,CAArE,CACT,OAAO,SAAQ,CAAClE,CAAD,CAAQZ,CAAR,CAAca,CAAd,CAAoB,CAEjC,GAAK,CAAAd,CAAA,CAAYC,CAAZ,CAAkBF,CAAlB,CAAL,GAEMsC,CAAApB,OAAA,CAAa,kBAAb,CAQA,EARqC,CAAAhB,CAAAa,KAAA,CAAU,MAAV,CAQrC,EAPFb,CAAAa,KAAA,CAAU,MAAV,CAAkB,QAAlB,CAOE,CAJAuB,CAAApB,OAAA,CAAa,UAAb,CAIA,EAJ6B,CAAAhB,CAAAa,KAAA,CAAU,UAAV,CAI7B,EAHFb,CAAAa,KAAA,CAAU,UAAV,CAAsB,CAAtB,CAGE,CAAAuB,CAAApB,OAAA,CAAa,cAAb,CAAA,EAAiC+D,CAAAlE,CAAAkE,WAVvC,EAWI/E,CAAAgF,GAAA,CAAQ,UAAR,CAAoB,QAAQ,CAACC,CAAD,CAAQ,CAMlCC,QAASA,EAAQ,EAAG,CAClBL,CAAA,CAAGjE,CAAH,CAAU,CAAEuE,OAAQF,CAAV,CAAV,CADkB,CALpB,IAAIG,EAAUH,CAAAI,MAAVD,EAAyBH,CAAAG,QACb,GAAhB,GAAIA,CAAJ,EAAkC,EAAlC,GAAsBA,CAAtB,EACExE,CAAA0E,OAAA,CAAaJ,CAAb,CAHgC,CAApC,CAb6B,CAFP,CAFzB,CADwD,CAA5C,CAtJrB,CAAA/C,UAAA,CAwLW,YAxLX,CAwLyB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CACjD,MAAO,SAAQ,CAACxB,CAAD;AAAQZ,CAAR,CAAca,CAAd,CAAoB,CAC7B,CAAAuB,CAAApB,OAAA,CAAa,UAAb,CAAJ,EAAiChB,CAAAa,KAAA,CAAU,UAAV,CAAjC,EAA2Dd,CAAA,CAAYC,CAAZ,CAAkBF,CAAlB,CAA3D,EACEE,CAAAa,KAAA,CAAU,UAAV,CAAsB,CAAtB,CAF+B,CADc,CAA1B,CAxLzB,CAvMsC,CAArC,CAAD,CAwYGlB,MAxYH,CAwYWA,MAAAC,QAxYX;",
+"sources":["angular-aria.js"],
+"names":["window","angular","undefined","nodeBlackList","isNodeOneOf","elem","nodeTypeArray","indexOf","nodeName","module","provider","ngAriaModule","$AriaProvider","watchExpr","attrName","ariaAttr","negate","scope","attr","ariaCamelName","$normalize","config","$watch","boolVal","ariaHidden","ariaChecked","ariaDisabled","ariaRequired","ariaInvalid","ariaValue","tabindex","bindKeypress","bindRoleForClick","this.config","newConfig","extend","$get","this.$get","key","$$watchExpr","directive","$aria","shouldAttachAttr","normalizedAttr","allowBlacklistEls","shouldAttachRole","role","getShape","type","restrict","require","priority","compile","shape","pre","ngModel","$isEmpty","ngModel.$isEmpty","value","post","ngAriaWatchModelValue","$modelValue","getRadioReaction","newVal","$viewValue","getCheckboxReaction","needsTabIndex","needsAriaValuemin","hasOwnProperty","needsAriaValuemax","needsAriaValuenow","$observe","ngAriaValueMinReaction","ngAriaValueNowReaction","$validators","required","ngAriaInvalidWatch","$invalid","ngAriaInvalidReaction","link","ngMessages","$parse","fn","ngClick","ngKeypress","on","event","callback","$event","keyCode","which","$apply"]
+}
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-cookies.js b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-cookies.js
new file mode 100644
index 0000000..2157ef0
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-cookies.js
@@ -0,0 +1,322 @@
+/**
+ * @license AngularJS v1.5.0
+ * (c) 2010-2016 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {'use strict';
+
+/**
+ * @ngdoc module
+ * @name ngCookies
+ * @description
+ *
+ * # ngCookies
+ *
+ * The `ngCookies` module provides a convenient wrapper for reading and writing browser cookies.
+ *
+ *
+ *
+ *
+ * See {@link ngCookies.$cookies `$cookies`} for usage.
+ */
+
+
+angular.module('ngCookies', ['ng']).
+ /**
+ * @ngdoc provider
+ * @name $cookiesProvider
+ * @description
+ * Use `$cookiesProvider` to change the default behavior of the {@link ngCookies.$cookies $cookies} service.
+ * */
+ provider('$cookies', [function $CookiesProvider() {
+ /**
+ * @ngdoc property
+ * @name $cookiesProvider#defaults
+ * @description
+ *
+ * Object containing default options to pass when setting cookies.
+ *
+ * The object may have following properties:
+ *
+ * - **path** - `{string}` - The cookie will be available only for this path and its
+ * sub-paths. By default, this is the URL that appears in your ` ` tag.
+ * - **domain** - `{string}` - The cookie will be available only for this domain and
+ * its sub-domains. For security reasons the user agent will not accept the cookie
+ * if the current domain is not a sub-domain of this domain or equal to it.
+ * - **expires** - `{string|Date}` - String of the form "Wdy, DD Mon YYYY HH:MM:SS GMT"
+ * or a Date object indicating the exact date/time this cookie will expire.
+ * - **secure** - `{boolean}` - If `true`, then the cookie will only be available through a
+ * secured connection.
+ *
+ * Note: By default, the address that appears in your ` ` tag will be used as the path.
+ * This is important so that cookies will be visible for all routes when html5mode is enabled.
+ *
+ **/
+ var defaults = this.defaults = {};
+
+ function calcOptions(options) {
+ return options ? angular.extend({}, defaults, options) : defaults;
+ }
+
+ /**
+ * @ngdoc service
+ * @name $cookies
+ *
+ * @description
+ * Provides read/write access to browser's cookies.
+ *
+ *
+ * Up until Angular 1.3, `$cookies` exposed properties that represented the
+ * current browser cookie values. In version 1.4, this behavior has changed, and
+ * `$cookies` now provides a standard api of getters, setters etc.
+ *
+ *
+ * Requires the {@link ngCookies `ngCookies`} module to be installed.
+ *
+ * @example
+ *
+ * ```js
+ * angular.module('cookiesExample', ['ngCookies'])
+ * .controller('ExampleController', ['$cookies', function($cookies) {
+ * // Retrieving a cookie
+ * var favoriteCookie = $cookies.get('myFavorite');
+ * // Setting a cookie
+ * $cookies.put('myFavorite', 'oatmeal');
+ * }]);
+ * ```
+ */
+ this.$get = ['$$cookieReader', '$$cookieWriter', function($$cookieReader, $$cookieWriter) {
+ return {
+ /**
+ * @ngdoc method
+ * @name $cookies#get
+ *
+ * @description
+ * Returns the value of given cookie key
+ *
+ * @param {string} key Id to use for lookup.
+ * @returns {string} Raw cookie value.
+ */
+ get: function(key) {
+ return $$cookieReader()[key];
+ },
+
+ /**
+ * @ngdoc method
+ * @name $cookies#getObject
+ *
+ * @description
+ * Returns the deserialized value of given cookie key
+ *
+ * @param {string} key Id to use for lookup.
+ * @returns {Object} Deserialized cookie value.
+ */
+ getObject: function(key) {
+ var value = this.get(key);
+ return value ? angular.fromJson(value) : value;
+ },
+
+ /**
+ * @ngdoc method
+ * @name $cookies#getAll
+ *
+ * @description
+ * Returns a key value object with all the cookies
+ *
+ * @returns {Object} All cookies
+ */
+ getAll: function() {
+ return $$cookieReader();
+ },
+
+ /**
+ * @ngdoc method
+ * @name $cookies#put
+ *
+ * @description
+ * Sets a value for given cookie key
+ *
+ * @param {string} key Id for the `value`.
+ * @param {string} value Raw value to be stored.
+ * @param {Object=} options Options object.
+ * See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults}
+ */
+ put: function(key, value, options) {
+ $$cookieWriter(key, value, calcOptions(options));
+ },
+
+ /**
+ * @ngdoc method
+ * @name $cookies#putObject
+ *
+ * @description
+ * Serializes and sets a value for given cookie key
+ *
+ * @param {string} key Id for the `value`.
+ * @param {Object} value Value to be stored.
+ * @param {Object=} options Options object.
+ * See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults}
+ */
+ putObject: function(key, value, options) {
+ this.put(key, angular.toJson(value), options);
+ },
+
+ /**
+ * @ngdoc method
+ * @name $cookies#remove
+ *
+ * @description
+ * Remove given cookie
+ *
+ * @param {string} key Id of the key-value pair to delete.
+ * @param {Object=} options Options object.
+ * See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults}
+ */
+ remove: function(key, options) {
+ $$cookieWriter(key, undefined, calcOptions(options));
+ }
+ };
+ }];
+ }]);
+
+angular.module('ngCookies').
+/**
+ * @ngdoc service
+ * @name $cookieStore
+ * @deprecated
+ * @requires $cookies
+ *
+ * @description
+ * Provides a key-value (string-object) storage, that is backed by session cookies.
+ * Objects put or retrieved from this storage are automatically serialized or
+ * deserialized by angular's toJson/fromJson.
+ *
+ * Requires the {@link ngCookies `ngCookies`} module to be installed.
+ *
+ *
+ * **Note:** The $cookieStore service is **deprecated**.
+ * Please use the {@link ngCookies.$cookies `$cookies`} service instead.
+ *
+ *
+ * @example
+ *
+ * ```js
+ * angular.module('cookieStoreExample', ['ngCookies'])
+ * .controller('ExampleController', ['$cookieStore', function($cookieStore) {
+ * // Put cookie
+ * $cookieStore.put('myFavorite','oatmeal');
+ * // Get cookie
+ * var favoriteCookie = $cookieStore.get('myFavorite');
+ * // Removing a cookie
+ * $cookieStore.remove('myFavorite');
+ * }]);
+ * ```
+ */
+ factory('$cookieStore', ['$cookies', function($cookies) {
+
+ return {
+ /**
+ * @ngdoc method
+ * @name $cookieStore#get
+ *
+ * @description
+ * Returns the value of given cookie key
+ *
+ * @param {string} key Id to use for lookup.
+ * @returns {Object} Deserialized cookie value, undefined if the cookie does not exist.
+ */
+ get: function(key) {
+ return $cookies.getObject(key);
+ },
+
+ /**
+ * @ngdoc method
+ * @name $cookieStore#put
+ *
+ * @description
+ * Sets a value for given cookie key
+ *
+ * @param {string} key Id for the `value`.
+ * @param {Object} value Value to be stored.
+ */
+ put: function(key, value) {
+ $cookies.putObject(key, value);
+ },
+
+ /**
+ * @ngdoc method
+ * @name $cookieStore#remove
+ *
+ * @description
+ * Remove given cookie
+ *
+ * @param {string} key Id of the key-value pair to delete.
+ */
+ remove: function(key) {
+ $cookies.remove(key);
+ }
+ };
+
+ }]);
+
+/**
+ * @name $$cookieWriter
+ * @requires $document
+ *
+ * @description
+ * This is a private service for writing cookies
+ *
+ * @param {string} name Cookie name
+ * @param {string=} value Cookie value (if undefined, cookie will be deleted)
+ * @param {Object=} options Object with options that need to be stored for the cookie.
+ */
+function $$CookieWriter($document, $log, $browser) {
+ var cookiePath = $browser.baseHref();
+ var rawDocument = $document[0];
+
+ function buildCookieString(name, value, options) {
+ var path, expires;
+ options = options || {};
+ expires = options.expires;
+ path = angular.isDefined(options.path) ? options.path : cookiePath;
+ if (angular.isUndefined(value)) {
+ expires = 'Thu, 01 Jan 1970 00:00:00 GMT';
+ value = '';
+ }
+ if (angular.isString(expires)) {
+ expires = new Date(expires);
+ }
+
+ var str = encodeURIComponent(name) + '=' + encodeURIComponent(value);
+ str += path ? ';path=' + path : '';
+ str += options.domain ? ';domain=' + options.domain : '';
+ str += expires ? ';expires=' + expires.toUTCString() : '';
+ str += options.secure ? ';secure' : '';
+
+ // per http://www.ietf.org/rfc/rfc2109.txt browser must allow at minimum:
+ // - 300 cookies
+ // - 20 cookies per unique domain
+ // - 4096 bytes per cookie
+ var cookieLength = str.length + 1;
+ if (cookieLength > 4096) {
+ $log.warn("Cookie '" + name +
+ "' possibly not set or overflowed because it was too large (" +
+ cookieLength + " > 4096 bytes)!");
+ }
+
+ return str;
+ }
+
+ return function(name, value, options) {
+ rawDocument.cookie = buildCookieString(name, value, options);
+ };
+}
+
+$$CookieWriter.$inject = ['$document', '$log', '$browser'];
+
+angular.module('ngCookies').provider('$$cookieWriter', function $$CookieWriterProvider() {
+ this.$get = $$CookieWriter;
+});
+
+
+})(window, window.angular);
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-cookies.min.js b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-cookies.min.js
new file mode 100644
index 0000000..d0f126a
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-cookies.min.js
@@ -0,0 +1,9 @@
+/*
+ AngularJS v1.5.0
+ (c) 2010-2016 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(p,c,n){'use strict';function l(b,a,g){var d=g.baseHref(),k=b[0];return function(b,e,f){var g,h;f=f||{};h=f.expires;g=c.isDefined(f.path)?f.path:d;c.isUndefined(e)&&(h="Thu, 01 Jan 1970 00:00:00 GMT",e="");c.isString(h)&&(h=new Date(h));e=encodeURIComponent(b)+"="+encodeURIComponent(e);e=e+(g?";path="+g:"")+(f.domain?";domain="+f.domain:"");e+=h?";expires="+h.toUTCString():"";e+=f.secure?";secure":"";f=e.length+1;4096 4096 bytes)!");k.cookie=e}}c.module("ngCookies",["ng"]).provider("$cookies",[function(){var b=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(a,g){return{get:function(d){return a()[d]},getObject:function(d){return(d=this.get(d))?c.fromJson(d):d},getAll:function(){return a()},put:function(d,a,m){g(d,a,m?c.extend({},b,m):b)},putObject:function(d,b,a){this.put(d,c.toJson(b),a)},remove:function(a,k){g(a,n,k?c.extend({},b,k):b)}}}]}]);c.module("ngCookies").factory("$cookieStore",
+["$cookies",function(b){return{get:function(a){return b.getObject(a)},put:function(a,c){b.putObject(a,c)},remove:function(a){b.remove(a)}}}]);l.$inject=["$document","$log","$browser"];c.module("ngCookies").provider("$$cookieWriter",function(){this.$get=l})})(window,window.angular);
+//# sourceMappingURL=angular-cookies.min.js.map
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-cookies.min.js.map b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-cookies.min.js.map
new file mode 100644
index 0000000..555b510
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-cookies.min.js.map
@@ -0,0 +1,8 @@
+{
+"version":3,
+"file":"angular-cookies.min.js",
+"lineCount":8,
+"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CA2QtCC,QAASA,EAAc,CAACC,CAAD,CAAYC,CAAZ,CAAkBC,CAAlB,CAA4B,CACjD,IAAIC,EAAaD,CAAAE,SAAA,EAAjB,CACIC,EAAcL,CAAA,CAAU,CAAV,CAmClB,OAAO,SAAQ,CAACM,CAAD,CAAOC,CAAP,CAAcC,CAAd,CAAuB,CAjCW,IAC3CC,CAD2C,CACrCC,CACVF,EAAA,CAgCoDA,CAhCpD,EAAqB,EACrBE,EAAA,CAAUF,CAAAE,QACVD,EAAA,CAAOZ,CAAAc,UAAA,CAAkBH,CAAAC,KAAlB,CAAA,CAAkCD,CAAAC,KAAlC,CAAiDN,CACpDN,EAAAe,YAAA,CAAoBL,CAApB,CAAJ,GACEG,CACA,CADU,+BACV,CAAAH,CAAA,CAAQ,EAFV,CAIIV,EAAAgB,SAAA,CAAiBH,CAAjB,CAAJ,GACEA,CADF,CACY,IAAII,IAAJ,CAASJ,CAAT,CADZ,CAIIK,EAAAA,CAAMC,kBAAA,CAqB6BV,CArB7B,CAANS,CAAiC,GAAjCA,CAAuCC,kBAAA,CAAmBT,CAAnB,CAE3CQ,EAAA,CADAA,CACA,EADON,CAAA,CAAO,QAAP,CAAkBA,CAAlB,CAAyB,EAChC,GAAOD,CAAAS,OAAA,CAAiB,UAAjB,CAA8BT,CAAAS,OAA9B,CAA+C,EAAtD,CACAF,EAAA,EAAOL,CAAA,CAAU,WAAV,CAAwBA,CAAAQ,YAAA,EAAxB,CAAgD,EACvDH,EAAA,EAAOP,CAAAW,OAAA,CAAiB,SAAjB,CAA6B,EAMhCC,EAAAA,CAAeL,CAAAM,OAAfD,CAA4B,CACb,KAAnB,CAAIA,CAAJ,EACEnB,CAAAqB,KAAA,CAAU,UAAV,CASqChB,CATrC,CACE,6DADF;AAEEc,CAFF,CAEiB,iBAFjB,CASFf,EAAAkB,OAAA,CAJOR,CAG6B,CArCW,CAzPnDlB,CAAA2B,OAAA,CAAe,WAAf,CAA4B,CAAC,IAAD,CAA5B,CAAAC,SAAA,CAOY,UAPZ,CAOwB,CAACC,QAAyB,EAAG,CAwBjD,IAAIC,EAAW,IAAAA,SAAXA,CAA2B,EAiC/B,KAAAC,KAAA,CAAY,CAAC,gBAAD,CAAmB,gBAAnB,CAAqC,QAAQ,CAACC,CAAD,CAAiBC,CAAjB,CAAiC,CACxF,MAAO,CAWLC,IAAKA,QAAQ,CAACC,CAAD,CAAM,CACjB,MAAOH,EAAA,EAAA,CAAiBG,CAAjB,CADU,CAXd,CAyBLC,UAAWA,QAAQ,CAACD,CAAD,CAAM,CAEvB,MAAO,CADHzB,CACG,CADK,IAAAwB,IAAA,CAASC,CAAT,CACL,EAAQnC,CAAAqC,SAAA,CAAiB3B,CAAjB,CAAR,CAAkCA,CAFlB,CAzBpB,CAuCL4B,OAAQA,QAAQ,EAAG,CACjB,MAAON,EAAA,EADU,CAvCd,CAuDLO,IAAKA,QAAQ,CAACJ,CAAD,CAAMzB,CAAN,CAAaC,CAAb,CAAsB,CACjCsB,CAAA,CAAeE,CAAf,CAAoBzB,CAApB,CAAuCC,CAvFpC,CAAUX,CAAAwC,OAAA,CAAe,EAAf,CAAmBV,CAAnB,CAuF0BnB,CAvF1B,CAAV,CAAkDmB,CAuFrD,CADiC,CAvD9B,CAuELW,UAAWA,QAAQ,CAACN,CAAD,CAAMzB,CAAN,CAAaC,CAAb,CAAsB,CACvC,IAAA4B,IAAA,CAASJ,CAAT,CAAcnC,CAAA0C,OAAA,CAAehC,CAAf,CAAd,CAAqCC,CAArC,CADuC,CAvEpC,CAsFLgC,OAAQA,QAAQ,CAACR,CAAD,CAAMxB,CAAN,CAAe,CAC7BsB,CAAA,CAAeE,CAAf,CAAoBlC,CAApB,CAA2CU,CAtHxC,CAAUX,CAAAwC,OAAA,CAAe,EAAf,CAAmBV,CAAnB,CAsH8BnB,CAtH9B,CAAV,CAAkDmB,CAsHrD,CAD6B,CAtF1B,CADiF,CAA9E,CAzDqC,CAA7B,CAPxB,CA8JA9B,EAAA2B,OAAA,CAAe,WAAf,CAAAiB,QAAA,CAiCS,cAjCT;AAiCyB,CAAC,UAAD,CAAa,QAAQ,CAACC,CAAD,CAAW,CAErD,MAAO,CAWLX,IAAKA,QAAQ,CAACC,CAAD,CAAM,CACjB,MAAOU,EAAAT,UAAA,CAAmBD,CAAnB,CADU,CAXd,CAyBLI,IAAKA,QAAQ,CAACJ,CAAD,CAAMzB,CAAN,CAAa,CACxBmC,CAAAJ,UAAA,CAAmBN,CAAnB,CAAwBzB,CAAxB,CADwB,CAzBrB,CAsCLiC,OAAQA,QAAQ,CAACR,CAAD,CAAM,CACpBU,CAAAF,OAAA,CAAgBR,CAAhB,CADoB,CAtCjB,CAF8C,CAAhC,CAjCzB,CAqIAjC,EAAA4C,QAAA,CAAyB,CAAC,WAAD,CAAc,MAAd,CAAsB,UAAtB,CAEzB9C,EAAA2B,OAAA,CAAe,WAAf,CAAAC,SAAA,CAAqC,gBAArC,CAAuDmB,QAA+B,EAAG,CACvF,IAAAhB,KAAA,CAAY7B,CAD2E,CAAzF,CAvTsC,CAArC,CAAD,CA4TGH,MA5TH,CA4TWA,MAAAC,QA5TX;",
+"sources":["angular-cookies.js"],
+"names":["window","angular","undefined","$$CookieWriter","$document","$log","$browser","cookiePath","baseHref","rawDocument","name","value","options","path","expires","isDefined","isUndefined","isString","Date","str","encodeURIComponent","domain","toUTCString","secure","cookieLength","length","warn","cookie","module","provider","$CookiesProvider","defaults","$get","$$cookieReader","$$cookieWriter","get","key","getObject","fromJson","getAll","put","extend","putObject","toJson","remove","factory","$cookies","$inject","$$CookieWriterProvider"]
+}
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-csp.css b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-csp.css
new file mode 100644
index 0000000..23134fd
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-csp.css
@@ -0,0 +1,20 @@
+
+@charset "UTF-8";
+
+[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak],
+.ng-cloak, .x-ng-cloak,
+.ng-hide:not(.ng-hide-animate) {
+ display: none !important;
+}
+
+ng\:form {
+ display: block;
+}
+
+.ng-animate-shim {
+ visibility:hidden;
+}
+
+.ng-anchor {
+ position:absolute;
+}
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-loader.js b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-loader.js
new file mode 100644
index 0000000..77948fd
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-loader.js
@@ -0,0 +1,484 @@
+/**
+ * @license AngularJS v1.5.0
+ * (c) 2010-2016 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+
+(function() {'use strict';
+ function isFunction(value) {return typeof value === 'function';};
+
+/* global: toDebugString: true */
+
+function serializeObject(obj) {
+ var seen = [];
+
+ return JSON.stringify(obj, function(key, val) {
+ val = toJsonReplacer(key, val);
+ if (isObject(val)) {
+
+ if (seen.indexOf(val) >= 0) return '...';
+
+ seen.push(val);
+ }
+ return val;
+ });
+}
+
+function toDebugString(obj) {
+ if (typeof obj === 'function') {
+ return obj.toString().replace(/ \{[\s\S]*$/, '');
+ } else if (isUndefined(obj)) {
+ return 'undefined';
+ } else if (typeof obj !== 'string') {
+ return serializeObject(obj);
+ }
+ return obj;
+}
+
+/**
+ * @description
+ *
+ * This object provides a utility for producing rich Error messages within
+ * Angular. It can be called as follows:
+ *
+ * var exampleMinErr = minErr('example');
+ * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);
+ *
+ * The above creates an instance of minErr in the example namespace. The
+ * resulting error will have a namespaced error code of example.one. The
+ * resulting error will replace {0} with the value of foo, and {1} with the
+ * value of bar. The object is not restricted in the number of arguments it can
+ * take.
+ *
+ * If fewer arguments are specified than necessary for interpolation, the extra
+ * interpolation markers will be preserved in the final string.
+ *
+ * Since data will be parsed statically during a build step, some restrictions
+ * are applied with respect to how minErr instances are created and called.
+ * Instances should have names of the form namespaceMinErr for a minErr created
+ * using minErr('namespace') . Error codes, namespaces and template strings
+ * should all be static strings, not variables or general expressions.
+ *
+ * @param {string} module The namespace to use for the new minErr instance.
+ * @param {function} ErrorConstructor Custom error constructor to be instantiated when returning
+ * error from returned function, for cases when a particular type of error is useful.
+ * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance
+ */
+
+function minErr(module, ErrorConstructor) {
+ ErrorConstructor = ErrorConstructor || Error;
+ return function() {
+ var SKIP_INDEXES = 2;
+
+ var templateArgs = arguments,
+ code = templateArgs[0],
+ message = '[' + (module ? module + ':' : '') + code + '] ',
+ template = templateArgs[1],
+ paramPrefix, i;
+
+ message += template.replace(/\{\d+\}/g, function(match) {
+ var index = +match.slice(1, -1),
+ shiftedIndex = index + SKIP_INDEXES;
+
+ if (shiftedIndex < templateArgs.length) {
+ return toDebugString(templateArgs[shiftedIndex]);
+ }
+
+ return match;
+ });
+
+ message += '\nhttp://errors.angularjs.org/1.5.0/' +
+ (module ? module + '/' : '') + code;
+
+ for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {
+ message += paramPrefix + 'p' + (i - SKIP_INDEXES) + '=' +
+ encodeURIComponent(toDebugString(templateArgs[i]));
+ }
+
+ return new ErrorConstructor(message);
+ };
+}
+
+/**
+ * @ngdoc type
+ * @name angular.Module
+ * @module ng
+ * @description
+ *
+ * Interface for configuring angular {@link angular.module modules}.
+ */
+
+function setupModuleLoader(window) {
+
+ var $injectorMinErr = minErr('$injector');
+ var ngMinErr = minErr('ng');
+
+ function ensure(obj, name, factory) {
+ return obj[name] || (obj[name] = factory());
+ }
+
+ var angular = ensure(window, 'angular', Object);
+
+ // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap
+ angular.$$minErr = angular.$$minErr || minErr;
+
+ return ensure(angular, 'module', function() {
+ /** @type {Object.} */
+ var modules = {};
+
+ /**
+ * @ngdoc function
+ * @name angular.module
+ * @module ng
+ * @description
+ *
+ * The `angular.module` is a global place for creating, registering and retrieving Angular
+ * modules.
+ * All modules (angular core or 3rd party) that should be available to an application must be
+ * registered using this mechanism.
+ *
+ * Passing one argument retrieves an existing {@link angular.Module},
+ * whereas passing more than one argument creates a new {@link angular.Module}
+ *
+ *
+ * # Module
+ *
+ * A module is a collection of services, directives, controllers, filters, and configuration information.
+ * `angular.module` is used to configure the {@link auto.$injector $injector}.
+ *
+ * ```js
+ * // Create a new module
+ * var myModule = angular.module('myModule', []);
+ *
+ * // register a new service
+ * myModule.value('appName', 'MyCoolApp');
+ *
+ * // configure existing services inside initialization blocks.
+ * myModule.config(['$locationProvider', function($locationProvider) {
+ * // Configure existing providers
+ * $locationProvider.hashPrefix('!');
+ * }]);
+ * ```
+ *
+ * Then you can create an injector and load your modules like this:
+ *
+ * ```js
+ * var injector = angular.injector(['ng', 'myModule'])
+ * ```
+ *
+ * However it's more likely that you'll just use
+ * {@link ng.directive:ngApp ngApp} or
+ * {@link angular.bootstrap} to simplify this process for you.
+ *
+ * @param {!string} name The name of the module to create or retrieve.
+ * @param {!Array.=} requires If specified then new module is being created. If
+ * unspecified then the module is being retrieved for further configuration.
+ * @param {Function=} configFn Optional configuration function for the module. Same as
+ * {@link angular.Module#config Module#config()}.
+ * @returns {angular.Module} new module with the {@link angular.Module} api.
+ */
+ return function module(name, requires, configFn) {
+ var assertNotHasOwnProperty = function(name, context) {
+ if (name === 'hasOwnProperty') {
+ throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);
+ }
+ };
+
+ assertNotHasOwnProperty(name, 'module');
+ if (requires && modules.hasOwnProperty(name)) {
+ modules[name] = null;
+ }
+ return ensure(modules, name, function() {
+ if (!requires) {
+ throw $injectorMinErr('nomod', "Module '{0}' is not available! You either misspelled " +
+ "the module name or forgot to load it. If registering a module ensure that you " +
+ "specify the dependencies as the second argument.", name);
+ }
+
+ /** @type {!Array.>} */
+ var invokeQueue = [];
+
+ /** @type {!Array.} */
+ var configBlocks = [];
+
+ /** @type {!Array.} */
+ var runBlocks = [];
+
+ var config = invokeLater('$injector', 'invoke', 'push', configBlocks);
+
+ /** @type {angular.Module} */
+ var moduleInstance = {
+ // Private state
+ _invokeQueue: invokeQueue,
+ _configBlocks: configBlocks,
+ _runBlocks: runBlocks,
+
+ /**
+ * @ngdoc property
+ * @name angular.Module#requires
+ * @module ng
+ *
+ * @description
+ * Holds the list of modules which the injector will load before the current module is
+ * loaded.
+ */
+ requires: requires,
+
+ /**
+ * @ngdoc property
+ * @name angular.Module#name
+ * @module ng
+ *
+ * @description
+ * Name of the module.
+ */
+ name: name,
+
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#provider
+ * @module ng
+ * @param {string} name service name
+ * @param {Function} providerType Construction function for creating new instance of the
+ * service.
+ * @description
+ * See {@link auto.$provide#provider $provide.provider()}.
+ */
+ provider: invokeLaterAndSetModuleName('$provide', 'provider'),
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#factory
+ * @module ng
+ * @param {string} name service name
+ * @param {Function} providerFunction Function for creating new instance of the service.
+ * @description
+ * See {@link auto.$provide#factory $provide.factory()}.
+ */
+ factory: invokeLaterAndSetModuleName('$provide', 'factory'),
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#service
+ * @module ng
+ * @param {string} name service name
+ * @param {Function} constructor A constructor function that will be instantiated.
+ * @description
+ * See {@link auto.$provide#service $provide.service()}.
+ */
+ service: invokeLaterAndSetModuleName('$provide', 'service'),
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#value
+ * @module ng
+ * @param {string} name service name
+ * @param {*} object Service instance object.
+ * @description
+ * See {@link auto.$provide#value $provide.value()}.
+ */
+ value: invokeLater('$provide', 'value'),
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#constant
+ * @module ng
+ * @param {string} name constant name
+ * @param {*} object Constant value.
+ * @description
+ * Because the constants are fixed, they get applied before other provide methods.
+ * See {@link auto.$provide#constant $provide.constant()}.
+ */
+ constant: invokeLater('$provide', 'constant', 'unshift'),
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#decorator
+ * @module ng
+ * @param {string} The name of the service to decorate.
+ * @param {Function} This function will be invoked when the service needs to be
+ * instantiated and should return the decorated service instance.
+ * @description
+ * See {@link auto.$provide#decorator $provide.decorator()}.
+ */
+ decorator: invokeLaterAndSetModuleName('$provide', 'decorator'),
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#animation
+ * @module ng
+ * @param {string} name animation name
+ * @param {Function} animationFactory Factory function for creating new instance of an
+ * animation.
+ * @description
+ *
+ * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.
+ *
+ *
+ * Defines an animation hook that can be later used with
+ * {@link $animate $animate} service and directives that use this service.
+ *
+ * ```js
+ * module.animation('.animation-name', function($inject1, $inject2) {
+ * return {
+ * eventName : function(element, done) {
+ * //code to run the animation
+ * //once complete, then run done()
+ * return function cancellationFunction(element) {
+ * //code to cancel the animation
+ * }
+ * }
+ * }
+ * })
+ * ```
+ *
+ * See {@link ng.$animateProvider#register $animateProvider.register()} and
+ * {@link ngAnimate ngAnimate module} for more information.
+ */
+ animation: invokeLaterAndSetModuleName('$animateProvider', 'register'),
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#filter
+ * @module ng
+ * @param {string} name Filter name - this must be a valid angular expression identifier
+ * @param {Function} filterFactory Factory function for creating new instance of filter.
+ * @description
+ * See {@link ng.$filterProvider#register $filterProvider.register()}.
+ *
+ *
+ * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`.
+ * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace
+ * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores
+ * (`myapp_subsection_filterx`).
+ *
+ */
+ filter: invokeLaterAndSetModuleName('$filterProvider', 'register'),
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#controller
+ * @module ng
+ * @param {string|Object} name Controller name, or an object map of controllers where the
+ * keys are the names and the values are the constructors.
+ * @param {Function} constructor Controller constructor function.
+ * @description
+ * See {@link ng.$controllerProvider#register $controllerProvider.register()}.
+ */
+ controller: invokeLaterAndSetModuleName('$controllerProvider', 'register'),
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#directive
+ * @module ng
+ * @param {string|Object} name Directive name, or an object map of directives where the
+ * keys are the names and the values are the factories.
+ * @param {Function} directiveFactory Factory function for creating new instance of
+ * directives.
+ * @description
+ * See {@link ng.$compileProvider#directive $compileProvider.directive()}.
+ */
+ directive: invokeLaterAndSetModuleName('$compileProvider', 'directive'),
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#component
+ * @module ng
+ * @param {string} name Name of the component in camel-case (i.e. myComp which will match as my-comp)
+ * @param {Object} options Component definition object (a simplified
+ * {@link ng.$compile#directive-definition-object directive definition object})
+ *
+ * @description
+ * See {@link ng.$compileProvider#component $compileProvider.component()}.
+ */
+ component: invokeLaterAndSetModuleName('$compileProvider', 'component'),
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#config
+ * @module ng
+ * @param {Function} configFn Execute this function on module load. Useful for service
+ * configuration.
+ * @description
+ * Use this method to register work which needs to be performed on module loading.
+ * For more about how to configure services, see
+ * {@link providers#provider-recipe Provider Recipe}.
+ */
+ config: config,
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#run
+ * @module ng
+ * @param {Function} initializationFn Execute this function after injector creation.
+ * Useful for application initialization.
+ * @description
+ * Use this method to register work which should be performed when the injector is done
+ * loading all modules.
+ */
+ run: function(block) {
+ runBlocks.push(block);
+ return this;
+ }
+ };
+
+ if (configFn) {
+ config(configFn);
+ }
+
+ return moduleInstance;
+
+ /**
+ * @param {string} provider
+ * @param {string} method
+ * @param {String=} insertMethod
+ * @returns {angular.Module}
+ */
+ function invokeLater(provider, method, insertMethod, queue) {
+ if (!queue) queue = invokeQueue;
+ return function() {
+ queue[insertMethod || 'push']([provider, method, arguments]);
+ return moduleInstance;
+ };
+ }
+
+ /**
+ * @param {string} provider
+ * @param {string} method
+ * @returns {angular.Module}
+ */
+ function invokeLaterAndSetModuleName(provider, method) {
+ return function(recipeName, factoryFunction) {
+ if (factoryFunction && isFunction(factoryFunction)) factoryFunction.$$moduleName = name;
+ invokeQueue.push([provider, method, arguments]);
+ return moduleInstance;
+ };
+ }
+ });
+ };
+ });
+
+}
+
+setupModuleLoader(window);
+})(window);
+
+/**
+ * Closure compiler type information
+ *
+ * @typedef { {
+ * requires: !Array.,
+ * invokeQueue: !Array.>,
+ *
+ * service: function(string, Function):angular.Module,
+ * factory: function(string, Function):angular.Module,
+ * value: function(string, *):angular.Module,
+ *
+ * filter: function(string, Function):angular.Module,
+ *
+ * init: function(Function):angular.Module
+ * } }
+ */
+angular.Module;
+
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-loader.min.js b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-loader.min.js
new file mode 100644
index 0000000..316ee26
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-loader.min.js
@@ -0,0 +1,10 @@
+/*
+ AngularJS v1.5.0
+ (c) 2010-2016 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(){'use strict';function d(b){return function(){var a=arguments[0],e;e="["+(b?b+":":"")+a+"] http://errors.angularjs.org/1.5.0/"+(b?b+"/":"")+a;for(a=1;a= line.length) {
+ index -= line.length;
+ } else {
+ return { line: i + 1, column: index + 1 };
+ }
+ }
+}
+var PARSE_CACHE_FOR_TEXT_LITERALS = Object.create(null);
+
+function parseTextLiteral(text) {
+ var cachedFn = PARSE_CACHE_FOR_TEXT_LITERALS[text];
+ if (cachedFn != null) {
+ return cachedFn;
+ }
+ function parsedFn(context) { return text; }
+ parsedFn['$$watchDelegate'] = function watchDelegate(scope, listener, objectEquality) {
+ var unwatch = scope['$watch'](noop,
+ function textLiteralWatcher() {
+ if (isFunction(listener)) { listener.call(null, text, text, scope); }
+ unwatch();
+ },
+ objectEquality);
+ return unwatch;
+ };
+ PARSE_CACHE_FOR_TEXT_LITERALS[text] = parsedFn;
+ parsedFn['exp'] = text; // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js
+ parsedFn['expressions'] = []; // Require this to call $compile.$$addBindingInfo() which allows Protractor to find elements by binding.
+ return parsedFn;
+}
+
+function subtractOffset(expressionFn, offset) {
+ if (offset === 0) {
+ return expressionFn;
+ }
+ function minusOffset(value) {
+ return (value == void 0) ? value : value - offset;
+ }
+ function parsedFn(context) { return minusOffset(expressionFn(context)); }
+ var unwatch;
+ parsedFn['$$watchDelegate'] = function watchDelegate(scope, listener, objectEquality) {
+ unwatch = scope['$watch'](expressionFn,
+ function pluralExpressionWatchListener(newValue, oldValue) {
+ if (isFunction(listener)) { listener.call(null, minusOffset(newValue), minusOffset(oldValue), scope); }
+ },
+ objectEquality);
+ return unwatch;
+ };
+ return parsedFn;
+}
+
+// NOTE: ADVANCED_OPTIMIZATIONS mode.
+//
+// This file is compiled with Closure compiler's ADVANCED_OPTIMIZATIONS flag! Be wary of using
+// constructs incompatible with that mode.
+
+/* global $interpolateMinErr: false */
+/* global isFunction: false */
+/* global noop: false */
+
+/**
+ * @constructor
+ * @private
+ */
+function MessageSelectorBase(expressionFn, choices) {
+ var self = this;
+ this.expressionFn = expressionFn;
+ this.choices = choices;
+ if (choices["other"] === void 0) {
+ throw $interpolateMinErr('reqother', '“other†is a required option.');
+ }
+ this.parsedFn = function(context) { return self.getResult(context); };
+ this.parsedFn['$$watchDelegate'] = function $$watchDelegate(scope, listener, objectEquality) {
+ return self.watchDelegate(scope, listener, objectEquality);
+ };
+ this.parsedFn['exp'] = expressionFn['exp'];
+ this.parsedFn['expressions'] = expressionFn['expressions'];
+}
+
+MessageSelectorBase.prototype.getMessageFn = function getMessageFn(value) {
+ return this.choices[this.categorizeValue(value)];
+};
+
+MessageSelectorBase.prototype.getResult = function getResult(context) {
+ return this.getMessageFn(this.expressionFn(context))(context);
+};
+
+MessageSelectorBase.prototype.watchDelegate = function watchDelegate(scope, listener, objectEquality) {
+ var watchers = new MessageSelectorWatchers(this, scope, listener, objectEquality);
+ return function() { watchers.cancelWatch(); };
+};
+
+/**
+ * @constructor
+ * @private
+ */
+function MessageSelectorWatchers(msgSelector, scope, listener, objectEquality) {
+ var self = this;
+ this.scope = scope;
+ this.msgSelector = msgSelector;
+ this.listener = listener;
+ this.objectEquality = objectEquality;
+ this.lastMessage = void 0;
+ this.messageFnWatcher = noop;
+ var expressionFnListener = function(newValue, oldValue) { return self.expressionFnListener(newValue, oldValue); };
+ this.expressionFnWatcher = scope['$watch'](msgSelector.expressionFn, expressionFnListener, objectEquality);
+}
+
+MessageSelectorWatchers.prototype.expressionFnListener = function expressionFnListener(newValue, oldValue) {
+ var self = this;
+ this.messageFnWatcher();
+ var messageFnListener = function(newMessage, oldMessage) { return self.messageFnListener(newMessage, oldMessage); };
+ var messageFn = this.msgSelector.getMessageFn(newValue);
+ this.messageFnWatcher = this.scope['$watch'](messageFn, messageFnListener, this.objectEquality);
+};
+
+MessageSelectorWatchers.prototype.messageFnListener = function messageFnListener(newMessage, oldMessage) {
+ if (isFunction(this.listener)) {
+ this.listener.call(null, newMessage, newMessage === oldMessage ? newMessage : this.lastMessage, this.scope);
+ }
+ this.lastMessage = newMessage;
+};
+
+MessageSelectorWatchers.prototype.cancelWatch = function cancelWatch() {
+ this.expressionFnWatcher();
+ this.messageFnWatcher();
+};
+
+/**
+ * @constructor
+ * @extends MessageSelectorBase
+ * @private
+ */
+function SelectMessage(expressionFn, choices) {
+ MessageSelectorBase.call(this, expressionFn, choices);
+}
+
+function SelectMessageProto() {}
+SelectMessageProto.prototype = MessageSelectorBase.prototype;
+
+SelectMessage.prototype = new SelectMessageProto();
+SelectMessage.prototype.categorizeValue = function categorizeSelectValue(value) {
+ return (this.choices[value] !== void 0) ? value : "other";
+};
+
+/**
+ * @constructor
+ * @extends MessageSelectorBase
+ * @private
+ */
+function PluralMessage(expressionFn, choices, offset, pluralCat) {
+ MessageSelectorBase.call(this, expressionFn, choices);
+ this.offset = offset;
+ this.pluralCat = pluralCat;
+}
+
+function PluralMessageProto() {}
+PluralMessageProto.prototype = MessageSelectorBase.prototype;
+
+PluralMessage.prototype = new PluralMessageProto();
+PluralMessage.prototype.categorizeValue = function categorizePluralValue(value) {
+ if (isNaN(value)) {
+ return "other";
+ } else if (this.choices[value] !== void 0) {
+ return value;
+ } else {
+ var category = this.pluralCat(value - this.offset);
+ return (this.choices[category] !== void 0) ? category : "other";
+ }
+};
+
+// NOTE: ADVANCED_OPTIMIZATIONS mode.
+//
+// This file is compiled with Closure compiler's ADVANCED_OPTIMIZATIONS flag! Be wary of using
+// constructs incompatible with that mode.
+
+/* global $interpolateMinErr: false */
+/* global isFunction: false */
+/* global parseTextLiteral: false */
+
+/**
+ * @constructor
+ * @private
+ */
+function InterpolationParts(trustedContext, allOrNothing) {
+ this.trustedContext = trustedContext;
+ this.allOrNothing = allOrNothing;
+ this.textParts = [];
+ this.expressionFns = [];
+ this.expressionIndices = [];
+ this.partialText = '';
+ this.concatParts = null;
+}
+
+InterpolationParts.prototype.flushPartialText = function flushPartialText() {
+ if (this.partialText) {
+ if (this.concatParts == null) {
+ this.textParts.push(this.partialText);
+ } else {
+ this.textParts.push(this.concatParts.join(''));
+ this.concatParts = null;
+ }
+ this.partialText = '';
+ }
+};
+
+InterpolationParts.prototype.addText = function addText(text) {
+ if (text.length) {
+ if (!this.partialText) {
+ this.partialText = text;
+ } else if (this.concatParts) {
+ this.concatParts.push(text);
+ } else {
+ this.concatParts = [this.partialText, text];
+ }
+ }
+};
+
+InterpolationParts.prototype.addExpressionFn = function addExpressionFn(expressionFn) {
+ this.flushPartialText();
+ this.expressionIndices.push(this.textParts.length);
+ this.expressionFns.push(expressionFn);
+ this.textParts.push('');
+};
+
+InterpolationParts.prototype.getExpressionValues = function getExpressionValues(context) {
+ var expressionValues = new Array(this.expressionFns.length);
+ for (var i = 0; i < this.expressionFns.length; i++) {
+ expressionValues[i] = this.expressionFns[i](context);
+ }
+ return expressionValues;
+};
+
+InterpolationParts.prototype.getResult = function getResult(expressionValues) {
+ for (var i = 0; i < this.expressionIndices.length; i++) {
+ var expressionValue = expressionValues[i];
+ if (this.allOrNothing && expressionValue === void 0) return;
+ this.textParts[this.expressionIndices[i]] = expressionValue;
+ }
+ return this.textParts.join('');
+};
+
+
+InterpolationParts.prototype.toParsedFn = function toParsedFn(mustHaveExpression, originalText) {
+ var self = this;
+ this.flushPartialText();
+ if (mustHaveExpression && this.expressionFns.length === 0) {
+ return void 0;
+ }
+ if (this.textParts.length === 0) {
+ return parseTextLiteral('');
+ }
+ if (this.trustedContext && this.textParts.length > 1) {
+ $interpolateMinErr['throwNoconcat'](originalText);
+ }
+ if (this.expressionFns.length === 0) {
+ if (this.textParts.length != 1) { this.errorInParseLogic(); }
+ return parseTextLiteral(this.textParts[0]);
+ }
+ var parsedFn = function(context) {
+ return self.getResult(self.getExpressionValues(context));
+ };
+ parsedFn['$$watchDelegate'] = function $$watchDelegate(scope, listener, objectEquality) {
+ return self.watchDelegate(scope, listener, objectEquality);
+ };
+
+ parsedFn['exp'] = originalText; // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js
+ parsedFn['expressions'] = new Array(this.expressionFns.length); // Require this to call $compile.$$addBindingInfo() which allows Protractor to find elements by binding.
+ for (var i = 0; i < this.expressionFns.length; i++) {
+ parsedFn['expressions'][i] = this.expressionFns[i]['exp'];
+ }
+
+ return parsedFn;
+};
+
+InterpolationParts.prototype.watchDelegate = function watchDelegate(scope, listener, objectEquality) {
+ var watcher = new InterpolationPartsWatcher(this, scope, listener, objectEquality);
+ return function() { watcher.cancelWatch(); };
+};
+
+function InterpolationPartsWatcher(interpolationParts, scope, listener, objectEquality) {
+ this.interpolationParts = interpolationParts;
+ this.scope = scope;
+ this.previousResult = (void 0);
+ this.listener = listener;
+ var self = this;
+ this.expressionFnsWatcher = scope['$watchGroup'](interpolationParts.expressionFns, function(newExpressionValues, oldExpressionValues) {
+ self.watchListener(newExpressionValues, oldExpressionValues);
+ });
+}
+
+InterpolationPartsWatcher.prototype.watchListener = function watchListener(newExpressionValues, oldExpressionValues) {
+ var result = this.interpolationParts.getResult(newExpressionValues);
+ if (isFunction(this.listener)) {
+ this.listener.call(null, result, newExpressionValues === oldExpressionValues ? result : this.previousResult, this.scope);
+ }
+ this.previousResult = result;
+};
+
+InterpolationPartsWatcher.prototype.cancelWatch = function cancelWatch() {
+ this.expressionFnsWatcher();
+};
+
+// NOTE: ADVANCED_OPTIMIZATIONS mode.
+//
+// This file is compiled with Closure compiler's ADVANCED_OPTIMIZATIONS flag! Be wary of using
+// constructs incompatible with that mode.
+
+/* global $interpolateMinErr: false */
+/* global indexToLineAndColumn: false */
+/* global InterpolationParts: false */
+/* global PluralMessage: false */
+/* global SelectMessage: false */
+/* global subtractOffset: false */
+
+// The params src and dst are exactly one of two types: NestedParserState or MessageFormatParser.
+// This function is fully optimized by V8. (inspect via IRHydra or --trace-deopt.)
+// The idea behind writing it this way is to avoid repeating oneself. This is the ONE place where
+// the parser state that is saved/restored when parsing nested mustaches is specified.
+function copyNestedParserState(src, dst) {
+ dst.expressionFn = src.expressionFn;
+ dst.expressionMinusOffsetFn = src.expressionMinusOffsetFn;
+ dst.pluralOffset = src.pluralOffset;
+ dst.choices = src.choices;
+ dst.choiceKey = src.choiceKey;
+ dst.interpolationParts = src.interpolationParts;
+ dst.ruleChoiceKeyword = src.ruleChoiceKeyword;
+ dst.msgStartIndex = src.msgStartIndex;
+ dst.expressionStartIndex = src.expressionStartIndex;
+}
+
+function NestedParserState(parser) {
+ copyNestedParserState(parser, this);
+}
+
+/**
+ * @constructor
+ * @private
+ */
+function MessageFormatParser(text, startIndex, $parse, pluralCat, stringifier,
+ mustHaveExpression, trustedContext, allOrNothing) {
+ this.text = text;
+ this.index = startIndex || 0;
+ this.$parse = $parse;
+ this.pluralCat = pluralCat;
+ this.stringifier = stringifier;
+ this.mustHaveExpression = !!mustHaveExpression;
+ this.trustedContext = trustedContext;
+ this.allOrNothing = !!allOrNothing;
+ this.expressionFn = null;
+ this.expressionMinusOffsetFn = null;
+ this.pluralOffset = null;
+ this.choices = null;
+ this.choiceKey = null;
+ this.interpolationParts = null;
+ this.msgStartIndex = null;
+ this.nestedStateStack = [];
+ this.parsedFn = null;
+ this.rule = null;
+ this.ruleStack = null;
+ this.ruleChoiceKeyword = null;
+ this.interpNestLevel = null;
+ this.expressionStartIndex = null;
+ this.stringStartIndex = null;
+ this.stringQuote = null;
+ this.stringInterestsRe = null;
+ this.angularOperatorStack = null;
+ this.textPart = null;
+}
+
+// preserve v8 optimization.
+var EMPTY_STATE = new NestedParserState(new MessageFormatParser(
+ /* text= */ '', /* startIndex= */ 0, /* $parse= */ null, /* pluralCat= */ null, /* stringifier= */ null,
+ /* mustHaveExpression= */ false, /* trustedContext= */ null, /* allOrNothing */ false));
+
+MessageFormatParser.prototype.pushState = function pushState() {
+ this.nestedStateStack.push(new NestedParserState(this));
+ copyNestedParserState(EMPTY_STATE, this);
+};
+
+MessageFormatParser.prototype.popState = function popState() {
+ if (this.nestedStateStack.length === 0) {
+ this.errorInParseLogic();
+ }
+ var previousState = this.nestedStateStack.pop();
+ copyNestedParserState(previousState, this);
+};
+
+// Oh my JavaScript! Who knew you couldn't match a regex at a specific
+// location in a string but will always search forward?!
+// Apparently you'll be growing this ability via the sticky flag (y) in
+// ES6. I'll just to work around you for now.
+MessageFormatParser.prototype.matchRe = function matchRe(re, search) {
+ re.lastIndex = this.index;
+ var match = re.exec(this.text);
+ if (match != null && (search === true || (match.index == this.index))) {
+ this.index = re.lastIndex;
+ return match;
+ }
+ return null;
+};
+
+MessageFormatParser.prototype.searchRe = function searchRe(re) {
+ return this.matchRe(re, true);
+};
+
+
+MessageFormatParser.prototype.consumeRe = function consumeRe(re) {
+ // Without the sticky flag, we can't use the .test() method to consume a
+ // match at the current index. Instead, we'll use the slower .exec() method
+ // and verify match.index.
+ return !!this.matchRe(re);
+};
+
+// Run through our grammar avoiding deeply nested function call chains.
+MessageFormatParser.prototype.run = function run(initialRule) {
+ this.ruleStack = [initialRule];
+ do {
+ this.rule = this.ruleStack.pop();
+ while (this.rule) {
+ this.rule();
+ }
+ this.assertRuleOrNull(this.rule);
+ } while (this.ruleStack.length > 0);
+};
+
+MessageFormatParser.prototype.errorInParseLogic = function errorInParseLogic() {
+ throw $interpolateMinErr('logicbug',
+ 'The messageformat parser has encountered an internal error. Please file a github issue against the AngularJS project and provide this message text that triggers the bug. Text: “{0}â€',
+ this.text);
+};
+
+MessageFormatParser.prototype.assertRuleOrNull = function assertRuleOrNull(rule) {
+ if (rule === void 0) {
+ this.errorInParseLogic();
+ }
+};
+
+var NEXT_WORD_RE = /\s*(\w+)\s*/g;
+MessageFormatParser.prototype.errorExpecting = function errorExpecting() {
+ // What was wrong with the syntax? Unsupported type, missing comma, or something else?
+ var match = this.matchRe(NEXT_WORD_RE), position;
+ if (match == null) {
+ position = indexToLineAndColumn(this.text, this.index);
+ throw $interpolateMinErr('reqarg',
+ 'Expected one of “plural†or “select†at line {0}, column {1} of text “{2}â€',
+ position.line, position.column, this.text);
+ }
+ var word = match[1];
+ if (word == "select" || word == "plural") {
+ position = indexToLineAndColumn(this.text, this.index);
+ throw $interpolateMinErr('reqcomma',
+ 'Expected a comma after the keyword “{0}†at line {1}, column {2} of text “{3}â€',
+ word, position.line, position.column, this.text);
+ } else {
+ position = indexToLineAndColumn(this.text, this.index);
+ throw $interpolateMinErr('unknarg',
+ 'Unsupported keyword “{0}†at line {0}, column {1}. Only “plural†and “select†are currently supported. Text: “{3}â€',
+ word, position.line, position.column, this.text);
+ }
+};
+
+var STRING_START_RE = /['"]/g;
+MessageFormatParser.prototype.ruleString = function ruleString() {
+ var match = this.matchRe(STRING_START_RE);
+ if (match == null) {
+ var position = indexToLineAndColumn(this.text, this.index);
+ throw $interpolateMinErr('wantstring',
+ 'Expected the beginning of a string at line {0}, column {1} in text “{2}â€',
+ position.line, position.column, this.text);
+ }
+ this.startStringAtMatch(match);
+};
+
+MessageFormatParser.prototype.startStringAtMatch = function startStringAtMatch(match) {
+ this.stringStartIndex = match.index;
+ this.stringQuote = match[0];
+ this.stringInterestsRe = this.stringQuote == "'" ? SQUOTED_STRING_INTEREST_RE : DQUOTED_STRING_INTEREST_RE;
+ this.rule = this.ruleInsideString;
+};
+
+var SQUOTED_STRING_INTEREST_RE = /\\(?:\\|'|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{2}|[0-7]{3}|\r\n|\n|[\s\S])|'/g;
+var DQUOTED_STRING_INTEREST_RE = /\\(?:\\|"|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{2}|[0-7]{3}|\r\n|\n|[\s\S])|"/g;
+MessageFormatParser.prototype.ruleInsideString = function ruleInsideString() {
+ var match = this.searchRe(this.stringInterestsRe);
+ if (match == null) {
+ var position = indexToLineAndColumn(this.text, this.stringStartIndex);
+ throw $interpolateMinErr('untermstr',
+ 'The string beginning at line {0}, column {1} is unterminated in text “{2}â€',
+ position.line, position.column, this.text);
+ }
+ var chars = match[0];
+ if (match == this.stringQuote) {
+ this.rule = null;
+ }
+};
+
+var PLURAL_OR_SELECT_ARG_TYPE_RE = /\s*(plural|select)\s*,\s*/g;
+MessageFormatParser.prototype.rulePluralOrSelect = function rulePluralOrSelect() {
+ var match = this.searchRe(PLURAL_OR_SELECT_ARG_TYPE_RE);
+ if (match == null) {
+ this.errorExpecting();
+ }
+ var argType = match[1];
+ switch (argType) {
+ case "plural": this.rule = this.rulePluralStyle; break;
+ case "select": this.rule = this.ruleSelectStyle; break;
+ default: this.errorInParseLogic();
+ }
+};
+
+MessageFormatParser.prototype.rulePluralStyle = function rulePluralStyle() {
+ this.choices = Object.create(null);
+ this.ruleChoiceKeyword = this.rulePluralValueOrKeyword;
+ this.rule = this.rulePluralOffset;
+};
+
+MessageFormatParser.prototype.ruleSelectStyle = function ruleSelectStyle() {
+ this.choices = Object.create(null);
+ this.ruleChoiceKeyword = this.ruleSelectKeyword;
+ this.rule = this.ruleSelectKeyword;
+};
+
+var NUMBER_RE = /[0]|(?:[1-9][0-9]*)/g;
+var PLURAL_OFFSET_RE = new RegExp("\\s*offset\\s*:\\s*(" + NUMBER_RE.source + ")", "g");
+
+MessageFormatParser.prototype.rulePluralOffset = function rulePluralOffset() {
+ var match = this.matchRe(PLURAL_OFFSET_RE);
+ this.pluralOffset = (match == null) ? 0 : parseInt(match[1], 10);
+ this.expressionMinusOffsetFn = subtractOffset(this.expressionFn, this.pluralOffset);
+ this.rule = this.rulePluralValueOrKeyword;
+};
+
+MessageFormatParser.prototype.assertChoiceKeyIsNew = function assertChoiceKeyIsNew(choiceKey, index) {
+ if (this.choices[choiceKey] !== void 0) {
+ var position = indexToLineAndColumn(this.text, index);
+ throw $interpolateMinErr('dupvalue',
+ 'The choice “{0}†is specified more than once. Duplicate key is at line {1}, column {2} in text “{3}â€',
+ choiceKey, position.line, position.column, this.text);
+ }
+};
+
+var SELECT_KEYWORD = /\s*(\w+)/g;
+MessageFormatParser.prototype.ruleSelectKeyword = function ruleSelectKeyword() {
+ var match = this.matchRe(SELECT_KEYWORD);
+ if (match == null) {
+ this.parsedFn = new SelectMessage(this.expressionFn, this.choices).parsedFn;
+ this.rule = null;
+ return;
+ }
+ this.choiceKey = match[1];
+ this.assertChoiceKeyIsNew(this.choiceKey, match.index);
+ this.rule = this.ruleMessageText;
+};
+
+var EXPLICIT_VALUE_OR_KEYWORD_RE = new RegExp("\\s*(?:(?:=(" + NUMBER_RE.source + "))|(\\w+))", "g");
+MessageFormatParser.prototype.rulePluralValueOrKeyword = function rulePluralValueOrKeyword() {
+ var match = this.matchRe(EXPLICIT_VALUE_OR_KEYWORD_RE);
+ if (match == null) {
+ this.parsedFn = new PluralMessage(this.expressionFn, this.choices, this.pluralOffset, this.pluralCat).parsedFn;
+ this.rule = null;
+ return;
+ }
+ if (match[1] != null) {
+ this.choiceKey = parseInt(match[1], 10);
+ } else {
+ this.choiceKey = match[2];
+ }
+ this.assertChoiceKeyIsNew(this.choiceKey, match.index);
+ this.rule = this.ruleMessageText;
+};
+
+var BRACE_OPEN_RE = /\s*{/g;
+var BRACE_CLOSE_RE = /}/g;
+MessageFormatParser.prototype.ruleMessageText = function ruleMessageText() {
+ if (!this.consumeRe(BRACE_OPEN_RE)) {
+ var position = indexToLineAndColumn(this.text, this.index);
+ throw $interpolateMinErr('reqopenbrace',
+ 'The plural choice “{0}†must be followed by a message in braces at line {1}, column {2} in text “{3}â€',
+ this.choiceKey, position.line, position.column, this.text);
+ }
+ this.msgStartIndex = this.index;
+ this.interpolationParts = new InterpolationParts(this.trustedContext, this.allOrNothing);
+ this.rule = this.ruleInInterpolationOrMessageText;
+};
+
+// Note: Since "\" is used as an escape character, don't allow it to be part of the
+// startSymbol/endSymbol when I add the feature to allow them to be redefined.
+var INTERP_OR_END_MESSAGE_RE = /\\.|{{|}/g;
+var INTERP_OR_PLURALVALUE_OR_END_MESSAGE_RE = /\\.|{{|#|}/g;
+var ESCAPE_OR_MUSTACHE_BEGIN_RE = /\\.|{{/g;
+MessageFormatParser.prototype.advanceInInterpolationOrMessageText = function advanceInInterpolationOrMessageText() {
+ var currentIndex = this.index, match, re;
+ if (this.ruleChoiceKeyword == null) { // interpolation
+ match = this.searchRe(ESCAPE_OR_MUSTACHE_BEGIN_RE);
+ if (match == null) { // End of interpolation text. Nothing more to process.
+ this.textPart = this.text.substring(currentIndex);
+ this.index = this.text.length;
+ return null;
+ }
+ } else {
+ match = this.searchRe(this.ruleChoiceKeyword == this.rulePluralValueOrKeyword ?
+ INTERP_OR_PLURALVALUE_OR_END_MESSAGE_RE : INTERP_OR_END_MESSAGE_RE);
+ if (match == null) {
+ var position = indexToLineAndColumn(this.text, this.msgStartIndex);
+ throw $interpolateMinErr('reqendbrace',
+ 'The plural/select choice “{0}†message starting at line {1}, column {2} does not have an ending closing brace. Text “{3}â€',
+ this.choiceKey, position.line, position.column, this.text);
+ }
+ }
+ // match is non-null.
+ var token = match[0];
+ this.textPart = this.text.substring(currentIndex, match.index);
+ return token;
+};
+
+MessageFormatParser.prototype.ruleInInterpolationOrMessageText = function ruleInInterpolationOrMessageText() {
+ var currentIndex = this.index;
+ var token = this.advanceInInterpolationOrMessageText();
+ if (token == null) {
+ // End of interpolation text. Nothing more to process.
+ this.index = this.text.length;
+ this.interpolationParts.addText(this.text.substring(currentIndex));
+ this.rule = null;
+ return;
+ }
+ if (token[0] == "\\") {
+ // unescape next character and continue
+ this.interpolationParts.addText(this.textPart + token[1]);
+ return;
+ }
+ this.interpolationParts.addText(this.textPart);
+ if (token == "{{") {
+ this.pushState();
+ this.ruleStack.push(this.ruleEndMustacheInInterpolationOrMessage);
+ this.rule = this.ruleEnteredMustache;
+ } else if (token == "}") {
+ this.choices[this.choiceKey] = this.interpolationParts.toParsedFn(/*mustHaveExpression=*/false, this.text);
+ this.rule = this.ruleChoiceKeyword;
+ } else if (token == "#") {
+ this.interpolationParts.addExpressionFn(this.expressionMinusOffsetFn);
+ } else {
+ this.errorInParseLogic();
+ }
+};
+
+MessageFormatParser.prototype.ruleInterpolate = function ruleInterpolate() {
+ this.interpolationParts = new InterpolationParts(this.trustedContext, this.allOrNothing);
+ this.rule = this.ruleInInterpolation;
+};
+
+MessageFormatParser.prototype.ruleInInterpolation = function ruleInInterpolation() {
+ var currentIndex = this.index;
+ var match = this.searchRe(ESCAPE_OR_MUSTACHE_BEGIN_RE);
+ if (match == null) {
+ // End of interpolation text. Nothing more to process.
+ this.index = this.text.length;
+ this.interpolationParts.addText(this.text.substring(currentIndex));
+ this.parsedFn = this.interpolationParts.toParsedFn(this.mustHaveExpression, this.text);
+ this.rule = null;
+ return;
+ }
+ var token = match[0];
+ if (token[0] == "\\") {
+ // unescape next character and continue
+ this.interpolationParts.addText(this.text.substring(currentIndex, match.index) + token[1]);
+ return;
+ }
+ this.interpolationParts.addText(this.text.substring(currentIndex, match.index));
+ this.pushState();
+ this.ruleStack.push(this.ruleInterpolationEndMustache);
+ this.rule = this.ruleEnteredMustache;
+};
+
+MessageFormatParser.prototype.ruleInterpolationEndMustache = function ruleInterpolationEndMustache() {
+ var expressionFn = this.parsedFn;
+ this.popState();
+ this.interpolationParts.addExpressionFn(expressionFn);
+ this.rule = this.ruleInInterpolation;
+};
+
+MessageFormatParser.prototype.ruleEnteredMustache = function ruleEnteredMustache() {
+ this.parsedFn = null;
+ this.ruleStack.push(this.ruleEndMustache);
+ this.rule = this.ruleAngularExpression;
+};
+
+MessageFormatParser.prototype.ruleEndMustacheInInterpolationOrMessage = function ruleEndMustacheInInterpolationOrMessage() {
+ var expressionFn = this.parsedFn;
+ this.popState();
+ this.interpolationParts.addExpressionFn(expressionFn);
+ this.rule = this.ruleInInterpolationOrMessageText;
+};
+
+
+
+var INTERP_END_RE = /\s*}}/g;
+MessageFormatParser.prototype.ruleEndMustache = function ruleEndMustache() {
+ var match = this.matchRe(INTERP_END_RE);
+ if (match == null) {
+ var position = indexToLineAndColumn(this.text, this.index);
+ throw $interpolateMinErr('reqendinterp',
+ 'Expecting end of interpolation symbol, “{0}â€, at line {1}, column {2} in text “{3}â€',
+ '}}', position.line, position.column, this.text);
+ }
+ if (this.parsedFn == null) {
+ // If we parsed a MessageFormat extension, (e.g. select/plural today, maybe more some other
+ // day), then the result *has* to be a string and those rules would have already set
+ // this.parsedFn. If there was no MessageFormat extension, then there is no requirement to
+ // stringify the result and parsedFn isn't set. We set it here. While we could have set it
+ // unconditionally when exiting the Angular expression, I intend for us to not just replace
+ // $interpolate, but also to replace $parse in a future version (so ng-bind can work), and in
+ // such a case we do not want to unnecessarily stringify something if it's not going to be used
+ // in a string context.
+ this.parsedFn = this.$parse(this.expressionFn, this.stringifier);
+ this.parsedFn['exp'] = this.expressionFn['exp']; // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js
+ this.parsedFn['expressions'] = this.expressionFn['expressions']; // Require this to call $compile.$$addBindingInfo() which allows Protractor to find elements by binding.
+ }
+ this.rule = null;
+};
+
+MessageFormatParser.prototype.ruleAngularExpression = function ruleAngularExpression() {
+ this.angularOperatorStack = [];
+ this.expressionStartIndex = this.index;
+ this.rule = this.ruleInAngularExpression;
+};
+
+function getEndOperator(opBegin) {
+ switch (opBegin) {
+ case "{": return "}";
+ case "[": return "]";
+ case "(": return ")";
+ default: return null;
+ }
+}
+
+function getBeginOperator(opEnd) {
+ switch (opEnd) {
+ case "}": return "{";
+ case "]": return "[";
+ case ")": return "(";
+ default: return null;
+ }
+}
+
+// TODO(chirayu): The interpolation endSymbol must also be accounted for. It
+// just so happens that "}" is an operator so it's in the list below. But we
+// should support any other type of start/end interpolation symbol.
+var INTERESTING_OPERATORS_RE = /[[\]{}()'",]/g;
+MessageFormatParser.prototype.ruleInAngularExpression = function ruleInAngularExpression() {
+ var startIndex = this.index;
+ var match = this.searchRe(INTERESTING_OPERATORS_RE);
+ var position;
+ if (match == null) {
+ if (this.angularOperatorStack.length === 0) {
+ // This is the end of the Angular expression so this is actually a
+ // success. Note that when inside an interpolation, this means we even
+ // consumed the closing interpolation symbols if they were curlies. This
+ // is NOT an error at this point but will become an error further up the
+ // stack when the part that saw the opening curlies is unable to find the
+ // closing ones.
+ this.index = this.text.length;
+ this.expressionFn = this.$parse(this.text.substring(this.expressionStartIndex, this.index));
+ // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js
+ this.expressionFn['exp'] = this.text.substring(this.expressionStartIndex, this.index);
+ this.expressionFn['expressions'] = this.expressionFn['expressions'];
+ this.rule = null;
+ return;
+ }
+ var innermostOperator = this.angularOperatorStack[0];
+ throw $interpolateMinErr('badexpr',
+ 'Unexpected end of Angular expression. Expecting operator “{0}†at the end of the text “{1}â€',
+ this.getEndOperator(innermostOperator), this.text);
+ }
+ var operator = match[0];
+ if (operator == "'" || operator == '"') {
+ this.ruleStack.push(this.ruleInAngularExpression);
+ this.startStringAtMatch(match);
+ return;
+ }
+ if (operator == ",") {
+ if (this.trustedContext) {
+ position = indexToLineAndColumn(this.text, this.index);
+ throw $interpolateMinErr('unsafe',
+ 'Use of select/plural MessageFormat syntax is currently disallowed in a secure context ({0}). At line {1}, column {2} of text “{3}â€',
+ this.trustedContext, position.line, position.column, this.text);
+ }
+ // only the top level comma has relevance.
+ if (this.angularOperatorStack.length === 0) {
+ // todo: does this need to be trimmed?
+ this.expressionFn = this.$parse(this.text.substring(this.expressionStartIndex, match.index));
+ // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js
+ this.expressionFn['exp'] = this.text.substring(this.expressionStartIndex, match.index);
+ this.expressionFn['expressions'] = this.expressionFn['expressions'];
+ this.rule = null;
+ this.rule = this.rulePluralOrSelect;
+ }
+ return;
+ }
+ if (getEndOperator(operator) != null) {
+ this.angularOperatorStack.unshift(operator);
+ return;
+ }
+ var beginOperator = getBeginOperator(operator);
+ if (beginOperator == null) {
+ this.errorInParseLogic();
+ }
+ if (this.angularOperatorStack.length > 0) {
+ if (beginOperator == this.angularOperatorStack[0]) {
+ this.angularOperatorStack.shift();
+ return;
+ }
+ position = indexToLineAndColumn(this.text, this.index);
+ throw $interpolateMinErr('badexpr',
+ 'Unexpected operator “{0}†at line {1}, column {2} in text. Was expecting “{3}â€. Text: “{4}â€',
+ operator, position.line, position.column, getEndOperator(this.angularOperatorStack[0]), this.text);
+ }
+ // We are trying to pop off the operator stack but there really isn't anything to pop off.
+ this.index = match.index;
+ this.expressionFn = this.$parse(this.text.substring(this.expressionStartIndex, this.index));
+ // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js
+ this.expressionFn['exp'] = this.text.substring(this.expressionStartIndex, this.index);
+ this.expressionFn['expressions'] = this.expressionFn['expressions'];
+ this.rule = null;
+};
+
+// NOTE: ADVANCED_OPTIMIZATIONS mode.
+//
+// This file is compiled with Closure compiler's ADVANCED_OPTIMIZATIONS flag! Be wary of using
+// constructs incompatible with that mode.
+
+/* global $interpolateMinErr: false */
+/* global MessageFormatParser: false */
+/* global stringify: false */
+
+/**
+ * @ngdoc service
+ * @name $$messageFormat
+ *
+ * @description
+ * Angular internal service to recognize MessageFormat extensions in interpolation expressions.
+ * For more information, see:
+ * https://docs.google.com/a/google.com/document/d/1pbtW2yvtmFBikfRrJd8VAsabiFkKezmYZ_PbgdjQOVU/edit
+ *
+ * ## Example
+ *
+ *
+ *
+ *
+ * decreaseRecipients
+ * {{recipients.length, plural, offset:1
+ * =0 {{{sender.name}} gave no gifts (\#=#)}
+ * =1 {{{sender.name}} gave one gift to {{recipients[0].name}} (\#=#)}
+ * one {{{sender.name}} gave {{recipients[0].name}} and one other person a gift (\#=#)}
+ * other {{{sender.name}} gave {{recipients[0].name}} and # other people a gift (\#=#)}
+ * }}
+ *
+ *
+ *
+ *
+ * function Person(name, gender) {
+ * this.name = name;
+ * this.gender = gender;
+ * }
+ *
+ * var alice = new Person("Alice", "female"),
+ * bob = new Person("Bob", "male"),
+ * charlie = new Person("Charlie", "male"),
+ * harry = new Person("Harry Potter", "male");
+ *
+ * angular.module('msgFmtExample', ['ngMessageFormat'])
+ * .controller('AppController', ['$scope', function($scope) {
+ * $scope.recipients = [alice, bob, charlie];
+ * $scope.sender = harry;
+ * $scope.decreaseRecipients = function() {
+ * --$scope.recipients.length;
+ * };
+ * }]);
+ *
+ *
+ *
+ * describe('MessageFormat plural', function() {
+ * it('should pluralize initial values', function() {
+ * var messageElem = element(by.binding('recipients.length')), decreaseRecipientsBtn = element(by.id('decreaseRecipients'));
+ * expect(messageElem.getText()).toEqual('Harry Potter gave Alice and 2 other people a gift (#=2)');
+ * decreaseRecipientsBtn.click();
+ * expect(messageElem.getText()).toEqual('Harry Potter gave Alice and one other person a gift (#=1)');
+ * decreaseRecipientsBtn.click();
+ * expect(messageElem.getText()).toEqual('Harry Potter gave one gift to Alice (#=0)');
+ * decreaseRecipientsBtn.click();
+ * expect(messageElem.getText()).toEqual('Harry Potter gave no gifts (#=-1)');
+ * });
+ * });
+ *
+ *
+ */
+var $$MessageFormatFactory = ['$parse', '$locale', '$sce', '$exceptionHandler', function $$messageFormat(
+ $parse, $locale, $sce, $exceptionHandler) {
+
+ function getStringifier(trustedContext, allOrNothing, text) {
+ return function stringifier(value) {
+ try {
+ value = trustedContext ? $sce['getTrusted'](trustedContext, value) : $sce['valueOf'](value);
+ return allOrNothing && (value === void 0) ? value : stringify(value);
+ } catch (err) {
+ $exceptionHandler($interpolateMinErr['interr'](text, err));
+ }
+ };
+ }
+
+ function interpolate(text, mustHaveExpression, trustedContext, allOrNothing) {
+ var stringifier = getStringifier(trustedContext, allOrNothing, text);
+ var parser = new MessageFormatParser(text, 0, $parse, $locale['pluralCat'], stringifier,
+ mustHaveExpression, trustedContext, allOrNothing);
+ parser.run(parser.ruleInterpolate);
+ return parser.parsedFn;
+ }
+
+ return {
+ 'interpolate': interpolate
+ };
+}];
+
+var $$interpolateDecorator = ['$$messageFormat', '$delegate', function $$interpolateDecorator($$messageFormat, $interpolate) {
+ if ($interpolate['startSymbol']() != "{{" || $interpolate['endSymbol']() != "}}") {
+ throw $interpolateMinErr('nochgmustache', 'angular-message-format.js currently does not allow you to use custom start and end symbols for interpolation.');
+ }
+ var interpolate = $$messageFormat['interpolate'];
+ interpolate['startSymbol'] = $interpolate['startSymbol'];
+ interpolate['endSymbol'] = $interpolate['endSymbol'];
+ return interpolate;
+}];
+
+
+/**
+ * @ngdoc module
+ * @name ngMessageFormat
+ * @packageName angular-message-format
+ * @description
+ */
+var module = window['angular']['module']('ngMessageFormat', ['ng']);
+module['factory']('$$messageFormat', $$MessageFormatFactory);
+module['config'](['$provide', function($provide) {
+ $provide['decorator']('$interpolate', $$interpolateDecorator);
+}]);
+
+
+})(window, window.angular);
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-message-format.min.js b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-message-format.min.js
new file mode 100644
index 0000000..f85a587
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-message-format.min.js
@@ -0,0 +1,26 @@
+/*
+ AngularJS v1.5.0
+ (c) 2010-2016 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(h){'use strict';function C(a){if(null==a)return"";switch(typeof a){case "string":return a;case "number":return""+a;default:return D(a)}}function f(a,b){for(var d=a.split(/\n/g),k=0;k=c.length)b-=c.length;else return{h:k+1,f:b+1}}}function t(a){function b(){return a}var d=u[a];if(null!=d)return d;b.$$watchDelegate=function(b,d,c){var e=b.$watch(v,function(){m(d)&&d.call(null,a,a,b);e()},c);return e};u[a]=b;b.exp=a;b.expressions=[];return b}function F(a,b){function d(a){return void 0==
+a?a:a-b}function c(b){return d(a(b))}if(0===b)return a;var e;c.$$watchDelegate=function(b,c,k){return e=b.$watch(a,function(a,k){m(c)&&c.call(null,d(a),d(k),b)},k)};return c}function l(a,b){var d=this;this.b=a;this.e=b;if(void 0===b.other)throw e("reqother");this.d=function(a){return d.D(a)};this.d.$$watchDelegate=function(a,b,c){return d.P(a,b,c)};this.d.exp=a.exp;this.d.expressions=a.expressions}function n(a,b,d,c){var e=this;this.scope=b;this.oa=a;this.v=d;this.qa=c;this.U=void 0;this.K=v;this.ka=
+b.$watch(a.b,function(a){return e.ja(a)},c)}function p(a,b){l.call(this,a,b)}function w(){}function q(a,b,d,c){l.call(this,a,b);this.offset=d;this.M=c}function x(){}function g(a,b){this.u=a;this.B=b;this.i=[];this.g=[];this.J=[];this.s="";this.q=null}function r(a,b,d){this.c=a;this.scope=b;this.W=void 0;this.v=d;var c=this;this.la=b.$watchGroup(a.g,function(a,b){c.Ea(a,b)})}function s(a,b){b.b=a.b;b.C=a.C;b.w=a.w;b.e=a.e;b.k=a.k;b.c=a.c;b.n=a.n;b.F=a.F;b.l=a.l}function y(a){s(a,this)}function c(a,
+b,d,c,e,E,f,g){this.text=a;this.index=b||0;this.A=d;this.M=c;this.Da=e;this.pa=!!E;this.u=f;this.B=!!g;this.F=this.c=this.k=this.e=this.w=this.C=this.b=null;this.L=[];this.G=this.j=this.ca=this.O=this.da=this.l=this.n=this.o=this.a=this.d=null}function z(a){switch(a){case "{":return"}";case "[":return"]";case "(":return")";default:return null}}function G(a){switch(a){case "}":return"{";case "]":return"[";case ")":return"(";default:return null}}var e=h.angular.$interpolateMinErr,v=h.angular.noop,m=
+h.angular.isFunction,D=h.angular.toJson,u=Object.create(null);l.prototype.T=function(a){return this.e[this.R(a)]};l.prototype.D=function(a){return this.T(this.b(a))(a)};l.prototype.P=function(a,b,d){var c=new n(this,a,b,d);return function(){c.I()}};n.prototype.ja=function(a){var b=this;this.K();a=this.oa.T(a);this.K=this.scope.$watch(a,function(a,c){return b.na(a,c)},this.qa)};n.prototype.na=function(a,b){m(this.v)&&this.v.call(null,a,a===b?a:this.U,this.scope);this.U=a};n.prototype.I=function(){this.ka();
+this.K()};w.prototype=l.prototype;p.prototype=new w;p.prototype.R=function(a){return void 0!==this.e[a]?a:"other"};x.prototype=l.prototype;q.prototype=new x;q.prototype.R=function(a){if(isNaN(a))return"other";if(void 0!==this.e[a])return a;a=this.M(a-this.offset);return void 0!==this.e[a]?a:"other"};g.prototype.S=function(){this.s&&(null==this.q?this.i.push(this.s):(this.i.push(this.q.join("")),this.q=null),this.s="")};g.prototype.p=function(a){a.length&&(this.s?this.q?this.q.push(a):this.q=[this.s,
+a]:this.s=a)};g.prototype.H=function(a){this.S();this.J.push(this.i.length);this.g.push(a);this.i.push("")};g.prototype.ma=function(a){for(var b=Array(this.g.length),d=0;d
+ *
+ * Enter text:
+ *
+ *
+ *
+ *
You did not enter a field
+ *
+ * Your email must be between 5 and 100 characters long
+ *
+ *
+ *
+ * ```
+ *
+ * Now whatever key/value entries are present within the provided object (in this case `$error`) then
+ * the ngMessages directive will render the inner first ngMessage directive (depending if the key values
+ * match the attribute value present on each ngMessage directive). In other words, if your errors
+ * object contains the following data:
+ *
+ * ```javascript
+ *
+ * myField.$error = { minlength : true, required : true };
+ * ```
+ *
+ * Then the `required` message will be displayed first. When required is false then the `minlength` message
+ * will be displayed right after (since these messages are ordered this way in the template HTML code).
+ * The prioritization of each message is determined by what order they're present in the DOM.
+ * Therefore, instead of having custom JavaScript code determine the priority of what errors are
+ * present before others, the presentation of the errors are handled within the template.
+ *
+ * By default, ngMessages will only display one error at a time. However, if you wish to display all
+ * messages then the `ng-messages-multiple` attribute flag can be used on the element containing the
+ * ngMessages directive to make this happen.
+ *
+ * ```html
+ *
+ * ...
+ *
+ *
+ * ...
+ * ```
+ *
+ * ## Reusing and Overriding Messages
+ * In addition to prioritization, ngMessages also allows for including messages from a remote or an inline
+ * template. This allows for generic collection of messages to be reused across multiple parts of an
+ * application.
+ *
+ * ```html
+ *
+ *
+ *
+ * ```
+ *
+ * However, including generic messages may not be useful enough to match all input fields, therefore,
+ * `ngMessages` provides the ability to override messages defined in the remote template by redefining
+ * them within the directive container.
+ *
+ * ```html
+ *
+ *
+ *
+ *
+ * ```
+ *
+ * In the example HTML code above the message that is set on required will override the corresponding
+ * required message defined within the remote template. Therefore, with particular input fields (such
+ * email addresses, date fields, autocomplete inputs, etc...), specialized error messages can be applied
+ * while more generic messages can be used to handle other, more general input errors.
+ *
+ * ## Dynamic Messaging
+ * ngMessages also supports using expressions to dynamically change key values. Using arrays and
+ * repeaters to list messages is also supported. This means that the code below will be able to
+ * fully adapt itself and display the appropriate message when any of the expression data changes:
+ *
+ * ```html
+ *
+ * ```
+ *
+ * The `errorMessage.type` expression can be a string value or it can be an array so
+ * that multiple errors can be associated with a single error message:
+ *
+ * ```html
+ *
+ * Email address
+ *
+ *
+ *
+ *
You did not enter your email address
+ *
+ * Your email must be between 5 and 100 characters long
+ *
+ *
+ * ```
+ *
+ * Feel free to use other structural directives such as ng-if and ng-switch to further control
+ * what messages are active and when. Be careful, if you place ng-message on the same element
+ * as these structural directives, Angular may not be able to determine if a message is active
+ * or not. Therefore it is best to place the ng-message on a child element of the structural
+ * directive.
+ *
+ * ```html
+ *
+ *
+ *
Please enter something
+ *
+ *
+ * ```
+ *
+ * ## Animations
+ * If the `ngAnimate` module is active within the application then the `ngMessages`, `ngMessage` and
+ * `ngMessageExp` directives will trigger animations whenever any messages are added and removed from
+ * the DOM by the `ngMessages` directive.
+ *
+ * Whenever the `ngMessages` directive contains one or more visible messages then the `.ng-active` CSS
+ * class will be added to the element. The `.ng-inactive` CSS class will be applied when there are no
+ * messages present. Therefore, CSS transitions and keyframes as well as JavaScript animations can
+ * hook into the animations whenever these classes are added/removed.
+ *
+ * Let's say that our HTML code for our messages container looks like so:
+ *
+ * ```html
+ *
+ * ```
+ *
+ * Then the CSS animation code for the message container looks like so:
+ *
+ * ```css
+ * .my-messages {
+ * transition:1s linear all;
+ * }
+ * .my-messages.ng-active {
+ * // messages are visible
+ * }
+ * .my-messages.ng-inactive {
+ * // messages are hidden
+ * }
+ * ```
+ *
+ * Whenever an inner message is attached (becomes visible) or removed (becomes hidden) then the enter
+ * and leave animation is triggered for each particular element bound to the `ngMessage` directive.
+ *
+ * Therefore, the CSS code for the inner messages looks like so:
+ *
+ * ```css
+ * .some-message {
+ * transition:1s linear all;
+ * }
+ *
+ * .some-message.ng-enter {}
+ * .some-message.ng-enter.ng-enter-active {}
+ *
+ * .some-message.ng-leave {}
+ * .some-message.ng-leave.ng-leave-active {}
+ * ```
+ *
+ * {@link ngAnimate Click here} to learn how to use JavaScript animations or to learn more about ngAnimate.
+ */
+angular.module('ngMessages', [])
+
+ /**
+ * @ngdoc directive
+ * @module ngMessages
+ * @name ngMessages
+ * @restrict AE
+ *
+ * @description
+ * `ngMessages` is a directive that is designed to show and hide messages based on the state
+ * of a key/value object that it listens on. The directive itself complements error message
+ * reporting with the `ngModel` $error object (which stores a key/value state of validation errors).
+ *
+ * `ngMessages` manages the state of internal messages within its container element. The internal
+ * messages use the `ngMessage` directive and will be inserted/removed from the page depending
+ * on if they're present within the key/value object. By default, only one message will be displayed
+ * at a time and this depends on the prioritization of the messages within the template. (This can
+ * be changed by using the `ng-messages-multiple` or `multiple` attribute on the directive container.)
+ *
+ * A remote template can also be used to promote message reusability and messages can also be
+ * overridden.
+ *
+ * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`.
+ *
+ * @usage
+ * ```html
+ *
+ *
+ * ...
+ * ...
+ * ...
+ *
+ *
+ *
+ *
+ * ...
+ * ...
+ * ...
+ *
+ * ```
+ *
+ * @param {string} ngMessages an angular expression evaluating to a key/value object
+ * (this is typically the $error object on an ngModel instance).
+ * @param {string=} ngMessagesMultiple|multiple when set, all messages will be displayed with true
+ *
+ * @example
+ *
+ *
+ *
+ *
+ *
+ * angular.module('ngMessagesExample', ['ngMessages']);
+ *
+ *
+ */
+ .directive('ngMessages', ['$animate', function($animate) {
+ var ACTIVE_CLASS = 'ng-active';
+ var INACTIVE_CLASS = 'ng-inactive';
+
+ return {
+ require: 'ngMessages',
+ restrict: 'AE',
+ controller: ['$element', '$scope', '$attrs', function($element, $scope, $attrs) {
+ var ctrl = this;
+ var latestKey = 0;
+ var nextAttachId = 0;
+
+ this.getAttachId = function getAttachId() { return nextAttachId++; };
+
+ var messages = this.messages = {};
+ var renderLater, cachedCollection;
+
+ this.render = function(collection) {
+ collection = collection || {};
+
+ renderLater = false;
+ cachedCollection = collection;
+
+ // this is true if the attribute is empty or if the attribute value is truthy
+ var multiple = isAttrTruthy($scope, $attrs.ngMessagesMultiple) ||
+ isAttrTruthy($scope, $attrs.multiple);
+
+ var unmatchedMessages = [];
+ var matchedKeys = {};
+ var messageItem = ctrl.head;
+ var messageFound = false;
+ var totalMessages = 0;
+
+ // we use != instead of !== to allow for both undefined and null values
+ while (messageItem != null) {
+ totalMessages++;
+ var messageCtrl = messageItem.message;
+
+ var messageUsed = false;
+ if (!messageFound) {
+ forEach(collection, function(value, key) {
+ if (!messageUsed && truthy(value) && messageCtrl.test(key)) {
+ // this is to prevent the same error name from showing up twice
+ if (matchedKeys[key]) return;
+ matchedKeys[key] = true;
+
+ messageUsed = true;
+ messageCtrl.attach();
+ }
+ });
+ }
+
+ if (messageUsed) {
+ // unless we want to display multiple messages then we should
+ // set a flag here to avoid displaying the next message in the list
+ messageFound = !multiple;
+ } else {
+ unmatchedMessages.push(messageCtrl);
+ }
+
+ messageItem = messageItem.next;
+ }
+
+ forEach(unmatchedMessages, function(messageCtrl) {
+ messageCtrl.detach();
+ });
+
+ unmatchedMessages.length !== totalMessages
+ ? $animate.setClass($element, ACTIVE_CLASS, INACTIVE_CLASS)
+ : $animate.setClass($element, INACTIVE_CLASS, ACTIVE_CLASS);
+ };
+
+ $scope.$watchCollection($attrs.ngMessages || $attrs['for'], ctrl.render);
+
+ this.reRender = function() {
+ if (!renderLater) {
+ renderLater = true;
+ $scope.$evalAsync(function() {
+ if (renderLater) {
+ cachedCollection && ctrl.render(cachedCollection);
+ }
+ });
+ }
+ };
+
+ this.register = function(comment, messageCtrl) {
+ var nextKey = latestKey.toString();
+ messages[nextKey] = {
+ message: messageCtrl
+ };
+ insertMessageNode($element[0], comment, nextKey);
+ comment.$$ngMessageNode = nextKey;
+ latestKey++;
+
+ ctrl.reRender();
+ };
+
+ this.deregister = function(comment) {
+ var key = comment.$$ngMessageNode;
+ delete comment.$$ngMessageNode;
+ removeMessageNode($element[0], comment, key);
+ delete messages[key];
+ ctrl.reRender();
+ };
+
+ function findPreviousMessage(parent, comment) {
+ var prevNode = comment;
+ var parentLookup = [];
+ while (prevNode && prevNode !== parent) {
+ var prevKey = prevNode.$$ngMessageNode;
+ if (prevKey && prevKey.length) {
+ return messages[prevKey];
+ }
+
+ // dive deeper into the DOM and examine its children for any ngMessage
+ // comments that may be in an element that appears deeper in the list
+ if (prevNode.childNodes.length && parentLookup.indexOf(prevNode) == -1) {
+ parentLookup.push(prevNode);
+ prevNode = prevNode.childNodes[prevNode.childNodes.length - 1];
+ } else {
+ prevNode = prevNode.previousSibling || prevNode.parentNode;
+ }
+ }
+ }
+
+ function insertMessageNode(parent, comment, key) {
+ var messageNode = messages[key];
+ if (!ctrl.head) {
+ ctrl.head = messageNode;
+ } else {
+ var match = findPreviousMessage(parent, comment);
+ if (match) {
+ messageNode.next = match.next;
+ match.next = messageNode;
+ } else {
+ messageNode.next = ctrl.head;
+ ctrl.head = messageNode;
+ }
+ }
+ }
+
+ function removeMessageNode(parent, comment, key) {
+ var messageNode = messages[key];
+
+ var match = findPreviousMessage(parent, comment);
+ if (match) {
+ match.next = messageNode.next;
+ } else {
+ ctrl.head = messageNode.next;
+ }
+ }
+ }]
+ };
+
+ function isAttrTruthy(scope, attr) {
+ return (isString(attr) && attr.length === 0) || //empty attribute
+ truthy(scope.$eval(attr));
+ }
+
+ function truthy(val) {
+ return isString(val) ? val.length : !!val;
+ }
+ }])
+
+ /**
+ * @ngdoc directive
+ * @name ngMessagesInclude
+ * @restrict AE
+ * @scope
+ *
+ * @description
+ * `ngMessagesInclude` is a directive with the purpose to import existing ngMessage template
+ * code from a remote template and place the downloaded template code into the exact spot
+ * that the ngMessagesInclude directive is placed within the ngMessages container. This allows
+ * for a series of pre-defined messages to be reused and also allows for the developer to
+ * determine what messages are overridden due to the placement of the ngMessagesInclude directive.
+ *
+ * @usage
+ * ```html
+ *
+ *
+ * ...
+ *
+ *
+ *
+ *
+ * ...
+ *
+ * ```
+ *
+ * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`.
+ *
+ * @param {string} ngMessagesInclude|src a string value corresponding to the remote template.
+ */
+ .directive('ngMessagesInclude',
+ ['$templateRequest', '$document', '$compile', function($templateRequest, $document, $compile) {
+
+ return {
+ restrict: 'AE',
+ require: '^^ngMessages', // we only require this for validation sake
+ link: function($scope, element, attrs) {
+ var src = attrs.ngMessagesInclude || attrs.src;
+ $templateRequest(src).then(function(html) {
+ $compile(html)($scope, function(contents) {
+ element.after(contents);
+
+ // the anchor is placed for debugging purposes
+ var anchor = jqLite($document[0].createComment(' ngMessagesInclude: ' + src + ' '));
+ element.after(anchor);
+
+ // we don't want to pollute the DOM anymore by keeping an empty directive element
+ element.remove();
+ });
+ });
+ }
+ };
+ }])
+
+ /**
+ * @ngdoc directive
+ * @name ngMessage
+ * @restrict AE
+ * @scope
+ *
+ * @description
+ * `ngMessage` is a directive with the purpose to show and hide a particular message.
+ * For `ngMessage` to operate, a parent `ngMessages` directive on a parent DOM element
+ * must be situated since it determines which messages are visible based on the state
+ * of the provided key/value map that `ngMessages` listens on.
+ *
+ * More information about using `ngMessage` can be found in the
+ * {@link module:ngMessages `ngMessages` module documentation}.
+ *
+ * @usage
+ * ```html
+ *
+ *
+ * ...
+ * ...
+ *
+ *
+ *
+ *
+ * ...
+ * ...
+ *
+ * ```
+ *
+ * @param {expression} ngMessage|when a string value corresponding to the message key.
+ */
+ .directive('ngMessage', ngMessageDirectiveFactory())
+
+
+ /**
+ * @ngdoc directive
+ * @name ngMessageExp
+ * @restrict AE
+ * @priority 1
+ * @scope
+ *
+ * @description
+ * `ngMessageExp` is a directive with the purpose to show and hide a particular message.
+ * For `ngMessageExp` to operate, a parent `ngMessages` directive on a parent DOM element
+ * must be situated since it determines which messages are visible based on the state
+ * of the provided key/value map that `ngMessages` listens on.
+ *
+ * @usage
+ * ```html
+ *
+ *
+ * ...
+ *
+ *
+ *
+ *
+ * ...
+ *
+ * ```
+ *
+ * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`.
+ *
+ * @param {expression} ngMessageExp|whenExp an expression value corresponding to the message key.
+ */
+ .directive('ngMessageExp', ngMessageDirectiveFactory());
+
+function ngMessageDirectiveFactory() {
+ return ['$animate', function($animate) {
+ return {
+ restrict: 'AE',
+ transclude: 'element',
+ priority: 1, // must run before ngBind, otherwise the text is set on the comment
+ terminal: true,
+ require: '^^ngMessages',
+ link: function(scope, element, attrs, ngMessagesCtrl, $transclude) {
+ var commentNode = element[0];
+
+ var records;
+ var staticExp = attrs.ngMessage || attrs.when;
+ var dynamicExp = attrs.ngMessageExp || attrs.whenExp;
+ var assignRecords = function(items) {
+ records = items
+ ? (isArray(items)
+ ? items
+ : items.split(/[\s,]+/))
+ : null;
+ ngMessagesCtrl.reRender();
+ };
+
+ if (dynamicExp) {
+ assignRecords(scope.$eval(dynamicExp));
+ scope.$watchCollection(dynamicExp, assignRecords);
+ } else {
+ assignRecords(staticExp);
+ }
+
+ var currentElement, messageCtrl;
+ ngMessagesCtrl.register(commentNode, messageCtrl = {
+ test: function(name) {
+ return contains(records, name);
+ },
+ attach: function() {
+ if (!currentElement) {
+ $transclude(scope, function(elm) {
+ $animate.enter(elm, null, element);
+ currentElement = elm;
+
+ // Each time we attach this node to a message we get a new id that we can match
+ // when we are destroying the node later.
+ var $$attachId = currentElement.$$attachId = ngMessagesCtrl.getAttachId();
+
+ // in the event that the parent element is destroyed
+ // by any other structural directive then it's time
+ // to deregister the message from the controller
+ currentElement.on('$destroy', function() {
+ if (currentElement && currentElement.$$attachId === $$attachId) {
+ ngMessagesCtrl.deregister(commentNode);
+ messageCtrl.detach();
+ }
+ });
+ });
+ }
+ },
+ detach: function() {
+ if (currentElement) {
+ var elm = currentElement;
+ currentElement = null;
+ $animate.leave(elm);
+ }
+ }
+ });
+ }
+ };
+ }];
+
+ function contains(collection, key) {
+ if (collection) {
+ return isArray(collection)
+ ? collection.indexOf(key) >= 0
+ : collection.hasOwnProperty(key);
+ }
+ }
+}
+
+
+})(window, window.angular);
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-messages.min.js b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-messages.min.js
new file mode 100644
index 0000000..19f59cc
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-messages.min.js
@@ -0,0 +1,12 @@
+/*
+ AngularJS v1.5.0
+ (c) 2010-2016 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(A,d,B){'use strict';function l(){return["$animate",function(v){return{restrict:"AE",transclude:"element",priority:1,terminal:!0,require:"^^ngMessages",link:function(n,r,a,b,m){var k=r[0],f,p=a.ngMessage||a.when;a=a.ngMessageExp||a.whenExp;var d=function(a){f=a?w(a)?a:a.split(/[\s,]+/):null;b.reRender()};a?(d(n.$eval(a)),n.$watchCollection(a,d)):d(p);var e,q;b.register(k,q={test:function(a){var g=f;a=g?w(g)?0<=g.indexOf(a):g.hasOwnProperty(a):void 0;return a},attach:function(){e||m(n,function(a){v.enter(a,
+null,r);e=a;var g=e.$$attachId=b.getAttachId();e.on("$destroy",function(){e&&e.$$attachId===g&&(b.deregister(k),q.detach())})})},detach:function(){if(e){var a=e;e=null;v.leave(a)}}})}}}]}var w=d.isArray,x=d.forEach,y=d.isString,z=d.element;d.module("ngMessages",[]).directive("ngMessages",["$animate",function(d){function n(a,b){return y(b)&&0===b.length||r(a.$eval(b))}function r(a){return y(a)?a.length:!!a}return{require:"ngMessages",restrict:"AE",controller:["$element","$scope","$attrs",function(a,
+b,m){function k(a,b){for(var c=b,f=[];c&&c!==a;){var h=c.$$ngMessageNode;if(h&&h.length)return e[h];c.childNodes.length&&-1==f.indexOf(c)?(f.push(c),c=c.childNodes[c.childNodes.length-1]):c=c.previousSibling||c.parentNode}}var f=this,p=0,l=0;this.getAttachId=function(){return l++};var e=this.messages={},q,s;this.render=function(g){g=g||{};q=!1;s=g;for(var e=n(b,m.ngMessagesMultiple)||n(b,m.multiple),c=[],k={},h=f.head,p=!1,l=0;null!=h;){l++;var t=h.message,u=!1;p||x(g,function(a,c){!u&&r(a)&&t.test(c)&&
+!k[c]&&(u=k[c]=!0,t.attach())});u?p=!e:c.push(t);h=h.next}x(c,function(a){a.detach()});c.length!==l?d.setClass(a,"ng-active","ng-inactive"):d.setClass(a,"ng-inactive","ng-active")};b.$watchCollection(m.ngMessages||m["for"],f.render);this.reRender=function(){q||(q=!0,b.$evalAsync(function(){q&&s&&f.render(s)}))};this.register=function(g,b){var c=p.toString();e[c]={message:b};var d=a[0],h=e[c];f.head?(d=k(d,g))?(h.next=d.next,d.next=h):(h.next=f.head,f.head=h):f.head=h;g.$$ngMessageNode=c;p++;f.reRender()};
+this.deregister=function(b){var d=b.$$ngMessageNode;delete b.$$ngMessageNode;var c=e[d];(b=k(a[0],b))?b.next=c.next:f.head=c.next;delete e[d];f.reRender()}}]}}]).directive("ngMessagesInclude",["$templateRequest","$document","$compile",function(d,n,l){return{restrict:"AE",require:"^^ngMessages",link:function(a,b,m){var k=m.ngMessagesInclude||m.src;d(k).then(function(d){l(d)(a,function(a){b.after(a);a=z(n[0].createComment(" ngMessagesInclude: "+k+" "));b.after(a);b.remove()})})}}}]).directive("ngMessage",
+l()).directive("ngMessageExp",l())})(window,window.angular);
+//# sourceMappingURL=angular-messages.min.js.map
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-messages.min.js.map b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-messages.min.js.map
new file mode 100644
index 0000000..0cb2a94
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-messages.min.js.map
@@ -0,0 +1,8 @@
+{
+"version":3,
+"file":"angular-messages.min.js",
+"lineCount":11,
+"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CA0lBtCC,QAASA,EAAyB,EAAG,CACnC,MAAO,CAAC,UAAD,CAAa,QAAQ,CAACC,CAAD,CAAW,CACrC,MAAO,CACLC,SAAU,IADL,CAELC,WAAY,SAFP,CAGLC,SAAU,CAHL,CAILC,SAAU,CAAA,CAJL,CAKLC,QAAS,cALJ,CAMLC,KAAMA,QAAQ,CAACC,CAAD,CAAQC,CAAR,CAAiBC,CAAjB,CAAwBC,CAAxB,CAAwCC,CAAxC,CAAqD,CACjE,IAAIC,EAAcJ,CAAA,CAAQ,CAAR,CAAlB,CAEIK,CAFJ,CAGIC,EAAYL,CAAAM,UAAZD,EAA+BL,CAAAO,KAC/BC,EAAAA,CAAaR,CAAAS,aAAbD,EAAmCR,CAAAU,QACvC,KAAIC,EAAgBA,QAAQ,CAACC,CAAD,CAAQ,CAClCR,CAAA,CAAUQ,CAAA,CACHC,CAAA,CAAQD,CAAR,CAAA,CACKA,CADL,CAEKA,CAAAE,MAAA,CAAY,QAAZ,CAHF,CAIJ,IACNb,EAAAc,SAAA,EANkC,CAShCP,EAAJ,EACEG,CAAA,CAAcb,CAAAkB,MAAA,CAAYR,CAAZ,CAAd,CACA,CAAAV,CAAAmB,iBAAA,CAAuBT,CAAvB,CAAmCG,CAAnC,CAFF,EAIEA,CAAA,CAAcN,CAAd,CAnB+D,KAsB7Da,CAtB6D,CAsB7CC,CACpBlB,EAAAmB,SAAA,CAAwBjB,CAAxB,CAAqCgB,CAArC,CAAmD,CACjDE,KAAMA,QAAQ,CAACC,CAAD,CAAO,CACHlB,IAAAA,EAAAA,CAsCtB,EAAA,CADEmB,CAAJ,CACSV,CAAA,CAAQU,CAAR,CAAA,CAC0B,CAD1B,EACDA,CAAAC,QAAA,CAvCyBF,CAuCzB,CADC,CAEDC,CAAAE,eAAA,CAxCyBH,CAwCzB,CAHR,CADiC,IAAA,EApCzB,OAAO,EADY,CAD4B,CAIjDI,OAAQA,QAAQ,EAAG,CACZR,CAAL,EACEhB,CAAA,CAAYJ,CAAZ,CAAmB,QAAQ,CAAC6B,CAAD,CAAM,CAC/BpC,CAAAqC,MAAA,CAAeD,CAAf;AAAoB,IAApB,CAA0B5B,CAA1B,CACAmB,EAAA,CAAiBS,CAIjB,KAAIE,EAAaX,CAAAW,WAAbA,CAAyC5B,CAAA6B,YAAA,EAK7CZ,EAAAa,GAAA,CAAkB,UAAlB,CAA8B,QAAQ,EAAG,CACnCb,CAAJ,EAAsBA,CAAAW,WAAtB,GAAoDA,CAApD,GACE5B,CAAA+B,WAAA,CAA0B7B,CAA1B,CACA,CAAAgB,CAAAc,OAAA,EAFF,CADuC,CAAzC,CAX+B,CAAjC,CAFe,CAJ8B,CA0BjDA,OAAQA,QAAQ,EAAG,CACjB,GAAIf,CAAJ,CAAoB,CAClB,IAAIS,EAAMT,CACVA,EAAA,CAAiB,IACjB3B,EAAA2C,MAAA,CAAeP,CAAf,CAHkB,CADH,CA1B8B,CAAnD,CAvBiE,CAN9D,CAD8B,CAAhC,CAD4B,CAtlBrC,IAAId,EAAUzB,CAAAyB,QAAd,CACIsB,EAAU/C,CAAA+C,QADd,CAEIC,EAAWhD,CAAAgD,SAFf,CAGIC,EAASjD,CAAAW,QA4ObX,EAAAkD,OAAA,CAAe,YAAf,CAA6B,EAA7B,CAAAC,UAAA,CA0Ec,YA1Ed,CA0E4B,CAAC,UAAD,CAAa,QAAQ,CAAChD,CAAD,CAAW,CA0JvDiD,QAASA,EAAY,CAAC1C,CAAD,CAAQ2C,CAAR,CAAc,CAClC,MAAQL,EAAA,CAASK,CAAT,CAAR,EAA0C,CAA1C,GAA0BA,CAAAC,OAA1B,EACOC,CAAA,CAAO7C,CAAAkB,MAAA,CAAYyB,CAAZ,CAAP,CAF2B,CAKnCE,QAASA,EAAM,CAACC,CAAD,CAAM,CACnB,MAAOR,EAAA,CAASQ,CAAT,CAAA,CAAgBA,CAAAF,OAAhB,CAA6B,CAAEE,CAAAA,CADnB,CA3JrB,MAAO,CACLhD,QAAS,YADJ,CAELJ,SAAU,IAFL,CAGLqD,WAAY,CAAC,UAAD,CAAa,QAAb,CAAuB,QAAvB,CAAiC,QAAQ,CAACC,CAAD;AAAWC,CAAX,CAAmBC,CAAnB,CAA2B,CAkG9EC,QAASA,EAAmB,CAACC,CAAD,CAASC,CAAT,CAAkB,CAG5C,IAFA,IAAIC,EAAWD,CAAf,CACIE,EAAe,EACnB,CAAOD,CAAP,EAAmBA,CAAnB,GAAgCF,CAAhC,CAAA,CAAwC,CACtC,IAAII,EAAUF,CAAAG,gBACd,IAAID,CAAJ,EAAeA,CAAAZ,OAAf,CACE,MAAOc,EAAA,CAASF,CAAT,CAKLF,EAAAK,WAAAf,OAAJ,EAAqE,EAArE,EAAkCW,CAAA7B,QAAA,CAAqB4B,CAArB,CAAlC,EACEC,CAAAK,KAAA,CAAkBN,CAAlB,CACA,CAAAA,CAAA,CAAWA,CAAAK,WAAA,CAAoBL,CAAAK,WAAAf,OAApB,CAAiD,CAAjD,CAFb,EAIEU,CAJF,CAIaA,CAAAO,gBAJb,EAIyCP,CAAAQ,WAZH,CAHI,CAjG9C,IAAIC,EAAO,IAAX,CACIC,EAAY,CADhB,CAEIC,EAAe,CAEnB,KAAAjC,YAAA,CAAmBkC,QAAoB,EAAG,CAAE,MAAOD,EAAA,EAAT,CAE1C,KAAIP,EAAW,IAAAA,SAAXA,CAA2B,EAA/B,CACIS,CADJ,CACiBC,CAEjB,KAAAC,OAAA,CAAcC,QAAQ,CAAC7C,CAAD,CAAa,CACjCA,CAAA,CAAaA,CAAb,EAA2B,EAE3B0C,EAAA,CAAc,CAAA,CACdC,EAAA,CAAmB3C,CAanB,KAVA,IAAI8C,EAAW7B,CAAA,CAAaO,CAAb,CAAqBC,CAAAsB,mBAArB,CAAXD,EACW7B,CAAA,CAAaO,CAAb,CAAqBC,CAAAqB,SAArB,CADf,CAGIE,EAAoB,EAHxB,CAIIC,EAAc,EAJlB,CAKIC,EAAcZ,CAAAa,KALlB,CAMIC,EAAe,CAAA,CANnB,CAOIC,EAAgB,CAGpB,CAAsB,IAAtB,EAAOH,CAAP,CAAA,CAA4B,CAC1BG,CAAA,EACA,KAAIzD,EAAcsD,CAAAI,QAAlB,CAEIC,EAAc,CAAA,CACbH,EAAL,EACExC,CAAA,CAAQZ,CAAR,CAAoB,QAAQ,CAACwD,CAAD,CAAQC,CAAR,CAAa,CAClCF,CAAAA,CAAL,EAAoBnC,CAAA,CAAOoC,CAAP,CAApB,EAAqC5D,CAAAE,KAAA,CAAiB2D,CAAjB,CAArC;AAEM,CAAAR,CAAA,CAAYQ,CAAZ,CAFN,GAKEF,CACA,CAHAN,CAAA,CAAYQ,CAAZ,CAGA,CAHmB,CAAA,CAGnB,CAAA7D,CAAAO,OAAA,EANF,CADuC,CAAzC,CAYEoD,EAAJ,CAGEH,CAHF,CAGiB,CAACN,CAHlB,CAKEE,CAAAb,KAAA,CAAuBvC,CAAvB,CAGFsD,EAAA,CAAcA,CAAAQ,KA1BY,CA6B5B9C,CAAA,CAAQoC,CAAR,CAA2B,QAAQ,CAACpD,CAAD,CAAc,CAC/CA,CAAAc,OAAA,EAD+C,CAAjD,CAIAsC,EAAA7B,OAAA,GAA6BkC,CAA7B,CACKrF,CAAA2F,SAAA,CAAkBpC,CAAlB,CAnEQqC,WAmER,CAlEUC,aAkEV,CADL,CAEK7F,CAAA2F,SAAA,CAAkBpC,CAAlB,CAnEUsC,aAmEV,CApEQD,WAoER,CApD4B,CAuDnCpC,EAAA9B,iBAAA,CAAwB+B,CAAAqC,WAAxB,EAA6CrC,CAAA,CAAO,KAAP,CAA7C,CAA4Da,CAAAM,OAA5D,CAEA,KAAApD,SAAA,CAAgBuE,QAAQ,EAAG,CACpBrB,CAAL,GACEA,CACA,CADc,CAAA,CACd,CAAAlB,CAAAwC,WAAA,CAAkB,QAAQ,EAAG,CACvBtB,CAAJ,EACEC,CADF,EACsBL,CAAAM,OAAA,CAAYD,CAAZ,CAFK,CAA7B,CAFF,CADyB,CAW3B,KAAA9C,SAAA,CAAgBoE,QAAQ,CAACrC,CAAD,CAAUhC,CAAV,CAAuB,CAC7C,IAAIsE,EAAU3B,CAAA4B,SAAA,EACdlC,EAAA,CAASiC,CAAT,CAAA,CAAoB,CAClBZ,QAAS1D,CADS,CAGF,KAAA,EAAA2B,CAAA,CAAS,CAAT,CAAA,CAoCd6C,EAAcnC,CAAA,CApCsBiC,CAoCtB,CACb5B,EAAAa,KAAL,CAIE,CADIkB,CACJ,CADY3C,CAAA,CAAoBC,CAApB,CAxCiBC,CAwCjB,CACZ,GACEwC,CAAAV,KACA,CADmBW,CAAAX,KACnB,CAAAW,CAAAX,KAAA,CAAaU,CAFf,GAIEA,CAAAV,KACA,CADmBpB,CAAAa,KACnB,CAAAb,CAAAa,KAAA,CAAYiB,CALd,CAJF,CACE9B,CAAAa,KADF,CACciB,CArCdxC,EAAAI,gBAAA,CAA0BkC,CAC1B3B,EAAA,EAEAD,EAAA9C,SAAA,EAT6C,CAY/C;IAAAiB,WAAA,CAAkB6D,QAAQ,CAAC1C,CAAD,CAAU,CAClC,IAAI6B,EAAM7B,CAAAI,gBACV,QAAOJ,CAAAI,gBA2CP,KAAIoC,EAAcnC,CAAA,CA1CsBwB,CA0CtB,CAGlB,EADIY,CACJ,CADY3C,CAAA,CA5CMH,CAAAI,CAAS,CAATA,CA4CN,CA5CmBC,CA4CnB,CACZ,EACEyC,CAAAX,KADF,CACeU,CAAAV,KADf,CAGEpB,CAAAa,KAHF,CAGciB,CAAAV,KA/Cd,QAAOzB,CAAA,CAASwB,CAAT,CACPnB,EAAA9C,SAAA,EALkC,CA1F0C,CAApE,CAHP,CAJgD,CAAhC,CA1E5B,CAAAwB,UAAA,CA4Qc,mBA5Qd,CA6QK,CAAC,kBAAD,CAAqB,WAArB,CAAkC,UAAlC,CAA8C,QAAQ,CAACuD,CAAD,CAAmBC,CAAnB,CAA8BC,CAA9B,CAAwC,CAE9F,MAAO,CACLxG,SAAU,IADL,CAELI,QAAS,cAFJ,CAGLC,KAAMA,QAAQ,CAACkD,CAAD,CAAShD,CAAT,CAAkBC,CAAlB,CAAyB,CACrC,IAAIiG,EAAMjG,CAAAkG,kBAAND,EAAiCjG,CAAAiG,IACrCH,EAAA,CAAiBG,CAAjB,CAAAE,KAAA,CAA2B,QAAQ,CAACC,CAAD,CAAO,CACxCJ,CAAA,CAASI,CAAT,CAAA,CAAerD,CAAf,CAAuB,QAAQ,CAACsD,CAAD,CAAW,CACxCtG,CAAAuG,MAAA,CAAcD,CAAd,CAGIE,EAAAA,CAASlE,CAAA,CAAO0D,CAAA,CAAU,CAAV,CAAAS,cAAA,CAA2B,sBAA3B,CAAoDP,CAApD,CAA0D,GAA1D,CAAP,CACblG,EAAAuG,MAAA,CAAcC,CAAd,CAGAxG,EAAA0G,OAAA,EARwC,CAA1C,CADwC,CAA1C,CAFqC,CAHlC,CAFuF,CAA9F,CA7QL,CAAAlE,UAAA,CAoUa,WApUb;AAoU0BjD,CAAA,EApU1B,CAAAiD,UAAA,CAqWa,cArWb,CAqW6BjD,CAAA,EArW7B,CAnPsC,CAArC,CAAD,CAyqBGH,MAzqBH,CAyqBWA,MAAAC,QAzqBX;",
+"sources":["angular-messages.js"],
+"names":["window","angular","undefined","ngMessageDirectiveFactory","$animate","restrict","transclude","priority","terminal","require","link","scope","element","attrs","ngMessagesCtrl","$transclude","commentNode","records","staticExp","ngMessage","when","dynamicExp","ngMessageExp","whenExp","assignRecords","items","isArray","split","reRender","$eval","$watchCollection","currentElement","messageCtrl","register","test","name","collection","indexOf","hasOwnProperty","attach","elm","enter","$$attachId","getAttachId","on","deregister","detach","leave","forEach","isString","jqLite","module","directive","isAttrTruthy","attr","length","truthy","val","controller","$element","$scope","$attrs","findPreviousMessage","parent","comment","prevNode","parentLookup","prevKey","$$ngMessageNode","messages","childNodes","push","previousSibling","parentNode","ctrl","latestKey","nextAttachId","this.getAttachId","renderLater","cachedCollection","render","this.render","multiple","ngMessagesMultiple","unmatchedMessages","matchedKeys","messageItem","head","messageFound","totalMessages","message","messageUsed","value","key","next","setClass","ACTIVE_CLASS","INACTIVE_CLASS","ngMessages","this.reRender","$evalAsync","this.register","nextKey","toString","messageNode","match","this.deregister","$templateRequest","$document","$compile","src","ngMessagesInclude","then","html","contents","after","anchor","createComment","remove"]
+}
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-mocks.js b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-mocks.js
new file mode 100644
index 0000000..34d3608
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-mocks.js
@@ -0,0 +1,2842 @@
+/**
+ * @license AngularJS v1.5.0
+ * (c) 2010-2016 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {
+
+'use strict';
+
+/**
+ * @ngdoc object
+ * @name angular.mock
+ * @description
+ *
+ * Namespace from 'angular-mocks.js' which contains testing related code.
+ */
+angular.mock = {};
+
+/**
+ * ! This is a private undocumented service !
+ *
+ * @name $browser
+ *
+ * @description
+ * This service is a mock implementation of {@link ng.$browser}. It provides fake
+ * implementation for commonly used browser apis that are hard to test, e.g. setTimeout, xhr,
+ * cookies, etc...
+ *
+ * The api of this service is the same as that of the real {@link ng.$browser $browser}, except
+ * that there are several helper methods available which can be used in tests.
+ */
+angular.mock.$BrowserProvider = function() {
+ this.$get = function() {
+ return new angular.mock.$Browser();
+ };
+};
+
+angular.mock.$Browser = function() {
+ var self = this;
+
+ this.isMock = true;
+ self.$$url = "http://server/";
+ self.$$lastUrl = self.$$url; // used by url polling fn
+ self.pollFns = [];
+
+ // TODO(vojta): remove this temporary api
+ self.$$completeOutstandingRequest = angular.noop;
+ self.$$incOutstandingRequestCount = angular.noop;
+
+
+ // register url polling fn
+
+ self.onUrlChange = function(listener) {
+ self.pollFns.push(
+ function() {
+ if (self.$$lastUrl !== self.$$url || self.$$state !== self.$$lastState) {
+ self.$$lastUrl = self.$$url;
+ self.$$lastState = self.$$state;
+ listener(self.$$url, self.$$state);
+ }
+ }
+ );
+
+ return listener;
+ };
+
+ self.$$applicationDestroyed = angular.noop;
+ self.$$checkUrlChange = angular.noop;
+
+ self.deferredFns = [];
+ self.deferredNextId = 0;
+
+ self.defer = function(fn, delay) {
+ delay = delay || 0;
+ self.deferredFns.push({time:(self.defer.now + delay), fn:fn, id: self.deferredNextId});
+ self.deferredFns.sort(function(a, b) { return a.time - b.time;});
+ return self.deferredNextId++;
+ };
+
+
+ /**
+ * @name $browser#defer.now
+ *
+ * @description
+ * Current milliseconds mock time.
+ */
+ self.defer.now = 0;
+
+
+ self.defer.cancel = function(deferId) {
+ var fnIndex;
+
+ angular.forEach(self.deferredFns, function(fn, index) {
+ if (fn.id === deferId) fnIndex = index;
+ });
+
+ if (angular.isDefined(fnIndex)) {
+ self.deferredFns.splice(fnIndex, 1);
+ return true;
+ }
+
+ return false;
+ };
+
+
+ /**
+ * @name $browser#defer.flush
+ *
+ * @description
+ * Flushes all pending requests and executes the defer callbacks.
+ *
+ * @param {number=} number of milliseconds to flush. See {@link #defer.now}
+ */
+ self.defer.flush = function(delay) {
+ if (angular.isDefined(delay)) {
+ self.defer.now += delay;
+ } else {
+ if (self.deferredFns.length) {
+ self.defer.now = self.deferredFns[self.deferredFns.length - 1].time;
+ } else {
+ throw new Error('No deferred tasks to be flushed');
+ }
+ }
+
+ while (self.deferredFns.length && self.deferredFns[0].time <= self.defer.now) {
+ self.deferredFns.shift().fn();
+ }
+ };
+
+ self.$$baseHref = '/';
+ self.baseHref = function() {
+ return this.$$baseHref;
+ };
+};
+angular.mock.$Browser.prototype = {
+
+/**
+ * @name $browser#poll
+ *
+ * @description
+ * run all fns in pollFns
+ */
+ poll: function poll() {
+ angular.forEach(this.pollFns, function(pollFn) {
+ pollFn();
+ });
+ },
+
+ url: function(url, replace, state) {
+ if (angular.isUndefined(state)) {
+ state = null;
+ }
+ if (url) {
+ this.$$url = url;
+ // Native pushState serializes & copies the object; simulate it.
+ this.$$state = angular.copy(state);
+ return this;
+ }
+
+ return this.$$url;
+ },
+
+ state: function() {
+ return this.$$state;
+ },
+
+ notifyWhenNoOutstandingRequests: function(fn) {
+ fn();
+ }
+};
+
+
+/**
+ * @ngdoc provider
+ * @name $exceptionHandlerProvider
+ *
+ * @description
+ * Configures the mock implementation of {@link ng.$exceptionHandler} to rethrow or to log errors
+ * passed to the `$exceptionHandler`.
+ */
+
+/**
+ * @ngdoc service
+ * @name $exceptionHandler
+ *
+ * @description
+ * Mock implementation of {@link ng.$exceptionHandler} that rethrows or logs errors passed
+ * to it. See {@link ngMock.$exceptionHandlerProvider $exceptionHandlerProvider} for configuration
+ * information.
+ *
+ *
+ * ```js
+ * describe('$exceptionHandlerProvider', function() {
+ *
+ * it('should capture log messages and exceptions', function() {
+ *
+ * module(function($exceptionHandlerProvider) {
+ * $exceptionHandlerProvider.mode('log');
+ * });
+ *
+ * inject(function($log, $exceptionHandler, $timeout) {
+ * $timeout(function() { $log.log(1); });
+ * $timeout(function() { $log.log(2); throw 'banana peel'; });
+ * $timeout(function() { $log.log(3); });
+ * expect($exceptionHandler.errors).toEqual([]);
+ * expect($log.assertEmpty());
+ * $timeout.flush();
+ * expect($exceptionHandler.errors).toEqual(['banana peel']);
+ * expect($log.log.logs).toEqual([[1], [2], [3]]);
+ * });
+ * });
+ * });
+ * ```
+ */
+
+angular.mock.$ExceptionHandlerProvider = function() {
+ var handler;
+
+ /**
+ * @ngdoc method
+ * @name $exceptionHandlerProvider#mode
+ *
+ * @description
+ * Sets the logging mode.
+ *
+ * @param {string} mode Mode of operation, defaults to `rethrow`.
+ *
+ * - `log`: Sometimes it is desirable to test that an error is thrown, for this case the `log`
+ * mode stores an array of errors in `$exceptionHandler.errors`, to allow later
+ * assertion of them. See {@link ngMock.$log#assertEmpty assertEmpty()} and
+ * {@link ngMock.$log#reset reset()}
+ * - `rethrow`: If any errors are passed to the handler in tests, it typically means that there
+ * is a bug in the application or test, so this mock will make these tests fail.
+ * For any implementations that expect exceptions to be thrown, the `rethrow` mode
+ * will also maintain a log of thrown errors.
+ */
+ this.mode = function(mode) {
+
+ switch (mode) {
+ case 'log':
+ case 'rethrow':
+ var errors = [];
+ handler = function(e) {
+ if (arguments.length == 1) {
+ errors.push(e);
+ } else {
+ errors.push([].slice.call(arguments, 0));
+ }
+ if (mode === "rethrow") {
+ throw e;
+ }
+ };
+ handler.errors = errors;
+ break;
+ default:
+ throw new Error("Unknown mode '" + mode + "', only 'log'/'rethrow' modes are allowed!");
+ }
+ };
+
+ this.$get = function() {
+ return handler;
+ };
+
+ this.mode('rethrow');
+};
+
+
+/**
+ * @ngdoc service
+ * @name $log
+ *
+ * @description
+ * Mock implementation of {@link ng.$log} that gathers all logged messages in arrays
+ * (one array per logging level). These arrays are exposed as `logs` property of each of the
+ * level-specific log function, e.g. for level `error` the array is exposed as `$log.error.logs`.
+ *
+ */
+angular.mock.$LogProvider = function() {
+ var debug = true;
+
+ function concat(array1, array2, index) {
+ return array1.concat(Array.prototype.slice.call(array2, index));
+ }
+
+ this.debugEnabled = function(flag) {
+ if (angular.isDefined(flag)) {
+ debug = flag;
+ return this;
+ } else {
+ return debug;
+ }
+ };
+
+ this.$get = function() {
+ var $log = {
+ log: function() { $log.log.logs.push(concat([], arguments, 0)); },
+ warn: function() { $log.warn.logs.push(concat([], arguments, 0)); },
+ info: function() { $log.info.logs.push(concat([], arguments, 0)); },
+ error: function() { $log.error.logs.push(concat([], arguments, 0)); },
+ debug: function() {
+ if (debug) {
+ $log.debug.logs.push(concat([], arguments, 0));
+ }
+ }
+ };
+
+ /**
+ * @ngdoc method
+ * @name $log#reset
+ *
+ * @description
+ * Reset all of the logging arrays to empty.
+ */
+ $log.reset = function() {
+ /**
+ * @ngdoc property
+ * @name $log#log.logs
+ *
+ * @description
+ * Array of messages logged using {@link ng.$log#log `log()`}.
+ *
+ * @example
+ * ```js
+ * $log.log('Some Log');
+ * var first = $log.log.logs.unshift();
+ * ```
+ */
+ $log.log.logs = [];
+ /**
+ * @ngdoc property
+ * @name $log#info.logs
+ *
+ * @description
+ * Array of messages logged using {@link ng.$log#info `info()`}.
+ *
+ * @example
+ * ```js
+ * $log.info('Some Info');
+ * var first = $log.info.logs.unshift();
+ * ```
+ */
+ $log.info.logs = [];
+ /**
+ * @ngdoc property
+ * @name $log#warn.logs
+ *
+ * @description
+ * Array of messages logged using {@link ng.$log#warn `warn()`}.
+ *
+ * @example
+ * ```js
+ * $log.warn('Some Warning');
+ * var first = $log.warn.logs.unshift();
+ * ```
+ */
+ $log.warn.logs = [];
+ /**
+ * @ngdoc property
+ * @name $log#error.logs
+ *
+ * @description
+ * Array of messages logged using {@link ng.$log#error `error()`}.
+ *
+ * @example
+ * ```js
+ * $log.error('Some Error');
+ * var first = $log.error.logs.unshift();
+ * ```
+ */
+ $log.error.logs = [];
+ /**
+ * @ngdoc property
+ * @name $log#debug.logs
+ *
+ * @description
+ * Array of messages logged using {@link ng.$log#debug `debug()`}.
+ *
+ * @example
+ * ```js
+ * $log.debug('Some Error');
+ * var first = $log.debug.logs.unshift();
+ * ```
+ */
+ $log.debug.logs = [];
+ };
+
+ /**
+ * @ngdoc method
+ * @name $log#assertEmpty
+ *
+ * @description
+ * Assert that all of the logging methods have no logged messages. If any messages are present,
+ * an exception is thrown.
+ */
+ $log.assertEmpty = function() {
+ var errors = [];
+ angular.forEach(['error', 'warn', 'info', 'log', 'debug'], function(logLevel) {
+ angular.forEach($log[logLevel].logs, function(log) {
+ angular.forEach(log, function(logItem) {
+ errors.push('MOCK $log (' + logLevel + '): ' + String(logItem) + '\n' +
+ (logItem.stack || ''));
+ });
+ });
+ });
+ if (errors.length) {
+ errors.unshift("Expected $log to be empty! Either a message was logged unexpectedly, or " +
+ "an expected log message was not checked and removed:");
+ errors.push('');
+ throw new Error(errors.join('\n---------\n'));
+ }
+ };
+
+ $log.reset();
+ return $log;
+ };
+};
+
+
+/**
+ * @ngdoc service
+ * @name $interval
+ *
+ * @description
+ * Mock implementation of the $interval service.
+ *
+ * Use {@link ngMock.$interval#flush `$interval.flush(millis)`} to
+ * move forward by `millis` milliseconds and trigger any functions scheduled to run in that
+ * time.
+ *
+ * @param {function()} fn A function that should be called repeatedly.
+ * @param {number} delay Number of milliseconds between each function call.
+ * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat
+ * indefinitely.
+ * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise
+ * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.
+ * @param {...*=} Pass additional parameters to the executed function.
+ * @returns {promise} A promise which will be notified on each iteration.
+ */
+angular.mock.$IntervalProvider = function() {
+ this.$get = ['$browser', '$rootScope', '$q', '$$q',
+ function($browser, $rootScope, $q, $$q) {
+ var repeatFns = [],
+ nextRepeatId = 0,
+ now = 0;
+
+ var $interval = function(fn, delay, count, invokeApply) {
+ var hasParams = arguments.length > 4,
+ args = hasParams ? Array.prototype.slice.call(arguments, 4) : [],
+ iteration = 0,
+ skipApply = (angular.isDefined(invokeApply) && !invokeApply),
+ deferred = (skipApply ? $$q : $q).defer(),
+ promise = deferred.promise;
+
+ count = (angular.isDefined(count)) ? count : 0;
+ promise.then(null, null, (!hasParams) ? fn : function() {
+ fn.apply(null, args);
+ });
+
+ promise.$$intervalId = nextRepeatId;
+
+ function tick() {
+ deferred.notify(iteration++);
+
+ if (count > 0 && iteration >= count) {
+ var fnIndex;
+ deferred.resolve(iteration);
+
+ angular.forEach(repeatFns, function(fn, index) {
+ if (fn.id === promise.$$intervalId) fnIndex = index;
+ });
+
+ if (angular.isDefined(fnIndex)) {
+ repeatFns.splice(fnIndex, 1);
+ }
+ }
+
+ if (skipApply) {
+ $browser.defer.flush();
+ } else {
+ $rootScope.$apply();
+ }
+ }
+
+ repeatFns.push({
+ nextTime:(now + delay),
+ delay: delay,
+ fn: tick,
+ id: nextRepeatId,
+ deferred: deferred
+ });
+ repeatFns.sort(function(a, b) { return a.nextTime - b.nextTime;});
+
+ nextRepeatId++;
+ return promise;
+ };
+ /**
+ * @ngdoc method
+ * @name $interval#cancel
+ *
+ * @description
+ * Cancels a task associated with the `promise`.
+ *
+ * @param {promise} promise A promise from calling the `$interval` function.
+ * @returns {boolean} Returns `true` if the task was successfully cancelled.
+ */
+ $interval.cancel = function(promise) {
+ if (!promise) return false;
+ var fnIndex;
+
+ angular.forEach(repeatFns, function(fn, index) {
+ if (fn.id === promise.$$intervalId) fnIndex = index;
+ });
+
+ if (angular.isDefined(fnIndex)) {
+ repeatFns[fnIndex].deferred.reject('canceled');
+ repeatFns.splice(fnIndex, 1);
+ return true;
+ }
+
+ return false;
+ };
+
+ /**
+ * @ngdoc method
+ * @name $interval#flush
+ * @description
+ *
+ * Runs interval tasks scheduled to be run in the next `millis` milliseconds.
+ *
+ * @param {number=} millis maximum timeout amount to flush up until.
+ *
+ * @return {number} The amount of time moved forward.
+ */
+ $interval.flush = function(millis) {
+ now += millis;
+ while (repeatFns.length && repeatFns[0].nextTime <= now) {
+ var task = repeatFns[0];
+ task.fn();
+ task.nextTime += task.delay;
+ repeatFns.sort(function(a, b) { return a.nextTime - b.nextTime;});
+ }
+ return millis;
+ };
+
+ return $interval;
+ }];
+};
+
+
+/* jshint -W101 */
+/* The R_ISO8061_STR regex is never going to fit into the 100 char limit!
+ * This directive should go inside the anonymous function but a bug in JSHint means that it would
+ * not be enacted early enough to prevent the warning.
+ */
+var R_ISO8061_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;
+
+function jsonStringToDate(string) {
+ var match;
+ if (match = string.match(R_ISO8061_STR)) {
+ var date = new Date(0),
+ tzHour = 0,
+ tzMin = 0;
+ if (match[9]) {
+ tzHour = toInt(match[9] + match[10]);
+ tzMin = toInt(match[9] + match[11]);
+ }
+ date.setUTCFullYear(toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));
+ date.setUTCHours(toInt(match[4] || 0) - tzHour,
+ toInt(match[5] || 0) - tzMin,
+ toInt(match[6] || 0),
+ toInt(match[7] || 0));
+ return date;
+ }
+ return string;
+}
+
+function toInt(str) {
+ return parseInt(str, 10);
+}
+
+function padNumber(num, digits, trim) {
+ var neg = '';
+ if (num < 0) {
+ neg = '-';
+ num = -num;
+ }
+ num = '' + num;
+ while (num.length < digits) num = '0' + num;
+ if (trim) {
+ num = num.substr(num.length - digits);
+ }
+ return neg + num;
+}
+
+
+/**
+ * @ngdoc type
+ * @name angular.mock.TzDate
+ * @description
+ *
+ * *NOTE*: this is not an injectable instance, just a globally available mock class of `Date`.
+ *
+ * Mock of the Date type which has its timezone specified via constructor arg.
+ *
+ * The main purpose is to create Date-like instances with timezone fixed to the specified timezone
+ * offset, so that we can test code that depends on local timezone settings without dependency on
+ * the time zone settings of the machine where the code is running.
+ *
+ * @param {number} offset Offset of the *desired* timezone in hours (fractions will be honored)
+ * @param {(number|string)} timestamp Timestamp representing the desired time in *UTC*
+ *
+ * @example
+ * !!!! WARNING !!!!!
+ * This is not a complete Date object so only methods that were implemented can be called safely.
+ * To make matters worse, TzDate instances inherit stuff from Date via a prototype.
+ *
+ * We do our best to intercept calls to "unimplemented" methods, but since the list of methods is
+ * incomplete we might be missing some non-standard methods. This can result in errors like:
+ * "Date.prototype.foo called on incompatible Object".
+ *
+ * ```js
+ * var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00Z');
+ * newYearInBratislava.getTimezoneOffset() => -60;
+ * newYearInBratislava.getFullYear() => 2010;
+ * newYearInBratislava.getMonth() => 0;
+ * newYearInBratislava.getDate() => 1;
+ * newYearInBratislava.getHours() => 0;
+ * newYearInBratislava.getMinutes() => 0;
+ * newYearInBratislava.getSeconds() => 0;
+ * ```
+ *
+ */
+angular.mock.TzDate = function(offset, timestamp) {
+ var self = new Date(0);
+ if (angular.isString(timestamp)) {
+ var tsStr = timestamp;
+
+ self.origDate = jsonStringToDate(timestamp);
+
+ timestamp = self.origDate.getTime();
+ if (isNaN(timestamp)) {
+ throw {
+ name: "Illegal Argument",
+ message: "Arg '" + tsStr + "' passed into TzDate constructor is not a valid date string"
+ };
+ }
+ } else {
+ self.origDate = new Date(timestamp);
+ }
+
+ var localOffset = new Date(timestamp).getTimezoneOffset();
+ self.offsetDiff = localOffset * 60 * 1000 - offset * 1000 * 60 * 60;
+ self.date = new Date(timestamp + self.offsetDiff);
+
+ self.getTime = function() {
+ return self.date.getTime() - self.offsetDiff;
+ };
+
+ self.toLocaleDateString = function() {
+ return self.date.toLocaleDateString();
+ };
+
+ self.getFullYear = function() {
+ return self.date.getFullYear();
+ };
+
+ self.getMonth = function() {
+ return self.date.getMonth();
+ };
+
+ self.getDate = function() {
+ return self.date.getDate();
+ };
+
+ self.getHours = function() {
+ return self.date.getHours();
+ };
+
+ self.getMinutes = function() {
+ return self.date.getMinutes();
+ };
+
+ self.getSeconds = function() {
+ return self.date.getSeconds();
+ };
+
+ self.getMilliseconds = function() {
+ return self.date.getMilliseconds();
+ };
+
+ self.getTimezoneOffset = function() {
+ return offset * 60;
+ };
+
+ self.getUTCFullYear = function() {
+ return self.origDate.getUTCFullYear();
+ };
+
+ self.getUTCMonth = function() {
+ return self.origDate.getUTCMonth();
+ };
+
+ self.getUTCDate = function() {
+ return self.origDate.getUTCDate();
+ };
+
+ self.getUTCHours = function() {
+ return self.origDate.getUTCHours();
+ };
+
+ self.getUTCMinutes = function() {
+ return self.origDate.getUTCMinutes();
+ };
+
+ self.getUTCSeconds = function() {
+ return self.origDate.getUTCSeconds();
+ };
+
+ self.getUTCMilliseconds = function() {
+ return self.origDate.getUTCMilliseconds();
+ };
+
+ self.getDay = function() {
+ return self.date.getDay();
+ };
+
+ // provide this method only on browsers that already have it
+ if (self.toISOString) {
+ self.toISOString = function() {
+ return padNumber(self.origDate.getUTCFullYear(), 4) + '-' +
+ padNumber(self.origDate.getUTCMonth() + 1, 2) + '-' +
+ padNumber(self.origDate.getUTCDate(), 2) + 'T' +
+ padNumber(self.origDate.getUTCHours(), 2) + ':' +
+ padNumber(self.origDate.getUTCMinutes(), 2) + ':' +
+ padNumber(self.origDate.getUTCSeconds(), 2) + '.' +
+ padNumber(self.origDate.getUTCMilliseconds(), 3) + 'Z';
+ };
+ }
+
+ //hide all methods not implemented in this mock that the Date prototype exposes
+ var unimplementedMethods = ['getUTCDay',
+ 'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds',
+ 'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear',
+ 'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds',
+ 'setYear', 'toDateString', 'toGMTString', 'toJSON', 'toLocaleFormat', 'toLocaleString',
+ 'toLocaleTimeString', 'toSource', 'toString', 'toTimeString', 'toUTCString', 'valueOf'];
+
+ angular.forEach(unimplementedMethods, function(methodName) {
+ self[methodName] = function() {
+ throw new Error("Method '" + methodName + "' is not implemented in the TzDate mock");
+ };
+ });
+
+ return self;
+};
+
+//make "tzDateInstance instanceof Date" return true
+angular.mock.TzDate.prototype = Date.prototype;
+/* jshint +W101 */
+
+
+/**
+ * @ngdoc service
+ * @name $animate
+ *
+ * @description
+ * Mock implementation of the {@link ng.$animate `$animate`} service. Exposes two additional methods
+ * for testing animations.
+ */
+angular.mock.animate = angular.module('ngAnimateMock', ['ng'])
+
+ .config(['$provide', function($provide) {
+
+ $provide.factory('$$forceReflow', function() {
+ function reflowFn() {
+ reflowFn.totalReflows++;
+ }
+ reflowFn.totalReflows = 0;
+ return reflowFn;
+ });
+
+ $provide.factory('$$animateAsyncRun', function() {
+ var queue = [];
+ var queueFn = function() {
+ return function(fn) {
+ queue.push(fn);
+ };
+ };
+ queueFn.flush = function() {
+ if (queue.length === 0) return false;
+
+ for (var i = 0; i < queue.length; i++) {
+ queue[i]();
+ }
+ queue = [];
+
+ return true;
+ };
+ return queueFn;
+ });
+
+ $provide.decorator('$$animateJs', ['$delegate', function($delegate) {
+ var runners = [];
+
+ var animateJsConstructor = function() {
+ var animator = $delegate.apply($delegate, arguments);
+ // If no javascript animation is found, animator is undefined
+ if (animator) {
+ runners.push(animator);
+ }
+ return animator;
+ };
+
+ animateJsConstructor.$closeAndFlush = function() {
+ runners.forEach(function(runner) {
+ runner.end();
+ });
+ runners = [];
+ };
+
+ return animateJsConstructor;
+ }]);
+
+ $provide.decorator('$animateCss', ['$delegate', function($delegate) {
+ var runners = [];
+
+ var animateCssConstructor = function(element, options) {
+ var animator = $delegate(element, options);
+ runners.push(animator);
+ return animator;
+ };
+
+ animateCssConstructor.$closeAndFlush = function() {
+ runners.forEach(function(runner) {
+ runner.end();
+ });
+ runners = [];
+ };
+
+ return animateCssConstructor;
+ }]);
+
+ $provide.decorator('$animate', ['$delegate', '$timeout', '$browser', '$$rAF', '$animateCss', '$$animateJs',
+ '$$forceReflow', '$$animateAsyncRun', '$rootScope',
+ function($delegate, $timeout, $browser, $$rAF, $animateCss, $$animateJs,
+ $$forceReflow, $$animateAsyncRun, $rootScope) {
+ var animate = {
+ queue: [],
+ cancel: $delegate.cancel,
+ on: $delegate.on,
+ off: $delegate.off,
+ pin: $delegate.pin,
+ get reflows() {
+ return $$forceReflow.totalReflows;
+ },
+ enabled: $delegate.enabled,
+ /**
+ * @ngdoc method
+ * @name $animate#closeAndFlush
+ * @description
+ *
+ * This method will close all pending animations (both {@link ngAnimate#javascript-based-animations Javascript}
+ * and {@link ngAnimate.$animateCss CSS}) and it will also flush any remaining animation frames and/or callbacks.
+ */
+ closeAndFlush: function() {
+ // we allow the flush command to swallow the errors
+ // because depending on whether CSS or JS animations are
+ // used, there may not be a RAF flush. The primary flush
+ // at the end of this function must throw an exception
+ // because it will track if there were pending animations
+ this.flush(true);
+ $animateCss.$closeAndFlush();
+ $$animateJs.$closeAndFlush();
+ this.flush();
+ },
+ /**
+ * @ngdoc method
+ * @name $animate#flush
+ * @description
+ *
+ * This method is used to flush the pending callbacks and animation frames to either start
+ * an animation or conclude an animation. Note that this will not actually close an
+ * actively running animation (see {@link ngMock.$animate#closeAndFlush `closeAndFlush()`} for that).
+ */
+ flush: function(hideErrors) {
+ $rootScope.$digest();
+
+ var doNextRun, somethingFlushed = false;
+ do {
+ doNextRun = false;
+
+ if ($$rAF.queue.length) {
+ $$rAF.flush();
+ doNextRun = somethingFlushed = true;
+ }
+
+ if ($$animateAsyncRun.flush()) {
+ doNextRun = somethingFlushed = true;
+ }
+ } while (doNextRun);
+
+ if (!somethingFlushed && !hideErrors) {
+ throw new Error('No pending animations ready to be closed or flushed');
+ }
+
+ $rootScope.$digest();
+ }
+ };
+
+ angular.forEach(
+ ['animate','enter','leave','move','addClass','removeClass','setClass'], function(method) {
+ animate[method] = function() {
+ animate.queue.push({
+ event: method,
+ element: arguments[0],
+ options: arguments[arguments.length - 1],
+ args: arguments
+ });
+ return $delegate[method].apply($delegate, arguments);
+ };
+ });
+
+ return animate;
+ }]);
+
+ }]);
+
+
+/**
+ * @ngdoc function
+ * @name angular.mock.dump
+ * @description
+ *
+ * *NOTE*: this is not an injectable instance, just a globally available function.
+ *
+ * Method for serializing common angular objects (scope, elements, etc..) into strings, useful for
+ * debugging.
+ *
+ * This method is also available on window, where it can be used to display objects on debug
+ * console.
+ *
+ * @param {*} object - any object to turn into string.
+ * @return {string} a serialized string of the argument
+ */
+angular.mock.dump = function(object) {
+ return serialize(object);
+
+ function serialize(object) {
+ var out;
+
+ if (angular.isElement(object)) {
+ object = angular.element(object);
+ out = angular.element('
');
+ angular.forEach(object, function(element) {
+ out.append(angular.element(element).clone());
+ });
+ out = out.html();
+ } else if (angular.isArray(object)) {
+ out = [];
+ angular.forEach(object, function(o) {
+ out.push(serialize(o));
+ });
+ out = '[ ' + out.join(', ') + ' ]';
+ } else if (angular.isObject(object)) {
+ if (angular.isFunction(object.$eval) && angular.isFunction(object.$apply)) {
+ out = serializeScope(object);
+ } else if (object instanceof Error) {
+ out = object.stack || ('' + object.name + ': ' + object.message);
+ } else {
+ // TODO(i): this prevents methods being logged,
+ // we should have a better way to serialize objects
+ out = angular.toJson(object, true);
+ }
+ } else {
+ out = String(object);
+ }
+
+ return out;
+ }
+
+ function serializeScope(scope, offset) {
+ offset = offset || ' ';
+ var log = [offset + 'Scope(' + scope.$id + '): {'];
+ for (var key in scope) {
+ if (Object.prototype.hasOwnProperty.call(scope, key) && !key.match(/^(\$|this)/)) {
+ log.push(' ' + key + ': ' + angular.toJson(scope[key]));
+ }
+ }
+ var child = scope.$$childHead;
+ while (child) {
+ log.push(serializeScope(child, offset + ' '));
+ child = child.$$nextSibling;
+ }
+ log.push('}');
+ return log.join('\n' + offset);
+ }
+};
+
+/**
+ * @ngdoc service
+ * @name $httpBackend
+ * @description
+ * Fake HTTP backend implementation suitable for unit testing applications that use the
+ * {@link ng.$http $http service}.
+ *
+ * *Note*: For fake HTTP backend implementation suitable for end-to-end testing or backend-less
+ * development please see {@link ngMockE2E.$httpBackend e2e $httpBackend mock}.
+ *
+ * During unit testing, we want our unit tests to run quickly and have no external dependencies so
+ * we don’t want to send [XHR](https://developer.mozilla.org/en/xmlhttprequest) or
+ * [JSONP](http://en.wikipedia.org/wiki/JSONP) requests to a real server. All we really need is
+ * to verify whether a certain request has been sent or not, or alternatively just let the
+ * application make requests, respond with pre-trained responses and assert that the end result is
+ * what we expect it to be.
+ *
+ * This mock implementation can be used to respond with static or dynamic responses via the
+ * `expect` and `when` apis and their shortcuts (`expectGET`, `whenPOST`, etc).
+ *
+ * When an Angular application needs some data from a server, it calls the $http service, which
+ * sends the request to a real server using $httpBackend service. With dependency injection, it is
+ * easy to inject $httpBackend mock (which has the same API as $httpBackend) and use it to verify
+ * the requests and respond with some testing data without sending a request to a real server.
+ *
+ * There are two ways to specify what test data should be returned as http responses by the mock
+ * backend when the code under test makes http requests:
+ *
+ * - `$httpBackend.expect` - specifies a request expectation
+ * - `$httpBackend.when` - specifies a backend definition
+ *
+ *
+ * ## Request Expectations vs Backend Definitions
+ *
+ * Request expectations provide a way to make assertions about requests made by the application and
+ * to define responses for those requests. The test will fail if the expected requests are not made
+ * or they are made in the wrong order.
+ *
+ * Backend definitions allow you to define a fake backend for your application which doesn't assert
+ * if a particular request was made or not, it just returns a trained response if a request is made.
+ * The test will pass whether or not the request gets made during testing.
+ *
+ *
+ *
+ * Request expectations Backend definitions
+ *
+ * Syntax
+ * .expect(...).respond(...)
+ * .when(...).respond(...)
+ *
+ *
+ * Typical usage
+ * strict unit tests
+ * loose (black-box) unit testing
+ *
+ *
+ * Fulfills multiple requests
+ * NO
+ * YES
+ *
+ *
+ * Order of requests matters
+ * YES
+ * NO
+ *
+ *
+ * Request required
+ * YES
+ * NO
+ *
+ *
+ * Response required
+ * optional (see below)
+ * YES
+ *
+ *
+ *
+ * In cases where both backend definitions and request expectations are specified during unit
+ * testing, the request expectations are evaluated first.
+ *
+ * If a request expectation has no response specified, the algorithm will search your backend
+ * definitions for an appropriate response.
+ *
+ * If a request didn't match any expectation or if the expectation doesn't have the response
+ * defined, the backend definitions are evaluated in sequential order to see if any of them match
+ * the request. The response from the first matched definition is returned.
+ *
+ *
+ * ## Flushing HTTP requests
+ *
+ * The $httpBackend used in production always responds to requests asynchronously. If we preserved
+ * this behavior in unit testing, we'd have to create async unit tests, which are hard to write,
+ * to follow and to maintain. But neither can the testing mock respond synchronously; that would
+ * change the execution of the code under test. For this reason, the mock $httpBackend has a
+ * `flush()` method, which allows the test to explicitly flush pending requests. This preserves
+ * the async api of the backend, while allowing the test to execute synchronously.
+ *
+ *
+ * ## Unit testing with mock $httpBackend
+ * The following code shows how to setup and use the mock backend when unit testing a controller.
+ * First we create the controller under test:
+ *
+ ```js
+ // The module code
+ angular
+ .module('MyApp', [])
+ .controller('MyController', MyController);
+
+ // The controller code
+ function MyController($scope, $http) {
+ var authToken;
+
+ $http.get('/auth.py').then(function(response) {
+ authToken = response.headers('A-Token');
+ $scope.user = response.data;
+ });
+
+ $scope.saveMessage = function(message) {
+ var headers = { 'Authorization': authToken };
+ $scope.status = 'Saving...';
+
+ $http.post('/add-msg.py', message, { headers: headers } ).then(function(response) {
+ $scope.status = '';
+ }).catch(function() {
+ $scope.status = 'Failed...';
+ });
+ };
+ }
+ ```
+ *
+ * Now we setup the mock backend and create the test specs:
+ *
+ ```js
+ // testing controller
+ describe('MyController', function() {
+ var $httpBackend, $rootScope, createController, authRequestHandler;
+
+ // Set up the module
+ beforeEach(module('MyApp'));
+
+ beforeEach(inject(function($injector) {
+ // Set up the mock http service responses
+ $httpBackend = $injector.get('$httpBackend');
+ // backend definition common for all tests
+ authRequestHandler = $httpBackend.when('GET', '/auth.py')
+ .respond({userId: 'userX'}, {'A-Token': 'xxx'});
+
+ // Get hold of a scope (i.e. the root scope)
+ $rootScope = $injector.get('$rootScope');
+ // The $controller service is used to create instances of controllers
+ var $controller = $injector.get('$controller');
+
+ createController = function() {
+ return $controller('MyController', {'$scope' : $rootScope });
+ };
+ }));
+
+
+ afterEach(function() {
+ $httpBackend.verifyNoOutstandingExpectation();
+ $httpBackend.verifyNoOutstandingRequest();
+ });
+
+
+ it('should fetch authentication token', function() {
+ $httpBackend.expectGET('/auth.py');
+ var controller = createController();
+ $httpBackend.flush();
+ });
+
+
+ it('should fail authentication', function() {
+
+ // Notice how you can change the response even after it was set
+ authRequestHandler.respond(401, '');
+
+ $httpBackend.expectGET('/auth.py');
+ var controller = createController();
+ $httpBackend.flush();
+ expect($rootScope.status).toBe('Failed...');
+ });
+
+
+ it('should send msg to server', function() {
+ var controller = createController();
+ $httpBackend.flush();
+
+ // now you don’t care about the authentication, but
+ // the controller will still send the request and
+ // $httpBackend will respond without you having to
+ // specify the expectation and response for this request
+
+ $httpBackend.expectPOST('/add-msg.py', 'message content').respond(201, '');
+ $rootScope.saveMessage('message content');
+ expect($rootScope.status).toBe('Saving...');
+ $httpBackend.flush();
+ expect($rootScope.status).toBe('');
+ });
+
+
+ it('should send auth header', function() {
+ var controller = createController();
+ $httpBackend.flush();
+
+ $httpBackend.expectPOST('/add-msg.py', undefined, function(headers) {
+ // check if the header was sent, if it wasn't the expectation won't
+ // match the request and the test will fail
+ return headers['Authorization'] == 'xxx';
+ }).respond(201, '');
+
+ $rootScope.saveMessage('whatever');
+ $httpBackend.flush();
+ });
+ });
+ ```
+ *
+ * ## Dynamic responses
+ *
+ * You define a response to a request by chaining a call to `respond()` onto a definition or expectation.
+ * If you provide a **callback** as the first parameter to `respond(callback)` then you can dynamically generate
+ * a response based on the properties of the request.
+ *
+ * The `callback` function should be of the form `function(method, url, data, headers, params)`.
+ *
+ * ### Query parameters
+ *
+ * By default, query parameters on request URLs are parsed into the `params` object. So a request URL
+ * of `/list?q=searchstr&orderby=-name` would set `params` to be `{q: 'searchstr', orderby: '-name'}`.
+ *
+ * ### Regex parameter matching
+ *
+ * If an expectation or definition uses a **regex** to match the URL, you can provide an array of **keys** via a
+ * `params` argument. The index of each **key** in the array will match the index of a **group** in the
+ * **regex**.
+ *
+ * The `params` object in the **callback** will now have properties with these keys, which hold the value of the
+ * corresponding **group** in the **regex**.
+ *
+ * This also applies to the `when` and `expect` shortcut methods.
+ *
+ *
+ * ```js
+ * $httpBackend.expect('GET', /\/user\/(.+)/, undefined, undefined, ['id'])
+ * .respond(function(method, url, data, headers, params) {
+ * // for requested url of '/user/1234' params is {id: '1234'}
+ * });
+ *
+ * $httpBackend.whenPATCH(/\/user\/(.+)\/article\/(.+)/, undefined, undefined, ['user', 'article'])
+ * .respond(function(method, url, data, headers, params) {
+ * // for url of '/user/1234/article/567' params is {user: '1234', article: '567'}
+ * });
+ * ```
+ *
+ * ## Matching route requests
+ *
+ * For extra convenience, `whenRoute` and `expectRoute` shortcuts are available. These methods offer colon
+ * delimited matching of the url path, ignoring the query string. This allows declarations
+ * similar to how application routes are configured with `$routeProvider`. Because these methods convert
+ * the definition url to regex, declaration order is important. Combined with query parameter parsing,
+ * the following is possible:
+ *
+ ```js
+ $httpBackend.whenRoute('GET', '/users/:id')
+ .respond(function(method, url, data, headers, params) {
+ return [200, MockUserList[Number(params.id)]];
+ });
+
+ $httpBackend.whenRoute('GET', '/users')
+ .respond(function(method, url, data, headers, params) {
+ var userList = angular.copy(MockUserList),
+ defaultSort = 'lastName',
+ count, pages, isPrevious, isNext;
+
+ // paged api response '/v1/users?page=2'
+ params.page = Number(params.page) || 1;
+
+ // query for last names '/v1/users?q=Archer'
+ if (params.q) {
+ userList = $filter('filter')({lastName: params.q});
+ }
+
+ pages = Math.ceil(userList.length / pagingLength);
+ isPrevious = params.page > 1;
+ isNext = params.page < pages;
+
+ return [200, {
+ count: userList.length,
+ previous: isPrevious,
+ next: isNext,
+ // sort field -> '/v1/users?sortBy=firstName'
+ results: $filter('orderBy')(userList, params.sortBy || defaultSort)
+ .splice((params.page - 1) * pagingLength, pagingLength)
+ }];
+ });
+ ```
+ */
+angular.mock.$HttpBackendProvider = function() {
+ this.$get = ['$rootScope', '$timeout', createHttpBackendMock];
+};
+
+/**
+ * General factory function for $httpBackend mock.
+ * Returns instance for unit testing (when no arguments specified):
+ * - passing through is disabled
+ * - auto flushing is disabled
+ *
+ * Returns instance for e2e testing (when `$delegate` and `$browser` specified):
+ * - passing through (delegating request to real backend) is enabled
+ * - auto flushing is enabled
+ *
+ * @param {Object=} $delegate Real $httpBackend instance (allow passing through if specified)
+ * @param {Object=} $browser Auto-flushing enabled if specified
+ * @return {Object} Instance of $httpBackend mock
+ */
+function createHttpBackendMock($rootScope, $timeout, $delegate, $browser) {
+ var definitions = [],
+ expectations = [],
+ responses = [],
+ responsesPush = angular.bind(responses, responses.push),
+ copy = angular.copy;
+
+ function createResponse(status, data, headers, statusText) {
+ if (angular.isFunction(status)) return status;
+
+ return function() {
+ return angular.isNumber(status)
+ ? [status, data, headers, statusText]
+ : [200, status, data, headers];
+ };
+ }
+
+ // TODO(vojta): change params to: method, url, data, headers, callback
+ function $httpBackend(method, url, data, callback, headers, timeout, withCredentials) {
+ var xhr = new MockXhr(),
+ expectation = expectations[0],
+ wasExpected = false;
+
+ function prettyPrint(data) {
+ return (angular.isString(data) || angular.isFunction(data) || data instanceof RegExp)
+ ? data
+ : angular.toJson(data);
+ }
+
+ function wrapResponse(wrapped) {
+ if (!$browser && timeout) {
+ timeout.then ? timeout.then(handleTimeout) : $timeout(handleTimeout, timeout);
+ }
+
+ return handleResponse;
+
+ function handleResponse() {
+ var response = wrapped.response(method, url, data, headers, wrapped.params(url));
+ xhr.$$respHeaders = response[2];
+ callback(copy(response[0]), copy(response[1]), xhr.getAllResponseHeaders(),
+ copy(response[3] || ''));
+ }
+
+ function handleTimeout() {
+ for (var i = 0, ii = responses.length; i < ii; i++) {
+ if (responses[i] === handleResponse) {
+ responses.splice(i, 1);
+ callback(-1, undefined, '');
+ break;
+ }
+ }
+ }
+ }
+
+ if (expectation && expectation.match(method, url)) {
+ if (!expectation.matchData(data)) {
+ throw new Error('Expected ' + expectation + ' with different data\n' +
+ 'EXPECTED: ' + prettyPrint(expectation.data) + '\nGOT: ' + data);
+ }
+
+ if (!expectation.matchHeaders(headers)) {
+ throw new Error('Expected ' + expectation + ' with different headers\n' +
+ 'EXPECTED: ' + prettyPrint(expectation.headers) + '\nGOT: ' +
+ prettyPrint(headers));
+ }
+
+ expectations.shift();
+
+ if (expectation.response) {
+ responses.push(wrapResponse(expectation));
+ return;
+ }
+ wasExpected = true;
+ }
+
+ var i = -1, definition;
+ while ((definition = definitions[++i])) {
+ if (definition.match(method, url, data, headers || {})) {
+ if (definition.response) {
+ // if $browser specified, we do auto flush all requests
+ ($browser ? $browser.defer : responsesPush)(wrapResponse(definition));
+ } else if (definition.passThrough) {
+ $delegate(method, url, data, callback, headers, timeout, withCredentials);
+ } else throw new Error('No response defined !');
+ return;
+ }
+ }
+ throw wasExpected ?
+ new Error('No response defined !') :
+ new Error('Unexpected request: ' + method + ' ' + url + '\n' +
+ (expectation ? 'Expected ' + expectation : 'No more request expected'));
+ }
+
+ /**
+ * @ngdoc method
+ * @name $httpBackend#when
+ * @description
+ * Creates a new backend definition.
+ *
+ * @param {string} method HTTP method.
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
+ * data string and returns true if the data is as expected.
+ * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
+ * object and returns true if the headers match the current definition.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
+ * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
+ * request is handled. You can save this object for later use and invoke `respond` again in
+ * order to change how a matched request is handled.
+ *
+ * - respond –
+ * `{function([status,] data[, headers, statusText])
+ * | function(function(method, url, data, headers, params)}`
+ * – The respond method takes a set of static data to be returned or a function that can
+ * return an array containing response status (number), response data (string), response
+ * headers (Object), and the text for the status (string). The respond method returns the
+ * `requestHandler` object for possible overrides.
+ */
+ $httpBackend.when = function(method, url, data, headers, keys) {
+ var definition = new MockHttpExpectation(method, url, data, headers, keys),
+ chain = {
+ respond: function(status, data, headers, statusText) {
+ definition.passThrough = undefined;
+ definition.response = createResponse(status, data, headers, statusText);
+ return chain;
+ }
+ };
+
+ if ($browser) {
+ chain.passThrough = function() {
+ definition.response = undefined;
+ definition.passThrough = true;
+ return chain;
+ };
+ }
+
+ definitions.push(definition);
+ return chain;
+ };
+
+ /**
+ * @ngdoc method
+ * @name $httpBackend#whenGET
+ * @description
+ * Creates a new backend definition for GET requests. For more info see `when()`.
+ *
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
+ * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
+ * request is handled. You can save this object for later use and invoke `respond` again in
+ * order to change how a matched request is handled.
+ */
+
+ /**
+ * @ngdoc method
+ * @name $httpBackend#whenHEAD
+ * @description
+ * Creates a new backend definition for HEAD requests. For more info see `when()`.
+ *
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
+ * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
+ * request is handled. You can save this object for later use and invoke `respond` again in
+ * order to change how a matched request is handled.
+ */
+
+ /**
+ * @ngdoc method
+ * @name $httpBackend#whenDELETE
+ * @description
+ * Creates a new backend definition for DELETE requests. For more info see `when()`.
+ *
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
+ * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
+ * request is handled. You can save this object for later use and invoke `respond` again in
+ * order to change how a matched request is handled.
+ */
+
+ /**
+ * @ngdoc method
+ * @name $httpBackend#whenPOST
+ * @description
+ * Creates a new backend definition for POST requests. For more info see `when()`.
+ *
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
+ * data string and returns true if the data is as expected.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
+ * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
+ * request is handled. You can save this object for later use and invoke `respond` again in
+ * order to change how a matched request is handled.
+ */
+
+ /**
+ * @ngdoc method
+ * @name $httpBackend#whenPUT
+ * @description
+ * Creates a new backend definition for PUT requests. For more info see `when()`.
+ *
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
+ * data string and returns true if the data is as expected.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
+ * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
+ * request is handled. You can save this object for later use and invoke `respond` again in
+ * order to change how a matched request is handled.
+ */
+
+ /**
+ * @ngdoc method
+ * @name $httpBackend#whenJSONP
+ * @description
+ * Creates a new backend definition for JSONP requests. For more info see `when()`.
+ *
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
+ * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
+ * request is handled. You can save this object for later use and invoke `respond` again in
+ * order to change how a matched request is handled.
+ */
+ createShortMethods('when');
+
+ /**
+ * @ngdoc method
+ * @name $httpBackend#whenRoute
+ * @description
+ * Creates a new backend definition that compares only with the requested route.
+ *
+ * @param {string} method HTTP method.
+ * @param {string} url HTTP url string that supports colon param matching.
+ * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
+ * request is handled. You can save this object for later use and invoke `respond` again in
+ * order to change how a matched request is handled. See #when for more info.
+ */
+ $httpBackend.whenRoute = function(method, url) {
+ var pathObj = parseRoute(url);
+ return $httpBackend.when(method, pathObj.regexp, undefined, undefined, pathObj.keys);
+ };
+
+ function parseRoute(url) {
+ var ret = {
+ regexp: url
+ },
+ keys = ret.keys = [];
+
+ if (!url || !angular.isString(url)) return ret;
+
+ url = url
+ .replace(/([().])/g, '\\$1')
+ .replace(/(\/)?:(\w+)([\?\*])?/g, function(_, slash, key, option) {
+ var optional = option === '?' ? option : null;
+ var star = option === '*' ? option : null;
+ keys.push({ name: key, optional: !!optional });
+ slash = slash || '';
+ return ''
+ + (optional ? '' : slash)
+ + '(?:'
+ + (optional ? slash : '')
+ + (star && '(.+?)' || '([^/]+)')
+ + (optional || '')
+ + ')'
+ + (optional || '');
+ })
+ .replace(/([\/$\*])/g, '\\$1');
+
+ ret.regexp = new RegExp('^' + url, 'i');
+ return ret;
+ }
+
+ /**
+ * @ngdoc method
+ * @name $httpBackend#expect
+ * @description
+ * Creates a new request expectation.
+ *
+ * @param {string} method HTTP method.
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that
+ * receives data string and returns true if the data is as expected, or Object if request body
+ * is in JSON format.
+ * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
+ * object and returns true if the headers match the current expectation.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
+ * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
+ * request is handled. You can save this object for later use and invoke `respond` again in
+ * order to change how a matched request is handled.
+ *
+ * - respond –
+ * `{function([status,] data[, headers, statusText])
+ * | function(function(method, url, data, headers, params)}`
+ * – The respond method takes a set of static data to be returned or a function that can
+ * return an array containing response status (number), response data (string), response
+ * headers (Object), and the text for the status (string). The respond method returns the
+ * `requestHandler` object for possible overrides.
+ */
+ $httpBackend.expect = function(method, url, data, headers, keys) {
+ var expectation = new MockHttpExpectation(method, url, data, headers, keys),
+ chain = {
+ respond: function(status, data, headers, statusText) {
+ expectation.response = createResponse(status, data, headers, statusText);
+ return chain;
+ }
+ };
+
+ expectations.push(expectation);
+ return chain;
+ };
+
+ /**
+ * @ngdoc method
+ * @name $httpBackend#expectGET
+ * @description
+ * Creates a new request expectation for GET requests. For more info see `expect()`.
+ *
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {Object=} headers HTTP headers.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
+ * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
+ * request is handled. You can save this object for later use and invoke `respond` again in
+ * order to change how a matched request is handled. See #expect for more info.
+ */
+
+ /**
+ * @ngdoc method
+ * @name $httpBackend#expectHEAD
+ * @description
+ * Creates a new request expectation for HEAD requests. For more info see `expect()`.
+ *
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {Object=} headers HTTP headers.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
+ * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
+ * request is handled. You can save this object for later use and invoke `respond` again in
+ * order to change how a matched request is handled.
+ */
+
+ /**
+ * @ngdoc method
+ * @name $httpBackend#expectDELETE
+ * @description
+ * Creates a new request expectation for DELETE requests. For more info see `expect()`.
+ *
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {Object=} headers HTTP headers.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
+ * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
+ * request is handled. You can save this object for later use and invoke `respond` again in
+ * order to change how a matched request is handled.
+ */
+
+ /**
+ * @ngdoc method
+ * @name $httpBackend#expectPOST
+ * @description
+ * Creates a new request expectation for POST requests. For more info see `expect()`.
+ *
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that
+ * receives data string and returns true if the data is as expected, or Object if request body
+ * is in JSON format.
+ * @param {Object=} headers HTTP headers.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
+ * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
+ * request is handled. You can save this object for later use and invoke `respond` again in
+ * order to change how a matched request is handled.
+ */
+
+ /**
+ * @ngdoc method
+ * @name $httpBackend#expectPUT
+ * @description
+ * Creates a new request expectation for PUT requests. For more info see `expect()`.
+ *
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that
+ * receives data string and returns true if the data is as expected, or Object if request body
+ * is in JSON format.
+ * @param {Object=} headers HTTP headers.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
+ * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
+ * request is handled. You can save this object for later use and invoke `respond` again in
+ * order to change how a matched request is handled.
+ */
+
+ /**
+ * @ngdoc method
+ * @name $httpBackend#expectPATCH
+ * @description
+ * Creates a new request expectation for PATCH requests. For more info see `expect()`.
+ *
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that
+ * receives data string and returns true if the data is as expected, or Object if request body
+ * is in JSON format.
+ * @param {Object=} headers HTTP headers.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
+ * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
+ * request is handled. You can save this object for later use and invoke `respond` again in
+ * order to change how a matched request is handled.
+ */
+
+ /**
+ * @ngdoc method
+ * @name $httpBackend#expectJSONP
+ * @description
+ * Creates a new request expectation for JSONP requests. For more info see `expect()`.
+ *
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives an url
+ * and returns true if the url matches the current definition.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
+ * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
+ * request is handled. You can save this object for later use and invoke `respond` again in
+ * order to change how a matched request is handled.
+ */
+ createShortMethods('expect');
+
+ /**
+ * @ngdoc method
+ * @name $httpBackend#expectRoute
+ * @description
+ * Creates a new request expectation that compares only with the requested route.
+ *
+ * @param {string} method HTTP method.
+ * @param {string} url HTTP url string that supports colon param matching.
+ * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
+ * request is handled. You can save this object for later use and invoke `respond` again in
+ * order to change how a matched request is handled. See #expect for more info.
+ */
+ $httpBackend.expectRoute = function(method, url) {
+ var pathObj = parseRoute(url);
+ return $httpBackend.expect(method, pathObj.regexp, undefined, undefined, pathObj.keys);
+ };
+
+
+ /**
+ * @ngdoc method
+ * @name $httpBackend#flush
+ * @description
+ * Flushes all pending requests using the trained responses.
+ *
+ * @param {number=} count Number of responses to flush (in the order they arrived). If undefined,
+ * all pending requests will be flushed. If there are no pending requests when the flush method
+ * is called an exception is thrown (as this typically a sign of programming error).
+ */
+ $httpBackend.flush = function(count, digest) {
+ if (digest !== false) $rootScope.$digest();
+ if (!responses.length) throw new Error('No pending request to flush !');
+
+ if (angular.isDefined(count) && count !== null) {
+ while (count--) {
+ if (!responses.length) throw new Error('No more pending request to flush !');
+ responses.shift()();
+ }
+ } else {
+ while (responses.length) {
+ responses.shift()();
+ }
+ }
+ $httpBackend.verifyNoOutstandingExpectation(digest);
+ };
+
+
+ /**
+ * @ngdoc method
+ * @name $httpBackend#verifyNoOutstandingExpectation
+ * @description
+ * Verifies that all of the requests defined via the `expect` api were made. If any of the
+ * requests were not made, verifyNoOutstandingExpectation throws an exception.
+ *
+ * Typically, you would call this method following each test case that asserts requests using an
+ * "afterEach" clause.
+ *
+ * ```js
+ * afterEach($httpBackend.verifyNoOutstandingExpectation);
+ * ```
+ */
+ $httpBackend.verifyNoOutstandingExpectation = function(digest) {
+ if (digest !== false) $rootScope.$digest();
+ if (expectations.length) {
+ throw new Error('Unsatisfied requests: ' + expectations.join(', '));
+ }
+ };
+
+
+ /**
+ * @ngdoc method
+ * @name $httpBackend#verifyNoOutstandingRequest
+ * @description
+ * Verifies that there are no outstanding requests that need to be flushed.
+ *
+ * Typically, you would call this method following each test case that asserts requests using an
+ * "afterEach" clause.
+ *
+ * ```js
+ * afterEach($httpBackend.verifyNoOutstandingRequest);
+ * ```
+ */
+ $httpBackend.verifyNoOutstandingRequest = function() {
+ if (responses.length) {
+ throw new Error('Unflushed requests: ' + responses.length);
+ }
+ };
+
+
+ /**
+ * @ngdoc method
+ * @name $httpBackend#resetExpectations
+ * @description
+ * Resets all request expectations, but preserves all backend definitions. Typically, you would
+ * call resetExpectations during a multiple-phase test when you want to reuse the same instance of
+ * $httpBackend mock.
+ */
+ $httpBackend.resetExpectations = function() {
+ expectations.length = 0;
+ responses.length = 0;
+ };
+
+ return $httpBackend;
+
+
+ function createShortMethods(prefix) {
+ angular.forEach(['GET', 'DELETE', 'JSONP', 'HEAD'], function(method) {
+ $httpBackend[prefix + method] = function(url, headers, keys) {
+ return $httpBackend[prefix](method, url, undefined, headers, keys);
+ };
+ });
+
+ angular.forEach(['PUT', 'POST', 'PATCH'], function(method) {
+ $httpBackend[prefix + method] = function(url, data, headers, keys) {
+ return $httpBackend[prefix](method, url, data, headers, keys);
+ };
+ });
+ }
+}
+
+function MockHttpExpectation(method, url, data, headers, keys) {
+
+ this.data = data;
+ this.headers = headers;
+
+ this.match = function(m, u, d, h) {
+ if (method != m) return false;
+ if (!this.matchUrl(u)) return false;
+ if (angular.isDefined(d) && !this.matchData(d)) return false;
+ if (angular.isDefined(h) && !this.matchHeaders(h)) return false;
+ return true;
+ };
+
+ this.matchUrl = function(u) {
+ if (!url) return true;
+ if (angular.isFunction(url.test)) return url.test(u);
+ if (angular.isFunction(url)) return url(u);
+ return url == u;
+ };
+
+ this.matchHeaders = function(h) {
+ if (angular.isUndefined(headers)) return true;
+ if (angular.isFunction(headers)) return headers(h);
+ return angular.equals(headers, h);
+ };
+
+ this.matchData = function(d) {
+ if (angular.isUndefined(data)) return true;
+ if (data && angular.isFunction(data.test)) return data.test(d);
+ if (data && angular.isFunction(data)) return data(d);
+ if (data && !angular.isString(data)) {
+ return angular.equals(angular.fromJson(angular.toJson(data)), angular.fromJson(d));
+ }
+ return data == d;
+ };
+
+ this.toString = function() {
+ return method + ' ' + url;
+ };
+
+ this.params = function(u) {
+ return angular.extend(parseQuery(), pathParams());
+
+ function pathParams() {
+ var keyObj = {};
+ if (!url || !angular.isFunction(url.test) || !keys || keys.length === 0) return keyObj;
+
+ var m = url.exec(u);
+ if (!m) return keyObj;
+ for (var i = 1, len = m.length; i < len; ++i) {
+ var key = keys[i - 1];
+ var val = m[i];
+ if (key && val) {
+ keyObj[key.name || key] = val;
+ }
+ }
+
+ return keyObj;
+ }
+
+ function parseQuery() {
+ var obj = {}, key_value, key,
+ queryStr = u.indexOf('?') > -1
+ ? u.substring(u.indexOf('?') + 1)
+ : "";
+
+ angular.forEach(queryStr.split('&'), function(keyValue) {
+ if (keyValue) {
+ key_value = keyValue.replace(/\+/g,'%20').split('=');
+ key = tryDecodeURIComponent(key_value[0]);
+ if (angular.isDefined(key)) {
+ var val = angular.isDefined(key_value[1]) ? tryDecodeURIComponent(key_value[1]) : true;
+ if (!hasOwnProperty.call(obj, key)) {
+ obj[key] = val;
+ } else if (angular.isArray(obj[key])) {
+ obj[key].push(val);
+ } else {
+ obj[key] = [obj[key],val];
+ }
+ }
+ }
+ });
+ return obj;
+ }
+ function tryDecodeURIComponent(value) {
+ try {
+ return decodeURIComponent(value);
+ } catch (e) {
+ // Ignore any invalid uri component
+ }
+ }
+ };
+}
+
+function createMockXhr() {
+ return new MockXhr();
+}
+
+function MockXhr() {
+
+ // hack for testing $http, $httpBackend
+ MockXhr.$$lastInstance = this;
+
+ this.open = function(method, url, async) {
+ this.$$method = method;
+ this.$$url = url;
+ this.$$async = async;
+ this.$$reqHeaders = {};
+ this.$$respHeaders = {};
+ };
+
+ this.send = function(data) {
+ this.$$data = data;
+ };
+
+ this.setRequestHeader = function(key, value) {
+ this.$$reqHeaders[key] = value;
+ };
+
+ this.getResponseHeader = function(name) {
+ // the lookup must be case insensitive,
+ // that's why we try two quick lookups first and full scan last
+ var header = this.$$respHeaders[name];
+ if (header) return header;
+
+ name = angular.lowercase(name);
+ header = this.$$respHeaders[name];
+ if (header) return header;
+
+ header = undefined;
+ angular.forEach(this.$$respHeaders, function(headerVal, headerName) {
+ if (!header && angular.lowercase(headerName) == name) header = headerVal;
+ });
+ return header;
+ };
+
+ this.getAllResponseHeaders = function() {
+ var lines = [];
+
+ angular.forEach(this.$$respHeaders, function(value, key) {
+ lines.push(key + ': ' + value);
+ });
+ return lines.join('\n');
+ };
+
+ this.abort = angular.noop;
+}
+
+
+/**
+ * @ngdoc service
+ * @name $timeout
+ * @description
+ *
+ * This service is just a simple decorator for {@link ng.$timeout $timeout} service
+ * that adds a "flush" and "verifyNoPendingTasks" methods.
+ */
+
+angular.mock.$TimeoutDecorator = ['$delegate', '$browser', function($delegate, $browser) {
+
+ /**
+ * @ngdoc method
+ * @name $timeout#flush
+ * @description
+ *
+ * Flushes the queue of pending tasks.
+ *
+ * @param {number=} delay maximum timeout amount to flush up until
+ */
+ $delegate.flush = function(delay) {
+ $browser.defer.flush(delay);
+ };
+
+ /**
+ * @ngdoc method
+ * @name $timeout#verifyNoPendingTasks
+ * @description
+ *
+ * Verifies that there are no pending tasks that need to be flushed.
+ */
+ $delegate.verifyNoPendingTasks = function() {
+ if ($browser.deferredFns.length) {
+ throw new Error('Deferred tasks to flush (' + $browser.deferredFns.length + '): ' +
+ formatPendingTasksAsString($browser.deferredFns));
+ }
+ };
+
+ function formatPendingTasksAsString(tasks) {
+ var result = [];
+ angular.forEach(tasks, function(task) {
+ result.push('{id: ' + task.id + ', ' + 'time: ' + task.time + '}');
+ });
+
+ return result.join(', ');
+ }
+
+ return $delegate;
+}];
+
+angular.mock.$RAFDecorator = ['$delegate', function($delegate) {
+ var rafFn = function(fn) {
+ var index = rafFn.queue.length;
+ rafFn.queue.push(fn);
+ return function() {
+ rafFn.queue.splice(index, 1);
+ };
+ };
+
+ rafFn.queue = [];
+ rafFn.supported = $delegate.supported;
+
+ rafFn.flush = function() {
+ if (rafFn.queue.length === 0) {
+ throw new Error('No rAF callbacks present');
+ }
+
+ var length = rafFn.queue.length;
+ for (var i = 0; i < length; i++) {
+ rafFn.queue[i]();
+ }
+
+ rafFn.queue = rafFn.queue.slice(i);
+ };
+
+ return rafFn;
+}];
+
+/**
+ *
+ */
+angular.mock.$RootElementProvider = function() {
+ this.$get = function() {
+ return angular.element('
');
+ };
+};
+
+/**
+ * @ngdoc service
+ * @name $controller
+ * @description
+ * A decorator for {@link ng.$controller} with additional `bindings` parameter, useful when testing
+ * controllers of directives that use {@link $compile#-bindtocontroller- `bindToController`}.
+ *
+ *
+ * ## Example
+ *
+ * ```js
+ *
+ * // Directive definition ...
+ *
+ * myMod.directive('myDirective', {
+ * controller: 'MyDirectiveController',
+ * bindToController: {
+ * name: '@'
+ * }
+ * });
+ *
+ *
+ * // Controller definition ...
+ *
+ * myMod.controller('MyDirectiveController', ['$log', function($log) {
+ * $log.info(this.name);
+ * })];
+ *
+ *
+ * // In a test ...
+ *
+ * describe('myDirectiveController', function() {
+ * it('should write the bound name to the log', inject(function($controller, $log) {
+ * var ctrl = $controller('MyDirectiveController', { /* no locals */ }, { name: 'Clark Kent' });
+ * expect(ctrl.name).toEqual('Clark Kent');
+ * expect($log.info.logs).toEqual(['Clark Kent']);
+ * });
+ * });
+ *
+ * ```
+ *
+ * @param {Function|string} constructor If called with a function then it's considered to be the
+ * controller constructor function. Otherwise it's considered to be a string which is used
+ * to retrieve the controller constructor using the following steps:
+ *
+ * * check if a controller with given name is registered via `$controllerProvider`
+ * * check if evaluating the string on the current scope returns a constructor
+ * * if $controllerProvider#allowGlobals, check `window[constructor]` on the global
+ * `window` object (not recommended)
+ *
+ * The string can use the `controller as property` syntax, where the controller instance is published
+ * as the specified property on the `scope`; the `scope` must be injected into `locals` param for this
+ * to work correctly.
+ *
+ * @param {Object} locals Injection locals for Controller.
+ * @param {Object=} bindings Properties to add to the controller before invoking the constructor. This is used
+ * to simulate the `bindToController` feature and simplify certain kinds of tests.
+ * @return {Object} Instance of given controller.
+ */
+angular.mock.$ControllerDecorator = ['$delegate', function($delegate) {
+ return function(expression, locals, later, ident) {
+ if (later && typeof later === 'object') {
+ var create = $delegate(expression, locals, true, ident);
+ angular.extend(create.instance, later);
+ return create();
+ }
+ return $delegate(expression, locals, later, ident);
+ };
+}];
+
+/**
+ * @ngdoc service
+ * @name $componentController
+ * @description
+ * A service that can be used to create instances of component controllers.
+ *
+ * Be aware that the controller will be instantiated and attached to the scope as specified in
+ * the component definition object. That means that you must always provide a `$scope` object
+ * in the `locals` param.
+ *
+ * @param {string} componentName the name of the component whose controller we want to instantiate
+ * @param {Object} locals Injection locals for Controller.
+ * @param {Object=} bindings Properties to add to the controller before invoking the constructor. This is used
+ * to simulate the `bindToController` feature and simplify certain kinds of tests.
+ * @param {string=} ident Override the property name to use when attaching the controller to the scope.
+ * @return {Object} Instance of requested controller.
+ */
+angular.mock.$ComponentControllerProvider = ['$compileProvider', function($compileProvider) {
+ return {
+ $get: ['$controller','$injector', function($controller,$injector) {
+ return function $componentController(componentName, locals, bindings, ident) {
+ // get all directives associated to the component name
+ var directives = $injector.get(componentName + 'Directive');
+ // look for those directives that are components
+ var candidateDirectives = directives.filter(function(directiveInfo) {
+ // components have controller, controllerAs and restrict:'E'
+ return directiveInfo.controller && directiveInfo.controllerAs && directiveInfo.restrict === 'E';
+ });
+ // check if valid directives found
+ if (candidateDirectives.length === 0) {
+ throw new Error('No component found');
+ }
+ if (candidateDirectives.length > 1) {
+ throw new Error('Too many components found');
+ }
+ // get the info of the component
+ var directiveInfo = candidateDirectives[0];
+ return $controller(directiveInfo.controller, locals, bindings, ident || directiveInfo.controllerAs);
+ };
+ }]
+ };
+}];
+
+
+/**
+ * @ngdoc module
+ * @name ngMock
+ * @packageName angular-mocks
+ * @description
+ *
+ * # ngMock
+ *
+ * The `ngMock` module provides support to inject and mock Angular services into unit tests.
+ * In addition, ngMock also extends various core ng services such that they can be
+ * inspected and controlled in a synchronous manner within test code.
+ *
+ *
+ *
+ *
+ */
+angular.module('ngMock', ['ng']).provider({
+ $browser: angular.mock.$BrowserProvider,
+ $exceptionHandler: angular.mock.$ExceptionHandlerProvider,
+ $log: angular.mock.$LogProvider,
+ $interval: angular.mock.$IntervalProvider,
+ $httpBackend: angular.mock.$HttpBackendProvider,
+ $rootElement: angular.mock.$RootElementProvider,
+ $componentController: angular.mock.$ComponentControllerProvider
+}).config(['$provide', function($provide) {
+ $provide.decorator('$timeout', angular.mock.$TimeoutDecorator);
+ $provide.decorator('$$rAF', angular.mock.$RAFDecorator);
+ $provide.decorator('$rootScope', angular.mock.$RootScopeDecorator);
+ $provide.decorator('$controller', angular.mock.$ControllerDecorator);
+}]);
+
+/**
+ * @ngdoc module
+ * @name ngMockE2E
+ * @module ngMockE2E
+ * @packageName angular-mocks
+ * @description
+ *
+ * The `ngMockE2E` is an angular module which contains mocks suitable for end-to-end testing.
+ * Currently there is only one mock present in this module -
+ * the {@link ngMockE2E.$httpBackend e2e $httpBackend} mock.
+ */
+angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
+ $provide.decorator('$httpBackend', angular.mock.e2e.$httpBackendDecorator);
+}]);
+
+/**
+ * @ngdoc service
+ * @name $httpBackend
+ * @module ngMockE2E
+ * @description
+ * Fake HTTP backend implementation suitable for end-to-end testing or backend-less development of
+ * applications that use the {@link ng.$http $http service}.
+ *
+ * *Note*: For fake http backend implementation suitable for unit testing please see
+ * {@link ngMock.$httpBackend unit-testing $httpBackend mock}.
+ *
+ * This implementation can be used to respond with static or dynamic responses via the `when` api
+ * and its shortcuts (`whenGET`, `whenPOST`, etc) and optionally pass through requests to the
+ * real $httpBackend for specific requests (e.g. to interact with certain remote apis or to fetch
+ * templates from a webserver).
+ *
+ * As opposed to unit-testing, in an end-to-end testing scenario or in scenario when an application
+ * is being developed with the real backend api replaced with a mock, it is often desirable for
+ * certain category of requests to bypass the mock and issue a real http request (e.g. to fetch
+ * templates or static files from the webserver). To configure the backend with this behavior
+ * use the `passThrough` request handler of `when` instead of `respond`.
+ *
+ * Additionally, we don't want to manually have to flush mocked out requests like we do during unit
+ * testing. For this reason the e2e $httpBackend flushes mocked out requests
+ * automatically, closely simulating the behavior of the XMLHttpRequest object.
+ *
+ * To setup the application to run with this http backend, you have to create a module that depends
+ * on the `ngMockE2E` and your application modules and defines the fake backend:
+ *
+ * ```js
+ * myAppDev = angular.module('myAppDev', ['myApp', 'ngMockE2E']);
+ * myAppDev.run(function($httpBackend) {
+ * phones = [{name: 'phone1'}, {name: 'phone2'}];
+ *
+ * // returns the current list of phones
+ * $httpBackend.whenGET('/phones').respond(phones);
+ *
+ * // adds a new phone to the phones array
+ * $httpBackend.whenPOST('/phones').respond(function(method, url, data) {
+ * var phone = angular.fromJson(data);
+ * phones.push(phone);
+ * return [200, phone, {}];
+ * });
+ * $httpBackend.whenGET(/^\/templates\//).passThrough();
+ * //...
+ * });
+ * ```
+ *
+ * Afterwards, bootstrap your app with this new module.
+ */
+
+/**
+ * @ngdoc method
+ * @name $httpBackend#when
+ * @module ngMockE2E
+ * @description
+ * Creates a new backend definition.
+ *
+ * @param {string} method HTTP method.
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
+ * object and returns true if the headers match the current definition.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on
+ * {@link ngMock.$httpBackend $httpBackend mock}.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ * control how a matched request is handled. You can save this object for later use and invoke
+ * `respond` or `passThrough` again in order to change how a matched request is handled.
+ *
+ * - respond –
+ * `{function([status,] data[, headers, statusText])
+ * | function(function(method, url, data, headers, params)}`
+ * – The respond method takes a set of static data to be returned or a function that can return
+ * an array containing response status (number), response data (string), response headers
+ * (Object), and the text for the status (string).
+ * - passThrough – `{function()}` – Any request matching a backend definition with
+ * `passThrough` handler will be passed through to the real backend (an XHR request will be made
+ * to the server.)
+ * - Both methods return the `requestHandler` object for possible overrides.
+ */
+
+/**
+ * @ngdoc method
+ * @name $httpBackend#whenGET
+ * @module ngMockE2E
+ * @description
+ * Creates a new backend definition for GET requests. For more info see `when()`.
+ *
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on
+ * {@link ngMock.$httpBackend $httpBackend mock}.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ * control how a matched request is handled. You can save this object for later use and invoke
+ * `respond` or `passThrough` again in order to change how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name $httpBackend#whenHEAD
+ * @module ngMockE2E
+ * @description
+ * Creates a new backend definition for HEAD requests. For more info see `when()`.
+ *
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on
+ * {@link ngMock.$httpBackend $httpBackend mock}.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ * control how a matched request is handled. You can save this object for later use and invoke
+ * `respond` or `passThrough` again in order to change how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name $httpBackend#whenDELETE
+ * @module ngMockE2E
+ * @description
+ * Creates a new backend definition for DELETE requests. For more info see `when()`.
+ *
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on
+ * {@link ngMock.$httpBackend $httpBackend mock}.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ * control how a matched request is handled. You can save this object for later use and invoke
+ * `respond` or `passThrough` again in order to change how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name $httpBackend#whenPOST
+ * @module ngMockE2E
+ * @description
+ * Creates a new backend definition for POST requests. For more info see `when()`.
+ *
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on
+ * {@link ngMock.$httpBackend $httpBackend mock}.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ * control how a matched request is handled. You can save this object for later use and invoke
+ * `respond` or `passThrough` again in order to change how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name $httpBackend#whenPUT
+ * @module ngMockE2E
+ * @description
+ * Creates a new backend definition for PUT requests. For more info see `when()`.
+ *
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on
+ * {@link ngMock.$httpBackend $httpBackend mock}.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ * control how a matched request is handled. You can save this object for later use and invoke
+ * `respond` or `passThrough` again in order to change how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name $httpBackend#whenPATCH
+ * @module ngMockE2E
+ * @description
+ * Creates a new backend definition for PATCH requests. For more info see `when()`.
+ *
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on
+ * {@link ngMock.$httpBackend $httpBackend mock}.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ * control how a matched request is handled. You can save this object for later use and invoke
+ * `respond` or `passThrough` again in order to change how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name $httpBackend#whenJSONP
+ * @module ngMockE2E
+ * @description
+ * Creates a new backend definition for JSONP requests. For more info see `when()`.
+ *
+ * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
+ * and returns true if the url matches the current definition.
+ * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on
+ * {@link ngMock.$httpBackend $httpBackend mock}.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ * control how a matched request is handled. You can save this object for later use and invoke
+ * `respond` or `passThrough` again in order to change how a matched request is handled.
+ */
+/**
+ * @ngdoc method
+ * @name $httpBackend#whenRoute
+ * @module ngMockE2E
+ * @description
+ * Creates a new backend definition that compares only with the requested route.
+ *
+ * @param {string} method HTTP method.
+ * @param {string} url HTTP url string that supports colon param matching.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ * control how a matched request is handled. You can save this object for later use and invoke
+ * `respond` or `passThrough` again in order to change how a matched request is handled.
+ */
+angular.mock.e2e = {};
+angular.mock.e2e.$httpBackendDecorator =
+ ['$rootScope', '$timeout', '$delegate', '$browser', createHttpBackendMock];
+
+
+/**
+ * @ngdoc type
+ * @name $rootScope.Scope
+ * @module ngMock
+ * @description
+ * {@link ng.$rootScope.Scope Scope} type decorated with helper methods useful for testing. These
+ * methods are automatically available on any {@link ng.$rootScope.Scope Scope} instance when
+ * `ngMock` module is loaded.
+ *
+ * In addition to all the regular `Scope` methods, the following helper methods are available:
+ */
+angular.mock.$RootScopeDecorator = ['$delegate', function($delegate) {
+
+ var $rootScopePrototype = Object.getPrototypeOf($delegate);
+
+ $rootScopePrototype.$countChildScopes = countChildScopes;
+ $rootScopePrototype.$countWatchers = countWatchers;
+
+ return $delegate;
+
+ // ------------------------------------------------------------------------------------------ //
+
+ /**
+ * @ngdoc method
+ * @name $rootScope.Scope#$countChildScopes
+ * @module ngMock
+ * @description
+ * Counts all the direct and indirect child scopes of the current scope.
+ *
+ * The current scope is excluded from the count. The count includes all isolate child scopes.
+ *
+ * @returns {number} Total number of child scopes.
+ */
+ function countChildScopes() {
+ // jshint validthis: true
+ var count = 0; // exclude the current scope
+ var pendingChildHeads = [this.$$childHead];
+ var currentScope;
+
+ while (pendingChildHeads.length) {
+ currentScope = pendingChildHeads.shift();
+
+ while (currentScope) {
+ count += 1;
+ pendingChildHeads.push(currentScope.$$childHead);
+ currentScope = currentScope.$$nextSibling;
+ }
+ }
+
+ return count;
+ }
+
+
+ /**
+ * @ngdoc method
+ * @name $rootScope.Scope#$countWatchers
+ * @module ngMock
+ * @description
+ * Counts all the watchers of direct and indirect child scopes of the current scope.
+ *
+ * The watchers of the current scope are included in the count and so are all the watchers of
+ * isolate child scopes.
+ *
+ * @returns {number} Total number of watchers.
+ */
+ function countWatchers() {
+ // jshint validthis: true
+ var count = this.$$watchers ? this.$$watchers.length : 0; // include the current scope
+ var pendingChildHeads = [this.$$childHead];
+ var currentScope;
+
+ while (pendingChildHeads.length) {
+ currentScope = pendingChildHeads.shift();
+
+ while (currentScope) {
+ count += currentScope.$$watchers ? currentScope.$$watchers.length : 0;
+ pendingChildHeads.push(currentScope.$$childHead);
+ currentScope = currentScope.$$nextSibling;
+ }
+ }
+
+ return count;
+ }
+}];
+
+
+if (window.jasmine || window.mocha) {
+
+ var currentSpec = null,
+ annotatedFunctions = [],
+ isSpecRunning = function() {
+ return !!currentSpec;
+ };
+
+ angular.mock.$$annotate = angular.injector.$$annotate;
+ angular.injector.$$annotate = function(fn) {
+ if (typeof fn === 'function' && !fn.$inject) {
+ annotatedFunctions.push(fn);
+ }
+ return angular.mock.$$annotate.apply(this, arguments);
+ };
+
+
+ (window.beforeEach || window.setup)(function() {
+ annotatedFunctions = [];
+ currentSpec = this;
+ });
+
+ (window.afterEach || window.teardown)(function() {
+ var injector = currentSpec.$injector;
+
+ annotatedFunctions.forEach(function(fn) {
+ delete fn.$inject;
+ });
+
+ angular.forEach(currentSpec.$modules, function(module) {
+ if (module && module.$$hashKey) {
+ module.$$hashKey = undefined;
+ }
+ });
+
+ currentSpec.$injector = null;
+ currentSpec.$modules = null;
+ currentSpec.$providerInjector = null;
+ currentSpec = null;
+
+ if (injector) {
+ injector.get('$rootElement').off();
+ injector.get('$rootScope').$destroy();
+ }
+
+ // clean up jquery's fragment cache
+ angular.forEach(angular.element.fragments, function(val, key) {
+ delete angular.element.fragments[key];
+ });
+
+ MockXhr.$$lastInstance = null;
+
+ angular.forEach(angular.callbacks, function(val, key) {
+ delete angular.callbacks[key];
+ });
+ angular.callbacks.counter = 0;
+ });
+
+ /**
+ * @ngdoc function
+ * @name angular.mock.module
+ * @description
+ *
+ * *NOTE*: This function is also published on window for easy access.
+ * *NOTE*: This function is declared ONLY WHEN running tests with jasmine or mocha
+ *
+ * This function registers a module configuration code. It collects the configuration information
+ * which will be used when the injector is created by {@link angular.mock.inject inject}.
+ *
+ * See {@link angular.mock.inject inject} for usage example
+ *
+ * @param {...(string|Function|Object)} fns any number of modules which are represented as string
+ * aliases or as anonymous module initialization functions. The modules are used to
+ * configure the injector. The 'ng' and 'ngMock' modules are automatically loaded. If an
+ * object literal is passed each key-value pair will be registered on the module via
+ * {@link auto.$provide $provide}.value, the key being the string name (or token) to associate
+ * with the value on the injector.
+ */
+ window.module = angular.mock.module = function() {
+ var moduleFns = Array.prototype.slice.call(arguments, 0);
+ return isSpecRunning() ? workFn() : workFn;
+ /////////////////////
+ function workFn() {
+ if (currentSpec.$injector) {
+ throw new Error('Injector already created, can not register a module!');
+ } else {
+ var fn, modules = currentSpec.$modules || (currentSpec.$modules = []);
+ angular.forEach(moduleFns, function(module) {
+ if (angular.isObject(module) && !angular.isArray(module)) {
+ fn = function($provide) {
+ angular.forEach(module, function(value, key) {
+ $provide.value(key, value);
+ });
+ };
+ } else {
+ fn = module;
+ }
+ if (currentSpec.$providerInjector) {
+ currentSpec.$providerInjector.invoke(fn);
+ } else {
+ modules.push(fn);
+ }
+ });
+ }
+ }
+ };
+
+ /**
+ * @ngdoc function
+ * @name angular.mock.inject
+ * @description
+ *
+ * *NOTE*: This function is also published on window for easy access.
+ * *NOTE*: This function is declared ONLY WHEN running tests with jasmine or mocha
+ *
+ * The inject function wraps a function into an injectable function. The inject() creates new
+ * instance of {@link auto.$injector $injector} per test, which is then used for
+ * resolving references.
+ *
+ *
+ * ## Resolving References (Underscore Wrapping)
+ * Often, we would like to inject a reference once, in a `beforeEach()` block and reuse this
+ * in multiple `it()` clauses. To be able to do this we must assign the reference to a variable
+ * that is declared in the scope of the `describe()` block. Since we would, most likely, want
+ * the variable to have the same name of the reference we have a problem, since the parameter
+ * to the `inject()` function would hide the outer variable.
+ *
+ * To help with this, the injected parameters can, optionally, be enclosed with underscores.
+ * These are ignored by the injector when the reference name is resolved.
+ *
+ * For example, the parameter `_myService_` would be resolved as the reference `myService`.
+ * Since it is available in the function body as _myService_, we can then assign it to a variable
+ * defined in an outer scope.
+ *
+ * ```
+ * // Defined out reference variable outside
+ * var myService;
+ *
+ * // Wrap the parameter in underscores
+ * beforeEach( inject( function(_myService_){
+ * myService = _myService_;
+ * }));
+ *
+ * // Use myService in a series of tests.
+ * it('makes use of myService', function() {
+ * myService.doStuff();
+ * });
+ *
+ * ```
+ *
+ * See also {@link angular.mock.module angular.mock.module}
+ *
+ * ## Example
+ * Example of what a typical jasmine tests looks like with the inject method.
+ * ```js
+ *
+ * angular.module('myApplicationModule', [])
+ * .value('mode', 'app')
+ * .value('version', 'v1.0.1');
+ *
+ *
+ * describe('MyApp', function() {
+ *
+ * // You need to load modules that you want to test,
+ * // it loads only the "ng" module by default.
+ * beforeEach(module('myApplicationModule'));
+ *
+ *
+ * // inject() is used to inject arguments of all given functions
+ * it('should provide a version', inject(function(mode, version) {
+ * expect(version).toEqual('v1.0.1');
+ * expect(mode).toEqual('app');
+ * }));
+ *
+ *
+ * // The inject and module method can also be used inside of the it or beforeEach
+ * it('should override a version and test the new version is injected', function() {
+ * // module() takes functions or strings (module aliases)
+ * module(function($provide) {
+ * $provide.value('version', 'overridden'); // override version here
+ * });
+ *
+ * inject(function(version) {
+ * expect(version).toEqual('overridden');
+ * });
+ * });
+ * });
+ *
+ * ```
+ *
+ * @param {...Function} fns any number of functions which will be injected using the injector.
+ */
+
+
+
+ var ErrorAddingDeclarationLocationStack = function(e, errorForStack) {
+ this.message = e.message;
+ this.name = e.name;
+ if (e.line) this.line = e.line;
+ if (e.sourceId) this.sourceId = e.sourceId;
+ if (e.stack && errorForStack)
+ this.stack = e.stack + '\n' + errorForStack.stack;
+ if (e.stackArray) this.stackArray = e.stackArray;
+ };
+ ErrorAddingDeclarationLocationStack.prototype.toString = Error.prototype.toString;
+
+ window.inject = angular.mock.inject = function() {
+ var blockFns = Array.prototype.slice.call(arguments, 0);
+ var errorForStack = new Error('Declaration Location');
+ return isSpecRunning() ? workFn.call(currentSpec) : workFn;
+ /////////////////////
+ function workFn() {
+ var modules = currentSpec.$modules || [];
+ var strictDi = !!currentSpec.$injectorStrict;
+ modules.unshift(function($injector) {
+ currentSpec.$providerInjector = $injector;
+ });
+ modules.unshift('ngMock');
+ modules.unshift('ng');
+ var injector = currentSpec.$injector;
+ if (!injector) {
+ if (strictDi) {
+ // If strictDi is enabled, annotate the providerInjector blocks
+ angular.forEach(modules, function(moduleFn) {
+ if (typeof moduleFn === "function") {
+ angular.injector.$$annotate(moduleFn);
+ }
+ });
+ }
+ injector = currentSpec.$injector = angular.injector(modules, strictDi);
+ currentSpec.$injectorStrict = strictDi;
+ }
+ for (var i = 0, ii = blockFns.length; i < ii; i++) {
+ if (currentSpec.$injectorStrict) {
+ // If the injector is strict / strictDi, and the spec wants to inject using automatic
+ // annotation, then annotate the function here.
+ injector.annotate(blockFns[i]);
+ }
+ try {
+ /* jshint -W040 *//* Jasmine explicitly provides a `this` object when calling functions */
+ injector.invoke(blockFns[i] || angular.noop, this);
+ /* jshint +W040 */
+ } catch (e) {
+ if (e.stack && errorForStack) {
+ throw new ErrorAddingDeclarationLocationStack(e, errorForStack);
+ }
+ throw e;
+ } finally {
+ errorForStack = null;
+ }
+ }
+ }
+ };
+
+
+ angular.mock.inject.strictDi = function(value) {
+ value = arguments.length ? !!value : true;
+ return isSpecRunning() ? workFn() : workFn;
+
+ function workFn() {
+ if (value !== currentSpec.$injectorStrict) {
+ if (currentSpec.$injector) {
+ throw new Error('Injector already created, can not modify strict annotations');
+ } else {
+ currentSpec.$injectorStrict = value;
+ }
+ }
+ }
+ };
+}
+
+
+})(window, window.angular);
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-resource.js b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-resource.js
new file mode 100644
index 0000000..444be83
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-resource.js
@@ -0,0 +1,768 @@
+/**
+ * @license AngularJS v1.5.0
+ * (c) 2010-2016 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {'use strict';
+
+var $resourceMinErr = angular.$$minErr('$resource');
+
+// Helper functions and regex to lookup a dotted path on an object
+// stopping at undefined/null. The path must be composed of ASCII
+// identifiers (just like $parse)
+var MEMBER_NAME_REGEX = /^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;
+
+function isValidDottedPath(path) {
+ return (path != null && path !== '' && path !== 'hasOwnProperty' &&
+ MEMBER_NAME_REGEX.test('.' + path));
+}
+
+function lookupDottedPath(obj, path) {
+ if (!isValidDottedPath(path)) {
+ throw $resourceMinErr('badmember', 'Dotted member path "@{0}" is invalid.', path);
+ }
+ var keys = path.split('.');
+ for (var i = 0, ii = keys.length; i < ii && angular.isDefined(obj); i++) {
+ var key = keys[i];
+ obj = (obj !== null) ? obj[key] : undefined;
+ }
+ return obj;
+}
+
+/**
+ * Create a shallow copy of an object and clear other fields from the destination
+ */
+function shallowClearAndCopy(src, dst) {
+ dst = dst || {};
+
+ angular.forEach(dst, function(value, key) {
+ delete dst[key];
+ });
+
+ for (var key in src) {
+ if (src.hasOwnProperty(key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) {
+ dst[key] = src[key];
+ }
+ }
+
+ return dst;
+}
+
+/**
+ * @ngdoc module
+ * @name ngResource
+ * @description
+ *
+ * # ngResource
+ *
+ * The `ngResource` module provides interaction support with RESTful services
+ * via the $resource service.
+ *
+ *
+ *
+ *
+ * See {@link ngResource.$resource `$resource`} for usage.
+ */
+
+/**
+ * @ngdoc service
+ * @name $resource
+ * @requires $http
+ * @requires ng.$log
+ * @requires $q
+ * @requires ng.$timeout
+ *
+ * @description
+ * A factory which creates a resource object that lets you interact with
+ * [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources.
+ *
+ * The returned resource object has action methods which provide high-level behaviors without
+ * the need to interact with the low level {@link ng.$http $http} service.
+ *
+ * Requires the {@link ngResource `ngResource`} module to be installed.
+ *
+ * By default, trailing slashes will be stripped from the calculated URLs,
+ * which can pose problems with server backends that do not expect that
+ * behavior. This can be disabled by configuring the `$resourceProvider` like
+ * this:
+ *
+ * ```js
+ app.config(['$resourceProvider', function($resourceProvider) {
+ // Don't strip trailing slashes from calculated URLs
+ $resourceProvider.defaults.stripTrailingSlashes = false;
+ }]);
+ * ```
+ *
+ * @param {string} url A parameterized URL template with parameters prefixed by `:` as in
+ * `/user/:username`. If you are using a URL with a port number (e.g.
+ * `http://example.com:8080/api`), it will be respected.
+ *
+ * If you are using a url with a suffix, just add the suffix, like this:
+ * `$resource('http://example.com/resource.json')` or `$resource('http://example.com/:id.json')`
+ * or even `$resource('http://example.com/resource/:resource_id.:format')`
+ * If the parameter before the suffix is empty, :resource_id in this case, then the `/.` will be
+ * collapsed down to a single `.`. If you need this sequence to appear and not collapse then you
+ * can escape it with `/\.`.
+ *
+ * @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in
+ * `actions` methods. If a parameter value is a function, it will be executed every time
+ * when a param value needs to be obtained for a request (unless the param was overridden).
+ *
+ * Each key value in the parameter object is first bound to url template if present and then any
+ * excess keys are appended to the url search query after the `?`.
+ *
+ * Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in
+ * URL `/path/greet?salutation=Hello`.
+ *
+ * If the parameter value is prefixed with `@` then the value for that parameter will be extracted
+ * from the corresponding property on the `data` object (provided when calling an action method).
+ * For example, if the `defaultParam` object is `{someParam: '@someProp'}` then the value of
+ * `someParam` will be `data.someProp`.
+ *
+ * @param {Object.=} actions Hash with declaration of custom actions that should extend
+ * the default set of resource actions. The declaration should be created in the format of {@link
+ * ng.$http#usage $http.config}:
+ *
+ * {action1: {method:?, params:?, isArray:?, headers:?, ...},
+ * action2: {method:?, params:?, isArray:?, headers:?, ...},
+ * ...}
+ *
+ * Where:
+ *
+ * - **`action`** – {string} – The name of action. This name becomes the name of the method on
+ * your resource object.
+ * - **`method`** – {string} – Case insensitive HTTP method (e.g. `GET`, `POST`, `PUT`,
+ * `DELETE`, `JSONP`, etc).
+ * - **`params`** – {Object=} – Optional set of pre-bound parameters for this action. If any of
+ * the parameter value is a function, it will be executed every time when a param value needs to
+ * be obtained for a request (unless the param was overridden).
+ * - **`url`** – {string} – action specific `url` override. The url templating is supported just
+ * like for the resource-level urls.
+ * - **`isArray`** – {boolean=} – If true then the returned object for this action is an array,
+ * see `returns` section.
+ * - **`transformRequest`** –
+ * `{function(data, headersGetter)|Array.}` –
+ * transform function or an array of such functions. The transform function takes the http
+ * request body and headers and returns its transformed (typically serialized) version.
+ * By default, transformRequest will contain one function that checks if the request data is
+ * an object and serializes to using `angular.toJson`. To prevent this behavior, set
+ * `transformRequest` to an empty array: `transformRequest: []`
+ * - **`transformResponse`** –
+ * `{function(data, headersGetter)|Array.}` –
+ * transform function or an array of such functions. The transform function takes the http
+ * response body and headers and returns its transformed (typically deserialized) version.
+ * By default, transformResponse will contain one function that checks if the response looks
+ * like a JSON string and deserializes it using `angular.fromJson`. To prevent this behavior,
+ * set `transformResponse` to an empty array: `transformResponse: []`
+ * - **`cache`** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the
+ * GET request, otherwise if a cache instance built with
+ * {@link ng.$cacheFactory $cacheFactory}, this cache will be used for
+ * caching.
+ * - **`timeout`** – `{number}` – timeout in milliseconds.
+ * **Note:** In contrast to {@link ng.$http#usage $http.config}, {@link ng.$q promises} are
+ * **not** supported in $resource, because the same value would be used for multiple requests.
+ * If you are looking for a way to cancel requests, you should use the `cancellable` option.
+ * - **`cancellable`** – `{boolean}` – if set to true, the request made by a "non-instance" call
+ * will be cancelled (if not already completed) by calling `$cancelRequest()` on the call's
+ * return value. Calling `$cancelRequest()` for a non-cancellable or an already
+ * completed/cancelled request will have no effect.
+ * - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the
+ * XHR object. See
+ * [requests with credentials](https://developer.mozilla.org/en/http_access_control#section_5)
+ * for more information.
+ * - **`responseType`** - `{string}` - see
+ * [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType).
+ * - **`interceptor`** - `{Object=}` - The interceptor object has two optional methods -
+ * `response` and `responseError`. Both `response` and `responseError` interceptors get called
+ * with `http response` object. See {@link ng.$http $http interceptors}.
+ *
+ * @param {Object} options Hash with custom settings that should extend the
+ * default `$resourceProvider` behavior. The supported options are:
+ *
+ * - **`stripTrailingSlashes`** – {boolean} – If true then the trailing
+ * slashes from any calculated URL will be stripped. (Defaults to true.)
+ * - **`cancellable`** – {boolean} – If true, the request made by a "non-instance" call will be
+ * cancelled (if not already completed) by calling `$cancelRequest()` on the call's return value.
+ * This can be overwritten per action. (Defaults to false.)
+ *
+ * @returns {Object} A resource "class" object with methods for the default set of resource actions
+ * optionally extended with custom `actions`. The default set contains these actions:
+ * ```js
+ * { 'get': {method:'GET'},
+ * 'save': {method:'POST'},
+ * 'query': {method:'GET', isArray:true},
+ * 'remove': {method:'DELETE'},
+ * 'delete': {method:'DELETE'} };
+ * ```
+ *
+ * Calling these methods invoke an {@link ng.$http} with the specified http method,
+ * destination and parameters. When the data is returned from the server then the object is an
+ * instance of the resource class. The actions `save`, `remove` and `delete` are available on it
+ * as methods with the `$` prefix. This allows you to easily perform CRUD operations (create,
+ * read, update, delete) on server-side data like this:
+ * ```js
+ * var User = $resource('/user/:userId', {userId:'@id'});
+ * var user = User.get({userId:123}, function() {
+ * user.abc = true;
+ * user.$save();
+ * });
+ * ```
+ *
+ * It is important to realize that invoking a $resource object method immediately returns an
+ * empty reference (object or array depending on `isArray`). Once the data is returned from the
+ * server the existing reference is populated with the actual data. This is a useful trick since
+ * usually the resource is assigned to a model which is then rendered by the view. Having an empty
+ * object results in no rendering, once the data arrives from the server then the object is
+ * populated with the data and the view automatically re-renders itself showing the new data. This
+ * means that in most cases one never has to write a callback function for the action methods.
+ *
+ * The action methods on the class object or instance object can be invoked with the following
+ * parameters:
+ *
+ * - HTTP GET "class" actions: `Resource.action([parameters], [success], [error])`
+ * - non-GET "class" actions: `Resource.action([parameters], postData, [success], [error])`
+ * - non-GET instance actions: `instance.$action([parameters], [success], [error])`
+ *
+ *
+ * Success callback is called with (value, responseHeaders) arguments, where the value is
+ * the populated resource instance or collection object. The error callback is called
+ * with (httpResponse) argument.
+ *
+ * Class actions return empty instance (with additional properties below).
+ * Instance actions return promise of the action.
+ *
+ * The Resource instances and collections have these additional properties:
+ *
+ * - `$promise`: the {@link ng.$q promise} of the original server interaction that created this
+ * instance or collection.
+ *
+ * On success, the promise is resolved with the same resource instance or collection object,
+ * updated with data from server. This makes it easy to use in
+ * {@link ngRoute.$routeProvider resolve section of $routeProvider.when()} to defer view
+ * rendering until the resource(s) are loaded.
+ *
+ * On failure, the promise is rejected with the {@link ng.$http http response} object, without
+ * the `resource` property.
+ *
+ * If an interceptor object was provided, the promise will instead be resolved with the value
+ * returned by the interceptor.
+ *
+ * - `$resolved`: `true` after first server interaction is completed (either with success or
+ * rejection), `false` before that. Knowing if the Resource has been resolved is useful in
+ * data-binding.
+ *
+ * The Resource instances and collections have these additional methods:
+ *
+ * - `$cancelRequest`: If there is a cancellable, pending request related to the instance or
+ * collection, calling this method will abort the request.
+ *
+ * @example
+ *
+ * # Credit card resource
+ *
+ * ```js
+ // Define CreditCard class
+ var CreditCard = $resource('/user/:userId/card/:cardId',
+ {userId:123, cardId:'@id'}, {
+ charge: {method:'POST', params:{charge:true}}
+ });
+
+ // We can retrieve a collection from the server
+ var cards = CreditCard.query(function() {
+ // GET: /user/123/card
+ // server returns: [ {id:456, number:'1234', name:'Smith'} ];
+
+ var card = cards[0];
+ // each item is an instance of CreditCard
+ expect(card instanceof CreditCard).toEqual(true);
+ card.name = "J. Smith";
+ // non GET methods are mapped onto the instances
+ card.$save();
+ // POST: /user/123/card/456 {id:456, number:'1234', name:'J. Smith'}
+ // server returns: {id:456, number:'1234', name: 'J. Smith'};
+
+ // our custom method is mapped as well.
+ card.$charge({amount:9.99});
+ // POST: /user/123/card/456?amount=9.99&charge=true {id:456, number:'1234', name:'J. Smith'}
+ });
+
+ // we can create an instance as well
+ var newCard = new CreditCard({number:'0123'});
+ newCard.name = "Mike Smith";
+ newCard.$save();
+ // POST: /user/123/card {number:'0123', name:'Mike Smith'}
+ // server returns: {id:789, number:'0123', name: 'Mike Smith'};
+ expect(newCard.id).toEqual(789);
+ * ```
+ *
+ * The object returned from this function execution is a resource "class" which has "static" method
+ * for each action in the definition.
+ *
+ * Calling these methods invoke `$http` on the `url` template with the given `method`, `params` and
+ * `headers`.
+ *
+ * @example
+ *
+ * # User resource
+ *
+ * When the data is returned from the server then the object is an instance of the resource type and
+ * all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD
+ * operations (create, read, update, delete) on server-side data.
+
+ ```js
+ var User = $resource('/user/:userId', {userId:'@id'});
+ User.get({userId:123}, function(user) {
+ user.abc = true;
+ user.$save();
+ });
+ ```
+ *
+ * It's worth noting that the success callback for `get`, `query` and other methods gets passed
+ * in the response that came from the server as well as $http header getter function, so one
+ * could rewrite the above example and get access to http headers as:
+ *
+ ```js
+ var User = $resource('/user/:userId', {userId:'@id'});
+ User.get({userId:123}, function(user, getResponseHeaders){
+ user.abc = true;
+ user.$save(function(user, putResponseHeaders) {
+ //user => saved user object
+ //putResponseHeaders => $http header getter
+ });
+ });
+ ```
+ *
+ * You can also access the raw `$http` promise via the `$promise` property on the object returned
+ *
+ ```
+ var User = $resource('/user/:userId', {userId:'@id'});
+ User.get({userId:123})
+ .$promise.then(function(user) {
+ $scope.user = user;
+ });
+ ```
+ *
+ * @example
+ *
+ * # Creating a custom 'PUT' request
+ *
+ * In this example we create a custom method on our resource to make a PUT request
+ * ```js
+ * var app = angular.module('app', ['ngResource', 'ngRoute']);
+ *
+ * // Some APIs expect a PUT request in the format URL/object/ID
+ * // Here we are creating an 'update' method
+ * app.factory('Notes', ['$resource', function($resource) {
+ * return $resource('/notes/:id', null,
+ * {
+ * 'update': { method:'PUT' }
+ * });
+ * }]);
+ *
+ * // In our controller we get the ID from the URL using ngRoute and $routeParams
+ * // We pass in $routeParams and our Notes factory along with $scope
+ * app.controller('NotesCtrl', ['$scope', '$routeParams', 'Notes',
+ function($scope, $routeParams, Notes) {
+ * // First get a note object from the factory
+ * var note = Notes.get({ id:$routeParams.id });
+ * $id = note.id;
+ *
+ * // Now call update passing in the ID first then the object you are updating
+ * Notes.update({ id:$id }, note);
+ *
+ * // This will PUT /notes/ID with the note object in the request payload
+ * }]);
+ * ```
+ *
+ * @example
+ *
+ * # Cancelling requests
+ *
+ * If an action's configuration specifies that it is cancellable, you can cancel the request related
+ * to an instance or collection (as long as it is a result of a "non-instance" call):
+ *
+ ```js
+ // ...defining the `Hotel` resource...
+ var Hotel = $resource('/api/hotel/:id', {id: '@id'}, {
+ // Let's make the `query()` method cancellable
+ query: {method: 'get', isArray: true, cancellable: true}
+ });
+
+ // ...somewhere in the PlanVacationController...
+ ...
+ this.onDestinationChanged = function onDestinationChanged(destination) {
+ // We don't care about any pending request for hotels
+ // in a different destination any more
+ this.availableHotels.$cancelRequest();
+
+ // Let's query for hotels in ''
+ // (calls: /api/hotel?location=)
+ this.availableHotels = Hotel.query({location: destination});
+ };
+ ```
+ *
+ */
+angular.module('ngResource', ['ng']).
+ provider('$resource', function() {
+ var PROTOCOL_AND_DOMAIN_REGEX = /^https?:\/\/[^\/]*/;
+ var provider = this;
+
+ this.defaults = {
+ // Strip slashes by default
+ stripTrailingSlashes: true,
+
+ // Default actions configuration
+ actions: {
+ 'get': {method: 'GET'},
+ 'save': {method: 'POST'},
+ 'query': {method: 'GET', isArray: true},
+ 'remove': {method: 'DELETE'},
+ 'delete': {method: 'DELETE'}
+ }
+ };
+
+ this.$get = ['$http', '$log', '$q', '$timeout', function($http, $log, $q, $timeout) {
+
+ var noop = angular.noop,
+ forEach = angular.forEach,
+ extend = angular.extend,
+ copy = angular.copy,
+ isFunction = angular.isFunction;
+
+ /**
+ * We need our custom method because encodeURIComponent is too aggressive and doesn't follow
+ * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set
+ * (pchar) allowed in path segments:
+ * segment = *pchar
+ * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
+ * pct-encoded = "%" HEXDIG HEXDIG
+ * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
+ * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
+ * / "*" / "+" / "," / ";" / "="
+ */
+ function encodeUriSegment(val) {
+ return encodeUriQuery(val, true).
+ replace(/%26/gi, '&').
+ replace(/%3D/gi, '=').
+ replace(/%2B/gi, '+');
+ }
+
+
+ /**
+ * This method is intended for encoding *key* or *value* parts of query component. We need a
+ * custom method because encodeURIComponent is too aggressive and encodes stuff that doesn't
+ * have to be encoded per http://tools.ietf.org/html/rfc3986:
+ * query = *( pchar / "/" / "?" )
+ * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
+ * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
+ * pct-encoded = "%" HEXDIG HEXDIG
+ * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
+ * / "*" / "+" / "," / ";" / "="
+ */
+ function encodeUriQuery(val, pctEncodeSpaces) {
+ return encodeURIComponent(val).
+ replace(/%40/gi, '@').
+ replace(/%3A/gi, ':').
+ replace(/%24/g, '$').
+ replace(/%2C/gi, ',').
+ replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));
+ }
+
+ function Route(template, defaults) {
+ this.template = template;
+ this.defaults = extend({}, provider.defaults, defaults);
+ this.urlParams = {};
+ }
+
+ Route.prototype = {
+ setUrlParams: function(config, params, actionUrl) {
+ var self = this,
+ url = actionUrl || self.template,
+ val,
+ encodedVal,
+ protocolAndDomain = '';
+
+ var urlParams = self.urlParams = {};
+ forEach(url.split(/\W/), function(param) {
+ if (param === 'hasOwnProperty') {
+ throw $resourceMinErr('badname', "hasOwnProperty is not a valid parameter name.");
+ }
+ if (!(new RegExp("^\\d+$").test(param)) && param &&
+ (new RegExp("(^|[^\\\\]):" + param + "(\\W|$)").test(url))) {
+ urlParams[param] = {
+ isQueryParamValue: (new RegExp("\\?.*=:" + param + "(?:\\W|$)")).test(url)
+ };
+ }
+ });
+ url = url.replace(/\\:/g, ':');
+ url = url.replace(PROTOCOL_AND_DOMAIN_REGEX, function(match) {
+ protocolAndDomain = match;
+ return '';
+ });
+
+ params = params || {};
+ forEach(self.urlParams, function(paramInfo, urlParam) {
+ val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam];
+ if (angular.isDefined(val) && val !== null) {
+ if (paramInfo.isQueryParamValue) {
+ encodedVal = encodeUriQuery(val, true);
+ } else {
+ encodedVal = encodeUriSegment(val);
+ }
+ url = url.replace(new RegExp(":" + urlParam + "(\\W|$)", "g"), function(match, p1) {
+ return encodedVal + p1;
+ });
+ } else {
+ url = url.replace(new RegExp("(\/?):" + urlParam + "(\\W|$)", "g"), function(match,
+ leadingSlashes, tail) {
+ if (tail.charAt(0) == '/') {
+ return tail;
+ } else {
+ return leadingSlashes + tail;
+ }
+ });
+ }
+ });
+
+ // strip trailing slashes and set the url (unless this behavior is specifically disabled)
+ if (self.defaults.stripTrailingSlashes) {
+ url = url.replace(/\/+$/, '') || '/';
+ }
+
+ // then replace collapse `/.` if found in the last URL path segment before the query
+ // E.g. `http://url.com/id./format?q=x` becomes `http://url.com/id.format?q=x`
+ url = url.replace(/\/\.(?=\w+($|\?))/, '.');
+ // replace escaped `/\.` with `/.`
+ config.url = protocolAndDomain + url.replace(/\/\\\./, '/.');
+
+
+ // set params - delegate param encoding to $http
+ forEach(params, function(value, key) {
+ if (!self.urlParams[key]) {
+ config.params = config.params || {};
+ config.params[key] = value;
+ }
+ });
+ }
+ };
+
+
+ function resourceFactory(url, paramDefaults, actions, options) {
+ var route = new Route(url, options);
+
+ actions = extend({}, provider.defaults.actions, actions);
+
+ function extractParams(data, actionParams) {
+ var ids = {};
+ actionParams = extend({}, paramDefaults, actionParams);
+ forEach(actionParams, function(value, key) {
+ if (isFunction(value)) { value = value(); }
+ ids[key] = value && value.charAt && value.charAt(0) == '@' ?
+ lookupDottedPath(data, value.substr(1)) : value;
+ });
+ return ids;
+ }
+
+ function defaultResponseInterceptor(response) {
+ return response.resource;
+ }
+
+ function Resource(value) {
+ shallowClearAndCopy(value || {}, this);
+ }
+
+ Resource.prototype.toJSON = function() {
+ var data = extend({}, this);
+ delete data.$promise;
+ delete data.$resolved;
+ return data;
+ };
+
+ forEach(actions, function(action, name) {
+ var hasBody = /^(POST|PUT|PATCH)$/i.test(action.method);
+ var numericTimeout = action.timeout;
+ var cancellable = angular.isDefined(action.cancellable) ? action.cancellable :
+ (options && angular.isDefined(options.cancellable)) ? options.cancellable :
+ provider.defaults.cancellable;
+
+ if (numericTimeout && !angular.isNumber(numericTimeout)) {
+ $log.debug('ngResource:\n' +
+ ' Only numeric values are allowed as `timeout`.\n' +
+ ' Promises are not supported in $resource, because the same value would ' +
+ 'be used for multiple requests. If you are looking for a way to cancel ' +
+ 'requests, you should use the `cancellable` option.');
+ delete action.timeout;
+ numericTimeout = null;
+ }
+
+ Resource[name] = function(a1, a2, a3, a4) {
+ var params = {}, data, success, error;
+
+ /* jshint -W086 */ /* (purposefully fall through case statements) */
+ switch (arguments.length) {
+ case 4:
+ error = a4;
+ success = a3;
+ //fallthrough
+ case 3:
+ case 2:
+ if (isFunction(a2)) {
+ if (isFunction(a1)) {
+ success = a1;
+ error = a2;
+ break;
+ }
+
+ success = a2;
+ error = a3;
+ //fallthrough
+ } else {
+ params = a1;
+ data = a2;
+ success = a3;
+ break;
+ }
+ case 1:
+ if (isFunction(a1)) success = a1;
+ else if (hasBody) data = a1;
+ else params = a1;
+ break;
+ case 0: break;
+ default:
+ throw $resourceMinErr('badargs',
+ "Expected up to 4 arguments [params, data, success, error], got {0} arguments",
+ arguments.length);
+ }
+ /* jshint +W086 */ /* (purposefully fall through case statements) */
+
+ var isInstanceCall = this instanceof Resource;
+ var value = isInstanceCall ? data : (action.isArray ? [] : new Resource(data));
+ var httpConfig = {};
+ var responseInterceptor = action.interceptor && action.interceptor.response ||
+ defaultResponseInterceptor;
+ var responseErrorInterceptor = action.interceptor && action.interceptor.responseError ||
+ undefined;
+ var timeoutDeferred;
+ var numericTimeoutPromise;
+
+ forEach(action, function(value, key) {
+ switch (key) {
+ default:
+ httpConfig[key] = copy(value);
+ break;
+ case 'params':
+ case 'isArray':
+ case 'interceptor':
+ case 'cancellable':
+ break;
+ }
+ });
+
+ if (!isInstanceCall && cancellable) {
+ timeoutDeferred = $q.defer();
+ httpConfig.timeout = timeoutDeferred.promise;
+
+ if (numericTimeout) {
+ numericTimeoutPromise = $timeout(timeoutDeferred.resolve, numericTimeout);
+ }
+ }
+
+ if (hasBody) httpConfig.data = data;
+ route.setUrlParams(httpConfig,
+ extend({}, extractParams(data, action.params || {}), params),
+ action.url);
+
+ var promise = $http(httpConfig).then(function(response) {
+ var data = response.data;
+
+ if (data) {
+ // Need to convert action.isArray to boolean in case it is undefined
+ // jshint -W018
+ if (angular.isArray(data) !== (!!action.isArray)) {
+ throw $resourceMinErr('badcfg',
+ 'Error in resource configuration for action `{0}`. Expected response to ' +
+ 'contain an {1} but got an {2} (Request: {3} {4})', name, action.isArray ? 'array' : 'object',
+ angular.isArray(data) ? 'array' : 'object', httpConfig.method, httpConfig.url);
+ }
+ // jshint +W018
+ if (action.isArray) {
+ value.length = 0;
+ forEach(data, function(item) {
+ if (typeof item === "object") {
+ value.push(new Resource(item));
+ } else {
+ // Valid JSON values may be string literals, and these should not be converted
+ // into objects. These items will not have access to the Resource prototype
+ // methods, but unfortunately there
+ value.push(item);
+ }
+ });
+ } else {
+ var promise = value.$promise; // Save the promise
+ shallowClearAndCopy(data, value);
+ value.$promise = promise; // Restore the promise
+ }
+ }
+ response.resource = value;
+
+ return response;
+ }, function(response) {
+ (error || noop)(response);
+ return $q.reject(response);
+ });
+
+ promise.finally(function() {
+ value.$resolved = true;
+ if (!isInstanceCall && cancellable) {
+ value.$cancelRequest = angular.noop;
+ $timeout.cancel(numericTimeoutPromise);
+ timeoutDeferred = numericTimeoutPromise = httpConfig.timeout = null;
+ }
+ });
+
+ promise = promise.then(
+ function(response) {
+ var value = responseInterceptor(response);
+ (success || noop)(value, response.headers);
+ return value;
+ },
+ responseErrorInterceptor);
+
+ if (!isInstanceCall) {
+ // we are creating instance / collection
+ // - set the initial promise
+ // - return the instance / collection
+ value.$promise = promise;
+ value.$resolved = false;
+ if (cancellable) value.$cancelRequest = timeoutDeferred.resolve;
+
+ return value;
+ }
+
+ // instance call
+ return promise;
+ };
+
+
+ Resource.prototype['$' + name] = function(params, success, error) {
+ if (isFunction(params)) {
+ error = success; success = params; params = {};
+ }
+ var result = Resource[name].call(this, params, this, success, error);
+ return result.$promise || result;
+ };
+ });
+
+ Resource.bind = function(additionalParamDefaults) {
+ return resourceFactory(url, extend({}, paramDefaults, additionalParamDefaults), actions);
+ };
+
+ return Resource;
+ }
+
+ return resourceFactory;
+ }];
+ });
+
+
+})(window, window.angular);
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-resource.min.js b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-resource.min.js
new file mode 100644
index 0000000..306657d
--- /dev/null
+++ b/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/external/angular-1.5/angular-resource.min.js
@@ -0,0 +1,15 @@
+/*
+ AngularJS v1.5.0
+ (c) 2010-2016 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(Q,d,G){'use strict';function H(t,g){g=g||{};d.forEach(g,function(d,q){delete g[q]});for(var q in t)!t.hasOwnProperty(q)||"$"===q.charAt(0)&&"$"===q.charAt(1)||(g[q]=t[q]);return g}var z=d.$$minErr("$resource"),N=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;d.module("ngResource",["ng"]).provider("$resource",function(){var t=/^https?:\/\/[^\/]*/,g=this;this.defaults={stripTrailingSlashes:!0,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}};
+this.$get=["$http","$log","$q","$timeout",function(q,M,I,J){function A(d,h){return encodeURIComponent(d).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,h?"%20":"+")}function B(d,h){this.template=d;this.defaults=v({},g.defaults,h);this.urlParams={}}function K(e,h,n,k){function c(a,b){var c={};b=v({},h,b);u(b,function(b,h){x(b)&&(b=b());var f;if(b&&b.charAt&&"@"==b.charAt(0)){f=a;var l=b.substr(1);if(null==l||""===l||"hasOwnProperty"===l||!N.test("."+
+l))throw z("badmember",l);for(var l=l.split("."),m=0,k=l.length;m
+ */
+ /* global -ngRouteModule */
+var ngRouteModule = angular.module('ngRoute', ['ng']).
+ provider('$route', $RouteProvider),
+ $routeMinErr = angular.$$minErr('ngRoute');
+
+/**
+ * @ngdoc provider
+ * @name $routeProvider
+ *
+ * @description
+ *
+ * Used for configuring routes.
+ *
+ * ## Example
+ * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`.
+ *
+ * ## Dependencies
+ * Requires the {@link ngRoute `ngRoute`} module to be installed.
+ */
+function $RouteProvider() {
+ function inherit(parent, extra) {
+ return angular.extend(Object.create(parent), extra);
+ }
+
+ var routes = {};
+
+ /**
+ * @ngdoc method
+ * @name $routeProvider#when
+ *
+ * @param {string} path Route path (matched against `$location.path`). If `$location.path`
+ * contains redundant trailing slash or is missing one, the route will still match and the
+ * `$location.path` will be updated to add or drop the trailing slash to exactly match the
+ * route definition.
+ *
+ * * `path` can contain named groups starting with a colon: e.g. `:name`. All characters up
+ * to the next slash are matched and stored in `$routeParams` under the given `name`
+ * when the route matches.
+ * * `path` can contain named groups starting with a colon and ending with a star:
+ * e.g.`:name*`. All characters are eagerly stored in `$routeParams` under the given `name`
+ * when the route matches.
+ * * `path` can contain optional named groups with a question mark: e.g.`:name?`.
+ *
+ * For example, routes like `/color/:color/largecode/:largecode*\/edit` will match
+ * `/color/brown/largecode/code/with/slashes/edit` and extract:
+ *
+ * * `color: brown`
+ * * `largecode: code/with/slashes`.
+ *
+ *
+ * @param {Object} route Mapping information to be assigned to `$route.current` on route
+ * match.
+ *
+ * Object properties:
+ *
+ * - `controller` – `{(string|function()=}` – Controller fn that should be associated with
+ * newly created scope or the name of a {@link angular.Module#controller registered
+ * controller} if passed as a string.
+ * - `controllerAs` – `{string=}` – An identifier name for a reference to the controller.
+ * If present, the controller will be published to scope under the `controllerAs` name.
+ * - `template` – `{string=|function()=}` – html template as a string or a function that
+ * returns an html template as a string which should be used by {@link
+ * ngRoute.directive:ngView ngView} or {@link ng.directive:ngInclude ngInclude} directives.
+ * This property takes precedence over `templateUrl`.
+ *
+ * If `template` is a function, it will be called with the following parameters:
+ *
+ * - `{Array.